@thinkai/tai-api-contract 2.211.0 → 2.211.1

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.211.0
4
+ version: 2.211.1
5
5
  description: >
6
6
  Contract surface for the AI Driven SDLC backend used by ThinkAI.
7
7
  Workspace-scoped routes use `/workspaces/{workspaceId}/...`.
@@ -10771,6 +10771,58 @@ paths:
10771
10771
  schema:
10772
10772
  $ref: "#/components/schemas/ErrorMessageDto"
10773
10773
 
10774
+ /workspaces/{workspaceId}/code-chat/knowledge-jobs/{jobId}/cancel:
10775
+ post:
10776
+ tags: [CodeChat]
10777
+ summary: Cancel a queued or running knowledge job
10778
+ description: >
10779
+ Any workspace member when Engineering Context Graph is on. Clears the worker lease so
10780
+ in-flight work stops at the next ownership check. Restores the index to ready when a
10781
+ usable graph already exists (`graph_json` and `node_count > 0`); otherwise marks the
10782
+ index failed with "Cancelled by user". Authz matches other CodeChat member routes
10783
+ (Code Intelligence enabled); unlike continue, no execution key is required.
10784
+ operationId: cancelCodeChatKnowledgeJob
10785
+ x-test-coverage-skip: thin HTTP over cancelKnowledgeJob store update; covered by stuck-recovery unit tests
10786
+ parameters:
10787
+ - $ref: "#/components/parameters/WorkspaceId"
10788
+ - name: jobId
10789
+ in: path
10790
+ required: true
10791
+ schema:
10792
+ type: string
10793
+ format: uuid
10794
+ description: Active knowledge job id (`tai_workspace_code_knowledge_jobs.id`).
10795
+ responses:
10796
+ "200":
10797
+ description: Job cancelled
10798
+ content:
10799
+ application/json:
10800
+ schema:
10801
+ type: object
10802
+ required: [job]
10803
+ properties:
10804
+ job:
10805
+ $ref: "#/components/schemas/CodeKnowledgeJobDto"
10806
+ "401":
10807
+ $ref: "#/components/responses/Unauthorized"
10808
+ "403":
10809
+ description: Engineering Context Graph is off
10810
+ content:
10811
+ application/json:
10812
+ schema:
10813
+ $ref: "#/components/schemas/ErrorMessageDto"
10814
+ example:
10815
+ error: Code Intelligence is disabled for this workspace
10816
+ code: code_intelligence_disabled
10817
+ "404":
10818
+ description: No active knowledge job to cancel
10819
+ content:
10820
+ application/json:
10821
+ schema:
10822
+ $ref: "#/components/schemas/ErrorMessageDto"
10823
+ example:
10824
+ error: No active knowledge job to cancel
10825
+
10774
10826
  /workspaces/{workspaceId}/code-chat/readiness:
10775
10827
  get:
10776
10828
  tags: [CodeChat]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.211.0",
3
+ "version": "2.211.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -3906,6 +3906,26 @@ export interface paths {
3906
3906
  patch?: never;
3907
3907
  trace?: never;
3908
3908
  };
3909
+ "/workspaces/{workspaceId}/code-chat/knowledge-jobs/{jobId}/cancel": {
3910
+ parameters: {
3911
+ query?: never;
3912
+ header?: never;
3913
+ path?: never;
3914
+ cookie?: never;
3915
+ };
3916
+ get?: never;
3917
+ put?: never;
3918
+ /**
3919
+ * Cancel a queued or running knowledge job
3920
+ * @description Any workspace member when Engineering Context Graph is on. Clears the worker lease so in-flight work stops at the next ownership check. Restores the index to ready when a usable graph already exists (`graph_json` and `node_count > 0`); otherwise marks the index failed with "Cancelled by user". Authz matches other CodeChat member routes (Code Intelligence enabled); unlike continue, no execution key is required.
3921
+ */
3922
+ post: operations["cancelCodeChatKnowledgeJob"];
3923
+ delete?: never;
3924
+ options?: never;
3925
+ head?: never;
3926
+ patch?: never;
3927
+ trace?: never;
3928
+ };
3909
3929
  "/workspaces/{workspaceId}/code-chat/readiness": {
3910
3930
  parameters: {
3911
3931
  query?: never;
@@ -25149,6 +25169,62 @@ export interface operations {
25149
25169
  };
25150
25170
  };
25151
25171
  };
25172
+ cancelCodeChatKnowledgeJob: {
25173
+ parameters: {
25174
+ query?: never;
25175
+ header?: never;
25176
+ path: {
25177
+ workspaceId: components["parameters"]["WorkspaceId"];
25178
+ /** @description Active knowledge job id (`tai_workspace_code_knowledge_jobs.id`). */
25179
+ jobId: string;
25180
+ };
25181
+ cookie?: never;
25182
+ };
25183
+ requestBody?: never;
25184
+ responses: {
25185
+ /** @description Job cancelled */
25186
+ 200: {
25187
+ headers: {
25188
+ [name: string]: unknown;
25189
+ };
25190
+ content: {
25191
+ "application/json": {
25192
+ job: components["schemas"]["CodeKnowledgeJobDto"];
25193
+ };
25194
+ };
25195
+ };
25196
+ 401: components["responses"]["Unauthorized"];
25197
+ /** @description Engineering Context Graph is off */
25198
+ 403: {
25199
+ headers: {
25200
+ [name: string]: unknown;
25201
+ };
25202
+ content: {
25203
+ /**
25204
+ * @example {
25205
+ * "error": "Code Intelligence is disabled for this workspace",
25206
+ * "code": "code_intelligence_disabled"
25207
+ * }
25208
+ */
25209
+ "application/json": components["schemas"]["ErrorMessageDto"];
25210
+ };
25211
+ };
25212
+ /** @description No active knowledge job to cancel */
25213
+ 404: {
25214
+ headers: {
25215
+ [name: string]: unknown;
25216
+ };
25217
+ content: {
25218
+ /**
25219
+ * @example {
25220
+ * "error": "No active knowledge job to cancel"
25221
+ * }
25222
+ */
25223
+ "application/json": components["schemas"]["ErrorMessageDto"];
25224
+ };
25225
+ };
25226
+ };
25227
+ };
25152
25228
  getCodeChatReadiness: {
25153
25229
  parameters: {
25154
25230
  query?: never;