@thinkai/tai-api-contract 2.31.0 → 2.32.1-pr.731.1

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.
@@ -1549,6 +1549,30 @@ export interface paths {
1549
1549
  patch?: never;
1550
1550
  trace?: never;
1551
1551
  };
1552
+ "/workspaces/{workspaceId}/repo-eligibility": {
1553
+ parameters: {
1554
+ query?: never;
1555
+ header?: never;
1556
+ path?: never;
1557
+ cookie?: never;
1558
+ };
1559
+ /**
1560
+ * Get repo-sync eligibility gate (defaults + per-workspace overrides)
1561
+ * @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.
1562
+ */
1563
+ get: operations["getWorkspaceRepoEligibility"];
1564
+ /**
1565
+ * Set per-workspace repo-sync eligibility overrides
1566
+ * @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.
1567
+ */
1568
+ put: operations["putWorkspaceRepoEligibility"];
1569
+ post?: never;
1570
+ delete?: never;
1571
+ options?: never;
1572
+ head?: never;
1573
+ patch?: never;
1574
+ trace?: never;
1575
+ };
1552
1576
  "/workspaces/{workspaceId}/readiness/cursor-key-usage": {
1553
1577
  parameters: {
1554
1578
  query?: never;
@@ -2133,6 +2157,13 @@ export interface components {
2133
2157
  hasAnalyticsToken: boolean;
2134
2158
  /** @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). */
2135
2159
  hasExecutionToken: boolean;
2160
+ /**
2161
+ * @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.
2162
+ * @enum {string}
2163
+ */
2164
+ insightsCredentialKind?: "admin" | "analytics" | "unknown";
2165
+ /** @description Masked preview of the stored insights key (prefix + last four characters). Never includes the full secret. */
2166
+ insightsTokenHint?: string;
2136
2167
  };
2137
2168
  /**
2138
2169
  * @description The agent execution account used for Agentic Foundation runs (readiness scanner + fix queue). Exactly one is active per workspace.
@@ -2751,6 +2782,56 @@ export interface components {
2751
2782
  * @description Last push or metadata update from GitHub when available.
2752
2783
  */
2753
2784
  updatedAt?: string | null;
2785
+ /** @description True when the repository is archived (read-only on GitHub). */
2786
+ archived?: boolean | null;
2787
+ /** @description True when the repository is a fork of another repository. */
2788
+ fork?: boolean | null;
2789
+ /** @description True when the repository is disabled on GitHub. */
2790
+ disabled?: boolean | null;
2791
+ /** @description Repository size in KB as reported by GitHub. */
2792
+ size?: number | null;
2793
+ /** @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. */
2794
+ readOnly?: boolean | null;
2795
+ /** @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"). */
2796
+ ineligibleReason?: string | null;
2797
+ /**
2798
+ * @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.
2799
+ * @enum {string|null}
2800
+ */
2801
+ eligibilityStatus?: "eligible" | "ineligible" | null;
2802
+ /** @description Human-readable explanation when `eligibilityStatus` is `ineligible` (e.g. "This repository's primary language (Python) is not supported in v1"). */
2803
+ eligibilityReason?: string | null;
2804
+ /** @description Dominant supported stack (by GitHub language bytes), one of backend_jvm | ios_app | web_spa | backend_go | backend_python. Null for ineligible repos. */
2805
+ primaryStack?: string | null;
2806
+ /** @description Second supported stack for a multi-stack repo, or null. */
2807
+ secondaryStack?: string | null;
2808
+ /** @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. */
2809
+ supportedStacks?: string[] | null;
2810
+ };
2811
+ /** @description Resolved repo-sync eligibility gate (defaults or effective). All fields present. */
2812
+ RepoEligibilityConfigDto: {
2813
+ /** @description Skip archived repos during GitHub repo sync. */
2814
+ excludeArchived: boolean;
2815
+ /** @description Skip forked repos. Forks are included by default. */
2816
+ excludeForks: boolean;
2817
+ /** @description Max repo size in KB (GitHub-reported). 0 = no limit. */
2818
+ maxRepoSizeKb: number;
2819
+ /** @description Max repos materialized per workspace per sync. 0 = no limit. */
2820
+ maxReposPerWorkspace: number;
2821
+ };
2822
+ /** @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. */
2823
+ RepoEligibilityOverridesDto: {
2824
+ excludeArchived?: boolean | null;
2825
+ excludeForks?: boolean | null;
2826
+ maxRepoSizeKb?: number | null;
2827
+ maxReposPerWorkspace?: number | null;
2828
+ };
2829
+ WorkspaceRepoEligibilityDto: {
2830
+ defaults: components["schemas"]["RepoEligibilityConfigDto"];
2831
+ overrides: components["schemas"]["RepoEligibilityOverridesDto"];
2832
+ effective: components["schemas"]["RepoEligibilityConfigDto"];
2833
+ /** @description True when the caller is a platform admin (may set any value, incl. raising caps). */
2834
+ canEditUnrestricted: boolean;
2754
2835
  };
2755
2836
  GithubMissingPermissionDto: {
2756
2837
  /** @description GitHub App permission key (e.g. contents, pull_requests). */
@@ -3243,6 +3324,19 @@ export interface components {
3243
3324
  * @enum {string|null}
3244
3325
  */
3245
3326
  archivedReason?: "github_removed" | "installation_disconnected" | "installation_replaced" | "superseded" | null;
3327
+ /**
3328
+ * @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.
3329
+ * @enum {string|null}
3330
+ */
3331
+ eligibilityStatus?: "eligible" | "ineligible" | null;
3332
+ /** @description Human-readable explanation when `eligibilityStatus` is `ineligible`. */
3333
+ eligibilityReason?: string | null;
3334
+ /** @description Dominant supported stack — backend_jvm | ios_app | web_spa | backend_go | backend_python. Null when ineligible/uncomputed. */
3335
+ primaryStack?: string | null;
3336
+ /** @description Second supported stack for a multi-stack repo, or null. */
3337
+ secondaryStack?: string | null;
3338
+ /** @description All supported stacks detected (ordered, primary first). Empty/null when none. */
3339
+ supportedStacks?: string[] | null;
3246
3340
  };
3247
3341
  /** @description Single-repo detail response. Identical to RepoReadinessScoreDto except dimensions use DimensionScoreDetailDto (criteriaDetails required per dimension). */
3248
3342
  RepoReadinessScoreDetailDto: {
@@ -3704,7 +3798,7 @@ export interface components {
3704
3798
  * @description Type of workspace lifecycle event.
3705
3799
  * @enum {string}
3706
3800
  */
3707
- 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";
3801
+ 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
3802
  ActivityLogActorDto: {
3709
3803
  /** Format: uuid */
3710
3804
  userId: string;
@@ -4075,6 +4169,9 @@ export type CreateWorkspaceBodyDto = components['schemas']['CreateWorkspaceBodyD
4075
4169
  export type CompanyProfileDto = components['schemas']['CompanyProfileDto'];
4076
4170
  export type GithubAccountDto = components['schemas']['GithubAccountDto'];
4077
4171
  export type GithubInstalledRepoDto = components['schemas']['GithubInstalledRepoDto'];
4172
+ export type RepoEligibilityConfigDto = components['schemas']['RepoEligibilityConfigDto'];
4173
+ export type RepoEligibilityOverridesDto = components['schemas']['RepoEligibilityOverridesDto'];
4174
+ export type WorkspaceRepoEligibilityDto = components['schemas']['WorkspaceRepoEligibilityDto'];
4078
4175
  export type GithubMissingPermissionDto = components['schemas']['GithubMissingPermissionDto'];
4079
4176
  export type GithubInstallationSummaryDto = components['schemas']['GithubInstallationSummaryDto'];
4080
4177
  export type GithubPendingApprovalDto = components['schemas']['GithubPendingApprovalDto'];
@@ -7260,6 +7357,10 @@ export interface operations {
7260
7357
  offset?: components["parameters"]["PaginationOffset"];
7261
7358
  /** @description Sort direction. */
7262
7359
  order?: components["parameters"]["PaginationOrder"];
7360
+ /** @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. */
7361
+ sort?: "when" | "who" | "what" | "why" | "where";
7362
+ /** @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. */
7363
+ productArea?: "integration" | "agentic_foundation" | "workspace_team" | "all";
7263
7364
  /** @description Filter to a specific event type. */
7264
7365
  eventType?: components["schemas"]["ActivityLogEventTypeDto"];
7265
7366
  /** @description Filter to events performed by a specific user (UUID). */
@@ -8203,6 +8304,80 @@ export interface operations {
8203
8304
  403: components["responses"]["Forbidden"];
8204
8305
  };
8205
8306
  };
8307
+ getWorkspaceRepoEligibility: {
8308
+ parameters: {
8309
+ query?: never;
8310
+ header?: never;
8311
+ path: {
8312
+ workspaceId: components["parameters"]["WorkspaceId"];
8313
+ };
8314
+ cookie?: never;
8315
+ };
8316
+ requestBody?: never;
8317
+ responses: {
8318
+ /** @description Effective repo-eligibility configuration */
8319
+ 200: {
8320
+ headers: {
8321
+ [name: string]: unknown;
8322
+ };
8323
+ content: {
8324
+ "application/json": components["schemas"]["WorkspaceRepoEligibilityDto"];
8325
+ };
8326
+ };
8327
+ 401: components["responses"]["Unauthorized"];
8328
+ 403: components["responses"]["Forbidden"];
8329
+ };
8330
+ };
8331
+ putWorkspaceRepoEligibility: {
8332
+ parameters: {
8333
+ query?: never;
8334
+ header?: never;
8335
+ path: {
8336
+ workspaceId: components["parameters"]["WorkspaceId"];
8337
+ };
8338
+ cookie?: never;
8339
+ };
8340
+ requestBody: {
8341
+ content: {
8342
+ "application/json": {
8343
+ overrides: components["schemas"]["RepoEligibilityOverridesDto"];
8344
+ };
8345
+ };
8346
+ };
8347
+ responses: {
8348
+ /** @description Overrides saved */
8349
+ 200: {
8350
+ headers: {
8351
+ [name: string]: unknown;
8352
+ };
8353
+ content: {
8354
+ "application/json": {
8355
+ overrides: components["schemas"]["RepoEligibilityOverridesDto"];
8356
+ effective: components["schemas"]["RepoEligibilityConfigDto"];
8357
+ };
8358
+ };
8359
+ };
8360
+ /** @description Invalid request body */
8361
+ 400: {
8362
+ headers: {
8363
+ [name: string]: unknown;
8364
+ };
8365
+ content: {
8366
+ "application/json": components["schemas"]["ErrorMessageDto"];
8367
+ };
8368
+ };
8369
+ 401: components["responses"]["Unauthorized"];
8370
+ /** @description Forbidden, or a workspace-admin value exceeds a platform limit (`repo_eligibility_bound_exceeded`) */
8371
+ 403: {
8372
+ headers: {
8373
+ [name: string]: unknown;
8374
+ };
8375
+ content: {
8376
+ "application/json": components["schemas"]["ErrorMessageDto"];
8377
+ };
8378
+ };
8379
+ };
8380
+ };
8206
8381
  getCursorKeyUsage: {
8207
8382
  parameters: {
8208
8383
  query?: never;