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