@thinkai/tai-api-contract 2.126.0 → 2.127.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.
@@ -1393,6 +1393,46 @@ export interface paths {
1393
1393
  patch?: never;
1394
1394
  trace?: never;
1395
1395
  };
1396
+ "/workspaces/{workspaceId}/insights/test-pyramid/summary": {
1397
+ parameters: {
1398
+ query?: never;
1399
+ header?: never;
1400
+ path?: never;
1401
+ cookie?: never;
1402
+ };
1403
+ /**
1404
+ * Test pyramid assessment — workspace summary
1405
+ * @description Org-level Test pyramid assessment for `/insights/test-pyramid`. Aggregates each active repo's **latest** readiness-scan test-pyramid snapshot. Layer **presence is count-based** (`fileCount > 0`); CI/dependency-only AF `present` flags are ignored. Shape uses fixed advisory targets (base ~70% unit, middle ~20% integration+contract+acceptance/BDD, top ~10% E2E) and returns `insufficient_data` when total classified test files < 10. Does not change Agentic Foundation `/readiness/test-pyramid*` responses.
1406
+ */
1407
+ get: operations["getInsightsTestPyramidSummary"];
1408
+ put?: never;
1409
+ post?: never;
1410
+ delete?: never;
1411
+ options?: never;
1412
+ head?: never;
1413
+ patch?: never;
1414
+ trace?: never;
1415
+ };
1416
+ "/workspaces/{workspaceId}/insights/test-pyramid/repos": {
1417
+ parameters: {
1418
+ query?: never;
1419
+ header?: never;
1420
+ path?: never;
1421
+ cookie?: never;
1422
+ };
1423
+ /**
1424
+ * Test pyramid assessment — per-repo list (paginated)
1425
+ * @description Page of repos with latest classified test-file counts, count-based presence, presence maturity, and shape assessment. Use `gapsByLayer` on the summary endpoint (or filter this list via layerPresent) to answer “who lacks layer X?”. No v1 repo-detail Insights route — link repo names to AF readiness inventory.
1426
+ */
1427
+ get: operations["listInsightsTestPyramidRepos"];
1428
+ put?: never;
1429
+ post?: never;
1430
+ delete?: never;
1431
+ options?: never;
1432
+ head?: never;
1433
+ patch?: never;
1434
+ trace?: never;
1435
+ };
1396
1436
  "/workspaces/{workspaceId}/integrations/ai-tool/{provider}/members": {
1397
1437
  parameters: {
1398
1438
  query?: never;
@@ -9543,6 +9583,115 @@ export interface components {
9543
9583
  topHotspots: components["schemas"]["CodeInsightsOrgHotspotDto"][];
9544
9584
  sonar: components["schemas"]["CodeInsightsSonarDto"];
9545
9585
  };
9586
+ /**
9587
+ * @description Presence maturity (model A) using count-based layer presence (`fileCount > 0`), not AF signal-inclusive `present`.
9588
+ * @enum {string}
9589
+ */
9590
+ InsightsTestPyramidMaturityDto: "missing" | "emerging" | "established" | "mature";
9591
+ /**
9592
+ * @description Advisory shape label vs fixed 70/20/10. `insufficient_data` when total classified test files < 10 (band percents are null).
9593
+ * @enum {string}
9594
+ */
9595
+ InsightsTestPyramidShapeLabelDto: "insufficient_data" | "base_heavy" | "balanced" | "top_heavy" | "middle_heavy";
9596
+ InsightsTestPyramidShapeDto: {
9597
+ label: components["schemas"]["InsightsTestPyramidShapeLabelDto"];
9598
+ /** @description Sum of classified test **files** across the five layers (not test cases). */
9599
+ totalClassifiedFiles: number;
9600
+ /** @description Share of classified files in unit (base). Null when insufficient_data. */
9601
+ basePercent: number | null;
9602
+ /** @description Share in integration + contract + acceptance_bdd (middle). Null when insufficient_data. */
9603
+ middlePercent: number | null;
9604
+ /** @description Share in e2e (top). Null when insufficient_data. */
9605
+ topPercent: number | null;
9606
+ targets: {
9607
+ /** @enum {number} */
9608
+ basePercent: 70;
9609
+ /** @enum {number} */
9610
+ middlePercent: 20;
9611
+ /** @enum {number} */
9612
+ topPercent: 10;
9613
+ };
9614
+ };
9615
+ InsightsTestPyramidLayerCountsDto: {
9616
+ unit: number;
9617
+ integration: number;
9618
+ acceptance_bdd: number;
9619
+ contract: number;
9620
+ e2e: number;
9621
+ };
9622
+ InsightsTestPyramidLayerPresentDto: {
9623
+ unit: boolean;
9624
+ integration: boolean;
9625
+ acceptance_bdd: boolean;
9626
+ contract: boolean;
9627
+ e2e: boolean;
9628
+ };
9629
+ InsightsTestPyramidLayerPresenceDto: {
9630
+ presentRepos: number;
9631
+ applicableRepos: number;
9632
+ percent: number | null;
9633
+ missingRepoIds: string[];
9634
+ missingRepoNames: string[];
9635
+ };
9636
+ InsightsTestPyramidGapRepoDto: {
9637
+ /** Format: uuid */
9638
+ repoId: string;
9639
+ repoName: string;
9640
+ };
9641
+ InsightsTestPyramidGapsByLayerDto: {
9642
+ unit: components["schemas"]["InsightsTestPyramidGapRepoDto"][];
9643
+ integration: components["schemas"]["InsightsTestPyramidGapRepoDto"][];
9644
+ acceptance_bdd: components["schemas"]["InsightsTestPyramidGapRepoDto"][];
9645
+ contract: components["schemas"]["InsightsTestPyramidGapRepoDto"][];
9646
+ e2e: components["schemas"]["InsightsTestPyramidGapRepoDto"][];
9647
+ };
9648
+ InsightsTestPyramidMaturityCountsDto: {
9649
+ missing: number;
9650
+ emerging: number;
9651
+ established: number;
9652
+ mature: number;
9653
+ };
9654
+ InsightsTestPyramidLayerPresenceMapDto: {
9655
+ unit: components["schemas"]["InsightsTestPyramidLayerPresenceDto"];
9656
+ integration: components["schemas"]["InsightsTestPyramidLayerPresenceDto"];
9657
+ acceptance_bdd: components["schemas"]["InsightsTestPyramidLayerPresenceDto"];
9658
+ contract: components["schemas"]["InsightsTestPyramidLayerPresenceDto"];
9659
+ e2e: components["schemas"]["InsightsTestPyramidLayerPresenceDto"];
9660
+ };
9661
+ InsightsTestPyramidSummaryDto: {
9662
+ /** Format: uuid */
9663
+ workspaceId: string;
9664
+ /** Format: date-time */
9665
+ generatedAt: string;
9666
+ reposWithPyramid: number;
9667
+ /** @description Repos whose newest pyramid came from a non-succeeded readiness run. */
9668
+ reposFromDegradedRuns: string[];
9669
+ /** @description Workspace sum of classified test files (not cases). */
9670
+ totalClassifiedFiles: number;
9671
+ shape: components["schemas"]["InsightsTestPyramidShapeDto"];
9672
+ layerPresence: components["schemas"]["InsightsTestPyramidLayerPresenceMapDto"];
9673
+ maturityCounts: components["schemas"]["InsightsTestPyramidMaturityCountsDto"];
9674
+ gapsByLayer: components["schemas"]["InsightsTestPyramidGapsByLayerDto"];
9675
+ };
9676
+ InsightsTestPyramidRepoItemDto: {
9677
+ /** Format: uuid */
9678
+ repoId: string;
9679
+ repoName: string;
9680
+ /** Format: date-time */
9681
+ scannedAt: string;
9682
+ currentRunStatus: components["schemas"]["TestPyramidRunStatusDto"];
9683
+ maturity: components["schemas"]["InsightsTestPyramidMaturityDto"];
9684
+ layerFileCounts: components["schemas"]["InsightsTestPyramidLayerCountsDto"];
9685
+ layerPresent: components["schemas"]["InsightsTestPyramidLayerPresentDto"];
9686
+ totalClassifiedFiles: number;
9687
+ shape: components["schemas"]["InsightsTestPyramidShapeDto"];
9688
+ };
9689
+ InsightsTestPyramidRepoListDto: {
9690
+ items: components["schemas"]["InsightsTestPyramidRepoItemDto"][];
9691
+ total: number;
9692
+ limit: number;
9693
+ offset: number;
9694
+ };
9546
9695
  };
9547
9696
  responses: {
9548
9697
  /** @description Missing or invalid bearer token */
@@ -9630,6 +9779,10 @@ export interface components {
9630
9779
  CodeInsightsRepoSort: "repoName" | "locTotal" | "ccAvg" | "dupPct" | "lastMeasuredAt";
9631
9780
  /** @description Case-insensitive substring filter on repo name / provider slug. */
9632
9781
  CodeInsightsRepoSearch: string;
9782
+ /** @description Allowlisted Test pyramid assessment repo sort field. */
9783
+ InsightsTestPyramidRepoSort: "repoName" | "totalClassifiedFiles" | "scannedAt" | "maturity";
9784
+ /** @description Case-insensitive substring filter on repository name. */
9785
+ InsightsTestPyramidRepoSearch: string;
9633
9786
  /** @description Case-insensitive filter on repository name, language, or provider slug. */
9634
9787
  ReadinessRepoSearch: string;
9635
9788
  /** @description Exact language filter (e.g. `typescript`). */
@@ -10153,6 +10306,19 @@ export type CodeInsightsDesignAnalyzeResponseDto = components['schemas']['CodeIn
10153
10306
  export type CodeInsightsOrgHotspotDto = components['schemas']['CodeInsightsOrgHotspotDto'];
10154
10307
  export type CodeInsightsSonarDto = components['schemas']['CodeInsightsSonarDto'];
10155
10308
  export type CodeInsightsSummaryDto = components['schemas']['CodeInsightsSummaryDto'];
10309
+ export type InsightsTestPyramidMaturityDto = components['schemas']['InsightsTestPyramidMaturityDto'];
10310
+ export type InsightsTestPyramidShapeLabelDto = components['schemas']['InsightsTestPyramidShapeLabelDto'];
10311
+ export type InsightsTestPyramidShapeDto = components['schemas']['InsightsTestPyramidShapeDto'];
10312
+ export type InsightsTestPyramidLayerCountsDto = components['schemas']['InsightsTestPyramidLayerCountsDto'];
10313
+ export type InsightsTestPyramidLayerPresentDto = components['schemas']['InsightsTestPyramidLayerPresentDto'];
10314
+ export type InsightsTestPyramidLayerPresenceDto = components['schemas']['InsightsTestPyramidLayerPresenceDto'];
10315
+ export type InsightsTestPyramidGapRepoDto = components['schemas']['InsightsTestPyramidGapRepoDto'];
10316
+ export type InsightsTestPyramidGapsByLayerDto = components['schemas']['InsightsTestPyramidGapsByLayerDto'];
10317
+ export type InsightsTestPyramidMaturityCountsDto = components['schemas']['InsightsTestPyramidMaturityCountsDto'];
10318
+ export type InsightsTestPyramidLayerPresenceMapDto = components['schemas']['InsightsTestPyramidLayerPresenceMapDto'];
10319
+ export type InsightsTestPyramidSummaryDto = components['schemas']['InsightsTestPyramidSummaryDto'];
10320
+ export type InsightsTestPyramidRepoItemDto = components['schemas']['InsightsTestPyramidRepoItemDto'];
10321
+ export type InsightsTestPyramidRepoListDto = components['schemas']['InsightsTestPyramidRepoListDto'];
10156
10322
  export type ResponseUnauthorized = components['responses']['Unauthorized'];
10157
10323
  export type ResponseForbidden = components['responses']['Forbidden'];
10158
10324
  export type ResponseZenHrSyncInProgress = components['responses']['ZenHrSyncInProgress'];
@@ -10184,6 +10350,8 @@ export type ParameterPaginationOrder = components['parameters']['PaginationOrder
10184
10350
  export type ParameterReadinessRepoSort = components['parameters']['ReadinessRepoSort'];
10185
10351
  export type ParameterCodeInsightsRepoSort = components['parameters']['CodeInsightsRepoSort'];
10186
10352
  export type ParameterCodeInsightsRepoSearch = components['parameters']['CodeInsightsRepoSearch'];
10353
+ export type ParameterInsightsTestPyramidRepoSort = components['parameters']['InsightsTestPyramidRepoSort'];
10354
+ export type ParameterInsightsTestPyramidRepoSearch = components['parameters']['InsightsTestPyramidRepoSearch'];
10187
10355
  export type ParameterReadinessRepoSearch = components['parameters']['ReadinessRepoSearch'];
10188
10356
  export type ParameterReadinessRepoLanguage = components['parameters']['ReadinessRepoLanguage'];
10189
10357
  export type ParameterReadinessFixSort = components['parameters']['ReadinessFixSort'];
@@ -14107,6 +14275,106 @@ export interface operations {
14107
14275
  };
14108
14276
  };
14109
14277
  };
14278
+ getInsightsTestPyramidSummary: {
14279
+ parameters: {
14280
+ query?: never;
14281
+ header?: never;
14282
+ path: {
14283
+ workspaceId: components["parameters"]["WorkspaceId"];
14284
+ };
14285
+ cookie?: never;
14286
+ };
14287
+ requestBody?: never;
14288
+ responses: {
14289
+ /** @description Test pyramid assessment workspace summary */
14290
+ 200: {
14291
+ headers: {
14292
+ [name: string]: unknown;
14293
+ };
14294
+ content: {
14295
+ "application/json": components["schemas"]["InsightsTestPyramidSummaryDto"];
14296
+ };
14297
+ };
14298
+ 401: components["responses"]["Unauthorized"];
14299
+ 403: components["responses"]["Forbidden"];
14300
+ /** @description Workspace does not exist or malformed workspaceId */
14301
+ 404: {
14302
+ headers: {
14303
+ [name: string]: unknown;
14304
+ };
14305
+ content?: never;
14306
+ };
14307
+ /** @description Test pyramid history not supported by store */
14308
+ 501: {
14309
+ headers: {
14310
+ [name: string]: unknown;
14311
+ };
14312
+ content: {
14313
+ "application/json": components["schemas"]["ErrorMessageDto"];
14314
+ };
14315
+ };
14316
+ };
14317
+ };
14318
+ listInsightsTestPyramidRepos: {
14319
+ parameters: {
14320
+ query?: {
14321
+ /** @description Page size (default 25, max 100). */
14322
+ limit?: components["parameters"]["PaginationLimit"];
14323
+ /** @description Zero-based row offset into the filtered, sorted result set. */
14324
+ offset?: components["parameters"]["PaginationOffset"];
14325
+ /** @description Allowlisted Test pyramid assessment repo sort field. */
14326
+ sort?: components["parameters"]["InsightsTestPyramidRepoSort"];
14327
+ /** @description Sort direction. */
14328
+ order?: components["parameters"]["PaginationOrder"];
14329
+ /** @description Case-insensitive substring filter on repository name. */
14330
+ search?: components["parameters"]["InsightsTestPyramidRepoSearch"];
14331
+ };
14332
+ header?: never;
14333
+ path: {
14334
+ workspaceId: components["parameters"]["WorkspaceId"];
14335
+ };
14336
+ cookie?: never;
14337
+ };
14338
+ requestBody?: never;
14339
+ responses: {
14340
+ /** @description Paginated test pyramid assessment repo rows */
14341
+ 200: {
14342
+ headers: {
14343
+ [name: string]: unknown;
14344
+ };
14345
+ content: {
14346
+ "application/json": components["schemas"]["InsightsTestPyramidRepoListDto"];
14347
+ };
14348
+ };
14349
+ /** @description Invalid pagination or sort query */
14350
+ 400: {
14351
+ headers: {
14352
+ [name: string]: unknown;
14353
+ };
14354
+ content: {
14355
+ "application/json": components["schemas"]["ErrorMessageDto"];
14356
+ };
14357
+ };
14358
+ 401: components["responses"]["Unauthorized"];
14359
+ 403: components["responses"]["Forbidden"];
14360
+ /** @description Workspace does not exist or malformed workspaceId */
14361
+ 404: {
14362
+ headers: {
14363
+ [name: string]: unknown;
14364
+ };
14365
+ content?: never;
14366
+ };
14367
+ /** @description Test pyramid history not supported by store */
14368
+ 501: {
14369
+ headers: {
14370
+ [name: string]: unknown;
14371
+ };
14372
+ content: {
14373
+ "application/json": components["schemas"]["ErrorMessageDto"];
14374
+ };
14375
+ };
14376
+ };
14377
+ };
14110
14378
  getAiToolMembers: {
14111
14379
  parameters: {
14112
14380
  query?: {