@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.
@@ -4727,6 +4727,26 @@ export interface paths {
4727
4727
  patch?: never;
4728
4728
  trace?: never;
4729
4729
  };
4730
+ "/workspaces/{workspaceId}/code-chat/tools/ask": {
4731
+ parameters: {
4732
+ query?: never;
4733
+ header?: never;
4734
+ path?: never;
4735
+ cookie?: never;
4736
+ };
4737
+ get?: never;
4738
+ put?: never;
4739
+ /**
4740
+ * MCP/agent tool — grounded Ask answer with citations
4741
+ * @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`.
4742
+ */
4743
+ post: operations["codeChatAskTool"];
4744
+ delete?: never;
4745
+ options?: never;
4746
+ head?: never;
4747
+ patch?: never;
4748
+ trace?: never;
4749
+ };
4730
4750
  "/notifications/email/unsubscribe": {
4731
4751
  parameters: {
4732
4752
  query?: never;
@@ -12660,6 +12680,15 @@ export interface components {
12660
12680
  intent?: "inventory_apis" | "inventory_modules";
12661
12681
  /** @description Previously uploaded attachment ids to bind to this user turn */
12662
12682
  attachmentIds?: string[];
12683
+ /** @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"). */
12684
+ focusWikiSlug?: string;
12685
+ /**
12686
+ * Format: uuid
12687
+ * @description Repository of `focusWikiSlug` (slugs such as `overview` repeat across repos).
12688
+ */
12689
+ focusWikiRepoId?: string;
12690
+ /** @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. */
12691
+ stream?: boolean;
12663
12692
  };
12664
12693
  CodeChatUploadAttachmentBodyDto: {
12665
12694
  filename: string;
@@ -13374,6 +13403,26 @@ export interface components {
13374
13403
  maxTokensApprox?: number;
13375
13404
  repoIds?: string[];
13376
13405
  };
13406
+ CodeChatAskToolBodyDto: {
13407
+ question: string;
13408
+ repoIds?: string[];
13409
+ };
13410
+ CodeChatAskToolResponseDto: {
13411
+ /** @enum {string} */
13412
+ tool: "ask";
13413
+ note?: string;
13414
+ scanned?: {
13415
+ [key: string]: unknown;
13416
+ }[];
13417
+ result: {
13418
+ content: string;
13419
+ mode: string;
13420
+ intent?: string;
13421
+ citations: {
13422
+ [key: string]: unknown;
13423
+ }[];
13424
+ };
13425
+ };
13377
13426
  CodeChatContextPackDto: {
13378
13427
  /** Format: uuid */
13379
13428
  repoId?: string;
@@ -14849,6 +14898,8 @@ export type CodeChatVisualizeResultDto = components['schemas']['CodeChatVisualiz
14849
14898
  export type CodeChatCrossEdgesBodyDto = components['schemas']['CodeChatCrossEdgesBodyDto'];
14850
14899
  export type CodeChatCrossEdgesResultDto = components['schemas']['CodeChatCrossEdgesResultDto'];
14851
14900
  export type CodeChatContextPackBodyDto = components['schemas']['CodeChatContextPackBodyDto'];
14901
+ export type CodeChatAskToolBodyDto = components['schemas']['CodeChatAskToolBodyDto'];
14902
+ export type CodeChatAskToolResponseDto = components['schemas']['CodeChatAskToolResponseDto'];
14852
14903
  export type CodeChatContextPackDto = components['schemas']['CodeChatContextPackDto'];
14853
14904
  export type CodeInsightsMetricProvenance = components['schemas']['CodeInsightsMetricProvenance'];
14854
14905
  export type CodeInsightsMaintainabilityBand = components['schemas']['CodeInsightsMaintainabilityBand'];
@@ -26617,13 +26668,14 @@ export interface operations {
26617
26668
  };
26618
26669
  };
26619
26670
  responses: {
26620
- /** @description Assistant message */
26671
+ /** @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 }`). */
26621
26672
  200: {
26622
26673
  headers: {
26623
26674
  [name: string]: unknown;
26624
26675
  };
26625
26676
  content: {
26626
26677
  "application/json": components["schemas"]["CodeChatMessageReplyDto"];
26678
+ "text/event-stream": string;
26627
26679
  };
26628
26680
  };
26629
26681
  401: components["responses"]["Unauthorized"];
@@ -27701,6 +27753,47 @@ export interface operations {
27701
27753
  };
27702
27754
  };
27703
27755
  };
27756
+ codeChatAskTool: {
27757
+ parameters: {
27758
+ query?: never;
27759
+ header?: never;
27760
+ path: {
27761
+ workspaceId: components["parameters"]["WorkspaceId"];
27762
+ };
27763
+ cookie?: never;
27764
+ };
27765
+ requestBody: {
27766
+ content: {
27767
+ "application/json": components["schemas"]["CodeChatAskToolBodyDto"];
27768
+ };
27769
+ };
27770
+ responses: {
27771
+ /** @description Grounded answer */
27772
+ 200: {
27773
+ headers: {
27774
+ [name: string]: unknown;
27775
+ };
27776
+ content: {
27777
+ "application/json": components["schemas"]["CodeChatAskToolResponseDto"];
27778
+ };
27779
+ };
27780
+ /** @description Missing or oversized question */
27781
+ 400: {
27782
+ headers: {
27783
+ [name: string]: unknown;
27784
+ };
27785
+ content?: never;
27786
+ };
27787
+ 401: components["responses"]["Unauthorized"];
27788
+ /** @description Corpus not ready */
27789
+ 409: {
27790
+ headers: {
27791
+ [name: string]: unknown;
27792
+ };
27793
+ content?: never;
27794
+ };
27795
+ };
27796
+ };
27704
27797
  getNotificationEmailUnsubscribe: {
27705
27798
  parameters: {
27706
27799
  query: {