@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
|
@@ -1129,7 +1129,7 @@ export interface paths {
|
|
|
1129
1129
|
};
|
|
1130
1130
|
/**
|
|
1131
1131
|
* Single repo readiness
|
|
1132
|
-
* @description Returns one stored repository scorecard with all
|
|
1132
|
+
* @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).
|
|
1133
1133
|
*/
|
|
1134
1134
|
get: operations["getReadinessRepo"];
|
|
1135
1135
|
put?: never;
|
|
@@ -1385,6 +1385,26 @@ export interface paths {
|
|
|
1385
1385
|
patch?: never;
|
|
1386
1386
|
trace?: never;
|
|
1387
1387
|
};
|
|
1388
|
+
"/workspaces/{workspaceId}/agentic-foundation/token-efficiency": {
|
|
1389
|
+
parameters: {
|
|
1390
|
+
query?: never;
|
|
1391
|
+
header?: never;
|
|
1392
|
+
path?: never;
|
|
1393
|
+
cookie?: never;
|
|
1394
|
+
};
|
|
1395
|
+
/**
|
|
1396
|
+
* Token Efficiency pillar (token-efficiency slice)
|
|
1397
|
+
* @description Returns `RepoReadinessScoreDetailDto` rows with only the `token-efficiency` dimension populated per repo, including criteriaDetails for that dimension (rubric Section I).
|
|
1398
|
+
*/
|
|
1399
|
+
get: operations["getAgenticFoundationTokenEfficiency"];
|
|
1400
|
+
put?: never;
|
|
1401
|
+
post?: never;
|
|
1402
|
+
delete?: never;
|
|
1403
|
+
options?: never;
|
|
1404
|
+
head?: never;
|
|
1405
|
+
patch?: never;
|
|
1406
|
+
trace?: never;
|
|
1407
|
+
};
|
|
1388
1408
|
"/workspaces/{workspaceId}/agentic-foundation/delivery-governance": {
|
|
1389
1409
|
parameters: {
|
|
1390
1410
|
query?: never;
|
|
@@ -1529,30 +1549,6 @@ export interface paths {
|
|
|
1529
1549
|
patch?: never;
|
|
1530
1550
|
trace?: never;
|
|
1531
1551
|
};
|
|
1532
|
-
"/workspaces/{workspaceId}/repo-eligibility": {
|
|
1533
|
-
parameters: {
|
|
1534
|
-
query?: never;
|
|
1535
|
-
header?: never;
|
|
1536
|
-
path?: never;
|
|
1537
|
-
cookie?: never;
|
|
1538
|
-
};
|
|
1539
|
-
/**
|
|
1540
|
-
* Get repo-sync eligibility gate (defaults + per-workspace overrides)
|
|
1541
|
-
* @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.
|
|
1542
|
-
*/
|
|
1543
|
-
get: operations["getWorkspaceRepoEligibility"];
|
|
1544
|
-
/**
|
|
1545
|
-
* Set per-workspace repo-sync eligibility overrides
|
|
1546
|
-
* @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.
|
|
1547
|
-
*/
|
|
1548
|
-
put: operations["putWorkspaceRepoEligibility"];
|
|
1549
|
-
post?: never;
|
|
1550
|
-
delete?: never;
|
|
1551
|
-
options?: never;
|
|
1552
|
-
head?: never;
|
|
1553
|
-
patch?: never;
|
|
1554
|
-
trace?: never;
|
|
1555
|
-
};
|
|
1556
1552
|
"/workspaces/{workspaceId}/readiness/cursor-key-usage": {
|
|
1557
1553
|
parameters: {
|
|
1558
1554
|
query?: never;
|
|
@@ -2137,6 +2133,13 @@ export interface components {
|
|
|
2137
2133
|
hasAnalyticsToken: boolean;
|
|
2138
2134
|
/** @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). */
|
|
2139
2135
|
hasExecutionToken: boolean;
|
|
2136
|
+
/**
|
|
2137
|
+
* @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.
|
|
2138
|
+
* @enum {string}
|
|
2139
|
+
*/
|
|
2140
|
+
insightsCredentialKind?: "admin" | "analytics" | "unknown";
|
|
2141
|
+
/** @description Masked preview of the stored insights key (prefix + last four characters). Never includes the full secret. */
|
|
2142
|
+
insightsTokenHint?: string;
|
|
2140
2143
|
};
|
|
2141
2144
|
/**
|
|
2142
2145
|
* @description The agent execution account used for Agentic Foundation runs (readiness scanner + fix queue). Exactly one is active per workspace.
|
|
@@ -2755,56 +2758,6 @@ export interface components {
|
|
|
2755
2758
|
* @description Last push or metadata update from GitHub when available.
|
|
2756
2759
|
*/
|
|
2757
2760
|
updatedAt?: string | null;
|
|
2758
|
-
/** @description True when the repository is archived (read-only on GitHub). */
|
|
2759
|
-
archived?: boolean | null;
|
|
2760
|
-
/** @description True when the repository is a fork of another repository. */
|
|
2761
|
-
fork?: boolean | null;
|
|
2762
|
-
/** @description True when the repository is disabled on GitHub. */
|
|
2763
|
-
disabled?: boolean | null;
|
|
2764
|
-
/** @description Repository size in KB as reported by GitHub. */
|
|
2765
|
-
size?: number | null;
|
|
2766
|
-
/** @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. */
|
|
2767
|
-
readOnly?: boolean | null;
|
|
2768
|
-
/** @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"). */
|
|
2769
|
-
ineligibleReason?: string | null;
|
|
2770
|
-
/**
|
|
2771
|
-
* @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.
|
|
2772
|
-
* @enum {string|null}
|
|
2773
|
-
*/
|
|
2774
|
-
eligibilityStatus?: "eligible" | "ineligible" | null;
|
|
2775
|
-
/** @description Human-readable explanation when `eligibilityStatus` is `ineligible` (e.g. "This repository's primary language (Python) is not supported in v1"). */
|
|
2776
|
-
eligibilityReason?: string | null;
|
|
2777
|
-
/** @description Dominant supported stack (by GitHub language bytes), one of backend_jvm | ios_app | web_spa | backend_go | backend_python. Null for ineligible repos. */
|
|
2778
|
-
primaryStack?: string | null;
|
|
2779
|
-
/** @description Second supported stack for a multi-stack repo, or null. */
|
|
2780
|
-
secondaryStack?: string | null;
|
|
2781
|
-
/** @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. */
|
|
2782
|
-
supportedStacks?: string[] | null;
|
|
2783
|
-
};
|
|
2784
|
-
/** @description Resolved repo-sync eligibility gate (defaults or effective). All fields present. */
|
|
2785
|
-
RepoEligibilityConfigDto: {
|
|
2786
|
-
/** @description Skip archived repos during GitHub repo sync. */
|
|
2787
|
-
excludeArchived: boolean;
|
|
2788
|
-
/** @description Skip forked repos. Forks are included by default. */
|
|
2789
|
-
excludeForks: boolean;
|
|
2790
|
-
/** @description Max repo size in KB (GitHub-reported). 0 = no limit. */
|
|
2791
|
-
maxRepoSizeKb: number;
|
|
2792
|
-
/** @description Max repos materialized per workspace per sync. 0 = no limit. */
|
|
2793
|
-
maxReposPerWorkspace: number;
|
|
2794
|
-
};
|
|
2795
|
-
/** @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. */
|
|
2796
|
-
RepoEligibilityOverridesDto: {
|
|
2797
|
-
excludeArchived?: boolean | null;
|
|
2798
|
-
excludeForks?: boolean | null;
|
|
2799
|
-
maxRepoSizeKb?: number | null;
|
|
2800
|
-
maxReposPerWorkspace?: number | null;
|
|
2801
|
-
};
|
|
2802
|
-
WorkspaceRepoEligibilityDto: {
|
|
2803
|
-
defaults: components["schemas"]["RepoEligibilityConfigDto"];
|
|
2804
|
-
overrides: components["schemas"]["RepoEligibilityOverridesDto"];
|
|
2805
|
-
effective: components["schemas"]["RepoEligibilityConfigDto"];
|
|
2806
|
-
/** @description True when the caller is a platform admin (may set any value, incl. raising caps). */
|
|
2807
|
-
canEditUnrestricted: boolean;
|
|
2808
2761
|
};
|
|
2809
2762
|
GithubMissingPermissionDto: {
|
|
2810
2763
|
/** @description GitHub App permission key (e.g. contents, pull_requests). */
|
|
@@ -3057,7 +3010,7 @@ export interface components {
|
|
|
3057
3010
|
* @description Workspace readiness scoring dimension
|
|
3058
3011
|
* @enum {string}
|
|
3059
3012
|
*/
|
|
3060
|
-
ReadinessDimensionId: "ai-agent-readiness" | "repo-hygiene" | "stack-quality" | "tests-qa" | "observability" | "api-contracts" | "platform-governance" | "delivery";
|
|
3013
|
+
ReadinessDimensionId: "ai-agent-readiness" | "token-efficiency" | "repo-hygiene" | "stack-quality" | "tests-qa" | "observability" | "api-contracts" | "platform-governance" | "delivery";
|
|
3061
3014
|
RepoProviderDto: {
|
|
3062
3015
|
/** @enum {string} */
|
|
3063
3016
|
kind: "github" | "bitbucket_cloud" | "bitbucket_server";
|
|
@@ -3297,19 +3250,6 @@ export interface components {
|
|
|
3297
3250
|
* @enum {string|null}
|
|
3298
3251
|
*/
|
|
3299
3252
|
archivedReason?: "github_removed" | "installation_disconnected" | "installation_replaced" | "superseded" | null;
|
|
3300
|
-
/**
|
|
3301
|
-
* @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.
|
|
3302
|
-
* @enum {string|null}
|
|
3303
|
-
*/
|
|
3304
|
-
eligibilityStatus?: "eligible" | "ineligible" | null;
|
|
3305
|
-
/** @description Human-readable explanation when `eligibilityStatus` is `ineligible`. */
|
|
3306
|
-
eligibilityReason?: string | null;
|
|
3307
|
-
/** @description Dominant supported stack — backend_jvm | ios_app | web_spa | backend_go | backend_python. Null when ineligible/uncomputed. */
|
|
3308
|
-
primaryStack?: string | null;
|
|
3309
|
-
/** @description Second supported stack for a multi-stack repo, or null. */
|
|
3310
|
-
secondaryStack?: string | null;
|
|
3311
|
-
/** @description All supported stacks detected (ordered, primary first). Empty/null when none. */
|
|
3312
|
-
supportedStacks?: string[] | null;
|
|
3313
3253
|
};
|
|
3314
3254
|
/** @description Single-repo detail response. Identical to RepoReadinessScoreDto except dimensions use DimensionScoreDetailDto (criteriaDetails required per dimension). */
|
|
3315
3255
|
RepoReadinessScoreDetailDto: {
|
|
@@ -3771,7 +3711,7 @@ export interface components {
|
|
|
3771
3711
|
* @description Type of workspace lifecycle event.
|
|
3772
3712
|
* @enum {string}
|
|
3773
3713
|
*/
|
|
3774
|
-
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" | "
|
|
3714
|
+
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";
|
|
3775
3715
|
ActivityLogActorDto: {
|
|
3776
3716
|
/** Format: uuid */
|
|
3777
3717
|
userId: string;
|
|
@@ -4142,9 +4082,6 @@ export type CreateWorkspaceBodyDto = components['schemas']['CreateWorkspaceBodyD
|
|
|
4142
4082
|
export type CompanyProfileDto = components['schemas']['CompanyProfileDto'];
|
|
4143
4083
|
export type GithubAccountDto = components['schemas']['GithubAccountDto'];
|
|
4144
4084
|
export type GithubInstalledRepoDto = components['schemas']['GithubInstalledRepoDto'];
|
|
4145
|
-
export type RepoEligibilityConfigDto = components['schemas']['RepoEligibilityConfigDto'];
|
|
4146
|
-
export type RepoEligibilityOverridesDto = components['schemas']['RepoEligibilityOverridesDto'];
|
|
4147
|
-
export type WorkspaceRepoEligibilityDto = components['schemas']['WorkspaceRepoEligibilityDto'];
|
|
4148
4085
|
export type GithubMissingPermissionDto = components['schemas']['GithubMissingPermissionDto'];
|
|
4149
4086
|
export type GithubInstallationSummaryDto = components['schemas']['GithubInstallationSummaryDto'];
|
|
4150
4087
|
export type GithubPendingApprovalDto = components['schemas']['GithubPendingApprovalDto'];
|
|
@@ -7330,10 +7267,6 @@ export interface operations {
|
|
|
7330
7267
|
offset?: components["parameters"]["PaginationOffset"];
|
|
7331
7268
|
/** @description Sort direction. */
|
|
7332
7269
|
order?: components["parameters"]["PaginationOrder"];
|
|
7333
|
-
/** @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. */
|
|
7334
|
-
sort?: "when" | "who" | "what" | "why" | "where";
|
|
7335
|
-
/** @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. */
|
|
7336
|
-
productArea?: "integration" | "agentic_foundation" | "workspace_team" | "all";
|
|
7337
7270
|
/** @description Filter to a specific event type. */
|
|
7338
7271
|
eventType?: components["schemas"]["ActivityLogEventTypeDto"];
|
|
7339
7272
|
/** @description Filter to events performed by a specific user (UUID). */
|
|
@@ -7850,6 +7783,61 @@ export interface operations {
|
|
|
7850
7783
|
};
|
|
7851
7784
|
};
|
|
7852
7785
|
};
|
|
7786
|
+
getAgenticFoundationTokenEfficiency: {
|
|
7787
|
+
parameters: {
|
|
7788
|
+
query?: {
|
|
7789
|
+
/** @description Page size (default 25, max 100). */
|
|
7790
|
+
limit?: components["parameters"]["PaginationLimit"];
|
|
7791
|
+
/** @description Zero-based row offset into the filtered, sorted result set. */
|
|
7792
|
+
offset?: components["parameters"]["PaginationOffset"];
|
|
7793
|
+
/** @description Allowlisted repository sort field. */
|
|
7794
|
+
sort?: components["parameters"]["ReadinessRepoSort"];
|
|
7795
|
+
/** @description Sort direction. */
|
|
7796
|
+
order?: components["parameters"]["PaginationOrder"];
|
|
7797
|
+
/** @description Case-insensitive filter on repository name, language, or provider slug. */
|
|
7798
|
+
search?: components["parameters"]["ReadinessRepoSearch"];
|
|
7799
|
+
/** @description Exact language filter (e.g. `typescript`). */
|
|
7800
|
+
language?: components["parameters"]["ReadinessRepoLanguage"];
|
|
7801
|
+
};
|
|
7802
|
+
header?: never;
|
|
7803
|
+
path: {
|
|
7804
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
7805
|
+
};
|
|
7806
|
+
cookie?: never;
|
|
7807
|
+
};
|
|
7808
|
+
requestBody?: never;
|
|
7809
|
+
responses: {
|
|
7810
|
+
/** @description Paginated repositories with token-efficiency slice and criteriaDetails */
|
|
7811
|
+
200: {
|
|
7812
|
+
headers: {
|
|
7813
|
+
[name: string]: unknown;
|
|
7814
|
+
};
|
|
7815
|
+
content: {
|
|
7816
|
+
"application/json": components["schemas"]["ReadinessRepoDetailListDto"];
|
|
7817
|
+
};
|
|
7818
|
+
};
|
|
7819
|
+
/** @description Invalid pagination or sort query */
|
|
7820
|
+
400: {
|
|
7821
|
+
headers: {
|
|
7822
|
+
[name: string]: unknown;
|
|
7823
|
+
};
|
|
7824
|
+
content: {
|
|
7825
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
7826
|
+
};
|
|
7827
|
+
};
|
|
7828
|
+
401: components["responses"]["Unauthorized"];
|
|
7829
|
+
403: components["responses"]["Forbidden"];
|
|
7830
|
+
/** @description Workspace does not exist */
|
|
7831
|
+
404: {
|
|
7832
|
+
headers: {
|
|
7833
|
+
[name: string]: unknown;
|
|
7834
|
+
};
|
|
7835
|
+
content: {
|
|
7836
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
7837
|
+
};
|
|
7838
|
+
};
|
|
7839
|
+
};
|
|
7840
|
+
};
|
|
7853
7841
|
getAgenticFoundationDeliveryGovernance: {
|
|
7854
7842
|
parameters: {
|
|
7855
7843
|
query?: {
|
|
@@ -8222,80 +8210,6 @@ export interface operations {
|
|
|
8222
8210
|
403: components["responses"]["Forbidden"];
|
|
8223
8211
|
};
|
|
8224
8212
|
};
|
|
8225
|
-
getWorkspaceRepoEligibility: {
|
|
8226
|
-
parameters: {
|
|
8227
|
-
query?: never;
|
|
8228
|
-
header?: never;
|
|
8229
|
-
path: {
|
|
8230
|
-
workspaceId: components["parameters"]["WorkspaceId"];
|
|
8231
|
-
};
|
|
8232
|
-
cookie?: never;
|
|
8233
|
-
};
|
|
8234
|
-
requestBody?: never;
|
|
8235
|
-
responses: {
|
|
8236
|
-
/** @description Effective repo-eligibility configuration */
|
|
8237
|
-
200: {
|
|
8238
|
-
headers: {
|
|
8239
|
-
[name: string]: unknown;
|
|
8240
|
-
};
|
|
8241
|
-
content: {
|
|
8242
|
-
"application/json": components["schemas"]["WorkspaceRepoEligibilityDto"];
|
|
8243
|
-
};
|
|
8244
|
-
};
|
|
8245
|
-
401: components["responses"]["Unauthorized"];
|
|
8246
|
-
403: components["responses"]["Forbidden"];
|
|
8247
|
-
};
|
|
8248
|
-
};
|
|
8249
|
-
putWorkspaceRepoEligibility: {
|
|
8250
|
-
parameters: {
|
|
8251
|
-
query?: never;
|
|
8252
|
-
header?: never;
|
|
8253
|
-
path: {
|
|
8254
|
-
workspaceId: components["parameters"]["WorkspaceId"];
|
|
8255
|
-
};
|
|
8256
|
-
cookie?: never;
|
|
8257
|
-
};
|
|
8258
|
-
requestBody: {
|
|
8259
|
-
content: {
|
|
8260
|
-
"application/json": {
|
|
8261
|
-
overrides: components["schemas"]["RepoEligibilityOverridesDto"];
|
|
8262
|
-
};
|
|
8263
|
-
};
|
|
8264
|
-
};
|
|
8265
|
-
responses: {
|
|
8266
|
-
/** @description Overrides saved */
|
|
8267
|
-
200: {
|
|
8268
|
-
headers: {
|
|
8269
|
-
[name: string]: unknown;
|
|
8270
|
-
};
|
|
8271
|
-
content: {
|
|
8272
|
-
"application/json": {
|
|
8273
|
-
overrides: components["schemas"]["RepoEligibilityOverridesDto"];
|
|
8274
|
-
effective: components["schemas"]["RepoEligibilityConfigDto"];
|
|
8275
|
-
};
|
|
8276
|
-
};
|
|
8277
|
-
};
|
|
8278
|
-
/** @description Invalid request body */
|
|
8279
|
-
400: {
|
|
8280
|
-
headers: {
|
|
8281
|
-
[name: string]: unknown;
|
|
8282
|
-
};
|
|
8283
|
-
content: {
|
|
8284
|
-
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
8285
|
-
};
|
|
8286
|
-
};
|
|
8287
|
-
401: components["responses"]["Unauthorized"];
|
|
8288
|
-
/** @description Forbidden, or a workspace-admin value exceeds a platform limit (`repo_eligibility_bound_exceeded`) */
|
|
8289
|
-
403: {
|
|
8290
|
-
headers: {
|
|
8291
|
-
[name: string]: unknown;
|
|
8292
|
-
};
|
|
8293
|
-
content: {
|
|
8294
|
-
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
8295
|
-
};
|
|
8296
|
-
};
|
|
8297
|
-
};
|
|
8298
|
-
};
|
|
8299
8213
|
getCursorKeyUsage: {
|
|
8300
8214
|
parameters: {
|
|
8301
8215
|
query?: never;
|