@thinkai/tai-api-contract 2.125.0 → 2.126.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.
@@ -2376,6 +2376,66 @@ export interface paths {
2376
2376
  patch?: never;
2377
2377
  trace?: never;
2378
2378
  };
2379
+ "/workspaces/{workspaceId}/readiness/test-pyramid": {
2380
+ parameters: {
2381
+ query?: never;
2382
+ header?: never;
2383
+ path?: never;
2384
+ cookie?: never;
2385
+ };
2386
+ /**
2387
+ * Latest test-pyramid report and progress per repository
2388
+ * @description Returns the latest test inventory for every repository with a pyramid snapshot, deltas from the previous and baseline scans, and workspace layer coverage. Repositories whose historical runs predate pyramid snapshots are omitted.
2389
+ */
2390
+ get: operations["getReadinessTestPyramid"];
2391
+ put?: never;
2392
+ post?: never;
2393
+ delete?: never;
2394
+ options?: never;
2395
+ head?: never;
2396
+ patch?: never;
2397
+ trace?: never;
2398
+ };
2399
+ "/workspaces/{workspaceId}/readiness/test-pyramid/history": {
2400
+ parameters: {
2401
+ query?: never;
2402
+ header?: never;
2403
+ path?: never;
2404
+ cookie?: never;
2405
+ };
2406
+ /**
2407
+ * Historical test-pyramid snapshots per repository
2408
+ * @description Returns succeeded readiness runs containing test-pyramid snapshots, ordered oldest to newest per repository. Older runs without snapshots are omitted, not treated as gaps.
2409
+ */
2410
+ get: operations["getReadinessTestPyramidHistory"];
2411
+ put?: never;
2412
+ post?: never;
2413
+ delete?: never;
2414
+ options?: never;
2415
+ head?: never;
2416
+ patch?: never;
2417
+ trace?: never;
2418
+ };
2419
+ "/workspaces/{workspaceId}/readiness/test-pyramid/progress": {
2420
+ parameters: {
2421
+ query?: never;
2422
+ header?: never;
2423
+ path?: never;
2424
+ cookie?: never;
2425
+ };
2426
+ /**
2427
+ * Test-pyramid code progress from successive scans
2428
+ * @description Compares each repository's latest pyramid snapshot with its previous and baseline snapshots. Reports layer adoption/removal, file-count and Tests & QA score deltas, criterion changes, and current workspace coverage.
2429
+ */
2430
+ get: operations["getReadinessTestPyramidProgress"];
2431
+ put?: never;
2432
+ post?: never;
2433
+ delete?: never;
2434
+ options?: never;
2435
+ head?: never;
2436
+ patch?: never;
2437
+ trace?: never;
2438
+ };
2379
2439
  "/workspaces/{workspaceId}/readiness/score-history": {
2380
2440
  parameters: {
2381
2441
  query?: never;
@@ -6795,12 +6855,176 @@ export interface components {
6795
6855
  /** @description Dimension score as a percentage (0–100) for this scan run. */
6796
6856
  scorePercent: number;
6797
6857
  };
6858
+ TestPyramidLayerSnapshotDto: {
6859
+ present: boolean;
6860
+ /** @description False when the repository archetype makes this layer not applicable. */
6861
+ applicable: boolean;
6862
+ /** @enum {string} */
6863
+ confidence: "high" | "medium" | "low";
6864
+ fileCount: number;
6865
+ frameworks: string[];
6866
+ /** @description Capped relative file paths or script names supporting the classification. */
6867
+ evidence: string[];
6868
+ lineCoverage?: components["schemas"]["TestPyramidLineCoverageDto"];
6869
+ };
6870
+ TestPyramidLayersDto: {
6871
+ unit: components["schemas"]["TestPyramidLayerSnapshotDto"];
6872
+ integration: components["schemas"]["TestPyramidLayerSnapshotDto"];
6873
+ acceptance_bdd: components["schemas"]["TestPyramidLayerSnapshotDto"];
6874
+ contract: components["schemas"]["TestPyramidLayerSnapshotDto"];
6875
+ e2e: components["schemas"]["TestPyramidLayerSnapshotDto"];
6876
+ };
6877
+ TestPyramidSnapshotDto: {
6878
+ /** @enum {integer} */
6879
+ version: 1;
6880
+ layers: components["schemas"]["TestPyramidLayersDto"];
6881
+ /** @description Evidence suggests the repository's E2E suite exercises multiple services. */
6882
+ e2eCrossRepoCandidate: boolean;
6883
+ /** @description Hostnames or compose service names referenced by the E2E suite. */
6884
+ e2eReferencedTargets: string[];
6885
+ lineCoverage?: components["schemas"]["TestPyramidLineCoverageDto"];
6886
+ };
6887
+ TestPyramidLineCoverageDto: {
6888
+ /** @description Line coverage percent from Sonar or a committed coverage report. */
6889
+ linePercent: number;
6890
+ branchPercent: number | null;
6891
+ /** @enum {string} */
6892
+ source: "sonar" | "jacoco" | "lcov" | "cobertura" | "clover" | "go_cover";
6893
+ /** @description Path of the scanned report when the source is not Sonar. */
6894
+ reportPath?: string | null;
6895
+ } | null;
6896
+ TestPyramidCriteriaDto: {
6897
+ D1?: string;
6898
+ D2?: string;
6899
+ D3?: string;
6900
+ D4?: string;
6901
+ };
6902
+ /**
6903
+ * @description Run state the snapshot came from. The pyramid is derived from the filesystem scan, which finishes before rubric grading, so `partial_failed` and `failed` runs still carry a valid snapshot but no scores.
6904
+ * @enum {string}
6905
+ */
6906
+ TestPyramidRunStatusDto: "succeeded" | "partial_failed" | "failed";
6907
+ TestPyramidHistoryPointDto: {
6908
+ /** Format: date-time */
6909
+ finishedAt: string;
6910
+ runStatus: components["schemas"]["TestPyramidRunStatusDto"];
6911
+ overallScore: number | null;
6912
+ testsQaPercent: number | null;
6913
+ testPyramid: components["schemas"]["TestPyramidSnapshotDto"];
6914
+ testPyramidCriteria: components["schemas"]["TestPyramidCriteriaDto"];
6915
+ };
6916
+ TestPyramidRepoHistoryDto: {
6917
+ /** Format: uuid */
6918
+ repoId: string;
6919
+ repoName: string;
6920
+ /** Format: date-time */
6921
+ connectedAt: string;
6922
+ points: components["schemas"]["TestPyramidHistoryPointDto"][];
6923
+ };
6924
+ WorkspaceTestPyramidHistoryDto: {
6925
+ /** Format: uuid */
6926
+ workspaceId: string;
6927
+ /** Format: date-time */
6928
+ generatedAt: string;
6929
+ repos: components["schemas"]["TestPyramidRepoHistoryDto"][];
6930
+ };
6931
+ TestPyramidLayerDeltaDto: {
6932
+ /** @enum {string} */
6933
+ presence: "unchanged" | "adopted" | "removed";
6934
+ fileCountDelta: number;
6935
+ addedFrameworks: string[];
6936
+ };
6937
+ TestPyramidLayerDeltasDto: {
6938
+ unit: components["schemas"]["TestPyramidLayerDeltaDto"];
6939
+ integration: components["schemas"]["TestPyramidLayerDeltaDto"];
6940
+ acceptance_bdd: components["schemas"]["TestPyramidLayerDeltaDto"];
6941
+ contract: components["schemas"]["TestPyramidLayerDeltaDto"];
6942
+ e2e: components["schemas"]["TestPyramidLayerDeltaDto"];
6943
+ };
6944
+ TestPyramidCriterionDeltaDto: {
6945
+ from: string | null;
6946
+ to: string;
6947
+ };
6948
+ TestPyramidCriterionDeltasDto: {
6949
+ D1?: components["schemas"]["TestPyramidCriterionDeltaDto"];
6950
+ D2?: components["schemas"]["TestPyramidCriterionDeltaDto"];
6951
+ D3?: components["schemas"]["TestPyramidCriterionDeltaDto"];
6952
+ D4?: components["schemas"]["TestPyramidCriterionDeltaDto"];
6953
+ };
6954
+ TestPyramidRepoProgressDto: {
6955
+ /** Format: uuid */
6956
+ repoId: string;
6957
+ repoName: string;
6958
+ /** Format: date-time */
6959
+ baselineAt: string;
6960
+ /** Format: date-time */
6961
+ previousAt: string | null;
6962
+ /** Format: date-time */
6963
+ currentAt: string;
6964
+ currentRunStatus: components["schemas"]["TestPyramidRunStatusDto"];
6965
+ /** @enum {string} */
6966
+ maturity: "missing" | "emerging" | "established" | "mature";
6967
+ testsQaPercent: number | null;
6968
+ testsQaPercentDelta: number | null;
6969
+ layerDeltas: components["schemas"]["TestPyramidLayerDeltasDto"];
6970
+ baselineLayerDeltas: components["schemas"]["TestPyramidLayerDeltasDto"];
6971
+ criterionDeltas: components["schemas"]["TestPyramidCriterionDeltasDto"];
6972
+ testPyramid: components["schemas"]["TestPyramidSnapshotDto"];
6973
+ testPyramidCriteria: components["schemas"]["TestPyramidCriteriaDto"];
6974
+ lineCoverage?: components["schemas"]["TestPyramidLineCoverageDto"];
6975
+ };
6976
+ TestPyramidLayerCoverageDto: {
6977
+ presentRepos: number;
6978
+ applicableRepos: number;
6979
+ percent: number | null;
6980
+ missingRepoIds: string[];
6981
+ };
6982
+ TestPyramidLayerCoverageMapDto: {
6983
+ unit: components["schemas"]["TestPyramidLayerCoverageDto"];
6984
+ integration: components["schemas"]["TestPyramidLayerCoverageDto"];
6985
+ acceptance_bdd: components["schemas"]["TestPyramidLayerCoverageDto"];
6986
+ contract: components["schemas"]["TestPyramidLayerCoverageDto"];
6987
+ e2e: components["schemas"]["TestPyramidLayerCoverageDto"];
6988
+ };
6989
+ TestPyramidMaturityCountsDto: {
6990
+ missing: number;
6991
+ emerging: number;
6992
+ established: number;
6993
+ mature: number;
6994
+ };
6995
+ TestPyramidCrossRepoMatchDto: {
6996
+ /** Format: uuid */
6997
+ sourceRepoId: string;
6998
+ targetRepoIds: string[];
6999
+ referencedTargets: string[];
7000
+ };
7001
+ WorkspaceTestPyramidSummaryDto: {
7002
+ reposWithPyramid: number;
7003
+ /** @description Repositories whose newest snapshot came from a run whose rubric grading did not complete. Their pyramid is valid but Tests & QA scores are unavailable. */
7004
+ reposFromDegradedRuns: string[];
7005
+ layerCoverage: components["schemas"]["TestPyramidLayerCoverageMapDto"];
7006
+ maturityCounts: components["schemas"]["TestPyramidMaturityCountsDto"];
7007
+ e2eCrossRepoCandidateRepoIds: string[];
7008
+ e2eCrossRepoMatches: components["schemas"]["TestPyramidCrossRepoMatchDto"][];
7009
+ /** @description True only when an E2E target is matched to another repository in the workspace. */
7010
+ crossRepoE2ePresent: boolean;
7011
+ };
7012
+ WorkspaceTestPyramidProgressDto: {
7013
+ /** Format: uuid */
7014
+ workspaceId: string;
7015
+ /** Format: date-time */
7016
+ generatedAt: string;
7017
+ repos: components["schemas"]["TestPyramidRepoProgressDto"][];
7018
+ workspace: components["schemas"]["WorkspaceTestPyramidSummaryDto"];
7019
+ };
6798
7020
  ReadinessScoreHistoryPointDto: {
6799
7021
  /** Format: date-time */
6800
7022
  finishedAt: string;
6801
7023
  overallScore: number;
6802
7024
  /** @description Per-dimension percentages captured on this scan run. */
6803
7025
  dimensionScores?: components["schemas"]["ReadinessScoreHistoryDimensionScoreDto"][];
7026
+ testPyramid?: components["schemas"]["TestPyramidSnapshotDto"];
7027
+ testPyramidCriteria?: components["schemas"]["TestPyramidCriteriaDto"];
6804
7028
  };
6805
7029
  ReadinessRepoScoreHistoryDto: {
6806
7030
  /** Format: uuid */
@@ -9668,6 +9892,26 @@ export type DimensionScoreDetailDto = components['schemas']['DimensionScoreDetai
9668
9892
  export type ReadinessRepoRunHistoryItemDto = components['schemas']['ReadinessRepoRunHistoryItemDto'];
9669
9893
  export type ReadinessRepoRunListDto = components['schemas']['ReadinessRepoRunListDto'];
9670
9894
  export type ReadinessScoreHistoryDimensionScoreDto = components['schemas']['ReadinessScoreHistoryDimensionScoreDto'];
9895
+ export type TestPyramidLayerSnapshotDto = components['schemas']['TestPyramidLayerSnapshotDto'];
9896
+ export type TestPyramidLayersDto = components['schemas']['TestPyramidLayersDto'];
9897
+ export type TestPyramidSnapshotDto = components['schemas']['TestPyramidSnapshotDto'];
9898
+ export type TestPyramidLineCoverageDto = components['schemas']['TestPyramidLineCoverageDto'];
9899
+ export type TestPyramidCriteriaDto = components['schemas']['TestPyramidCriteriaDto'];
9900
+ export type TestPyramidRunStatusDto = components['schemas']['TestPyramidRunStatusDto'];
9901
+ export type TestPyramidHistoryPointDto = components['schemas']['TestPyramidHistoryPointDto'];
9902
+ export type TestPyramidRepoHistoryDto = components['schemas']['TestPyramidRepoHistoryDto'];
9903
+ export type WorkspaceTestPyramidHistoryDto = components['schemas']['WorkspaceTestPyramidHistoryDto'];
9904
+ export type TestPyramidLayerDeltaDto = components['schemas']['TestPyramidLayerDeltaDto'];
9905
+ export type TestPyramidLayerDeltasDto = components['schemas']['TestPyramidLayerDeltasDto'];
9906
+ export type TestPyramidCriterionDeltaDto = components['schemas']['TestPyramidCriterionDeltaDto'];
9907
+ export type TestPyramidCriterionDeltasDto = components['schemas']['TestPyramidCriterionDeltasDto'];
9908
+ export type TestPyramidRepoProgressDto = components['schemas']['TestPyramidRepoProgressDto'];
9909
+ export type TestPyramidLayerCoverageDto = components['schemas']['TestPyramidLayerCoverageDto'];
9910
+ export type TestPyramidLayerCoverageMapDto = components['schemas']['TestPyramidLayerCoverageMapDto'];
9911
+ export type TestPyramidMaturityCountsDto = components['schemas']['TestPyramidMaturityCountsDto'];
9912
+ export type TestPyramidCrossRepoMatchDto = components['schemas']['TestPyramidCrossRepoMatchDto'];
9913
+ export type WorkspaceTestPyramidSummaryDto = components['schemas']['WorkspaceTestPyramidSummaryDto'];
9914
+ export type WorkspaceTestPyramidProgressDto = components['schemas']['WorkspaceTestPyramidProgressDto'];
9671
9915
  export type ReadinessScoreHistoryPointDto = components['schemas']['ReadinessScoreHistoryPointDto'];
9672
9916
  export type ReadinessRepoScoreHistoryDto = components['schemas']['ReadinessRepoScoreHistoryDto'];
9673
9917
  export type WorkspaceReadinessScoreHistoryDto = components['schemas']['WorkspaceReadinessScoreHistoryDto'];
@@ -16253,6 +16497,138 @@ export interface operations {
16253
16497
  };
16254
16498
  };
16255
16499
  };
16500
+ getReadinessTestPyramid: {
16501
+ parameters: {
16502
+ query?: never;
16503
+ header?: never;
16504
+ path: {
16505
+ workspaceId: components["parameters"]["WorkspaceId"];
16506
+ };
16507
+ cookie?: never;
16508
+ };
16509
+ requestBody?: never;
16510
+ responses: {
16511
+ /** @description Latest test-pyramid report and progress */
16512
+ 200: {
16513
+ headers: {
16514
+ [name: string]: unknown;
16515
+ };
16516
+ content: {
16517
+ "application/json": components["schemas"]["WorkspaceTestPyramidProgressDto"];
16518
+ };
16519
+ };
16520
+ 401: components["responses"]["Unauthorized"];
16521
+ 403: components["responses"]["Forbidden"];
16522
+ /** @description Workspace does not exist */
16523
+ 404: {
16524
+ headers: {
16525
+ [name: string]: unknown;
16526
+ };
16527
+ content: {
16528
+ "application/json": components["schemas"]["ErrorMessageDto"];
16529
+ };
16530
+ };
16531
+ /** @description Readiness history is not supported by the configured store */
16532
+ 501: {
16533
+ headers: {
16534
+ [name: string]: unknown;
16535
+ };
16536
+ content: {
16537
+ "application/json": components["schemas"]["ErrorMessageDto"];
16538
+ };
16539
+ };
16540
+ };
16541
+ };
16542
+ getReadinessTestPyramidHistory: {
16543
+ parameters: {
16544
+ query?: {
16545
+ since?: string;
16546
+ limitPerRepo?: number;
16547
+ };
16548
+ header?: never;
16549
+ path: {
16550
+ workspaceId: components["parameters"]["WorkspaceId"];
16551
+ };
16552
+ cookie?: never;
16553
+ };
16554
+ requestBody?: never;
16555
+ responses: {
16556
+ /** @description Test-pyramid history grouped by repository */
16557
+ 200: {
16558
+ headers: {
16559
+ [name: string]: unknown;
16560
+ };
16561
+ content: {
16562
+ "application/json": components["schemas"]["WorkspaceTestPyramidHistoryDto"];
16563
+ };
16564
+ };
16565
+ /** @description Invalid query */
16566
+ 400: {
16567
+ headers: {
16568
+ [name: string]: unknown;
16569
+ };
16570
+ content: {
16571
+ "application/json": components["schemas"]["ErrorMessageDto"];
16572
+ };
16573
+ };
16574
+ 401: components["responses"]["Unauthorized"];
16575
+ 403: components["responses"]["Forbidden"];
16576
+ /** @description Readiness history is not supported by the configured store */
16577
+ 501: {
16578
+ headers: {
16579
+ [name: string]: unknown;
16580
+ };
16581
+ content: {
16582
+ "application/json": components["schemas"]["ErrorMessageDto"];
16583
+ };
16584
+ };
16585
+ };
16586
+ };
16587
+ getReadinessTestPyramidProgress: {
16588
+ parameters: {
16589
+ query?: {
16590
+ since?: string;
16591
+ limitPerRepo?: number;
16592
+ };
16593
+ header?: never;
16594
+ path: {
16595
+ workspaceId: components["parameters"]["WorkspaceId"];
16596
+ };
16597
+ cookie?: never;
16598
+ };
16599
+ requestBody?: never;
16600
+ responses: {
16601
+ /** @description Test-pyramid code progress */
16602
+ 200: {
16603
+ headers: {
16604
+ [name: string]: unknown;
16605
+ };
16606
+ content: {
16607
+ "application/json": components["schemas"]["WorkspaceTestPyramidProgressDto"];
16608
+ };
16609
+ };
16610
+ /** @description Invalid query */
16611
+ 400: {
16612
+ headers: {
16613
+ [name: string]: unknown;
16614
+ };
16615
+ content: {
16616
+ "application/json": components["schemas"]["ErrorMessageDto"];
16617
+ };
16618
+ };
16619
+ 401: components["responses"]["Unauthorized"];
16620
+ 403: components["responses"]["Forbidden"];
16621
+ /** @description Readiness history is not supported by the configured store */
16622
+ 501: {
16623
+ headers: {
16624
+ [name: string]: unknown;
16625
+ };
16626
+ content: {
16627
+ "application/json": components["schemas"]["ErrorMessageDto"];
16628
+ };
16629
+ };
16630
+ };
16631
+ };
16256
16632
  getReadinessScoreHistory: {
16257
16633
  parameters: {
16258
16634
  query?: {