@thinkai/tai-api-contract 2.254.1 → 2.257.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/dist/generated/openapi.d.ts +324 -1
- package/dist/generated/openapi.d.ts.map +1 -1
- package/openapi/openapi.yaml +277 -3
- package/openapi/x-test-status-map.json +10 -0
- package/package.json +1 -1
- package/src/generated/openapi.ts +324 -1
|
@@ -4615,6 +4615,81 @@ export interface paths {
|
|
|
4615
4615
|
patch?: never;
|
|
4616
4616
|
trace?: never;
|
|
4617
4617
|
};
|
|
4618
|
+
"/workspaces/{workspaceId}/code-chat/threads/{threadId}/turn/stream": {
|
|
4619
|
+
parameters: {
|
|
4620
|
+
query?: never;
|
|
4621
|
+
header?: never;
|
|
4622
|
+
path?: never;
|
|
4623
|
+
cookie?: never;
|
|
4624
|
+
};
|
|
4625
|
+
/**
|
|
4626
|
+
* Reattach to the Ask that is running on a thread
|
|
4627
|
+
* @description For a page that reloaded while an Ask was running. Replays the stages and answer text so far, then follows the turn live. Closing this stream does not stop the turn; use the cancel route. A few pages can follow one turn; past that the oldest is dropped. Runs on one replica: when the turn is not running there, the reply is JSON `{ running: false }` and the page reads the saved thread instead.
|
|
4628
|
+
*/
|
|
4629
|
+
get: operations["streamCodeChatTurn"];
|
|
4630
|
+
put?: never;
|
|
4631
|
+
post?: never;
|
|
4632
|
+
delete?: never;
|
|
4633
|
+
options?: never;
|
|
4634
|
+
head?: never;
|
|
4635
|
+
patch?: never;
|
|
4636
|
+
trace?: never;
|
|
4637
|
+
};
|
|
4638
|
+
"/workspaces/{workspaceId}/code-chat/threads/{threadId}/cancel": {
|
|
4639
|
+
parameters: {
|
|
4640
|
+
query?: never;
|
|
4641
|
+
header?: never;
|
|
4642
|
+
path?: never;
|
|
4643
|
+
cookie?: never;
|
|
4644
|
+
};
|
|
4645
|
+
get?: never;
|
|
4646
|
+
put?: never;
|
|
4647
|
+
/**
|
|
4648
|
+
* Stop the Ask that is running on a thread
|
|
4649
|
+
* @description An Ask keeps running when the reader's page closes or reloads. This is the Stop button. Runs on one replica; `cancelled` is false when no turn was running there, and the turn then ends at its time limit.
|
|
4650
|
+
*/
|
|
4651
|
+
post: operations["cancelCodeChatTurn"];
|
|
4652
|
+
delete?: never;
|
|
4653
|
+
options?: never;
|
|
4654
|
+
head?: never;
|
|
4655
|
+
patch?: never;
|
|
4656
|
+
trace?: never;
|
|
4657
|
+
};
|
|
4658
|
+
"/workspaces/{workspaceId}/code-chat/threads/{threadId}/messages/{messageId}/feedback": {
|
|
4659
|
+
parameters: {
|
|
4660
|
+
query?: never;
|
|
4661
|
+
header?: never;
|
|
4662
|
+
path?: never;
|
|
4663
|
+
cookie?: never;
|
|
4664
|
+
};
|
|
4665
|
+
get?: never;
|
|
4666
|
+
put?: never;
|
|
4667
|
+
/** Rate an assistant answer (thumbs up or down, with a reason) */
|
|
4668
|
+
post: operations["postCodeChatMessageFeedback"];
|
|
4669
|
+
delete?: never;
|
|
4670
|
+
options?: never;
|
|
4671
|
+
head?: never;
|
|
4672
|
+
patch?: never;
|
|
4673
|
+
trace?: never;
|
|
4674
|
+
};
|
|
4675
|
+
"/workspaces/{workspaceId}/code-chat/feedback-settings": {
|
|
4676
|
+
parameters: {
|
|
4677
|
+
query?: never;
|
|
4678
|
+
header?: never;
|
|
4679
|
+
path?: never;
|
|
4680
|
+
cookie?: never;
|
|
4681
|
+
};
|
|
4682
|
+
/** Whether thumbs-down keeps the question for eval */
|
|
4683
|
+
get: operations["getCodeChatFeedbackSettings"];
|
|
4684
|
+
/** Turn question capture on or off (workspace admin) */
|
|
4685
|
+
put: operations["putCodeChatFeedbackSettings"];
|
|
4686
|
+
post?: never;
|
|
4687
|
+
delete?: never;
|
|
4688
|
+
options?: never;
|
|
4689
|
+
head?: never;
|
|
4690
|
+
patch?: never;
|
|
4691
|
+
trace?: never;
|
|
4692
|
+
};
|
|
4618
4693
|
"/workspaces/{workspaceId}/code-chat/indexes/{indexId}/wiki": {
|
|
4619
4694
|
parameters: {
|
|
4620
4695
|
query?: never;
|
|
@@ -14005,6 +14080,16 @@ export interface components {
|
|
|
14005
14080
|
ruleCards?: components["schemas"]["CodeChatIndexRuleCardsDto"] | null;
|
|
14006
14081
|
/** @description How the architecture document step ended on the last scan. Null when no document step has reported for this index (documents off, or scanned by an older worker). */
|
|
14007
14082
|
archDoc?: components["schemas"]["CodeChatIndexArchDocDto"] | null;
|
|
14083
|
+
/** @description Secret and low-signal counts from the last scan. Null until a scan writes them. All zeros means the scan ran and found nothing to report. */
|
|
14084
|
+
scanCounts?: components["schemas"]["CodeChatIndexScanCountsDto"] | null;
|
|
14085
|
+
};
|
|
14086
|
+
CodeChatIndexScanCountsDto: {
|
|
14087
|
+
/** @description Secret values replaced in excerpts on the last scan. */
|
|
14088
|
+
secretsRedacted: number;
|
|
14089
|
+
/** @description Files left unread because their name says they hold secrets. */
|
|
14090
|
+
secretFilesSkipped: number;
|
|
14091
|
+
/** @description Lockfiles, bundles, source maps and generated files skipped on the last scan. */
|
|
14092
|
+
lowSignalFilesSkipped: number;
|
|
14008
14093
|
};
|
|
14009
14094
|
CodeChatIndexRuleCardsDto: {
|
|
14010
14095
|
/**
|
|
@@ -14213,6 +14298,43 @@ export interface components {
|
|
|
14213
14298
|
attachments?: components["schemas"]["CodeChatAttachmentMetaDto"][];
|
|
14214
14299
|
/** @description Hydrated from `tai_workspace_code_intelligence_token_usage` on GET thread detail (assistant turns). Omitted when no ledger rows exist for the message. */
|
|
14215
14300
|
usage?: components["schemas"]["CodeIntelligenceUsageDto"];
|
|
14301
|
+
/**
|
|
14302
|
+
* @description Structured outcome of an assistant turn, so a client does not parse the answer text. `unconfirmed` means no quoted line from the code backed the answer. Present on assistant turns only.
|
|
14303
|
+
* @enum {string}
|
|
14304
|
+
*/
|
|
14305
|
+
verdict?: "answered" | "caveat" | "clarifying" | "unconfirmed" | "retrieval_only" | "failed" | "timed_out";
|
|
14306
|
+
/** @description Short code behind a `caveat` or `clarifying` turn (for example `ask-first`, `open-decisions`, `plan-only`). Null otherwise. */
|
|
14307
|
+
abstainReason?: string | null;
|
|
14308
|
+
/** @description The caller's own thumbs on this answer. Omitted when none. */
|
|
14309
|
+
feedback?: components["schemas"]["CodeChatAskFeedbackDto"];
|
|
14310
|
+
};
|
|
14311
|
+
CodeChatAskFeedbackDto: {
|
|
14312
|
+
/** @enum {string} */
|
|
14313
|
+
rating: "up" | "down";
|
|
14314
|
+
/**
|
|
14315
|
+
* @description Why, for a thumbs-down. Null for a thumbs-up or when none was given.
|
|
14316
|
+
* @enum {string|null}
|
|
14317
|
+
*/
|
|
14318
|
+
reason: "wrong" | "incomplete" | "not_grounded" | "too_slow" | "unclear" | "other" | null;
|
|
14319
|
+
};
|
|
14320
|
+
CodeChatAskFeedbackBodyDto: {
|
|
14321
|
+
/**
|
|
14322
|
+
* @description `null` clears the caller's feedback on this answer.
|
|
14323
|
+
* @enum {string|null}
|
|
14324
|
+
*/
|
|
14325
|
+
rating: "up" | "down" | null;
|
|
14326
|
+
/**
|
|
14327
|
+
* @description Used for a thumbs-down only; dropped for a thumbs-up.
|
|
14328
|
+
* @enum {string|null}
|
|
14329
|
+
*/
|
|
14330
|
+
reason?: "wrong" | "incomplete" | "not_grounded" | "too_slow" | "unclear" | "other" | null;
|
|
14331
|
+
};
|
|
14332
|
+
CodeChatAskFeedbackResultDto: {
|
|
14333
|
+
feedback: components["schemas"]["CodeChatAskFeedbackDto"] | null;
|
|
14334
|
+
};
|
|
14335
|
+
CodeChatFeedbackSettingsDto: {
|
|
14336
|
+
/** @description When true, a thumbs-down also keeps the secret-scrubbed question for 30 days so the turn can become an eval case. Default false. */
|
|
14337
|
+
captureQuestions: boolean;
|
|
14216
14338
|
};
|
|
14217
14339
|
CodeChatThreadDetailDto: components["schemas"]["CodeChatThreadDto"] & {
|
|
14218
14340
|
messages: components["schemas"]["CodeChatMessageDto"][];
|
|
@@ -16660,6 +16782,7 @@ export type InsightsRecommendationsPageBundleResponse = components['schemas']['I
|
|
|
16660
16782
|
export type CodeChatIndexStatus = components['schemas']['CodeChatIndexStatus'];
|
|
16661
16783
|
export type CodeChatIndexer = components['schemas']['CodeChatIndexer'];
|
|
16662
16784
|
export type CodeChatIndexDto = components['schemas']['CodeChatIndexDto'];
|
|
16785
|
+
export type CodeChatIndexScanCountsDto = components['schemas']['CodeChatIndexScanCountsDto'];
|
|
16663
16786
|
export type CodeChatIndexRuleCardsDto = components['schemas']['CodeChatIndexRuleCardsDto'];
|
|
16664
16787
|
export type CodeChatIndexArchDocDto = components['schemas']['CodeChatIndexArchDocDto'];
|
|
16665
16788
|
export type CodeChatArchDocViewDto = components['schemas']['CodeChatArchDocViewDto'];
|
|
@@ -16677,6 +16800,10 @@ export type CodeChatThreadListDto = components['schemas']['CodeChatThreadListDto
|
|
|
16677
16800
|
export type CodeChatCreateThreadBodyDto = components['schemas']['CodeChatCreateThreadBodyDto'];
|
|
16678
16801
|
export type CodeChatCitationDto = components['schemas']['CodeChatCitationDto'];
|
|
16679
16802
|
export type CodeChatMessageDto = components['schemas']['CodeChatMessageDto'];
|
|
16803
|
+
export type CodeChatAskFeedbackDto = components['schemas']['CodeChatAskFeedbackDto'];
|
|
16804
|
+
export type CodeChatAskFeedbackBodyDto = components['schemas']['CodeChatAskFeedbackBodyDto'];
|
|
16805
|
+
export type CodeChatAskFeedbackResultDto = components['schemas']['CodeChatAskFeedbackResultDto'];
|
|
16806
|
+
export type CodeChatFeedbackSettingsDto = components['schemas']['CodeChatFeedbackSettingsDto'];
|
|
16680
16807
|
export type CodeChatThreadDetailDto = components['schemas']['CodeChatThreadDetailDto'];
|
|
16681
16808
|
export type CodeChatPostMessageBodyDto = components['schemas']['CodeChatPostMessageBodyDto'];
|
|
16682
16809
|
export type CodeChatUploadAttachmentBodyDto = components['schemas']['CodeChatUploadAttachmentBodyDto'];
|
|
@@ -29689,7 +29816,7 @@ export interface operations {
|
|
|
29689
29816
|
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
29690
29817
|
};
|
|
29691
29818
|
};
|
|
29692
|
-
/** @description Chat not ready, no ready corpus in thread scope,
|
|
29819
|
+
/** @description Chat not ready, no ready corpus in thread scope, `continueAsk` expired / mismatched (`continue_expired`), or this thread is still answering its last question (`ask_turn_in_progress`). */
|
|
29693
29820
|
409: {
|
|
29694
29821
|
headers: {
|
|
29695
29822
|
[name: string]: unknown;
|
|
@@ -29707,6 +29834,202 @@ export interface operations {
|
|
|
29707
29834
|
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
29708
29835
|
};
|
|
29709
29836
|
};
|
|
29837
|
+
/** @description Too many questions. `ask_rate_limited` (per minute) or `ask_busy` (too many running at once), per user or per workspace. Nothing was spent. `Retry-After` and `retryAfterSec` say when to ask again. */
|
|
29838
|
+
429: {
|
|
29839
|
+
headers: {
|
|
29840
|
+
"Retry-After"?: number;
|
|
29841
|
+
[name: string]: unknown;
|
|
29842
|
+
};
|
|
29843
|
+
content: {
|
|
29844
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
29845
|
+
};
|
|
29846
|
+
};
|
|
29847
|
+
};
|
|
29848
|
+
};
|
|
29849
|
+
streamCodeChatTurn: {
|
|
29850
|
+
parameters: {
|
|
29851
|
+
query?: never;
|
|
29852
|
+
header?: never;
|
|
29853
|
+
path: {
|
|
29854
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
29855
|
+
threadId: string;
|
|
29856
|
+
};
|
|
29857
|
+
cookie?: never;
|
|
29858
|
+
};
|
|
29859
|
+
requestBody?: never;
|
|
29860
|
+
responses: {
|
|
29861
|
+
/** @description `text/event-stream` with `event: turn` (`{ startedAt }`), then `event: stage` (`{ stage, detail? }`), `event: token` (`{ text }`, the text so far, then new text), `event: reset` (`{}`), `event: error` (`{ error, code }`), and `event: done` (CodeChatMessageReplyDto). The stream ends after `done` or `error`, or without either when the turn was stopped or dropped this page; read the thread then. */
|
|
29862
|
+
200: {
|
|
29863
|
+
headers: {
|
|
29864
|
+
[name: string]: unknown;
|
|
29865
|
+
};
|
|
29866
|
+
content: {
|
|
29867
|
+
"application/json": {
|
|
29868
|
+
running: boolean;
|
|
29869
|
+
};
|
|
29870
|
+
"text/event-stream": string;
|
|
29871
|
+
};
|
|
29872
|
+
};
|
|
29873
|
+
401: components["responses"]["Unauthorized"];
|
|
29874
|
+
/** @description Not found */
|
|
29875
|
+
404: {
|
|
29876
|
+
headers: {
|
|
29877
|
+
[name: string]: unknown;
|
|
29878
|
+
};
|
|
29879
|
+
content: {
|
|
29880
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
29881
|
+
};
|
|
29882
|
+
};
|
|
29883
|
+
};
|
|
29884
|
+
};
|
|
29885
|
+
cancelCodeChatTurn: {
|
|
29886
|
+
parameters: {
|
|
29887
|
+
query?: never;
|
|
29888
|
+
header?: never;
|
|
29889
|
+
path: {
|
|
29890
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
29891
|
+
threadId: string;
|
|
29892
|
+
};
|
|
29893
|
+
cookie?: never;
|
|
29894
|
+
};
|
|
29895
|
+
requestBody?: never;
|
|
29896
|
+
responses: {
|
|
29897
|
+
/** @description Stop was requested (or nothing was running) */
|
|
29898
|
+
200: {
|
|
29899
|
+
headers: {
|
|
29900
|
+
[name: string]: unknown;
|
|
29901
|
+
};
|
|
29902
|
+
content: {
|
|
29903
|
+
"application/json": {
|
|
29904
|
+
cancelled: boolean;
|
|
29905
|
+
};
|
|
29906
|
+
};
|
|
29907
|
+
};
|
|
29908
|
+
401: components["responses"]["Unauthorized"];
|
|
29909
|
+
/** @description Not found */
|
|
29910
|
+
404: {
|
|
29911
|
+
headers: {
|
|
29912
|
+
[name: string]: unknown;
|
|
29913
|
+
};
|
|
29914
|
+
content: {
|
|
29915
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
29916
|
+
};
|
|
29917
|
+
};
|
|
29918
|
+
};
|
|
29919
|
+
};
|
|
29920
|
+
postCodeChatMessageFeedback: {
|
|
29921
|
+
parameters: {
|
|
29922
|
+
query?: never;
|
|
29923
|
+
header?: never;
|
|
29924
|
+
path: {
|
|
29925
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
29926
|
+
threadId: string;
|
|
29927
|
+
messageId: string;
|
|
29928
|
+
};
|
|
29929
|
+
cookie?: never;
|
|
29930
|
+
};
|
|
29931
|
+
requestBody: {
|
|
29932
|
+
content: {
|
|
29933
|
+
"application/json": components["schemas"]["CodeChatAskFeedbackBodyDto"];
|
|
29934
|
+
};
|
|
29935
|
+
};
|
|
29936
|
+
responses: {
|
|
29937
|
+
/** @description The caller's feedback after the change (null when cleared) */
|
|
29938
|
+
200: {
|
|
29939
|
+
headers: {
|
|
29940
|
+
[name: string]: unknown;
|
|
29941
|
+
};
|
|
29942
|
+
content: {
|
|
29943
|
+
"application/json": components["schemas"]["CodeChatAskFeedbackResultDto"];
|
|
29944
|
+
};
|
|
29945
|
+
};
|
|
29946
|
+
/** @description Invalid rating or reason (`invalid_input`) */
|
|
29947
|
+
400: {
|
|
29948
|
+
headers: {
|
|
29949
|
+
[name: string]: unknown;
|
|
29950
|
+
};
|
|
29951
|
+
content: {
|
|
29952
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
29953
|
+
};
|
|
29954
|
+
};
|
|
29955
|
+
401: components["responses"]["Unauthorized"];
|
|
29956
|
+
/** @description Thread or assistant message not found for the caller (`message_not_found`) */
|
|
29957
|
+
404: {
|
|
29958
|
+
headers: {
|
|
29959
|
+
[name: string]: unknown;
|
|
29960
|
+
};
|
|
29961
|
+
content: {
|
|
29962
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
29963
|
+
};
|
|
29964
|
+
};
|
|
29965
|
+
};
|
|
29966
|
+
};
|
|
29967
|
+
getCodeChatFeedbackSettings: {
|
|
29968
|
+
parameters: {
|
|
29969
|
+
query?: never;
|
|
29970
|
+
header?: never;
|
|
29971
|
+
path: {
|
|
29972
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
29973
|
+
};
|
|
29974
|
+
cookie?: never;
|
|
29975
|
+
};
|
|
29976
|
+
requestBody?: never;
|
|
29977
|
+
responses: {
|
|
29978
|
+
/** @description Settings */
|
|
29979
|
+
200: {
|
|
29980
|
+
headers: {
|
|
29981
|
+
[name: string]: unknown;
|
|
29982
|
+
};
|
|
29983
|
+
content: {
|
|
29984
|
+
"application/json": components["schemas"]["CodeChatFeedbackSettingsDto"];
|
|
29985
|
+
};
|
|
29986
|
+
};
|
|
29987
|
+
401: components["responses"]["Unauthorized"];
|
|
29988
|
+
};
|
|
29989
|
+
};
|
|
29990
|
+
putCodeChatFeedbackSettings: {
|
|
29991
|
+
parameters: {
|
|
29992
|
+
query?: never;
|
|
29993
|
+
header?: never;
|
|
29994
|
+
path: {
|
|
29995
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
29996
|
+
};
|
|
29997
|
+
cookie?: never;
|
|
29998
|
+
};
|
|
29999
|
+
requestBody: {
|
|
30000
|
+
content: {
|
|
30001
|
+
"application/json": components["schemas"]["CodeChatFeedbackSettingsDto"];
|
|
30002
|
+
};
|
|
30003
|
+
};
|
|
30004
|
+
responses: {
|
|
30005
|
+
/** @description Settings after the change */
|
|
30006
|
+
200: {
|
|
30007
|
+
headers: {
|
|
30008
|
+
[name: string]: unknown;
|
|
30009
|
+
};
|
|
30010
|
+
content: {
|
|
30011
|
+
"application/json": components["schemas"]["CodeChatFeedbackSettingsDto"];
|
|
30012
|
+
};
|
|
30013
|
+
};
|
|
30014
|
+
/** @description captureQuestions must be a boolean (`invalid_input`) */
|
|
30015
|
+
400: {
|
|
30016
|
+
headers: {
|
|
30017
|
+
[name: string]: unknown;
|
|
30018
|
+
};
|
|
30019
|
+
content: {
|
|
30020
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
30021
|
+
};
|
|
30022
|
+
};
|
|
30023
|
+
401: components["responses"]["Unauthorized"];
|
|
30024
|
+
/** @description Workspace admin required */
|
|
30025
|
+
403: {
|
|
30026
|
+
headers: {
|
|
30027
|
+
[name: string]: unknown;
|
|
30028
|
+
};
|
|
30029
|
+
content: {
|
|
30030
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
30031
|
+
};
|
|
30032
|
+
};
|
|
29710
30033
|
};
|
|
29711
30034
|
};
|
|
29712
30035
|
listCodeChatWikiPages: {
|