@thinkai/tai-api-contract 2.130.0 → 2.131.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.130.0
4
+ version: 2.131.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}/...`.
@@ -8530,6 +8530,121 @@ paths:
8530
8530
  "409":
8531
8531
  description: Index not ready
8532
8532
 
8533
+ /workspaces/{workspaceId}/code-chat/indexes/{indexId}/origin-prompt:
8534
+ get:
8535
+ tags: [CodeChat]
8536
+ summary: Origin prompt and symbol-index status for one repository index
8537
+ operationId: getCodeChatOriginPrompt
8538
+ x-test-coverage-skip: lightweight read; covered by package unit tests
8539
+ parameters:
8540
+ - $ref: "#/components/parameters/WorkspaceId"
8541
+ - name: indexId
8542
+ in: path
8543
+ required: true
8544
+ schema: { type: string, format: uuid }
8545
+ responses:
8546
+ "200":
8547
+ description: Stored origin prompt and symbol-index status
8548
+ content:
8549
+ application/json:
8550
+ schema:
8551
+ $ref: "#/components/schemas/CodeChatOriginPromptDto"
8552
+ "401":
8553
+ $ref: "#/components/responses/Unauthorized"
8554
+
8555
+ /workspaces/{workspaceId}/code-chat/indexes/{indexId}/context-pack:
8556
+ get:
8557
+ tags: [CodeChat]
8558
+ summary: Reader context pack for one repository index
8559
+ operationId: getCodeChatRepoContextPack
8560
+ description: Reader export. The agent tool remains POST …/code-chat/tools/get_context_pack.
8561
+ x-test-coverage-skip: lightweight read; covered by package unit tests
8562
+ parameters:
8563
+ - $ref: "#/components/parameters/WorkspaceId"
8564
+ - name: indexId
8565
+ in: path
8566
+ required: true
8567
+ schema: { type: string, format: uuid }
8568
+ responses:
8569
+ "200":
8570
+ description: Context pack markdown and section list
8571
+ content:
8572
+ application/json:
8573
+ schema:
8574
+ $ref: "#/components/schemas/CodeChatRepoContextPackDto"
8575
+ "401":
8576
+ $ref: "#/components/responses/Unauthorized"
8577
+ "404":
8578
+ description: Index not ready
8579
+ content:
8580
+ application/json:
8581
+ schema:
8582
+ $ref: "#/components/schemas/ErrorMessageDto"
8583
+
8584
+ /workspaces/{workspaceId}/code-chat/symbols/search:
8585
+ get:
8586
+ tags: [CodeChat]
8587
+ summary: Search stored symbols in the workspace
8588
+ operationId: searchCodeChatSymbols
8589
+ x-test-coverage-skip: covered by code-context analysis unit tests
8590
+ parameters:
8591
+ - $ref: "#/components/parameters/WorkspaceId"
8592
+ - name: q
8593
+ in: query
8594
+ required: true
8595
+ schema: { type: string, minLength: 1 }
8596
+ - name: repoId
8597
+ in: query
8598
+ required: false
8599
+ schema: { type: string, format: uuid }
8600
+ responses:
8601
+ "200":
8602
+ description: Symbol hits
8603
+ content:
8604
+ application/json:
8605
+ schema:
8606
+ $ref: "#/components/schemas/CodeChatSymbolHitListDto"
8607
+ "400":
8608
+ description: Missing query
8609
+ content:
8610
+ application/json:
8611
+ schema:
8612
+ $ref: "#/components/schemas/ErrorMessageDto"
8613
+ "401":
8614
+ $ref: "#/components/responses/Unauthorized"
8615
+
8616
+ /workspaces/{workspaceId}/code-chat/symbols/refs:
8617
+ get:
8618
+ tags: [CodeChat]
8619
+ summary: List references for a stored symbol
8620
+ operationId: listCodeChatSymbolRefs
8621
+ x-test-coverage-skip: covered by code-context analysis unit tests
8622
+ parameters:
8623
+ - $ref: "#/components/parameters/WorkspaceId"
8624
+ - name: symbol
8625
+ in: query
8626
+ required: true
8627
+ schema: { type: string, minLength: 1 }
8628
+ - name: repoId
8629
+ in: query
8630
+ required: false
8631
+ schema: { type: string, format: uuid }
8632
+ responses:
8633
+ "200":
8634
+ description: Reference hits
8635
+ content:
8636
+ application/json:
8637
+ schema:
8638
+ $ref: "#/components/schemas/CodeChatSymbolHitListDto"
8639
+ "400":
8640
+ description: Missing symbol
8641
+ content:
8642
+ application/json:
8643
+ schema:
8644
+ $ref: "#/components/schemas/ErrorMessageDto"
8645
+ "401":
8646
+ $ref: "#/components/responses/Unauthorized"
8647
+
8533
8648
  /workspaces/{workspaceId}/code-chat/analyze/symbols:
8534
8649
  post:
8535
8650
  tags: [CodeChat]
@@ -20798,6 +20913,13 @@ components:
20798
20913
  kind: { type: string }
20799
20914
  summary: { type: string }
20800
20915
  startLine: { type: integer }
20916
+ label: { type: string }
20917
+ symbol: { type: string }
20918
+ role: { type: string }
20919
+ precision: { type: string, enum: [scip, structural] }
20920
+ language: { type: string }
20921
+ source: { type: string, enum: [scip, structural, codegraph] }
20922
+ indexId: { type: string, format: uuid }
20801
20923
  repoId: { type: string, format: uuid }
20802
20924
  repoName: { type: string }
20803
20925
  commitSha: { type: string, nullable: true }
@@ -20809,6 +20931,30 @@ components:
20809
20931
  items:
20810
20932
  type: array
20811
20933
  items: { $ref: "#/components/schemas/CodeChatSymbolHitDto" }
20934
+ source: { type: string, enum: [scip_store, codegraph] }
20935
+
20936
+ CodeChatOriginPromptDto:
20937
+ type: object
20938
+ properties:
20939
+ originPromptMd: { type: string, nullable: true }
20940
+ scipStatus:
20941
+ type: object
20942
+ nullable: true
20943
+ additionalProperties: true
20944
+
20945
+ CodeChatRepoContextPackDto:
20946
+ type: object
20947
+ required: [markdown, tokenEstimate, maxTokens, sectionsIncluded]
20948
+ properties:
20949
+ markdown: { type: string }
20950
+ tokenEstimate: { type: integer }
20951
+ maxTokens: { type: integer }
20952
+ sectionsIncluded:
20953
+ type: array
20954
+ items: { type: string }
20955
+ pack:
20956
+ type: object
20957
+ additionalProperties: true
20812
20958
 
20813
20959
  CodeChatReferenceQueryBodyDto:
20814
20960
  type: object
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.130.0",
3
+ "version": "2.131.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "devDependencies": {
22
22
  "@stoplight/spectral-cli": "^6.16.3",
23
- "@types/node": "^26.5.1",
23
+ "@types/node": "^26.6.2",
24
24
  "jsonpath-plus": "^10.3.0",
25
25
  "openapi-typescript": "^7.13.0",
26
26
  "typescript": "~6.0.3"
@@ -3382,6 +3382,77 @@ export interface paths {
3382
3382
  patch?: never;
3383
3383
  trace?: never;
3384
3384
  };
3385
+ "/workspaces/{workspaceId}/code-chat/indexes/{indexId}/origin-prompt": {
3386
+ parameters: {
3387
+ query?: never;
3388
+ header?: never;
3389
+ path?: never;
3390
+ cookie?: never;
3391
+ };
3392
+ /** Origin prompt and symbol-index status for one repository index */
3393
+ get: operations["getCodeChatOriginPrompt"];
3394
+ put?: never;
3395
+ post?: never;
3396
+ delete?: never;
3397
+ options?: never;
3398
+ head?: never;
3399
+ patch?: never;
3400
+ trace?: never;
3401
+ };
3402
+ "/workspaces/{workspaceId}/code-chat/indexes/{indexId}/context-pack": {
3403
+ parameters: {
3404
+ query?: never;
3405
+ header?: never;
3406
+ path?: never;
3407
+ cookie?: never;
3408
+ };
3409
+ /**
3410
+ * Reader context pack for one repository index
3411
+ * @description Reader export. The agent tool remains POST …/code-chat/tools/get_context_pack.
3412
+ */
3413
+ get: operations["getCodeChatRepoContextPack"];
3414
+ put?: never;
3415
+ post?: never;
3416
+ delete?: never;
3417
+ options?: never;
3418
+ head?: never;
3419
+ patch?: never;
3420
+ trace?: never;
3421
+ };
3422
+ "/workspaces/{workspaceId}/code-chat/symbols/search": {
3423
+ parameters: {
3424
+ query?: never;
3425
+ header?: never;
3426
+ path?: never;
3427
+ cookie?: never;
3428
+ };
3429
+ /** Search stored symbols in the workspace */
3430
+ get: operations["searchCodeChatSymbols"];
3431
+ put?: never;
3432
+ post?: never;
3433
+ delete?: never;
3434
+ options?: never;
3435
+ head?: never;
3436
+ patch?: never;
3437
+ trace?: never;
3438
+ };
3439
+ "/workspaces/{workspaceId}/code-chat/symbols/refs": {
3440
+ parameters: {
3441
+ query?: never;
3442
+ header?: never;
3443
+ path?: never;
3444
+ cookie?: never;
3445
+ };
3446
+ /** List references for a stored symbol */
3447
+ get: operations["listCodeChatSymbolRefs"];
3448
+ put?: never;
3449
+ post?: never;
3450
+ delete?: never;
3451
+ options?: never;
3452
+ head?: never;
3453
+ patch?: never;
3454
+ trace?: never;
3455
+ };
3385
3456
  "/workspaces/{workspaceId}/code-chat/analyze/symbols": {
3386
3457
  parameters: {
3387
3458
  query?: never;
@@ -9168,6 +9239,16 @@ export interface components {
9168
9239
  kind: string;
9169
9240
  summary?: string;
9170
9241
  startLine?: number;
9242
+ label?: string;
9243
+ symbol?: string;
9244
+ role?: string;
9245
+ /** @enum {string} */
9246
+ precision?: "scip" | "structural";
9247
+ language?: string;
9248
+ /** @enum {string} */
9249
+ source?: "scip" | "structural" | "codegraph";
9250
+ /** Format: uuid */
9251
+ indexId?: string;
9171
9252
  /** Format: uuid */
9172
9253
  repoId?: string;
9173
9254
  repoName?: string;
@@ -9175,6 +9256,23 @@ export interface components {
9175
9256
  };
9176
9257
  CodeChatSymbolHitListDto: {
9177
9258
  items: components["schemas"]["CodeChatSymbolHitDto"][];
9259
+ /** @enum {string} */
9260
+ source?: "scip_store" | "codegraph";
9261
+ };
9262
+ CodeChatOriginPromptDto: {
9263
+ originPromptMd?: string | null;
9264
+ scipStatus?: {
9265
+ [key: string]: unknown;
9266
+ } | null;
9267
+ };
9268
+ CodeChatRepoContextPackDto: {
9269
+ markdown: string;
9270
+ tokenEstimate: number;
9271
+ maxTokens: number;
9272
+ sectionsIncluded: string[];
9273
+ pack?: {
9274
+ [key: string]: unknown;
9275
+ };
9178
9276
  };
9179
9277
  CodeChatReferenceQueryBodyDto: {
9180
9278
  symbol: string;
@@ -10340,6 +10438,8 @@ export type CodeChatWikiOkfExportDto = components['schemas']['CodeChatWikiOkfExp
10340
10438
  export type CodeChatSymbolQueryBodyDto = components['schemas']['CodeChatSymbolQueryBodyDto'];
10341
10439
  export type CodeChatSymbolHitDto = components['schemas']['CodeChatSymbolHitDto'];
10342
10440
  export type CodeChatSymbolHitListDto = components['schemas']['CodeChatSymbolHitListDto'];
10441
+ export type CodeChatOriginPromptDto = components['schemas']['CodeChatOriginPromptDto'];
10442
+ export type CodeChatRepoContextPackDto = components['schemas']['CodeChatRepoContextPackDto'];
10343
10443
  export type CodeChatReferenceQueryBodyDto = components['schemas']['CodeChatReferenceQueryBodyDto'];
10344
10444
  export type CodeChatReferenceHitDto = components['schemas']['CodeChatReferenceHitDto'];
10345
10445
  export type CodeChatReferenceHitListDto = components['schemas']['CodeChatReferenceHitListDto'];
@@ -19210,6 +19310,133 @@ export interface operations {
19210
19310
  };
19211
19311
  };
19212
19312
  };
19313
+ getCodeChatOriginPrompt: {
19314
+ parameters: {
19315
+ query?: never;
19316
+ header?: never;
19317
+ path: {
19318
+ workspaceId: components["parameters"]["WorkspaceId"];
19319
+ indexId: string;
19320
+ };
19321
+ cookie?: never;
19322
+ };
19323
+ requestBody?: never;
19324
+ responses: {
19325
+ /** @description Stored origin prompt and symbol-index status */
19326
+ 200: {
19327
+ headers: {
19328
+ [name: string]: unknown;
19329
+ };
19330
+ content: {
19331
+ "application/json": components["schemas"]["CodeChatOriginPromptDto"];
19332
+ };
19333
+ };
19334
+ 401: components["responses"]["Unauthorized"];
19335
+ };
19336
+ };
19337
+ getCodeChatRepoContextPack: {
19338
+ parameters: {
19339
+ query?: never;
19340
+ header?: never;
19341
+ path: {
19342
+ workspaceId: components["parameters"]["WorkspaceId"];
19343
+ indexId: string;
19344
+ };
19345
+ cookie?: never;
19346
+ };
19347
+ requestBody?: never;
19348
+ responses: {
19349
+ /** @description Context pack markdown and section list */
19350
+ 200: {
19351
+ headers: {
19352
+ [name: string]: unknown;
19353
+ };
19354
+ content: {
19355
+ "application/json": components["schemas"]["CodeChatRepoContextPackDto"];
19356
+ };
19357
+ };
19358
+ 401: components["responses"]["Unauthorized"];
19359
+ /** @description Index not ready */
19360
+ 404: {
19361
+ headers: {
19362
+ [name: string]: unknown;
19363
+ };
19364
+ content: {
19365
+ "application/json": components["schemas"]["ErrorMessageDto"];
19366
+ };
19367
+ };
19368
+ };
19369
+ };
19370
+ searchCodeChatSymbols: {
19371
+ parameters: {
19372
+ query: {
19373
+ q: string;
19374
+ repoId?: string;
19375
+ };
19376
+ header?: never;
19377
+ path: {
19378
+ workspaceId: components["parameters"]["WorkspaceId"];
19379
+ };
19380
+ cookie?: never;
19381
+ };
19382
+ requestBody?: never;
19383
+ responses: {
19384
+ /** @description Symbol hits */
19385
+ 200: {
19386
+ headers: {
19387
+ [name: string]: unknown;
19388
+ };
19389
+ content: {
19390
+ "application/json": components["schemas"]["CodeChatSymbolHitListDto"];
19391
+ };
19392
+ };
19393
+ /** @description Missing query */
19394
+ 400: {
19395
+ headers: {
19396
+ [name: string]: unknown;
19397
+ };
19398
+ content: {
19399
+ "application/json": components["schemas"]["ErrorMessageDto"];
19400
+ };
19401
+ };
19402
+ 401: components["responses"]["Unauthorized"];
19403
+ };
19404
+ };
19405
+ listCodeChatSymbolRefs: {
19406
+ parameters: {
19407
+ query: {
19408
+ symbol: string;
19409
+ repoId?: string;
19410
+ };
19411
+ header?: never;
19412
+ path: {
19413
+ workspaceId: components["parameters"]["WorkspaceId"];
19414
+ };
19415
+ cookie?: never;
19416
+ };
19417
+ requestBody?: never;
19418
+ responses: {
19419
+ /** @description Reference hits */
19420
+ 200: {
19421
+ headers: {
19422
+ [name: string]: unknown;
19423
+ };
19424
+ content: {
19425
+ "application/json": components["schemas"]["CodeChatSymbolHitListDto"];
19426
+ };
19427
+ };
19428
+ /** @description Missing symbol */
19429
+ 400: {
19430
+ headers: {
19431
+ [name: string]: unknown;
19432
+ };
19433
+ content: {
19434
+ "application/json": components["schemas"]["ErrorMessageDto"];
19435
+ };
19436
+ };
19437
+ 401: components["responses"]["Unauthorized"];
19438
+ };
19439
+ };
19213
19440
  analyzeCodeChatSymbols: {
19214
19441
  parameters: {
19215
19442
  query?: never;