@thinkai/tai-api-contract 2.176.0 → 2.180.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.176.0
4
+ version: 2.180.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}/...`.
@@ -481,18 +481,75 @@ paths:
481
481
  enum: ["NOT VALIDATED", "SAMPLE · SYNTHETIC DATA"]
482
482
  scope:
483
483
  type: object
484
+ required: [repositories, excluded]
485
+ properties:
486
+ repositories:
487
+ type: array
488
+ items:
489
+ type: object
490
+ required: [id, name]
491
+ properties:
492
+ id: { type: string }
493
+ name: { type: string }
494
+ excluded:
495
+ type: array
496
+ items:
497
+ type: object
498
+ required: [id, name, reason]
499
+ properties:
500
+ id: { type: string }
501
+ name: { type: string }
502
+ reason: { type: string }
484
503
  windows:
485
504
  type: object
505
+ required: [pre, post, transitionDays]
506
+ properties:
507
+ pre:
508
+ type: object
509
+ nullable: true
510
+ required: [start, end]
511
+ properties:
512
+ start: { type: string }
513
+ end: { type: string }
514
+ post:
515
+ type: object
516
+ nullable: true
517
+ required: [start, end]
518
+ properties:
519
+ start: { type: string }
520
+ end: { type: string }
521
+ transitionDays:
522
+ type: integer
486
523
  sources:
487
524
  type: array
488
525
  items:
489
526
  type: object
527
+ required: [provider, status, freshAt]
528
+ properties:
529
+ provider: { type: string }
530
+ status: { type: string }
531
+ freshAt: { type: string, nullable: true }
490
532
  consent:
491
533
  type: object
534
+ required: [aggregateUse, recordedAt]
535
+ properties:
536
+ aggregateUse:
537
+ type: string
538
+ enum: [opt_in, opt_out, unset]
539
+ recordedAt:
540
+ type: string
541
+ nullable: true
492
542
  sections:
493
543
  type: array
494
544
  items:
495
545
  type: object
546
+ required: [id, status]
547
+ properties:
548
+ id: { type: string }
549
+ status:
550
+ type: string
551
+ enum: [ok, failed, omitted]
552
+ reason: { type: string }
496
553
  workspaceId:
497
554
  type: string
498
555
  expectedWorkspaceId:
@@ -9211,6 +9268,32 @@ paths:
9211
9268
  "401":
9212
9269
  $ref: "#/components/responses/Unauthorized"
9213
9270
 
9271
+ /workspaces/{workspaceId}/knowledge-pages/{slug}:
9272
+ delete:
9273
+ tags: [CodeChat]
9274
+ summary: Delete a workspace knowledge page by slug
9275
+ description: >-
9276
+ Removes one page (typically a `prd-*` / `rfc-*` / `adr-*` draft). Does not
9277
+ regenerate the rest of the knowledge base.
9278
+ operationId: deleteWorkspaceKnowledgePage
9279
+ parameters:
9280
+ - $ref: "#/components/parameters/WorkspaceId"
9281
+ - name: slug
9282
+ in: path
9283
+ required: true
9284
+ schema: { type: string, minLength: 1, maxLength: 200 }
9285
+ responses:
9286
+ "204":
9287
+ description: Page deleted
9288
+ "401":
9289
+ $ref: "#/components/responses/Unauthorized"
9290
+ "404":
9291
+ description: Page not found (`knowledge_page_not_found`)
9292
+ content:
9293
+ application/json:
9294
+ schema:
9295
+ $ref: "#/components/schemas/ErrorMessageDto"
9296
+
9214
9297
  /workspaces/{workspaceId}/knowledge-pages/generate:
9215
9298
  post:
9216
9299
  tags: [CodeChat]
@@ -22054,6 +22137,7 @@ components:
22054
22137
  - repairDays
22055
22138
  - secureLinkDays
22056
22139
  - accessDaysAfterDelivery
22140
+ - deliveryBusinessDays
22057
22141
  - maxRepositories
22058
22142
  - maxActiveEngineers
22059
22143
  - dataCoverageRefreshCapDays
@@ -22066,11 +22150,12 @@ components:
22066
22150
  - aiProviders
22067
22151
  - optionalProviders
22068
22152
  - selfManagedGit
22153
+ - rules
22069
22154
  - unresolved
22070
22155
  properties:
22071
22156
  version:
22072
22157
  type: string
22073
- enum: ["2026-10-18.1"]
22158
+ enum: ["2026-10-20.1"]
22074
22159
  periodDays:
22075
22160
  type: integer
22076
22161
  enum: [90]
@@ -22086,6 +22171,9 @@ components:
22086
22171
  accessDaysAfterDelivery:
22087
22172
  type: integer
22088
22173
  enum: [30]
22174
+ deliveryBusinessDays:
22175
+ type: integer
22176
+ enum: [5]
22089
22177
  maxRepositories:
22090
22178
  type: integer
22091
22179
  enum: [50]
@@ -22175,6 +22263,55 @@ components:
22175
22263
  items:
22176
22264
  type: string
22177
22265
  enum: [gitlab_self_managed, bitbucket_data_center]
22266
+ rules:
22267
+ type: object
22268
+ additionalProperties: false
22269
+ required:
22270
+ - windowCoverageRatio
22271
+ - repositoryMergedPullRequestsInBothWindows
22272
+ - freshness
22273
+ - tolerances
22274
+ - outputUnit
22275
+ - rolloutTimezone
22276
+ - rolloutBoundary
22277
+ - costAssessableCurrency
22278
+ properties:
22279
+ windowCoverageRatio:
22280
+ type: number
22281
+ enum: [1]
22282
+ repositoryMergedPullRequestsInBothWindows:
22283
+ type: integer
22284
+ enum: [1]
22285
+ freshness:
22286
+ type: object
22287
+ additionalProperties: false
22288
+ required: [gitHours, jiraHours, incidentHours, aiUsageDays, readinessScanDays]
22289
+ properties:
22290
+ gitHours: { type: integer, enum: [24] }
22291
+ jiraHours: { type: integer, enum: [24] }
22292
+ incidentHours: { type: integer, enum: [24] }
22293
+ aiUsageDays: { type: integer, enum: [7] }
22294
+ readinessScanDays: { type: integer, enum: [30] }
22295
+ tolerances:
22296
+ type: object
22297
+ additionalProperties: false
22298
+ required: [moneyUsd, ratioPercentagePoints, durationSeconds]
22299
+ properties:
22300
+ moneyUsd: { type: number, enum: [0.01] }
22301
+ ratioPercentagePoints: { type: number, enum: [0.01] }
22302
+ durationSeconds: { type: integer, enum: [1] }
22303
+ outputUnit:
22304
+ type: string
22305
+ enum: [normalized_ship_weight]
22306
+ rolloutTimezone:
22307
+ type: string
22308
+ enum: [America/New_York]
22309
+ rolloutBoundary:
22310
+ type: string
22311
+ enum: [midnight]
22312
+ costAssessableCurrency:
22313
+ type: string
22314
+ enum: [USD]
22178
22315
  unresolved:
22179
22316
  type: object
22180
22317
  additionalProperties: false
@@ -22194,17 +22331,66 @@ components:
22194
22331
  premiumPrice:
22195
22332
  $ref: "#/components/schemas/UnsetAssessmentDecisionDto"
22196
22333
  currency:
22197
- $ref: "#/components/schemas/UnsetAssessmentDecisionDto"
22334
+ type: object
22335
+ additionalProperties: false
22336
+ required: [status, code]
22337
+ properties:
22338
+ status: { type: string, enum: [set] }
22339
+ code: { type: string, enum: [USD] }
22198
22340
  creditWindowDays:
22199
- $ref: "#/components/schemas/UnsetAssessmentDecisionDto"
22341
+ type: object
22342
+ additionalProperties: false
22343
+ required: [status, days, eligibleSubscription]
22344
+ properties:
22345
+ status: { type: string, enum: [set] }
22346
+ days: { type: integer, enum: [90] }
22347
+ eligibleSubscription: { type: string, enum: [annual] }
22200
22348
  jiraLinkageMinimum:
22201
- $ref: "#/components/schemas/UnsetAssessmentDecisionDto"
22349
+ type: object
22350
+ additionalProperties: false
22351
+ required: [status, ratio]
22352
+ properties:
22353
+ status: { type: string, enum: [set] }
22354
+ ratio: { type: number, enum: [0.8] }
22202
22355
  confounderRules:
22203
- $ref: "#/components/schemas/UnsetAssessmentDecisionDto"
22356
+ type: object
22357
+ additionalProperties: false
22358
+ required: [status, headcountChangeRatio, repositoryScopeChangeRatio, namedEvents]
22359
+ properties:
22360
+ status: { type: string, enum: [set] }
22361
+ headcountChangeRatio: { type: number, enum: [0.1] }
22362
+ repositoryScopeChangeRatio: { type: number, enum: [0.1] }
22363
+ namedEvents:
22364
+ type: array
22365
+ items:
22366
+ type: string
22367
+ enum: [major_release, migration, acquisition, policy_change]
22204
22368
  activeEngineerRule:
22205
- $ref: "#/components/schemas/UnsetAssessmentDecisionDto"
22369
+ type: object
22370
+ additionalProperties: false
22371
+ required: [status, activity, window, exclude]
22372
+ properties:
22373
+ status: { type: string, enum: [set] }
22374
+ activity: { type: string, enum: [authored_commit_or_merged_pr] }
22375
+ window: { type: string, enum: [measured_period] }
22376
+ exclude:
22377
+ type: array
22378
+ items:
22379
+ type: string
22380
+ enum: [bot, service_account, unmapped, read_only]
22206
22381
  workingDayCalendar:
22207
- $ref: "#/components/schemas/UnsetAssessmentDecisionDto"
22382
+ type: object
22383
+ additionalProperties: false
22384
+ required: [status, timezone, weekdays, holidays]
22385
+ properties:
22386
+ status: { type: string, enum: [set] }
22387
+ timezone: { type: string, enum: [America/New_York] }
22388
+ weekdays:
22389
+ type: array
22390
+ items:
22391
+ type: string
22392
+ enum: [monday, tuesday, wednesday, thursday, friday]
22393
+ holidays: { type: string, enum: [none] }
22208
22394
  countryAllowList:
22209
22395
  $ref: "#/components/schemas/UnsetAssessmentDecisionDto"
22210
22396
 
@@ -24303,6 +24489,7 @@ components:
24303
24489
  - explain
24304
24490
  - platform_ops
24305
24491
  - feature_impact
24492
+ - pr_review
24306
24493
  - prd_request
24307
24494
  description: Classified Ask intent for the turn
24308
24495
  skillId:
@@ -24315,8 +24502,30 @@ components:
24315
24502
  - chat-cicd
24316
24503
  - chat-stack
24317
24504
  - chat-platform
24505
+ - chat-workspace
24506
+ - chat-product
24507
+ - chat-pr-review
24318
24508
  - chat-wiki
24319
24509
  description: Conversation skill pack that grounded the LLM answer (Wave 10)
24510
+ userMessage:
24511
+ type: string
24512
+ description: >
24513
+ Short customer-safe summary when mode is failed. Shown in the reply body;
24514
+ raw provider detail is only in providerFailures / debug marker.
24515
+ providerFailures:
24516
+ type: array
24517
+ description: >
24518
+ Structured provider failures for Conversations ⓘ hover (primary first).
24519
+ Also embedded in content as `<!-- code-intel-debug:{...} -->` for reload.
24520
+ items:
24521
+ type: object
24522
+ required: [provider, sanitized, raw]
24523
+ properties:
24524
+ provider:
24525
+ type: string
24526
+ enum: [anthropic_messages, cursor_agent]
24527
+ sanitized: { type: string }
24528
+ raw: { type: string }
24320
24529
  usage:
24321
24530
  $ref: "#/components/schemas/CodeIntelligenceUsageDto"
24322
24531
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.176.0",
3
+ "version": "2.180.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -3432,6 +3432,26 @@ export interface paths {
3432
3432
  patch?: never;
3433
3433
  trace?: never;
3434
3434
  };
3435
+ "/workspaces/{workspaceId}/knowledge-pages/{slug}": {
3436
+ parameters: {
3437
+ query?: never;
3438
+ header?: never;
3439
+ path?: never;
3440
+ cookie?: never;
3441
+ };
3442
+ get?: never;
3443
+ put?: never;
3444
+ post?: never;
3445
+ /**
3446
+ * Delete a workspace knowledge page by slug
3447
+ * @description Removes one page (typically a `prd-*` / `rfc-*` / `adr-*` draft). Does not regenerate the rest of the knowledge base.
3448
+ */
3449
+ delete: operations["deleteWorkspaceKnowledgePage"];
3450
+ options?: never;
3451
+ head?: never;
3452
+ patch?: never;
3453
+ trace?: never;
3454
+ };
3435
3455
  "/workspaces/{workspaceId}/knowledge-pages/generate": {
3436
3456
  parameters: {
3437
3457
  query?: never;
@@ -9145,7 +9165,7 @@ export interface components {
9145
9165
  };
9146
9166
  AssessmentDictionaryDto: {
9147
9167
  /** @enum {string} */
9148
- version: "2026-10-18.1";
9168
+ version: "2026-10-20.1";
9149
9169
  /** @enum {integer} */
9150
9170
  periodDays: 90;
9151
9171
  /** @enum {integer} */
@@ -9157,6 +9177,8 @@ export interface components {
9157
9177
  /** @enum {integer} */
9158
9178
  accessDaysAfterDelivery: 30;
9159
9179
  /** @enum {integer} */
9180
+ deliveryBusinessDays: 5;
9181
+ /** @enum {integer} */
9160
9182
  maxRepositories: 50;
9161
9183
  /** @enum {integer} */
9162
9184
  maxActiveEngineers: 500;
@@ -9186,15 +9208,90 @@ export interface components {
9186
9208
  status: "supported";
9187
9209
  providers: ("gitlab_self_managed" | "bitbucket_data_center")[];
9188
9210
  };
9211
+ rules: {
9212
+ /** @enum {number} */
9213
+ windowCoverageRatio: 1;
9214
+ /** @enum {integer} */
9215
+ repositoryMergedPullRequestsInBothWindows: 1;
9216
+ freshness: {
9217
+ /** @enum {integer} */
9218
+ gitHours: 24;
9219
+ /** @enum {integer} */
9220
+ jiraHours: 24;
9221
+ /** @enum {integer} */
9222
+ incidentHours: 24;
9223
+ /** @enum {integer} */
9224
+ aiUsageDays: 7;
9225
+ /** @enum {integer} */
9226
+ readinessScanDays: 30;
9227
+ };
9228
+ tolerances: {
9229
+ /** @enum {number} */
9230
+ moneyUsd: 0.01;
9231
+ /** @enum {number} */
9232
+ ratioPercentagePoints: 0.01;
9233
+ /** @enum {integer} */
9234
+ durationSeconds: 1;
9235
+ };
9236
+ /** @enum {string} */
9237
+ outputUnit: "normalized_ship_weight";
9238
+ /** @enum {string} */
9239
+ rolloutTimezone: "America/New_York";
9240
+ /** @enum {string} */
9241
+ rolloutBoundary: "midnight";
9242
+ /** @enum {string} */
9243
+ costAssessableCurrency: "USD";
9244
+ };
9189
9245
  unresolved: {
9190
9246
  baselinePrice: components["schemas"]["UnsetAssessmentDecisionDto"];
9191
9247
  premiumPrice: components["schemas"]["UnsetAssessmentDecisionDto"];
9192
- currency: components["schemas"]["UnsetAssessmentDecisionDto"];
9193
- creditWindowDays: components["schemas"]["UnsetAssessmentDecisionDto"];
9194
- jiraLinkageMinimum: components["schemas"]["UnsetAssessmentDecisionDto"];
9195
- confounderRules: components["schemas"]["UnsetAssessmentDecisionDto"];
9196
- activeEngineerRule: components["schemas"]["UnsetAssessmentDecisionDto"];
9197
- workingDayCalendar: components["schemas"]["UnsetAssessmentDecisionDto"];
9248
+ currency: {
9249
+ /** @enum {string} */
9250
+ status: "set";
9251
+ /** @enum {string} */
9252
+ code: "USD";
9253
+ };
9254
+ creditWindowDays: {
9255
+ /** @enum {string} */
9256
+ status: "set";
9257
+ /** @enum {integer} */
9258
+ days: 90;
9259
+ /** @enum {string} */
9260
+ eligibleSubscription: "annual";
9261
+ };
9262
+ jiraLinkageMinimum: {
9263
+ /** @enum {string} */
9264
+ status: "set";
9265
+ /** @enum {number} */
9266
+ ratio: 0.8;
9267
+ };
9268
+ confounderRules: {
9269
+ /** @enum {string} */
9270
+ status: "set";
9271
+ /** @enum {number} */
9272
+ headcountChangeRatio: 0.1;
9273
+ /** @enum {number} */
9274
+ repositoryScopeChangeRatio: 0.1;
9275
+ namedEvents: ("major_release" | "migration" | "acquisition" | "policy_change")[];
9276
+ };
9277
+ activeEngineerRule: {
9278
+ /** @enum {string} */
9279
+ status: "set";
9280
+ /** @enum {string} */
9281
+ activity: "authored_commit_or_merged_pr";
9282
+ /** @enum {string} */
9283
+ window: "measured_period";
9284
+ exclude: ("bot" | "service_account" | "unmapped" | "read_only")[];
9285
+ };
9286
+ workingDayCalendar: {
9287
+ /** @enum {string} */
9288
+ status: "set";
9289
+ /** @enum {string} */
9290
+ timezone: "America/New_York";
9291
+ weekdays: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday")[];
9292
+ /** @enum {string} */
9293
+ holidays: "none";
9294
+ };
9198
9295
  countryAllowList: components["schemas"]["UnsetAssessmentDecisionDto"];
9199
9296
  };
9200
9297
  };
@@ -10228,12 +10325,21 @@ export interface components {
10228
10325
  * @description Classified Ask intent for the turn
10229
10326
  * @enum {string}
10230
10327
  */
10231
- intent?: "inventory_apis" | "inventory_modules" | "explain" | "platform_ops" | "feature_impact" | "prd_request";
10328
+ intent?: "inventory_apis" | "inventory_modules" | "explain" | "platform_ops" | "feature_impact" | "pr_review" | "prd_request";
10232
10329
  /**
10233
10330
  * @description Conversation skill pack that grounded the LLM answer (Wave 10)
10234
10331
  * @enum {string}
10235
10332
  */
10236
- skillId?: "chat-api-detail" | "chat-architecture" | "chat-tests" | "chat-contracts" | "chat-cicd" | "chat-stack" | "chat-platform" | "chat-wiki";
10333
+ skillId?: "chat-api-detail" | "chat-architecture" | "chat-tests" | "chat-contracts" | "chat-cicd" | "chat-stack" | "chat-platform" | "chat-workspace" | "chat-product" | "chat-pr-review" | "chat-wiki";
10334
+ /** @description Short customer-safe summary when mode is failed. Shown in the reply body; raw provider detail is only in providerFailures / debug marker. */
10335
+ userMessage?: string;
10336
+ /** @description Structured provider failures for Conversations ⓘ hover (primary first). Also embedded in content as `<!-- code-intel-debug:{...} -->` for reload. */
10337
+ providerFailures?: {
10338
+ /** @enum {string} */
10339
+ provider: "anthropic_messages" | "cursor_agent";
10340
+ sanitized: string;
10341
+ raw: string;
10342
+ }[];
10237
10343
  usage?: components["schemas"]["CodeIntelligenceUsageDto"];
10238
10344
  };
10239
10345
  CodeChatApiRouteRowDto: {
@@ -12649,11 +12755,44 @@ export interface operations {
12649
12755
  shareMode: "internal" | "external";
12650
12756
  /** @enum {string|null} */
12651
12757
  watermark: "NOT VALIDATED" | "SAMPLE · SYNTHETIC DATA" | null;
12652
- scope: Record<string, never>;
12653
- windows: Record<string, never>;
12654
- sources: Record<string, never>[];
12655
- consent: Record<string, never>;
12656
- sections: Record<string, never>[];
12758
+ scope: {
12759
+ repositories: {
12760
+ id: string;
12761
+ name: string;
12762
+ }[];
12763
+ excluded: {
12764
+ id: string;
12765
+ name: string;
12766
+ reason: string;
12767
+ }[];
12768
+ };
12769
+ windows: {
12770
+ pre: {
12771
+ start: string;
12772
+ end: string;
12773
+ } | null;
12774
+ post: {
12775
+ start: string;
12776
+ end: string;
12777
+ } | null;
12778
+ transitionDays: number;
12779
+ };
12780
+ sources: {
12781
+ provider: string;
12782
+ status: string;
12783
+ freshAt: string | null;
12784
+ }[];
12785
+ consent: {
12786
+ /** @enum {string} */
12787
+ aggregateUse: "opt_in" | "opt_out" | "unset";
12788
+ recordedAt: string | null;
12789
+ };
12790
+ sections: {
12791
+ id: string;
12792
+ /** @enum {string} */
12793
+ status: "ok" | "failed" | "omitted";
12794
+ reason?: string;
12795
+ }[];
12657
12796
  };
12658
12797
  workspaceId: string;
12659
12798
  expectedWorkspaceId: string;
@@ -21638,6 +21777,37 @@ export interface operations {
21638
21777
  401: components["responses"]["Unauthorized"];
21639
21778
  };
21640
21779
  };
21780
+ deleteWorkspaceKnowledgePage: {
21781
+ parameters: {
21782
+ query?: never;
21783
+ header?: never;
21784
+ path: {
21785
+ workspaceId: components["parameters"]["WorkspaceId"];
21786
+ slug: string;
21787
+ };
21788
+ cookie?: never;
21789
+ };
21790
+ requestBody?: never;
21791
+ responses: {
21792
+ /** @description Page deleted */
21793
+ 204: {
21794
+ headers: {
21795
+ [name: string]: unknown;
21796
+ };
21797
+ content?: never;
21798
+ };
21799
+ 401: components["responses"]["Unauthorized"];
21800
+ /** @description Page not found (`knowledge_page_not_found`) */
21801
+ 404: {
21802
+ headers: {
21803
+ [name: string]: unknown;
21804
+ };
21805
+ content: {
21806
+ "application/json": components["schemas"]["ErrorMessageDto"];
21807
+ };
21808
+ };
21809
+ };
21810
+ };
21641
21811
  generateWorkspaceKnowledgePages: {
21642
21812
  parameters: {
21643
21813
  query?: never;