@thinkai/tai-api-contract 2.31.0-pr.731.2 → 2.31.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.
@@ -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 eight 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
+ * @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;
@@ -2756,56 +2752,6 @@ export interface components {
2756
2752
  * @description Last push or metadata update from GitHub when available.
2757
2753
  */
2758
2754
  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
2755
  };
2810
2756
  GithubMissingPermissionDto: {
2811
2757
  /** @description GitHub App permission key (e.g. contents, pull_requests). */
@@ -3058,7 +3004,7 @@ export interface components {
3058
3004
  * @description Workspace readiness scoring dimension
3059
3005
  * @enum {string}
3060
3006
  */
3061
- ReadinessDimensionId: "ai-agent-readiness" | "repo-hygiene" | "stack-quality" | "tests-qa" | "observability" | "api-contracts" | "platform-governance" | "delivery";
3007
+ ReadinessDimensionId: "ai-agent-readiness" | "token-efficiency" | "repo-hygiene" | "stack-quality" | "tests-qa" | "observability" | "api-contracts" | "platform-governance" | "delivery";
3062
3008
  RepoProviderDto: {
3063
3009
  /** @enum {string} */
3064
3010
  kind: "github" | "bitbucket_cloud" | "bitbucket_server";
@@ -3298,19 +3244,6 @@ export interface components {
3298
3244
  * @enum {string|null}
3299
3245
  */
3300
3246
  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
3247
  };
3315
3248
  /** @description Single-repo detail response. Identical to RepoReadinessScoreDto except dimensions use DimensionScoreDetailDto (criteriaDetails required per dimension). */
3316
3249
  RepoReadinessScoreDetailDto: {
@@ -3772,7 +3705,7 @@ export interface components {
3772
3705
  * @description Type of workspace lifecycle event.
3773
3706
  * @enum {string}
3774
3707
  */
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" | "integrations.agent_execution.provider_changed" | "integrations.repo_eligibility.overrides_changed" | "integrations.cursor.platform_key_enabled" | "integrations.cursor.platform_key_disabled" | "member.invited" | "member.role_changed" | "member.removed" | "repo.sync_skipped" | "integrations.cursor.execution_key.added" | "integrations.cursor.execution_key.updated" | "integrations.cursor.execution_key.removed" | "integrations.cursor.execution_key.check_failed" | "integrations.cursor.admin_key.added" | "integrations.cursor.admin_key.updated" | "integrations.cursor.admin_key.removed" | "integrations.claude.execution_key.added" | "integrations.claude.execution_key.updated" | "integrations.claude.execution_key.removed" | "integrations.claude.execution_key.check_failed" | "integrations.claude.admin_key.added" | "integrations.claude.admin_key.updated" | "integrations.claude.admin_key.removed" | "readiness.scan_precheck_failed";
3708
+ 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
3709
  ActivityLogActorDto: {
3777
3710
  /** Format: uuid */
3778
3711
  userId: string;
@@ -4143,9 +4076,6 @@ export type CreateWorkspaceBodyDto = components['schemas']['CreateWorkspaceBodyD
4143
4076
  export type CompanyProfileDto = components['schemas']['CompanyProfileDto'];
4144
4077
  export type GithubAccountDto = components['schemas']['GithubAccountDto'];
4145
4078
  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
4079
  export type GithubMissingPermissionDto = components['schemas']['GithubMissingPermissionDto'];
4150
4080
  export type GithubInstallationSummaryDto = components['schemas']['GithubInstallationSummaryDto'];
4151
4081
  export type GithubPendingApprovalDto = components['schemas']['GithubPendingApprovalDto'];
@@ -7331,10 +7261,6 @@ export interface operations {
7331
7261
  offset?: components["parameters"]["PaginationOffset"];
7332
7262
  /** @description Sort direction. */
7333
7263
  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
7264
  /** @description Filter to a specific event type. */
7339
7265
  eventType?: components["schemas"]["ActivityLogEventTypeDto"];
7340
7266
  /** @description Filter to events performed by a specific user (UUID). */
@@ -7851,6 +7777,61 @@ export interface operations {
7851
7777
  };
7852
7778
  };
7853
7779
  };
7780
+ getAgenticFoundationTokenEfficiency: {
7781
+ parameters: {
7782
+ query?: {
7783
+ /** @description Page size (default 25, max 100). */
7784
+ limit?: components["parameters"]["PaginationLimit"];
7785
+ /** @description Zero-based row offset into the filtered, sorted result set. */
7786
+ offset?: components["parameters"]["PaginationOffset"];
7787
+ /** @description Allowlisted repository sort field. */
7788
+ sort?: components["parameters"]["ReadinessRepoSort"];
7789
+ /** @description Sort direction. */
7790
+ order?: components["parameters"]["PaginationOrder"];
7791
+ /** @description Case-insensitive filter on repository name, language, or provider slug. */
7792
+ search?: components["parameters"]["ReadinessRepoSearch"];
7793
+ /** @description Exact language filter (e.g. `typescript`). */
7794
+ language?: components["parameters"]["ReadinessRepoLanguage"];
7795
+ };
7796
+ header?: never;
7797
+ path: {
7798
+ workspaceId: components["parameters"]["WorkspaceId"];
7799
+ };
7800
+ cookie?: never;
7801
+ };
7802
+ requestBody?: never;
7803
+ responses: {
7804
+ /** @description Paginated repositories with token-efficiency slice and criteriaDetails */
7805
+ 200: {
7806
+ headers: {
7807
+ [name: string]: unknown;
7808
+ };
7809
+ content: {
7810
+ "application/json": components["schemas"]["ReadinessRepoDetailListDto"];
7811
+ };
7812
+ };
7813
+ /** @description Invalid pagination or sort query */
7814
+ 400: {
7815
+ headers: {
7816
+ [name: string]: unknown;
7817
+ };
7818
+ content: {
7819
+ "application/json": components["schemas"]["ErrorMessageDto"];
7820
+ };
7821
+ };
7822
+ 401: components["responses"]["Unauthorized"];
7823
+ 403: components["responses"]["Forbidden"];
7824
+ /** @description Workspace does not exist */
7825
+ 404: {
7826
+ headers: {
7827
+ [name: string]: unknown;
7828
+ };
7829
+ content: {
7830
+ "application/json": components["schemas"]["ErrorMessageDto"];
7831
+ };
7832
+ };
7833
+ };
7834
+ };
7854
7835
  getAgenticFoundationDeliveryGovernance: {
7855
7836
  parameters: {
7856
7837
  query?: {
@@ -8223,80 +8204,6 @@ export interface operations {
8223
8204
  403: components["responses"]["Forbidden"];
8224
8205
  };
8225
8206
  };
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
8207
  getCursorKeyUsage: {
8301
8208
  parameters: {
8302
8209
  query?: never;