@thinkai/tai-api-contract 2.252.0 → 2.254.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.252.0
4
+ version: 2.254.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}/...`.
@@ -13339,6 +13339,13 @@ paths:
13339
13339
  `read_wiki_contents` (one repository, pass `repoId`), and `read_workspace_wiki_structure`
13340
13340
  and `read_workspace_wiki_contents` (the workspace wiki, pass `slug`; stale pages are
13341
13341
  marked). Code Intelligence must be on for the workspace. Rate limited per client IP.
13342
+
13343
+ Progress (opt-in): an `ask` can run for minutes, longer than some clients wait. A
13344
+ `tools/call` for `ask` that sends `params._meta.progressToken` and an `Accept` header
13345
+ that lists `text/event-stream` is answered as an event stream: `notifications/progress`
13346
+ events (`params.progressToken`, a rising `params.progress`, a short `params.message`)
13347
+ while it works, then one JSON-RPC response event with the same body as the JSON reply.
13348
+ Any other request, and any other tool, gets the `application/json` reply.
13342
13349
  operationId: callWorkspaceMcp
13343
13350
  security:
13344
13351
  - mcpBearerAuth: []
@@ -13356,11 +13363,25 @@ paths:
13356
13363
  method: tools/list
13357
13364
  responses:
13358
13365
  "200":
13359
- description: JSON-RPC response (result or error)
13366
+ description: >-
13367
+ JSON-RPC response (result or error). `text/event-stream` only for an `ask` that
13368
+ asked for progress; see the operation description.
13360
13369
  content:
13361
13370
  application/json:
13362
13371
  schema:
13363
13372
  $ref: "#/components/schemas/McpJsonRpcResponseDto"
13373
+ text/event-stream:
13374
+ schema:
13375
+ type: string
13376
+ description: >-
13377
+ Server-sent events. Each `data:` line is JSON: a `notifications/progress`
13378
+ notification, and last the JSON-RPC response (`McpJsonRpcResponseDto`).
13379
+ example: |
13380
+ event: message
13381
+ data: {"jsonrpc":"2.0","method":"notifications/progress","params":{"progressToken":"p1","progress":1,"message":"Choosing repositories"}}
13382
+
13383
+ event: message
13384
+ data: {"jsonrpc":"2.0","id":1,"result":{"content":[{"type":"text","text":"{}"}],"isError":false}}
13364
13385
  "202":
13365
13386
  description: Notification accepted (no `id`); no body
13366
13387
  "401":
@@ -14998,12 +15019,13 @@ paths:
14998
15019
  tags: [YourAiJourney]
14999
15020
  summary: Secondary dashboard panels bootstrap payload
15000
15021
  description: >
15001
- Returns readiness aggregate, merged PR trends (8-week default window), aggregated teams
15002
- (8-week default window), and agentic foundation dashboard in one response. Nested payloads
15003
- reuse the same builders and caches as their dedicated routes.
15022
+ Returns readiness aggregate, merged PR trends, aggregated teams, and agentic foundation
15023
+ dashboard in one response. Productivity nested payloads use the same builders and caches
15024
+ as their dedicated routes. Default productivity window is `30d` when `rangeId` is omitted.
15004
15025
  operationId: getYourAiJourneyDashboardSecondary
15005
15026
  parameters:
15006
15027
  - $ref: "#/components/parameters/WorkspaceId"
15028
+ - $ref: "#/components/parameters/InsightsProductivityRangeId"
15007
15029
  responses:
15008
15030
  "200":
15009
15031
  description: Secondary dashboard bootstrap payload
@@ -34807,7 +34829,9 @@ components:
34807
34829
  params:
34808
34830
  type: object
34809
34831
  additionalProperties: true
34810
- description: For `tools/call`, `{ name, arguments }`.
34832
+ description: >-
34833
+ For `tools/call`, `{ name, arguments }`, and optionally `_meta.progressToken`
34834
+ (a string or number) to ask for progress events on a slow `ask`.
34811
34835
 
34812
34836
  McpJsonRpcResponseDto:
34813
34837
  type: object
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.252.0",
3
+ "version": "2.254.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -4962,6 +4962,7 @@ export interface paths {
4962
4962
  * Workspace MCP endpoint (Streamable HTTP, JSON-RPC)
4963
4963
  * @description Hosted, read-only MCP server for one workspace. Authenticate with an MCP bearer token (an OAuth access token or a personal token), not a Supabase JWT. Each call carries one JSON-RPC 2.0 message and gets one JSON response. A message without `id` (a notification) gets `202` with no body. Supported methods: `initialize`, `tools/list`, `tools/call`; any other method returns JSON-RPC error `-32601`. A tool failure returns `200` with `result.isError: true`.
4964
4964
  * Tools: the Code Chat tools (including `ask`), `read_wiki_structure` and `read_wiki_contents` (one repository, pass `repoId`), and `read_workspace_wiki_structure` and `read_workspace_wiki_contents` (the workspace wiki, pass `slug`; stale pages are marked). Code Intelligence must be on for the workspace. Rate limited per client IP.
4965
+ * Progress (opt-in): an `ask` can run for minutes, longer than some clients wait. A `tools/call` for `ask` that sends `params._meta.progressToken` and an `Accept` header that lists `text/event-stream` is answered as an event stream: `notifications/progress` events (`params.progressToken`, a rising `params.progress`, a short `params.message`) while it works, then one JSON-RPC response event with the same body as the JSON reply. Any other request, and any other tool, gets the `application/json` reply.
4965
4966
  */
4966
4967
  post: operations["callWorkspaceMcp"];
4967
4968
  delete?: never;
@@ -5804,7 +5805,7 @@ export interface paths {
5804
5805
  };
5805
5806
  /**
5806
5807
  * Secondary dashboard panels bootstrap payload
5807
- * @description Returns readiness aggregate, merged PR trends (8-week default window), aggregated teams (8-week default window), and agentic foundation dashboard in one response. Nested payloads reuse the same builders and caches as their dedicated routes.
5808
+ * @description Returns readiness aggregate, merged PR trends, aggregated teams, and agentic foundation dashboard in one response. Productivity nested payloads use the same builders and caches as their dedicated routes. Default productivity window is `30d` when `rangeId` is omitted.
5808
5809
  */
5809
5810
  get: operations["getYourAiJourneyDashboardSecondary"];
5810
5811
  put?: never;
@@ -14558,7 +14559,7 @@ export interface components {
14558
14559
  id?: string | number;
14559
14560
  /** @description `initialize`, `tools/list`, or `tools/call` */
14560
14561
  method: string;
14561
- /** @description For `tools/call`, `{ name, arguments }`. */
14562
+ /** @description For `tools/call`, `{ name, arguments }`, and optionally `_meta.progressToken` (a string or number) to ask for progress events on a slow `ask`. */
14562
14563
  params?: {
14563
14564
  [key: string]: unknown;
14564
14565
  };
@@ -30392,13 +30393,21 @@ export interface operations {
30392
30393
  };
30393
30394
  };
30394
30395
  responses: {
30395
- /** @description JSON-RPC response (result or error) */
30396
+ /** @description JSON-RPC response (result or error). `text/event-stream` only for an `ask` that asked for progress; see the operation description. */
30396
30397
  200: {
30397
30398
  headers: {
30398
30399
  [name: string]: unknown;
30399
30400
  };
30400
30401
  content: {
30401
30402
  "application/json": components["schemas"]["McpJsonRpcResponseDto"];
30403
+ /**
30404
+ * @example event: message
30405
+ * data: {"jsonrpc":"2.0","method":"notifications/progress","params":{"progressToken":"p1","progress":1,"message":"Choosing repositories"}}
30406
+ *
30407
+ * event: message
30408
+ * data: {"jsonrpc":"2.0","id":1,"result":{"content":[{"type":"text","text":"{}"}],"isError":false}}
30409
+ */
30410
+ "text/event-stream": string;
30402
30411
  };
30403
30412
  };
30404
30413
  /** @description Notification accepted (no `id`); no body */
@@ -32336,7 +32345,10 @@ export interface operations {
32336
32345
  };
32337
32346
  getYourAiJourneyDashboardSecondary: {
32338
32347
  parameters: {
32339
- query?: never;
32348
+ query?: {
32349
+ /** @description Productivity insights time range. Daily windows: `7d`, `30d`, `90d`, `180d`, or custom `cr:YYYY-MM-DD:YYYY-MM-DD`. Weekly legacy: `4w`, `8w`, `q` (12 weeks), `12w`, `16w`. Omit when using explicit `from`/`to` day bounds. */
32350
+ rangeId?: components["parameters"]["InsightsProductivityRangeId"];
32351
+ };
32340
32352
  header?: never;
32341
32353
  path: {
32342
32354
  workspaceId: components["parameters"]["WorkspaceId"];