@thinkai/tai-api-contract 2.124.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.
@@ -1,7 +1,7 @@
1
1
  openapi: 3.0.3
2
2
  info:
3
3
  title: ThinkAI API
4
- version: 2.124.0
4
+ version: 2.126.0
5
5
  description: >
6
6
  Contract surface for the AI Driven SDLC backend used by ThinkAI.
7
7
  Workspace-scoped routes use `/workspaces/{workspaceId}/...`.
@@ -6420,6 +6420,134 @@ paths:
6420
6420
  schema:
6421
6421
  $ref: "#/components/schemas/ErrorMessageDto"
6422
6422
 
6423
+ /workspaces/{workspaceId}/readiness/test-pyramid:
6424
+ get:
6425
+ tags: [RepositoryReadiness]
6426
+ summary: Latest test-pyramid report and progress per repository
6427
+ description: >
6428
+ Returns the latest test inventory for every repository with a pyramid snapshot,
6429
+ deltas from the previous and baseline scans, and workspace layer coverage.
6430
+ Repositories whose historical runs predate pyramid snapshots are omitted.
6431
+ operationId: getReadinessTestPyramid
6432
+ parameters:
6433
+ - $ref: "#/components/parameters/WorkspaceId"
6434
+ responses:
6435
+ "200":
6436
+ description: Latest test-pyramid report and progress
6437
+ content:
6438
+ application/json:
6439
+ schema:
6440
+ $ref: "#/components/schemas/WorkspaceTestPyramidProgressDto"
6441
+ "401":
6442
+ $ref: "#/components/responses/Unauthorized"
6443
+ "403":
6444
+ $ref: "#/components/responses/Forbidden"
6445
+ "404":
6446
+ description: Workspace does not exist
6447
+ content:
6448
+ application/json:
6449
+ schema:
6450
+ $ref: "#/components/schemas/ErrorMessageDto"
6451
+ "501":
6452
+ description: Readiness history is not supported by the configured store
6453
+ content:
6454
+ application/json:
6455
+ schema:
6456
+ $ref: "#/components/schemas/ErrorMessageDto"
6457
+
6458
+ /workspaces/{workspaceId}/readiness/test-pyramid/history:
6459
+ get:
6460
+ tags: [RepositoryReadiness]
6461
+ summary: Historical test-pyramid snapshots per repository
6462
+ description: >
6463
+ Returns succeeded readiness runs containing test-pyramid snapshots, ordered oldest
6464
+ to newest per repository. Older runs without snapshots are omitted, not treated as gaps.
6465
+ operationId: getReadinessTestPyramidHistory
6466
+ parameters:
6467
+ - $ref: "#/components/parameters/WorkspaceId"
6468
+ - name: since
6469
+ in: query
6470
+ schema:
6471
+ type: string
6472
+ format: date-time
6473
+ - name: limitPerRepo
6474
+ in: query
6475
+ schema:
6476
+ type: integer
6477
+ minimum: 1
6478
+ maximum: 200
6479
+ default: 50
6480
+ responses:
6481
+ "200":
6482
+ description: Test-pyramid history grouped by repository
6483
+ content:
6484
+ application/json:
6485
+ schema:
6486
+ $ref: "#/components/schemas/WorkspaceTestPyramidHistoryDto"
6487
+ "400":
6488
+ description: Invalid query
6489
+ content:
6490
+ application/json:
6491
+ schema:
6492
+ $ref: "#/components/schemas/ErrorMessageDto"
6493
+ "401":
6494
+ $ref: "#/components/responses/Unauthorized"
6495
+ "403":
6496
+ $ref: "#/components/responses/Forbidden"
6497
+ "501":
6498
+ description: Readiness history is not supported by the configured store
6499
+ content:
6500
+ application/json:
6501
+ schema:
6502
+ $ref: "#/components/schemas/ErrorMessageDto"
6503
+
6504
+ /workspaces/{workspaceId}/readiness/test-pyramid/progress:
6505
+ get:
6506
+ tags: [RepositoryReadiness]
6507
+ summary: Test-pyramid code progress from successive scans
6508
+ description: >
6509
+ Compares each repository's latest pyramid snapshot with its previous and baseline
6510
+ snapshots. Reports layer adoption/removal, file-count and Tests & QA score deltas,
6511
+ criterion changes, and current workspace coverage.
6512
+ operationId: getReadinessTestPyramidProgress
6513
+ parameters:
6514
+ - $ref: "#/components/parameters/WorkspaceId"
6515
+ - name: since
6516
+ in: query
6517
+ schema:
6518
+ type: string
6519
+ format: date-time
6520
+ - name: limitPerRepo
6521
+ in: query
6522
+ schema:
6523
+ type: integer
6524
+ minimum: 1
6525
+ maximum: 200
6526
+ default: 50
6527
+ responses:
6528
+ "200":
6529
+ description: Test-pyramid code progress
6530
+ content:
6531
+ application/json:
6532
+ schema:
6533
+ $ref: "#/components/schemas/WorkspaceTestPyramidProgressDto"
6534
+ "400":
6535
+ description: Invalid query
6536
+ content:
6537
+ application/json:
6538
+ schema:
6539
+ $ref: "#/components/schemas/ErrorMessageDto"
6540
+ "401":
6541
+ $ref: "#/components/responses/Unauthorized"
6542
+ "403":
6543
+ $ref: "#/components/responses/Forbidden"
6544
+ "501":
6545
+ description: Readiness history is not supported by the configured store
6546
+ content:
6547
+ application/json:
6548
+ schema:
6549
+ $ref: "#/components/schemas/ErrorMessageDto"
6550
+
6423
6551
  /workspaces/{workspaceId}/readiness/score-history:
6424
6552
  get:
6425
6553
  tags: [RepositoryReadiness]
@@ -15902,6 +16030,406 @@ components:
15902
16030
  maximum: 100
15903
16031
  description: Dimension score as a percentage (0–100) for this scan run.
15904
16032
 
16033
+ TestPyramidLayerSnapshotDto:
16034
+ type: object
16035
+ required: [present, applicable, confidence, fileCount, frameworks, evidence]
16036
+ properties:
16037
+ present:
16038
+ type: boolean
16039
+ applicable:
16040
+ type: boolean
16041
+ description: False when the repository archetype makes this layer not applicable.
16042
+ confidence:
16043
+ type: string
16044
+ enum: [high, medium, low]
16045
+ fileCount:
16046
+ type: integer
16047
+ minimum: 0
16048
+ frameworks:
16049
+ type: array
16050
+ items:
16051
+ type: string
16052
+ evidence:
16053
+ type: array
16054
+ maxItems: 8
16055
+ items:
16056
+ type: string
16057
+ description: Capped relative file paths or script names supporting the classification.
16058
+ lineCoverage:
16059
+ $ref: "#/components/schemas/TestPyramidLineCoverageDto"
16060
+
16061
+ TestPyramidLayersDto:
16062
+ type: object
16063
+ required: [unit, integration, acceptance_bdd, contract, e2e]
16064
+ properties:
16065
+ unit:
16066
+ $ref: "#/components/schemas/TestPyramidLayerSnapshotDto"
16067
+ integration:
16068
+ $ref: "#/components/schemas/TestPyramidLayerSnapshotDto"
16069
+ acceptance_bdd:
16070
+ $ref: "#/components/schemas/TestPyramidLayerSnapshotDto"
16071
+ contract:
16072
+ $ref: "#/components/schemas/TestPyramidLayerSnapshotDto"
16073
+ e2e:
16074
+ $ref: "#/components/schemas/TestPyramidLayerSnapshotDto"
16075
+
16076
+ TestPyramidSnapshotDto:
16077
+ type: object
16078
+ required: [version, layers, e2eCrossRepoCandidate, e2eReferencedTargets]
16079
+ properties:
16080
+ version:
16081
+ type: integer
16082
+ enum: [1]
16083
+ layers:
16084
+ $ref: "#/components/schemas/TestPyramidLayersDto"
16085
+ e2eCrossRepoCandidate:
16086
+ type: boolean
16087
+ description: Evidence suggests the repository's E2E suite exercises multiple services.
16088
+ e2eReferencedTargets:
16089
+ type: array
16090
+ maxItems: 20
16091
+ items:
16092
+ type: string
16093
+ description: Hostnames or compose service names referenced by the E2E suite.
16094
+ lineCoverage:
16095
+ $ref: "#/components/schemas/TestPyramidLineCoverageDto"
16096
+
16097
+ TestPyramidLineCoverageDto:
16098
+ type: object
16099
+ nullable: true
16100
+ required: [linePercent, branchPercent, source]
16101
+ properties:
16102
+ linePercent:
16103
+ type: number
16104
+ minimum: 0
16105
+ maximum: 100
16106
+ description: Line coverage percent from Sonar or a committed coverage report.
16107
+ branchPercent:
16108
+ type: number
16109
+ minimum: 0
16110
+ maximum: 100
16111
+ nullable: true
16112
+ source:
16113
+ type: string
16114
+ enum: [sonar, jacoco, lcov, cobertura, clover, go_cover]
16115
+ reportPath:
16116
+ type: string
16117
+ nullable: true
16118
+ description: Path of the scanned report when the source is not Sonar.
16119
+
16120
+ TestPyramidCriteriaDto:
16121
+ type: object
16122
+ properties:
16123
+ D1:
16124
+ type: string
16125
+ D2:
16126
+ type: string
16127
+ D3:
16128
+ type: string
16129
+ D4:
16130
+ type: string
16131
+
16132
+ TestPyramidRunStatusDto:
16133
+ type: string
16134
+ description: >-
16135
+ Run state the snapshot came from. The pyramid is derived from the filesystem scan, which
16136
+ finishes before rubric grading, so `partial_failed` and `failed` runs still carry a valid
16137
+ snapshot but no scores.
16138
+ enum: [succeeded, partial_failed, failed]
16139
+
16140
+ TestPyramidHistoryPointDto:
16141
+ type: object
16142
+ required:
16143
+ [finishedAt, runStatus, overallScore, testsQaPercent, testPyramid, testPyramidCriteria]
16144
+ properties:
16145
+ finishedAt:
16146
+ type: string
16147
+ format: date-time
16148
+ runStatus:
16149
+ $ref: "#/components/schemas/TestPyramidRunStatusDto"
16150
+ overallScore:
16151
+ type: integer
16152
+ minimum: 0
16153
+ maximum: 100
16154
+ nullable: true
16155
+ testsQaPercent:
16156
+ type: integer
16157
+ minimum: 0
16158
+ maximum: 100
16159
+ nullable: true
16160
+ testPyramid:
16161
+ $ref: "#/components/schemas/TestPyramidSnapshotDto"
16162
+ testPyramidCriteria:
16163
+ $ref: "#/components/schemas/TestPyramidCriteriaDto"
16164
+
16165
+ TestPyramidRepoHistoryDto:
16166
+ type: object
16167
+ required: [repoId, repoName, connectedAt, points]
16168
+ properties:
16169
+ repoId:
16170
+ type: string
16171
+ format: uuid
16172
+ repoName:
16173
+ type: string
16174
+ connectedAt:
16175
+ type: string
16176
+ format: date-time
16177
+ points:
16178
+ type: array
16179
+ items:
16180
+ $ref: "#/components/schemas/TestPyramidHistoryPointDto"
16181
+
16182
+ WorkspaceTestPyramidHistoryDto:
16183
+ type: object
16184
+ required: [workspaceId, generatedAt, repos]
16185
+ properties:
16186
+ workspaceId:
16187
+ type: string
16188
+ format: uuid
16189
+ generatedAt:
16190
+ type: string
16191
+ format: date-time
16192
+ repos:
16193
+ type: array
16194
+ items:
16195
+ $ref: "#/components/schemas/TestPyramidRepoHistoryDto"
16196
+
16197
+ TestPyramidLayerDeltaDto:
16198
+ type: object
16199
+ required: [presence, fileCountDelta, addedFrameworks]
16200
+ properties:
16201
+ presence:
16202
+ type: string
16203
+ enum: [unchanged, adopted, removed]
16204
+ fileCountDelta:
16205
+ type: integer
16206
+ addedFrameworks:
16207
+ type: array
16208
+ items:
16209
+ type: string
16210
+
16211
+ TestPyramidLayerDeltasDto:
16212
+ type: object
16213
+ required: [unit, integration, acceptance_bdd, contract, e2e]
16214
+ properties:
16215
+ unit:
16216
+ $ref: "#/components/schemas/TestPyramidLayerDeltaDto"
16217
+ integration:
16218
+ $ref: "#/components/schemas/TestPyramidLayerDeltaDto"
16219
+ acceptance_bdd:
16220
+ $ref: "#/components/schemas/TestPyramidLayerDeltaDto"
16221
+ contract:
16222
+ $ref: "#/components/schemas/TestPyramidLayerDeltaDto"
16223
+ e2e:
16224
+ $ref: "#/components/schemas/TestPyramidLayerDeltaDto"
16225
+
16226
+ TestPyramidCriterionDeltaDto:
16227
+ type: object
16228
+ required: [from, to]
16229
+ properties:
16230
+ from:
16231
+ type: string
16232
+ nullable: true
16233
+ to:
16234
+ type: string
16235
+
16236
+ TestPyramidCriterionDeltasDto:
16237
+ type: object
16238
+ properties:
16239
+ D1:
16240
+ $ref: "#/components/schemas/TestPyramidCriterionDeltaDto"
16241
+ D2:
16242
+ $ref: "#/components/schemas/TestPyramidCriterionDeltaDto"
16243
+ D3:
16244
+ $ref: "#/components/schemas/TestPyramidCriterionDeltaDto"
16245
+ D4:
16246
+ $ref: "#/components/schemas/TestPyramidCriterionDeltaDto"
16247
+
16248
+ TestPyramidRepoProgressDto:
16249
+ type: object
16250
+ required:
16251
+ - repoId
16252
+ - repoName
16253
+ - baselineAt
16254
+ - previousAt
16255
+ - currentAt
16256
+ - currentRunStatus
16257
+ - maturity
16258
+ - testsQaPercent
16259
+ - testsQaPercentDelta
16260
+ - layerDeltas
16261
+ - baselineLayerDeltas
16262
+ - criterionDeltas
16263
+ - testPyramid
16264
+ - testPyramidCriteria
16265
+ properties:
16266
+ repoId:
16267
+ type: string
16268
+ format: uuid
16269
+ repoName:
16270
+ type: string
16271
+ baselineAt:
16272
+ type: string
16273
+ format: date-time
16274
+ previousAt:
16275
+ type: string
16276
+ format: date-time
16277
+ nullable: true
16278
+ currentAt:
16279
+ type: string
16280
+ format: date-time
16281
+ currentRunStatus:
16282
+ $ref: "#/components/schemas/TestPyramidRunStatusDto"
16283
+ maturity:
16284
+ type: string
16285
+ enum: [missing, emerging, established, mature]
16286
+ testsQaPercent:
16287
+ type: integer
16288
+ minimum: 0
16289
+ maximum: 100
16290
+ nullable: true
16291
+ testsQaPercentDelta:
16292
+ type: integer
16293
+ nullable: true
16294
+ layerDeltas:
16295
+ $ref: "#/components/schemas/TestPyramidLayerDeltasDto"
16296
+ baselineLayerDeltas:
16297
+ $ref: "#/components/schemas/TestPyramidLayerDeltasDto"
16298
+ criterionDeltas:
16299
+ $ref: "#/components/schemas/TestPyramidCriterionDeltasDto"
16300
+ testPyramid:
16301
+ $ref: "#/components/schemas/TestPyramidSnapshotDto"
16302
+ testPyramidCriteria:
16303
+ $ref: "#/components/schemas/TestPyramidCriteriaDto"
16304
+ lineCoverage:
16305
+ $ref: "#/components/schemas/TestPyramidLineCoverageDto"
16306
+
16307
+ TestPyramidLayerCoverageDto:
16308
+ type: object
16309
+ required: [presentRepos, applicableRepos, percent, missingRepoIds]
16310
+ properties:
16311
+ presentRepos:
16312
+ type: integer
16313
+ minimum: 0
16314
+ applicableRepos:
16315
+ type: integer
16316
+ minimum: 0
16317
+ percent:
16318
+ type: integer
16319
+ minimum: 0
16320
+ maximum: 100
16321
+ nullable: true
16322
+ missingRepoIds:
16323
+ type: array
16324
+ items:
16325
+ type: string
16326
+ format: uuid
16327
+
16328
+ TestPyramidLayerCoverageMapDto:
16329
+ type: object
16330
+ required: [unit, integration, acceptance_bdd, contract, e2e]
16331
+ properties:
16332
+ unit:
16333
+ $ref: "#/components/schemas/TestPyramidLayerCoverageDto"
16334
+ integration:
16335
+ $ref: "#/components/schemas/TestPyramidLayerCoverageDto"
16336
+ acceptance_bdd:
16337
+ $ref: "#/components/schemas/TestPyramidLayerCoverageDto"
16338
+ contract:
16339
+ $ref: "#/components/schemas/TestPyramidLayerCoverageDto"
16340
+ e2e:
16341
+ $ref: "#/components/schemas/TestPyramidLayerCoverageDto"
16342
+
16343
+ TestPyramidMaturityCountsDto:
16344
+ type: object
16345
+ required: [missing, emerging, established, mature]
16346
+ properties:
16347
+ missing:
16348
+ type: integer
16349
+ minimum: 0
16350
+ emerging:
16351
+ type: integer
16352
+ minimum: 0
16353
+ established:
16354
+ type: integer
16355
+ minimum: 0
16356
+ mature:
16357
+ type: integer
16358
+ minimum: 0
16359
+
16360
+ TestPyramidCrossRepoMatchDto:
16361
+ type: object
16362
+ required: [sourceRepoId, targetRepoIds, referencedTargets]
16363
+ properties:
16364
+ sourceRepoId:
16365
+ type: string
16366
+ format: uuid
16367
+ targetRepoIds:
16368
+ type: array
16369
+ items:
16370
+ type: string
16371
+ format: uuid
16372
+ referencedTargets:
16373
+ type: array
16374
+ items:
16375
+ type: string
16376
+
16377
+ WorkspaceTestPyramidSummaryDto:
16378
+ type: object
16379
+ required:
16380
+ - reposWithPyramid
16381
+ - reposFromDegradedRuns
16382
+ - layerCoverage
16383
+ - maturityCounts
16384
+ - e2eCrossRepoCandidateRepoIds
16385
+ - e2eCrossRepoMatches
16386
+ - crossRepoE2ePresent
16387
+ properties:
16388
+ reposWithPyramid:
16389
+ type: integer
16390
+ minimum: 0
16391
+ reposFromDegradedRuns:
16392
+ type: array
16393
+ description: >-
16394
+ Repositories whose newest snapshot came from a run whose rubric grading did not
16395
+ complete. Their pyramid is valid but Tests & QA scores are unavailable.
16396
+ items:
16397
+ type: string
16398
+ format: uuid
16399
+ layerCoverage:
16400
+ $ref: "#/components/schemas/TestPyramidLayerCoverageMapDto"
16401
+ maturityCounts:
16402
+ $ref: "#/components/schemas/TestPyramidMaturityCountsDto"
16403
+ e2eCrossRepoCandidateRepoIds:
16404
+ type: array
16405
+ items:
16406
+ type: string
16407
+ format: uuid
16408
+ e2eCrossRepoMatches:
16409
+ type: array
16410
+ items:
16411
+ $ref: "#/components/schemas/TestPyramidCrossRepoMatchDto"
16412
+ crossRepoE2ePresent:
16413
+ type: boolean
16414
+ description: True only when an E2E target is matched to another repository in the workspace.
16415
+
16416
+ WorkspaceTestPyramidProgressDto:
16417
+ type: object
16418
+ required: [workspaceId, generatedAt, repos, workspace]
16419
+ properties:
16420
+ workspaceId:
16421
+ type: string
16422
+ format: uuid
16423
+ generatedAt:
16424
+ type: string
16425
+ format: date-time
16426
+ repos:
16427
+ type: array
16428
+ items:
16429
+ $ref: "#/components/schemas/TestPyramidRepoProgressDto"
16430
+ workspace:
16431
+ $ref: "#/components/schemas/WorkspaceTestPyramidSummaryDto"
16432
+
15905
16433
  ReadinessScoreHistoryPointDto:
15906
16434
  type: object
15907
16435
  required: [finishedAt, overallScore]
@@ -15918,6 +16446,10 @@ components:
15918
16446
  items:
15919
16447
  $ref: "#/components/schemas/ReadinessScoreHistoryDimensionScoreDto"
15920
16448
  description: Per-dimension percentages captured on this scan run.
16449
+ testPyramid:
16450
+ $ref: "#/components/schemas/TestPyramidSnapshotDto"
16451
+ testPyramidCriteria:
16452
+ $ref: "#/components/schemas/TestPyramidCriteriaDto"
15921
16453
 
15922
16454
  ReadinessRepoScoreHistoryDto:
15923
16455
  type: object
@@ -18905,8 +19437,12 @@ components:
18905
19437
  properties:
18906
19438
  id: { type: string }
18907
19439
  name: { type: string }
19440
+ # Distinct PRs reviewed in the window (not total review events).
18908
19441
  reviewsCount: { type: number }
18909
19442
  sharePct: { type: number }
19443
+ approvalsCount: { type: number }
19444
+ commentsCount: { type: number }
19445
+ changesRequestedCount: { type: number }
18910
19446
 
18911
19447
  InsightsRecommendationsReviewPipeline:
18912
19448
  type: object
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.124.0",
3
+ "version": "2.126.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -18,10 +18,9 @@
18
18
  "default": "./dist/generated/openapi.js"
19
19
  }
20
20
  },
21
- "dependencies": {},
22
21
  "devDependencies": {
23
22
  "@stoplight/spectral-cli": "^6.16.3",
24
- "@types/node": "^26.2.0",
23
+ "@types/node": "^26.4.0",
25
24
  "jsonpath-plus": "^10.3.0",
26
25
  "openapi-typescript": "^7.13.0",
27
26
  "typescript": "~6.0.3"