@thinkai/tai-api-contract 2.130.0 → 2.132.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.
@@ -1543,7 +1543,7 @@ export interface paths {
1543
1543
  };
1544
1544
  /**
1545
1545
  * GitHub App installation status for workspace
1546
- * @description Returns whether a GitHub App installation is linked and cached repo metadata. When no installation exists, returns 200 with `installed: false` (never 404 for missing install). Use `refresh=true` to bypass cache and re-list repositories from GitHub, and to run inline productivity ingest (`on_demand`) for the current UTC week when backfill phase is `complete`.
1546
+ * @description Returns whether a GitHub App installation is linked and cached repo metadata. When no installation exists, returns 200 with `installed: false` (never 404 for missing install). Use `refresh=true` to bypass cache and re-list repositories from GitHub, and to run inline productivity ingest (`on_demand`) for the current UTC week.
1547
1547
  */
1548
1548
  get: operations["getWorkspaceGithubInstallationStatus"];
1549
1549
  put?: never;
@@ -3381,6 +3381,77 @@ export interface paths {
3381
3381
  patch?: never;
3382
3382
  trace?: never;
3383
3383
  };
3384
+ "/workspaces/{workspaceId}/code-chat/indexes/{indexId}/origin-prompt": {
3385
+ parameters: {
3386
+ query?: never;
3387
+ header?: never;
3388
+ path?: never;
3389
+ cookie?: never;
3390
+ };
3391
+ /** Origin prompt and symbol-index status for one repository index */
3392
+ get: operations["getCodeChatOriginPrompt"];
3393
+ put?: never;
3394
+ post?: never;
3395
+ delete?: never;
3396
+ options?: never;
3397
+ head?: never;
3398
+ patch?: never;
3399
+ trace?: never;
3400
+ };
3401
+ "/workspaces/{workspaceId}/code-chat/indexes/{indexId}/context-pack": {
3402
+ parameters: {
3403
+ query?: never;
3404
+ header?: never;
3405
+ path?: never;
3406
+ cookie?: never;
3407
+ };
3408
+ /**
3409
+ * Reader context pack for one repository index
3410
+ * @description Reader export. The agent tool remains POST …/code-chat/tools/get_context_pack.
3411
+ */
3412
+ get: operations["getCodeChatRepoContextPack"];
3413
+ put?: never;
3414
+ post?: never;
3415
+ delete?: never;
3416
+ options?: never;
3417
+ head?: never;
3418
+ patch?: never;
3419
+ trace?: never;
3420
+ };
3421
+ "/workspaces/{workspaceId}/code-chat/symbols/search": {
3422
+ parameters: {
3423
+ query?: never;
3424
+ header?: never;
3425
+ path?: never;
3426
+ cookie?: never;
3427
+ };
3428
+ /** Search stored symbols in the workspace */
3429
+ get: operations["searchCodeChatSymbols"];
3430
+ put?: never;
3431
+ post?: never;
3432
+ delete?: never;
3433
+ options?: never;
3434
+ head?: never;
3435
+ patch?: never;
3436
+ trace?: never;
3437
+ };
3438
+ "/workspaces/{workspaceId}/code-chat/symbols/refs": {
3439
+ parameters: {
3440
+ query?: never;
3441
+ header?: never;
3442
+ path?: never;
3443
+ cookie?: never;
3444
+ };
3445
+ /** List references for a stored symbol */
3446
+ get: operations["listCodeChatSymbolRefs"];
3447
+ put?: never;
3448
+ post?: never;
3449
+ delete?: never;
3450
+ options?: never;
3451
+ head?: never;
3452
+ patch?: never;
3453
+ trace?: never;
3454
+ };
3384
3455
  "/workspaces/{workspaceId}/code-chat/analyze/symbols": {
3385
3456
  parameters: {
3386
3457
  query?: never;
@@ -4052,7 +4123,7 @@ export interface paths {
4052
4123
  };
4053
4124
  /**
4054
4125
  * Ingest / backfill data coverage
4055
- * @description Read-only snapshot of historical ingest coverage for connected pipelines (productivity GitHub, AI usage/spend per provider, SDLC components, monitoring, HRIS). Aggregates existing watermarks and stored day/week evidence — does not trigger ingest or refresh. Requires workspace membership. Disconnected sources are omitted.
4126
+ * @description Read-only snapshot of historical ingest coverage for connected pipelines (productivity GitHub, AI usage/spend per provider, SDLC components, monitoring, HRIS). Aggregates existing watermarks and stored day/week evidence — does not trigger ingest or refresh. Productivity detail may include `selfHeal` (latest depth scan and week reconcile) read from stored activity rows; this GET does not run a scan. `selfHeal` is null when neither event exists. Requires workspace membership. Disconnected sources are omitted.
4056
4127
  */
4057
4128
  get: operations["getWorkspaceIngestCoverage"];
4058
4129
  put?: never;
@@ -7988,6 +8059,26 @@ export interface components {
7988
8059
  gaps?: components["schemas"]["IngestCoverageGapDto"][];
7989
8060
  lastErrorKind?: string | null;
7990
8061
  };
8062
+ /** @description Latest depth scan read from stored activity. `capturePercent` is the minimum existing capture ratio over that scan's repo checks with a GitHub merge count, or null when none qualify. */
8063
+ IngestCoverageProductivityDepthScanDto: {
8064
+ /** Format: date-time */
8065
+ completedAt: string | null;
8066
+ reposScanned: number;
8067
+ /** @description Metadata underIngestedCount from the completed depth-scan event. */
8068
+ gapCount: number;
8069
+ capturePercent: number | null;
8070
+ weeksQueued: number;
8071
+ };
8072
+ IngestCoverageProductivityWeekReconcileDto: {
8073
+ /** Format: date-time */
8074
+ completedAt: string | null;
8075
+ weeksChecked: number;
8076
+ weeksQueued: number;
8077
+ };
8078
+ IngestCoverageProductivitySelfHealDto: {
8079
+ depthScan: components["schemas"]["IngestCoverageProductivityDepthScanDto"];
8080
+ weekReconcile: components["schemas"]["IngestCoverageProductivityWeekReconcileDto"];
8081
+ };
7991
8082
  IngestCoverageProductivityDetailDto: {
7992
8083
  /** @enum {string|null} */
7993
8084
  phase?: "recent" | "historical" | "complete" | null;
@@ -7997,6 +8088,8 @@ export interface components {
7997
8088
  failedRepoCount?: number;
7998
8089
  coveragePercent?: number | null;
7999
8090
  repos?: components["schemas"]["IngestCoverageProductivityRepoDto"][];
8091
+ /** @description Latest depth-scan and week-reconcile summary from stored activity rows. Null when neither event exists. The coverage GET does not run a scan. */
8092
+ selfHeal?: components["schemas"]["IngestCoverageProductivitySelfHealDto"] | null;
8000
8093
  };
8001
8094
  IngestCoverageFactFamilyDto: {
8002
8095
  /** @enum {string} */
@@ -9167,6 +9260,16 @@ export interface components {
9167
9260
  kind: string;
9168
9261
  summary?: string;
9169
9262
  startLine?: number;
9263
+ label?: string;
9264
+ symbol?: string;
9265
+ role?: string;
9266
+ /** @enum {string} */
9267
+ precision?: "scip" | "structural";
9268
+ language?: string;
9269
+ /** @enum {string} */
9270
+ source?: "scip" | "structural" | "codegraph";
9271
+ /** Format: uuid */
9272
+ indexId?: string;
9170
9273
  /** Format: uuid */
9171
9274
  repoId?: string;
9172
9275
  repoName?: string;
@@ -9174,6 +9277,23 @@ export interface components {
9174
9277
  };
9175
9278
  CodeChatSymbolHitListDto: {
9176
9279
  items: components["schemas"]["CodeChatSymbolHitDto"][];
9280
+ /** @enum {string} */
9281
+ source?: "scip_store" | "codegraph";
9282
+ };
9283
+ CodeChatOriginPromptDto: {
9284
+ originPromptMd?: string | null;
9285
+ scipStatus?: {
9286
+ [key: string]: unknown;
9287
+ } | null;
9288
+ };
9289
+ CodeChatRepoContextPackDto: {
9290
+ markdown: string;
9291
+ tokenEstimate: number;
9292
+ maxTokens: number;
9293
+ sectionsIncluded: string[];
9294
+ pack?: {
9295
+ [key: string]: unknown;
9296
+ };
9177
9297
  };
9178
9298
  CodeChatReferenceQueryBodyDto: {
9179
9299
  symbol: string;
@@ -10218,6 +10338,9 @@ export type WorkspaceAbsenceListDto = components['schemas']['WorkspaceAbsenceLis
10218
10338
  export type IngestCoverageGapDto = components['schemas']['IngestCoverageGapDto'];
10219
10339
  export type IngestCoverageLastRunDto = components['schemas']['IngestCoverageLastRunDto'];
10220
10340
  export type IngestCoverageProductivityRepoDto = components['schemas']['IngestCoverageProductivityRepoDto'];
10341
+ export type IngestCoverageProductivityDepthScanDto = components['schemas']['IngestCoverageProductivityDepthScanDto'];
10342
+ export type IngestCoverageProductivityWeekReconcileDto = components['schemas']['IngestCoverageProductivityWeekReconcileDto'];
10343
+ export type IngestCoverageProductivitySelfHealDto = components['schemas']['IngestCoverageProductivitySelfHealDto'];
10221
10344
  export type IngestCoverageProductivityDetailDto = components['schemas']['IngestCoverageProductivityDetailDto'];
10222
10345
  export type IngestCoverageFactFamilyDto = components['schemas']['IngestCoverageFactFamilyDto'];
10223
10346
  export type IngestCoverageAiDetailDto = components['schemas']['IngestCoverageAiDetailDto'];
@@ -10339,6 +10462,8 @@ export type CodeChatWikiOkfExportDto = components['schemas']['CodeChatWikiOkfExp
10339
10462
  export type CodeChatSymbolQueryBodyDto = components['schemas']['CodeChatSymbolQueryBodyDto'];
10340
10463
  export type CodeChatSymbolHitDto = components['schemas']['CodeChatSymbolHitDto'];
10341
10464
  export type CodeChatSymbolHitListDto = components['schemas']['CodeChatSymbolHitListDto'];
10465
+ export type CodeChatOriginPromptDto = components['schemas']['CodeChatOriginPromptDto'];
10466
+ export type CodeChatRepoContextPackDto = components['schemas']['CodeChatRepoContextPackDto'];
10342
10467
  export type CodeChatReferenceQueryBodyDto = components['schemas']['CodeChatReferenceQueryBodyDto'];
10343
10468
  export type CodeChatReferenceHitDto = components['schemas']['CodeChatReferenceHitDto'];
10344
10469
  export type CodeChatReferenceHitListDto = components['schemas']['CodeChatReferenceHitListDto'];
@@ -14728,7 +14853,7 @@ export interface operations {
14728
14853
  getWorkspaceGithubInstallationStatus: {
14729
14854
  parameters: {
14730
14855
  query?: {
14731
- /** @description When true, bypass `tai_workspace_vcs_repos_cache` and re-fetch from GitHub. When productivity backfill phase is `complete`, also triggers inline `on_demand` ingest for the current UTC week (gap-fill only when metrics are missing). Response includes `productivityRefreshInProgress` while the workspace advisory lock is held. */
14856
+ /** @description When true, bypass `tai_workspace_vcs_repos_cache` and re-fetch from GitHub, then poll and merge productivity metrics for the current UTC week even while historical backfill is active or metrics already exist. Response includes `productivityRefreshInProgress` while the workspace advisory lock is held. */
14732
14857
  refresh?: boolean;
14733
14858
  /** @description When true, re-fetch GitHub App and installation permission metadata (used by the login permission gate after the user approves on GitHub). Clears App-permission and product-settings caches so the next `productSettingsRefresh` re-probes. Does not itself call alert-list APIs; use `productSettingsRefresh` for that. */
14734
14859
  permissionsRefresh?: boolean;
@@ -19209,6 +19334,133 @@ export interface operations {
19209
19334
  };
19210
19335
  };
19211
19336
  };
19337
+ getCodeChatOriginPrompt: {
19338
+ parameters: {
19339
+ query?: never;
19340
+ header?: never;
19341
+ path: {
19342
+ workspaceId: components["parameters"]["WorkspaceId"];
19343
+ indexId: string;
19344
+ };
19345
+ cookie?: never;
19346
+ };
19347
+ requestBody?: never;
19348
+ responses: {
19349
+ /** @description Stored origin prompt and symbol-index status */
19350
+ 200: {
19351
+ headers: {
19352
+ [name: string]: unknown;
19353
+ };
19354
+ content: {
19355
+ "application/json": components["schemas"]["CodeChatOriginPromptDto"];
19356
+ };
19357
+ };
19358
+ 401: components["responses"]["Unauthorized"];
19359
+ };
19360
+ };
19361
+ getCodeChatRepoContextPack: {
19362
+ parameters: {
19363
+ query?: never;
19364
+ header?: never;
19365
+ path: {
19366
+ workspaceId: components["parameters"]["WorkspaceId"];
19367
+ indexId: string;
19368
+ };
19369
+ cookie?: never;
19370
+ };
19371
+ requestBody?: never;
19372
+ responses: {
19373
+ /** @description Context pack markdown and section list */
19374
+ 200: {
19375
+ headers: {
19376
+ [name: string]: unknown;
19377
+ };
19378
+ content: {
19379
+ "application/json": components["schemas"]["CodeChatRepoContextPackDto"];
19380
+ };
19381
+ };
19382
+ 401: components["responses"]["Unauthorized"];
19383
+ /** @description Index not ready */
19384
+ 404: {
19385
+ headers: {
19386
+ [name: string]: unknown;
19387
+ };
19388
+ content: {
19389
+ "application/json": components["schemas"]["ErrorMessageDto"];
19390
+ };
19391
+ };
19392
+ };
19393
+ };
19394
+ searchCodeChatSymbols: {
19395
+ parameters: {
19396
+ query: {
19397
+ q: string;
19398
+ repoId?: string;
19399
+ };
19400
+ header?: never;
19401
+ path: {
19402
+ workspaceId: components["parameters"]["WorkspaceId"];
19403
+ };
19404
+ cookie?: never;
19405
+ };
19406
+ requestBody?: never;
19407
+ responses: {
19408
+ /** @description Symbol hits */
19409
+ 200: {
19410
+ headers: {
19411
+ [name: string]: unknown;
19412
+ };
19413
+ content: {
19414
+ "application/json": components["schemas"]["CodeChatSymbolHitListDto"];
19415
+ };
19416
+ };
19417
+ /** @description Missing query */
19418
+ 400: {
19419
+ headers: {
19420
+ [name: string]: unknown;
19421
+ };
19422
+ content: {
19423
+ "application/json": components["schemas"]["ErrorMessageDto"];
19424
+ };
19425
+ };
19426
+ 401: components["responses"]["Unauthorized"];
19427
+ };
19428
+ };
19429
+ listCodeChatSymbolRefs: {
19430
+ parameters: {
19431
+ query: {
19432
+ symbol: string;
19433
+ repoId?: string;
19434
+ };
19435
+ header?: never;
19436
+ path: {
19437
+ workspaceId: components["parameters"]["WorkspaceId"];
19438
+ };
19439
+ cookie?: never;
19440
+ };
19441
+ requestBody?: never;
19442
+ responses: {
19443
+ /** @description Reference hits */
19444
+ 200: {
19445
+ headers: {
19446
+ [name: string]: unknown;
19447
+ };
19448
+ content: {
19449
+ "application/json": components["schemas"]["CodeChatSymbolHitListDto"];
19450
+ };
19451
+ };
19452
+ /** @description Missing symbol */
19453
+ 400: {
19454
+ headers: {
19455
+ [name: string]: unknown;
19456
+ };
19457
+ content: {
19458
+ "application/json": components["schemas"]["ErrorMessageDto"];
19459
+ };
19460
+ };
19461
+ 401: components["responses"]["Unauthorized"];
19462
+ };
19463
+ };
19212
19464
  analyzeCodeChatSymbols: {
19213
19465
  parameters: {
19214
19466
  query?: never;