@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
package/src/generated/openapi.ts
CHANGED
|
@@ -4616,6 +4616,81 @@ export interface paths {
|
|
|
4616
4616
|
patch?: never;
|
|
4617
4617
|
trace?: never;
|
|
4618
4618
|
};
|
|
4619
|
+
"/workspaces/{workspaceId}/code-chat/threads/{threadId}/turn/stream": {
|
|
4620
|
+
parameters: {
|
|
4621
|
+
query?: never;
|
|
4622
|
+
header?: never;
|
|
4623
|
+
path?: never;
|
|
4624
|
+
cookie?: never;
|
|
4625
|
+
};
|
|
4626
|
+
/**
|
|
4627
|
+
* Reattach to the Ask that is running on a thread
|
|
4628
|
+
* @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.
|
|
4629
|
+
*/
|
|
4630
|
+
get: operations["streamCodeChatTurn"];
|
|
4631
|
+
put?: never;
|
|
4632
|
+
post?: never;
|
|
4633
|
+
delete?: never;
|
|
4634
|
+
options?: never;
|
|
4635
|
+
head?: never;
|
|
4636
|
+
patch?: never;
|
|
4637
|
+
trace?: never;
|
|
4638
|
+
};
|
|
4639
|
+
"/workspaces/{workspaceId}/code-chat/threads/{threadId}/cancel": {
|
|
4640
|
+
parameters: {
|
|
4641
|
+
query?: never;
|
|
4642
|
+
header?: never;
|
|
4643
|
+
path?: never;
|
|
4644
|
+
cookie?: never;
|
|
4645
|
+
};
|
|
4646
|
+
get?: never;
|
|
4647
|
+
put?: never;
|
|
4648
|
+
/**
|
|
4649
|
+
* Stop the Ask that is running on a thread
|
|
4650
|
+
* @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.
|
|
4651
|
+
*/
|
|
4652
|
+
post: operations["cancelCodeChatTurn"];
|
|
4653
|
+
delete?: never;
|
|
4654
|
+
options?: never;
|
|
4655
|
+
head?: never;
|
|
4656
|
+
patch?: never;
|
|
4657
|
+
trace?: never;
|
|
4658
|
+
};
|
|
4659
|
+
"/workspaces/{workspaceId}/code-chat/threads/{threadId}/messages/{messageId}/feedback": {
|
|
4660
|
+
parameters: {
|
|
4661
|
+
query?: never;
|
|
4662
|
+
header?: never;
|
|
4663
|
+
path?: never;
|
|
4664
|
+
cookie?: never;
|
|
4665
|
+
};
|
|
4666
|
+
get?: never;
|
|
4667
|
+
put?: never;
|
|
4668
|
+
/** Rate an assistant answer (thumbs up or down, with a reason) */
|
|
4669
|
+
post: operations["postCodeChatMessageFeedback"];
|
|
4670
|
+
delete?: never;
|
|
4671
|
+
options?: never;
|
|
4672
|
+
head?: never;
|
|
4673
|
+
patch?: never;
|
|
4674
|
+
trace?: never;
|
|
4675
|
+
};
|
|
4676
|
+
"/workspaces/{workspaceId}/code-chat/feedback-settings": {
|
|
4677
|
+
parameters: {
|
|
4678
|
+
query?: never;
|
|
4679
|
+
header?: never;
|
|
4680
|
+
path?: never;
|
|
4681
|
+
cookie?: never;
|
|
4682
|
+
};
|
|
4683
|
+
/** Whether thumbs-down keeps the question for eval */
|
|
4684
|
+
get: operations["getCodeChatFeedbackSettings"];
|
|
4685
|
+
/** Turn question capture on or off (workspace admin) */
|
|
4686
|
+
put: operations["putCodeChatFeedbackSettings"];
|
|
4687
|
+
post?: never;
|
|
4688
|
+
delete?: never;
|
|
4689
|
+
options?: never;
|
|
4690
|
+
head?: never;
|
|
4691
|
+
patch?: never;
|
|
4692
|
+
trace?: never;
|
|
4693
|
+
};
|
|
4619
4694
|
"/workspaces/{workspaceId}/code-chat/indexes/{indexId}/wiki": {
|
|
4620
4695
|
parameters: {
|
|
4621
4696
|
query?: never;
|
|
@@ -14006,6 +14081,16 @@ export interface components {
|
|
|
14006
14081
|
ruleCards?: components["schemas"]["CodeChatIndexRuleCardsDto"] | null;
|
|
14007
14082
|
/** @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). */
|
|
14008
14083
|
archDoc?: components["schemas"]["CodeChatIndexArchDocDto"] | null;
|
|
14084
|
+
/** @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. */
|
|
14085
|
+
scanCounts?: components["schemas"]["CodeChatIndexScanCountsDto"] | null;
|
|
14086
|
+
};
|
|
14087
|
+
CodeChatIndexScanCountsDto: {
|
|
14088
|
+
/** @description Secret values replaced in excerpts on the last scan. */
|
|
14089
|
+
secretsRedacted: number;
|
|
14090
|
+
/** @description Files left unread because their name says they hold secrets. */
|
|
14091
|
+
secretFilesSkipped: number;
|
|
14092
|
+
/** @description Lockfiles, bundles, source maps and generated files skipped on the last scan. */
|
|
14093
|
+
lowSignalFilesSkipped: number;
|
|
14009
14094
|
};
|
|
14010
14095
|
CodeChatIndexRuleCardsDto: {
|
|
14011
14096
|
/**
|
|
@@ -14214,6 +14299,43 @@ export interface components {
|
|
|
14214
14299
|
attachments?: components["schemas"]["CodeChatAttachmentMetaDto"][];
|
|
14215
14300
|
/** @description Hydrated from `tai_workspace_code_intelligence_token_usage` on GET thread detail (assistant turns). Omitted when no ledger rows exist for the message. */
|
|
14216
14301
|
usage?: components["schemas"]["CodeIntelligenceUsageDto"];
|
|
14302
|
+
/**
|
|
14303
|
+
* @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.
|
|
14304
|
+
* @enum {string}
|
|
14305
|
+
*/
|
|
14306
|
+
verdict?: "answered" | "caveat" | "clarifying" | "unconfirmed" | "retrieval_only" | "failed" | "timed_out";
|
|
14307
|
+
/** @description Short code behind a `caveat` or `clarifying` turn (for example `ask-first`, `open-decisions`, `plan-only`). Null otherwise. */
|
|
14308
|
+
abstainReason?: string | null;
|
|
14309
|
+
/** @description The caller's own thumbs on this answer. Omitted when none. */
|
|
14310
|
+
feedback?: components["schemas"]["CodeChatAskFeedbackDto"];
|
|
14311
|
+
};
|
|
14312
|
+
CodeChatAskFeedbackDto: {
|
|
14313
|
+
/** @enum {string} */
|
|
14314
|
+
rating: "up" | "down";
|
|
14315
|
+
/**
|
|
14316
|
+
* @description Why, for a thumbs-down. Null for a thumbs-up or when none was given.
|
|
14317
|
+
* @enum {string|null}
|
|
14318
|
+
*/
|
|
14319
|
+
reason: "wrong" | "incomplete" | "not_grounded" | "too_slow" | "unclear" | "other" | null;
|
|
14320
|
+
};
|
|
14321
|
+
CodeChatAskFeedbackBodyDto: {
|
|
14322
|
+
/**
|
|
14323
|
+
* @description `null` clears the caller's feedback on this answer.
|
|
14324
|
+
* @enum {string|null}
|
|
14325
|
+
*/
|
|
14326
|
+
rating: "up" | "down" | null;
|
|
14327
|
+
/**
|
|
14328
|
+
* @description Used for a thumbs-down only; dropped for a thumbs-up.
|
|
14329
|
+
* @enum {string|null}
|
|
14330
|
+
*/
|
|
14331
|
+
reason?: "wrong" | "incomplete" | "not_grounded" | "too_slow" | "unclear" | "other" | null;
|
|
14332
|
+
};
|
|
14333
|
+
CodeChatAskFeedbackResultDto: {
|
|
14334
|
+
feedback: components["schemas"]["CodeChatAskFeedbackDto"] | null;
|
|
14335
|
+
};
|
|
14336
|
+
CodeChatFeedbackSettingsDto: {
|
|
14337
|
+
/** @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. */
|
|
14338
|
+
captureQuestions: boolean;
|
|
14217
14339
|
};
|
|
14218
14340
|
CodeChatThreadDetailDto: components["schemas"]["CodeChatThreadDto"] & {
|
|
14219
14341
|
messages: components["schemas"]["CodeChatMessageDto"][];
|
|
@@ -16661,6 +16783,7 @@ export type InsightsRecommendationsPageBundleResponse = components['schemas']['I
|
|
|
16661
16783
|
export type CodeChatIndexStatus = components['schemas']['CodeChatIndexStatus'];
|
|
16662
16784
|
export type CodeChatIndexer = components['schemas']['CodeChatIndexer'];
|
|
16663
16785
|
export type CodeChatIndexDto = components['schemas']['CodeChatIndexDto'];
|
|
16786
|
+
export type CodeChatIndexScanCountsDto = components['schemas']['CodeChatIndexScanCountsDto'];
|
|
16664
16787
|
export type CodeChatIndexRuleCardsDto = components['schemas']['CodeChatIndexRuleCardsDto'];
|
|
16665
16788
|
export type CodeChatIndexArchDocDto = components['schemas']['CodeChatIndexArchDocDto'];
|
|
16666
16789
|
export type CodeChatArchDocViewDto = components['schemas']['CodeChatArchDocViewDto'];
|
|
@@ -16678,6 +16801,10 @@ export type CodeChatThreadListDto = components['schemas']['CodeChatThreadListDto
|
|
|
16678
16801
|
export type CodeChatCreateThreadBodyDto = components['schemas']['CodeChatCreateThreadBodyDto'];
|
|
16679
16802
|
export type CodeChatCitationDto = components['schemas']['CodeChatCitationDto'];
|
|
16680
16803
|
export type CodeChatMessageDto = components['schemas']['CodeChatMessageDto'];
|
|
16804
|
+
export type CodeChatAskFeedbackDto = components['schemas']['CodeChatAskFeedbackDto'];
|
|
16805
|
+
export type CodeChatAskFeedbackBodyDto = components['schemas']['CodeChatAskFeedbackBodyDto'];
|
|
16806
|
+
export type CodeChatAskFeedbackResultDto = components['schemas']['CodeChatAskFeedbackResultDto'];
|
|
16807
|
+
export type CodeChatFeedbackSettingsDto = components['schemas']['CodeChatFeedbackSettingsDto'];
|
|
16681
16808
|
export type CodeChatThreadDetailDto = components['schemas']['CodeChatThreadDetailDto'];
|
|
16682
16809
|
export type CodeChatPostMessageBodyDto = components['schemas']['CodeChatPostMessageBodyDto'];
|
|
16683
16810
|
export type CodeChatUploadAttachmentBodyDto = components['schemas']['CodeChatUploadAttachmentBodyDto'];
|
|
@@ -29690,7 +29817,7 @@ export interface operations {
|
|
|
29690
29817
|
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
29691
29818
|
};
|
|
29692
29819
|
};
|
|
29693
|
-
/** @description Chat not ready, no ready corpus in thread scope,
|
|
29820
|
+
/** @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`). */
|
|
29694
29821
|
409: {
|
|
29695
29822
|
headers: {
|
|
29696
29823
|
[name: string]: unknown;
|
|
@@ -29708,6 +29835,202 @@ export interface operations {
|
|
|
29708
29835
|
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
29709
29836
|
};
|
|
29710
29837
|
};
|
|
29838
|
+
/** @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. */
|
|
29839
|
+
429: {
|
|
29840
|
+
headers: {
|
|
29841
|
+
"Retry-After"?: number;
|
|
29842
|
+
[name: string]: unknown;
|
|
29843
|
+
};
|
|
29844
|
+
content: {
|
|
29845
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
29846
|
+
};
|
|
29847
|
+
};
|
|
29848
|
+
};
|
|
29849
|
+
};
|
|
29850
|
+
streamCodeChatTurn: {
|
|
29851
|
+
parameters: {
|
|
29852
|
+
query?: never;
|
|
29853
|
+
header?: never;
|
|
29854
|
+
path: {
|
|
29855
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
29856
|
+
threadId: string;
|
|
29857
|
+
};
|
|
29858
|
+
cookie?: never;
|
|
29859
|
+
};
|
|
29860
|
+
requestBody?: never;
|
|
29861
|
+
responses: {
|
|
29862
|
+
/** @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. */
|
|
29863
|
+
200: {
|
|
29864
|
+
headers: {
|
|
29865
|
+
[name: string]: unknown;
|
|
29866
|
+
};
|
|
29867
|
+
content: {
|
|
29868
|
+
"application/json": {
|
|
29869
|
+
running: boolean;
|
|
29870
|
+
};
|
|
29871
|
+
"text/event-stream": string;
|
|
29872
|
+
};
|
|
29873
|
+
};
|
|
29874
|
+
401: components["responses"]["Unauthorized"];
|
|
29875
|
+
/** @description Not found */
|
|
29876
|
+
404: {
|
|
29877
|
+
headers: {
|
|
29878
|
+
[name: string]: unknown;
|
|
29879
|
+
};
|
|
29880
|
+
content: {
|
|
29881
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
29882
|
+
};
|
|
29883
|
+
};
|
|
29884
|
+
};
|
|
29885
|
+
};
|
|
29886
|
+
cancelCodeChatTurn: {
|
|
29887
|
+
parameters: {
|
|
29888
|
+
query?: never;
|
|
29889
|
+
header?: never;
|
|
29890
|
+
path: {
|
|
29891
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
29892
|
+
threadId: string;
|
|
29893
|
+
};
|
|
29894
|
+
cookie?: never;
|
|
29895
|
+
};
|
|
29896
|
+
requestBody?: never;
|
|
29897
|
+
responses: {
|
|
29898
|
+
/** @description Stop was requested (or nothing was running) */
|
|
29899
|
+
200: {
|
|
29900
|
+
headers: {
|
|
29901
|
+
[name: string]: unknown;
|
|
29902
|
+
};
|
|
29903
|
+
content: {
|
|
29904
|
+
"application/json": {
|
|
29905
|
+
cancelled: boolean;
|
|
29906
|
+
};
|
|
29907
|
+
};
|
|
29908
|
+
};
|
|
29909
|
+
401: components["responses"]["Unauthorized"];
|
|
29910
|
+
/** @description Not found */
|
|
29911
|
+
404: {
|
|
29912
|
+
headers: {
|
|
29913
|
+
[name: string]: unknown;
|
|
29914
|
+
};
|
|
29915
|
+
content: {
|
|
29916
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
29917
|
+
};
|
|
29918
|
+
};
|
|
29919
|
+
};
|
|
29920
|
+
};
|
|
29921
|
+
postCodeChatMessageFeedback: {
|
|
29922
|
+
parameters: {
|
|
29923
|
+
query?: never;
|
|
29924
|
+
header?: never;
|
|
29925
|
+
path: {
|
|
29926
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
29927
|
+
threadId: string;
|
|
29928
|
+
messageId: string;
|
|
29929
|
+
};
|
|
29930
|
+
cookie?: never;
|
|
29931
|
+
};
|
|
29932
|
+
requestBody: {
|
|
29933
|
+
content: {
|
|
29934
|
+
"application/json": components["schemas"]["CodeChatAskFeedbackBodyDto"];
|
|
29935
|
+
};
|
|
29936
|
+
};
|
|
29937
|
+
responses: {
|
|
29938
|
+
/** @description The caller's feedback after the change (null when cleared) */
|
|
29939
|
+
200: {
|
|
29940
|
+
headers: {
|
|
29941
|
+
[name: string]: unknown;
|
|
29942
|
+
};
|
|
29943
|
+
content: {
|
|
29944
|
+
"application/json": components["schemas"]["CodeChatAskFeedbackResultDto"];
|
|
29945
|
+
};
|
|
29946
|
+
};
|
|
29947
|
+
/** @description Invalid rating or reason (`invalid_input`) */
|
|
29948
|
+
400: {
|
|
29949
|
+
headers: {
|
|
29950
|
+
[name: string]: unknown;
|
|
29951
|
+
};
|
|
29952
|
+
content: {
|
|
29953
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
29954
|
+
};
|
|
29955
|
+
};
|
|
29956
|
+
401: components["responses"]["Unauthorized"];
|
|
29957
|
+
/** @description Thread or assistant message not found for the caller (`message_not_found`) */
|
|
29958
|
+
404: {
|
|
29959
|
+
headers: {
|
|
29960
|
+
[name: string]: unknown;
|
|
29961
|
+
};
|
|
29962
|
+
content: {
|
|
29963
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
29964
|
+
};
|
|
29965
|
+
};
|
|
29966
|
+
};
|
|
29967
|
+
};
|
|
29968
|
+
getCodeChatFeedbackSettings: {
|
|
29969
|
+
parameters: {
|
|
29970
|
+
query?: never;
|
|
29971
|
+
header?: never;
|
|
29972
|
+
path: {
|
|
29973
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
29974
|
+
};
|
|
29975
|
+
cookie?: never;
|
|
29976
|
+
};
|
|
29977
|
+
requestBody?: never;
|
|
29978
|
+
responses: {
|
|
29979
|
+
/** @description Settings */
|
|
29980
|
+
200: {
|
|
29981
|
+
headers: {
|
|
29982
|
+
[name: string]: unknown;
|
|
29983
|
+
};
|
|
29984
|
+
content: {
|
|
29985
|
+
"application/json": components["schemas"]["CodeChatFeedbackSettingsDto"];
|
|
29986
|
+
};
|
|
29987
|
+
};
|
|
29988
|
+
401: components["responses"]["Unauthorized"];
|
|
29989
|
+
};
|
|
29990
|
+
};
|
|
29991
|
+
putCodeChatFeedbackSettings: {
|
|
29992
|
+
parameters: {
|
|
29993
|
+
query?: never;
|
|
29994
|
+
header?: never;
|
|
29995
|
+
path: {
|
|
29996
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
29997
|
+
};
|
|
29998
|
+
cookie?: never;
|
|
29999
|
+
};
|
|
30000
|
+
requestBody: {
|
|
30001
|
+
content: {
|
|
30002
|
+
"application/json": components["schemas"]["CodeChatFeedbackSettingsDto"];
|
|
30003
|
+
};
|
|
30004
|
+
};
|
|
30005
|
+
responses: {
|
|
30006
|
+
/** @description Settings after the change */
|
|
30007
|
+
200: {
|
|
30008
|
+
headers: {
|
|
30009
|
+
[name: string]: unknown;
|
|
30010
|
+
};
|
|
30011
|
+
content: {
|
|
30012
|
+
"application/json": components["schemas"]["CodeChatFeedbackSettingsDto"];
|
|
30013
|
+
};
|
|
30014
|
+
};
|
|
30015
|
+
/** @description captureQuestions must be a boolean (`invalid_input`) */
|
|
30016
|
+
400: {
|
|
30017
|
+
headers: {
|
|
30018
|
+
[name: string]: unknown;
|
|
30019
|
+
};
|
|
30020
|
+
content: {
|
|
30021
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
30022
|
+
};
|
|
30023
|
+
};
|
|
30024
|
+
401: components["responses"]["Unauthorized"];
|
|
30025
|
+
/** @description Workspace admin required */
|
|
30026
|
+
403: {
|
|
30027
|
+
headers: {
|
|
30028
|
+
[name: string]: unknown;
|
|
30029
|
+
};
|
|
30030
|
+
content: {
|
|
30031
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
30032
|
+
};
|
|
30033
|
+
};
|
|
29711
30034
|
};
|
|
29712
30035
|
};
|
|
29713
30036
|
listCodeChatWikiPages: {
|