@thinkai/tai-api-contract 2.170.0 → 2.172.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.
@@ -66,6 +66,27 @@ export interface paths {
66
66
  patch?: never;
67
67
  trace?: never;
68
68
  };
69
+ "/admin/assessment-manifest-validation": {
70
+ parameters: {
71
+ query?: never;
72
+ header?: never;
73
+ path?: never;
74
+ cookie?: never;
75
+ };
76
+ get?: never;
77
+ put?: never;
78
+ /**
79
+ * Validate an assessment manifest before export
80
+ * @description Runs the fail-closed manifest check for one sold assessment. The server ignores `manifest.validation` and `manifest.watermark` from the client. `buyerDeliverable` is true only when the result is validated and `shareMode` is internal. An external share-safe result can be validated and is never the buyer file. Unset or exceeded tolerances fail. No numeric tolerance is assumed. GitLab and Bitbucket fixtures are not part of this operation.
81
+ * **Authorization:** Bearer JWT required. Caller email must appear in `PLATFORM_ADMIN_EMAILS`.
82
+ */
83
+ post: operations["runAssessmentManifestValidation"];
84
+ delete?: never;
85
+ options?: never;
86
+ head?: never;
87
+ patch?: never;
88
+ trace?: never;
89
+ };
69
90
  "/admin/readiness/token-usage": {
70
91
  parameters: {
71
92
  query?: never;
@@ -4764,6 +4785,118 @@ export interface paths {
4764
4785
  patch?: never;
4765
4786
  trace?: never;
4766
4787
  };
4788
+ "/workspaces/{workspaceId}/evals/suites": {
4789
+ parameters: {
4790
+ query?: never;
4791
+ header?: never;
4792
+ path?: never;
4793
+ cookie?: never;
4794
+ };
4795
+ /**
4796
+ * List eval suites for a workspace
4797
+ * @description Returns the latest version of each eval suite in the workspace (max 50 suites). Requires workspace membership (`requireWorkspaceMember`). Empty workspace → `{ "suites": [] }`.
4798
+ */
4799
+ get: operations["listEvalSuites"];
4800
+ put?: never;
4801
+ /**
4802
+ * Create an eval suite
4803
+ * @description Creates a suite at `version: 1`. Requires workspace editor or admin (`requireWorkspaceEditor`). Rejects when both `target.promptBody` is empty and model fields are missing; when `cases` is empty (`400` `eval_suite_cases_required`); or when the workspace already has 50 suites. Each case must include at least one expected signal.
4804
+ */
4805
+ post: operations["createEvalSuite"];
4806
+ delete?: never;
4807
+ options?: never;
4808
+ head?: never;
4809
+ patch?: never;
4810
+ trace?: never;
4811
+ };
4812
+ "/workspaces/{workspaceId}/evals/suites/{suiteId}": {
4813
+ parameters: {
4814
+ query?: never;
4815
+ header?: never;
4816
+ path?: never;
4817
+ cookie?: never;
4818
+ };
4819
+ /**
4820
+ * Get an eval suite (latest version)
4821
+ * @description Returns the latest version of the suite. Historical versions are retained for runs via `suiteVersion` + snapshot on each run; this endpoint does not expose prior versions. Requires workspace membership.
4822
+ */
4823
+ get: operations["getEvalSuite"];
4824
+ /**
4825
+ * Update an eval suite
4826
+ * @description Replaces mutable suite fields. Requires workspace editor or admin. Changing `target`, `cases`, or `promptBody` increments `version` by 1 and keeps prior versions immutable for historical runs. Cosmetic name/description-only updates do not bump `version`. Same validation rules as create (cases required, target required, bounds).
4827
+ */
4828
+ put: operations["updateEvalSuite"];
4829
+ post?: never;
4830
+ delete?: never;
4831
+ options?: never;
4832
+ head?: never;
4833
+ patch?: never;
4834
+ trace?: never;
4835
+ };
4836
+ "/workspaces/{workspaceId}/evals/suites/{suiteId}/runs": {
4837
+ parameters: {
4838
+ query?: never;
4839
+ header?: never;
4840
+ path?: never;
4841
+ cookie?: never;
4842
+ };
4843
+ /**
4844
+ * List recent eval runs for a suite
4845
+ * @description Returns the last 50 runs for the suite (newest first). Empty → `{ "runs": [] }`. Requires workspace membership. Does not trigger scoring.
4846
+ */
4847
+ get: operations["listEvalRuns"];
4848
+ put?: never;
4849
+ /**
4850
+ * Enqueue an eval suite run
4851
+ * @description Enqueues an async eval run. Returns `202` with `{ runId, status: "queued" }`. Never scores on the request path — a worker claims the run, uses `fixtureCompletion` when present (or live completion when provider credentials exist), applies deterministic expected-signal scoring, and persists results. Requires workspace editor or admin. At most one active (`queued`|`running`) run per suite; a second POST returns `409` `eval_run_in_progress`.
4852
+ */
4853
+ post: operations["enqueueEvalRun"];
4854
+ delete?: never;
4855
+ options?: never;
4856
+ head?: never;
4857
+ patch?: never;
4858
+ trace?: never;
4859
+ };
4860
+ "/workspaces/{workspaceId}/evals/suites/{suiteId}/runs/{runId}": {
4861
+ parameters: {
4862
+ query?: never;
4863
+ header?: never;
4864
+ path?: never;
4865
+ cookie?: never;
4866
+ };
4867
+ /**
4868
+ * Get an eval run with case results
4869
+ * @description Returns persisted run status and case results. While `queued` or `running`, `caseResults` may be empty and `score` null. Requires workspace membership. Does not trigger scoring.
4870
+ */
4871
+ get: operations["getEvalRun"];
4872
+ put?: never;
4873
+ post?: never;
4874
+ delete?: never;
4875
+ options?: never;
4876
+ head?: never;
4877
+ patch?: never;
4878
+ trace?: never;
4879
+ };
4880
+ "/workspaces/{workspaceId}/evals/insights": {
4881
+ parameters: {
4882
+ query?: never;
4883
+ header?: never;
4884
+ path?: never;
4885
+ cookie?: never;
4886
+ };
4887
+ /**
4888
+ * Eval insights (regressions, tips, efficiency, model comparison)
4889
+ * @description Workspace-level Insights for prompt/model evals. Computes regressions when prior score − current score ≥ 0.10 on the same suiteId+suiteVersion case set (or suite score drop ≥ 0.10); prompt tips from failed signal notes / case names; token efficiency averages over successful cases in the last succeeded run per suite; and model comparison rollups. No succeeded runs → empty arrays and null `tokenEfficiency`. Requires workspace membership. Distinct from `/insights-recommendations` and AI Usage & Spend.
4890
+ */
4891
+ get: operations["getEvalInsights"];
4892
+ put?: never;
4893
+ post?: never;
4894
+ delete?: never;
4895
+ options?: never;
4896
+ head?: never;
4897
+ patch?: never;
4898
+ trace?: never;
4899
+ };
4767
4900
  }
4768
4901
  export type webhooks = Record<string, never>;
4769
4902
  export interface components {
@@ -10998,6 +11131,203 @@ export interface components {
10998
11131
  limit: number;
10999
11132
  offset: number;
11000
11133
  };
11134
+ /**
11135
+ * @description Deterministic scorer kinds for golden-case expected signals. Case pass = all signals pass. No LLM-as-judge in v1.
11136
+ * @enum {string}
11137
+ */
11138
+ EvalExpectedSignalKindDto: "contains" | "not_contains" | "regex" | "json_path_equals";
11139
+ /**
11140
+ * @description Model provider vocabulary aligned with AI Usage `modelName` surfaces (`cursor` | `claude`).
11141
+ * @enum {string}
11142
+ */
11143
+ EvalAiProviderDto: "cursor" | "claude";
11144
+ /** @description One expected signal on a golden case. Use `value` for `contains` / `not_contains` (substring) and for `json_path_equals` (expected value as string). Use `pattern` for `regex`. Use `path` (JSONPath) for `json_path_equals`. */
11145
+ EvalExpectedSignalDto: {
11146
+ id: string;
11147
+ kind: components["schemas"]["EvalExpectedSignalKindDto"];
11148
+ /** @description Substring for `contains` / `not_contains`, or expected value for `json_path_equals`. */
11149
+ value?: string;
11150
+ /** @description Regular expression source for `regex`. */
11151
+ pattern?: string;
11152
+ /** @description JSONPath expression for `json_path_equals`. */
11153
+ path?: string;
11154
+ };
11155
+ /** @description One golden case in a suite. 1–20 cases per suite; each case requires ≥1 expected signal. When `fixtureCompletion` is set, the worker scores that text without calling a live model (CI/demo path). */
11156
+ EvalCaseDto: {
11157
+ id: string;
11158
+ name: string;
11159
+ /** @description Case input payload (opaque string; often JSON text). */
11160
+ input: string;
11161
+ /** @description Optional fixture completion. When present, the worker uses it instead of a live provider call. */
11162
+ fixtureCompletion?: string;
11163
+ expectedSignals: components["schemas"]["EvalExpectedSignalDto"][];
11164
+ };
11165
+ /** @description Suite target — at least one of prompt or model. Prompt path requires non-empty `promptBody` (text snapshot) and may include optional `promptKey` slug. Model path requires `provider` + `modelName` (vendor string, same vocabulary as AI Usage `modelName`). Create/update reject when both prompt body is empty and model fields are missing. No separate prompt-template registry in v1; versioning is the suite `version`. */
11166
+ EvalSuiteTargetDto: {
11167
+ /** @description Prompt text snapshot. Empty string allowed only when model fields are set. */
11168
+ promptBody?: string;
11169
+ /** @description Optional slug for the prompt (not a registry foreign key in v1). */
11170
+ promptKey?: string | null;
11171
+ /**
11172
+ * @description Model provider; null when suite is prompt-only.
11173
+ * @enum {string|null}
11174
+ */
11175
+ provider?: "cursor" | "claude" | null;
11176
+ /** @description Vendor model id string (aligned with AI Usage `modelName`). */
11177
+ modelName?: string | null;
11178
+ };
11179
+ /** @description Latest version of a workspace eval suite. Max 50 suites per workspace. Name 1–120 chars; description ≤ 2000; version starts at 1. */
11180
+ EvalSuiteDto: {
11181
+ /** Format: uuid */
11182
+ id: string;
11183
+ name: string;
11184
+ description: string;
11185
+ /** @description Monotonic suite version; bumps when target/cases/promptBody change. */
11186
+ version: number;
11187
+ /** Format: date-time */
11188
+ createdAt: string;
11189
+ /** Format: date-time */
11190
+ updatedAt: string;
11191
+ /** Format: uuid */
11192
+ createdByUserId: string;
11193
+ target: components["schemas"]["EvalSuiteTargetDto"];
11194
+ cases: components["schemas"]["EvalCaseDto"][];
11195
+ };
11196
+ EvalSuiteListDto: {
11197
+ suites: components["schemas"]["EvalSuiteDto"][];
11198
+ };
11199
+ CreateEvalSuiteBodyDto: {
11200
+ name: string;
11201
+ /** @default */
11202
+ description: string;
11203
+ target: components["schemas"]["EvalSuiteTargetDto"];
11204
+ cases: components["schemas"]["EvalCaseDto"][];
11205
+ };
11206
+ /** @description Full replace of mutable suite fields. Version bumps only when `target`, `cases`, or `promptBody` change versus the stored latest version. */
11207
+ UpdateEvalSuiteBodyDto: {
11208
+ name: string;
11209
+ /** @default */
11210
+ description: string;
11211
+ target: components["schemas"]["EvalSuiteTargetDto"];
11212
+ cases: components["schemas"]["EvalCaseDto"][];
11213
+ };
11214
+ /** @enum {string} */
11215
+ EvalRunStatusDto: "queued" | "running" | "succeeded" | "failed" | "cancelled";
11216
+ /**
11217
+ * @description Per-case outcome. `error` is used when completion is unavailable (`code: completion_unavailable`) or another non-score failure occurs.
11218
+ * @enum {string}
11219
+ */
11220
+ EvalCaseResultStatusDto: "passed" | "failed" | "error";
11221
+ /** @description Persisted result for one case. `pass` is true only when `status` is `passed` (all expected signals matched). On signal failure, `pass` is false and `failedSignalIds` lists the failing signal ids. On `completion_unavailable`, `status` is `error` and `code` is set. */
11222
+ EvalCaseResultDto: {
11223
+ caseId: string;
11224
+ name: string;
11225
+ status: components["schemas"]["EvalCaseResultStatusDto"];
11226
+ pass: boolean;
11227
+ failedSignalIds: string[];
11228
+ /** @description Completion text used for scoring (fixture or live). */
11229
+ completion?: string | null;
11230
+ inputTokens?: number | null;
11231
+ outputTokens?: number | null;
11232
+ /** @description Provider-reported cost in cents when available. */
11233
+ costCents?: number | null;
11234
+ /** @description Machine-readable error when `status` is `error` (e.g. `completion_unavailable`). */
11235
+ code?: string | null;
11236
+ /** @description Human-readable error detail when `status` is `error`. */
11237
+ error?: string | null;
11238
+ };
11239
+ /** @description Immutable suite snapshot pinned on a run (`suiteVersion` + JSON). Used so historical runs stay interpretable after later suite edits. */
11240
+ EvalSuiteSnapshotDto: {
11241
+ name: string;
11242
+ description: string;
11243
+ version: number;
11244
+ target: components["schemas"]["EvalSuiteTargetDto"];
11245
+ cases: components["schemas"]["EvalCaseDto"][];
11246
+ };
11247
+ /** @description Persisted eval run. Suite score = `passedCases / scoredCases` in [0,1] when at least one case was scored; `null` when the run ends with all cases in `error` (status `failed`). List endpoints return at most the last 50 runs per suite. */
11248
+ EvalRunDto: {
11249
+ /** Format: uuid */
11250
+ id: string;
11251
+ /** Format: uuid */
11252
+ suiteId: string;
11253
+ suiteVersion: number;
11254
+ status: components["schemas"]["EvalRunStatusDto"];
11255
+ /**
11256
+ * Format: date-time
11257
+ * @description Set when the worker claims the run (`running`).
11258
+ */
11259
+ startedAt: string | null;
11260
+ /** Format: date-time */
11261
+ finishedAt: string | null;
11262
+ passCount: number;
11263
+ failCount: number;
11264
+ errorCount: number;
11265
+ /** @description `passedCases / scoredCases` in [0,1], or null when no case was scored (all-error run). */
11266
+ score: number | null;
11267
+ caseResults: components["schemas"]["EvalCaseResultDto"][];
11268
+ /** @description Pinned suite snapshot for this run (present on persisted runs). */
11269
+ suiteSnapshot?: components["schemas"]["EvalSuiteSnapshotDto"] | null;
11270
+ };
11271
+ EvalRunListDto: {
11272
+ runs: components["schemas"]["EvalRunDto"][];
11273
+ };
11274
+ EvalRunEnqueueResponseDto: {
11275
+ /** Format: uuid */
11276
+ runId: string;
11277
+ /**
11278
+ * @description Always `queued` on enqueue; poll GET run for progress.
11279
+ * @enum {string}
11280
+ */
11281
+ status: "queued";
11282
+ };
11283
+ /** @description Regression when prior score − current score ≥ 0.10 on the same suiteId+suiteVersion case set, or suite score drop ≥ 0.10. */
11284
+ EvalRegressionDto: {
11285
+ /** Format: uuid */
11286
+ suiteId: string;
11287
+ suiteName?: string;
11288
+ suiteVersion: number;
11289
+ /** @description Set for case-level regressions; null for suite-level score drops. */
11290
+ caseId?: string | null;
11291
+ caseName?: string | null;
11292
+ /** Format: uuid */
11293
+ priorRunId?: string;
11294
+ /** Format: uuid */
11295
+ currentRunId?: string;
11296
+ priorScore: number;
11297
+ currentScore: number;
11298
+ /** @description priorScore − currentScore (always ≥ 0.10 for listed items). */
11299
+ scoreDrop: number;
11300
+ };
11301
+ /** @description Tip derived from failed signal notes / case names on recent runs. */
11302
+ EvalPromptTipDto: {
11303
+ /** Format: uuid */
11304
+ suiteId: string;
11305
+ suiteName?: string;
11306
+ caseId?: string | null;
11307
+ caseName?: string | null;
11308
+ signalId?: string | null;
11309
+ message: string;
11310
+ };
11311
+ /** @description Averages over successful cases in the last succeeded run per suite (workspace rollup). Nullables when token/cost fields were not returned. */
11312
+ EvalTokenEfficiencyDto: {
11313
+ avgInputTokens: number | null;
11314
+ avgOutputTokens: number | null;
11315
+ avgCostCents: number | null;
11316
+ };
11317
+ EvalModelComparisonDto: {
11318
+ provider: components["schemas"]["EvalAiProviderDto"];
11319
+ modelName: string;
11320
+ suiteCount: number;
11321
+ /** @description Average suite score across succeeded runs for this model; null when none. */
11322
+ avgScore: number | null;
11323
+ };
11324
+ /** @description Insights hub payload for Prompt & model evals. Empty succeeded-run history → empty arrays and null `tokenEfficiency`. */
11325
+ EvalInsightsDto: {
11326
+ regressions: components["schemas"]["EvalRegressionDto"][];
11327
+ promptTips: components["schemas"]["EvalPromptTipDto"][];
11328
+ tokenEfficiency: components["schemas"]["EvalTokenEfficiencyDto"] | null;
11329
+ modelComparison: components["schemas"]["EvalModelComparisonDto"][];
11330
+ };
11001
11331
  };
11002
11332
  responses: {
11003
11333
  /** @description Missing or invalid bearer token */
@@ -11035,6 +11365,10 @@ export interface components {
11035
11365
  };
11036
11366
  parameters: {
11037
11367
  WorkspaceId: string;
11368
+ /** @description Eval suite id (`tai_workspace_eval_suites.id`). */
11369
+ EvalSuiteId: string;
11370
+ /** @description Eval run id (`tai_workspace_eval_runs.id`). */
11371
+ EvalRunId: string;
11038
11372
  RepoId: string;
11039
11373
  /** @description Provider repository slug in `owner/repo` form (GitHub). Used for shareable public URLs; resolves to the same row as `repoId` UUID internally. */
11040
11374
  ProviderSlug: string;
@@ -11684,10 +12018,33 @@ export type InsightsTestPyramidCiQualityDto = components['schemas']['InsightsTes
11684
12018
  export type InsightsTestPyramidSummaryDto = components['schemas']['InsightsTestPyramidSummaryDto'];
11685
12019
  export type InsightsTestPyramidRepoItemDto = components['schemas']['InsightsTestPyramidRepoItemDto'];
11686
12020
  export type InsightsTestPyramidRepoListDto = components['schemas']['InsightsTestPyramidRepoListDto'];
12021
+ export type EvalExpectedSignalKindDto = components['schemas']['EvalExpectedSignalKindDto'];
12022
+ export type EvalAiProviderDto = components['schemas']['EvalAiProviderDto'];
12023
+ export type EvalExpectedSignalDto = components['schemas']['EvalExpectedSignalDto'];
12024
+ export type EvalCaseDto = components['schemas']['EvalCaseDto'];
12025
+ export type EvalSuiteTargetDto = components['schemas']['EvalSuiteTargetDto'];
12026
+ export type EvalSuiteDto = components['schemas']['EvalSuiteDto'];
12027
+ export type EvalSuiteListDto = components['schemas']['EvalSuiteListDto'];
12028
+ export type CreateEvalSuiteBodyDto = components['schemas']['CreateEvalSuiteBodyDto'];
12029
+ export type UpdateEvalSuiteBodyDto = components['schemas']['UpdateEvalSuiteBodyDto'];
12030
+ export type EvalRunStatusDto = components['schemas']['EvalRunStatusDto'];
12031
+ export type EvalCaseResultStatusDto = components['schemas']['EvalCaseResultStatusDto'];
12032
+ export type EvalCaseResultDto = components['schemas']['EvalCaseResultDto'];
12033
+ export type EvalSuiteSnapshotDto = components['schemas']['EvalSuiteSnapshotDto'];
12034
+ export type EvalRunDto = components['schemas']['EvalRunDto'];
12035
+ export type EvalRunListDto = components['schemas']['EvalRunListDto'];
12036
+ export type EvalRunEnqueueResponseDto = components['schemas']['EvalRunEnqueueResponseDto'];
12037
+ export type EvalRegressionDto = components['schemas']['EvalRegressionDto'];
12038
+ export type EvalPromptTipDto = components['schemas']['EvalPromptTipDto'];
12039
+ export type EvalTokenEfficiencyDto = components['schemas']['EvalTokenEfficiencyDto'];
12040
+ export type EvalModelComparisonDto = components['schemas']['EvalModelComparisonDto'];
12041
+ export type EvalInsightsDto = components['schemas']['EvalInsightsDto'];
11687
12042
  export type ResponseUnauthorized = components['responses']['Unauthorized'];
11688
12043
  export type ResponseForbidden = components['responses']['Forbidden'];
11689
12044
  export type ResponseZenHrSyncInProgress = components['responses']['ZenHrSyncInProgress'];
11690
12045
  export type ParameterWorkspaceId = components['parameters']['WorkspaceId'];
12046
+ export type ParameterEvalSuiteId = components['parameters']['EvalSuiteId'];
12047
+ export type ParameterEvalRunId = components['parameters']['EvalRunId'];
11691
12048
  export type ParameterRepoId = components['parameters']['RepoId'];
11692
12049
  export type ParameterProviderSlug = components['parameters']['ProviderSlug'];
11693
12050
  export type ParameterProjectId = components['parameters']['ProjectId'];
@@ -12013,6 +12370,108 @@ export interface operations {
12013
12370
  };
12014
12371
  };
12015
12372
  };
12373
+ runAssessmentManifestValidation: {
12374
+ parameters: {
12375
+ query?: never;
12376
+ header?: never;
12377
+ path?: never;
12378
+ cookie?: never;
12379
+ };
12380
+ requestBody: {
12381
+ content: {
12382
+ "application/json": {
12383
+ manifest: {
12384
+ /** @enum {string} */
12385
+ offerId: "engineering_readiness_baseline" | "agentic_ai_roi";
12386
+ dictionaryVersion: string;
12387
+ /** @enum {string} */
12388
+ validation: "validated" | "not_validated";
12389
+ /** @enum {string} */
12390
+ shareMode: "internal" | "external";
12391
+ /** @enum {string|null} */
12392
+ watermark: "NOT VALIDATED" | "SAMPLE · SYNTHETIC DATA" | null;
12393
+ scope: Record<string, never>;
12394
+ windows: Record<string, never>;
12395
+ sources: Record<string, never>[];
12396
+ consent: Record<string, never>;
12397
+ sections: Record<string, never>[];
12398
+ };
12399
+ workspaceId: string;
12400
+ expectedWorkspaceId: string;
12401
+ expectedRepositoryIds: string[];
12402
+ soldWindowComplete: boolean;
12403
+ premiumAiAssessable: boolean;
12404
+ namedPersonSectionIds: string[];
12405
+ tolerances: {
12406
+ id: string;
12407
+ /** @enum {string} */
12408
+ status: "unset" | "exceeded" | "within";
12409
+ }[];
12410
+ };
12411
+ };
12412
+ };
12413
+ responses: {
12414
+ /** @description Validation result. Client validation and watermark inputs are ignored. */
12415
+ 200: {
12416
+ headers: {
12417
+ [name: string]: unknown;
12418
+ };
12419
+ content: {
12420
+ "application/json": {
12421
+ buyerDeliverable: boolean;
12422
+ /** @enum {string} */
12423
+ validation: "validated" | "not_validated";
12424
+ /** @enum {string|null} */
12425
+ watermark: "NOT VALIDATED" | null;
12426
+ reasons: {
12427
+ code: string;
12428
+ message: string;
12429
+ }[];
12430
+ contentHash: string;
12431
+ };
12432
+ };
12433
+ };
12434
+ /** @description Body failed validation. */
12435
+ 400: {
12436
+ headers: {
12437
+ [name: string]: unknown;
12438
+ };
12439
+ content: {
12440
+ /**
12441
+ * @example {
12442
+ * "error": "manifest.offerId is not a known assessment offer",
12443
+ * "code": "invalid_body"
12444
+ * }
12445
+ */
12446
+ "application/json": components["schemas"]["ErrorMessageDto"];
12447
+ };
12448
+ };
12449
+ /** @description Missing or invalid JWT. */
12450
+ 401: {
12451
+ headers: {
12452
+ [name: string]: unknown;
12453
+ };
12454
+ content: {
12455
+ "application/json": components["schemas"]["ErrorMessageDto"];
12456
+ };
12457
+ };
12458
+ /** @description Caller is not a platform admin. */
12459
+ 403: {
12460
+ headers: {
12461
+ [name: string]: unknown;
12462
+ };
12463
+ content: {
12464
+ /**
12465
+ * @example {
12466
+ * "error": "Forbidden",
12467
+ * "code": "forbidden"
12468
+ * }
12469
+ */
12470
+ "application/json": components["schemas"]["ErrorMessageDto"];
12471
+ };
12472
+ };
12473
+ };
12474
+ };
12016
12475
  adminListReadinessTokenUsage: {
12017
12476
  parameters: {
12018
12477
  query?: {
@@ -24093,5 +24552,427 @@ export interface operations {
24093
24552
  };
24094
24553
  };
24095
24554
  };
24555
+ listEvalSuites: {
24556
+ parameters: {
24557
+ query?: never;
24558
+ header?: never;
24559
+ path: {
24560
+ workspaceId: components["parameters"]["WorkspaceId"];
24561
+ };
24562
+ cookie?: never;
24563
+ };
24564
+ requestBody?: never;
24565
+ responses: {
24566
+ /** @description Suite list (latest version per suite) */
24567
+ 200: {
24568
+ headers: {
24569
+ [name: string]: unknown;
24570
+ };
24571
+ content: {
24572
+ /**
24573
+ * @example {
24574
+ * "suites": []
24575
+ * }
24576
+ */
24577
+ "application/json": components["schemas"]["EvalSuiteListDto"];
24578
+ };
24579
+ };
24580
+ 401: components["responses"]["Unauthorized"];
24581
+ 403: components["responses"]["Forbidden"];
24582
+ /** @description Workspace not found */
24583
+ 404: {
24584
+ headers: {
24585
+ [name: string]: unknown;
24586
+ };
24587
+ content: {
24588
+ "application/json": components["schemas"]["ErrorMessageDto"];
24589
+ };
24590
+ };
24591
+ };
24592
+ };
24593
+ createEvalSuite: {
24594
+ parameters: {
24595
+ query?: never;
24596
+ header?: never;
24597
+ path: {
24598
+ workspaceId: components["parameters"]["WorkspaceId"];
24599
+ };
24600
+ cookie?: never;
24601
+ };
24602
+ requestBody: {
24603
+ content: {
24604
+ /**
24605
+ * @example {
24606
+ * "name": "Greeting quality",
24607
+ * "description": "Fixture-backed smoke suite for the support greeting prompt",
24608
+ * "target": {
24609
+ * "promptBody": "You are a support agent. Greet the user by name.",
24610
+ * "promptKey": "support-greeting",
24611
+ * "provider": "cursor",
24612
+ * "modelName": "gpt-4.1-mini"
24613
+ * },
24614
+ * "cases": [
24615
+ * {
24616
+ * "id": "case-hello",
24617
+ * "name": "Hello Alice",
24618
+ * "input": "{\"name\":\"Alice\"}",
24619
+ * "fixtureCompletion": "Hello Alice, how can I help you today?",
24620
+ * "expectedSignals": [
24621
+ * {
24622
+ * "id": "sig-contains-hello",
24623
+ * "kind": "contains",
24624
+ * "value": "Hello Alice"
24625
+ * },
24626
+ * {
24627
+ * "id": "sig-not-sorry",
24628
+ * "kind": "not_contains",
24629
+ * "value": "I cannot"
24630
+ * }
24631
+ * ]
24632
+ * }
24633
+ * ]
24634
+ * }
24635
+ */
24636
+ "application/json": components["schemas"]["CreateEvalSuiteBodyDto"];
24637
+ };
24638
+ };
24639
+ responses: {
24640
+ /** @description Suite created */
24641
+ 201: {
24642
+ headers: {
24643
+ [name: string]: unknown;
24644
+ };
24645
+ content: {
24646
+ "application/json": components["schemas"]["EvalSuiteDto"];
24647
+ };
24648
+ };
24649
+ /** @description Validation failed — empty cases (`eval_suite_cases_required`), missing target (prompt and model), invalid name/description lengths, case/signal bounds, or malformed body. */
24650
+ 400: {
24651
+ headers: {
24652
+ [name: string]: unknown;
24653
+ };
24654
+ content: {
24655
+ "application/json": components["schemas"]["ErrorMessageDto"];
24656
+ };
24657
+ };
24658
+ 401: components["responses"]["Unauthorized"];
24659
+ /** @description Authenticated but not a workspace editor/admin */
24660
+ 403: {
24661
+ headers: {
24662
+ [name: string]: unknown;
24663
+ };
24664
+ content: {
24665
+ /**
24666
+ * @example {
24667
+ * "error": "Workspace editor role required",
24668
+ * "code": "workspace_editor_required"
24669
+ * }
24670
+ */
24671
+ "application/json": components["schemas"]["ErrorMessageDto"];
24672
+ };
24673
+ };
24674
+ /** @description Workspace not found */
24675
+ 404: {
24676
+ headers: {
24677
+ [name: string]: unknown;
24678
+ };
24679
+ content: {
24680
+ "application/json": components["schemas"]["ErrorMessageDto"];
24681
+ };
24682
+ };
24683
+ /** @description Workspace already has the maximum of 50 suites */
24684
+ 409: {
24685
+ headers: {
24686
+ [name: string]: unknown;
24687
+ };
24688
+ content: {
24689
+ /**
24690
+ * @example {
24691
+ * "error": "Maximum of 50 eval suites per workspace",
24692
+ * "code": "eval_suite_limit_reached"
24693
+ * }
24694
+ */
24695
+ "application/json": components["schemas"]["ErrorMessageDto"];
24696
+ };
24697
+ };
24698
+ };
24699
+ };
24700
+ getEvalSuite: {
24701
+ parameters: {
24702
+ query?: never;
24703
+ header?: never;
24704
+ path: {
24705
+ workspaceId: components["parameters"]["WorkspaceId"];
24706
+ /** @description Eval suite id (`tai_workspace_eval_suites.id`). */
24707
+ suiteId: components["parameters"]["EvalSuiteId"];
24708
+ };
24709
+ cookie?: never;
24710
+ };
24711
+ requestBody?: never;
24712
+ responses: {
24713
+ /** @description Suite (latest version) */
24714
+ 200: {
24715
+ headers: {
24716
+ [name: string]: unknown;
24717
+ };
24718
+ content: {
24719
+ "application/json": components["schemas"]["EvalSuiteDto"];
24720
+ };
24721
+ };
24722
+ 401: components["responses"]["Unauthorized"];
24723
+ 403: components["responses"]["Forbidden"];
24724
+ /** @description Workspace or suite not found */
24725
+ 404: {
24726
+ headers: {
24727
+ [name: string]: unknown;
24728
+ };
24729
+ content: {
24730
+ "application/json": components["schemas"]["ErrorMessageDto"];
24731
+ };
24732
+ };
24733
+ };
24734
+ };
24735
+ updateEvalSuite: {
24736
+ parameters: {
24737
+ query?: never;
24738
+ header?: never;
24739
+ path: {
24740
+ workspaceId: components["parameters"]["WorkspaceId"];
24741
+ /** @description Eval suite id (`tai_workspace_eval_suites.id`). */
24742
+ suiteId: components["parameters"]["EvalSuiteId"];
24743
+ };
24744
+ cookie?: never;
24745
+ };
24746
+ requestBody: {
24747
+ content: {
24748
+ "application/json": components["schemas"]["UpdateEvalSuiteBodyDto"];
24749
+ };
24750
+ };
24751
+ responses: {
24752
+ /** @description Suite updated (possibly with bumped version) */
24753
+ 200: {
24754
+ headers: {
24755
+ [name: string]: unknown;
24756
+ };
24757
+ content: {
24758
+ "application/json": components["schemas"]["EvalSuiteDto"];
24759
+ };
24760
+ };
24761
+ /** @description Validation failed (same codes as create) */
24762
+ 400: {
24763
+ headers: {
24764
+ [name: string]: unknown;
24765
+ };
24766
+ content: {
24767
+ "application/json": components["schemas"]["ErrorMessageDto"];
24768
+ };
24769
+ };
24770
+ 401: components["responses"]["Unauthorized"];
24771
+ /** @description Authenticated but not a workspace editor/admin */
24772
+ 403: {
24773
+ headers: {
24774
+ [name: string]: unknown;
24775
+ };
24776
+ content: {
24777
+ /**
24778
+ * @example {
24779
+ * "error": "Workspace editor role required",
24780
+ * "code": "workspace_editor_required"
24781
+ * }
24782
+ */
24783
+ "application/json": components["schemas"]["ErrorMessageDto"];
24784
+ };
24785
+ };
24786
+ /** @description Workspace or suite not found */
24787
+ 404: {
24788
+ headers: {
24789
+ [name: string]: unknown;
24790
+ };
24791
+ content: {
24792
+ "application/json": components["schemas"]["ErrorMessageDto"];
24793
+ };
24794
+ };
24795
+ };
24796
+ };
24797
+ listEvalRuns: {
24798
+ parameters: {
24799
+ query?: never;
24800
+ header?: never;
24801
+ path: {
24802
+ workspaceId: components["parameters"]["WorkspaceId"];
24803
+ /** @description Eval suite id (`tai_workspace_eval_suites.id`). */
24804
+ suiteId: components["parameters"]["EvalSuiteId"];
24805
+ };
24806
+ cookie?: never;
24807
+ };
24808
+ requestBody?: never;
24809
+ responses: {
24810
+ /** @description Run history (max 50) */
24811
+ 200: {
24812
+ headers: {
24813
+ [name: string]: unknown;
24814
+ };
24815
+ content: {
24816
+ /**
24817
+ * @example {
24818
+ * "runs": []
24819
+ * }
24820
+ */
24821
+ "application/json": components["schemas"]["EvalRunListDto"];
24822
+ };
24823
+ };
24824
+ 401: components["responses"]["Unauthorized"];
24825
+ 403: components["responses"]["Forbidden"];
24826
+ /** @description Workspace or suite not found */
24827
+ 404: {
24828
+ headers: {
24829
+ [name: string]: unknown;
24830
+ };
24831
+ content: {
24832
+ "application/json": components["schemas"]["ErrorMessageDto"];
24833
+ };
24834
+ };
24835
+ };
24836
+ };
24837
+ enqueueEvalRun: {
24838
+ parameters: {
24839
+ query?: never;
24840
+ header?: never;
24841
+ path: {
24842
+ workspaceId: components["parameters"]["WorkspaceId"];
24843
+ /** @description Eval suite id (`tai_workspace_eval_suites.id`). */
24844
+ suiteId: components["parameters"]["EvalSuiteId"];
24845
+ };
24846
+ cookie?: never;
24847
+ };
24848
+ requestBody?: never;
24849
+ responses: {
24850
+ /** @description Run queued */
24851
+ 202: {
24852
+ headers: {
24853
+ [name: string]: unknown;
24854
+ };
24855
+ content: {
24856
+ /**
24857
+ * @example {
24858
+ * "runId": "22222222-2222-4222-8222-222222222222",
24859
+ * "status": "queued"
24860
+ * }
24861
+ */
24862
+ "application/json": components["schemas"]["EvalRunEnqueueResponseDto"];
24863
+ };
24864
+ };
24865
+ 401: components["responses"]["Unauthorized"];
24866
+ /** @description Authenticated but not a workspace editor/admin */
24867
+ 403: {
24868
+ headers: {
24869
+ [name: string]: unknown;
24870
+ };
24871
+ content: {
24872
+ /**
24873
+ * @example {
24874
+ * "error": "Workspace editor role required",
24875
+ * "code": "workspace_editor_required"
24876
+ * }
24877
+ */
24878
+ "application/json": components["schemas"]["ErrorMessageDto"];
24879
+ };
24880
+ };
24881
+ /** @description Workspace or suite not found */
24882
+ 404: {
24883
+ headers: {
24884
+ [name: string]: unknown;
24885
+ };
24886
+ content: {
24887
+ "application/json": components["schemas"]["ErrorMessageDto"];
24888
+ };
24889
+ };
24890
+ /** @description An active queued or running eval already exists for this suite */
24891
+ 409: {
24892
+ headers: {
24893
+ [name: string]: unknown;
24894
+ };
24895
+ content: {
24896
+ /**
24897
+ * @example {
24898
+ * "error": "An eval run is already in progress for this suite",
24899
+ * "code": "eval_run_in_progress"
24900
+ * }
24901
+ */
24902
+ "application/json": components["schemas"]["ErrorMessageDto"];
24903
+ };
24904
+ };
24905
+ };
24906
+ };
24907
+ getEvalRun: {
24908
+ parameters: {
24909
+ query?: never;
24910
+ header?: never;
24911
+ path: {
24912
+ workspaceId: components["parameters"]["WorkspaceId"];
24913
+ /** @description Eval suite id (`tai_workspace_eval_suites.id`). */
24914
+ suiteId: components["parameters"]["EvalSuiteId"];
24915
+ /** @description Eval run id (`tai_workspace_eval_runs.id`). */
24916
+ runId: components["parameters"]["EvalRunId"];
24917
+ };
24918
+ cookie?: never;
24919
+ };
24920
+ requestBody?: never;
24921
+ responses: {
24922
+ /** @description Run detail */
24923
+ 200: {
24924
+ headers: {
24925
+ [name: string]: unknown;
24926
+ };
24927
+ content: {
24928
+ "application/json": components["schemas"]["EvalRunDto"];
24929
+ };
24930
+ };
24931
+ 401: components["responses"]["Unauthorized"];
24932
+ 403: components["responses"]["Forbidden"];
24933
+ /** @description Workspace, suite, or run not found */
24934
+ 404: {
24935
+ headers: {
24936
+ [name: string]: unknown;
24937
+ };
24938
+ content: {
24939
+ "application/json": components["schemas"]["ErrorMessageDto"];
24940
+ };
24941
+ };
24942
+ };
24943
+ };
24944
+ getEvalInsights: {
24945
+ parameters: {
24946
+ query?: never;
24947
+ header?: never;
24948
+ path: {
24949
+ workspaceId: components["parameters"]["WorkspaceId"];
24950
+ };
24951
+ cookie?: never;
24952
+ };
24953
+ requestBody?: never;
24954
+ responses: {
24955
+ /** @description Insights payload */
24956
+ 200: {
24957
+ headers: {
24958
+ [name: string]: unknown;
24959
+ };
24960
+ content: {
24961
+ "application/json": components["schemas"]["EvalInsightsDto"];
24962
+ };
24963
+ };
24964
+ 401: components["responses"]["Unauthorized"];
24965
+ 403: components["responses"]["Forbidden"];
24966
+ /** @description Workspace not found */
24967
+ 404: {
24968
+ headers: {
24969
+ [name: string]: unknown;
24970
+ };
24971
+ content: {
24972
+ "application/json": components["schemas"]["ErrorMessageDto"];
24973
+ };
24974
+ };
24975
+ };
24976
+ };
24096
24977
  }
24097
24978
  //# sourceMappingURL=openapi.d.ts.map