@thinkai/tai-api-contract 2.77.0 → 2.78.0

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.
@@ -1,7 +1,7 @@
1
1
  openapi: 3.0.3
2
2
  info:
3
3
  title: ThinkAI API
4
- version: 2.77.0
4
+ version: 2.78.0
5
5
  description: >
6
6
  Contract surface for the AI Driven SDLC backend used by ThinkAI.
7
7
  Workspace-scoped routes use `/workspaces/{workspaceId}/...`.
@@ -73,6 +73,11 @@ tags:
73
73
  description: >
74
74
  Data subject access / erasure / portability request intake and privacy-ops management (DSAR, issue #611).
75
75
  Public and authenticated submission; platform-admin queue, export, and fulfillment.
76
+ - name: CodeChat
77
+ description: >
78
+ Standalone Code Chat for indexed GitHub repositories from the readiness repo list.
79
+ Indexes via Graphify when available, otherwise a builtin file/symbol graph; answers via graph
80
+ retrieval plus the workspace agent execution key (Claude or Cursor).
76
81
  - name: Platform
77
82
  description: Platform-wide banner surfaces (global outage/maintenance banner, issue #284).
78
83
 
@@ -6743,17 +6748,544 @@ paths:
6743
6748
  - $ref: "#/components/parameters/WorkspaceId"
6744
6749
  responses:
6745
6750
  "200":
6746
- description: Squad
6751
+ description: Squad
6752
+ content:
6753
+ application/json:
6754
+ schema:
6755
+ $ref: "#/components/schemas/SquadDto"
6756
+ "401":
6757
+ $ref: "#/components/responses/Unauthorized"
6758
+ put:
6759
+ tags: [SquadProjects]
6760
+ summary: Upsert squad
6761
+ operationId: putSquad
6762
+ parameters:
6763
+ - $ref: "#/components/parameters/WorkspaceId"
6764
+ requestBody:
6765
+ required: true
6766
+ content:
6767
+ application/json:
6768
+ schema:
6769
+ $ref: "#/components/schemas/SquadDto"
6770
+ responses:
6771
+ "204":
6772
+ description: Saved
6773
+ "401":
6774
+ $ref: "#/components/responses/Unauthorized"
6775
+
6776
+ /workspaces/{workspaceId}/projects:
6777
+ get:
6778
+ tags: [SquadProjects]
6779
+ summary: List projects
6780
+ operationId: listProjects
6781
+ parameters:
6782
+ - $ref: "#/components/parameters/WorkspaceId"
6783
+ responses:
6784
+ "200":
6785
+ description: Projects
6786
+ content:
6787
+ application/json:
6788
+ schema:
6789
+ type: array
6790
+ items:
6791
+ $ref: "#/components/schemas/ProjectDto"
6792
+ "401":
6793
+ $ref: "#/components/responses/Unauthorized"
6794
+ post:
6795
+ tags: [SquadProjects]
6796
+ summary: Create project
6797
+ operationId: createProject
6798
+ parameters:
6799
+ - $ref: "#/components/parameters/WorkspaceId"
6800
+ requestBody:
6801
+ required: true
6802
+ content:
6803
+ application/json:
6804
+ schema:
6805
+ $ref: "#/components/schemas/ProjectDto"
6806
+ responses:
6807
+ "200":
6808
+ description: Created project
6809
+ content:
6810
+ application/json:
6811
+ schema:
6812
+ $ref: "#/components/schemas/ProjectDto"
6813
+ "401":
6814
+ $ref: "#/components/responses/Unauthorized"
6815
+
6816
+ /workspaces/{workspaceId}/projects/{projectId}:
6817
+ patch:
6818
+ tags: [SquadProjects]
6819
+ summary: Update project
6820
+ operationId: patchProject
6821
+ parameters:
6822
+ - $ref: "#/components/parameters/WorkspaceId"
6823
+ - $ref: "#/components/parameters/ProjectId"
6824
+ requestBody:
6825
+ required: true
6826
+ content:
6827
+ application/json:
6828
+ schema:
6829
+ $ref: "#/components/schemas/ProjectPatchDto"
6830
+ responses:
6831
+ "200":
6832
+ description: Updated project
6833
+ content:
6834
+ application/json:
6835
+ schema:
6836
+ $ref: "#/components/schemas/ProjectDto"
6837
+ "401":
6838
+ $ref: "#/components/responses/Unauthorized"
6839
+
6840
+
6841
+ /workspaces/{workspaceId}/code-chat/indexes:
6842
+ get:
6843
+ tags: [CodeChat]
6844
+ summary: List code indexes for the workspace
6845
+ operationId: listCodeChatIndexes
6846
+ x-test-coverage-skip: lightweight MVP; covered by package unit tests
6847
+ parameters:
6848
+ - $ref: "#/components/parameters/WorkspaceId"
6849
+ responses:
6850
+ "200":
6851
+ description: Index list
6852
+ content:
6853
+ application/json:
6854
+ schema:
6855
+ $ref: "#/components/schemas/CodeChatIndexListDto"
6856
+ "401":
6857
+ $ref: "#/components/responses/Unauthorized"
6858
+ post:
6859
+ tags: [CodeChat]
6860
+ summary: Start indexing a connected repository
6861
+ operationId: createCodeChatIndex
6862
+ x-test-coverage-skip: lightweight MVP; covered by package unit tests
6863
+ parameters:
6864
+ - $ref: "#/components/parameters/WorkspaceId"
6865
+ requestBody:
6866
+ required: true
6867
+ content:
6868
+ application/json:
6869
+ schema:
6870
+ $ref: "#/components/schemas/CodeChatCreateIndexBodyDto"
6871
+ responses:
6872
+ "202":
6873
+ description: Indexing accepted
6874
+ content:
6875
+ application/json:
6876
+ schema:
6877
+ $ref: "#/components/schemas/CodeChatIndexDto"
6878
+ "400":
6879
+ description: Invalid request
6880
+ content:
6881
+ application/json:
6882
+ schema:
6883
+ $ref: "#/components/schemas/ErrorMessageDto"
6884
+ "401":
6885
+ $ref: "#/components/responses/Unauthorized"
6886
+ "404":
6887
+ description: Not found
6888
+ content:
6889
+ application/json:
6890
+ schema:
6891
+ $ref: "#/components/schemas/ErrorMessageDto"
6892
+
6893
+ /workspaces/{workspaceId}/code-chat/indexes/sync:
6894
+ post:
6895
+ tags: [CodeChat]
6896
+ summary: Enqueue indexing for all (or selected) readiness GitHub repos
6897
+ operationId: syncCodeChatIndexes
6898
+ x-test-coverage-skip: lightweight MVP; covered by package unit tests
6899
+ parameters:
6900
+ - $ref: "#/components/parameters/WorkspaceId"
6901
+ requestBody:
6902
+ required: false
6903
+ content:
6904
+ application/json:
6905
+ schema:
6906
+ $ref: "#/components/schemas/CodeChatSyncIndexesBodyDto"
6907
+ responses:
6908
+ "202":
6909
+ description: Sync accepted
6910
+ content:
6911
+ application/json:
6912
+ schema:
6913
+ $ref: "#/components/schemas/CodeChatSyncIndexesResultDto"
6914
+ "401":
6915
+ $ref: "#/components/responses/Unauthorized"
6916
+
6917
+ /workspaces/{workspaceId}/code-chat/indexes/{indexId}:
6918
+ get:
6919
+ tags: [CodeChat]
6920
+ summary: Get code index status
6921
+ operationId: getCodeChatIndex
6922
+ x-test-coverage-skip: lightweight MVP; covered by package unit tests
6923
+ parameters:
6924
+ - $ref: "#/components/parameters/WorkspaceId"
6925
+ - name: indexId
6926
+ in: path
6927
+ required: true
6928
+ schema: { type: string, format: uuid }
6929
+ responses:
6930
+ "200":
6931
+ description: Index
6932
+ content:
6933
+ application/json:
6934
+ schema:
6935
+ $ref: "#/components/schemas/CodeChatIndexDto"
6936
+ "401":
6937
+ $ref: "#/components/responses/Unauthorized"
6938
+ "404":
6939
+ description: Not found
6940
+ content:
6941
+ application/json:
6942
+ schema:
6943
+ $ref: "#/components/schemas/ErrorMessageDto"
6944
+
6945
+ /workspaces/{workspaceId}/code-chat/threads:
6946
+ get:
6947
+ tags: [CodeChat]
6948
+ summary: List code chat threads for the current user
6949
+ operationId: listCodeChatThreads
6950
+ x-test-coverage-skip: lightweight MVP; covered by package unit tests
6951
+ parameters:
6952
+ - $ref: "#/components/parameters/WorkspaceId"
6953
+ responses:
6954
+ "200":
6955
+ description: Thread list
6956
+ content:
6957
+ application/json:
6958
+ schema:
6959
+ $ref: "#/components/schemas/CodeChatThreadListDto"
6960
+ "401":
6961
+ $ref: "#/components/responses/Unauthorized"
6962
+ post:
6963
+ tags: [CodeChat]
6964
+ summary: Create a code chat thread against a ready index
6965
+ operationId: createCodeChatThread
6966
+ x-test-coverage-skip: lightweight MVP; covered by package unit tests
6967
+ parameters:
6968
+ - $ref: "#/components/parameters/WorkspaceId"
6969
+ requestBody:
6970
+ required: true
6971
+ content:
6972
+ application/json:
6973
+ schema:
6974
+ $ref: "#/components/schemas/CodeChatCreateThreadBodyDto"
6975
+ responses:
6976
+ "201":
6977
+ description: Thread created
6978
+ content:
6979
+ application/json:
6980
+ schema:
6981
+ $ref: "#/components/schemas/CodeChatThreadDto"
6982
+ "401":
6983
+ $ref: "#/components/responses/Unauthorized"
6984
+ "404":
6985
+ description: Not found
6986
+ content:
6987
+ application/json:
6988
+ schema:
6989
+ $ref: "#/components/schemas/ErrorMessageDto"
6990
+ "409":
6991
+ description: Index not ready
6992
+
6993
+ /workspaces/{workspaceId}/code-chat/threads/{threadId}:
6994
+ get:
6995
+ tags: [CodeChat]
6996
+ summary: Get a code chat thread with messages
6997
+ operationId: getCodeChatThread
6998
+ x-test-coverage-skip: lightweight MVP; covered by package unit tests
6999
+ parameters:
7000
+ - $ref: "#/components/parameters/WorkspaceId"
7001
+ - name: threadId
7002
+ in: path
7003
+ required: true
7004
+ schema: { type: string, format: uuid }
7005
+ responses:
7006
+ "200":
7007
+ description: Thread with messages
7008
+ content:
7009
+ application/json:
7010
+ schema:
7011
+ $ref: "#/components/schemas/CodeChatThreadDetailDto"
7012
+ "401":
7013
+ $ref: "#/components/responses/Unauthorized"
7014
+ "404":
7015
+ description: Not found
7016
+ content:
7017
+ application/json:
7018
+ schema:
7019
+ $ref: "#/components/schemas/ErrorMessageDto"
7020
+ delete:
7021
+ tags: [CodeChat]
7022
+ summary: Delete a code chat thread and its messages
7023
+ operationId: deleteCodeChatThread
7024
+ x-test-coverage-skip: ownership and RLS enforced by the store
7025
+ parameters:
7026
+ - $ref: "#/components/parameters/WorkspaceId"
7027
+ - name: threadId
7028
+ in: path
7029
+ required: true
7030
+ schema: { type: string, format: uuid }
7031
+ responses:
7032
+ "204":
7033
+ description: Thread deleted
7034
+ "401":
7035
+ $ref: "#/components/responses/Unauthorized"
7036
+ "404":
7037
+ description: Not found
7038
+
7039
+ /workspaces/{workspaceId}/code-chat/threads/{threadId}/messages:
7040
+ post:
7041
+ tags: [CodeChat]
7042
+ summary: Send a message and receive an assistant reply
7043
+ operationId: postCodeChatMessage
7044
+ x-test-coverage-skip: lightweight MVP; covered by package unit tests
7045
+ parameters:
7046
+ - $ref: "#/components/parameters/WorkspaceId"
7047
+ - name: threadId
7048
+ in: path
7049
+ required: true
7050
+ schema: { type: string, format: uuid }
7051
+ requestBody:
7052
+ required: true
7053
+ content:
7054
+ application/json:
7055
+ schema:
7056
+ $ref: "#/components/schemas/CodeChatPostMessageBodyDto"
7057
+ responses:
7058
+ "200":
7059
+ description: Assistant message
7060
+ content:
7061
+ application/json:
7062
+ schema:
7063
+ $ref: "#/components/schemas/CodeChatMessageReplyDto"
7064
+ "401":
7065
+ $ref: "#/components/responses/Unauthorized"
7066
+ "404":
7067
+ description: Not found
7068
+ content:
7069
+ application/json:
7070
+ schema:
7071
+ $ref: "#/components/schemas/ErrorMessageDto"
7072
+ "409":
7073
+ description: Index not ready
7074
+
7075
+ /workspaces/{workspaceId}/code-chat/indexes/{indexId}/wiki:
7076
+ get:
7077
+ tags: [CodeChat]
7078
+ summary: List wiki pages for an index (generates skeleton if missing)
7079
+ operationId: listCodeChatWikiPages
7080
+ x-test-coverage-skip: covered by code-context wiki unit tests
7081
+ parameters:
7082
+ - $ref: "#/components/parameters/WorkspaceId"
7083
+ - name: indexId
7084
+ in: path
7085
+ required: true
7086
+ schema: { type: string, format: uuid }
7087
+ responses:
7088
+ "200":
7089
+ description: Wiki page list
7090
+ content:
7091
+ application/json:
7092
+ schema:
7093
+ $ref: "#/components/schemas/CodeChatWikiPageListDto"
7094
+ "401":
7095
+ $ref: "#/components/responses/Unauthorized"
7096
+ "404":
7097
+ description: Not found
7098
+
7099
+ /workspaces/{workspaceId}/code-chat/indexes/{indexId}/wiki/{slug}:
7100
+ get:
7101
+ tags: [CodeChat]
7102
+ summary: Get a wiki page by slug
7103
+ operationId: getCodeChatWikiPage
7104
+ x-test-coverage-skip: covered by code-context wiki unit tests
7105
+ parameters:
7106
+ - $ref: "#/components/parameters/WorkspaceId"
7107
+ - name: indexId
7108
+ in: path
7109
+ required: true
7110
+ schema: { type: string, format: uuid }
7111
+ - name: slug
7112
+ in: path
7113
+ required: true
7114
+ schema: { type: string }
7115
+ responses:
7116
+ "200":
7117
+ description: Wiki page
7118
+ content:
7119
+ application/json:
7120
+ schema:
7121
+ $ref: "#/components/schemas/CodeChatWikiPageDto"
7122
+ "401":
7123
+ $ref: "#/components/responses/Unauthorized"
7124
+ "404":
7125
+ description: Not found
7126
+
7127
+ /workspaces/{workspaceId}/code-chat/indexes/{indexId}/wiki/generate:
7128
+ post:
7129
+ tags: [CodeChat]
7130
+ summary: Regenerate wiki pages from the stored code graph
7131
+ operationId: generateCodeChatWiki
7132
+ x-test-coverage-skip: covered by code-context wiki unit tests
7133
+ parameters:
7134
+ - $ref: "#/components/parameters/WorkspaceId"
7135
+ - name: indexId
7136
+ in: path
7137
+ required: true
7138
+ schema: { type: string, format: uuid }
7139
+ responses:
7140
+ "200":
7141
+ description: Generated wiki pages
7142
+ content:
7143
+ application/json:
7144
+ schema:
7145
+ $ref: "#/components/schemas/CodeChatWikiPageListDto"
7146
+ "401":
7147
+ $ref: "#/components/responses/Unauthorized"
7148
+ "409":
7149
+ description: Index not ready
7150
+
7151
+ /workspaces/{workspaceId}/code-chat/analyze/symbols:
7152
+ post:
7153
+ tags: [CodeChat]
7154
+ summary: Find symbols across the ready corpus
7155
+ operationId: analyzeCodeChatSymbols
7156
+ x-test-coverage-skip: covered by code-context analysis unit tests
7157
+ parameters:
7158
+ - $ref: "#/components/parameters/WorkspaceId"
7159
+ requestBody:
7160
+ required: true
7161
+ content:
7162
+ application/json:
7163
+ schema:
7164
+ $ref: "#/components/schemas/CodeChatSymbolQueryBodyDto"
7165
+ responses:
7166
+ "200":
7167
+ description: Symbol hits
7168
+ content:
7169
+ application/json:
7170
+ schema:
7171
+ $ref: "#/components/schemas/CodeChatSymbolHitListDto"
7172
+ "401":
7173
+ $ref: "#/components/responses/Unauthorized"
7174
+ "409":
7175
+ description: Corpus not ready
7176
+
7177
+ /workspaces/{workspaceId}/code-chat/analyze/references:
7178
+ post:
7179
+ tags: [CodeChat]
7180
+ summary: Find references for a symbol
7181
+ operationId: analyzeCodeChatReferences
7182
+ x-test-coverage-skip: covered by code-context analysis unit tests
7183
+ parameters:
7184
+ - $ref: "#/components/parameters/WorkspaceId"
7185
+ requestBody:
7186
+ required: true
7187
+ content:
7188
+ application/json:
7189
+ schema:
7190
+ $ref: "#/components/schemas/CodeChatReferenceQueryBodyDto"
7191
+ responses:
7192
+ "200":
7193
+ description: Reference hits
7194
+ content:
7195
+ application/json:
7196
+ schema:
7197
+ $ref: "#/components/schemas/CodeChatReferenceHitListDto"
7198
+ "401":
7199
+ $ref: "#/components/responses/Unauthorized"
7200
+ "409":
7201
+ description: Corpus not ready
7202
+
7203
+ /workspaces/{workspaceId}/code-chat/analyze/blast-radius:
7204
+ post:
7205
+ tags: [CodeChat]
7206
+ summary: Analyze blast radius (intra or gated cross-repo)
7207
+ operationId: analyzeCodeChatBlastRadius
7208
+ x-test-coverage-skip: covered by code-context analysis unit tests
7209
+ parameters:
7210
+ - $ref: "#/components/parameters/WorkspaceId"
7211
+ requestBody:
7212
+ required: true
7213
+ content:
7214
+ application/json:
7215
+ schema:
7216
+ $ref: "#/components/schemas/CodeChatBlastRadiusBodyDto"
7217
+ responses:
7218
+ "200":
7219
+ description: Blast radius result (always marked partial/unknown until eval gates)
7220
+ content:
7221
+ application/json:
7222
+ schema:
7223
+ $ref: "#/components/schemas/CodeChatBlastRadiusResultDto"
7224
+ "401":
7225
+ $ref: "#/components/responses/Unauthorized"
7226
+ "404":
7227
+ description: Symbol not found
7228
+ "409":
7229
+ description: Corpus not ready
7230
+
7231
+ /workspaces/{workspaceId}/code-chat/analyze/semantic-diff:
7232
+ post:
7233
+ tags: [CodeChat]
7234
+ summary: Map changed paths onto graph symbols and blast hints
7235
+ operationId: analyzeCodeChatSemanticDiff
7236
+ x-test-coverage-skip: covered by code-context analysis unit tests
7237
+ parameters:
7238
+ - $ref: "#/components/parameters/WorkspaceId"
7239
+ requestBody:
7240
+ required: true
7241
+ content:
7242
+ application/json:
7243
+ schema:
7244
+ $ref: "#/components/schemas/CodeChatSemanticDiffBodyDto"
7245
+ responses:
7246
+ "200":
7247
+ description: Semantic diff analysis
7248
+ content:
7249
+ application/json:
7250
+ schema:
7251
+ $ref: "#/components/schemas/CodeChatSemanticDiffResultDto"
7252
+ "401":
7253
+ $ref: "#/components/responses/Unauthorized"
7254
+ "409":
7255
+ description: Corpus not ready
7256
+
7257
+ /workspaces/{workspaceId}/code-chat/analyze/recommendations:
7258
+ post:
7259
+ tags: [CodeChat]
7260
+ summary: Test impact and BDD/contract recommendations
7261
+ operationId: analyzeCodeChatRecommendations
7262
+ x-test-coverage-skip: covered by code-context analysis unit tests
7263
+ parameters:
7264
+ - $ref: "#/components/parameters/WorkspaceId"
7265
+ requestBody:
7266
+ required: true
7267
+ content:
7268
+ application/json:
7269
+ schema:
7270
+ $ref: "#/components/schemas/CodeChatRecommendationsBodyDto"
7271
+ responses:
7272
+ "200":
7273
+ description: Recommendations
6747
7274
  content:
6748
7275
  application/json:
6749
7276
  schema:
6750
- $ref: "#/components/schemas/SquadDto"
7277
+ $ref: "#/components/schemas/CodeChatRecommendationsResultDto"
6751
7278
  "401":
6752
7279
  $ref: "#/components/responses/Unauthorized"
6753
- put:
6754
- tags: [SquadProjects]
6755
- summary: Upsert squad
6756
- operationId: putSquad
7280
+ "409":
7281
+ description: Corpus not ready
7282
+
7283
+ /workspaces/{workspaceId}/code-chat/analyze/visualize:
7284
+ post:
7285
+ tags: [CodeChat]
7286
+ summary: Structured graph diagrams (SVG-ready nodes/edges) or Obsidian-style atlas stubs
7287
+ operationId: analyzeCodeChatVisualize
7288
+ x-test-coverage-skip: covered by code-context analysis unit tests
6757
7289
  parameters:
6758
7290
  - $ref: "#/components/parameters/WorkspaceId"
6759
7291
  requestBody:
@@ -6761,76 +7293,70 @@ paths:
6761
7293
  content:
6762
7294
  application/json:
6763
7295
  schema:
6764
- $ref: "#/components/schemas/SquadDto"
6765
- responses:
6766
- "204":
6767
- description: Saved
6768
- "401":
6769
- $ref: "#/components/responses/Unauthorized"
6770
-
6771
- /workspaces/{workspaceId}/projects:
6772
- get:
6773
- tags: [SquadProjects]
6774
- summary: List projects
6775
- operationId: listProjects
6776
- parameters:
6777
- - $ref: "#/components/parameters/WorkspaceId"
7296
+ $ref: "#/components/schemas/CodeChatVisualizeBodyDto"
6778
7297
  responses:
6779
7298
  "200":
6780
- description: Projects
7299
+ description: Visualization payload
6781
7300
  content:
6782
7301
  application/json:
6783
7302
  schema:
6784
- type: array
6785
- items:
6786
- $ref: "#/components/schemas/ProjectDto"
7303
+ $ref: "#/components/schemas/CodeChatVisualizeResultDto"
6787
7304
  "401":
6788
7305
  $ref: "#/components/responses/Unauthorized"
7306
+ "409":
7307
+ description: Corpus not ready
7308
+
7309
+ /workspaces/{workspaceId}/code-chat/analyze/cross-edges:
6789
7310
  post:
6790
- tags: [SquadProjects]
6791
- summary: Create project
6792
- operationId: createProject
7311
+ tags: [CodeChat]
7312
+ summary: Resolve heuristic cross-process edges across ready repos
7313
+ operationId: analyzeCodeChatCrossEdges
7314
+ x-test-coverage-skip: covered by code-context analysis unit tests
6793
7315
  parameters:
6794
7316
  - $ref: "#/components/parameters/WorkspaceId"
6795
7317
  requestBody:
6796
- required: true
7318
+ required: false
6797
7319
  content:
6798
7320
  application/json:
6799
7321
  schema:
6800
- $ref: "#/components/schemas/ProjectDto"
7322
+ $ref: "#/components/schemas/CodeChatCrossEdgesBodyDto"
6801
7323
  responses:
6802
7324
  "200":
6803
- description: Created project
7325
+ description: Cross-process edge candidates
6804
7326
  content:
6805
7327
  application/json:
6806
7328
  schema:
6807
- $ref: "#/components/schemas/ProjectDto"
7329
+ $ref: "#/components/schemas/CodeChatCrossEdgesResultDto"
6808
7330
  "401":
6809
7331
  $ref: "#/components/responses/Unauthorized"
7332
+ "409":
7333
+ description: Need two ready indexes
6810
7334
 
6811
- /workspaces/{workspaceId}/projects/{projectId}:
6812
- patch:
6813
- tags: [SquadProjects]
6814
- summary: Update project
6815
- operationId: patchProject
7335
+ /workspaces/{workspaceId}/code-chat/tools/get_context_pack:
7336
+ post:
7337
+ tags: [CodeChat]
7338
+ summary: MCP/agent tool — compact context pack from the corpus
7339
+ operationId: codeChatGetContextPack
7340
+ x-test-coverage-skip: covered by code-context analysis unit tests
6816
7341
  parameters:
6817
7342
  - $ref: "#/components/parameters/WorkspaceId"
6818
- - $ref: "#/components/parameters/ProjectId"
6819
7343
  requestBody:
6820
7344
  required: true
6821
7345
  content:
6822
7346
  application/json:
6823
7347
  schema:
6824
- $ref: "#/components/schemas/ProjectPatchDto"
7348
+ $ref: "#/components/schemas/CodeChatContextPackBodyDto"
6825
7349
  responses:
6826
7350
  "200":
6827
- description: Updated project
7351
+ description: Context pack
6828
7352
  content:
6829
7353
  application/json:
6830
7354
  schema:
6831
- $ref: "#/components/schemas/ProjectDto"
7355
+ $ref: "#/components/schemas/CodeChatContextPackDto"
6832
7356
  "401":
6833
7357
  $ref: "#/components/responses/Unauthorized"
7358
+ "409":
7359
+ description: Corpus not ready
6834
7360
 
6835
7361
  /workspaces/{workspaceId}/notifications:
6836
7362
  get:
@@ -16143,3 +16669,448 @@ components:
16143
16669
  $ref: "#/components/schemas/InsightsRecommendationsPageBundleRecommendations"
16144
16670
  _meta:
16145
16671
  $ref: "#/components/schemas/InsightsResponseMeta"
16672
+
16673
+ CodeChatIndexStatus:
16674
+ type: string
16675
+ enum: [pending, indexing, ready, failed]
16676
+
16677
+ CodeChatIndexer:
16678
+ type: string
16679
+ enum: [graphify, builtin]
16680
+ nullable: true
16681
+
16682
+ CodeChatIndexDto:
16683
+ type: object
16684
+ required: [id, workspaceId, repoId, providerSlug, repoName, status, nodeCount, edgeCount, createdAt, updatedAt]
16685
+ properties:
16686
+ id: { type: string, format: uuid }
16687
+ workspaceId: { type: string, format: uuid }
16688
+ repoId: { type: string, format: uuid }
16689
+ providerSlug: { type: string }
16690
+ repoName: { type: string }
16691
+ status: { $ref: "#/components/schemas/CodeChatIndexStatus" }
16692
+ indexer: { $ref: "#/components/schemas/CodeChatIndexer" }
16693
+ nodeCount: { type: integer }
16694
+ edgeCount: { type: integer }
16695
+ commitSha: { type: string, nullable: true }
16696
+ errorMessage: { type: string, nullable: true }
16697
+ indexedAt: { type: string, format: date-time, nullable: true }
16698
+ createdAt: { type: string, format: date-time }
16699
+ updatedAt: { type: string, format: date-time }
16700
+ hasCodeExcerpts:
16701
+ type: boolean
16702
+ description: True when the indexed graph stores durable code excerpts (required for useful chat answers).
16703
+
16704
+ CodeChatIndexListDto:
16705
+ type: object
16706
+ required: [items]
16707
+ properties:
16708
+ items:
16709
+ type: array
16710
+ items: { $ref: "#/components/schemas/CodeChatIndexDto" }
16711
+
16712
+ CodeChatCreateIndexBodyDto:
16713
+ type: object
16714
+ required: [repoId]
16715
+ properties:
16716
+ repoId: { type: string, format: uuid }
16717
+
16718
+ CodeChatSyncIndexesBodyDto:
16719
+ type: object
16720
+ properties:
16721
+ repoIds:
16722
+ type: array
16723
+ items: { type: string, format: uuid }
16724
+ description: Optional subset; omit or empty to enqueue all readiness GitHub repos.
16725
+
16726
+ CodeChatSyncIndexesResultDto:
16727
+ type: object
16728
+ required: [enqueued]
16729
+ properties:
16730
+ enqueued: { type: integer, minimum: 0 }
16731
+ items:
16732
+ type: array
16733
+ items: { $ref: "#/components/schemas/CodeChatIndexDto" }
16734
+
16735
+ CodeChatThreadDto:
16736
+ type: object
16737
+ required: [id, workspaceId, repoIds, title, createdAt, updatedAt]
16738
+ properties:
16739
+ id: { type: string, format: uuid }
16740
+ workspaceId: { type: string, format: uuid }
16741
+ indexId: { type: string, format: uuid, nullable: true }
16742
+ repoIds:
16743
+ type: array
16744
+ items: { type: string, format: uuid }
16745
+ description: Empty means all ready repos in the workspace.
16746
+ revisionRef: { type: string, nullable: true }
16747
+ title: { type: string }
16748
+ createdAt: { type: string, format: date-time }
16749
+ updatedAt: { type: string, format: date-time }
16750
+
16751
+ CodeChatThreadListDto:
16752
+ type: object
16753
+ required: [items]
16754
+ properties:
16755
+ items:
16756
+ type: array
16757
+ items: { $ref: "#/components/schemas/CodeChatThreadDto" }
16758
+
16759
+ CodeChatCreateThreadBodyDto:
16760
+ type: object
16761
+ properties:
16762
+ indexId:
16763
+ type: string
16764
+ format: uuid
16765
+ description: Legacy single-index bind; prefer repoIds for workspace scope.
16766
+ repoIds:
16767
+ type: array
16768
+ items: { type: string, format: uuid }
16769
+ description: Empty or omitted = all ready repos.
16770
+ revisionRef: { type: string }
16771
+ title: { type: string }
16772
+
16773
+ CodeChatCitationDto:
16774
+ type: object
16775
+ required: [path, label, score]
16776
+ properties:
16777
+ path: { type: string }
16778
+ label: { type: string }
16779
+ score: { type: number }
16780
+ repoId: { type: string, format: uuid }
16781
+ repoName: { type: string }
16782
+ providerSlug: { type: string }
16783
+ commitSha: { type: string, nullable: true }
16784
+ startLine: { type: integer }
16785
+ endLine: { type: integer }
16786
+ confidence: { type: string, enum: [fact, inference, possibility, unknown] }
16787
+
16788
+ CodeChatMessageDto:
16789
+ type: object
16790
+ required: [id, role, content, citations, createdAt]
16791
+ properties:
16792
+ id: { type: string, format: uuid }
16793
+ role: { type: string, enum: [user, assistant] }
16794
+ content: { type: string }
16795
+ citations:
16796
+ type: array
16797
+ items: { $ref: "#/components/schemas/CodeChatCitationDto" }
16798
+ createdAt: { type: string, format: date-time }
16799
+
16800
+ CodeChatThreadDetailDto:
16801
+ allOf:
16802
+ - $ref: "#/components/schemas/CodeChatThreadDto"
16803
+ - type: object
16804
+ required: [messages]
16805
+ properties:
16806
+ messages:
16807
+ type: array
16808
+ items: { $ref: "#/components/schemas/CodeChatMessageDto" }
16809
+
16810
+ CodeChatPostMessageBodyDto:
16811
+ type: object
16812
+ required: [content]
16813
+ properties:
16814
+ content: { type: string, minLength: 1, maxLength: 8000 }
16815
+
16816
+ CodeChatMessageReplyDto:
16817
+ allOf:
16818
+ - $ref: "#/components/schemas/CodeChatMessageDto"
16819
+ - type: object
16820
+ required: [mode]
16821
+ properties:
16822
+ mode: { type: string, enum: [llm, retrieval] }
16823
+
16824
+ CodeChatWikiPageDto:
16825
+ type: object
16826
+ required: [id, indexId, workspaceId, slug, title, bodyMd, sortOrder, sourcePaths, createdAt, updatedAt]
16827
+ properties:
16828
+ id: { type: string, format: uuid }
16829
+ indexId: { type: string, format: uuid }
16830
+ workspaceId: { type: string, format: uuid }
16831
+ slug: { type: string }
16832
+ title: { type: string }
16833
+ bodyMd: { type: string }
16834
+ sortOrder: { type: integer }
16835
+ sourcePaths:
16836
+ type: array
16837
+ items: { type: string }
16838
+ diagramMermaid: { type: string, nullable: true }
16839
+ createdAt: { type: string, format: date-time }
16840
+ updatedAt: { type: string, format: date-time }
16841
+
16842
+ CodeChatWikiPageListDto:
16843
+ type: object
16844
+ required: [items]
16845
+ properties:
16846
+ items:
16847
+ type: array
16848
+ items: { $ref: "#/components/schemas/CodeChatWikiPageDto" }
16849
+
16850
+ CodeChatSymbolQueryBodyDto:
16851
+ type: object
16852
+ required: [query]
16853
+ properties:
16854
+ query: { type: string, minLength: 1 }
16855
+ repoIds:
16856
+ type: array
16857
+ items: { type: string, format: uuid }
16858
+
16859
+ CodeChatSymbolHitDto:
16860
+ type: object
16861
+ required: [id, name, path, kind]
16862
+ properties:
16863
+ id: { type: string }
16864
+ name: { type: string }
16865
+ path: { type: string }
16866
+ kind: { type: string }
16867
+ summary: { type: string }
16868
+ startLine: { type: integer }
16869
+ repoId: { type: string, format: uuid }
16870
+ repoName: { type: string }
16871
+ commitSha: { type: string, nullable: true }
16872
+
16873
+ CodeChatSymbolHitListDto:
16874
+ type: object
16875
+ required: [items]
16876
+ properties:
16877
+ items:
16878
+ type: array
16879
+ items: { $ref: "#/components/schemas/CodeChatSymbolHitDto" }
16880
+
16881
+ CodeChatReferenceQueryBodyDto:
16882
+ type: object
16883
+ required: [symbol]
16884
+ properties:
16885
+ symbol: { type: string, minLength: 1 }
16886
+ repoIds:
16887
+ type: array
16888
+ items: { type: string, format: uuid }
16889
+
16890
+ CodeChatReferenceHitDto:
16891
+ type: object
16892
+ required: [fromId, fromLabel, toId, toLabel, relation, certainty]
16893
+ properties:
16894
+ fromId: { type: string }
16895
+ fromLabel: { type: string }
16896
+ toId: { type: string }
16897
+ toLabel: { type: string }
16898
+ relation: { type: string }
16899
+ certainty: { type: string, enum: [EXTRACTED, INFERRED] }
16900
+ repoId: { type: string, format: uuid }
16901
+ repoName: { type: string }
16902
+
16903
+ CodeChatReferenceHitListDto:
16904
+ type: object
16905
+ required: [items]
16906
+ properties:
16907
+ items:
16908
+ type: array
16909
+ items: { $ref: "#/components/schemas/CodeChatReferenceHitDto" }
16910
+
16911
+ CodeChatBlastRadiusBodyDto:
16912
+ type: object
16913
+ required: [symbol]
16914
+ properties:
16915
+ symbol: { type: string, minLength: 1 }
16916
+ repoIds:
16917
+ type: array
16918
+ items: { type: string, format: uuid }
16919
+ crossRepo: { type: boolean }
16920
+
16921
+ CodeChatBlastRadiusResultDto:
16922
+ type: object
16923
+ required: [mode, completeness]
16924
+ properties:
16925
+ mode: { type: string, enum: [intra_repo, cross_repo] }
16926
+ completeness: { type: string, enum: [partial, unknown] }
16927
+ gateNote: { type: string }
16928
+ repoId: { type: string, format: uuid }
16929
+ repoName: { type: string }
16930
+ originId: { type: string }
16931
+ originLabel: { type: string }
16932
+ truncated: { type: boolean }
16933
+ edgesUsed: { type: integer }
16934
+ nodes:
16935
+ type: array
16936
+ items:
16937
+ type: object
16938
+ additionalProperties: true
16939
+
16940
+ CodeChatSemanticDiffBodyDto:
16941
+ type: object
16942
+ required: [changedPaths]
16943
+ properties:
16944
+ changedPaths:
16945
+ type: array
16946
+ items: { type: string }
16947
+ minItems: 1
16948
+ indexId: { type: string, format: uuid }
16949
+ repoIds:
16950
+ type: array
16951
+ items: { type: string, format: uuid }
16952
+ baseCommit: { type: string }
16953
+ headCommit: { type: string }
16954
+
16955
+ CodeChatSemanticDiffResultDto:
16956
+ type: object
16957
+ required: [files, blastHints]
16958
+ properties:
16959
+ baseCommit: { type: string }
16960
+ headCommit: { type: string }
16961
+ files:
16962
+ type: array
16963
+ items:
16964
+ type: object
16965
+ required: [path, changeType, symbolsTouched, summary]
16966
+ properties:
16967
+ path: { type: string }
16968
+ changeType: { type: string, enum: [added, removed, modified] }
16969
+ symbolsTouched:
16970
+ type: array
16971
+ items: { type: string }
16972
+ summary: { type: string }
16973
+ blastHints:
16974
+ type: array
16975
+ items:
16976
+ type: object
16977
+ required: [symbol, affectedCount]
16978
+ properties:
16979
+ symbol: { type: string }
16980
+ affectedCount: { type: integer }
16981
+
16982
+ CodeChatRecommendationsBodyDto:
16983
+ type: object
16984
+ properties:
16985
+ repoIds:
16986
+ type: array
16987
+ items: { type: string, format: uuid }
16988
+ changedPaths:
16989
+ type: array
16990
+ items: { type: string }
16991
+ symbol: { type: string }
16992
+
16993
+ CodeChatRecommendationsResultDto:
16994
+ type: object
16995
+ required: [testImpact, recommendations]
16996
+ properties:
16997
+ repoId: { type: string, format: uuid }
16998
+ repoName: { type: string }
16999
+ testImpact:
17000
+ type: array
17001
+ items:
17002
+ type: object
17003
+ additionalProperties: true
17004
+ recommendations:
17005
+ type: array
17006
+ items:
17007
+ type: object
17008
+ additionalProperties: true
17009
+
17010
+ CodeChatVisualizeBodyDto:
17011
+ type: object
17012
+ properties:
17013
+ kind: { type: string, enum: [dependency, blast, atlas] }
17014
+ symbol: { type: string }
17015
+ repoIds:
17016
+ type: array
17017
+ items: { type: string, format: uuid }
17018
+
17019
+ CodeChatVisualizeResultDto:
17020
+ type: object
17021
+ properties:
17022
+ repoId: { type: string, format: uuid }
17023
+ diagram:
17024
+ type: object
17025
+ required: [format, title, source, nodes, edges]
17026
+ properties:
17027
+ format: { type: string, enum: [graph, mermaid] }
17028
+ title: { type: string }
17029
+ source: { type: string, description: Mermaid source kept for export/copy }
17030
+ note:
17031
+ type: string
17032
+ description: Set when dependency edges could not be resolved and a fallback view is shown.
17033
+ nodes:
17034
+ type: array
17035
+ items:
17036
+ type: object
17037
+ required: [id, label]
17038
+ properties:
17039
+ id: { type: string }
17040
+ label: { type: string }
17041
+ kind: { type: string }
17042
+ edges:
17043
+ type: array
17044
+ items:
17045
+ type: object
17046
+ required: [from, to]
17047
+ properties:
17048
+ from: { type: string }
17049
+ to: { type: string }
17050
+ label: { type: string }
17051
+ atlas:
17052
+ type: array
17053
+ items:
17054
+ type: object
17055
+ properties:
17056
+ path: { type: string }
17057
+ body: { type: string }
17058
+
17059
+ CodeChatCrossEdgesBodyDto:
17060
+ type: object
17061
+ properties:
17062
+ repoIds:
17063
+ type: array
17064
+ items: { type: string, format: uuid }
17065
+
17066
+ CodeChatCrossEdgesResultDto:
17067
+ type: object
17068
+ required: [items, completeness]
17069
+ properties:
17070
+ items:
17071
+ type: array
17072
+ items:
17073
+ type: object
17074
+ additionalProperties: true
17075
+ completeness: { type: string, enum: [partial, unknown] }
17076
+ gateNote: { type: string }
17077
+
17078
+ CodeChatContextPackBodyDto:
17079
+ type: object
17080
+ properties:
17081
+ question: { type: string }
17082
+ symbol: { type: string }
17083
+ maxTokensApprox: { type: integer }
17084
+ repoIds:
17085
+ type: array
17086
+ items: { type: string, format: uuid }
17087
+
17088
+ CodeChatContextPackDto:
17089
+ type: object
17090
+ required: [summary, symbols, references, citations, snippets]
17091
+ properties:
17092
+ repoId: { type: string, format: uuid }
17093
+ repoName: { type: string }
17094
+ commitSha: { type: string, nullable: true }
17095
+ summary: { type: string }
17096
+ symbols:
17097
+ type: array
17098
+ items:
17099
+ type: object
17100
+ additionalProperties: true
17101
+ references:
17102
+ type: array
17103
+ items:
17104
+ type: object
17105
+ additionalProperties: true
17106
+ blastRadiusPreview:
17107
+ type: object
17108
+ additionalProperties: true
17109
+ citations:
17110
+ type: array
17111
+ items:
17112
+ type: object
17113
+ additionalProperties: true
17114
+ snippets:
17115
+ type: array
17116
+ items: { type: string }