@thinkai/tai-api-contract 2.103.0 → 2.105.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.103.0
4
+ version: 2.105.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}/...`.
@@ -6220,6 +6220,68 @@ paths:
6220
6220
  schema:
6221
6221
  $ref: "#/components/schemas/ErrorMessageDto"
6222
6222
 
6223
+ /workspaces/{workspaceId}/readiness/score-history/average:
6224
+ get:
6225
+ tags: [RepositoryReadiness]
6226
+ summary: Workspace-average readiness score time-series
6227
+ description: >
6228
+ Returns pre-aggregated workspace-average readiness scores over time, aligned with
6229
+ agentic-foundation `summary.averageOverallScore`. Each point reflects the mean of each
6230
+ repo's latest succeeded run score over **totalRepoCount** (unscanned repos count as 0%).
6231
+ Per-repo input runs are loaded without applying `since` so repos scanned before the window
6232
+ still contribute carry-forward scores; `since` filters **returned** points only. Appends a
6233
+ final point from the live dashboard summary when the current average differs from the last
6234
+ visible point (or when the filtered window is empty). `limitPerRepo` bounds how many
6235
+ succeeded runs per repo are considered when building the series.
6236
+ operationId: getReadinessAverageScoreHistory
6237
+ parameters:
6238
+ - $ref: "#/components/parameters/WorkspaceId"
6239
+ - name: since
6240
+ in: query
6241
+ description: >
6242
+ ISO-8601 lower bound on returned point `finishedAt` (inclusive). Per-repo input
6243
+ runs are loaded without this filter so scores established before the window still
6244
+ contribute to aggregation.
6245
+ schema:
6246
+ type: string
6247
+ format: date-time
6248
+ - name: limitPerRepo
6249
+ in: query
6250
+ schema:
6251
+ type: integer
6252
+ minimum: 1
6253
+ maximum: 200
6254
+ default: 50
6255
+ responses:
6256
+ "200":
6257
+ description: Workspace-average score history
6258
+ content:
6259
+ application/json:
6260
+ schema:
6261
+ $ref: "#/components/schemas/WorkspaceAverageReadinessScoreHistoryDto"
6262
+ "400":
6263
+ description: Invalid query
6264
+ content:
6265
+ application/json:
6266
+ schema:
6267
+ $ref: "#/components/schemas/ErrorMessageDto"
6268
+ "401":
6269
+ $ref: "#/components/responses/Unauthorized"
6270
+ "403":
6271
+ $ref: "#/components/responses/Forbidden"
6272
+ "404":
6273
+ description: Workspace does not exist
6274
+ content:
6275
+ application/json:
6276
+ schema:
6277
+ $ref: "#/components/schemas/ErrorMessageDto"
6278
+ "501":
6279
+ description: Readiness score history or dashboard summary not supported
6280
+ content:
6281
+ application/json:
6282
+ schema:
6283
+ $ref: "#/components/schemas/ErrorMessageDto"
6284
+
6223
6285
  /workspaces/{workspaceId}/agentic-foundation/repo-scope:
6224
6286
  put:
6225
6287
  tags: [AgenticFoundation]
@@ -14935,6 +14997,14 @@ components:
14935
14997
  type: array
14936
14998
  items:
14937
14999
  $ref: "#/components/schemas/ReadinessIssueDto"
15000
+ openIssueCount:
15001
+ type: integer
15002
+ minimum: 0
15003
+ description: Count of issues with fixStatus=open. Prefer over scanning issues[] on list projections.
15004
+ criticalOpenIssueCount:
15005
+ type: integer
15006
+ minimum: 0
15007
+ description: Open issues with severity=critical.
14938
15008
 
14939
15009
  DimensionScoreDetailDto:
14940
15010
  type: object
@@ -14973,6 +15043,14 @@ components:
14973
15043
  type: array
14974
15044
  items:
14975
15045
  $ref: "#/components/schemas/ReadinessIssueDto"
15046
+ openIssueCount:
15047
+ type: integer
15048
+ minimum: 0
15049
+ description: Count of issues with fixStatus=open.
15050
+ criticalOpenIssueCount:
15051
+ type: integer
15052
+ minimum: 0
15053
+ description: Open issues with severity=critical.
14976
15054
 
14977
15055
  ReadinessRepoRunHistoryItemDto:
14978
15056
  type: object
@@ -15084,6 +15162,30 @@ components:
15084
15162
  items:
15085
15163
  $ref: "#/components/schemas/ReadinessRepoScoreHistoryDto"
15086
15164
 
15165
+ WorkspaceAverageReadinessScoreHistoryDto:
15166
+ type: object
15167
+ required: [workspaceId, generatedAt, totalRepoCount, points]
15168
+ properties:
15169
+ workspaceId:
15170
+ type: string
15171
+ format: uuid
15172
+ generatedAt:
15173
+ type: string
15174
+ format: date-time
15175
+ totalRepoCount:
15176
+ type: integer
15177
+ minimum: 0
15178
+ description: >
15179
+ All non-archived repos in the workspace (denominator for average; unscored repos
15180
+ count as 0%).
15181
+ points:
15182
+ type: array
15183
+ items:
15184
+ $ref: "#/components/schemas/ReadinessScoreHistoryPointDto"
15185
+ description: >
15186
+ Workspace-average score after each scan event, ascending by `finishedAt`. May include
15187
+ a final point from the live dashboard summary.
15188
+
15087
15189
  RepoReadinessScoreDto:
15088
15190
  type: object
15089
15191
  required:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.103.0",
3
+ "version": "2.105.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -2332,6 +2332,26 @@ export interface paths {
2332
2332
  patch?: never;
2333
2333
  trace?: never;
2334
2334
  };
2335
+ "/workspaces/{workspaceId}/readiness/score-history/average": {
2336
+ parameters: {
2337
+ query?: never;
2338
+ header?: never;
2339
+ path?: never;
2340
+ cookie?: never;
2341
+ };
2342
+ /**
2343
+ * Workspace-average readiness score time-series
2344
+ * @description Returns pre-aggregated workspace-average readiness scores over time, aligned with agentic-foundation `summary.averageOverallScore`. Each point reflects the mean of each repo's latest succeeded run score over **totalRepoCount** (unscanned repos count as 0%). Per-repo input runs are loaded without applying `since` so repos scanned before the window still contribute carry-forward scores; `since` filters **returned** points only. Appends a final point from the live dashboard summary when the current average differs from the last visible point (or when the filtered window is empty). `limitPerRepo` bounds how many succeeded runs per repo are considered when building the series.
2345
+ */
2346
+ get: operations["getReadinessAverageScoreHistory"];
2347
+ put?: never;
2348
+ post?: never;
2349
+ delete?: never;
2350
+ options?: never;
2351
+ head?: never;
2352
+ patch?: never;
2353
+ trace?: never;
2354
+ };
2335
2355
  "/workspaces/{workspaceId}/agentic-foundation/repo-scope": {
2336
2356
  parameters: {
2337
2357
  query?: never;
@@ -6352,6 +6372,10 @@ export interface components {
6352
6372
  /** @description Per-criterion status counts from the latest successful scan */
6353
6373
  criteriaSummary?: components["schemas"]["ReadinessCriteriaSummaryDto"] | null;
6354
6374
  issues: components["schemas"]["ReadinessIssueDto"][];
6375
+ /** @description Count of issues with fixStatus=open. Prefer over scanning issues[] on list projections. */
6376
+ openIssueCount?: number;
6377
+ /** @description Open issues with severity=critical. */
6378
+ criticalOpenIssueCount?: number;
6355
6379
  };
6356
6380
  DimensionScoreDetailDto: {
6357
6381
  dimensionId: components["schemas"]["ReadinessDimensionId"];
@@ -6366,6 +6390,10 @@ export interface components {
6366
6390
  /** @description Individual rubric criterion outcomes from the latest successful scan. Always present on the single-repo detail endpoint; empty array when no scan has completed yet for this dimension. */
6367
6391
  criteriaDetails: components["schemas"]["CriterionDetailDto"][];
6368
6392
  issues: components["schemas"]["ReadinessIssueDto"][];
6393
+ /** @description Count of issues with fixStatus=open. */
6394
+ openIssueCount?: number;
6395
+ /** @description Open issues with severity=critical. */
6396
+ criticalOpenIssueCount?: number;
6369
6397
  };
6370
6398
  ReadinessRepoRunHistoryItemDto: {
6371
6399
  /** Format: uuid */
@@ -6416,6 +6444,16 @@ export interface components {
6416
6444
  generatedAt: string;
6417
6445
  repos: components["schemas"]["ReadinessRepoScoreHistoryDto"][];
6418
6446
  };
6447
+ WorkspaceAverageReadinessScoreHistoryDto: {
6448
+ /** Format: uuid */
6449
+ workspaceId: string;
6450
+ /** Format: date-time */
6451
+ generatedAt: string;
6452
+ /** @description All non-archived repos in the workspace (denominator for average; unscored repos count as 0%). */
6453
+ totalRepoCount: number;
6454
+ /** @description Workspace-average score after each scan event, ascending by `finishedAt`. May include a final point from the live dashboard summary. */
6455
+ points: components["schemas"]["ReadinessScoreHistoryPointDto"][];
6456
+ };
6419
6457
  RepoReadinessScoreDto: {
6420
6458
  /** Format: uuid */
6421
6459
  repoId: string;
@@ -8650,6 +8688,7 @@ export type ReadinessScoreHistoryDimensionScoreDto = components['schemas']['Read
8650
8688
  export type ReadinessScoreHistoryPointDto = components['schemas']['ReadinessScoreHistoryPointDto'];
8651
8689
  export type ReadinessRepoScoreHistoryDto = components['schemas']['ReadinessRepoScoreHistoryDto'];
8652
8690
  export type WorkspaceReadinessScoreHistoryDto = components['schemas']['WorkspaceReadinessScoreHistoryDto'];
8691
+ export type WorkspaceAverageReadinessScoreHistoryDto = components['schemas']['WorkspaceAverageReadinessScoreHistoryDto'];
8653
8692
  export type RepoReadinessScoreDto = components['schemas']['RepoReadinessScoreDto'];
8654
8693
  export type LinkedRolePendingDto = components['schemas']['LinkedRolePendingDto'];
8655
8694
  export type LinkedRoleAssessmentDto = components['schemas']['LinkedRoleAssessmentDto'];
@@ -15016,6 +15055,61 @@ export interface operations {
15016
15055
  };
15017
15056
  };
15018
15057
  };
15058
+ getReadinessAverageScoreHistory: {
15059
+ parameters: {
15060
+ query?: {
15061
+ /** @description ISO-8601 lower bound on returned point `finishedAt` (inclusive). Per-repo input runs are loaded without this filter so scores established before the window still contribute to aggregation. */
15062
+ since?: string;
15063
+ limitPerRepo?: number;
15064
+ };
15065
+ header?: never;
15066
+ path: {
15067
+ workspaceId: components["parameters"]["WorkspaceId"];
15068
+ };
15069
+ cookie?: never;
15070
+ };
15071
+ requestBody?: never;
15072
+ responses: {
15073
+ /** @description Workspace-average score history */
15074
+ 200: {
15075
+ headers: {
15076
+ [name: string]: unknown;
15077
+ };
15078
+ content: {
15079
+ "application/json": components["schemas"]["WorkspaceAverageReadinessScoreHistoryDto"];
15080
+ };
15081
+ };
15082
+ /** @description Invalid query */
15083
+ 400: {
15084
+ headers: {
15085
+ [name: string]: unknown;
15086
+ };
15087
+ content: {
15088
+ "application/json": components["schemas"]["ErrorMessageDto"];
15089
+ };
15090
+ };
15091
+ 401: components["responses"]["Unauthorized"];
15092
+ 403: components["responses"]["Forbidden"];
15093
+ /** @description Workspace does not exist */
15094
+ 404: {
15095
+ headers: {
15096
+ [name: string]: unknown;
15097
+ };
15098
+ content: {
15099
+ "application/json": components["schemas"]["ErrorMessageDto"];
15100
+ };
15101
+ };
15102
+ /** @description Readiness score history or dashboard summary not supported */
15103
+ 501: {
15104
+ headers: {
15105
+ [name: string]: unknown;
15106
+ };
15107
+ content: {
15108
+ "application/json": components["schemas"]["ErrorMessageDto"];
15109
+ };
15110
+ };
15111
+ };
15112
+ };
15019
15113
  putAgenticFoundationRepoScope: {
15020
15114
  parameters: {
15021
15115
  query?: never;