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