@thinkai/tai-api-contract 2.33.1-pr.731.7 → 2.34.0-pr.731.7f225ca0

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.
@@ -1194,7 +1194,7 @@ export interface paths {
1194
1194
  };
1195
1195
  /**
1196
1196
  * Workspace activity log (paginated)
1197
- * @description Paginated, chronological feed of workspace-scoped lifecycle events: repository add/remove/re-add and GitHub integration add/remove. Inactive repos remain visible in this log. Filter by `eventType`, `actorUserId`, or date range (`since`/`until`).
1197
+ * @description Paginated, chronological feed of workspace-scoped lifecycle events: repository add/remove/re-add and GitHub integration add/remove. Inactive repos remain visible in this log. Filter by a single `eventType`, a coarse `eventCategory`/`productArea`, an `eventSubcategory` (a dotted event-type prefix that matches a whole lifecycle subgroup in one call, e.g. `integrations.cursor.execution_key`), `actorUserId`, or date range (`since`/`until`).
1198
1198
  */
1199
1199
  get: operations["listWorkspaceActivity"];
1200
1200
  put?: never;
@@ -1205,6 +1205,26 @@ export interface paths {
1205
1205
  patch?: never;
1206
1206
  trace?: never;
1207
1207
  };
1208
+ "/workspaces/{workspaceId}/activity/export": {
1209
+ parameters: {
1210
+ query?: never;
1211
+ header?: never;
1212
+ path?: never;
1213
+ cookie?: never;
1214
+ };
1215
+ /**
1216
+ * Export workspace activity log as CSV
1217
+ * @description Export the workspace activity log as an RFC 4180 CSV file (one row per event). Accepts the same filters as `GET /workspaces/{workspaceId}/activity` (`eventType`, `eventCategory`, `eventSubcategory`, `productArea`, `actorUserId`, `since`, `until`, `search`, `sort`, `order`); `limit`/`offset` are ignored — the export returns up to 50000 matching rows within the sort. Columns: occurredAt, eventType, eventCategory, actorType, actorName, actorEmail, actorUserId, repoName, repoId, integrationType, integrationId, fixRequestId, issueId, readinessRunId, metadata. The response sets `Content-Disposition: attachment` with a `.csv` filename.
1218
+ */
1219
+ get: operations["exportWorkspaceActivity"];
1220
+ put?: never;
1221
+ post?: never;
1222
+ delete?: never;
1223
+ options?: never;
1224
+ head?: never;
1225
+ patch?: never;
1226
+ trace?: never;
1227
+ };
1208
1228
  "/workspaces/{workspaceId}/readiness/score-history": {
1209
1229
  parameters: {
1210
1230
  query?: never;
@@ -1753,6 +1773,24 @@ export interface paths {
1753
1773
  patch?: never;
1754
1774
  trace?: never;
1755
1775
  };
1776
+ "/me/consent": {
1777
+ parameters: {
1778
+ query?: never;
1779
+ header?: never;
1780
+ path?: never;
1781
+ cookie?: never;
1782
+ };
1783
+ /** Get cookie/storage consent for current user */
1784
+ get: operations["getMyConsent"];
1785
+ /** Upsert cookie/storage consent */
1786
+ put: operations["putMyConsent"];
1787
+ post?: never;
1788
+ delete?: never;
1789
+ options?: never;
1790
+ head?: never;
1791
+ patch?: never;
1792
+ trace?: never;
1793
+ };
1756
1794
  "/workspaces/{workspaceId}/org-chart/import": {
1757
1795
  parameters: {
1758
1796
  query?: never;
@@ -2790,21 +2828,37 @@ export interface components {
2790
2828
  disabled?: boolean | null;
2791
2829
  /** @description Repository size in KB as reported by GitHub. */
2792
2830
  size?: number | null;
2793
- /** @description All reasons this repo was skipped during sync or is ineligible for analysis. Each entry is a human-readable explanation (e.g. "This repo is archived"). Empty or absent means the repo passed all checks. */
2831
+ /** @description Hard structural reasons this repo cannot be analyzed (archived, disabled, too-large, workspace repo cap). Each entry is a human-readable explanation (e.g. "This repo is archived"). Empty or absent means no hard block. Forks and unsupported-language repos are NOT listed here — they are advisory `warnings` (#729) and remain analyzable. */
2794
2832
  ineligibleReasons?: string[] | null;
2833
+ /** @description Non-blocking advisories shown alongside an otherwise-analyzable repo (#729). Includes forks ("results reflect the forked code") and repos with no v1-supported stack, where the message embeds the GitHub language mix in percent. Absent/empty when there are no warnings. Unlike `ineligibleReasons`, warnings do NOT disable analyze/score/fix actions. */
2834
+ warnings?: string[] | null;
2795
2835
  /**
2796
- * @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 `ineligibleReasons`, which reflects structural sync gates.
2836
+ * @description Whether the repo can be analyzed (issue #44/#729). `ineligible` only for HARD structural gates (archived, disabled, too-large, workspace repo cap) — such repos render read-only in the AF list. A repo with no supported stack or that is a fork is `eligible` and carries a non-blocking `warnings` entry instead of being blocked.
2797
2837
  * @enum {string|null}
2798
2838
  */
2799
2839
  eligibilityStatus?: "eligible" | "ineligible" | null;
2800
- /** @description Human-readable explanation when `eligibilityStatus` is `ineligible` (e.g. "This repository's primary language (Python) is not supported in v1"). */
2840
+ /** @description Human-readable explanation when `eligibilityStatus` is `ineligible` (e.g. "This repo is archived"). For advisory language/fork notices see `warnings`, not this field. */
2801
2841
  eligibilityReason?: string | null;
2802
- /** @description Dominant supported stack (by GitHub language bytes), one of backend_jvm | ios_app | web_spa | backend_go | backend_python. Null for ineligible repos. */
2842
+ /** @description Dominant supported stack (by GitHub language bytes), one of backend_jvm | ios_app | web_spa | backend_go | backend_python. Null when no supported stack was detected. */
2803
2843
  primaryStack?: string | null;
2804
2844
  /** @description Second supported stack for a multi-stack repo, or null. */
2805
2845
  secondaryStack?: string | null;
2806
2846
  /** @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. */
2807
2847
  supportedStacks?: string[] | null;
2848
+ /** @description Per-language share of the repo from GitHub's `GET /repos/{owner}/{repo}/languages` byte counts, ordered by share descending (#729). Powers the "language mix" shown in the unsupported-stack warning. Absent/null until the repo has been synced with a language resolver. */
2849
+ languageBreakdown?: {
2850
+ /** @description GitHub language name (e.g. "TypeScript", "Go"). */
2851
+ language: string;
2852
+ /**
2853
+ * Format: float
2854
+ * @description Share of total language bytes, one decimal place (e.g. 64.2).
2855
+ */
2856
+ percent: number;
2857
+ /** @description True when this language maps to a v1-supported stack; false when the language is not supported. Lets the UI flag exactly which languages are not (fully) supported in a mixed/monorepo. */
2858
+ supported: boolean;
2859
+ /** @description The supported stack this language maps to (backend_jvm | ios_app | web_spa | backend_go | backend_python), or null when the language is unsupported. */
2860
+ stack?: string | null;
2861
+ }[] | null;
2808
2862
  };
2809
2863
  /** @description Resolved repo-sync eligibility gate (defaults or effective). All fields present. */
2810
2864
  RepoEligibilityConfigDto: {
@@ -2831,6 +2885,19 @@ export interface components {
2831
2885
  /** @description True when the caller is a platform admin (may set any value, incl. raising caps). */
2832
2886
  canEditUnrestricted: boolean;
2833
2887
  };
2888
+ /** @description Effective repo-eligibility limits applied to the GitHub repo list, plus the current count of eligible repos. Lets the UI render per-repo "size / limit" (compare each repo's `size` in `GithubInstalledRepoDto` to `maxRepoSizeKb`) and workspace "N / cap" usage (`eligibleRepoCount` / `maxReposPerWorkspace`). */
2889
+ RepoEligibilityLimitsDto: {
2890
+ /** @description Per-repo size cap in KB (GitHub-reported). 0 = no limit. */
2891
+ maxRepoSizeKb: number;
2892
+ /** @description Max repos that can be eligible per workspace. 0 = no limit. */
2893
+ maxReposPerWorkspace: number;
2894
+ /** @description Whether archived repos are treated as a hard block. */
2895
+ excludeArchived: boolean;
2896
+ /** @description Whether forked repos are excluded by the sync gate (forks are a warning, not a block). */
2897
+ excludeForks: boolean;
2898
+ /** @description Repos currently counting as eligible (eligibilityStatus != "ineligible"), i.e. those that count toward `maxReposPerWorkspace`. */
2899
+ eligibleRepoCount: number;
2900
+ };
2834
2901
  GithubMissingPermissionDto: {
2835
2902
  /** @description GitHub App permission key (e.g. contents, pull_requests). */
2836
2903
  name: string;
@@ -2918,6 +2985,8 @@ export interface components {
2918
2985
  account?: components["schemas"]["GithubAccountDto"] | null;
2919
2986
  /** @description Paginated merged installation repositories when `installed` is true. */
2920
2987
  repos?: components["schemas"]["GithubInstalledRepoListDto"] | null;
2988
+ /** @description Effective size/count limits and current eligible-repo usage for the repo list. Present when `installed` is true. Pair with each repo's `size` and `eligibilityStatus` to show "size / limit" and "N / cap" in the UI. */
2989
+ eligibilityLimits?: components["schemas"]["RepoEligibilityLimitsDto"] | null;
2921
2990
  /**
2922
2991
  * Format: uri
2923
2992
  * @description User accounts: github.com/settings/installations/<id>. Organizations: github.com/organizations/<login>/settings/installations/<id>.
@@ -3323,18 +3392,28 @@ export interface components {
3323
3392
  */
3324
3393
  archivedReason?: "github_removed" | "installation_disconnected" | "installation_replaced" | "superseded" | null;
3325
3394
  /**
3326
- * @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.
3395
+ * @description Whether the repo can be analyzed (#44/#729). Language support no longer makes a repo `ineligible` a missing v1-supported stack is surfaced via `warnings` and the repo stays analyzable. Null until the first sync/scan computes it.
3327
3396
  * @enum {string|null}
3328
3397
  */
3329
3398
  eligibilityStatus?: "eligible" | "ineligible" | null;
3330
- /** @description Human-readable explanation when `eligibilityStatus` is `ineligible`. */
3399
+ /** @description Human-readable explanation when `eligibilityStatus` is `ineligible`. For advisory language notices see `warnings`. */
3331
3400
  eligibilityReason?: string | null;
3332
- /** @description Dominant supported stack backend_jvm | ios_app | web_spa | backend_go | backend_python. Null when ineligible/uncomputed. */
3401
+ /** @description Non-blocking advisories for an analyzable repo (#729): no v1-supported stack (with the language mix), and hard-limit run outcomes (code size / file count exceeded) carried from the last run. Absent/empty when there are no warnings. */
3402
+ warnings?: string[] | null;
3403
+ /** @description Dominant supported stack — backend_jvm | ios_app | web_spa | backend_go | backend_python. Null when no supported stack/uncomputed. */
3333
3404
  primaryStack?: string | null;
3334
3405
  /** @description Second supported stack for a multi-stack repo, or null. */
3335
3406
  secondaryStack?: string | null;
3336
3407
  /** @description All supported stacks detected (ordered, primary first). Empty/null when none. */
3337
3408
  supportedStacks?: string[] | null;
3409
+ /** @description Per-language share from GitHub languages (#729), ordered by share descending. Each entry has `supported`/`stack` so the UI can tag which languages are (not) supported. Absent until the repo has been synced with a language resolver. */
3410
+ languageBreakdown?: {
3411
+ language: string;
3412
+ /** Format: float */
3413
+ percent: number;
3414
+ supported: boolean;
3415
+ stack?: string | null;
3416
+ }[] | null;
3338
3417
  };
3339
3418
  /** @description Single-repo detail response. Identical to RepoReadinessScoreDto except dimensions use DimensionScoreDetailDto (criteriaDetails required per dimension). */
3340
3419
  RepoReadinessScoreDetailDto: {
@@ -3362,6 +3441,25 @@ export interface components {
3362
3441
  archivedAt?: string | null;
3363
3442
  /** @enum {string|null} */
3364
3443
  archivedReason?: "github_removed" | "installation_disconnected" | "installation_replaced" | "superseded" | null;
3444
+ /**
3445
+ * @description See RepoReadinessScoreDto.eligibilityStatus. Language support is advisory (#729) and surfaced via `warnings`.
3446
+ * @enum {string|null}
3447
+ */
3448
+ eligibilityStatus?: "eligible" | "ineligible" | null;
3449
+ eligibilityReason?: string | null;
3450
+ /** @description Non-blocking advisories (no v1-supported stack, hard-limit run outcomes). See RepoReadinessScoreDto.warnings. */
3451
+ warnings?: string[] | null;
3452
+ primaryStack?: string | null;
3453
+ secondaryStack?: string | null;
3454
+ supportedStacks?: string[] | null;
3455
+ /** @description Per-language share with `supported`/`stack` tags. See RepoReadinessScoreDto.languageBreakdown. */
3456
+ languageBreakdown?: {
3457
+ language: string;
3458
+ /** Format: float */
3459
+ percent: number;
3460
+ supported: boolean;
3461
+ stack?: string | null;
3462
+ }[] | null;
3365
3463
  };
3366
3464
  AgenticFoundationDashboardSummaryDto: {
3367
3465
  repoCount: number;
@@ -3661,6 +3759,34 @@ export interface components {
3661
3759
  /** @description Temporary backward-compatibility alias (e.g. "Invalid timezone"). */
3662
3760
  legacyError?: string | null;
3663
3761
  };
3762
+ ConsentCategoriesDto: {
3763
+ /** @description Functional storage (preferences, onboarding, UI state). */
3764
+ functional: boolean;
3765
+ /** @description Analytics and product telemetry in the browser. */
3766
+ analytics: boolean;
3767
+ /** @description Advertising and remarketing tags. */
3768
+ marketing: boolean;
3769
+ };
3770
+ PutConsentBodyDto: {
3771
+ /** @description Cookie policy version the user consented to. */
3772
+ policyVersion: string;
3773
+ categories: components["schemas"]["ConsentCategoriesDto"];
3774
+ };
3775
+ ConsentRecordDto: {
3776
+ policyVersion: string;
3777
+ categories: components["schemas"]["ConsentCategoriesDto"];
3778
+ /**
3779
+ * Format: date-time
3780
+ * @description When consent was last recorded (UTC).
3781
+ */
3782
+ recordedAt: string;
3783
+ };
3784
+ ConsentValidationErrorDto: {
3785
+ /** @enum {string} */
3786
+ error: "ValidationError";
3787
+ issues: components["schemas"]["ValidationIssueDto"][];
3788
+ legacyError?: string | null;
3789
+ };
3664
3790
  OrgChartImportBodyDto: {
3665
3791
  /** @description Path in `org-charts` bucket after Supabase upload */
3666
3792
  storagePath: string;
@@ -4170,6 +4296,7 @@ export type GithubInstalledRepoDto = components['schemas']['GithubInstalledRepoD
4170
4296
  export type RepoEligibilityConfigDto = components['schemas']['RepoEligibilityConfigDto'];
4171
4297
  export type RepoEligibilityOverridesDto = components['schemas']['RepoEligibilityOverridesDto'];
4172
4298
  export type WorkspaceRepoEligibilityDto = components['schemas']['WorkspaceRepoEligibilityDto'];
4299
+ export type RepoEligibilityLimitsDto = components['schemas']['RepoEligibilityLimitsDto'];
4173
4300
  export type GithubMissingPermissionDto = components['schemas']['GithubMissingPermissionDto'];
4174
4301
  export type GithubInstallationSummaryDto = components['schemas']['GithubInstallationSummaryDto'];
4175
4302
  export type GithubPendingApprovalDto = components['schemas']['GithubPendingApprovalDto'];
@@ -4260,6 +4387,10 @@ export type NotificationPreferencesDto = components['schemas']['NotificationPref
4260
4387
  export type PreferencesDto = components['schemas']['PreferencesDto'];
4261
4388
  export type ValidationIssueDto = components['schemas']['ValidationIssueDto'];
4262
4389
  export type PreferencesValidationErrorDto = components['schemas']['PreferencesValidationErrorDto'];
4390
+ export type ConsentCategoriesDto = components['schemas']['ConsentCategoriesDto'];
4391
+ export type PutConsentBodyDto = components['schemas']['PutConsentBodyDto'];
4392
+ export type ConsentRecordDto = components['schemas']['ConsentRecordDto'];
4393
+ export type ConsentValidationErrorDto = components['schemas']['ConsentValidationErrorDto'];
4263
4394
  export type OrgChartImportBodyDto = components['schemas']['OrgChartImportBodyDto'];
4264
4395
  export type YourAiJourneyPrSignalsWeekDto = components['schemas']['YourAiJourneyPrSignalsWeekDto'];
4265
4396
  export type YourAiJourneyPrSignalsDto = components['schemas']['YourAiJourneyPrSignalsDto'];
@@ -7369,6 +7500,8 @@ export interface operations {
7369
7500
  until?: string;
7370
7501
  /** @description Filter by event namespace prefix (e.g. "fix", "repo", "integration", "readiness", "config", "member"). */
7371
7502
  eventCategory?: string;
7503
+ /** @description Filter by a dotted event-type *subgroup* (#156): a strict prefix of an event type with two or more segments, matching every lifecycle event under it in a single call. Finer than `eventCategory` (first segment only). Example: `integrations.cursor.execution_key` returns `integrations.cursor.execution_key.added`, `.updated`, `.removed`, and `.check_failed`; `integrations.cursor` returns all Cursor key events; `integration.github` returns all GitHub integration events. Must be one of the known subcategories or the request is rejected (400). */
7504
+ eventSubcategory?: string;
7372
7505
  /** @description Case-insensitive substring filter applied across repo name, integration type, actor email, and actor display name. */
7373
7506
  search?: string;
7374
7507
  };
@@ -7411,6 +7544,61 @@ export interface operations {
7411
7544
  };
7412
7545
  };
7413
7546
  };
7547
+ exportWorkspaceActivity: {
7548
+ parameters: {
7549
+ query?: {
7550
+ sort?: "when" | "who" | "what" | "why" | "where";
7551
+ /** @description Sort direction. */
7552
+ order?: components["parameters"]["PaginationOrder"];
7553
+ productArea?: "integration" | "agentic_foundation" | "workspace_team" | "productivity" | "all";
7554
+ eventType?: components["schemas"]["ActivityLogEventTypeDto"];
7555
+ eventCategory?: string;
7556
+ /** @description Dotted event-type subgroup prefix (see the activity list endpoint). */
7557
+ eventSubcategory?: string;
7558
+ actorUserId?: string;
7559
+ since?: string;
7560
+ until?: string;
7561
+ search?: string;
7562
+ };
7563
+ header?: never;
7564
+ path: {
7565
+ workspaceId: components["parameters"]["WorkspaceId"];
7566
+ };
7567
+ cookie?: never;
7568
+ };
7569
+ requestBody?: never;
7570
+ responses: {
7571
+ /** @description CSV file of activity log entries */
7572
+ 200: {
7573
+ headers: {
7574
+ [name: string]: unknown;
7575
+ };
7576
+ content: {
7577
+ "text/csv": string;
7578
+ };
7579
+ };
7580
+ /** @description Invalid query parameters */
7581
+ 400: {
7582
+ headers: {
7583
+ [name: string]: unknown;
7584
+ };
7585
+ content: {
7586
+ "application/json": components["schemas"]["ErrorMessageDto"];
7587
+ };
7588
+ };
7589
+ 401: components["responses"]["Unauthorized"];
7590
+ 403: components["responses"]["Forbidden"];
7591
+ /** @description Workspace does not exist */
7592
+ 404: {
7593
+ headers: {
7594
+ [name: string]: unknown;
7595
+ };
7596
+ content: {
7597
+ "application/json": components["schemas"]["ErrorMessageDto"];
7598
+ };
7599
+ };
7600
+ };
7601
+ };
7414
7602
  getReadinessScoreHistory: {
7415
7603
  parameters: {
7416
7604
  query?: {
@@ -8765,6 +8953,70 @@ export interface operations {
8765
8953
  401: components["responses"]["Unauthorized"];
8766
8954
  };
8767
8955
  };
8956
+ getMyConsent: {
8957
+ parameters: {
8958
+ query?: never;
8959
+ header?: never;
8960
+ path?: never;
8961
+ cookie?: never;
8962
+ };
8963
+ requestBody?: never;
8964
+ responses: {
8965
+ /** @description Consent record */
8966
+ 200: {
8967
+ headers: {
8968
+ [name: string]: unknown;
8969
+ };
8970
+ content: {
8971
+ "application/json": components["schemas"]["ConsentRecordDto"];
8972
+ };
8973
+ };
8974
+ 401: components["responses"]["Unauthorized"];
8975
+ /** @description No consent record stored yet */
8976
+ 404: {
8977
+ headers: {
8978
+ [name: string]: unknown;
8979
+ };
8980
+ content: {
8981
+ "application/json": components["schemas"]["ErrorMessageDto"];
8982
+ };
8983
+ };
8984
+ };
8985
+ };
8986
+ putMyConsent: {
8987
+ parameters: {
8988
+ query?: never;
8989
+ header?: never;
8990
+ path?: never;
8991
+ cookie?: never;
8992
+ };
8993
+ requestBody: {
8994
+ content: {
8995
+ "application/json": components["schemas"]["PutConsentBodyDto"];
8996
+ };
8997
+ };
8998
+ responses: {
8999
+ /** @description Saved consent record */
9000
+ 200: {
9001
+ headers: {
9002
+ [name: string]: unknown;
9003
+ };
9004
+ content: {
9005
+ "application/json": components["schemas"]["ConsentRecordDto"];
9006
+ };
9007
+ };
9008
+ /** @description Validation failed */
9009
+ 400: {
9010
+ headers: {
9011
+ [name: string]: unknown;
9012
+ };
9013
+ content: {
9014
+ "application/json": components["schemas"]["ConsentValidationErrorDto"];
9015
+ };
9016
+ };
9017
+ 401: components["responses"]["Unauthorized"];
9018
+ };
9019
+ };
8768
9020
  postOrgChartImport: {
8769
9021
  parameters: {
8770
9022
  query?: never;