@thinkai/tai-api-contract 2.173.0 → 2.175.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.173.0
4
+ version: 2.175.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}/...`.
@@ -96,7 +96,8 @@ tags:
96
96
  description: >
97
97
  Workspace prompt/model eval suites (`/evals/*`) — authored golden cases with
98
98
  deterministic expected-signal scoring, async runs (never scored on the request
99
- path), and an Insights surface for regressions and token efficiency. Distinct
99
+ path), an Insights surface for regressions and token efficiency, and platform
100
+ starter packs (`/evals/packs`) that install as editable suites. Distinct
100
101
  from AI Usage & Spend ingest and Agentic Foundation Token Efficiency (rubric I).
101
102
 
102
103
  paths:
@@ -11998,6 +11999,95 @@ paths:
11998
11999
  "403":
11999
12000
  $ref: "#/components/responses/Forbidden"
12000
12001
 
12002
+ /workspaces/{workspaceId}/evals/packs:
12003
+ get:
12004
+ tags: [Evals]
12005
+ summary: List platform eval starter packs
12006
+ description: >
12007
+ Returns the platform starter-pack catalog for Prompt & model evals.
12008
+ Packs are ThinkAI-authored templates (not workspace-owned and not a
12009
+ public marketplace). Requires workspace membership. Empty catalog is
12010
+ not expected in production builds; clients should still handle
12011
+ `{ "packs": [] }`.
12012
+ operationId: listEvalPacks
12013
+ parameters:
12014
+ - $ref: "#/components/parameters/WorkspaceId"
12015
+ responses:
12016
+ "200":
12017
+ description: Starter pack catalog
12018
+ content:
12019
+ application/json:
12020
+ schema:
12021
+ $ref: "#/components/schemas/EvalPackListDto"
12022
+ example:
12023
+ packs:
12024
+ - id: pr-review
12025
+ name: PR review comments
12026
+ description: Check review tone and clear blocking feedback
12027
+ workflow: pr-review
12028
+ caseCount: 3
12029
+ "401":
12030
+ $ref: "#/components/responses/Unauthorized"
12031
+ "403":
12032
+ $ref: "#/components/responses/Forbidden"
12033
+ "404":
12034
+ description: Workspace not found
12035
+ content:
12036
+ application/json:
12037
+ schema:
12038
+ $ref: "#/components/schemas/ErrorMessageDto"
12039
+
12040
+ /workspaces/{workspaceId}/evals/packs/{packId}/install:
12041
+ post:
12042
+ tags: [Evals]
12043
+ summary: Install an eval starter pack as a suite
12044
+ description: >
12045
+ Creates a new editable eval suite from a platform starter pack
12046
+ (`version: 1`). Sets `target.promptKey` to `pack:<packId>` for
12047
+ traceability. Requires workspace editor or admin. Pack cases include
12048
+ fixture completions so the first run can succeed without AI connectors.
12049
+ Does not score on the request path.
12050
+ operationId: installEvalPack
12051
+ parameters:
12052
+ - $ref: "#/components/parameters/WorkspaceId"
12053
+ - $ref: "#/components/parameters/EvalPackId"
12054
+ responses:
12055
+ "201":
12056
+ description: Suite created from pack
12057
+ content:
12058
+ application/json:
12059
+ schema:
12060
+ $ref: "#/components/schemas/EvalSuiteDto"
12061
+ "401":
12062
+ $ref: "#/components/responses/Unauthorized"
12063
+ "403":
12064
+ description: Viewer cannot install packs
12065
+ content:
12066
+ application/json:
12067
+ schema:
12068
+ $ref: "#/components/schemas/ErrorMessageDto"
12069
+ example:
12070
+ error: Workspace editor role required
12071
+ code: workspace_editor_required
12072
+ "404":
12073
+ description: Unknown pack id or workspace not found
12074
+ content:
12075
+ application/json:
12076
+ schema:
12077
+ $ref: "#/components/schemas/ErrorMessageDto"
12078
+ example:
12079
+ error: Eval starter pack not found
12080
+ code: eval_pack_not_found
12081
+ "409":
12082
+ description: Workspace already has the maximum number of suites (50)
12083
+ content:
12084
+ application/json:
12085
+ schema:
12086
+ $ref: "#/components/schemas/ErrorMessageDto"
12087
+ example:
12088
+ error: Maximum of 50 eval suites per workspace
12089
+ code: eval_suite_limit_reached
12090
+
12001
12091
  /workspaces/{workspaceId}/evals/suites:
12002
12092
  get:
12003
12093
  tags: [Evals]
@@ -12365,6 +12455,17 @@ components:
12365
12455
  type: string
12366
12456
  format: uuid
12367
12457
  description: Eval suite id (`tai_workspace_eval_suites.id`).
12458
+ EvalPackId:
12459
+ name: packId
12460
+ in: path
12461
+ required: true
12462
+ schema:
12463
+ type: string
12464
+ minLength: 1
12465
+ maxLength: 64
12466
+ pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
12467
+ description: >
12468
+ Platform starter pack id (kebab-case), e.g. `pr-review`. Not a UUID.
12368
12469
  EvalRunId:
12369
12470
  name: runId
12370
12471
  in: path
@@ -26510,3 +26611,45 @@ components:
26510
26611
  type: array
26511
26612
  items:
26512
26613
  $ref: "#/components/schemas/EvalModelComparisonDto"
26614
+
26615
+ EvalPackSummaryDto:
26616
+ type: object
26617
+ additionalProperties: false
26618
+ required: [id, name, description, workflow, caseCount]
26619
+ description: >
26620
+ Platform starter pack summary for the hub catalog. Install materializes a
26621
+ full `EvalSuiteDto`; pack payloads are not returned on list.
26622
+ properties:
26623
+ id:
26624
+ type: string
26625
+ minLength: 1
26626
+ maxLength: 64
26627
+ pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
26628
+ description: Stable pack id (kebab-case).
26629
+ name:
26630
+ type: string
26631
+ minLength: 1
26632
+ maxLength: 120
26633
+ description:
26634
+ type: string
26635
+ maxLength: 2000
26636
+ workflow:
26637
+ type: string
26638
+ minLength: 1
26639
+ maxLength: 64
26640
+ description: Workflow bucket for UI grouping (e.g. `pr-review`).
26641
+ caseCount:
26642
+ type: integer
26643
+ minimum: 1
26644
+ maximum: 20
26645
+ description: Number of golden cases that will be created on install.
26646
+
26647
+ EvalPackListDto:
26648
+ type: object
26649
+ additionalProperties: false
26650
+ required: [packs]
26651
+ properties:
26652
+ packs:
26653
+ type: array
26654
+ items:
26655
+ $ref: "#/components/schemas/EvalPackSummaryDto"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.173.0",
3
+ "version": "2.175.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -4806,6 +4806,46 @@ export interface paths {
4806
4806
  patch?: never;
4807
4807
  trace?: never;
4808
4808
  };
4809
+ "/workspaces/{workspaceId}/evals/packs": {
4810
+ parameters: {
4811
+ query?: never;
4812
+ header?: never;
4813
+ path?: never;
4814
+ cookie?: never;
4815
+ };
4816
+ /**
4817
+ * List platform eval starter packs
4818
+ * @description Returns the platform starter-pack catalog for Prompt & model evals. Packs are ThinkAI-authored templates (not workspace-owned and not a public marketplace). Requires workspace membership. Empty catalog is not expected in production builds; clients should still handle `{ "packs": [] }`.
4819
+ */
4820
+ get: operations["listEvalPacks"];
4821
+ put?: never;
4822
+ post?: never;
4823
+ delete?: never;
4824
+ options?: never;
4825
+ head?: never;
4826
+ patch?: never;
4827
+ trace?: never;
4828
+ };
4829
+ "/workspaces/{workspaceId}/evals/packs/{packId}/install": {
4830
+ parameters: {
4831
+ query?: never;
4832
+ header?: never;
4833
+ path?: never;
4834
+ cookie?: never;
4835
+ };
4836
+ get?: never;
4837
+ put?: never;
4838
+ /**
4839
+ * Install an eval starter pack as a suite
4840
+ * @description Creates a new editable eval suite from a platform starter pack (`version: 1`). Sets `target.promptKey` to `pack:<packId>` for traceability. Requires workspace editor or admin. Pack cases include fixture completions so the first run can succeed without AI connectors. Does not score on the request path.
4841
+ */
4842
+ post: operations["installEvalPack"];
4843
+ delete?: never;
4844
+ options?: never;
4845
+ head?: never;
4846
+ patch?: never;
4847
+ trace?: never;
4848
+ };
4809
4849
  "/workspaces/{workspaceId}/evals/suites": {
4810
4850
  parameters: {
4811
4851
  query?: never;
@@ -11388,6 +11428,20 @@ export interface components {
11388
11428
  tokenEfficiency: components["schemas"]["EvalTokenEfficiencyDto"] | null;
11389
11429
  modelComparison: components["schemas"]["EvalModelComparisonDto"][];
11390
11430
  };
11431
+ /** @description Platform starter pack summary for the hub catalog. Install materializes a full `EvalSuiteDto`; pack payloads are not returned on list. */
11432
+ EvalPackSummaryDto: {
11433
+ /** @description Stable pack id (kebab-case). */
11434
+ id: string;
11435
+ name: string;
11436
+ description: string;
11437
+ /** @description Workflow bucket for UI grouping (e.g. `pr-review`). */
11438
+ workflow: string;
11439
+ /** @description Number of golden cases that will be created on install. */
11440
+ caseCount: number;
11441
+ };
11442
+ EvalPackListDto: {
11443
+ packs: components["schemas"]["EvalPackSummaryDto"][];
11444
+ };
11391
11445
  };
11392
11446
  responses: {
11393
11447
  /** @description Missing or invalid bearer token */
@@ -11427,6 +11481,8 @@ export interface components {
11427
11481
  WorkspaceId: string;
11428
11482
  /** @description Eval suite id (`tai_workspace_eval_suites.id`). */
11429
11483
  EvalSuiteId: string;
11484
+ /** @description Platform starter pack id (kebab-case), e.g. `pr-review`. Not a UUID. */
11485
+ EvalPackId: string;
11430
11486
  /** @description Eval run id (`tai_workspace_eval_runs.id`). */
11431
11487
  EvalRunId: string;
11432
11488
  RepoId: string;
@@ -12102,11 +12158,14 @@ export type EvalPromptTipDto = components['schemas']['EvalPromptTipDto'];
12102
12158
  export type EvalTokenEfficiencyDto = components['schemas']['EvalTokenEfficiencyDto'];
12103
12159
  export type EvalModelComparisonDto = components['schemas']['EvalModelComparisonDto'];
12104
12160
  export type EvalInsightsDto = components['schemas']['EvalInsightsDto'];
12161
+ export type EvalPackSummaryDto = components['schemas']['EvalPackSummaryDto'];
12162
+ export type EvalPackListDto = components['schemas']['EvalPackListDto'];
12105
12163
  export type ResponseUnauthorized = components['responses']['Unauthorized'];
12106
12164
  export type ResponseForbidden = components['responses']['Forbidden'];
12107
12165
  export type ResponseZenHrSyncInProgress = components['responses']['ZenHrSyncInProgress'];
12108
12166
  export type ParameterWorkspaceId = components['parameters']['WorkspaceId'];
12109
12167
  export type ParameterEvalSuiteId = components['parameters']['EvalSuiteId'];
12168
+ export type ParameterEvalPackId = components['parameters']['EvalPackId'];
12110
12169
  export type ParameterEvalRunId = components['parameters']['EvalRunId'];
12111
12170
  export type ParameterRepoId = components['parameters']['RepoId'];
12112
12171
  export type ParameterProviderSlug = components['parameters']['ProviderSlug'];
@@ -24678,6 +24737,122 @@ export interface operations {
24678
24737
  };
24679
24738
  };
24680
24739
  };
24740
+ listEvalPacks: {
24741
+ parameters: {
24742
+ query?: never;
24743
+ header?: never;
24744
+ path: {
24745
+ workspaceId: components["parameters"]["WorkspaceId"];
24746
+ };
24747
+ cookie?: never;
24748
+ };
24749
+ requestBody?: never;
24750
+ responses: {
24751
+ /** @description Starter pack catalog */
24752
+ 200: {
24753
+ headers: {
24754
+ [name: string]: unknown;
24755
+ };
24756
+ content: {
24757
+ /**
24758
+ * @example {
24759
+ * "packs": [
24760
+ * {
24761
+ * "id": "pr-review",
24762
+ * "name": "PR review comments",
24763
+ * "description": "Check review tone and clear blocking feedback",
24764
+ * "workflow": "pr-review",
24765
+ * "caseCount": 3
24766
+ * }
24767
+ * ]
24768
+ * }
24769
+ */
24770
+ "application/json": components["schemas"]["EvalPackListDto"];
24771
+ };
24772
+ };
24773
+ 401: components["responses"]["Unauthorized"];
24774
+ 403: components["responses"]["Forbidden"];
24775
+ /** @description Workspace not found */
24776
+ 404: {
24777
+ headers: {
24778
+ [name: string]: unknown;
24779
+ };
24780
+ content: {
24781
+ "application/json": components["schemas"]["ErrorMessageDto"];
24782
+ };
24783
+ };
24784
+ };
24785
+ };
24786
+ installEvalPack: {
24787
+ parameters: {
24788
+ query?: never;
24789
+ header?: never;
24790
+ path: {
24791
+ workspaceId: components["parameters"]["WorkspaceId"];
24792
+ /** @description Platform starter pack id (kebab-case), e.g. `pr-review`. Not a UUID. */
24793
+ packId: components["parameters"]["EvalPackId"];
24794
+ };
24795
+ cookie?: never;
24796
+ };
24797
+ requestBody?: never;
24798
+ responses: {
24799
+ /** @description Suite created from pack */
24800
+ 201: {
24801
+ headers: {
24802
+ [name: string]: unknown;
24803
+ };
24804
+ content: {
24805
+ "application/json": components["schemas"]["EvalSuiteDto"];
24806
+ };
24807
+ };
24808
+ 401: components["responses"]["Unauthorized"];
24809
+ /** @description Viewer cannot install packs */
24810
+ 403: {
24811
+ headers: {
24812
+ [name: string]: unknown;
24813
+ };
24814
+ content: {
24815
+ /**
24816
+ * @example {
24817
+ * "error": "Workspace editor role required",
24818
+ * "code": "workspace_editor_required"
24819
+ * }
24820
+ */
24821
+ "application/json": components["schemas"]["ErrorMessageDto"];
24822
+ };
24823
+ };
24824
+ /** @description Unknown pack id or workspace not found */
24825
+ 404: {
24826
+ headers: {
24827
+ [name: string]: unknown;
24828
+ };
24829
+ content: {
24830
+ /**
24831
+ * @example {
24832
+ * "error": "Eval starter pack not found",
24833
+ * "code": "eval_pack_not_found"
24834
+ * }
24835
+ */
24836
+ "application/json": components["schemas"]["ErrorMessageDto"];
24837
+ };
24838
+ };
24839
+ /** @description Workspace already has the maximum number of suites (50) */
24840
+ 409: {
24841
+ headers: {
24842
+ [name: string]: unknown;
24843
+ };
24844
+ content: {
24845
+ /**
24846
+ * @example {
24847
+ * "error": "Maximum of 50 eval suites per workspace",
24848
+ * "code": "eval_suite_limit_reached"
24849
+ * }
24850
+ */
24851
+ "application/json": components["schemas"]["ErrorMessageDto"];
24852
+ };
24853
+ };
24854
+ };
24855
+ };
24681
24856
  listEvalSuites: {
24682
24857
  parameters: {
24683
24858
  query?: never;