@thinkai/tai-api-contract 2.74.0 → 2.76.0-pr.973.d7782c88
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.
package/openapi/openapi.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
openapi: 3.0.3
|
|
2
2
|
info:
|
|
3
3
|
title: ThinkAI API
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.76.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}/...`.
|
|
@@ -6456,6 +6456,48 @@ paths:
|
|
|
6456
6456
|
schema:
|
|
6457
6457
|
$ref: "#/components/schemas/GithubPermissionsCheckFailedErrorDto"
|
|
6458
6458
|
|
|
6459
|
+
/workspaces/{workspaceId}/readiness/issues/{issueId}/fix-guide:
|
|
6460
|
+
get:
|
|
6461
|
+
tags: [RepositoryReadiness]
|
|
6462
|
+
summary: Get scan-time fix instruction guide (G1–G5)
|
|
6463
|
+
description: >
|
|
6464
|
+
Returns the markdown fix guide written during the latest successful scan for this issue.
|
|
6465
|
+
Applies only to platform-governance criteria **G1–G5** (`guidance` tier). **G6** and other
|
|
6466
|
+
rubrics must use the Automations PR Fix it flow (`POST .../readiness/fixes`). When no guide
|
|
6467
|
+
exists for a legacy run, returns `404` — re-scan the repository to generate instructions.
|
|
6468
|
+
operationId: getReadinessIssueFixGuide
|
|
6469
|
+
parameters:
|
|
6470
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
6471
|
+
- $ref: "#/components/parameters/ReadinessIssueId"
|
|
6472
|
+
responses:
|
|
6473
|
+
"200":
|
|
6474
|
+
description: Fix instruction guide
|
|
6475
|
+
content:
|
|
6476
|
+
application/json:
|
|
6477
|
+
schema:
|
|
6478
|
+
$ref: "#/components/schemas/ReadinessFixGuideDto"
|
|
6479
|
+
"400":
|
|
6480
|
+
description: Issue rubric is not G1–G5 (use PR Fix it for G6 and other criteria)
|
|
6481
|
+
content:
|
|
6482
|
+
application/json:
|
|
6483
|
+
schema:
|
|
6484
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
6485
|
+
examples:
|
|
6486
|
+
not_guidance:
|
|
6487
|
+
value:
|
|
6488
|
+
error: "Fix guide is only available for G1–G5 governance criteria"
|
|
6489
|
+
code: fix_guide_not_guidance
|
|
6490
|
+
"401":
|
|
6491
|
+
$ref: "#/components/responses/Unauthorized"
|
|
6492
|
+
"403":
|
|
6493
|
+
$ref: "#/components/responses/Forbidden"
|
|
6494
|
+
"404":
|
|
6495
|
+
description: Issue not found, or no guide for the latest scan (re-scan to generate)
|
|
6496
|
+
content:
|
|
6497
|
+
application/json:
|
|
6498
|
+
schema:
|
|
6499
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
6500
|
+
|
|
6459
6501
|
/workspaces/{workspaceId}/cursor/platform-key-consent:
|
|
6460
6502
|
put:
|
|
6461
6503
|
tags: [Integrations]
|
|
@@ -7922,6 +7964,14 @@ components:
|
|
|
7922
7964
|
schema:
|
|
7923
7965
|
type: string
|
|
7924
7966
|
format: uuid
|
|
7967
|
+
ReadinessIssueId:
|
|
7968
|
+
name: issueId
|
|
7969
|
+
in: path
|
|
7970
|
+
required: true
|
|
7971
|
+
schema:
|
|
7972
|
+
type: string
|
|
7973
|
+
format: uuid
|
|
7974
|
+
description: Readiness issue id (`tai_workspace_repo_issues.id`).
|
|
7925
7975
|
InsightsProductivityRangeId:
|
|
7926
7976
|
name: rangeId
|
|
7927
7977
|
in: query
|
|
@@ -14063,6 +14113,40 @@ components:
|
|
|
14063
14113
|
type: string
|
|
14064
14114
|
format: date-time
|
|
14065
14115
|
|
|
14116
|
+
ReadinessFixGuideDto:
|
|
14117
|
+
type: object
|
|
14118
|
+
required:
|
|
14119
|
+
[issueId, repoId, rubricId, sourceRunId, status, markdown, criterionTitle]
|
|
14120
|
+
properties:
|
|
14121
|
+
issueId:
|
|
14122
|
+
type: string
|
|
14123
|
+
format: uuid
|
|
14124
|
+
repoId:
|
|
14125
|
+
type: string
|
|
14126
|
+
format: uuid
|
|
14127
|
+
rubricId:
|
|
14128
|
+
type: string
|
|
14129
|
+
maxLength: 16
|
|
14130
|
+
description: G1–G5 rubric criterion id
|
|
14131
|
+
sourceRunId:
|
|
14132
|
+
type: string
|
|
14133
|
+
format: uuid
|
|
14134
|
+
description: Readiness scan run that produced this guide
|
|
14135
|
+
status:
|
|
14136
|
+
type: string
|
|
14137
|
+
enum: [ready, failed]
|
|
14138
|
+
markdown:
|
|
14139
|
+
type: string
|
|
14140
|
+
description: Sanitized markdown body including server-appended Re-scan section
|
|
14141
|
+
criterionTitle:
|
|
14142
|
+
type: string
|
|
14143
|
+
maxLength: 256
|
|
14144
|
+
description: Human-readable criterion label for page chrome
|
|
14145
|
+
errorDetail:
|
|
14146
|
+
type: string
|
|
14147
|
+
nullable: true
|
|
14148
|
+
description: Present when status is failed (guide assembly error at scan time)
|
|
14149
|
+
|
|
14066
14150
|
FixRetryableErrorCode:
|
|
14067
14151
|
type: string
|
|
14068
14152
|
enum:
|
|
@@ -15760,6 +15844,9 @@ components:
|
|
|
15760
15844
|
team: { type: string }
|
|
15761
15845
|
spendUsd: { type: number }
|
|
15762
15846
|
mergedPrs: { type: number }
|
|
15847
|
+
isUnmapped:
|
|
15848
|
+
type: boolean
|
|
15849
|
+
description: True when the engineer is a GitHub contributor not mapped to an org-chart team.
|
|
15763
15850
|
|
|
15764
15851
|
InsightsRecommendationsRoiQuadrant:
|
|
15765
15852
|
type: object
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thinkai/tai-api-contract",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.76.0-pr.973.d7782c88",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@stoplight/spectral-cli": "^6.16.2",
|
|
24
|
-
"@types/node": "^26.1.
|
|
24
|
+
"@types/node": "^26.1.2",
|
|
25
25
|
"jsonpath-plus": "^10.3.0",
|
|
26
26
|
"openapi-typescript": "^7.13.0",
|
|
27
27
|
"typescript": "~6.0.3"
|
package/src/generated/openapi.ts
CHANGED
|
@@ -2467,6 +2467,26 @@ export interface paths {
|
|
|
2467
2467
|
patch?: never;
|
|
2468
2468
|
trace?: never;
|
|
2469
2469
|
};
|
|
2470
|
+
"/workspaces/{workspaceId}/readiness/issues/{issueId}/fix-guide": {
|
|
2471
|
+
parameters: {
|
|
2472
|
+
query?: never;
|
|
2473
|
+
header?: never;
|
|
2474
|
+
path?: never;
|
|
2475
|
+
cookie?: never;
|
|
2476
|
+
};
|
|
2477
|
+
/**
|
|
2478
|
+
* Get scan-time fix instruction guide (G1–G5)
|
|
2479
|
+
* @description Returns the markdown fix guide written during the latest successful scan for this issue. Applies only to platform-governance criteria **G1–G5** (`guidance` tier). **G6** and other rubrics must use the Automations PR Fix it flow (`POST .../readiness/fixes`). When no guide exists for a legacy run, returns `404` — re-scan the repository to generate instructions.
|
|
2480
|
+
*/
|
|
2481
|
+
get: operations["getReadinessIssueFixGuide"];
|
|
2482
|
+
put?: never;
|
|
2483
|
+
post?: never;
|
|
2484
|
+
delete?: never;
|
|
2485
|
+
options?: never;
|
|
2486
|
+
head?: never;
|
|
2487
|
+
patch?: never;
|
|
2488
|
+
trace?: never;
|
|
2489
|
+
};
|
|
2470
2490
|
"/workspaces/{workspaceId}/cursor/platform-key-consent": {
|
|
2471
2491
|
parameters: {
|
|
2472
2492
|
query?: never;
|
|
@@ -5936,6 +5956,27 @@ export interface components {
|
|
|
5936
5956
|
/** Format: date-time */
|
|
5937
5957
|
createdAt: string;
|
|
5938
5958
|
};
|
|
5959
|
+
ReadinessFixGuideDto: {
|
|
5960
|
+
/** Format: uuid */
|
|
5961
|
+
issueId: string;
|
|
5962
|
+
/** Format: uuid */
|
|
5963
|
+
repoId: string;
|
|
5964
|
+
/** @description G1–G5 rubric criterion id */
|
|
5965
|
+
rubricId: string;
|
|
5966
|
+
/**
|
|
5967
|
+
* Format: uuid
|
|
5968
|
+
* @description Readiness scan run that produced this guide
|
|
5969
|
+
*/
|
|
5970
|
+
sourceRunId: string;
|
|
5971
|
+
/** @enum {string} */
|
|
5972
|
+
status: "ready" | "failed";
|
|
5973
|
+
/** @description Sanitized markdown body including server-appended Re-scan section */
|
|
5974
|
+
markdown: string;
|
|
5975
|
+
/** @description Human-readable criterion label for page chrome */
|
|
5976
|
+
criterionTitle: string;
|
|
5977
|
+
/** @description Present when status is failed (guide assembly error at scan time) */
|
|
5978
|
+
errorDetail?: string | null;
|
|
5979
|
+
};
|
|
5939
5980
|
/**
|
|
5940
5981
|
* @description Transient failure codes. Use the retrigger endpoint to start a fresh fix request. `processor_error` — unexpected internal failure; safe to retrigger after checking batch-runner logs.
|
|
5941
5982
|
* @enum {string}
|
|
@@ -6754,6 +6795,8 @@ export interface components {
|
|
|
6754
6795
|
team: string;
|
|
6755
6796
|
spendUsd: number;
|
|
6756
6797
|
mergedPrs: number;
|
|
6798
|
+
/** @description True when the engineer is a GitHub contributor not mapped to an org-chart team. */
|
|
6799
|
+
isUnmapped?: boolean;
|
|
6757
6800
|
};
|
|
6758
6801
|
InsightsRecommendationsRoiQuadrant: {
|
|
6759
6802
|
medianSpendUsd: number;
|
|
@@ -6933,6 +6976,8 @@ export interface components {
|
|
|
6933
6976
|
/** @description Privacy request id (`tai_privacy_requests.id`). */
|
|
6934
6977
|
PrivacyRequestId: string;
|
|
6935
6978
|
FixId: string;
|
|
6979
|
+
/** @description Readiness issue id (`tai_workspace_repo_issues.id`). */
|
|
6980
|
+
ReadinessIssueId: string;
|
|
6936
6981
|
/** @description Productivity insights time range. Daily windows: `7d`, `30d`, `90d`, `180d`, or custom `cr:YYYY-MM-DD:YYYY-MM-DD`. Weekly legacy: `4w`, `8w`, `q` (12 weeks), `12w`, `16w`. Omit when using explicit `from`/`to` day bounds. */
|
|
6937
6982
|
InsightsProductivityRangeId: string;
|
|
6938
6983
|
/** @description Inclusive start of a daily window (`YYYY-MM-DD`). When set with `to`, overrides `rangeId` for day-mode responses (max 180 days). */
|
|
@@ -7222,6 +7267,7 @@ export type ReadinessFixStatusSummaryDto = components['schemas']['ReadinessFixSt
|
|
|
7222
7267
|
export type GithubInstalledRepoListDto = components['schemas']['GithubInstalledRepoListDto'];
|
|
7223
7268
|
export type AgenticFoundationDashboardDto = components['schemas']['AgenticFoundationDashboardDto'];
|
|
7224
7269
|
export type FixRequestDto = components['schemas']['FixRequestDto'];
|
|
7270
|
+
export type ReadinessFixGuideDto = components['schemas']['ReadinessFixGuideDto'];
|
|
7225
7271
|
export type FixRetryableErrorCode = components['schemas']['FixRetryableErrorCode'];
|
|
7226
7272
|
export type FixNonRetryableErrorCode = components['schemas']['FixNonRetryableErrorCode'];
|
|
7227
7273
|
export type CreateFixRequestBodyDto = components['schemas']['CreateFixRequestBodyDto'];
|
|
@@ -7351,6 +7397,7 @@ export type ParameterWorkspaceMemberId = components['parameters']['WorkspaceMemb
|
|
|
7351
7397
|
export type ParameterWorkspaceInvitationToken = components['parameters']['WorkspaceInvitationToken'];
|
|
7352
7398
|
export type ParameterPrivacyRequestId = components['parameters']['PrivacyRequestId'];
|
|
7353
7399
|
export type ParameterFixId = components['parameters']['FixId'];
|
|
7400
|
+
export type ParameterReadinessIssueId = components['parameters']['ReadinessIssueId'];
|
|
7354
7401
|
export type ParameterInsightsProductivityRangeId = components['parameters']['InsightsProductivityRangeId'];
|
|
7355
7402
|
export type ParameterInsightsProductivityFrom = components['parameters']['InsightsProductivityFrom'];
|
|
7356
7403
|
export type ParameterInsightsProductivityTo = components['parameters']['InsightsProductivityTo'];
|
|
@@ -13904,6 +13951,50 @@ export interface operations {
|
|
|
13904
13951
|
};
|
|
13905
13952
|
};
|
|
13906
13953
|
};
|
|
13954
|
+
getReadinessIssueFixGuide: {
|
|
13955
|
+
parameters: {
|
|
13956
|
+
query?: never;
|
|
13957
|
+
header?: never;
|
|
13958
|
+
path: {
|
|
13959
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
13960
|
+
/** @description Readiness issue id (`tai_workspace_repo_issues.id`). */
|
|
13961
|
+
issueId: components["parameters"]["ReadinessIssueId"];
|
|
13962
|
+
};
|
|
13963
|
+
cookie?: never;
|
|
13964
|
+
};
|
|
13965
|
+
requestBody?: never;
|
|
13966
|
+
responses: {
|
|
13967
|
+
/** @description Fix instruction guide */
|
|
13968
|
+
200: {
|
|
13969
|
+
headers: {
|
|
13970
|
+
[name: string]: unknown;
|
|
13971
|
+
};
|
|
13972
|
+
content: {
|
|
13973
|
+
"application/json": components["schemas"]["ReadinessFixGuideDto"];
|
|
13974
|
+
};
|
|
13975
|
+
};
|
|
13976
|
+
/** @description Issue rubric is not G1–G5 (use PR Fix it for G6 and other criteria) */
|
|
13977
|
+
400: {
|
|
13978
|
+
headers: {
|
|
13979
|
+
[name: string]: unknown;
|
|
13980
|
+
};
|
|
13981
|
+
content: {
|
|
13982
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
13983
|
+
};
|
|
13984
|
+
};
|
|
13985
|
+
401: components["responses"]["Unauthorized"];
|
|
13986
|
+
403: components["responses"]["Forbidden"];
|
|
13987
|
+
/** @description Issue not found, or no guide for the latest scan (re-scan to generate) */
|
|
13988
|
+
404: {
|
|
13989
|
+
headers: {
|
|
13990
|
+
[name: string]: unknown;
|
|
13991
|
+
};
|
|
13992
|
+
content: {
|
|
13993
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
13994
|
+
};
|
|
13995
|
+
};
|
|
13996
|
+
};
|
|
13997
|
+
};
|
|
13907
13998
|
putCursorPlatformKeyConsent: {
|
|
13908
13999
|
parameters: {
|
|
13909
14000
|
query?: never;
|