@work-shape/catalyst-api-contract 0.8.0-rc.3 → 0.8.0-rc.4

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
@@ -2,8 +2,8 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "Workshape Catalyst API",
5
- "version": "0.8.0-rc.3",
6
- "description": "Every operation under `/api/v1` of release 0.8.0-rc.3, and the unversioned readiness probe `/ready`. Every error answers with the envelope `ApiErrorResponse`; its `code` is the stable part, its `correlationId` names the request in the instance's log."
5
+ "version": "0.8.0-rc.4",
6
+ "description": "Every operation under `/api/v1` of release 0.8.0-rc.4, and the unversioned readiness probe `/ready`. Every error answers with the envelope `ApiErrorResponse`; its `code` is the stable part, its `correlationId` names the request in the instance's log."
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -15271,6 +15271,13 @@
15271
15271
  "minimum": -9007199254740991,
15272
15272
  "maximum": 9007199254740991
15273
15273
  },
15274
+ "originalStatus": {
15275
+ "type": "string",
15276
+ "enum": [
15277
+ "available",
15278
+ "released"
15279
+ ]
15280
+ },
15274
15281
  "state": {
15275
15282
  "type": "string",
15276
15283
  "enum": [
@@ -15544,17 +15551,17 @@
15544
15551
  "security": [
15545
15552
  {
15546
15553
  "sessionCookie": [
15547
- "data_store_rows:write"
15554
+ "config_assets:write"
15548
15555
  ]
15549
15556
  },
15550
15557
  {
15551
15558
  "sessionToken": [
15552
- "data_store_rows:write"
15559
+ "config_assets:write"
15553
15560
  ]
15554
15561
  },
15555
15562
  {
15556
15563
  "accessToken": [
15557
- "data_store_rows:write"
15564
+ "config_assets:write"
15558
15565
  ]
15559
15566
  }
15560
15567
  ],
@@ -15595,22 +15602,115 @@
15595
15602
  "content": {
15596
15603
  "application/json": {
15597
15604
  "schema": {
15598
- "type": "object",
15599
- "properties": {
15600
- "documentIds": {
15601
- "minItems": 1,
15602
- "maxItems": 100,
15603
- "type": "array",
15604
- "items": {
15605
- "type": "string",
15606
- "minLength": 1
15607
- }
15605
+ "anyOf": [
15606
+ {
15607
+ "type": "object",
15608
+ "properties": {
15609
+ "documentIds": {
15610
+ "minItems": 1,
15611
+ "maxItems": 100,
15612
+ "type": "array",
15613
+ "items": {
15614
+ "type": "string",
15615
+ "minLength": 1,
15616
+ "maxLength": 200
15617
+ }
15618
+ }
15619
+ },
15620
+ "required": [
15621
+ "documentIds"
15622
+ ],
15623
+ "additionalProperties": false
15624
+ },
15625
+ {
15626
+ "type": "object",
15627
+ "properties": {
15628
+ "source": {
15629
+ "type": "string",
15630
+ "minLength": 1,
15631
+ "maxLength": 63
15632
+ },
15633
+ "sourceItemIds": {
15634
+ "minItems": 1,
15635
+ "maxItems": 100,
15636
+ "type": "array",
15637
+ "items": {
15638
+ "type": "string",
15639
+ "minLength": 1,
15640
+ "maxLength": 200
15641
+ }
15642
+ }
15643
+ },
15644
+ "required": [
15645
+ "source",
15646
+ "sourceItemIds"
15647
+ ],
15648
+ "additionalProperties": false
15649
+ },
15650
+ {
15651
+ "type": "object",
15652
+ "properties": {
15653
+ "source": {
15654
+ "type": "string",
15655
+ "minLength": 1,
15656
+ "maxLength": 63
15657
+ },
15658
+ "failureCode": {
15659
+ "anyOf": [
15660
+ {
15661
+ "type": "string",
15662
+ "enum": [
15663
+ "knowledge_source_unreachable",
15664
+ "knowledge_source_refused",
15665
+ "knowledge_fetch_failed",
15666
+ "knowledge_source_limit_reached",
15667
+ "knowledge_file_over_limit",
15668
+ "knowledge_file_format_unsupported"
15669
+ ]
15670
+ },
15671
+ {
15672
+ "type": "string",
15673
+ "enum": [
15674
+ "knowledge_file_format_unsupported",
15675
+ "knowledge_file_over_limit",
15676
+ "knowledge_file_unreadable",
15677
+ "knowledge_file_missing",
15678
+ "knowledge_extraction_failed",
15679
+ "knowledge_file_format_unavailable",
15680
+ "knowledge_text_unreadable",
15681
+ "knowledge_text_empty",
15682
+ "knowledge_index_failed"
15683
+ ]
15684
+ }
15685
+ ]
15686
+ }
15687
+ },
15688
+ "required": [
15689
+ "source",
15690
+ "failureCode"
15691
+ ],
15692
+ "additionalProperties": false
15693
+ },
15694
+ {
15695
+ "type": "object",
15696
+ "properties": {
15697
+ "source": {
15698
+ "type": "string",
15699
+ "minLength": 1,
15700
+ "maxLength": 63
15701
+ },
15702
+ "all": {
15703
+ "type": "boolean",
15704
+ "const": true
15705
+ }
15706
+ },
15707
+ "required": [
15708
+ "source",
15709
+ "all"
15710
+ ],
15711
+ "additionalProperties": false
15608
15712
  }
15609
- },
15610
- "required": [
15611
- "documentIds"
15612
- ],
15613
- "additionalProperties": false
15713
+ ]
15614
15714
  }
15615
15715
  }
15616
15716
  }
@@ -15653,7 +15753,6 @@
15653
15753
  }
15654
15754
  },
15655
15755
  "required": [
15656
- "documents",
15657
15756
  "queued"
15658
15757
  ]
15659
15758
  }
@@ -15922,6 +16021,138 @@
15922
16021
  "x-catalyst-rate-class": "write"
15923
16022
  }
15924
16023
  },
16024
+ "/api/v1/knowledge-bases/{knowledgeBase}/locate": {
16025
+ "get": {
16026
+ "operationId": "knowledge_bases.locate",
16027
+ "summary": "Locate a source item for erasure: state and lifecycle times without content, file name or path",
16028
+ "tags": [
16029
+ "Knowledge Bases"
16030
+ ],
16031
+ "security": [
16032
+ {
16033
+ "sessionCookie": [
16034
+ "config_assets:read"
16035
+ ]
16036
+ },
16037
+ {
16038
+ "sessionToken": [
16039
+ "config_assets:read"
16040
+ ]
16041
+ },
16042
+ {
16043
+ "accessToken": [
16044
+ "config_assets:read"
16045
+ ]
16046
+ }
16047
+ ],
16048
+ "parameters": [
16049
+ {
16050
+ "name": "knowledgeBase",
16051
+ "in": "path",
16052
+ "required": true,
16053
+ "schema": {
16054
+ "type": "string"
16055
+ }
16056
+ },
16057
+ {
16058
+ "name": "sourceItemId",
16059
+ "in": "query",
16060
+ "required": true,
16061
+ "schema": {
16062
+ "type": "string",
16063
+ "minLength": 1,
16064
+ "maxLength": 200
16065
+ }
16066
+ }
16067
+ ],
16068
+ "responses": {
16069
+ "200": {
16070
+ "description": "The result",
16071
+ "content": {
16072
+ "application/json": {
16073
+ "schema": {
16074
+ "type": "object",
16075
+ "properties": {
16076
+ "sourceItemId": {
16077
+ "type": "string"
16078
+ },
16079
+ "source": {
16080
+ "type": "string"
16081
+ },
16082
+ "itemId": {
16083
+ "type": "string"
16084
+ },
16085
+ "state": {
16086
+ "type": "string",
16087
+ "enum": [
16088
+ "discovered",
16089
+ "fetched",
16090
+ "indexed",
16091
+ "failed",
16092
+ "withdrawn"
16093
+ ]
16094
+ },
16095
+ "discoveredAt": {
16096
+ "type": "string"
16097
+ },
16098
+ "fetchedAt": {
16099
+ "type": "string"
16100
+ },
16101
+ "withdrawnAt": {
16102
+ "type": "string"
16103
+ },
16104
+ "purgedAt": {
16105
+ "type": "string"
16106
+ }
16107
+ },
16108
+ "required": [
16109
+ "sourceItemId",
16110
+ "source",
16111
+ "itemId",
16112
+ "state",
16113
+ "discoveredAt"
16114
+ ]
16115
+ }
16116
+ }
16117
+ },
16118
+ "headers": {
16119
+ "Operation-Run-Id": {
16120
+ "$ref": "#/components/headers/OperationRunId"
16121
+ }
16122
+ }
16123
+ },
16124
+ "400": {
16125
+ "$ref": "#/components/responses/BadRequest"
16126
+ },
16127
+ "401": {
16128
+ "$ref": "#/components/responses/Unauthenticated"
16129
+ },
16130
+ "403": {
16131
+ "$ref": "#/components/responses/ForbiddenOrPolicyDeniedOrGuardrailBlocked"
16132
+ },
16133
+ "404": {
16134
+ "$ref": "#/components/responses/NotFound"
16135
+ },
16136
+ "409": {
16137
+ "$ref": "#/components/responses/Conflict"
16138
+ },
16139
+ "422": {
16140
+ "$ref": "#/components/responses/ValidationFailed"
16141
+ },
16142
+ "429": {
16143
+ "$ref": "#/components/responses/RateLimited"
16144
+ },
16145
+ "500": {
16146
+ "$ref": "#/components/responses/Internal"
16147
+ },
16148
+ "504": {
16149
+ "$ref": "#/components/responses/Timeout"
16150
+ }
16151
+ },
16152
+ "x-catalyst-effect": "reading",
16153
+ "x-catalyst-rate-class": "read"
16154
+ }
16155
+ },
15925
16156
  "/api/v1/knowledge-bases/{knowledgeBase}/query": {
15926
16157
  "post": {
15927
16158
  "operationId": "knowledge_bases.query",
@@ -16242,19 +16473,799 @@
16242
16473
  "schema": {
16243
16474
  "type": "object",
16244
16475
  "properties": {
16245
- "query": {
16476
+ "query": {
16477
+ "type": "string",
16478
+ "minLength": 1,
16479
+ "maxLength": 1000
16480
+ },
16481
+ "limit": {
16482
+ "type": "integer",
16483
+ "minimum": 1,
16484
+ "maximum": 50
16485
+ }
16486
+ },
16487
+ "required": [
16488
+ "query"
16489
+ ],
16490
+ "additionalProperties": false
16491
+ }
16492
+ }
16493
+ }
16494
+ },
16495
+ "responses": {
16496
+ "200": {
16497
+ "description": "The result",
16498
+ "content": {
16499
+ "application/json": {
16500
+ "schema": {
16501
+ "type": "object",
16502
+ "properties": {
16503
+ "passages": {
16504
+ "type": "array",
16505
+ "items": {
16506
+ "type": "object",
16507
+ "properties": {
16508
+ "ref": {
16509
+ "type": "string"
16510
+ },
16511
+ "knowledgeBase": {
16512
+ "type": "string"
16513
+ },
16514
+ "documentId": {
16515
+ "type": "string"
16516
+ },
16517
+ "fileId": {
16518
+ "type": "string"
16519
+ },
16520
+ "fileName": {
16521
+ "type": "string"
16522
+ },
16523
+ "title": {
16524
+ "type": "string"
16525
+ },
16526
+ "page": {
16527
+ "type": "integer",
16528
+ "minimum": -9007199254740991,
16529
+ "maximum": 9007199254740991
16530
+ },
16531
+ "heading": {
16532
+ "type": "string"
16533
+ },
16534
+ "text": {
16535
+ "type": "string"
16536
+ },
16537
+ "score": {
16538
+ "type": "number"
16539
+ },
16540
+ "originLink": {
16541
+ "type": "string"
16542
+ }
16543
+ },
16544
+ "required": [
16545
+ "ref",
16546
+ "knowledgeBase",
16547
+ "documentId",
16548
+ "fileId",
16549
+ "fileName",
16550
+ "title",
16551
+ "text",
16552
+ "score"
16553
+ ]
16554
+ }
16555
+ },
16556
+ "signals": {
16557
+ "type": "array",
16558
+ "items": {
16559
+ "type": "string",
16560
+ "enum": [
16561
+ "semantic",
16562
+ "keyword",
16563
+ "title"
16564
+ ]
16565
+ }
16566
+ }
16567
+ },
16568
+ "required": [
16569
+ "passages",
16570
+ "signals"
16571
+ ]
16572
+ }
16573
+ }
16574
+ },
16575
+ "headers": {
16576
+ "Operation-Run-Id": {
16577
+ "$ref": "#/components/headers/OperationRunId"
16578
+ }
16579
+ }
16580
+ },
16581
+ "400": {
16582
+ "$ref": "#/components/responses/BadRequest"
16583
+ },
16584
+ "401": {
16585
+ "$ref": "#/components/responses/Unauthenticated"
16586
+ },
16587
+ "403": {
16588
+ "$ref": "#/components/responses/ForbiddenOrPolicyDeniedOrGuardrailBlocked"
16589
+ },
16590
+ "404": {
16591
+ "$ref": "#/components/responses/NotFound"
16592
+ },
16593
+ "409": {
16594
+ "$ref": "#/components/responses/Conflict"
16595
+ },
16596
+ "422": {
16597
+ "$ref": "#/components/responses/ValidationFailed"
16598
+ },
16599
+ "429": {
16600
+ "$ref": "#/components/responses/RateLimited"
16601
+ },
16602
+ "500": {
16603
+ "$ref": "#/components/responses/Internal"
16604
+ },
16605
+ "504": {
16606
+ "$ref": "#/components/responses/Timeout"
16607
+ }
16608
+ },
16609
+ "x-catalyst-effect": "reading",
16610
+ "x-catalyst-rate-class": "read"
16611
+ }
16612
+ },
16613
+ "/api/v1/knowledge-bases/{knowledgeBase}/sources": {
16614
+ "get": {
16615
+ "operationId": "knowledge_bases.sources",
16616
+ "summary": "Read source states, counts, failure codes and sync progress",
16617
+ "tags": [
16618
+ "Knowledge Bases"
16619
+ ],
16620
+ "security": [
16621
+ {
16622
+ "sessionCookie": [
16623
+ "config_assets:read"
16624
+ ]
16625
+ },
16626
+ {
16627
+ "sessionToken": [
16628
+ "config_assets:read"
16629
+ ]
16630
+ },
16631
+ {
16632
+ "accessToken": [
16633
+ "config_assets:read"
16634
+ ]
16635
+ }
16636
+ ],
16637
+ "parameters": [
16638
+ {
16639
+ "name": "knowledgeBase",
16640
+ "in": "path",
16641
+ "required": true,
16642
+ "schema": {
16643
+ "type": "string"
16644
+ }
16645
+ }
16646
+ ],
16647
+ "responses": {
16648
+ "200": {
16649
+ "description": "The result",
16650
+ "content": {
16651
+ "application/json": {
16652
+ "schema": {
16653
+ "type": "object",
16654
+ "properties": {
16655
+ "sources": {
16656
+ "type": "array",
16657
+ "items": {
16658
+ "type": "object",
16659
+ "properties": {
16660
+ "id": {
16661
+ "type": "string"
16662
+ },
16663
+ "connection": {
16664
+ "type": "string"
16665
+ },
16666
+ "items": {
16667
+ "type": "object",
16668
+ "properties": {
16669
+ "discovered": {
16670
+ "type": "integer",
16671
+ "minimum": 0,
16672
+ "maximum": 9007199254740991
16673
+ },
16674
+ "fetched": {
16675
+ "type": "integer",
16676
+ "minimum": 0,
16677
+ "maximum": 9007199254740991
16678
+ },
16679
+ "indexed": {
16680
+ "type": "integer",
16681
+ "minimum": 0,
16682
+ "maximum": 9007199254740991
16683
+ },
16684
+ "failed": {
16685
+ "type": "integer",
16686
+ "minimum": 0,
16687
+ "maximum": 9007199254740991
16688
+ },
16689
+ "withdrawn": {
16690
+ "type": "integer",
16691
+ "minimum": 0,
16692
+ "maximum": 9007199254740991
16693
+ }
16694
+ },
16695
+ "required": [
16696
+ "discovered",
16697
+ "fetched",
16698
+ "indexed",
16699
+ "failed",
16700
+ "withdrawn"
16701
+ ]
16702
+ },
16703
+ "failures": {
16704
+ "type": "array",
16705
+ "items": {
16706
+ "type": "object",
16707
+ "properties": {
16708
+ "code": {
16709
+ "anyOf": [
16710
+ {
16711
+ "type": "string",
16712
+ "enum": [
16713
+ "knowledge_source_unreachable",
16714
+ "knowledge_source_refused",
16715
+ "knowledge_fetch_failed",
16716
+ "knowledge_source_limit_reached",
16717
+ "knowledge_file_over_limit",
16718
+ "knowledge_file_format_unsupported"
16719
+ ]
16720
+ },
16721
+ {
16722
+ "type": "string",
16723
+ "enum": [
16724
+ "knowledge_file_format_unsupported",
16725
+ "knowledge_file_over_limit",
16726
+ "knowledge_file_unreadable",
16727
+ "knowledge_file_missing",
16728
+ "knowledge_extraction_failed",
16729
+ "knowledge_file_format_unavailable",
16730
+ "knowledge_text_unreadable",
16731
+ "knowledge_text_empty",
16732
+ "knowledge_index_failed"
16733
+ ]
16734
+ }
16735
+ ]
16736
+ },
16737
+ "count": {
16738
+ "type": "integer",
16739
+ "minimum": 0,
16740
+ "maximum": 9007199254740991
16741
+ }
16742
+ },
16743
+ "required": [
16744
+ "code",
16745
+ "count"
16746
+ ]
16747
+ }
16748
+ },
16749
+ "running": {
16750
+ "type": "object",
16751
+ "properties": {
16752
+ "syncRunId": {
16753
+ "type": "string"
16754
+ },
16755
+ "mode": {
16756
+ "type": "string",
16757
+ "enum": [
16758
+ "initial",
16759
+ "changes",
16760
+ "full"
16761
+ ]
16762
+ },
16763
+ "startedAt": {
16764
+ "type": "string"
16765
+ },
16766
+ "itemsPerMinute": {
16767
+ "type": "number",
16768
+ "minimum": 0
16769
+ },
16770
+ "estimatedEndAt": {
16771
+ "type": "string"
16772
+ }
16773
+ },
16774
+ "required": [
16775
+ "syncRunId",
16776
+ "mode",
16777
+ "startedAt"
16778
+ ]
16779
+ },
16780
+ "last": {
16781
+ "type": "object",
16782
+ "properties": {
16783
+ "syncRunId": {
16784
+ "type": "string"
16785
+ },
16786
+ "source": {
16787
+ "type": "string"
16788
+ },
16789
+ "mode": {
16790
+ "type": "string",
16791
+ "enum": [
16792
+ "initial",
16793
+ "changes",
16794
+ "full"
16795
+ ]
16796
+ },
16797
+ "reason": {
16798
+ "type": "string",
16799
+ "enum": [
16800
+ "cursor_expired"
16801
+ ]
16802
+ },
16803
+ "state": {
16804
+ "type": "string",
16805
+ "enum": [
16806
+ "running",
16807
+ "done",
16808
+ "failed"
16809
+ ]
16810
+ },
16811
+ "counts": {
16812
+ "type": "object",
16813
+ "properties": {
16814
+ "discovered": {
16815
+ "type": "integer",
16816
+ "minimum": 0,
16817
+ "maximum": 9007199254740991
16818
+ },
16819
+ "added": {
16820
+ "type": "integer",
16821
+ "minimum": 0,
16822
+ "maximum": 9007199254740991
16823
+ },
16824
+ "changed": {
16825
+ "type": "integer",
16826
+ "minimum": 0,
16827
+ "maximum": 9007199254740991
16828
+ },
16829
+ "moved": {
16830
+ "type": "integer",
16831
+ "minimum": 0,
16832
+ "maximum": 9007199254740991
16833
+ },
16834
+ "withdrawn": {
16835
+ "type": "integer",
16836
+ "minimum": 0,
16837
+ "maximum": 9007199254740991
16838
+ },
16839
+ "failed": {
16840
+ "type": "integer",
16841
+ "minimum": 0,
16842
+ "maximum": 9007199254740991
16843
+ },
16844
+ "skipped": {
16845
+ "type": "integer",
16846
+ "minimum": 0,
16847
+ "maximum": 9007199254740991
16848
+ }
16849
+ },
16850
+ "required": [
16851
+ "discovered",
16852
+ "added",
16853
+ "changed",
16854
+ "moved",
16855
+ "withdrawn",
16856
+ "failed",
16857
+ "skipped"
16858
+ ]
16859
+ },
16860
+ "bytesFetched": {
16861
+ "type": "integer",
16862
+ "minimum": 0,
16863
+ "maximum": 9007199254740991
16864
+ },
16865
+ "failureCode": {
16866
+ "type": "string",
16867
+ "enum": [
16868
+ "knowledge_source_unreachable",
16869
+ "knowledge_source_refused",
16870
+ "knowledge_fetch_failed",
16871
+ "knowledge_source_limit_reached"
16872
+ ]
16873
+ },
16874
+ "startedAt": {
16875
+ "type": "string"
16876
+ },
16877
+ "endedAt": {
16878
+ "type": "string"
16879
+ }
16880
+ },
16881
+ "required": [
16882
+ "syncRunId",
16883
+ "source",
16884
+ "mode",
16885
+ "state",
16886
+ "counts",
16887
+ "bytesFetched",
16888
+ "startedAt"
16889
+ ]
16890
+ },
16891
+ "lastChangeAt": {
16892
+ "type": "string"
16893
+ },
16894
+ "oldestOpenChangeAt": {
16895
+ "type": "string"
16896
+ }
16897
+ },
16898
+ "required": [
16899
+ "id",
16900
+ "connection",
16901
+ "items",
16902
+ "failures"
16903
+ ]
16904
+ }
16905
+ }
16906
+ },
16907
+ "required": [
16908
+ "sources"
16909
+ ]
16910
+ }
16911
+ }
16912
+ },
16913
+ "headers": {
16914
+ "Operation-Run-Id": {
16915
+ "$ref": "#/components/headers/OperationRunId"
16916
+ }
16917
+ }
16918
+ },
16919
+ "400": {
16920
+ "$ref": "#/components/responses/BadRequest"
16921
+ },
16922
+ "401": {
16923
+ "$ref": "#/components/responses/Unauthenticated"
16924
+ },
16925
+ "403": {
16926
+ "$ref": "#/components/responses/ForbiddenOrPolicyDeniedOrGuardrailBlocked"
16927
+ },
16928
+ "404": {
16929
+ "$ref": "#/components/responses/NotFound"
16930
+ },
16931
+ "409": {
16932
+ "$ref": "#/components/responses/Conflict"
16933
+ },
16934
+ "422": {
16935
+ "$ref": "#/components/responses/ValidationFailed"
16936
+ },
16937
+ "429": {
16938
+ "$ref": "#/components/responses/RateLimited"
16939
+ },
16940
+ "500": {
16941
+ "$ref": "#/components/responses/Internal"
16942
+ },
16943
+ "504": {
16944
+ "$ref": "#/components/responses/Timeout"
16945
+ }
16946
+ },
16947
+ "x-catalyst-effect": "reading",
16948
+ "x-catalyst-rate-class": "read"
16949
+ }
16950
+ },
16951
+ "/api/v1/knowledge-bases/{knowledgeBase}/sources/{source}/items": {
16952
+ "get": {
16953
+ "operationId": "knowledge_bases.source_items",
16954
+ "summary": "Page through the items of a source, newest change first; filter by state or failure code",
16955
+ "tags": [
16956
+ "Knowledge Bases"
16957
+ ],
16958
+ "security": [
16959
+ {
16960
+ "sessionCookie": [
16961
+ "config_assets:read"
16962
+ ]
16963
+ },
16964
+ {
16965
+ "sessionToken": [
16966
+ "config_assets:read"
16967
+ ]
16968
+ },
16969
+ {
16970
+ "accessToken": [
16971
+ "config_assets:read"
16972
+ ]
16973
+ }
16974
+ ],
16975
+ "parameters": [
16976
+ {
16977
+ "name": "knowledgeBase",
16978
+ "in": "path",
16979
+ "required": true,
16980
+ "schema": {
16981
+ "type": "string"
16982
+ }
16983
+ },
16984
+ {
16985
+ "name": "source",
16986
+ "in": "path",
16987
+ "required": true,
16988
+ "schema": {
16989
+ "type": "string"
16990
+ }
16991
+ },
16992
+ {
16993
+ "name": "state",
16994
+ "in": "query",
16995
+ "required": false,
16996
+ "schema": {
16997
+ "type": "string",
16998
+ "enum": [
16999
+ "discovered",
17000
+ "fetched",
17001
+ "indexed",
17002
+ "failed",
17003
+ "withdrawn"
17004
+ ]
17005
+ }
17006
+ },
17007
+ {
17008
+ "name": "failureCode",
17009
+ "in": "query",
17010
+ "required": false,
17011
+ "schema": {
17012
+ "anyOf": [
17013
+ {
17014
+ "type": "string",
17015
+ "enum": [
17016
+ "knowledge_source_unreachable",
17017
+ "knowledge_source_refused",
17018
+ "knowledge_fetch_failed",
17019
+ "knowledge_source_limit_reached",
17020
+ "knowledge_file_over_limit",
17021
+ "knowledge_file_format_unsupported"
17022
+ ]
17023
+ },
17024
+ {
17025
+ "type": "string",
17026
+ "enum": [
17027
+ "knowledge_file_format_unsupported",
17028
+ "knowledge_file_over_limit",
17029
+ "knowledge_file_unreadable",
17030
+ "knowledge_file_missing",
17031
+ "knowledge_extraction_failed",
17032
+ "knowledge_file_format_unavailable",
17033
+ "knowledge_text_unreadable",
17034
+ "knowledge_text_empty",
17035
+ "knowledge_index_failed"
17036
+ ]
17037
+ }
17038
+ ]
17039
+ }
17040
+ },
17041
+ {
17042
+ "name": "limit",
17043
+ "in": "query",
17044
+ "required": false,
17045
+ "schema": {
17046
+ "type": "integer",
17047
+ "minimum": 1,
17048
+ "maximum": 200
17049
+ }
17050
+ },
17051
+ {
17052
+ "name": "cursor",
17053
+ "in": "query",
17054
+ "required": false,
17055
+ "schema": {
17056
+ "type": "string",
17057
+ "minLength": 1,
17058
+ "maxLength": 1000
17059
+ }
17060
+ }
17061
+ ],
17062
+ "responses": {
17063
+ "200": {
17064
+ "description": "The result",
17065
+ "content": {
17066
+ "application/json": {
17067
+ "schema": {
17068
+ "type": "object",
17069
+ "properties": {
17070
+ "items": {
17071
+ "type": "array",
17072
+ "items": {
17073
+ "type": "object",
17074
+ "properties": {
17075
+ "id": {
17076
+ "type": "string"
17077
+ },
17078
+ "itemId": {
17079
+ "type": "string"
17080
+ },
17081
+ "name": {
17082
+ "type": "string"
17083
+ },
17084
+ "path": {
17085
+ "type": "string"
17086
+ },
17087
+ "state": {
17088
+ "type": "string",
17089
+ "enum": [
17090
+ "discovered",
17091
+ "fetched",
17092
+ "indexed",
17093
+ "failed",
17094
+ "withdrawn"
17095
+ ]
17096
+ },
17097
+ "failureCode": {
17098
+ "anyOf": [
17099
+ {
17100
+ "type": "string",
17101
+ "enum": [
17102
+ "knowledge_source_unreachable",
17103
+ "knowledge_source_refused",
17104
+ "knowledge_fetch_failed",
17105
+ "knowledge_source_limit_reached",
17106
+ "knowledge_file_over_limit",
17107
+ "knowledge_file_format_unsupported"
17108
+ ]
17109
+ },
17110
+ {
17111
+ "type": "string",
17112
+ "enum": [
17113
+ "knowledge_file_format_unsupported",
17114
+ "knowledge_file_over_limit",
17115
+ "knowledge_file_unreadable",
17116
+ "knowledge_file_missing",
17117
+ "knowledge_extraction_failed",
17118
+ "knowledge_file_format_unavailable",
17119
+ "knowledge_text_unreadable",
17120
+ "knowledge_text_empty",
17121
+ "knowledge_index_failed"
17122
+ ]
17123
+ }
17124
+ ]
17125
+ },
17126
+ "documentId": {
17127
+ "type": "string"
17128
+ },
17129
+ "originLink": {
17130
+ "type": "string"
17131
+ },
17132
+ "changedAt": {
17133
+ "type": "string"
17134
+ }
17135
+ },
17136
+ "required": [
17137
+ "id",
17138
+ "itemId",
17139
+ "name",
17140
+ "path",
17141
+ "state",
17142
+ "changedAt"
17143
+ ]
17144
+ }
17145
+ },
17146
+ "nextCursor": {
17147
+ "type": "string"
17148
+ }
17149
+ },
17150
+ "required": [
17151
+ "items"
17152
+ ]
17153
+ }
17154
+ }
17155
+ },
17156
+ "headers": {
17157
+ "Operation-Run-Id": {
17158
+ "$ref": "#/components/headers/OperationRunId"
17159
+ }
17160
+ }
17161
+ },
17162
+ "400": {
17163
+ "$ref": "#/components/responses/BadRequest"
17164
+ },
17165
+ "401": {
17166
+ "$ref": "#/components/responses/Unauthenticated"
17167
+ },
17168
+ "403": {
17169
+ "$ref": "#/components/responses/ForbiddenOrPolicyDeniedOrGuardrailBlocked"
17170
+ },
17171
+ "404": {
17172
+ "$ref": "#/components/responses/NotFound"
17173
+ },
17174
+ "409": {
17175
+ "$ref": "#/components/responses/Conflict"
17176
+ },
17177
+ "422": {
17178
+ "$ref": "#/components/responses/ValidationFailed"
17179
+ },
17180
+ "429": {
17181
+ "$ref": "#/components/responses/RateLimited"
17182
+ },
17183
+ "500": {
17184
+ "$ref": "#/components/responses/Internal"
17185
+ },
17186
+ "504": {
17187
+ "$ref": "#/components/responses/Timeout"
17188
+ }
17189
+ },
17190
+ "x-catalyst-effect": "reading",
17191
+ "x-catalyst-rate-class": "read"
17192
+ }
17193
+ },
17194
+ "/api/v1/knowledge-bases/{knowledgeBase}/sync": {
17195
+ "post": {
17196
+ "operationId": "knowledge_bases.sync",
17197
+ "summary": "Start a full source sync and return its Operation Run immediately; concurrent starts join the running sync",
17198
+ "tags": [
17199
+ "Knowledge Bases"
17200
+ ],
17201
+ "security": [
17202
+ {
17203
+ "sessionCookie": [
17204
+ "config_assets:write"
17205
+ ]
17206
+ },
17207
+ {
17208
+ "sessionToken": [
17209
+ "config_assets:write"
17210
+ ]
17211
+ },
17212
+ {
17213
+ "accessToken": [
17214
+ "config_assets:write"
17215
+ ]
17216
+ }
17217
+ ],
17218
+ "parameters": [
17219
+ {
17220
+ "name": "knowledgeBase",
17221
+ "in": "path",
17222
+ "required": true,
17223
+ "schema": {
17224
+ "type": "string"
17225
+ }
17226
+ },
17227
+ {
17228
+ "name": "Idempotency-Key",
17229
+ "in": "header",
17230
+ "description": "A key the caller chooses for one changing call, up to 255 characters. The same key with the same input answers what the first call answered instead of acting twice. A key belongs to its caller: another caller's same key is another call.",
17231
+ "required": false,
17232
+ "schema": {
17233
+ "type": "string",
17234
+ "minLength": 1,
17235
+ "maxLength": 255
17236
+ }
17237
+ },
17238
+ {
17239
+ "name": "Catalyst-Unattended",
17240
+ "in": "header",
17241
+ "description": "`1` on a call of an API credential when nobody watches its terminal, such as `catalyst <kind> publish --yes`. The call is then not its caller's own confirmation: a call that needs one waits in the caller's Inbox and answers `202` with its run, status `pending_confirmation`. It only ever makes a call stricter; a browser session's call ignores it.",
17242
+ "required": false,
17243
+ "schema": {
17244
+ "type": "string",
17245
+ "minLength": 1,
17246
+ "maxLength": 255
17247
+ }
17248
+ }
17249
+ ],
17250
+ "requestBody": {
17251
+ "required": true,
17252
+ "content": {
17253
+ "application/json": {
17254
+ "schema": {
17255
+ "type": "object",
17256
+ "properties": {
17257
+ "source": {
16246
17258
  "type": "string",
16247
17259
  "minLength": 1,
16248
- "maxLength": 1000
17260
+ "maxLength": 63
16249
17261
  },
16250
- "limit": {
16251
- "type": "integer",
16252
- "minimum": 1,
16253
- "maximum": 50
17262
+ "mode": {
17263
+ "type": "string",
17264
+ "const": "full"
16254
17265
  }
16255
17266
  },
16256
17267
  "required": [
16257
- "query"
17268
+ "source"
16258
17269
  ],
16259
17270
  "additionalProperties": false
16260
17271
  }
@@ -16269,74 +17280,112 @@
16269
17280
  "schema": {
16270
17281
  "type": "object",
16271
17282
  "properties": {
16272
- "passages": {
16273
- "type": "array",
16274
- "items": {
16275
- "type": "object",
16276
- "properties": {
16277
- "ref": {
16278
- "type": "string"
16279
- },
16280
- "knowledgeBase": {
16281
- "type": "string"
16282
- },
16283
- "documentId": {
16284
- "type": "string"
16285
- },
16286
- "fileId": {
16287
- "type": "string"
16288
- },
16289
- "fileName": {
16290
- "type": "string"
16291
- },
16292
- "title": {
16293
- "type": "string"
16294
- },
16295
- "page": {
16296
- "type": "integer",
16297
- "minimum": -9007199254740991,
16298
- "maximum": 9007199254740991
16299
- },
16300
- "heading": {
16301
- "type": "string"
16302
- },
16303
- "text": {
16304
- "type": "string"
16305
- },
16306
- "score": {
16307
- "type": "number"
16308
- },
16309
- "originLink": {
16310
- "type": "string"
16311
- }
17283
+ "syncRunId": {
17284
+ "type": "string"
17285
+ },
17286
+ "source": {
17287
+ "type": "string"
17288
+ },
17289
+ "mode": {
17290
+ "type": "string",
17291
+ "enum": [
17292
+ "initial",
17293
+ "changes",
17294
+ "full"
17295
+ ]
17296
+ },
17297
+ "reason": {
17298
+ "type": "string",
17299
+ "enum": [
17300
+ "cursor_expired"
17301
+ ]
17302
+ },
17303
+ "state": {
17304
+ "type": "string",
17305
+ "enum": [
17306
+ "running",
17307
+ "done",
17308
+ "failed"
17309
+ ]
17310
+ },
17311
+ "counts": {
17312
+ "type": "object",
17313
+ "properties": {
17314
+ "discovered": {
17315
+ "type": "integer",
17316
+ "minimum": 0,
17317
+ "maximum": 9007199254740991
16312
17318
  },
16313
- "required": [
16314
- "ref",
16315
- "knowledgeBase",
16316
- "documentId",
16317
- "fileId",
16318
- "fileName",
16319
- "title",
16320
- "text",
16321
- "score"
16322
- ]
16323
- }
17319
+ "added": {
17320
+ "type": "integer",
17321
+ "minimum": 0,
17322
+ "maximum": 9007199254740991
17323
+ },
17324
+ "changed": {
17325
+ "type": "integer",
17326
+ "minimum": 0,
17327
+ "maximum": 9007199254740991
17328
+ },
17329
+ "moved": {
17330
+ "type": "integer",
17331
+ "minimum": 0,
17332
+ "maximum": 9007199254740991
17333
+ },
17334
+ "withdrawn": {
17335
+ "type": "integer",
17336
+ "minimum": 0,
17337
+ "maximum": 9007199254740991
17338
+ },
17339
+ "failed": {
17340
+ "type": "integer",
17341
+ "minimum": 0,
17342
+ "maximum": 9007199254740991
17343
+ },
17344
+ "skipped": {
17345
+ "type": "integer",
17346
+ "minimum": 0,
17347
+ "maximum": 9007199254740991
17348
+ }
17349
+ },
17350
+ "required": [
17351
+ "discovered",
17352
+ "added",
17353
+ "changed",
17354
+ "moved",
17355
+ "withdrawn",
17356
+ "failed",
17357
+ "skipped"
17358
+ ]
16324
17359
  },
16325
- "signals": {
16326
- "type": "array",
16327
- "items": {
16328
- "type": "string",
16329
- "enum": [
16330
- "semantic",
16331
- "keyword",
16332
- "title"
16333
- ]
16334
- }
17360
+ "bytesFetched": {
17361
+ "type": "integer",
17362
+ "minimum": 0,
17363
+ "maximum": 9007199254740991
17364
+ },
17365
+ "failureCode": {
17366
+ "type": "string",
17367
+ "enum": [
17368
+ "knowledge_source_unreachable",
17369
+ "knowledge_source_refused",
17370
+ "knowledge_fetch_failed",
17371
+ "knowledge_source_limit_reached"
17372
+ ]
17373
+ },
17374
+ "startedAt": {
17375
+ "type": "string"
17376
+ },
17377
+ "endedAt": {
17378
+ "type": "string"
16335
17379
  }
16336
17380
  },
16337
17381
  "required": [
16338
- "passages",
16339
- "signals"
17382
+ "syncRunId",
17383
+ "source",
17384
+ "mode",
17385
+ "state",
17386
+ "counts",
17387
+ "bytesFetched",
17388
+ "startedAt"
16340
17389
  ]
16341
17390
  }
16342
17391
  }
@@ -16344,6 +17393,30 @@
16344
17393
  "headers": {
16345
17394
  "Operation-Run-Id": {
16346
17395
  "$ref": "#/components/headers/OperationRunId"
17396
+ },
17397
+ "Idempotent-Replayed": {
17398
+ "$ref": "#/components/headers/IdempotentReplayed"
17399
+ }
17400
+ }
17401
+ },
17402
+ "202": {
17403
+ "description": "The call waits for somebody else to approve it. This is its Operation Run; read it again at `Location`.",
17404
+ "content": {
17405
+ "application/json": {
17406
+ "schema": {
17407
+ "$ref": "#/components/schemas/OperationRun"
17408
+ }
17409
+ }
17410
+ },
17411
+ "headers": {
17412
+ "Operation-Run-Id": {
17413
+ "$ref": "#/components/headers/OperationRunId"
17414
+ },
17415
+ "Location": {
17416
+ "$ref": "#/components/headers/Location"
17417
+ },
17418
+ "Idempotent-Replayed": {
17419
+ "$ref": "#/components/headers/IdempotentReplayed"
16347
17420
  }
16348
17421
  }
16349
17422
  },
@@ -16354,13 +17427,13 @@
16354
17427
  "$ref": "#/components/responses/Unauthenticated"
16355
17428
  },
16356
17429
  "403": {
16357
- "$ref": "#/components/responses/ForbiddenOrPolicyDeniedOrGuardrailBlocked"
17430
+ "$ref": "#/components/responses/ForbiddenOrPolicyDeniedOrGuardrailBlockedOrDeclined"
16358
17431
  },
16359
17432
  "404": {
16360
17433
  "$ref": "#/components/responses/NotFound"
16361
17434
  },
16362
17435
  "409": {
16363
- "$ref": "#/components/responses/Conflict"
17436
+ "$ref": "#/components/responses/ConflictOrIdempotencyKeyReusedOrOperationInProgressOrOperationExpiredOrOutputNotRetained"
16364
17437
  },
16365
17438
  "422": {
16366
17439
  "$ref": "#/components/responses/ValidationFailed"
@@ -16375,8 +17448,8 @@
16375
17448
  "$ref": "#/components/responses/Timeout"
16376
17449
  }
16377
17450
  },
16378
- "x-catalyst-effect": "reading",
16379
- "x-catalyst-rate-class": "read"
17451
+ "x-catalyst-effect": "changing",
17452
+ "x-catalyst-rate-class": "write"
16380
17453
  }
16381
17454
  },
16382
17455
  "/api/v1/me": {
@@ -17936,6 +19009,9 @@
17936
19009
  "scheduledFor": {
17937
19010
  "$ref": "#/components/schemas/Timestamp"
17938
19011
  },
19012
+ "runKey": {
19013
+ "type": "string"
19014
+ },
17939
19015
  "operationRunId": {
17940
19016
  "type": "string"
17941
19017
  },
@@ -18220,6 +19296,9 @@
18220
19296
  "scheduledFor": {
18221
19297
  "$ref": "#/components/schemas/Timestamp"
18222
19298
  },
19299
+ "runKey": {
19300
+ "type": "string"
19301
+ },
18223
19302
  "operationRunId": {
18224
19303
  "type": "string"
18225
19304
  },
@@ -18698,6 +19777,9 @@
18698
19777
  "operationRunId": {
18699
19778
  "type": "string"
18700
19779
  },
19780
+ "linkedRunId": {
19781
+ "type": "string"
19782
+ },
18701
19783
  "error": {
18702
19784
  "type": "object",
18703
19785
  "properties": {
@@ -18972,7 +20054,7 @@
18972
20054
  "/api/v1/workflows/{workflow}/runs": {
18973
20055
  "get": {
18974
20056
  "operationId": "workflows.list_runs",
18975
- "summary": "List the runs of one Workflow with their status, newest first",
20057
+ "summary": "List the runs of one Workflow with their status, newest first: all of them, or those of one run key or key prefix",
18976
20058
  "tags": [
18977
20059
  "Workflows"
18978
20060
  ],
@@ -19021,6 +20103,26 @@
19021
20103
  "type": "string",
19022
20104
  "minLength": 1
19023
20105
  }
20106
+ },
20107
+ {
20108
+ "name": "key",
20109
+ "in": "query",
20110
+ "required": false,
20111
+ "schema": {
20112
+ "type": "string",
20113
+ "minLength": 1,
20114
+ "maxLength": 200
20115
+ }
20116
+ },
20117
+ {
20118
+ "name": "keyPrefix",
20119
+ "in": "query",
20120
+ "required": false,
20121
+ "schema": {
20122
+ "type": "string",
20123
+ "minLength": 1,
20124
+ "maxLength": 200
20125
+ }
19024
20126
  }
19025
20127
  ],
19026
20128
  "responses": {
@@ -19117,6 +20219,9 @@
19117
20219
  "scheduledFor": {
19118
20220
  "$ref": "#/components/schemas/Timestamp"
19119
20221
  },
20222
+ "runKey": {
20223
+ "type": "string"
20224
+ },
19120
20225
  "operationRunId": {
19121
20226
  "type": "string"
19122
20227
  },
@@ -19329,6 +20434,11 @@
19329
20434
  "type": "string"
19330
20435
  },
19331
20436
  "additionalProperties": {}
20437
+ },
20438
+ "key": {
20439
+ "type": "string",
20440
+ "minLength": 1,
20441
+ "maxLength": 200
19332
20442
  }
19333
20443
  }
19334
20444
  }
@@ -19424,6 +20534,9 @@
19424
20534
  "scheduledFor": {
19425
20535
  "$ref": "#/components/schemas/Timestamp"
19426
20536
  },
20537
+ "runKey": {
20538
+ "type": "string"
20539
+ },
19427
20540
  "operationRunId": {
19428
20541
  "type": "string"
19429
20542
  },
@@ -19659,6 +20772,11 @@
19659
20772
  "type": "string"
19660
20773
  },
19661
20774
  "additionalProperties": {}
20775
+ },
20776
+ "key": {
20777
+ "type": "string",
20778
+ "minLength": 1,
20779
+ "maxLength": 200
19662
20780
  }
19663
20781
  }
19664
20782
  }
@@ -19754,6 +20872,9 @@
19754
20872
  "scheduledFor": {
19755
20873
  "$ref": "#/components/schemas/Timestamp"
19756
20874
  },
20875
+ "runKey": {
20876
+ "type": "string"
20877
+ },
19757
20878
  "operationRunId": {
19758
20879
  "type": "string"
19759
20880
  },
@@ -22601,6 +23722,12 @@
22601
23722
  "userId": {
22602
23723
  "type": "string"
22603
23724
  },
23725
+ "displayLabel": {
23726
+ "type": "string"
23727
+ },
23728
+ "name": {
23729
+ "type": "string"
23730
+ },
22604
23731
  "conversationId": {
22605
23732
  "type": "string"
22606
23733
  },
@@ -22664,6 +23791,9 @@
22664
23791
  "userId": {
22665
23792
  "type": "string"
22666
23793
  },
23794
+ "displayLabel": {
23795
+ "type": "string"
23796
+ },
22667
23797
  "conversationId": {
22668
23798
  "type": "string"
22669
23799
  },
@@ -25113,6 +26243,12 @@
25113
26243
  "runsAs": {
25114
26244
  "type": "string"
25115
26245
  },
26246
+ "publishQuestion": {
26247
+ "type": "array",
26248
+ "items": {
26249
+ "type": "string"
26250
+ }
26251
+ },
25116
26252
  "contentRevision": {
25117
26253
  "type": "integer",
25118
26254
  "exclusiveMinimum": 0,
@@ -25156,6 +26292,12 @@
25156
26292
  "chatAvailable": {
25157
26293
  "type": "boolean"
25158
26294
  },
26295
+ "allowed": {
26296
+ "type": "array",
26297
+ "items": {
26298
+ "$ref": "#/components/schemas/AssetVerb"
26299
+ }
26300
+ },
25159
26301
  "updatedAt": {
25160
26302
  "$ref": "#/components/schemas/Timestamp"
25161
26303
  }
@@ -25580,6 +26722,14 @@
25580
26722
  "message"
25581
26723
  ]
25582
26724
  },
26725
+ "AssetVerb": {
26726
+ "type": "string",
26727
+ "enum": [
26728
+ "write",
26729
+ "delete",
26730
+ "publish"
26731
+ ]
26732
+ },
25583
26733
  "AssetWarning": {
25584
26734
  "type": "object",
25585
26735
  "properties": {