@thinkai/tai-api-contract 2.175.0 → 2.176.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.
- package/dist/generated/openapi.d.ts +286 -0
- package/dist/generated/openapi.d.ts.map +1 -1
- package/openapi/openapi.yaml +387 -2
- package/package.json +1 -1
- package/src/generated/openapi.ts +286 -0
package/src/generated/openapi.ts
CHANGED
|
@@ -4894,6 +4894,50 @@ export interface paths {
|
|
|
4894
4894
|
patch?: never;
|
|
4895
4895
|
trace?: never;
|
|
4896
4896
|
};
|
|
4897
|
+
"/workspaces/{workspaceId}/evals/suites/{suiteId}/compare": {
|
|
4898
|
+
parameters: {
|
|
4899
|
+
query?: never;
|
|
4900
|
+
header?: never;
|
|
4901
|
+
path?: never;
|
|
4902
|
+
cookie?: never;
|
|
4903
|
+
};
|
|
4904
|
+
/**
|
|
4905
|
+
* Compare two succeeded eval runs on a suite
|
|
4906
|
+
* @description Side-by-side compare of a baseline run vs a candidate run on the same suite. Both runs must be `succeeded`. Aligns cases by `caseId` and reports suite- and case-level score/token/cost deltas when present. Requires workspace membership. Does not trigger scoring.
|
|
4907
|
+
*/
|
|
4908
|
+
get: operations["compareEvalRuns"];
|
|
4909
|
+
put?: never;
|
|
4910
|
+
post?: never;
|
|
4911
|
+
delete?: never;
|
|
4912
|
+
options?: never;
|
|
4913
|
+
head?: never;
|
|
4914
|
+
patch?: never;
|
|
4915
|
+
trace?: never;
|
|
4916
|
+
};
|
|
4917
|
+
"/workspaces/{workspaceId}/evals/suites/{suiteId}/decisions": {
|
|
4918
|
+
parameters: {
|
|
4919
|
+
query?: never;
|
|
4920
|
+
header?: never;
|
|
4921
|
+
path?: never;
|
|
4922
|
+
cookie?: never;
|
|
4923
|
+
};
|
|
4924
|
+
/**
|
|
4925
|
+
* List eval promote/keep/reject decisions for a suite
|
|
4926
|
+
* @description Returns the last 50 decisions for the suite (newest first). Empty → `{ "decisions": [] }`. Requires workspace membership.
|
|
4927
|
+
*/
|
|
4928
|
+
get: operations["listEvalDecisions"];
|
|
4929
|
+
put?: never;
|
|
4930
|
+
/**
|
|
4931
|
+
* Record a promote, keep, or reject decision
|
|
4932
|
+
* @description Persists an audit decision for a baseline vs candidate run pair. Requires workspace editor or admin. Both runs must be `succeeded` on this suite. `promote` also applies the candidate run's `suiteSnapshot.target` to the live suite (version may bump). Promotion gate attach is deferred (`gateApplied: false`, `gateDetail.reason: deferred`) until thinkai-platform-workspace#492.
|
|
4933
|
+
*/
|
|
4934
|
+
post: operations["createEvalDecision"];
|
|
4935
|
+
delete?: never;
|
|
4936
|
+
options?: never;
|
|
4937
|
+
head?: never;
|
|
4938
|
+
patch?: never;
|
|
4939
|
+
trace?: never;
|
|
4940
|
+
};
|
|
4897
4941
|
"/workspaces/{workspaceId}/evals/suites/{suiteId}/runs": {
|
|
4898
4942
|
parameters: {
|
|
4899
4943
|
query?: never;
|
|
@@ -11292,6 +11336,8 @@ export interface components {
|
|
|
11292
11336
|
createdByUserId: string;
|
|
11293
11337
|
target: components["schemas"]["EvalSuiteTargetDto"];
|
|
11294
11338
|
cases: components["schemas"]["EvalCaseDto"][];
|
|
11339
|
+
/** @description Most recent promote/keep/reject decision for this suite, when any exist. Omitted or null when none recorded. */
|
|
11340
|
+
latestDecision?: components["schemas"]["EvalDecisionDto"] | null;
|
|
11295
11341
|
};
|
|
11296
11342
|
EvalSuiteListDto: {
|
|
11297
11343
|
suites: components["schemas"]["EvalSuiteDto"][];
|
|
@@ -11442,6 +11488,89 @@ export interface components {
|
|
|
11442
11488
|
EvalPackListDto: {
|
|
11443
11489
|
packs: components["schemas"]["EvalPackSummaryDto"][];
|
|
11444
11490
|
};
|
|
11491
|
+
EvalCompareRunSummaryDto: {
|
|
11492
|
+
/** Format: uuid */
|
|
11493
|
+
id: string;
|
|
11494
|
+
suiteVersion: number;
|
|
11495
|
+
score: number | null;
|
|
11496
|
+
/** Format: date-time */
|
|
11497
|
+
finishedAt: string | null;
|
|
11498
|
+
target: components["schemas"]["EvalSuiteTargetDto"];
|
|
11499
|
+
passCount: number;
|
|
11500
|
+
failCount: number;
|
|
11501
|
+
errorCount: number;
|
|
11502
|
+
};
|
|
11503
|
+
EvalCompareCaseDto: {
|
|
11504
|
+
caseId: string;
|
|
11505
|
+
name: string;
|
|
11506
|
+
baselineStatus: (string & components["schemas"]["EvalCaseResultStatusDto"]) | null;
|
|
11507
|
+
candidateStatus: (string & components["schemas"]["EvalCaseResultStatusDto"]) | null;
|
|
11508
|
+
baselinePass: boolean | null;
|
|
11509
|
+
candidatePass: boolean | null;
|
|
11510
|
+
baselineFailedSignalIds: string[];
|
|
11511
|
+
candidateFailedSignalIds: string[];
|
|
11512
|
+
baselineInputTokens?: number | null;
|
|
11513
|
+
candidateInputTokens?: number | null;
|
|
11514
|
+
baselineOutputTokens?: number | null;
|
|
11515
|
+
candidateOutputTokens?: number | null;
|
|
11516
|
+
baselineCostCents?: number | null;
|
|
11517
|
+
candidateCostCents?: number | null;
|
|
11518
|
+
/** @description Candidate pass (1/0) minus baseline pass when both scored. */
|
|
11519
|
+
scoreDelta?: number | null;
|
|
11520
|
+
inputTokensDelta?: number | null;
|
|
11521
|
+
outputTokensDelta?: number | null;
|
|
11522
|
+
costCentsDelta?: number | null;
|
|
11523
|
+
};
|
|
11524
|
+
EvalCompareDto: {
|
|
11525
|
+
/** Format: uuid */
|
|
11526
|
+
suiteId: string;
|
|
11527
|
+
baseline: components["schemas"]["EvalCompareRunSummaryDto"];
|
|
11528
|
+
candidate: components["schemas"]["EvalCompareRunSummaryDto"];
|
|
11529
|
+
/** @description candidate.score − baseline.score when both present. */
|
|
11530
|
+
scoreDelta: number | null;
|
|
11531
|
+
avgInputTokensDelta?: number | null;
|
|
11532
|
+
avgOutputTokensDelta?: number | null;
|
|
11533
|
+
avgCostCentsDelta?: number | null;
|
|
11534
|
+
cases: components["schemas"]["EvalCompareCaseDto"][];
|
|
11535
|
+
/** @description Case ids present on only one run's results/snapshot. */
|
|
11536
|
+
unpairedCaseIds: string[];
|
|
11537
|
+
};
|
|
11538
|
+
/** @enum {string} */
|
|
11539
|
+
EvalDecisionKindDto: "promote" | "keep" | "reject";
|
|
11540
|
+
EvalGateDetailDto: {
|
|
11541
|
+
/** @description Machine-readable gate outcome. `deferred` until promotion-gate attach (thinkai-platform-workspace#492) ships. */
|
|
11542
|
+
reason: string;
|
|
11543
|
+
};
|
|
11544
|
+
EvalDecisionDto: {
|
|
11545
|
+
/** Format: uuid */
|
|
11546
|
+
id: string;
|
|
11547
|
+
/** Format: uuid */
|
|
11548
|
+
suiteId: string;
|
|
11549
|
+
decision: components["schemas"]["EvalDecisionKindDto"];
|
|
11550
|
+
/** Format: uuid */
|
|
11551
|
+
baselineRunId: string;
|
|
11552
|
+
/** Format: uuid */
|
|
11553
|
+
candidateRunId: string;
|
|
11554
|
+
/** Format: uuid */
|
|
11555
|
+
decidedByUserId: string;
|
|
11556
|
+
/** Format: date-time */
|
|
11557
|
+
decidedAt: string;
|
|
11558
|
+
note?: string | null;
|
|
11559
|
+
/** @description True when a promotion gate attach point enforced this decision. */
|
|
11560
|
+
gateApplied: boolean;
|
|
11561
|
+
gateDetail?: components["schemas"]["EvalGateDetailDto"] | null;
|
|
11562
|
+
};
|
|
11563
|
+
EvalDecisionListDto: {
|
|
11564
|
+
decisions: components["schemas"]["EvalDecisionDto"][];
|
|
11565
|
+
};
|
|
11566
|
+
CreateEvalDecisionBodyDto: {
|
|
11567
|
+
decision: components["schemas"]["EvalDecisionKindDto"];
|
|
11568
|
+
/** Format: uuid */
|
|
11569
|
+
baselineRunId: string;
|
|
11570
|
+
/** Format: uuid */
|
|
11571
|
+
candidateRunId: string;
|
|
11572
|
+
note?: string;
|
|
11573
|
+
};
|
|
11445
11574
|
};
|
|
11446
11575
|
responses: {
|
|
11447
11576
|
/** @description Missing or invalid bearer token */
|
|
@@ -12160,6 +12289,14 @@ export type EvalModelComparisonDto = components['schemas']['EvalModelComparisonD
|
|
|
12160
12289
|
export type EvalInsightsDto = components['schemas']['EvalInsightsDto'];
|
|
12161
12290
|
export type EvalPackSummaryDto = components['schemas']['EvalPackSummaryDto'];
|
|
12162
12291
|
export type EvalPackListDto = components['schemas']['EvalPackListDto'];
|
|
12292
|
+
export type EvalCompareRunSummaryDto = components['schemas']['EvalCompareRunSummaryDto'];
|
|
12293
|
+
export type EvalCompareCaseDto = components['schemas']['EvalCompareCaseDto'];
|
|
12294
|
+
export type EvalCompareDto = components['schemas']['EvalCompareDto'];
|
|
12295
|
+
export type EvalDecisionKindDto = components['schemas']['EvalDecisionKindDto'];
|
|
12296
|
+
export type EvalGateDetailDto = components['schemas']['EvalGateDetailDto'];
|
|
12297
|
+
export type EvalDecisionDto = components['schemas']['EvalDecisionDto'];
|
|
12298
|
+
export type EvalDecisionListDto = components['schemas']['EvalDecisionListDto'];
|
|
12299
|
+
export type CreateEvalDecisionBodyDto = components['schemas']['CreateEvalDecisionBodyDto'];
|
|
12163
12300
|
export type ResponseUnauthorized = components['responses']['Unauthorized'];
|
|
12164
12301
|
export type ResponseForbidden = components['responses']['Forbidden'];
|
|
12165
12302
|
export type ResponseZenHrSyncInProgress = components['responses']['ZenHrSyncInProgress'];
|
|
@@ -25095,6 +25232,155 @@ export interface operations {
|
|
|
25095
25232
|
};
|
|
25096
25233
|
};
|
|
25097
25234
|
};
|
|
25235
|
+
compareEvalRuns: {
|
|
25236
|
+
parameters: {
|
|
25237
|
+
query: {
|
|
25238
|
+
baselineRunId: string;
|
|
25239
|
+
candidateRunId: string;
|
|
25240
|
+
};
|
|
25241
|
+
header?: never;
|
|
25242
|
+
path: {
|
|
25243
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
25244
|
+
/** @description Eval suite id (`tai_workspace_eval_suites.id`). */
|
|
25245
|
+
suiteId: components["parameters"]["EvalSuiteId"];
|
|
25246
|
+
};
|
|
25247
|
+
cookie?: never;
|
|
25248
|
+
};
|
|
25249
|
+
requestBody?: never;
|
|
25250
|
+
responses: {
|
|
25251
|
+
/** @description Compare result */
|
|
25252
|
+
200: {
|
|
25253
|
+
headers: {
|
|
25254
|
+
[name: string]: unknown;
|
|
25255
|
+
};
|
|
25256
|
+
content: {
|
|
25257
|
+
"application/json": components["schemas"]["EvalCompareDto"];
|
|
25258
|
+
};
|
|
25259
|
+
};
|
|
25260
|
+
/** @description Runs not comparable (e.g. not succeeded, same id, or invalid query). Codes: `eval_compare_runs_required`, `eval_compare_runs_not_succeeded`, `eval_compare_same_run`. */
|
|
25261
|
+
400: {
|
|
25262
|
+
headers: {
|
|
25263
|
+
[name: string]: unknown;
|
|
25264
|
+
};
|
|
25265
|
+
content: {
|
|
25266
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
25267
|
+
};
|
|
25268
|
+
};
|
|
25269
|
+
401: components["responses"]["Unauthorized"];
|
|
25270
|
+
403: components["responses"]["Forbidden"];
|
|
25271
|
+
/** @description Workspace, suite, or run not found */
|
|
25272
|
+
404: {
|
|
25273
|
+
headers: {
|
|
25274
|
+
[name: string]: unknown;
|
|
25275
|
+
};
|
|
25276
|
+
content: {
|
|
25277
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
25278
|
+
};
|
|
25279
|
+
};
|
|
25280
|
+
};
|
|
25281
|
+
};
|
|
25282
|
+
listEvalDecisions: {
|
|
25283
|
+
parameters: {
|
|
25284
|
+
query?: never;
|
|
25285
|
+
header?: never;
|
|
25286
|
+
path: {
|
|
25287
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
25288
|
+
/** @description Eval suite id (`tai_workspace_eval_suites.id`). */
|
|
25289
|
+
suiteId: components["parameters"]["EvalSuiteId"];
|
|
25290
|
+
};
|
|
25291
|
+
cookie?: never;
|
|
25292
|
+
};
|
|
25293
|
+
requestBody?: never;
|
|
25294
|
+
responses: {
|
|
25295
|
+
/** @description Decision history */
|
|
25296
|
+
200: {
|
|
25297
|
+
headers: {
|
|
25298
|
+
[name: string]: unknown;
|
|
25299
|
+
};
|
|
25300
|
+
content: {
|
|
25301
|
+
/**
|
|
25302
|
+
* @example {
|
|
25303
|
+
* "decisions": []
|
|
25304
|
+
* }
|
|
25305
|
+
*/
|
|
25306
|
+
"application/json": components["schemas"]["EvalDecisionListDto"];
|
|
25307
|
+
};
|
|
25308
|
+
};
|
|
25309
|
+
401: components["responses"]["Unauthorized"];
|
|
25310
|
+
403: components["responses"]["Forbidden"];
|
|
25311
|
+
/** @description Workspace or suite not found */
|
|
25312
|
+
404: {
|
|
25313
|
+
headers: {
|
|
25314
|
+
[name: string]: unknown;
|
|
25315
|
+
};
|
|
25316
|
+
content: {
|
|
25317
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
25318
|
+
};
|
|
25319
|
+
};
|
|
25320
|
+
};
|
|
25321
|
+
};
|
|
25322
|
+
createEvalDecision: {
|
|
25323
|
+
parameters: {
|
|
25324
|
+
query?: never;
|
|
25325
|
+
header?: never;
|
|
25326
|
+
path: {
|
|
25327
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
25328
|
+
/** @description Eval suite id (`tai_workspace_eval_suites.id`). */
|
|
25329
|
+
suiteId: components["parameters"]["EvalSuiteId"];
|
|
25330
|
+
};
|
|
25331
|
+
cookie?: never;
|
|
25332
|
+
};
|
|
25333
|
+
requestBody: {
|
|
25334
|
+
content: {
|
|
25335
|
+
"application/json": components["schemas"]["CreateEvalDecisionBodyDto"];
|
|
25336
|
+
};
|
|
25337
|
+
};
|
|
25338
|
+
responses: {
|
|
25339
|
+
/** @description Decision recorded */
|
|
25340
|
+
201: {
|
|
25341
|
+
headers: {
|
|
25342
|
+
[name: string]: unknown;
|
|
25343
|
+
};
|
|
25344
|
+
content: {
|
|
25345
|
+
"application/json": components["schemas"]["EvalDecisionDto"];
|
|
25346
|
+
};
|
|
25347
|
+
};
|
|
25348
|
+
/** @description Validation failed. Codes: `eval_decision_invalid`, `eval_compare_runs_not_succeeded`, `eval_compare_same_run`, `eval_promote_snapshot_missing`. */
|
|
25349
|
+
400: {
|
|
25350
|
+
headers: {
|
|
25351
|
+
[name: string]: unknown;
|
|
25352
|
+
};
|
|
25353
|
+
content: {
|
|
25354
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
25355
|
+
};
|
|
25356
|
+
};
|
|
25357
|
+
401: components["responses"]["Unauthorized"];
|
|
25358
|
+
/** @description Authenticated but not a workspace editor/admin */
|
|
25359
|
+
403: {
|
|
25360
|
+
headers: {
|
|
25361
|
+
[name: string]: unknown;
|
|
25362
|
+
};
|
|
25363
|
+
content: {
|
|
25364
|
+
/**
|
|
25365
|
+
* @example {
|
|
25366
|
+
* "error": "Workspace editor role required",
|
|
25367
|
+
* "code": "workspace_editor_required"
|
|
25368
|
+
* }
|
|
25369
|
+
*/
|
|
25370
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
25371
|
+
};
|
|
25372
|
+
};
|
|
25373
|
+
/** @description Workspace, suite, or run not found */
|
|
25374
|
+
404: {
|
|
25375
|
+
headers: {
|
|
25376
|
+
[name: string]: unknown;
|
|
25377
|
+
};
|
|
25378
|
+
content: {
|
|
25379
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
25380
|
+
};
|
|
25381
|
+
};
|
|
25382
|
+
};
|
|
25383
|
+
};
|
|
25098
25384
|
listEvalRuns: {
|
|
25099
25385
|
parameters: {
|
|
25100
25386
|
query?: never;
|