@thinkai/tai-api-contract 2.239.0 → 2.240.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.
@@ -14497,7 +14497,7 @@ export interface components {
14497
14497
  workspaceContext?: components["schemas"]["WorkspaceContextInsightsDto"];
14498
14498
  };
14499
14499
  CodeIntelligenceUsageDto: {
14500
- /** @description Ledger operation key (code_chat, prd_generate, workspace_kb, wiki, …). Older rows may still say wiki_enrich or wiki_json_outline; clients collapse those into Wiki. */
14500
+ /** @description Ledger operation key (code_chat, mcp_ask, workspace_wiki, prd_generate, workspace_kb, wiki, …). Older rows may still say wiki_enrich or wiki_json_outline; clients collapse those into Wiki. */
14501
14501
  operation: string;
14502
14502
  provider: string;
14503
14503
  model?: string | null;
@@ -14513,6 +14513,17 @@ export interface components {
14513
14513
  estimatedCostUsd: number;
14514
14514
  invocationCount: number;
14515
14515
  };
14516
+ CodeIntelligenceTokenUsageByChannelDto: {
14517
+ /**
14518
+ * @description Surface that spent the tokens: the web app, the hosted MCP endpoint, or a background index or wiki job. `unattributed` holds rows recorded before channels existed.
14519
+ * @enum {string}
14520
+ */
14521
+ channel: "web_chat" | "mcp" | "background" | "unattributed";
14522
+ inputTokens: number;
14523
+ outputTokens: number;
14524
+ estimatedCostUsd: number;
14525
+ invocationCount: number;
14526
+ };
14516
14527
  CodeIntelligenceTokenUsageByRepoDto: {
14517
14528
  /** Format: uuid */
14518
14529
  repoId: string;
@@ -14549,6 +14560,8 @@ export interface components {
14549
14560
  /** @description Rate basis used for the derived cost, for display in tooltips. */
14550
14561
  costBasis?: string | null;
14551
14562
  byOperation: components["schemas"]["CodeIntelligenceTokenUsageByOperationDto"][];
14563
+ /** @description The same total as `byOperation`, split by the surface that spent it. Absent on older servers. */
14564
+ byChannel?: components["schemas"]["CodeIntelligenceTokenUsageByChannelDto"][];
14552
14565
  /** @description Per-repository split (wiki generation, conversations, outline). Calls that were not about a single repository use an empty repoId and a null repoName. */
14553
14566
  byRepo: components["schemas"]["CodeIntelligenceTokenUsageByRepoDto"][];
14554
14567
  };
@@ -16379,6 +16392,7 @@ export type WorkspaceKnowledgePackPageDto = components['schemas']['WorkspaceKnow
16379
16392
  export type WorkspaceKnowledgePackDto = components['schemas']['WorkspaceKnowledgePackDto'];
16380
16393
  export type CodeIntelligenceUsageDto = components['schemas']['CodeIntelligenceUsageDto'];
16381
16394
  export type CodeIntelligenceTokenUsageByOperationDto = components['schemas']['CodeIntelligenceTokenUsageByOperationDto'];
16395
+ export type CodeIntelligenceTokenUsageByChannelDto = components['schemas']['CodeIntelligenceTokenUsageByChannelDto'];
16382
16396
  export type CodeIntelligenceTokenUsageByRepoDto = components['schemas']['CodeIntelligenceTokenUsageByRepoDto'];
16383
16397
  export type CodeIntelligenceTokenUsageRunDto = components['schemas']['CodeIntelligenceTokenUsageRunDto'];
16384
16398
  export type CodeIntelligenceTokenUsageSummaryDto = components['schemas']['CodeIntelligenceTokenUsageSummaryDto'];