@thinkai/tai-api-contract 2.96.0 → 2.97.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.96.0
4
+ version: 2.97.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}/...`.
@@ -1492,6 +1492,51 @@ paths:
1492
1492
  schema:
1493
1493
  $ref: "#/components/schemas/ErrorMessageDto"
1494
1494
 
1495
+ /workspaces/{workspaceId}/delivery-topology:
1496
+ put:
1497
+ tags: [Workspace]
1498
+ summary: Set workspace delivery topology
1499
+ description: >
1500
+ Persist the workspace delivery topology used by federated readiness assessment:
1501
+ which connected repos hold terraform / gitops / ci_templates / api_contracts
1502
+ artifacts, plus optional per-service overrides. Role and override `providerSlug`
1503
+ values must reference repos connected to this workspace, otherwise the request is
1504
+ rejected with `400 invalid_delivery_topology`. Send `null` (or
1505
+ `{ "deliveryTopology": null }`) to clear the topology.
1506
+
1507
+ Requires editor or admin workspace role.
1508
+ operationId: putWorkspaceDeliveryTopology
1509
+ parameters:
1510
+ - $ref: "#/components/parameters/WorkspaceId"
1511
+ requestBody:
1512
+ required: true
1513
+ content:
1514
+ application/json:
1515
+ schema:
1516
+ type: object
1517
+ nullable: true
1518
+ allOf:
1519
+ - $ref: "#/components/schemas/DeliveryTopologyDto"
1520
+ responses:
1521
+ "204":
1522
+ description: Topology persisted (or cleared).
1523
+ "400":
1524
+ description: Invalid topology payload or unconnected repo referenced.
1525
+ content:
1526
+ application/json:
1527
+ schema:
1528
+ $ref: "#/components/schemas/ErrorMessageDto"
1529
+ "401":
1530
+ $ref: "#/components/responses/Unauthorized"
1531
+ "403":
1532
+ $ref: "#/components/responses/Forbidden"
1533
+ "404":
1534
+ description: Workspace does not exist or malformed workspaceId
1535
+ content:
1536
+ application/json:
1537
+ schema:
1538
+ $ref: "#/components/schemas/ErrorMessageDto"
1539
+
1495
1540
  /workspaces/{workspaceId}/sources:
1496
1541
  put:
1497
1542
  tags: [Workspace]
@@ -10375,6 +10420,79 @@ components:
10375
10420
  hasCodeIntelligenceExecutionToken:
10376
10421
  type: boolean
10377
10422
  description: True when a dedicated `code_intelligence` source has a stored executionToken.
10423
+ deliveryTopology:
10424
+ type: object
10425
+ nullable: true
10426
+ allOf:
10427
+ - $ref: "#/components/schemas/DeliveryTopologyDto"
10428
+ description: >
10429
+ Federated-readiness delivery topology: which connected repos hold terraform /
10430
+ gitops / ci_templates / api_contracts truth for this workspace. Null when not
10431
+ configured. Change via `PUT /workspaces/{workspaceId}/delivery-topology`.
10432
+
10433
+ DeliveryRoleConfigDto:
10434
+ type: object
10435
+ required: [providerSlug]
10436
+ properties:
10437
+ providerSlug:
10438
+ type: string
10439
+ description: Connected workspace repo (`owner/repo`) that holds this role's artifacts.
10440
+ engine:
10441
+ type: string
10442
+ enum: [terraform, pulumi, cdk]
10443
+ description: IaC engine hint (terraform role only).
10444
+ type:
10445
+ type: string
10446
+ enum: [reusable_workflows]
10447
+ description: CI templates flavor (ci_templates role only).
10448
+ custom:
10449
+ type: boolean
10450
+ description: Set true for extension roles outside the known role keys.
10451
+ RepoDeliveryOverrideDto:
10452
+ type: object
10453
+ properties:
10454
+ deliveryModel:
10455
+ type: string
10456
+ enum: [auto, k8s_microservices, mobile_store, web_hosting, data_pipelines, monorepo, library, hybrid]
10457
+ roles:
10458
+ type: object
10459
+ additionalProperties:
10460
+ type: string
10461
+ description: Per-service role → providerSlug overrides (merged over workspace roles).
10462
+ targetPathHint:
10463
+ type: string
10464
+ description: Path prefix inside platform repos where this service's artifacts live.
10465
+ DeliveryTopologyDto:
10466
+ type: object
10467
+ required: [deliveryModel, ciProvider, splitInfra, roles, repoOverrides]
10468
+ properties:
10469
+ deliveryModel:
10470
+ type: string
10471
+ enum: [auto, k8s_microservices, mobile_store, web_hosting, data_pipelines, monorepo, library, hybrid]
10472
+ ciProvider:
10473
+ type: string
10474
+ enum: [github_actions, jenkins, gitlab, bitbucket, hybrid, external_documented]
10475
+ splitInfra:
10476
+ type: boolean
10477
+ description: True when infra/delivery artifacts live outside service repos.
10478
+ roles:
10479
+ type: object
10480
+ additionalProperties:
10481
+ $ref: "#/components/schemas/DeliveryRoleConfigDto"
10482
+ description: >
10483
+ Role → platform repo mapping. Known keys: terraform, gitops, ci_templates,
10484
+ jenkins_shared, mobile_release, hosting, data_platform, api_contracts, sonar_config.
10485
+ servicePathConvention:
10486
+ type: string
10487
+ nullable: true
10488
+ description: >
10489
+ Optional path template inside platform repos, e.g. `services/{repo_name}/`
10490
+ (`{repo_name}` and `{provider_slug}` placeholders supported).
10491
+ repoOverrides:
10492
+ type: object
10493
+ additionalProperties:
10494
+ $ref: "#/components/schemas/RepoDeliveryOverrideDto"
10495
+ description: Per-service-repo overrides keyed by provider slug.
10378
10496
 
10379
10497
  TestConnectionResponseDto:
10380
10498
  type: object
@@ -14901,6 +15019,58 @@ components:
14901
15019
  per-repo "size / limit". When the size exceeds the limit the latest scan is recorded as
14902
15020
  `partial_failed` with `lastRunErrorCode = exceeded_repo_size_limit` and the repo is marked
14903
15021
  `ineligible`. Null until a scan has populated it.
15022
+ platformArchetype:
15023
+ type: string
15024
+ nullable: true
15025
+ enum: [terraform_platform, gitops_platform, ci_templates, api_contracts_platform]
15026
+ description: >
15027
+ Federated readiness: set when the repo was classified as a platform repository and
15028
+ scored with the reduced platform rubric profile. Null for service repos. The UI shows
15029
+ a "Platform repository" badge instead of comparing its score against service repos.
15030
+ linkedRoleAssessment:
15031
+ type: object
15032
+ nullable: true
15033
+ allOf:
15034
+ - $ref: "#/components/schemas/LinkedRoleAssessmentDto"
15035
+ description: >
15036
+ Federated readiness completeness for service repos: which linked platform roles
15037
+ (terraform/gitops/ci_templates/api_contracts, from the workspace delivery topology)
15038
+ are still missing scan evidence. Absent/null when no topology is configured or every
15039
+ declared role has fresh metadata (`complete: true`).
15040
+
15041
+ LinkedRolePendingDto:
15042
+ type: object
15043
+ required: [role, providerSlug, reason]
15044
+ properties:
15045
+ role:
15046
+ type: string
15047
+ description: Topology role key, e.g. terraform | gitops | ci_templates | api_contracts.
15048
+ providerSlug:
15049
+ type: string
15050
+ description: Platform repo (`owner/repo`) that must be scanned to satisfy this role.
15051
+ reason:
15052
+ type: string
15053
+ enum: [no_scan, no_metadata_emitted, stale]
15054
+ description: >
15055
+ `no_scan` — the platform repo has no successful readiness run yet;
15056
+ `no_metadata_emitted` — it was scanned but emitted no linkage for this service
15057
+ (wrong archetype or scan predates federated readiness); `stale` — metadata is older
15058
+ than the hard TTL (30 days) and must be refreshed by re-scanning the platform repo.
15059
+ lastRunAt:
15060
+ type: string
15061
+ format: date-time
15062
+ nullable: true
15063
+ description: Latest succeeded scan of the platform repo, when one exists.
15064
+ LinkedRoleAssessmentDto:
15065
+ type: object
15066
+ required: [complete, pending]
15067
+ properties:
15068
+ complete:
15069
+ type: boolean
15070
+ pending:
15071
+ type: array
15072
+ items:
15073
+ $ref: "#/components/schemas/LinkedRolePendingDto"
14904
15074
 
14905
15075
  RepoReadinessScoreDetailDto:
14906
15076
  type: object
@@ -15020,6 +15190,17 @@ components:
15020
15190
  nullable: true
15021
15191
  minimum: 0
15022
15192
  description: GitHub-reported repository size in KB, refreshed on each scan. See RepoReadinessScoreDto.sizeKb.
15193
+ platformArchetype:
15194
+ type: string
15195
+ nullable: true
15196
+ enum: [terraform_platform, gitops_platform, ci_templates, api_contracts_platform]
15197
+ description: See RepoReadinessScoreDto.platformArchetype.
15198
+ linkedRoleAssessment:
15199
+ type: object
15200
+ nullable: true
15201
+ allOf:
15202
+ - $ref: "#/components/schemas/LinkedRoleAssessmentDto"
15203
+ description: See RepoReadinessScoreDto.linkedRoleAssessment.
15023
15204
 
15024
15205
  AgenticFoundationDashboardSummaryDto:
15025
15206
  type: object
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.96.0",
3
+ "version": "2.97.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -561,6 +561,27 @@ export interface paths {
561
561
  patch?: never;
562
562
  trace?: never;
563
563
  };
564
+ "/workspaces/{workspaceId}/delivery-topology": {
565
+ parameters: {
566
+ query?: never;
567
+ header?: never;
568
+ path?: never;
569
+ cookie?: never;
570
+ };
571
+ get?: never;
572
+ /**
573
+ * Set workspace delivery topology
574
+ * @description Persist the workspace delivery topology used by federated readiness assessment: which connected repos hold terraform / gitops / ci_templates / api_contracts artifacts, plus optional per-service overrides. Role and override `providerSlug` values must reference repos connected to this workspace, otherwise the request is rejected with `400 invalid_delivery_topology`. Send `null` (or `{ "deliveryTopology": null }`) to clear the topology.
575
+ * Requires editor or admin workspace role.
576
+ */
577
+ put: operations["putWorkspaceDeliveryTopology"];
578
+ post?: never;
579
+ delete?: never;
580
+ options?: never;
581
+ head?: never;
582
+ patch?: never;
583
+ trace?: never;
584
+ };
564
585
  "/workspaces/{workspaceId}/sources": {
565
586
  parameters: {
566
587
  query?: never;
@@ -4182,6 +4203,52 @@ export interface components {
4182
4203
  codeIntelligenceClaudeModel?: string | null;
4183
4204
  /** @description True when a dedicated `code_intelligence` source has a stored executionToken. */
4184
4205
  hasCodeIntelligenceExecutionToken?: boolean;
4206
+ /** @description Federated-readiness delivery topology: which connected repos hold terraform / gitops / ci_templates / api_contracts truth for this workspace. Null when not configured. Change via `PUT /workspaces/{workspaceId}/delivery-topology`. */
4207
+ deliveryTopology?: components["schemas"]["DeliveryTopologyDto"] | null;
4208
+ };
4209
+ DeliveryRoleConfigDto: {
4210
+ /** @description Connected workspace repo (`owner/repo`) that holds this role's artifacts. */
4211
+ providerSlug: string;
4212
+ /**
4213
+ * @description IaC engine hint (terraform role only).
4214
+ * @enum {string}
4215
+ */
4216
+ engine?: "terraform" | "pulumi" | "cdk";
4217
+ /**
4218
+ * @description CI templates flavor (ci_templates role only).
4219
+ * @enum {string}
4220
+ */
4221
+ type?: "reusable_workflows";
4222
+ /** @description Set true for extension roles outside the known role keys. */
4223
+ custom?: boolean;
4224
+ };
4225
+ RepoDeliveryOverrideDto: {
4226
+ /** @enum {string} */
4227
+ deliveryModel?: "auto" | "k8s_microservices" | "mobile_store" | "web_hosting" | "data_pipelines" | "monorepo" | "library" | "hybrid";
4228
+ /** @description Per-service role → providerSlug overrides (merged over workspace roles). */
4229
+ roles?: {
4230
+ [key: string]: string;
4231
+ };
4232
+ /** @description Path prefix inside platform repos where this service's artifacts live. */
4233
+ targetPathHint?: string;
4234
+ };
4235
+ DeliveryTopologyDto: {
4236
+ /** @enum {string} */
4237
+ deliveryModel: "auto" | "k8s_microservices" | "mobile_store" | "web_hosting" | "data_pipelines" | "monorepo" | "library" | "hybrid";
4238
+ /** @enum {string} */
4239
+ ciProvider: "github_actions" | "jenkins" | "gitlab" | "bitbucket" | "hybrid" | "external_documented";
4240
+ /** @description True when infra/delivery artifacts live outside service repos. */
4241
+ splitInfra: boolean;
4242
+ /** @description Role → platform repo mapping. Known keys: terraform, gitops, ci_templates, jenkins_shared, mobile_release, hosting, data_platform, api_contracts, sonar_config. */
4243
+ roles: {
4244
+ [key: string]: components["schemas"]["DeliveryRoleConfigDto"];
4245
+ };
4246
+ /** @description Optional path template inside platform repos, e.g. `services/{repo_name}/` (`{repo_name}` and `{provider_slug}` placeholders supported). */
4247
+ servicePathConvention?: string | null;
4248
+ /** @description Per-service-repo overrides keyed by provider slug. */
4249
+ repoOverrides: {
4250
+ [key: string]: components["schemas"]["RepoDeliveryOverrideDto"];
4251
+ };
4185
4252
  };
4186
4253
  TestConnectionResponseDto: {
4187
4254
  success: boolean;
@@ -6369,6 +6436,33 @@ export interface components {
6369
6436
  }[] | null;
6370
6437
  /** @description GitHub-reported repository size in KB (includes git history), refreshed on each readiness scan (#729). Compare against `eligibilityLimits.maxRepoSizeKb` on the list response to show per-repo "size / limit". When the size exceeds the limit the latest scan is recorded as `partial_failed` with `lastRunErrorCode = exceeded_repo_size_limit` and the repo is marked `ineligible`. Null until a scan has populated it. */
6371
6438
  sizeKb?: number | null;
6439
+ /**
6440
+ * @description Federated readiness: set when the repo was classified as a platform repository and scored with the reduced platform rubric profile. Null for service repos. The UI shows a "Platform repository" badge instead of comparing its score against service repos.
6441
+ * @enum {string|null}
6442
+ */
6443
+ platformArchetype?: "terraform_platform" | "gitops_platform" | "ci_templates" | "api_contracts_platform" | null;
6444
+ /** @description Federated readiness completeness for service repos: which linked platform roles (terraform/gitops/ci_templates/api_contracts, from the workspace delivery topology) are still missing scan evidence. Absent/null when no topology is configured or every declared role has fresh metadata (`complete: true`). */
6445
+ linkedRoleAssessment?: components["schemas"]["LinkedRoleAssessmentDto"] | null;
6446
+ };
6447
+ LinkedRolePendingDto: {
6448
+ /** @description Topology role key, e.g. terraform | gitops | ci_templates | api_contracts. */
6449
+ role: string;
6450
+ /** @description Platform repo (`owner/repo`) that must be scanned to satisfy this role. */
6451
+ providerSlug: string;
6452
+ /**
6453
+ * @description `no_scan` — the platform repo has no successful readiness run yet; `no_metadata_emitted` — it was scanned but emitted no linkage for this service (wrong archetype or scan predates federated readiness); `stale` — metadata is older than the hard TTL (30 days) and must be refreshed by re-scanning the platform repo.
6454
+ * @enum {string}
6455
+ */
6456
+ reason: "no_scan" | "no_metadata_emitted" | "stale";
6457
+ /**
6458
+ * Format: date-time
6459
+ * @description Latest succeeded scan of the platform repo, when one exists.
6460
+ */
6461
+ lastRunAt?: string | null;
6462
+ };
6463
+ LinkedRoleAssessmentDto: {
6464
+ complete: boolean;
6465
+ pending: components["schemas"]["LinkedRolePendingDto"][];
6372
6466
  };
6373
6467
  /** @description Single-repo detail response. Identical to RepoReadinessScoreDto except dimensions use DimensionScoreDetailDto (criteriaDetails required per dimension). */
6374
6468
  RepoReadinessScoreDetailDto: {
@@ -6420,6 +6514,13 @@ export interface components {
6420
6514
  }[] | null;
6421
6515
  /** @description GitHub-reported repository size in KB, refreshed on each scan. See RepoReadinessScoreDto.sizeKb. */
6422
6516
  sizeKb?: number | null;
6517
+ /**
6518
+ * @description See RepoReadinessScoreDto.platformArchetype.
6519
+ * @enum {string|null}
6520
+ */
6521
+ platformArchetype?: "terraform_platform" | "gitops_platform" | "ci_templates" | "api_contracts_platform" | null;
6522
+ /** @description See RepoReadinessScoreDto.linkedRoleAssessment. */
6523
+ linkedRoleAssessment?: components["schemas"]["LinkedRoleAssessmentDto"] | null;
6423
6524
  };
6424
6525
  AgenticFoundationDashboardSummaryDto: {
6425
6526
  repoCount: number;
@@ -8291,6 +8392,9 @@ export type JiraSourceConfigDto = components['schemas']['JiraSourceConfigDto'];
8291
8392
  export type AgentExecutionProviderDto = components['schemas']['AgentExecutionProviderDto'];
8292
8393
  export type PutCodeIntelligenceSettingsDto = components['schemas']['PutCodeIntelligenceSettingsDto'];
8293
8394
  export type WorkspaceConfigDto = components['schemas']['WorkspaceConfigDto'];
8395
+ export type DeliveryRoleConfigDto = components['schemas']['DeliveryRoleConfigDto'];
8396
+ export type RepoDeliveryOverrideDto = components['schemas']['RepoDeliveryOverrideDto'];
8397
+ export type DeliveryTopologyDto = components['schemas']['DeliveryTopologyDto'];
8294
8398
  export type TestConnectionResponseDto = components['schemas']['TestConnectionResponseDto'];
8295
8399
  export type CursorKeyUsageDto = components['schemas']['CursorKeyUsageDto'];
8296
8400
  export type AiToolSeatDto = components['schemas']['AiToolSeatDto'];
@@ -8464,6 +8568,8 @@ export type ReadinessScoreHistoryPointDto = components['schemas']['ReadinessScor
8464
8568
  export type ReadinessRepoScoreHistoryDto = components['schemas']['ReadinessRepoScoreHistoryDto'];
8465
8569
  export type WorkspaceReadinessScoreHistoryDto = components['schemas']['WorkspaceReadinessScoreHistoryDto'];
8466
8570
  export type RepoReadinessScoreDto = components['schemas']['RepoReadinessScoreDto'];
8571
+ export type LinkedRolePendingDto = components['schemas']['LinkedRolePendingDto'];
8572
+ export type LinkedRoleAssessmentDto = components['schemas']['LinkedRoleAssessmentDto'];
8467
8573
  export type RepoReadinessScoreDetailDto = components['schemas']['RepoReadinessScoreDetailDto'];
8468
8574
  export type AgenticFoundationDashboardSummaryDto = components['schemas']['AgenticFoundationDashboardSummaryDto'];
8469
8575
  export type PageMetaDto = components['schemas']['PageMetaDto'];
@@ -10242,6 +10348,50 @@ export interface operations {
10242
10348
  };
10243
10349
  };
10244
10350
  };
10351
+ putWorkspaceDeliveryTopology: {
10352
+ parameters: {
10353
+ query?: never;
10354
+ header?: never;
10355
+ path: {
10356
+ workspaceId: components["parameters"]["WorkspaceId"];
10357
+ };
10358
+ cookie?: never;
10359
+ };
10360
+ requestBody: {
10361
+ content: {
10362
+ "application/json": components["schemas"]["DeliveryTopologyDto"] | null;
10363
+ };
10364
+ };
10365
+ responses: {
10366
+ /** @description Topology persisted (or cleared). */
10367
+ 204: {
10368
+ headers: {
10369
+ [name: string]: unknown;
10370
+ };
10371
+ content?: never;
10372
+ };
10373
+ /** @description Invalid topology payload or unconnected repo referenced. */
10374
+ 400: {
10375
+ headers: {
10376
+ [name: string]: unknown;
10377
+ };
10378
+ content: {
10379
+ "application/json": components["schemas"]["ErrorMessageDto"];
10380
+ };
10381
+ };
10382
+ 401: components["responses"]["Unauthorized"];
10383
+ 403: components["responses"]["Forbidden"];
10384
+ /** @description Workspace does not exist or malformed workspaceId */
10385
+ 404: {
10386
+ headers: {
10387
+ [name: string]: unknown;
10388
+ };
10389
+ content: {
10390
+ "application/json": components["schemas"]["ErrorMessageDto"];
10391
+ };
10392
+ };
10393
+ };
10394
+ };
10245
10395
  putTenantSources: {
10246
10396
  parameters: {
10247
10397
  query?: never;