@thinkai/tai-api-contract 2.84.0 → 2.89.0-pr.986.c95d8ece

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.84.0
4
+ version: 2.89.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}/...`.
@@ -5484,10 +5484,11 @@ paths:
5484
5484
  (issues plus optional remediation from `criteriaDetails`).
5485
5485
 
5486
5486
  The Markdown is grouped **by readiness dimension** (catalog order). Each dimension section
5487
- lists matching issues sorted by severity. Default filter is outstanding issues
5488
- (`open` + `pr-pending`). Optional query params narrow the set. When `includeCriteria` is
5489
- true (default), each issue includes a Remediation section from the matching criterion when
5490
- available.
5487
+ lists matching issues sorted by severity. Issue sections include severity in the heading
5488
+ and do not emit per-issue `Fix status` / `Fix tier` lines. Default filter is outstanding
5489
+ issues (`open` + `pr-pending`). Optional query params narrow the set. When `includeCriteria`
5490
+ is true (default), each issue includes a Remediation section from the matching criterion when
5491
+ available. Timestamps use the optional `timeZone` query (IANA; default `UTC`).
5491
5492
 
5492
5493
  The response sets `Content-Disposition: attachment` with filename
5493
5494
  `readiness-issues-{providerSlug}-{date}.md`.
@@ -5522,6 +5523,16 @@ paths:
5522
5523
  schema:
5523
5524
  type: boolean
5524
5525
  default: true
5526
+ - name: timeZone
5527
+ in: query
5528
+ required: false
5529
+ description: >
5530
+ IANA time zone for human-readable `Last analyzed` / `Exported` timestamps and the
5531
+ calendar date in the attachment filename (e.g. `Europe/Berlin`). Defaults to `UTC`.
5532
+ schema:
5533
+ type: string
5534
+ maxLength: 64
5535
+ example: Europe/Berlin
5525
5536
  responses:
5526
5537
  "200":
5527
5538
  description: Markdown file of readiness issues
@@ -7297,6 +7308,43 @@ paths:
7297
7308
  "404":
7298
7309
  description: Not found
7299
7310
 
7311
+ /workspaces/{workspaceId}/code-chat/indexes/{indexId}/wiki/export:
7312
+ get:
7313
+ tags: [CodeChat]
7314
+ summary: Export the wiki as an Open Knowledge Format (OKF) v0.2 bundle
7315
+ description: >-
7316
+ Adapter over the stored wiki for OKF-aware platforms and agents. Does not
7317
+ change the live pages. Rewrites `wiki:` links to relative concept paths,
7318
+ adds YAML front matter plus reserved `index.md` / `log.md`, and validates
7319
+ Mermaid (invalid diagrams are demoted to a text fence inside the export).
7320
+ operationId: exportCodeChatWikiOkf
7321
+ x-test-coverage-skip: covered by code-context okf-export unit tests
7322
+ parameters:
7323
+ - $ref: "#/components/parameters/WorkspaceId"
7324
+ - name: indexId
7325
+ in: path
7326
+ required: true
7327
+ schema: { type: string, format: uuid }
7328
+ - name: format
7329
+ in: query
7330
+ required: false
7331
+ schema: { type: string, enum: [okf], default: okf }
7332
+ responses:
7333
+ "200":
7334
+ description: OKF bundle (JSON with a files array of path/content pairs)
7335
+ content:
7336
+ application/json:
7337
+ schema:
7338
+ $ref: "#/components/schemas/CodeChatWikiOkfExportDto"
7339
+ "400":
7340
+ description: Unsupported format
7341
+ "401":
7342
+ $ref: "#/components/responses/Unauthorized"
7343
+ "404":
7344
+ description: Index not found
7345
+ "409":
7346
+ description: Wiki has no pages yet
7347
+
7300
7348
  /workspaces/{workspaceId}/code-chat/indexes/{indexId}/wiki/{slug}:
7301
7349
  get:
7302
7350
  tags: [CodeChat]
@@ -16938,6 +16986,12 @@ components:
16938
16986
  edgeCount: { type: integer }
16939
16987
  commitSha: { type: string, nullable: true }
16940
16988
  errorMessage: { type: string, nullable: true }
16989
+ progressMessage:
16990
+ type: string
16991
+ nullable: true
16992
+ description: >
16993
+ Human-readable indexing stage while a job is running (queued, clone, graph,
16994
+ save, wiki). Cleared when the index is ready or failed.
16941
16995
  indexedAt: { type: string, format: date-time, nullable: true }
16942
16996
  createdAt: { type: string, format: date-time }
16943
16997
  updatedAt: { type: string, format: date-time }
@@ -16966,6 +17020,12 @@ components:
16966
17020
  type: array
16967
17021
  items: { type: string, format: uuid }
16968
17022
  description: Optional subset; omit or empty to enqueue all readiness GitHub repos.
17023
+ force:
17024
+ type: boolean
17025
+ default: false
17026
+ description: >
17027
+ When true, re-enqueue even if the repository is already indexing or was
17028
+ indexed within the last 10 minutes.
16969
17029
 
16970
17030
  CodeChatSyncIndexesResultDto:
16971
17031
  type: object
@@ -16988,7 +17048,7 @@ components:
16988
17048
  repoName: { type: string }
16989
17049
  code:
16990
17050
  type: string
16991
- enum: [repo_ineligible]
17051
+ enum: [repo_ineligible, indexed_recently, index_in_progress]
16992
17052
  description: Stable machine-readable skip reason
16993
17053
 
16994
17054
  CodeChatThreadDto:
@@ -17164,6 +17224,32 @@ components:
17164
17224
  type: array
17165
17225
  items: { $ref: "#/components/schemas/CodeChatWikiPageDto" }
17166
17226
 
17227
+ CodeChatWikiOkfExportDto:
17228
+ type: object
17229
+ description: >-
17230
+ Portable OKF v0.2 knowledge bundle. Unpack `files` into a directory tree
17231
+ for OKF-aware tools; the in-app wiki is unchanged.
17232
+ required: [kind, okfVersion, generatedAt, repoName, files, demotedDiagrams]
17233
+ properties:
17234
+ kind: { type: string, enum: [okf-bundle] }
17235
+ okfVersion: { type: string, enum: ["0.2"] }
17236
+ generatedAt: { type: string, format: date-time }
17237
+ repoName: { type: string }
17238
+ files:
17239
+ type: array
17240
+ items:
17241
+ type: object
17242
+ required: [path, content]
17243
+ properties:
17244
+ path:
17245
+ type: string
17246
+ description: Path inside the bundle (e.g. concepts/overview.md)
17247
+ content: { type: string }
17248
+ demotedDiagrams:
17249
+ type: array
17250
+ description: Concept paths whose Mermaid failed validation and was exported as a text fence
17251
+ items: { type: string }
17252
+
17167
17253
  CodeChatSymbolQueryBodyDto:
17168
17254
  type: object
17169
17255
  required: [query]
@@ -17327,8 +17413,21 @@ components:
17327
17413
  CodeChatVisualizeBodyDto:
17328
17414
  type: object
17329
17415
  properties:
17330
- kind: { type: string, enum: [dependency, blast, atlas] }
17331
- symbol: { type: string }
17416
+ kind:
17417
+ type: string
17418
+ enum: [auto, dependency, module, focus, impact, blast, atlas]
17419
+ description: >-
17420
+ Omit or send `auto` to let the server pick the most informative view for the
17421
+ repository. `blast` traces `query` as a symbol and falls back to a focused
17422
+ subgraph, or to impact hotspots when `query` is empty.
17423
+ query:
17424
+ type: string
17425
+ description: >-
17426
+ Symbol, path, or plain-language request ("how does billing reach the ledger").
17427
+ Free text is resolved against the graph to seed a focused view.
17428
+ symbol:
17429
+ type: string
17430
+ description: Deprecated alias for `query`.
17332
17431
  repoIds:
17333
17432
  type: array
17334
17433
  items: { type: string, format: uuid }
@@ -17347,6 +17446,34 @@ components:
17347
17446
  note:
17348
17447
  type: string
17349
17448
  description: Set when dependency edges could not be resolved and a fallback view is shown.
17449
+ architectureBrief:
17450
+ type: string
17451
+ description: >-
17452
+ Short plain-prose narrative for the Engineering Context Graph panel.
17453
+ LLM-written when the workspace has an agent execution key, otherwise a
17454
+ deterministic reading of hubs and areas from the graph.
17455
+ kind:
17456
+ type: string
17457
+ enum: [dependency, module, focus, impact, blast]
17458
+ description: >-
17459
+ Which reading of the repository this diagram is. `module` rolls files up
17460
+ into source groups when too few file dependencies resolved for a file map,
17461
+ `focus` answers a plain-language request, `impact` shows the most
17462
+ depended-on files, and `blast` traces one symbol.
17463
+ insights:
17464
+ type: array
17465
+ description: Measured facts about the graph — hubs, dependency coverage, test share, route count.
17466
+ items: { type: string }
17467
+ focus:
17468
+ type: object
17469
+ description: Present when free text drove the view.
17470
+ required: [query, paths]
17471
+ properties:
17472
+ query: { type: string }
17473
+ paths:
17474
+ type: array
17475
+ description: Files that matched the request and seeded the graph.
17476
+ items: { type: string }
17350
17477
  nodes:
17351
17478
  type: array
17352
17479
  items:
@@ -17356,6 +17483,17 @@ components:
17356
17483
  id: { type: string }
17357
17484
  label: { type: string }
17358
17485
  kind: { type: string }
17486
+ path: { type: string }
17487
+ summary: { type: string }
17488
+ group: { type: string }
17489
+ inDegree: { type: integer }
17490
+ outDegree: { type: integer }
17491
+ isFocus:
17492
+ type: boolean
17493
+ description: File matched the request; highlight it as the answer.
17494
+ weight:
17495
+ type: integer
17496
+ description: Files behind a module box.
17359
17497
  edges:
17360
17498
  type: array
17361
17499
  items:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.84.0",
3
+ "version": "2.89.0-pr.986.c95d8ece",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -2133,7 +2133,7 @@ export interface paths {
2133
2133
  /**
2134
2134
  * Export repository readiness issues as Markdown
2135
2135
  * @description Download outstanding readiness issues for one repository as a Markdown (`.md`) attachment for local IDE workflows. Reuses the same scorecard as `GET .../readiness/repos/{repoId}` (issues plus optional remediation from `criteriaDetails`).
2136
- * The Markdown is grouped **by readiness dimension** (catalog order). Each dimension section lists matching issues sorted by severity. Default filter is outstanding issues (`open` + `pr-pending`). Optional query params narrow the set. When `includeCriteria` is true (default), each issue includes a Remediation section from the matching criterion when available.
2136
+ * The Markdown is grouped **by readiness dimension** (catalog order). Each dimension section lists matching issues sorted by severity. Issue sections include severity in the heading and do not emit per-issue `Fix status` / `Fix tier` lines. Default filter is outstanding issues (`open` + `pr-pending`). Optional query params narrow the set. When `includeCriteria` is true (default), each issue includes a Remediation section from the matching criterion when available. Timestamps use the optional `timeZone` query (IANA; default `UTC`).
2137
2137
  * The response sets `Content-Disposition: attachment` with filename `readiness-issues-{providerSlug}-{date}.md`.
2138
2138
  */
2139
2139
  get: operations["exportReadinessRepoIssuesMarkdown"];
@@ -2848,6 +2848,26 @@ export interface paths {
2848
2848
  patch?: never;
2849
2849
  trace?: never;
2850
2850
  };
2851
+ "/workspaces/{workspaceId}/code-chat/indexes/{indexId}/wiki/export": {
2852
+ parameters: {
2853
+ query?: never;
2854
+ header?: never;
2855
+ path?: never;
2856
+ cookie?: never;
2857
+ };
2858
+ /**
2859
+ * Export the wiki as an Open Knowledge Format (OKF) v0.2 bundle
2860
+ * @description Adapter over the stored wiki for OKF-aware platforms and agents. Does not change the live pages. Rewrites `wiki:` links to relative concept paths, adds YAML front matter plus reserved `index.md` / `log.md`, and validates Mermaid (invalid diagrams are demoted to a text fence inside the export).
2861
+ */
2862
+ get: operations["exportCodeChatWikiOkf"];
2863
+ put?: never;
2864
+ post?: never;
2865
+ delete?: never;
2866
+ options?: never;
2867
+ head?: never;
2868
+ patch?: never;
2869
+ trace?: never;
2870
+ };
2851
2871
  "/workspaces/{workspaceId}/code-chat/indexes/{indexId}/wiki/{slug}": {
2852
2872
  parameters: {
2853
2873
  query?: never;
@@ -7334,6 +7354,8 @@ export interface components {
7334
7354
  edgeCount: number;
7335
7355
  commitSha?: string | null;
7336
7356
  errorMessage?: string | null;
7357
+ /** @description Human-readable indexing stage while a job is running (queued, clone, graph, save, wiki). Cleared when the index is ready or failed. */
7358
+ progressMessage?: string | null;
7337
7359
  /** Format: date-time */
7338
7360
  indexedAt?: string | null;
7339
7361
  /** Format: date-time */
@@ -7353,6 +7375,11 @@ export interface components {
7353
7375
  CodeChatSyncIndexesBodyDto: {
7354
7376
  /** @description Optional subset; omit or empty to enqueue all readiness GitHub repos. */
7355
7377
  repoIds?: string[];
7378
+ /**
7379
+ * @description When true, re-enqueue even if the repository is already indexing or was indexed within the last 10 minutes.
7380
+ * @default false
7381
+ */
7382
+ force: boolean;
7356
7383
  };
7357
7384
  CodeChatSyncIndexesResultDto: {
7358
7385
  enqueued: number;
@@ -7368,7 +7395,7 @@ export interface components {
7368
7395
  * @description Stable machine-readable skip reason
7369
7396
  * @enum {string}
7370
7397
  */
7371
- code: "repo_ineligible";
7398
+ code: "repo_ineligible" | "indexed_recently" | "index_in_progress";
7372
7399
  };
7373
7400
  CodeChatThreadDto: {
7374
7401
  /** Format: uuid */
@@ -7495,6 +7522,23 @@ export interface components {
7495
7522
  CodeChatWikiPageListDto: {
7496
7523
  items: components["schemas"]["CodeChatWikiPageDto"][];
7497
7524
  };
7525
+ /** @description Portable OKF v0.2 knowledge bundle. Unpack `files` into a directory tree for OKF-aware tools; the in-app wiki is unchanged. */
7526
+ CodeChatWikiOkfExportDto: {
7527
+ /** @enum {string} */
7528
+ kind: "okf-bundle";
7529
+ /** @enum {string} */
7530
+ okfVersion: "0.2";
7531
+ /** Format: date-time */
7532
+ generatedAt: string;
7533
+ repoName: string;
7534
+ files: {
7535
+ /** @description Path inside the bundle (e.g. concepts/overview.md) */
7536
+ path: string;
7537
+ content: string;
7538
+ }[];
7539
+ /** @description Concept paths whose Mermaid failed validation and was exported as a text fence */
7540
+ demotedDiagrams: string[];
7541
+ };
7498
7542
  CodeChatSymbolQueryBodyDto: {
7499
7543
  query: string;
7500
7544
  repoIds?: string[];
@@ -7595,8 +7639,14 @@ export interface components {
7595
7639
  }[];
7596
7640
  };
7597
7641
  CodeChatVisualizeBodyDto: {
7598
- /** @enum {string} */
7599
- kind?: "dependency" | "blast" | "atlas";
7642
+ /**
7643
+ * @description Omit or send `auto` to let the server pick the most informative view for the repository. `blast` traces `query` as a symbol and falls back to a focused subgraph, or to impact hotspots when `query` is empty.
7644
+ * @enum {string}
7645
+ */
7646
+ kind?: "auto" | "dependency" | "module" | "focus" | "impact" | "blast" | "atlas";
7647
+ /** @description Symbol, path, or plain-language request ("how does billing reach the ledger"). Free text is resolved against the graph to seed a focused view. */
7648
+ query?: string;
7649
+ /** @description Deprecated alias for `query`. */
7600
7650
  symbol?: string;
7601
7651
  repoIds?: string[];
7602
7652
  };
@@ -7611,10 +7661,34 @@ export interface components {
7611
7661
  source: string;
7612
7662
  /** @description Set when dependency edges could not be resolved and a fallback view is shown. */
7613
7663
  note?: string;
7664
+ /** @description Short plain-prose narrative for the Engineering Context Graph panel. LLM-written when the workspace has an agent execution key, otherwise a deterministic reading of hubs and areas from the graph. */
7665
+ architectureBrief?: string;
7666
+ /**
7667
+ * @description Which reading of the repository this diagram is. `module` rolls files up into source groups when too few file dependencies resolved for a file map, `focus` answers a plain-language request, `impact` shows the most depended-on files, and `blast` traces one symbol.
7668
+ * @enum {string}
7669
+ */
7670
+ kind?: "dependency" | "module" | "focus" | "impact" | "blast";
7671
+ /** @description Measured facts about the graph — hubs, dependency coverage, test share, route count. */
7672
+ insights?: string[];
7673
+ /** @description Present when free text drove the view. */
7674
+ focus?: {
7675
+ query: string;
7676
+ /** @description Files that matched the request and seeded the graph. */
7677
+ paths: string[];
7678
+ };
7614
7679
  nodes: {
7615
7680
  id: string;
7616
7681
  label: string;
7617
7682
  kind?: string;
7683
+ path?: string;
7684
+ summary?: string;
7685
+ group?: string;
7686
+ inDegree?: number;
7687
+ outDegree?: number;
7688
+ /** @description File matched the request; highlight it as the answer. */
7689
+ isFocus?: boolean;
7690
+ /** @description Files behind a module box. */
7691
+ weight?: number;
7618
7692
  }[];
7619
7693
  edges: {
7620
7694
  from: string;
@@ -8314,6 +8388,7 @@ export type CodeChatModuleInventoryRowDto = components['schemas']['CodeChatModul
8314
8388
  export type CodeChatStructuredBlockDto = components['schemas']['CodeChatStructuredBlockDto'];
8315
8389
  export type CodeChatWikiPageDto = components['schemas']['CodeChatWikiPageDto'];
8316
8390
  export type CodeChatWikiPageListDto = components['schemas']['CodeChatWikiPageListDto'];
8391
+ export type CodeChatWikiOkfExportDto = components['schemas']['CodeChatWikiOkfExportDto'];
8317
8392
  export type CodeChatSymbolQueryBodyDto = components['schemas']['CodeChatSymbolQueryBodyDto'];
8318
8393
  export type CodeChatSymbolHitDto = components['schemas']['CodeChatSymbolHitDto'];
8319
8394
  export type CodeChatSymbolHitListDto = components['schemas']['CodeChatSymbolHitListDto'];
@@ -13925,6 +14000,8 @@ export interface operations {
13925
14000
  severity?: "critical" | "high" | "medium" | "low";
13926
14001
  /** @description Include remediation from criteriaDetails (default true). */
13927
14002
  includeCriteria?: boolean;
14003
+ /** @description IANA time zone for human-readable `Last analyzed` / `Exported` timestamps and the calendar date in the attachment filename (e.g. `Europe/Berlin`). Defaults to `UTC`. */
14004
+ timeZone?: string;
13928
14005
  };
13929
14006
  header?: never;
13930
14007
  path: {
@@ -15836,6 +15913,53 @@ export interface operations {
15836
15913
  };
15837
15914
  };
15838
15915
  };
15916
+ exportCodeChatWikiOkf: {
15917
+ parameters: {
15918
+ query?: {
15919
+ format?: "okf";
15920
+ };
15921
+ header?: never;
15922
+ path: {
15923
+ workspaceId: components["parameters"]["WorkspaceId"];
15924
+ indexId: string;
15925
+ };
15926
+ cookie?: never;
15927
+ };
15928
+ requestBody?: never;
15929
+ responses: {
15930
+ /** @description OKF bundle (JSON with a files array of path/content pairs) */
15931
+ 200: {
15932
+ headers: {
15933
+ [name: string]: unknown;
15934
+ };
15935
+ content: {
15936
+ "application/json": components["schemas"]["CodeChatWikiOkfExportDto"];
15937
+ };
15938
+ };
15939
+ /** @description Unsupported format */
15940
+ 400: {
15941
+ headers: {
15942
+ [name: string]: unknown;
15943
+ };
15944
+ content?: never;
15945
+ };
15946
+ 401: components["responses"]["Unauthorized"];
15947
+ /** @description Index not found */
15948
+ 404: {
15949
+ headers: {
15950
+ [name: string]: unknown;
15951
+ };
15952
+ content?: never;
15953
+ };
15954
+ /** @description Wiki has no pages yet */
15955
+ 409: {
15956
+ headers: {
15957
+ [name: string]: unknown;
15958
+ };
15959
+ content?: never;
15960
+ };
15961
+ };
15962
+ };
15839
15963
  getCodeChatWikiPage: {
15840
15964
  parameters: {
15841
15965
  query?: never;