@thinkai/tai-api-contract 2.219.0 → 2.220.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.
package/openapi/openapi.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
openapi: 3.0.3
|
|
2
2
|
info:
|
|
3
3
|
title: ThinkAI API
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.220.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}/...`.
|
|
@@ -11500,11 +11500,17 @@ paths:
|
|
|
11500
11500
|
$ref: "#/components/schemas/CodeChatPostMessageBodyDto"
|
|
11501
11501
|
responses:
|
|
11502
11502
|
"200":
|
|
11503
|
-
description:
|
|
11503
|
+
description: >
|
|
11504
|
+
Assistant message. With `stream: true` the body is `text/event-stream`:
|
|
11505
|
+
`event: stage` (`{ stage, detail? }`), `event: token` (`{ text }`),
|
|
11506
|
+
`event: done` (CodeChatMessageReplyDto), or `event: error` (`{ error, code }`).
|
|
11504
11507
|
content:
|
|
11505
11508
|
application/json:
|
|
11506
11509
|
schema:
|
|
11507
11510
|
$ref: "#/components/schemas/CodeChatMessageReplyDto"
|
|
11511
|
+
text/event-stream:
|
|
11512
|
+
schema:
|
|
11513
|
+
type: string
|
|
11508
11514
|
"401":
|
|
11509
11515
|
$ref: "#/components/responses/Unauthorized"
|
|
11510
11516
|
"403":
|
|
@@ -12326,6 +12332,39 @@ paths:
|
|
|
12326
12332
|
"409":
|
|
12327
12333
|
description: Corpus not ready
|
|
12328
12334
|
|
|
12335
|
+
/workspaces/{workspaceId}/code-chat/tools/ask:
|
|
12336
|
+
post:
|
|
12337
|
+
tags: [CodeChat]
|
|
12338
|
+
summary: MCP/agent tool — grounded Ask answer with citations
|
|
12339
|
+
description: >
|
|
12340
|
+
Read-only. Runs the same Ask pipeline as Conversations for the repos in `repoIds`
|
|
12341
|
+
(every ready repo when `repoIds` is omitted). Does not edit files or open pull requests.
|
|
12342
|
+
The answer is `result.content` with `result.citations`. Other graph tools, when given
|
|
12343
|
+
more than one repo, return the same rows as a single repo plus `repoId` and `repoName`.
|
|
12344
|
+
operationId: codeChatAskTool
|
|
12345
|
+
x-test-coverage-skip: covered by code-context MCP unit tests
|
|
12346
|
+
parameters:
|
|
12347
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
12348
|
+
requestBody:
|
|
12349
|
+
required: true
|
|
12350
|
+
content:
|
|
12351
|
+
application/json:
|
|
12352
|
+
schema:
|
|
12353
|
+
$ref: "#/components/schemas/CodeChatAskToolBodyDto"
|
|
12354
|
+
responses:
|
|
12355
|
+
"200":
|
|
12356
|
+
description: Grounded answer
|
|
12357
|
+
content:
|
|
12358
|
+
application/json:
|
|
12359
|
+
schema:
|
|
12360
|
+
$ref: "#/components/schemas/CodeChatAskToolResponseDto"
|
|
12361
|
+
"400":
|
|
12362
|
+
description: Missing or oversized question
|
|
12363
|
+
"401":
|
|
12364
|
+
$ref: "#/components/responses/Unauthorized"
|
|
12365
|
+
"409":
|
|
12366
|
+
description: Corpus not ready
|
|
12367
|
+
|
|
12329
12368
|
/notifications/email/unsubscribe:
|
|
12330
12369
|
get:
|
|
12331
12370
|
tags: [Notifications]
|
|
@@ -30122,6 +30161,21 @@ components:
|
|
|
30122
30161
|
maxItems: 5
|
|
30123
30162
|
items: { type: string, format: uuid }
|
|
30124
30163
|
description: Previously uploaded attachment ids to bind to this user turn
|
|
30164
|
+
focusWikiSlug:
|
|
30165
|
+
type: string
|
|
30166
|
+
maxLength: 200
|
|
30167
|
+
description: >
|
|
30168
|
+
Slug of the wiki page the user has open. Prepended to Ask wiki context when the
|
|
30169
|
+
question is relevant to it or refers to it deictically ("explain this page").
|
|
30170
|
+
focusWikiRepoId:
|
|
30171
|
+
type: string
|
|
30172
|
+
format: uuid
|
|
30173
|
+
description: Repository of `focusWikiSlug` (slugs such as `overview` repeat across repos).
|
|
30174
|
+
stream:
|
|
30175
|
+
type: boolean
|
|
30176
|
+
description: >
|
|
30177
|
+
When true the server replies with `text/event-stream` (`stage`, `token`, `done`,
|
|
30178
|
+
`error` events). The `done` event carries the same JSON as the non-streaming 200 body.
|
|
30125
30179
|
|
|
30126
30180
|
CodeChatUploadAttachmentBodyDto:
|
|
30127
30181
|
type: object
|
|
@@ -31323,6 +31377,39 @@ components:
|
|
|
31323
31377
|
type: array
|
|
31324
31378
|
items: { type: string, format: uuid }
|
|
31325
31379
|
|
|
31380
|
+
CodeChatAskToolBodyDto:
|
|
31381
|
+
type: object
|
|
31382
|
+
required: [question]
|
|
31383
|
+
properties:
|
|
31384
|
+
question: { type: string, maxLength: 4000 }
|
|
31385
|
+
repoIds:
|
|
31386
|
+
type: array
|
|
31387
|
+
items: { type: string, format: uuid }
|
|
31388
|
+
|
|
31389
|
+
CodeChatAskToolResponseDto:
|
|
31390
|
+
type: object
|
|
31391
|
+
required: [tool, result]
|
|
31392
|
+
properties:
|
|
31393
|
+
tool: { type: string, enum: [ask] }
|
|
31394
|
+
note: { type: string }
|
|
31395
|
+
scanned:
|
|
31396
|
+
type: array
|
|
31397
|
+
items:
|
|
31398
|
+
type: object
|
|
31399
|
+
additionalProperties: true
|
|
31400
|
+
result:
|
|
31401
|
+
type: object
|
|
31402
|
+
required: [content, citations, mode]
|
|
31403
|
+
properties:
|
|
31404
|
+
content: { type: string }
|
|
31405
|
+
mode: { type: string }
|
|
31406
|
+
intent: { type: string }
|
|
31407
|
+
citations:
|
|
31408
|
+
type: array
|
|
31409
|
+
items:
|
|
31410
|
+
type: object
|
|
31411
|
+
additionalProperties: true
|
|
31412
|
+
|
|
31326
31413
|
CodeChatContextPackDto:
|
|
31327
31414
|
type: object
|
|
31328
31415
|
required: [summary, symbols, references, citations, snippets]
|
|
@@ -1306,6 +1306,11 @@
|
|
|
1306
1306
|
"method": "POST",
|
|
1307
1307
|
"path": "/workspaces/{workspaceId}/code-chat/tools/get_context_pack"
|
|
1308
1308
|
},
|
|
1309
|
+
"codeChatAskTool": {
|
|
1310
|
+
"status": "implemented",
|
|
1311
|
+
"method": "POST",
|
|
1312
|
+
"path": "/workspaces/{workspaceId}/code-chat/tools/ask"
|
|
1313
|
+
},
|
|
1309
1314
|
"getNotificationEmailUnsubscribe": {
|
|
1310
1315
|
"status": "implemented",
|
|
1311
1316
|
"method": "GET",
|
package/package.json
CHANGED
package/src/generated/openapi.ts
CHANGED
|
@@ -4728,6 +4728,26 @@ export interface paths {
|
|
|
4728
4728
|
patch?: never;
|
|
4729
4729
|
trace?: never;
|
|
4730
4730
|
};
|
|
4731
|
+
"/workspaces/{workspaceId}/code-chat/tools/ask": {
|
|
4732
|
+
parameters: {
|
|
4733
|
+
query?: never;
|
|
4734
|
+
header?: never;
|
|
4735
|
+
path?: never;
|
|
4736
|
+
cookie?: never;
|
|
4737
|
+
};
|
|
4738
|
+
get?: never;
|
|
4739
|
+
put?: never;
|
|
4740
|
+
/**
|
|
4741
|
+
* MCP/agent tool — grounded Ask answer with citations
|
|
4742
|
+
* @description Read-only. Runs the same Ask pipeline as Conversations for the repos in `repoIds` (every ready repo when `repoIds` is omitted). Does not edit files or open pull requests. The answer is `result.content` with `result.citations`. Other graph tools, when given more than one repo, return the same rows as a single repo plus `repoId` and `repoName`.
|
|
4743
|
+
*/
|
|
4744
|
+
post: operations["codeChatAskTool"];
|
|
4745
|
+
delete?: never;
|
|
4746
|
+
options?: never;
|
|
4747
|
+
head?: never;
|
|
4748
|
+
patch?: never;
|
|
4749
|
+
trace?: never;
|
|
4750
|
+
};
|
|
4731
4751
|
"/notifications/email/unsubscribe": {
|
|
4732
4752
|
parameters: {
|
|
4733
4753
|
query?: never;
|
|
@@ -12661,6 +12681,15 @@ export interface components {
|
|
|
12661
12681
|
intent?: "inventory_apis" | "inventory_modules";
|
|
12662
12682
|
/** @description Previously uploaded attachment ids to bind to this user turn */
|
|
12663
12683
|
attachmentIds?: string[];
|
|
12684
|
+
/** @description Slug of the wiki page the user has open. Prepended to Ask wiki context when the question is relevant to it or refers to it deictically ("explain this page"). */
|
|
12685
|
+
focusWikiSlug?: string;
|
|
12686
|
+
/**
|
|
12687
|
+
* Format: uuid
|
|
12688
|
+
* @description Repository of `focusWikiSlug` (slugs such as `overview` repeat across repos).
|
|
12689
|
+
*/
|
|
12690
|
+
focusWikiRepoId?: string;
|
|
12691
|
+
/** @description When true the server replies with `text/event-stream` (`stage`, `token`, `done`, `error` events). The `done` event carries the same JSON as the non-streaming 200 body. */
|
|
12692
|
+
stream?: boolean;
|
|
12664
12693
|
};
|
|
12665
12694
|
CodeChatUploadAttachmentBodyDto: {
|
|
12666
12695
|
filename: string;
|
|
@@ -13375,6 +13404,26 @@ export interface components {
|
|
|
13375
13404
|
maxTokensApprox?: number;
|
|
13376
13405
|
repoIds?: string[];
|
|
13377
13406
|
};
|
|
13407
|
+
CodeChatAskToolBodyDto: {
|
|
13408
|
+
question: string;
|
|
13409
|
+
repoIds?: string[];
|
|
13410
|
+
};
|
|
13411
|
+
CodeChatAskToolResponseDto: {
|
|
13412
|
+
/** @enum {string} */
|
|
13413
|
+
tool: "ask";
|
|
13414
|
+
note?: string;
|
|
13415
|
+
scanned?: {
|
|
13416
|
+
[key: string]: unknown;
|
|
13417
|
+
}[];
|
|
13418
|
+
result: {
|
|
13419
|
+
content: string;
|
|
13420
|
+
mode: string;
|
|
13421
|
+
intent?: string;
|
|
13422
|
+
citations: {
|
|
13423
|
+
[key: string]: unknown;
|
|
13424
|
+
}[];
|
|
13425
|
+
};
|
|
13426
|
+
};
|
|
13378
13427
|
CodeChatContextPackDto: {
|
|
13379
13428
|
/** Format: uuid */
|
|
13380
13429
|
repoId?: string;
|
|
@@ -14850,6 +14899,8 @@ export type CodeChatVisualizeResultDto = components['schemas']['CodeChatVisualiz
|
|
|
14850
14899
|
export type CodeChatCrossEdgesBodyDto = components['schemas']['CodeChatCrossEdgesBodyDto'];
|
|
14851
14900
|
export type CodeChatCrossEdgesResultDto = components['schemas']['CodeChatCrossEdgesResultDto'];
|
|
14852
14901
|
export type CodeChatContextPackBodyDto = components['schemas']['CodeChatContextPackBodyDto'];
|
|
14902
|
+
export type CodeChatAskToolBodyDto = components['schemas']['CodeChatAskToolBodyDto'];
|
|
14903
|
+
export type CodeChatAskToolResponseDto = components['schemas']['CodeChatAskToolResponseDto'];
|
|
14853
14904
|
export type CodeChatContextPackDto = components['schemas']['CodeChatContextPackDto'];
|
|
14854
14905
|
export type CodeInsightsMetricProvenance = components['schemas']['CodeInsightsMetricProvenance'];
|
|
14855
14906
|
export type CodeInsightsMaintainabilityBand = components['schemas']['CodeInsightsMaintainabilityBand'];
|
|
@@ -26618,13 +26669,14 @@ export interface operations {
|
|
|
26618
26669
|
};
|
|
26619
26670
|
};
|
|
26620
26671
|
responses: {
|
|
26621
|
-
/** @description Assistant message */
|
|
26672
|
+
/** @description Assistant message. With `stream: true` the body is `text/event-stream`: `event: stage` (`{ stage, detail? }`), `event: token` (`{ text }`), `event: done` (CodeChatMessageReplyDto), or `event: error` (`{ error, code }`). */
|
|
26622
26673
|
200: {
|
|
26623
26674
|
headers: {
|
|
26624
26675
|
[name: string]: unknown;
|
|
26625
26676
|
};
|
|
26626
26677
|
content: {
|
|
26627
26678
|
"application/json": components["schemas"]["CodeChatMessageReplyDto"];
|
|
26679
|
+
"text/event-stream": string;
|
|
26628
26680
|
};
|
|
26629
26681
|
};
|
|
26630
26682
|
401: components["responses"]["Unauthorized"];
|
|
@@ -27702,6 +27754,47 @@ export interface operations {
|
|
|
27702
27754
|
};
|
|
27703
27755
|
};
|
|
27704
27756
|
};
|
|
27757
|
+
codeChatAskTool: {
|
|
27758
|
+
parameters: {
|
|
27759
|
+
query?: never;
|
|
27760
|
+
header?: never;
|
|
27761
|
+
path: {
|
|
27762
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
27763
|
+
};
|
|
27764
|
+
cookie?: never;
|
|
27765
|
+
};
|
|
27766
|
+
requestBody: {
|
|
27767
|
+
content: {
|
|
27768
|
+
"application/json": components["schemas"]["CodeChatAskToolBodyDto"];
|
|
27769
|
+
};
|
|
27770
|
+
};
|
|
27771
|
+
responses: {
|
|
27772
|
+
/** @description Grounded answer */
|
|
27773
|
+
200: {
|
|
27774
|
+
headers: {
|
|
27775
|
+
[name: string]: unknown;
|
|
27776
|
+
};
|
|
27777
|
+
content: {
|
|
27778
|
+
"application/json": components["schemas"]["CodeChatAskToolResponseDto"];
|
|
27779
|
+
};
|
|
27780
|
+
};
|
|
27781
|
+
/** @description Missing or oversized question */
|
|
27782
|
+
400: {
|
|
27783
|
+
headers: {
|
|
27784
|
+
[name: string]: unknown;
|
|
27785
|
+
};
|
|
27786
|
+
content?: never;
|
|
27787
|
+
};
|
|
27788
|
+
401: components["responses"]["Unauthorized"];
|
|
27789
|
+
/** @description Corpus not ready */
|
|
27790
|
+
409: {
|
|
27791
|
+
headers: {
|
|
27792
|
+
[name: string]: unknown;
|
|
27793
|
+
};
|
|
27794
|
+
content?: never;
|
|
27795
|
+
};
|
|
27796
|
+
};
|
|
27797
|
+
};
|
|
27705
27798
|
getNotificationEmailUnsubscribe: {
|
|
27706
27799
|
parameters: {
|
|
27707
27800
|
query: {
|