@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.
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.240.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}/...`.
|
|
@@ -34195,7 +34195,7 @@ components:
|
|
|
34195
34195
|
properties:
|
|
34196
34196
|
operation:
|
|
34197
34197
|
type: string
|
|
34198
|
-
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.
|
|
34198
|
+
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.
|
|
34199
34199
|
provider: { type: string }
|
|
34200
34200
|
model: { type: string, nullable: true }
|
|
34201
34201
|
inputTokens: { type: integer, minimum: 0 }
|
|
@@ -34213,6 +34213,21 @@ components:
|
|
|
34213
34213
|
estimatedCostUsd: { type: number }
|
|
34214
34214
|
invocationCount: { type: integer, minimum: 0 }
|
|
34215
34215
|
|
|
34216
|
+
CodeIntelligenceTokenUsageByChannelDto:
|
|
34217
|
+
type: object
|
|
34218
|
+
required: [channel, inputTokens, outputTokens, estimatedCostUsd, invocationCount]
|
|
34219
|
+
properties:
|
|
34220
|
+
channel:
|
|
34221
|
+
type: string
|
|
34222
|
+
enum: [web_chat, mcp, background, unattributed]
|
|
34223
|
+
description: >-
|
|
34224
|
+
Surface that spent the tokens: the web app, the hosted MCP endpoint, or a
|
|
34225
|
+
background index or wiki job. `unattributed` holds rows recorded before channels existed.
|
|
34226
|
+
inputTokens: { type: integer, minimum: 0 }
|
|
34227
|
+
outputTokens: { type: integer, minimum: 0 }
|
|
34228
|
+
estimatedCostUsd: { type: number }
|
|
34229
|
+
invocationCount: { type: integer, minimum: 0 }
|
|
34230
|
+
|
|
34216
34231
|
CodeIntelligenceTokenUsageByRepoDto:
|
|
34217
34232
|
type: object
|
|
34218
34233
|
required:
|
|
@@ -34288,6 +34303,11 @@ components:
|
|
|
34288
34303
|
byOperation:
|
|
34289
34304
|
type: array
|
|
34290
34305
|
items: { $ref: "#/components/schemas/CodeIntelligenceTokenUsageByOperationDto" }
|
|
34306
|
+
byChannel:
|
|
34307
|
+
type: array
|
|
34308
|
+
description: >-
|
|
34309
|
+
The same total as `byOperation`, split by the surface that spent it. Absent on older servers.
|
|
34310
|
+
items: { $ref: "#/components/schemas/CodeIntelligenceTokenUsageByChannelDto" }
|
|
34291
34311
|
byRepo:
|
|
34292
34312
|
type: array
|
|
34293
34313
|
description: >-
|
package/package.json
CHANGED
package/src/generated/openapi.ts
CHANGED
|
@@ -14498,7 +14498,7 @@ export interface components {
|
|
|
14498
14498
|
workspaceContext?: components["schemas"]["WorkspaceContextInsightsDto"];
|
|
14499
14499
|
};
|
|
14500
14500
|
CodeIntelligenceUsageDto: {
|
|
14501
|
-
/** @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. */
|
|
14501
|
+
/** @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. */
|
|
14502
14502
|
operation: string;
|
|
14503
14503
|
provider: string;
|
|
14504
14504
|
model?: string | null;
|
|
@@ -14514,6 +14514,17 @@ export interface components {
|
|
|
14514
14514
|
estimatedCostUsd: number;
|
|
14515
14515
|
invocationCount: number;
|
|
14516
14516
|
};
|
|
14517
|
+
CodeIntelligenceTokenUsageByChannelDto: {
|
|
14518
|
+
/**
|
|
14519
|
+
* @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.
|
|
14520
|
+
* @enum {string}
|
|
14521
|
+
*/
|
|
14522
|
+
channel: "web_chat" | "mcp" | "background" | "unattributed";
|
|
14523
|
+
inputTokens: number;
|
|
14524
|
+
outputTokens: number;
|
|
14525
|
+
estimatedCostUsd: number;
|
|
14526
|
+
invocationCount: number;
|
|
14527
|
+
};
|
|
14517
14528
|
CodeIntelligenceTokenUsageByRepoDto: {
|
|
14518
14529
|
/** Format: uuid */
|
|
14519
14530
|
repoId: string;
|
|
@@ -14550,6 +14561,8 @@ export interface components {
|
|
|
14550
14561
|
/** @description Rate basis used for the derived cost, for display in tooltips. */
|
|
14551
14562
|
costBasis?: string | null;
|
|
14552
14563
|
byOperation: components["schemas"]["CodeIntelligenceTokenUsageByOperationDto"][];
|
|
14564
|
+
/** @description The same total as `byOperation`, split by the surface that spent it. Absent on older servers. */
|
|
14565
|
+
byChannel?: components["schemas"]["CodeIntelligenceTokenUsageByChannelDto"][];
|
|
14553
14566
|
/** @description Per-repository split (wiki generation, conversations, outline). Calls that were not about a single repository use an empty repoId and a null repoName. */
|
|
14554
14567
|
byRepo: components["schemas"]["CodeIntelligenceTokenUsageByRepoDto"][];
|
|
14555
14568
|
};
|
|
@@ -16380,6 +16393,7 @@ export type WorkspaceKnowledgePackPageDto = components['schemas']['WorkspaceKnow
|
|
|
16380
16393
|
export type WorkspaceKnowledgePackDto = components['schemas']['WorkspaceKnowledgePackDto'];
|
|
16381
16394
|
export type CodeIntelligenceUsageDto = components['schemas']['CodeIntelligenceUsageDto'];
|
|
16382
16395
|
export type CodeIntelligenceTokenUsageByOperationDto = components['schemas']['CodeIntelligenceTokenUsageByOperationDto'];
|
|
16396
|
+
export type CodeIntelligenceTokenUsageByChannelDto = components['schemas']['CodeIntelligenceTokenUsageByChannelDto'];
|
|
16383
16397
|
export type CodeIntelligenceTokenUsageByRepoDto = components['schemas']['CodeIntelligenceTokenUsageByRepoDto'];
|
|
16384
16398
|
export type CodeIntelligenceTokenUsageRunDto = components['schemas']['CodeIntelligenceTokenUsageRunDto'];
|
|
16385
16399
|
export type CodeIntelligenceTokenUsageSummaryDto = components['schemas']['CodeIntelligenceTokenUsageSummaryDto'];
|