@thinkai/tai-api-contract 2.247.0 → 2.248.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.
@@ -1,7 +1,7 @@
1
1
  openapi: 3.0.3
2
2
  info:
3
3
  title: ThinkAI API
4
- version: 2.247.0
4
+ version: 2.248.0
5
5
  description: >
6
6
  Contract surface for the AI Driven SDLC backend used by ThinkAI.
7
7
  Workspace-scoped routes use `/workspaces/{workspaceId}/...`.
@@ -10592,6 +10592,75 @@ paths:
10592
10592
  $ref: "#/components/schemas/ErrorMessageDto"
10593
10593
 
10594
10594
  /workspaces/{workspaceId}/agentic-foundation/repo-scope:
10595
+ get:
10596
+ tags: [AgenticFoundation]
10597
+ summary: List Agentic Foundation repository scope (lightweight)
10598
+ description: >
10599
+ Returns a paginated page of materialized workspace repos for Agentic Foundation scope and
10600
+ GitHub contribution selection. Single-table read of `tai_workspace_repos` (no readiness
10601
+ scorecard joins). Ordered by `providerSlug` ascending, then `repoId`. Default
10602
+ `includeArchived=true` so callers can reconcile Active / Inactive / system-archived rows
10603
+ in one pass. Workspace members may call this endpoint.
10604
+ operationId: getAgenticFoundationRepoScope
10605
+ parameters:
10606
+ - $ref: "#/components/parameters/WorkspaceId"
10607
+ - name: includeArchived
10608
+ in: query
10609
+ required: false
10610
+ description: >
10611
+ When `true` (default), includes Inactive and system-archived repos alongside Active
10612
+ ones. When `false`, returns only repos with `archivedAt` null.
10613
+ schema:
10614
+ type: boolean
10615
+ default: true
10616
+ - name: limit
10617
+ in: query
10618
+ required: false
10619
+ description: Page size (default 1000, max 2000).
10620
+ schema:
10621
+ type: integer
10622
+ minimum: 1
10623
+ maximum: 2000
10624
+ default: 1000
10625
+ - name: offset
10626
+ in: query
10627
+ required: false
10628
+ description: Zero-based row offset into the filtered, ordered result set.
10629
+ schema:
10630
+ type: integer
10631
+ minimum: 0
10632
+ default: 0
10633
+ responses:
10634
+ "200":
10635
+ description: Paginated lightweight repo scope rows
10636
+ content:
10637
+ application/json:
10638
+ schema:
10639
+ $ref: "#/components/schemas/AgenticFoundationRepoScopeListDto"
10640
+ examples:
10641
+ emptyWorkspace:
10642
+ summary: No repos materialized yet
10643
+ value:
10644
+ total: 0
10645
+ limit: 1000
10646
+ offset: 0
10647
+ items: []
10648
+ "400":
10649
+ description: Invalid limit or offset
10650
+ content:
10651
+ application/json:
10652
+ schema:
10653
+ $ref: "#/components/schemas/ErrorMessageDto"
10654
+ "401":
10655
+ $ref: "#/components/responses/Unauthorized"
10656
+ "403":
10657
+ $ref: "#/components/responses/Forbidden"
10658
+ "404":
10659
+ description: Workspace does not exist
10660
+ content:
10661
+ application/json:
10662
+ schema:
10663
+ $ref: "#/components/schemas/ErrorMessageDto"
10595
10664
  put:
10596
10665
  tags: [AgenticFoundation]
10597
10666
  summary: Update Agentic Foundation repository scope
@@ -29400,6 +29469,75 @@ components:
29400
29469
  nullable: true
29401
29470
  description: ID of the freshly enqueued readiness scan run (only present on re-add).
29402
29471
 
29472
+ AgenticFoundationRepoScopeItemDto:
29473
+ type: object
29474
+ required:
29475
+ - repoId
29476
+ - repoName
29477
+ - providerSlug
29478
+ - language
29479
+ - archivedAt
29480
+ - archivedReason
29481
+ - excludedFromIngest
29482
+ properties:
29483
+ repoId:
29484
+ type: string
29485
+ format: uuid
29486
+ repoName:
29487
+ type: string
29488
+ maxLength: 256
29489
+ providerSlug:
29490
+ type: string
29491
+ description: Provider-qualified slug (e.g. `org/repo` for GitHub).
29492
+ language:
29493
+ type: string
29494
+ maxLength: 64
29495
+ archivedAt:
29496
+ type: string
29497
+ format: date-time
29498
+ nullable: true
29499
+ description: Null when the repo is Active (in Agentic Foundation scope).
29500
+ archivedReason:
29501
+ type: string
29502
+ nullable: true
29503
+ enum:
29504
+ [
29505
+ github_archived,
29506
+ github_removed,
29507
+ installation_disconnected,
29508
+ installation_replaced,
29509
+ superseded,
29510
+ user_removed,
29511
+ ]
29512
+ description: >
29513
+ Why the repo was archived. Same semantics as `RepoReadinessScoreDto.archivedReason`.
29514
+ Null when `archivedAt` is null.
29515
+ excludedFromIngest:
29516
+ type: boolean
29517
+ description: >
29518
+ True when the GitHub repository selection left this Inactive repo out of productivity
29519
+ and SDLC ingest. Always present (false when not excluded).
29520
+
29521
+ AgenticFoundationRepoScopeListDto:
29522
+ type: object
29523
+ required: [total, limit, offset, items]
29524
+ properties:
29525
+ total:
29526
+ type: integer
29527
+ minimum: 0
29528
+ description: Total matching rows before pagination.
29529
+ limit:
29530
+ type: integer
29531
+ minimum: 1
29532
+ maximum: 2000
29533
+ offset:
29534
+ type: integer
29535
+ minimum: 0
29536
+ items:
29537
+ type: array
29538
+ items:
29539
+ $ref: "#/components/schemas/AgenticFoundationRepoScopeItemDto"
29540
+
29403
29541
  PutAgenticFoundationRepoScopeChangeDto:
29404
29542
  type: object
29405
29543
  required: [repoId, included]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.247.0",
3
+ "version": "2.248.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -3818,7 +3818,11 @@ export interface paths {
3818
3818
  path?: never;
3819
3819
  cookie?: never;
3820
3820
  };
3821
- get?: never;
3821
+ /**
3822
+ * List Agentic Foundation repository scope (lightweight)
3823
+ * @description Returns a paginated page of materialized workspace repos for Agentic Foundation scope and GitHub contribution selection. Single-table read of `tai_workspace_repos` (no readiness scorecard joins). Ordered by `providerSlug` ascending, then `repoId`. Default `includeArchived=true` so callers can reconcile Active / Inactive / system-archived rows in one pass. Workspace members may call this endpoint.
3824
+ */
3825
+ get: operations["getAgenticFoundationRepoScope"];
3822
3826
  /**
3823
3827
  * Update Agentic Foundation repository scope
3824
3828
  * @description Bulk include/exclude materialized repos from Agentic Foundation by toggling the existing `user_removed` archive state. Excluded (Inactive) repos stop being scanned and stay integrated for productivity and SDLC ingest, unless `excludeFromIngest` is true (the GitHub repository selection), which leaves them out of ingest too. Including a repo restores both. The GitHub App grant itself is unchanged. Only workspace admins may call this endpoint. Partial failures are reported per repo.
@@ -12144,6 +12148,33 @@ export interface components {
12144
12148
  */
12145
12149
  runId?: string | null;
12146
12150
  };
12151
+ AgenticFoundationRepoScopeItemDto: {
12152
+ /** Format: uuid */
12153
+ repoId: string;
12154
+ repoName: string;
12155
+ /** @description Provider-qualified slug (e.g. `org/repo` for GitHub). */
12156
+ providerSlug: string;
12157
+ language: string;
12158
+ /**
12159
+ * Format: date-time
12160
+ * @description Null when the repo is Active (in Agentic Foundation scope).
12161
+ */
12162
+ archivedAt: string | null;
12163
+ /**
12164
+ * @description Why the repo was archived. Same semantics as `RepoReadinessScoreDto.archivedReason`. Null when `archivedAt` is null.
12165
+ * @enum {string|null}
12166
+ */
12167
+ archivedReason: "github_archived" | "github_removed" | "installation_disconnected" | "installation_replaced" | "superseded" | "user_removed" | null;
12168
+ /** @description True when the GitHub repository selection left this Inactive repo out of productivity and SDLC ingest. Always present (false when not excluded). */
12169
+ excludedFromIngest: boolean;
12170
+ };
12171
+ AgenticFoundationRepoScopeListDto: {
12172
+ /** @description Total matching rows before pagination. */
12173
+ total: number;
12174
+ limit: number;
12175
+ offset: number;
12176
+ items: components["schemas"]["AgenticFoundationRepoScopeItemDto"][];
12177
+ };
12147
12178
  PutAgenticFoundationRepoScopeChangeDto: {
12148
12179
  /** Format: uuid */
12149
12180
  repoId: string;
@@ -16428,6 +16459,8 @@ export type YourAiJourneyAiSpendWeekDto = components['schemas']['YourAiJourneyAi
16428
16459
  export type YourAiJourneyAiSpendDto = components['schemas']['YourAiJourneyAiSpendDto'];
16429
16460
  export type PatchRepoArchiveBodyDto = components['schemas']['PatchRepoArchiveBodyDto'];
16430
16461
  export type PatchRepoArchiveResponseDto = components['schemas']['PatchRepoArchiveResponseDto'];
16462
+ export type AgenticFoundationRepoScopeItemDto = components['schemas']['AgenticFoundationRepoScopeItemDto'];
16463
+ export type AgenticFoundationRepoScopeListDto = components['schemas']['AgenticFoundationRepoScopeListDto'];
16431
16464
  export type PutAgenticFoundationRepoScopeChangeDto = components['schemas']['PutAgenticFoundationRepoScopeChangeDto'];
16432
16465
  export type PutAgenticFoundationRepoScopeBodyDto = components['schemas']['PutAgenticFoundationRepoScopeBodyDto'];
16433
16466
  export type PutAgenticFoundationRepoScopeAppliedDto = components['schemas']['PutAgenticFoundationRepoScopeAppliedDto'];
@@ -27348,6 +27381,55 @@ export interface operations {
27348
27381
  };
27349
27382
  };
27350
27383
  };
27384
+ getAgenticFoundationRepoScope: {
27385
+ parameters: {
27386
+ query?: {
27387
+ /** @description When `true` (default), includes Inactive and system-archived repos alongside Active ones. When `false`, returns only repos with `archivedAt` null. */
27388
+ includeArchived?: boolean;
27389
+ /** @description Page size (default 1000, max 2000). */
27390
+ limit?: number;
27391
+ /** @description Zero-based row offset into the filtered, ordered result set. */
27392
+ offset?: number;
27393
+ };
27394
+ header?: never;
27395
+ path: {
27396
+ workspaceId: components["parameters"]["WorkspaceId"];
27397
+ };
27398
+ cookie?: never;
27399
+ };
27400
+ requestBody?: never;
27401
+ responses: {
27402
+ /** @description Paginated lightweight repo scope rows */
27403
+ 200: {
27404
+ headers: {
27405
+ [name: string]: unknown;
27406
+ };
27407
+ content: {
27408
+ "application/json": components["schemas"]["AgenticFoundationRepoScopeListDto"];
27409
+ };
27410
+ };
27411
+ /** @description Invalid limit or offset */
27412
+ 400: {
27413
+ headers: {
27414
+ [name: string]: unknown;
27415
+ };
27416
+ content: {
27417
+ "application/json": components["schemas"]["ErrorMessageDto"];
27418
+ };
27419
+ };
27420
+ 401: components["responses"]["Unauthorized"];
27421
+ 403: components["responses"]["Forbidden"];
27422
+ /** @description Workspace does not exist */
27423
+ 404: {
27424
+ headers: {
27425
+ [name: string]: unknown;
27426
+ };
27427
+ content: {
27428
+ "application/json": components["schemas"]["ErrorMessageDto"];
27429
+ };
27430
+ };
27431
+ };
27432
+ };
27351
27433
  putAgenticFoundationRepoScope: {
27352
27434
  parameters: {
27353
27435
  query?: never;