@thinkai/tai-api-contract 2.31.0-pr.731.2 → 2.32.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.
- package/dist/generated/openapi.d.ts +85 -171
- package/dist/generated/openapi.d.ts.map +1 -1
- package/openapi/openapi.yaml +64 -258
- package/package.json +1 -1
- package/src/generated/openapi.ts +85 -171
package/src/generated/openapi.ts
CHANGED
|
@@ -1130,7 +1130,7 @@ export interface paths {
|
|
|
1130
1130
|
};
|
|
1131
1131
|
/**
|
|
1132
1132
|
* Single repo readiness
|
|
1133
|
-
* @description Returns one stored repository scorecard with all
|
|
1133
|
+
* @description Returns one stored repository scorecard with all nine dimensions, nested issues, and per-dimension criteria detail breakdown (criteriaDetails required on each dimension). Unknown `repoId` or a repo that belongs to another workspace returns `404` (no cross-tenant leakage).
|
|
1134
1134
|
*/
|
|
1135
1135
|
get: operations["getReadinessRepo"];
|
|
1136
1136
|
put?: never;
|
|
@@ -1386,6 +1386,26 @@ export interface paths {
|
|
|
1386
1386
|
patch?: never;
|
|
1387
1387
|
trace?: never;
|
|
1388
1388
|
};
|
|
1389
|
+
"/workspaces/{workspaceId}/agentic-foundation/token-efficiency": {
|
|
1390
|
+
parameters: {
|
|
1391
|
+
query?: never;
|
|
1392
|
+
header?: never;
|
|
1393
|
+
path?: never;
|
|
1394
|
+
cookie?: never;
|
|
1395
|
+
};
|
|
1396
|
+
/**
|
|
1397
|
+
* Token Efficiency pillar (token-efficiency slice)
|
|
1398
|
+
* @description Returns `RepoReadinessScoreDetailDto` rows with only the `token-efficiency` dimension populated per repo, including criteriaDetails for that dimension (rubric Section I).
|
|
1399
|
+
*/
|
|
1400
|
+
get: operations["getAgenticFoundationTokenEfficiency"];
|
|
1401
|
+
put?: never;
|
|
1402
|
+
post?: never;
|
|
1403
|
+
delete?: never;
|
|
1404
|
+
options?: never;
|
|
1405
|
+
head?: never;
|
|
1406
|
+
patch?: never;
|
|
1407
|
+
trace?: never;
|
|
1408
|
+
};
|
|
1389
1409
|
"/workspaces/{workspaceId}/agentic-foundation/delivery-governance": {
|
|
1390
1410
|
parameters: {
|
|
1391
1411
|
query?: never;
|
|
@@ -1530,30 +1550,6 @@ export interface paths {
|
|
|
1530
1550
|
patch?: never;
|
|
1531
1551
|
trace?: never;
|
|
1532
1552
|
};
|
|
1533
|
-
"/workspaces/{workspaceId}/repo-eligibility": {
|
|
1534
|
-
parameters: {
|
|
1535
|
-
query?: never;
|
|
1536
|
-
header?: never;
|
|
1537
|
-
path?: never;
|
|
1538
|
-
cookie?: never;
|
|
1539
|
-
};
|
|
1540
|
-
/**
|
|
1541
|
-
* Get repo-sync eligibility gate (defaults + per-workspace overrides)
|
|
1542
|
-
* @description Returns the effective repo-sync eligibility gate (archived / fork / size / count) for the workspace: the global `defaults`, any per-workspace `overrides`, the merged `effective` values, and whether the caller can edit without platform-admin (`canEditUnrestricted`). Member-level read access.
|
|
1543
|
-
*/
|
|
1544
|
-
get: operations["getWorkspaceRepoEligibility"];
|
|
1545
|
-
/**
|
|
1546
|
-
* Set per-workspace repo-sync eligibility overrides
|
|
1547
|
-
* @description Set (or clear, with an empty `overrides`) the per-workspace repo-sync eligibility overrides. **Platform admins** may set any value (raise caps, `0` = unlimited, include archived/forks). **Workspace admins** may only make the gate *more restrictive* than the platform defaults (lower caps, exclude archived/forks) — exceeding a platform limit returns `403` (`repo_eligibility_bound_exceeded`). Requires workspace admin or platform admin.
|
|
1548
|
-
*/
|
|
1549
|
-
put: operations["putWorkspaceRepoEligibility"];
|
|
1550
|
-
post?: never;
|
|
1551
|
-
delete?: never;
|
|
1552
|
-
options?: never;
|
|
1553
|
-
head?: never;
|
|
1554
|
-
patch?: never;
|
|
1555
|
-
trace?: never;
|
|
1556
|
-
};
|
|
1557
1553
|
"/workspaces/{workspaceId}/readiness/cursor-key-usage": {
|
|
1558
1554
|
parameters: {
|
|
1559
1555
|
query?: never;
|
|
@@ -2138,6 +2134,13 @@ export interface components {
|
|
|
2138
2134
|
hasAnalyticsToken: boolean;
|
|
2139
2135
|
/** @description Whether the Claude Code execution key is stored. If false and `claudePlatformKeyEnabled` is true in `WorkspaceConfigDto`, the platform key will be used for readiness runs (additional cost applies). */
|
|
2140
2136
|
hasExecutionToken: boolean;
|
|
2137
|
+
/**
|
|
2138
|
+
* @description Kind of stored insights credential (derived from the active plan's key). `admin` for Team Console Admin keys (`sk-ant-admin…`); `analytics` for Enterprise Analytics keys.
|
|
2139
|
+
* @enum {string}
|
|
2140
|
+
*/
|
|
2141
|
+
insightsCredentialKind?: "admin" | "analytics" | "unknown";
|
|
2142
|
+
/** @description Masked preview of the stored insights key (prefix + last four characters). Never includes the full secret. */
|
|
2143
|
+
insightsTokenHint?: string;
|
|
2141
2144
|
};
|
|
2142
2145
|
/**
|
|
2143
2146
|
* @description The agent execution account used for Agentic Foundation runs (readiness scanner + fix queue). Exactly one is active per workspace.
|
|
@@ -2756,56 +2759,6 @@ export interface components {
|
|
|
2756
2759
|
* @description Last push or metadata update from GitHub when available.
|
|
2757
2760
|
*/
|
|
2758
2761
|
updatedAt?: string | null;
|
|
2759
|
-
/** @description True when the repository is archived (read-only on GitHub). */
|
|
2760
|
-
archived?: boolean | null;
|
|
2761
|
-
/** @description True when the repository is a fork of another repository. */
|
|
2762
|
-
fork?: boolean | null;
|
|
2763
|
-
/** @description True when the repository is disabled on GitHub. */
|
|
2764
|
-
disabled?: boolean | null;
|
|
2765
|
-
/** @description Repository size in KB as reported by GitHub. */
|
|
2766
|
-
size?: number | null;
|
|
2767
|
-
/** @description True when the GitHub App installation lacks push access to this repo (read-only). Read-only repos are rejected during sync because readiness fixes require write access. */
|
|
2768
|
-
readOnly?: boolean | null;
|
|
2769
|
-
/** @description Set when this repo was skipped during sync due to an eligibility check. The frontend should display this as an inline explanation (e.g. "This repo is archived"). */
|
|
2770
|
-
ineligibleReason?: string | null;
|
|
2771
|
-
/**
|
|
2772
|
-
* @description Language-based eligibility for Agentic-Foundation readiness analysis (issue #44). `ineligible` repos (no supported stack) render read-only/orange in the AF list with no analyze/score/fix actions. Mixed monorepos with a supported secondary stack are `eligible`. Distinct from `ineligibleReason`, which reflects the structural sync gate.
|
|
2773
|
-
* @enum {string|null}
|
|
2774
|
-
*/
|
|
2775
|
-
eligibilityStatus?: "eligible" | "ineligible" | null;
|
|
2776
|
-
/** @description Human-readable explanation when `eligibilityStatus` is `ineligible` (e.g. "This repository's primary language (Python) is not supported in v1"). */
|
|
2777
|
-
eligibilityReason?: string | null;
|
|
2778
|
-
/** @description Dominant supported stack (by GitHub language bytes), one of backend_jvm | ios_app | web_spa | backend_go | backend_python. Null for ineligible repos. */
|
|
2779
|
-
primaryStack?: string | null;
|
|
2780
|
-
/** @description Second supported stack for a multi-stack repo, or null. */
|
|
2781
|
-
secondaryStack?: string | null;
|
|
2782
|
-
/** @description All supported stacks detected for the repo (ordered, primary first). Empty/null when no supported stack is present. Drives multi-stack scanning and the orange mixed-monorepo box in the AF UI. */
|
|
2783
|
-
supportedStacks?: string[] | null;
|
|
2784
|
-
};
|
|
2785
|
-
/** @description Resolved repo-sync eligibility gate (defaults or effective). All fields present. */
|
|
2786
|
-
RepoEligibilityConfigDto: {
|
|
2787
|
-
/** @description Skip archived repos during GitHub repo sync. */
|
|
2788
|
-
excludeArchived: boolean;
|
|
2789
|
-
/** @description Skip forked repos. Forks are included by default. */
|
|
2790
|
-
excludeForks: boolean;
|
|
2791
|
-
/** @description Max repo size in KB (GitHub-reported). 0 = no limit. */
|
|
2792
|
-
maxRepoSizeKb: number;
|
|
2793
|
-
/** @description Max repos materialized per workspace per sync. 0 = no limit. */
|
|
2794
|
-
maxReposPerWorkspace: number;
|
|
2795
|
-
};
|
|
2796
|
-
/** @description Per-workspace overrides for the repo-sync eligibility gate. Any field present wins over the global default; omit a field to inherit the default. An empty object clears all overrides. */
|
|
2797
|
-
RepoEligibilityOverridesDto: {
|
|
2798
|
-
excludeArchived?: boolean | null;
|
|
2799
|
-
excludeForks?: boolean | null;
|
|
2800
|
-
maxRepoSizeKb?: number | null;
|
|
2801
|
-
maxReposPerWorkspace?: number | null;
|
|
2802
|
-
};
|
|
2803
|
-
WorkspaceRepoEligibilityDto: {
|
|
2804
|
-
defaults: components["schemas"]["RepoEligibilityConfigDto"];
|
|
2805
|
-
overrides: components["schemas"]["RepoEligibilityOverridesDto"];
|
|
2806
|
-
effective: components["schemas"]["RepoEligibilityConfigDto"];
|
|
2807
|
-
/** @description True when the caller is a platform admin (may set any value, incl. raising caps). */
|
|
2808
|
-
canEditUnrestricted: boolean;
|
|
2809
2762
|
};
|
|
2810
2763
|
GithubMissingPermissionDto: {
|
|
2811
2764
|
/** @description GitHub App permission key (e.g. contents, pull_requests). */
|
|
@@ -3058,7 +3011,7 @@ export interface components {
|
|
|
3058
3011
|
* @description Workspace readiness scoring dimension
|
|
3059
3012
|
* @enum {string}
|
|
3060
3013
|
*/
|
|
3061
|
-
ReadinessDimensionId: "ai-agent-readiness" | "repo-hygiene" | "stack-quality" | "tests-qa" | "observability" | "api-contracts" | "platform-governance" | "delivery";
|
|
3014
|
+
ReadinessDimensionId: "ai-agent-readiness" | "token-efficiency" | "repo-hygiene" | "stack-quality" | "tests-qa" | "observability" | "api-contracts" | "platform-governance" | "delivery";
|
|
3062
3015
|
RepoProviderDto: {
|
|
3063
3016
|
/** @enum {string} */
|
|
3064
3017
|
kind: "github" | "bitbucket_cloud" | "bitbucket_server";
|
|
@@ -3298,19 +3251,6 @@ export interface components {
|
|
|
3298
3251
|
* @enum {string|null}
|
|
3299
3252
|
*/
|
|
3300
3253
|
archivedReason?: "github_removed" | "installation_disconnected" | "installation_replaced" | "superseded" | null;
|
|
3301
|
-
/**
|
|
3302
|
-
* @description Language-based eligibility for Agentic-Foundation analysis (#44). `ineligible` repos (no v1-supported stack) render read-only/orange in the AF list with no analyze/score/fix actions; the server also rejects analyze requests for them. Null until the first sync/scan computes it.
|
|
3303
|
-
* @enum {string|null}
|
|
3304
|
-
*/
|
|
3305
|
-
eligibilityStatus?: "eligible" | "ineligible" | null;
|
|
3306
|
-
/** @description Human-readable explanation when `eligibilityStatus` is `ineligible`. */
|
|
3307
|
-
eligibilityReason?: string | null;
|
|
3308
|
-
/** @description Dominant supported stack — backend_jvm | ios_app | web_spa | backend_go | backend_python. Null when ineligible/uncomputed. */
|
|
3309
|
-
primaryStack?: string | null;
|
|
3310
|
-
/** @description Second supported stack for a multi-stack repo, or null. */
|
|
3311
|
-
secondaryStack?: string | null;
|
|
3312
|
-
/** @description All supported stacks detected (ordered, primary first). Empty/null when none. */
|
|
3313
|
-
supportedStacks?: string[] | null;
|
|
3314
3254
|
};
|
|
3315
3255
|
/** @description Single-repo detail response. Identical to RepoReadinessScoreDto except dimensions use DimensionScoreDetailDto (criteriaDetails required per dimension). */
|
|
3316
3256
|
RepoReadinessScoreDetailDto: {
|
|
@@ -3772,7 +3712,7 @@ export interface components {
|
|
|
3772
3712
|
* @description Type of workspace lifecycle event.
|
|
3773
3713
|
* @enum {string}
|
|
3774
3714
|
*/
|
|
3775
|
-
ActivityLogEventTypeDto: "repo.added" | "repo.removed" | "repo.readded" | "integration.github.added" | "integration.github.updated" | "integration.github.removed" | "integration.github.permissions_changed" | "integration.github.repo_added" | "integration.github.repo_removed" | "fix.requested" | "fix.generating" | "fix.pr_created" | "fix.merged" | "fix.failed" | "readiness.scan_started" | "readiness.scan_completed" | "readiness.scan_failed" | "readiness.scan_partial" | "
|
|
3715
|
+
ActivityLogEventTypeDto: "repo.added" | "repo.removed" | "repo.readded" | "integration.github.added" | "integration.github.updated" | "integration.github.removed" | "integration.github.permissions_changed" | "integration.github.repo_added" | "integration.github.repo_removed" | "fix.requested" | "fix.generating" | "fix.pr_created" | "fix.merged" | "fix.failed" | "readiness.scan_started" | "readiness.scan_completed" | "readiness.scan_failed" | "readiness.scan_partial" | "config.cursor.added" | "config.cursor.updated" | "config.cursor.removed" | "config.cursor.platform_key_enabled" | "config.cursor.platform_key_disabled" | "config.claude.added" | "config.claude.updated" | "config.claude.removed" | "config.agent_execution.provider_changed" | "member.invited" | "member.role_changed" | "member.removed";
|
|
3776
3716
|
ActivityLogActorDto: {
|
|
3777
3717
|
/** Format: uuid */
|
|
3778
3718
|
userId: string;
|
|
@@ -4143,9 +4083,6 @@ export type CreateWorkspaceBodyDto = components['schemas']['CreateWorkspaceBodyD
|
|
|
4143
4083
|
export type CompanyProfileDto = components['schemas']['CompanyProfileDto'];
|
|
4144
4084
|
export type GithubAccountDto = components['schemas']['GithubAccountDto'];
|
|
4145
4085
|
export type GithubInstalledRepoDto = components['schemas']['GithubInstalledRepoDto'];
|
|
4146
|
-
export type RepoEligibilityConfigDto = components['schemas']['RepoEligibilityConfigDto'];
|
|
4147
|
-
export type RepoEligibilityOverridesDto = components['schemas']['RepoEligibilityOverridesDto'];
|
|
4148
|
-
export type WorkspaceRepoEligibilityDto = components['schemas']['WorkspaceRepoEligibilityDto'];
|
|
4149
4086
|
export type GithubMissingPermissionDto = components['schemas']['GithubMissingPermissionDto'];
|
|
4150
4087
|
export type GithubInstallationSummaryDto = components['schemas']['GithubInstallationSummaryDto'];
|
|
4151
4088
|
export type GithubPendingApprovalDto = components['schemas']['GithubPendingApprovalDto'];
|
|
@@ -7331,10 +7268,6 @@ export interface operations {
|
|
|
7331
7268
|
offset?: components["parameters"]["PaginationOffset"];
|
|
7332
7269
|
/** @description Sort direction. */
|
|
7333
7270
|
order?: components["parameters"]["PaginationOrder"];
|
|
7334
|
-
/** @description Server-side sort column (the activity "5 W's"). Combined with `order` (asc/desc). Defaults to `when` (occurredAt). `occurredAt`/`id` is always the tiebreaker. */
|
|
7335
|
-
sort?: "when" | "who" | "what" | "why" | "where";
|
|
7336
|
-
/** @description Coarse product-area grouping filter (#156). `integration` = GitHub + AI-tool key events; `agentic_foundation` = repos, readiness scans, fixes; `workspace_team` = members + HRIS. Omit (or pass `all`) for every area. */
|
|
7337
|
-
productArea?: "integration" | "agentic_foundation" | "workspace_team" | "all";
|
|
7338
7271
|
/** @description Filter to a specific event type. */
|
|
7339
7272
|
eventType?: components["schemas"]["ActivityLogEventTypeDto"];
|
|
7340
7273
|
/** @description Filter to events performed by a specific user (UUID). */
|
|
@@ -7851,6 +7784,61 @@ export interface operations {
|
|
|
7851
7784
|
};
|
|
7852
7785
|
};
|
|
7853
7786
|
};
|
|
7787
|
+
getAgenticFoundationTokenEfficiency: {
|
|
7788
|
+
parameters: {
|
|
7789
|
+
query?: {
|
|
7790
|
+
/** @description Page size (default 25, max 100). */
|
|
7791
|
+
limit?: components["parameters"]["PaginationLimit"];
|
|
7792
|
+
/** @description Zero-based row offset into the filtered, sorted result set. */
|
|
7793
|
+
offset?: components["parameters"]["PaginationOffset"];
|
|
7794
|
+
/** @description Allowlisted repository sort field. */
|
|
7795
|
+
sort?: components["parameters"]["ReadinessRepoSort"];
|
|
7796
|
+
/** @description Sort direction. */
|
|
7797
|
+
order?: components["parameters"]["PaginationOrder"];
|
|
7798
|
+
/** @description Case-insensitive filter on repository name, language, or provider slug. */
|
|
7799
|
+
search?: components["parameters"]["ReadinessRepoSearch"];
|
|
7800
|
+
/** @description Exact language filter (e.g. `typescript`). */
|
|
7801
|
+
language?: components["parameters"]["ReadinessRepoLanguage"];
|
|
7802
|
+
};
|
|
7803
|
+
header?: never;
|
|
7804
|
+
path: {
|
|
7805
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
7806
|
+
};
|
|
7807
|
+
cookie?: never;
|
|
7808
|
+
};
|
|
7809
|
+
requestBody?: never;
|
|
7810
|
+
responses: {
|
|
7811
|
+
/** @description Paginated repositories with token-efficiency slice and criteriaDetails */
|
|
7812
|
+
200: {
|
|
7813
|
+
headers: {
|
|
7814
|
+
[name: string]: unknown;
|
|
7815
|
+
};
|
|
7816
|
+
content: {
|
|
7817
|
+
"application/json": components["schemas"]["ReadinessRepoDetailListDto"];
|
|
7818
|
+
};
|
|
7819
|
+
};
|
|
7820
|
+
/** @description Invalid pagination or sort query */
|
|
7821
|
+
400: {
|
|
7822
|
+
headers: {
|
|
7823
|
+
[name: string]: unknown;
|
|
7824
|
+
};
|
|
7825
|
+
content: {
|
|
7826
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
7827
|
+
};
|
|
7828
|
+
};
|
|
7829
|
+
401: components["responses"]["Unauthorized"];
|
|
7830
|
+
403: components["responses"]["Forbidden"];
|
|
7831
|
+
/** @description Workspace does not exist */
|
|
7832
|
+
404: {
|
|
7833
|
+
headers: {
|
|
7834
|
+
[name: string]: unknown;
|
|
7835
|
+
};
|
|
7836
|
+
content: {
|
|
7837
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
7838
|
+
};
|
|
7839
|
+
};
|
|
7840
|
+
};
|
|
7841
|
+
};
|
|
7854
7842
|
getAgenticFoundationDeliveryGovernance: {
|
|
7855
7843
|
parameters: {
|
|
7856
7844
|
query?: {
|
|
@@ -8223,80 +8211,6 @@ export interface operations {
|
|
|
8223
8211
|
403: components["responses"]["Forbidden"];
|
|
8224
8212
|
};
|
|
8225
8213
|
};
|
|
8226
|
-
getWorkspaceRepoEligibility: {
|
|
8227
|
-
parameters: {
|
|
8228
|
-
query?: never;
|
|
8229
|
-
header?: never;
|
|
8230
|
-
path: {
|
|
8231
|
-
workspaceId: components["parameters"]["WorkspaceId"];
|
|
8232
|
-
};
|
|
8233
|
-
cookie?: never;
|
|
8234
|
-
};
|
|
8235
|
-
requestBody?: never;
|
|
8236
|
-
responses: {
|
|
8237
|
-
/** @description Effective repo-eligibility configuration */
|
|
8238
|
-
200: {
|
|
8239
|
-
headers: {
|
|
8240
|
-
[name: string]: unknown;
|
|
8241
|
-
};
|
|
8242
|
-
content: {
|
|
8243
|
-
"application/json": components["schemas"]["WorkspaceRepoEligibilityDto"];
|
|
8244
|
-
};
|
|
8245
|
-
};
|
|
8246
|
-
401: components["responses"]["Unauthorized"];
|
|
8247
|
-
403: components["responses"]["Forbidden"];
|
|
8248
|
-
};
|
|
8249
|
-
};
|
|
8250
|
-
putWorkspaceRepoEligibility: {
|
|
8251
|
-
parameters: {
|
|
8252
|
-
query?: never;
|
|
8253
|
-
header?: never;
|
|
8254
|
-
path: {
|
|
8255
|
-
workspaceId: components["parameters"]["WorkspaceId"];
|
|
8256
|
-
};
|
|
8257
|
-
cookie?: never;
|
|
8258
|
-
};
|
|
8259
|
-
requestBody: {
|
|
8260
|
-
content: {
|
|
8261
|
-
"application/json": {
|
|
8262
|
-
overrides: components["schemas"]["RepoEligibilityOverridesDto"];
|
|
8263
|
-
};
|
|
8264
|
-
};
|
|
8265
|
-
};
|
|
8266
|
-
responses: {
|
|
8267
|
-
/** @description Overrides saved */
|
|
8268
|
-
200: {
|
|
8269
|
-
headers: {
|
|
8270
|
-
[name: string]: unknown;
|
|
8271
|
-
};
|
|
8272
|
-
content: {
|
|
8273
|
-
"application/json": {
|
|
8274
|
-
overrides: components["schemas"]["RepoEligibilityOverridesDto"];
|
|
8275
|
-
effective: components["schemas"]["RepoEligibilityConfigDto"];
|
|
8276
|
-
};
|
|
8277
|
-
};
|
|
8278
|
-
};
|
|
8279
|
-
/** @description Invalid request body */
|
|
8280
|
-
400: {
|
|
8281
|
-
headers: {
|
|
8282
|
-
[name: string]: unknown;
|
|
8283
|
-
};
|
|
8284
|
-
content: {
|
|
8285
|
-
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
8286
|
-
};
|
|
8287
|
-
};
|
|
8288
|
-
401: components["responses"]["Unauthorized"];
|
|
8289
|
-
/** @description Forbidden, or a workspace-admin value exceeds a platform limit (`repo_eligibility_bound_exceeded`) */
|
|
8290
|
-
403: {
|
|
8291
|
-
headers: {
|
|
8292
|
-
[name: string]: unknown;
|
|
8293
|
-
};
|
|
8294
|
-
content: {
|
|
8295
|
-
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
8296
|
-
};
|
|
8297
|
-
};
|
|
8298
|
-
};
|
|
8299
|
-
};
|
|
8300
8214
|
getCursorKeyUsage: {
|
|
8301
8215
|
parameters: {
|
|
8302
8216
|
query?: never;
|