@thinkai/tai-api-contract 2.210.0 → 2.210.1

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.
@@ -1,7 +1,7 @@
1
1
  openapi: 3.0.3
2
2
  info:
3
3
  title: ThinkAI API
4
- version: 2.210.0
4
+ version: 2.210.1
5
5
  description: >
6
6
  Contract surface for the AI Driven SDLC backend used by ThinkAI.
7
7
  Workspace-scoped routes use `/workspaces/{workspaceId}/...`.
@@ -29587,7 +29587,7 @@ components:
29587
29587
  properties:
29588
29588
  operation:
29589
29589
  type: string
29590
- description: Ledger operation key (code_chat, prd_generate, workspace_kb, wiki_json_outline, wiki_enrich, …)
29590
+ 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.
29591
29591
  provider: { type: string }
29592
29592
  model: { type: string, nullable: true }
29593
29593
  inputTokens: { type: integer, minimum: 0 }
@@ -29624,6 +29624,33 @@ components:
29624
29624
  byOperation:
29625
29625
  type: array
29626
29626
  items: { $ref: "#/components/schemas/CodeIntelligenceTokenUsageByOperationDto" }
29627
+ runs:
29628
+ type: array
29629
+ description: >-
29630
+ Knowledge jobs (wiki scans and similar) whose tokens make up this repository
29631
+ total. Newest first. Absent on older servers.
29632
+ items: { $ref: "#/components/schemas/CodeIntelligenceTokenUsageRunDto" }
29633
+
29634
+ CodeIntelligenceTokenUsageRunDto:
29635
+ type: object
29636
+ required:
29637
+ - operation
29638
+ - inputTokens
29639
+ - outputTokens
29640
+ - estimatedCostUsd
29641
+ - invocationCount
29642
+ properties:
29643
+ jobId: { type: string, format: uuid, nullable: true }
29644
+ startedAt: { type: string, format: date-time, nullable: true }
29645
+ status:
29646
+ type: string
29647
+ nullable: true
29648
+ description: Knowledge job status (queued, running, completed, failed).
29649
+ operation: { type: string }
29650
+ inputTokens: { type: integer, minimum: 0 }
29651
+ outputTokens: { type: integer, minimum: 0 }
29652
+ estimatedCostUsd: { type: number }
29653
+ invocationCount: { type: integer, minimum: 0 }
29627
29654
 
29628
29655
  CodeIntelligenceTokenUsageSummaryDto:
29629
29656
  type: object
@@ -29656,8 +29683,8 @@ components:
29656
29683
  byRepo:
29657
29684
  type: array
29658
29685
  description: >-
29659
- Per-repository split (wiki generation, conversations, outline). Only rows with
29660
- repository attribution appear here; workspace-wide operations stay in totals.
29686
+ Per-repository split (wiki generation, conversations, outline). Calls that were
29687
+ not about a single repository use an empty repoId and a null repoName.
29661
29688
  items: { $ref: "#/components/schemas/CodeIntelligenceTokenUsageByRepoDto" }
29662
29689
 
29663
29690
  CodeChatWikiPageListDto:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.210.0",
3
+ "version": "2.210.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -12470,7 +12470,7 @@ export interface components {
12470
12470
  workspaceContext?: components["schemas"]["WorkspaceContextInsightsDto"];
12471
12471
  };
12472
12472
  CodeIntelligenceUsageDto: {
12473
- /** @description Ledger operation key (code_chat, prd_generate, workspace_kb, wiki_json_outline, wiki_enrich, …) */
12473
+ /** @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. */
12474
12474
  operation: string;
12475
12475
  provider: string;
12476
12476
  model?: string | null;
@@ -12495,6 +12495,21 @@ export interface components {
12495
12495
  estimatedCostUsd: number;
12496
12496
  invocationCount: number;
12497
12497
  byOperation: components["schemas"]["CodeIntelligenceTokenUsageByOperationDto"][];
12498
+ /** @description Knowledge jobs (wiki scans and similar) whose tokens make up this repository total. Newest first. Absent on older servers. */
12499
+ runs?: components["schemas"]["CodeIntelligenceTokenUsageRunDto"][];
12500
+ };
12501
+ CodeIntelligenceTokenUsageRunDto: {
12502
+ /** Format: uuid */
12503
+ jobId?: string | null;
12504
+ /** Format: date-time */
12505
+ startedAt?: string | null;
12506
+ /** @description Knowledge job status (queued, running, completed, failed). */
12507
+ status?: string | null;
12508
+ operation: string;
12509
+ inputTokens: number;
12510
+ outputTokens: number;
12511
+ estimatedCostUsd: number;
12512
+ invocationCount: number;
12498
12513
  };
12499
12514
  CodeIntelligenceTokenUsageSummaryDto: {
12500
12515
  days: number;
@@ -12507,7 +12522,7 @@ export interface components {
12507
12522
  /** @description Rate basis used for the derived cost, for display in tooltips. */
12508
12523
  costBasis?: string | null;
12509
12524
  byOperation: components["schemas"]["CodeIntelligenceTokenUsageByOperationDto"][];
12510
- /** @description Per-repository split (wiki generation, conversations, outline). Only rows with repository attribution appear here; workspace-wide operations stay in totals. */
12525
+ /** @description Per-repository split (wiki generation, conversations, outline). Calls that were not about a single repository use an empty repoId and a null repoName. */
12511
12526
  byRepo: components["schemas"]["CodeIntelligenceTokenUsageByRepoDto"][];
12512
12527
  };
12513
12528
  CodeChatWikiPageListDto: {
@@ -14195,6 +14210,7 @@ export type WorkspaceKnowledgePackDto = components['schemas']['WorkspaceKnowledg
14195
14210
  export type CodeIntelligenceUsageDto = components['schemas']['CodeIntelligenceUsageDto'];
14196
14211
  export type CodeIntelligenceTokenUsageByOperationDto = components['schemas']['CodeIntelligenceTokenUsageByOperationDto'];
14197
14212
  export type CodeIntelligenceTokenUsageByRepoDto = components['schemas']['CodeIntelligenceTokenUsageByRepoDto'];
14213
+ export type CodeIntelligenceTokenUsageRunDto = components['schemas']['CodeIntelligenceTokenUsageRunDto'];
14198
14214
  export type CodeIntelligenceTokenUsageSummaryDto = components['schemas']['CodeIntelligenceTokenUsageSummaryDto'];
14199
14215
  export type CodeChatWikiPageListDto = components['schemas']['CodeChatWikiPageListDto'];
14200
14216
  export type CodeChatWikiOkfExportDto = components['schemas']['CodeChatWikiOkfExportDto'];