@kindgi/api 0.1.4-rc.0 → 0.1.4-rc.2
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/agent-binding.d.ts +20 -2
- package/dist/agent-binding.d.ts.map +1 -1
- package/dist/agent-pins.d.ts.map +1 -1
- package/dist/agent-pins.js +4 -1
- package/dist/agent-pins.js.map +1 -1
- package/dist/app.d.ts +8 -0
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +30 -5
- package/dist/app.js.map +1 -1
- package/dist/deploy-versions.d.ts +10 -5
- package/dist/deploy-versions.d.ts.map +1 -1
- package/dist/deploy-versions.js +4 -10
- package/dist/deploy-versions.js.map +1 -1
- package/dist/derive-agent-version.d.ts +9 -1
- package/dist/derive-agent-version.d.ts.map +1 -1
- package/dist/derive-agent-version.js +11 -1
- package/dist/derive-agent-version.js.map +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +26 -0
- package/dist/errors.js.map +1 -1
- package/dist/eval-case-binding.d.ts +10 -0
- package/dist/eval-case-binding.d.ts.map +1 -1
- package/dist/eval-run-binding.d.ts +21 -3
- package/dist/eval-run-binding.d.ts.map +1 -1
- package/dist/eval-run-binding.js.map +1 -1
- package/dist/eval-run-dispatcher.d.ts +3 -0
- package/dist/eval-run-dispatcher.d.ts.map +1 -1
- package/dist/eval-run-dispatcher.js.map +1 -1
- package/dist/flow-binding.d.ts +8 -0
- package/dist/flow-binding.d.ts.map +1 -1
- package/dist/flow-pins.d.ts +20 -7
- package/dist/flow-pins.d.ts.map +1 -1
- package/dist/flow-pins.js +36 -11
- package/dist/flow-pins.js.map +1 -1
- package/dist/gate-policy-binding.d.ts +164 -0
- package/dist/gate-policy-binding.d.ts.map +1 -0
- package/dist/gate-policy-binding.js +12 -0
- package/dist/gate-policy-binding.js.map +1 -0
- package/dist/gate.d.ts +56 -0
- package/dist/gate.d.ts.map +1 -0
- package/dist/gate.js +359 -0
- package/dist/gate.js.map +1 -0
- package/dist/guardrail-binding.d.ts +8 -0
- package/dist/guardrail-binding.d.ts.map +1 -1
- package/dist/handler-binding.d.ts +17 -2
- package/dist/handler-binding.d.ts.map +1 -1
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/judged-dispatcher.d.ts +20 -1
- package/dist/judged-dispatcher.d.ts.map +1 -1
- package/dist/judged-dispatcher.js +57 -7
- package/dist/judged-dispatcher.js.map +1 -1
- package/dist/judgment-binding.d.ts +38 -0
- package/dist/judgment-binding.d.ts.map +1 -1
- package/dist/judgment-binding.js +19 -0
- package/dist/judgment-binding.js.map +1 -1
- package/dist/live-version-binding.d.ts +206 -0
- package/dist/live-version-binding.d.ts.map +1 -0
- package/dist/live-version-binding.js +4 -0
- package/dist/live-version-binding.js.map +1 -0
- package/dist/middleware/authorize.d.ts.map +1 -1
- package/dist/middleware/authorize.js +13 -2
- package/dist/middleware/authorize.js.map +1 -1
- package/dist/middleware/project-ref.d.ts +25 -0
- package/dist/middleware/project-ref.d.ts.map +1 -0
- package/dist/middleware/project-ref.js +72 -0
- package/dist/middleware/project-ref.js.map +1 -0
- package/dist/openapi/generate.d.ts.map +1 -1
- package/dist/openapi/generate.js +4 -0
- package/dist/openapi/generate.js.map +1 -1
- package/dist/openapi/operations.d.ts +6 -0
- package/dist/openapi/operations.d.ts.map +1 -1
- package/dist/openapi/operations.js +524 -27
- package/dist/openapi/operations.js.map +1 -1
- package/dist/openapi/schemas.d.ts +43 -0
- package/dist/openapi/schemas.d.ts.map +1 -1
- package/dist/openapi/schemas.js +1050 -7
- package/dist/openapi/schemas.js.map +1 -1
- package/dist/publish-refused.d.ts +18 -0
- package/dist/publish-refused.d.ts.map +1 -0
- package/dist/publish-refused.js +22 -0
- package/dist/publish-refused.js.map +1 -0
- package/dist/registry-read-only.d.ts +32 -0
- package/dist/registry-read-only.d.ts.map +1 -0
- package/dist/registry-read-only.js +22 -0
- package/dist/registry-read-only.js.map +1 -0
- package/dist/retention-binding.d.ts +29 -0
- package/dist/retention-binding.d.ts.map +1 -1
- package/dist/routes/agent-releases.d.ts +40 -0
- package/dist/routes/agent-releases.d.ts.map +1 -0
- package/dist/routes/agent-releases.js +462 -0
- package/dist/routes/agent-releases.js.map +1 -0
- package/dist/routes/agents.d.ts +7 -1
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/agents.js +38 -4
- package/dist/routes/agents.js.map +1 -1
- package/dist/routes/approvals.d.ts.map +1 -1
- package/dist/routes/approvals.js +27 -9
- package/dist/routes/approvals.js.map +1 -1
- package/dist/routes/audit.d.ts.map +1 -1
- package/dist/routes/audit.js +7 -0
- package/dist/routes/audit.js.map +1 -1
- package/dist/routes/auth.js +1 -1
- package/dist/routes/auth.js.map +1 -1
- package/dist/routes/blocks.d.ts.map +1 -1
- package/dist/routes/blocks.js +37 -12
- package/dist/routes/blocks.js.map +1 -1
- package/dist/routes/conversations.d.ts +0 -7
- package/dist/routes/conversations.d.ts.map +1 -1
- package/dist/routes/conversations.js +19 -3
- package/dist/routes/conversations.js.map +1 -1
- package/dist/routes/deployments.d.ts +6 -0
- package/dist/routes/deployments.d.ts.map +1 -1
- package/dist/routes/deployments.js +49 -5
- package/dist/routes/deployments.js.map +1 -1
- package/dist/routes/env.d.ts.map +1 -1
- package/dist/routes/env.js +1 -0
- package/dist/routes/env.js.map +1 -1
- package/dist/routes/eval-comparison.d.ts +4 -2
- package/dist/routes/eval-comparison.d.ts.map +1 -1
- package/dist/routes/eval-comparison.js +59 -10
- package/dist/routes/eval-comparison.js.map +1 -1
- package/dist/routes/eval-runs.d.ts +7 -1
- package/dist/routes/eval-runs.d.ts.map +1 -1
- package/dist/routes/eval-runs.js +34 -3
- package/dist/routes/eval-runs.js.map +1 -1
- package/dist/routes/eval-versions.d.ts +25 -0
- package/dist/routes/eval-versions.d.ts.map +1 -0
- package/dist/routes/eval-versions.js +66 -0
- package/dist/routes/eval-versions.js.map +1 -0
- package/dist/routes/flows.d.ts +14 -7
- package/dist/routes/flows.d.ts.map +1 -1
- package/dist/routes/flows.js +14 -8
- package/dist/routes/flows.js.map +1 -1
- package/dist/routes/gate-policies.d.ts +19 -0
- package/dist/routes/gate-policies.d.ts.map +1 -0
- package/dist/routes/gate-policies.js +191 -0
- package/dist/routes/gate-policies.js.map +1 -0
- package/dist/routes/gate-policy-spec.d.ts +17 -0
- package/dist/routes/gate-policy-spec.d.ts.map +1 -0
- package/dist/routes/gate-policy-spec.js +192 -0
- package/dist/routes/gate-policy-spec.js.map +1 -0
- package/dist/routes/gate-policy-wire.d.ts +3 -0
- package/dist/routes/gate-policy-wire.d.ts.map +1 -0
- package/dist/routes/gate-policy-wire.js +18 -0
- package/dist/routes/gate-policy-wire.js.map +1 -0
- package/dist/routes/guardrails.d.ts.map +1 -1
- package/dist/routes/guardrails.js +4 -0
- package/dist/routes/guardrails.js.map +1 -1
- package/dist/routes/hierarchy-errors.d.ts +21 -0
- package/dist/routes/hierarchy-errors.d.ts.map +1 -1
- package/dist/routes/hierarchy-errors.js +21 -0
- package/dist/routes/hierarchy-errors.js.map +1 -1
- package/dist/routes/judged-suites.js +7 -0
- package/dist/routes/judged-suites.js.map +1 -1
- package/dist/routes/judgments.d.ts +4 -1
- package/dist/routes/judgments.d.ts.map +1 -1
- package/dist/routes/judgments.js +92 -19
- package/dist/routes/judgments.js.map +1 -1
- package/dist/routes/live-scope-wire.d.ts +32 -0
- package/dist/routes/live-scope-wire.d.ts.map +1 -0
- package/dist/routes/live-scope-wire.js +71 -0
- package/dist/routes/live-scope-wire.js.map +1 -0
- package/dist/routes/policies.d.ts +6 -3
- package/dist/routes/policies.d.ts.map +1 -1
- package/dist/routes/policies.js +55 -3
- package/dist/routes/policies.js.map +1 -1
- package/dist/routes/projects.d.ts.map +1 -1
- package/dist/routes/projects.js +59 -9
- package/dist/routes/projects.js.map +1 -1
- package/dist/routes/retention.d.ts.map +1 -1
- package/dist/routes/retention.js +18 -2
- package/dist/routes/retention.js.map +1 -1
- package/dist/routes/reviewers.d.ts +8 -1
- package/dist/routes/reviewers.d.ts.map +1 -1
- package/dist/routes/reviewers.js +20 -3
- package/dist/routes/reviewers.js.map +1 -1
- package/dist/routes/runs.d.ts.map +1 -1
- package/dist/routes/runs.js +23 -13
- package/dist/routes/runs.js.map +1 -1
- package/dist/routes/secrets.d.ts.map +1 -1
- package/dist/routes/secrets.js +2 -0
- package/dist/routes/secrets.js.map +1 -1
- package/dist/routes/segments.d.ts +17 -0
- package/dist/routes/segments.d.ts.map +1 -0
- package/dist/routes/segments.js +68 -0
- package/dist/routes/segments.js.map +1 -0
- package/dist/routes/teams.d.ts.map +1 -1
- package/dist/routes/teams.js +53 -8
- package/dist/routes/teams.js.map +1 -1
- package/dist/routes/tools.d.ts.map +1 -1
- package/dist/routes/tools.js +4 -0
- package/dist/routes/tools.js.map +1 -1
- package/dist/routes/uuid-param.d.ts +11 -0
- package/dist/routes/uuid-param.d.ts.map +1 -0
- package/dist/routes/uuid-param.js +19 -0
- package/dist/routes/uuid-param.js.map +1 -0
- package/dist/tool-binding.d.ts +8 -0
- package/dist/tool-binding.d.ts.map +1 -1
- package/openapi.json +6484 -2402
- package/package.json +21 -21
- package/src/agent-binding.ts +21 -2
- package/src/agent-pins.ts +3 -1
- package/src/app.ts +47 -4
- package/src/deploy-versions.ts +12 -15
- package/src/derive-agent-version.ts +12 -1
- package/src/errors.ts +26 -0
- package/src/eval-case-binding.ts +7 -0
- package/src/eval-run-binding.ts +31 -3
- package/src/eval-run-dispatcher.ts +3 -0
- package/src/flow-binding.ts +9 -0
- package/src/flow-pins.ts +49 -9
- package/src/gate-policy-binding.ts +171 -0
- package/src/gate.ts +467 -0
- package/src/guardrail-binding.ts +9 -0
- package/src/handler-binding.ts +17 -2
- package/src/index.ts +47 -1
- package/src/judged-dispatcher.ts +100 -9
- package/src/judgment-binding.ts +62 -0
- package/src/live-version-binding.ts +237 -0
- package/src/middleware/authorize.ts +18 -2
- package/src/middleware/project-ref.ts +88 -0
- package/src/openapi/generate.ts +5 -0
- package/src/openapi/operations.ts +664 -27
- package/src/openapi/schemas.ts +1175 -33
- package/src/publish-refused.ts +31 -0
- package/src/registry-read-only.ts +43 -0
- package/src/retention-binding.ts +30 -0
- package/src/routes/agent-releases.ts +581 -0
- package/src/routes/agents.ts +53 -3
- package/src/routes/approvals.ts +36 -8
- package/src/routes/audit.ts +10 -0
- package/src/routes/auth.ts +1 -1
- package/src/routes/blocks.ts +39 -14
- package/src/routes/conversations.ts +31 -3
- package/src/routes/deployments.ts +75 -5
- package/src/routes/env.ts +1 -0
- package/src/routes/eval-comparison.ts +59 -11
- package/src/routes/eval-runs.ts +46 -3
- package/src/routes/eval-versions.ts +110 -0
- package/src/routes/flows.ts +34 -11
- package/src/routes/gate-policies.ts +226 -0
- package/src/routes/gate-policy-spec.ts +229 -0
- package/src/routes/gate-policy-wire.ts +20 -0
- package/src/routes/guardrails.ts +7 -0
- package/src/routes/hierarchy-errors.ts +23 -0
- package/src/routes/judged-suites.ts +5 -0
- package/src/routes/judgments.ts +107 -23
- package/src/routes/live-scope-wire.ts +90 -0
- package/src/routes/policies.ts +61 -3
- package/src/routes/projects.ts +72 -9
- package/src/routes/retention.ts +21 -2
- package/src/routes/reviewers.ts +23 -4
- package/src/routes/runs.ts +34 -20
- package/src/routes/secrets.ts +2 -0
- package/src/routes/segments.ts +75 -0
- package/src/routes/teams.ts +66 -8
- package/src/routes/tools.ts +7 -0
- package/src/routes/uuid-param.ts +28 -0
- package/src/tool-binding.ts +9 -0
package/src/openapi/schemas.ts
CHANGED
|
@@ -64,7 +64,14 @@
|
|
|
64
64
|
*/
|
|
65
65
|
|
|
66
66
|
import { EVIDENCE_KINDS } from '@kindgi/compliance';
|
|
67
|
-
import {
|
|
67
|
+
import {
|
|
68
|
+
MAX_TOOL_ERROR_RETRIES,
|
|
69
|
+
POLICY_KINDS,
|
|
70
|
+
RETENTION_DOMAINS,
|
|
71
|
+
TOOL_ERROR_KINDS,
|
|
72
|
+
} from '@kindgi/policy-contract';
|
|
73
|
+
|
|
74
|
+
import { ERROR_CODE_TO_STATUS } from '../errors.js';
|
|
68
75
|
|
|
69
76
|
export type JsonSchema = Record<string, unknown>;
|
|
70
77
|
|
|
@@ -74,6 +81,11 @@ export const WireErrorSchema: JsonSchema = {
|
|
|
74
81
|
type: 'object',
|
|
75
82
|
additionalProperties: false,
|
|
76
83
|
required: ['error'],
|
|
84
|
+
// Every code the API answers with, and its HTTP status. Not a closed
|
|
85
|
+
// list for clients (a newer server may add codes); the clients' tests
|
|
86
|
+
// read it to check that each 4xx code maps to a typed error, not to a
|
|
87
|
+
// server error. Generators and validators ignore `x-` keys.
|
|
88
|
+
'x-error-codes': ERROR_CODE_TO_STATUS,
|
|
77
89
|
properties: {
|
|
78
90
|
error: {
|
|
79
91
|
type: 'object',
|
|
@@ -142,6 +154,430 @@ export const RunAgentSchema: JsonSchema = {
|
|
|
142
154
|
id: { type: 'string', description: 'The agent id.' },
|
|
143
155
|
version: { type: 'string', description: 'The agent version that ran (semver).' },
|
|
144
156
|
conversationId: { type: 'string', format: 'uuid' },
|
|
157
|
+
via: {
|
|
158
|
+
type: 'string',
|
|
159
|
+
enum: ['explicit', 'flow-pin', 'conversation', 'live', 'latest'],
|
|
160
|
+
description:
|
|
161
|
+
"Why this version ran: named by the caller (`explicit`); held by the flow version a flow's agent step runs in (`flow-pin`: the node's `config.version`, else the version the flow version pinned when it was published); the conversation's own (`conversation`); the version live for the run's scope (`live`); or the latest, nothing being live (`latest`). Absent on runs from before Kindgi 0.1.4.",
|
|
162
|
+
},
|
|
163
|
+
liveScope: {
|
|
164
|
+
$ref: '#/components/schemas/LiveScope',
|
|
165
|
+
description: 'The pin that chose the version, when `via` is `live`.',
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
export const ScopeSegmentSchema: JsonSchema = {
|
|
171
|
+
type: 'object',
|
|
172
|
+
additionalProperties: false,
|
|
173
|
+
required: ['key', 'value'],
|
|
174
|
+
properties: {
|
|
175
|
+
key: {
|
|
176
|
+
type: 'string',
|
|
177
|
+
pattern: '^[a-z][a-z0-9_-]{0,63}$',
|
|
178
|
+
description: 'Lowercase, like an identifier: `company`, `contact-role`.',
|
|
179
|
+
},
|
|
180
|
+
value: { type: 'string', minLength: 1, maxLength: 256 },
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
const liveScopeVariant = (
|
|
185
|
+
kind: string,
|
|
186
|
+
description: string,
|
|
187
|
+
properties: Record<string, JsonSchema>,
|
|
188
|
+
): JsonSchema => ({
|
|
189
|
+
type: 'object',
|
|
190
|
+
additionalProperties: false,
|
|
191
|
+
required: ['kind', ...Object.keys(properties)],
|
|
192
|
+
description,
|
|
193
|
+
properties: { kind: { type: 'string', enum: [kind] }, ...properties },
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
export const LiveScopeTenantSchema = liveScopeVariant(
|
|
197
|
+
'tenant',
|
|
198
|
+
"The agent's default for the whole tenant.",
|
|
199
|
+
{},
|
|
200
|
+
);
|
|
201
|
+
export const LiveScopeOrgSchema = liveScopeVariant('org', "An org's projects.", {
|
|
202
|
+
orgId: { type: 'string', format: 'uuid' },
|
|
203
|
+
});
|
|
204
|
+
export const LiveScopeProjectSchema = liveScopeVariant('project', 'One project.', {
|
|
205
|
+
projectId: { type: 'string', format: 'uuid' },
|
|
206
|
+
});
|
|
207
|
+
export const LiveScopeSegmentSchema = liveScopeVariant(
|
|
208
|
+
'segment',
|
|
209
|
+
'A segment path within a project: it covers every run whose path starts with it.',
|
|
210
|
+
{
|
|
211
|
+
projectId: { type: 'string', format: 'uuid' },
|
|
212
|
+
path: {
|
|
213
|
+
type: 'array',
|
|
214
|
+
minItems: 1,
|
|
215
|
+
maxItems: 8,
|
|
216
|
+
items: { $ref: '#/components/schemas/ScopeSegment' },
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
);
|
|
220
|
+
|
|
221
|
+
export const LiveScopeSchema: JsonSchema = {
|
|
222
|
+
description:
|
|
223
|
+
'Where a live version is pinned, from least to most specific: tenant, org, project, segment path. A run takes the most specific pin that covers it.',
|
|
224
|
+
oneOf: [
|
|
225
|
+
{ $ref: '#/components/schemas/LiveScopeTenant' },
|
|
226
|
+
{ $ref: '#/components/schemas/LiveScopeOrg' },
|
|
227
|
+
{ $ref: '#/components/schemas/LiveScopeProject' },
|
|
228
|
+
{ $ref: '#/components/schemas/LiveScopeSegment' },
|
|
229
|
+
],
|
|
230
|
+
discriminator: { propertyName: 'kind' },
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
export const LiveVersionResolutionSchema: JsonSchema = {
|
|
234
|
+
type: 'object',
|
|
235
|
+
additionalProperties: false,
|
|
236
|
+
required: ['agentId', 'version', 'via'],
|
|
237
|
+
properties: {
|
|
238
|
+
agentId: { type: 'string' },
|
|
239
|
+
version: { type: 'string', description: 'The version a run would use (semver).' },
|
|
240
|
+
via: {
|
|
241
|
+
type: 'string',
|
|
242
|
+
enum: ['live', 'latest'],
|
|
243
|
+
description: 'A live pin chose it, or nothing is live on the way up and it is the latest.',
|
|
244
|
+
},
|
|
245
|
+
liveScope: { $ref: '#/components/schemas/LiveScope' },
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
export const LivePinSchema: JsonSchema = {
|
|
250
|
+
type: 'object',
|
|
251
|
+
additionalProperties: false,
|
|
252
|
+
required: ['agentId', 'scope', 'version', 'promotionId', 'setAt'],
|
|
253
|
+
properties: {
|
|
254
|
+
agentId: { type: 'string' },
|
|
255
|
+
scope: { $ref: '#/components/schemas/LiveScope' },
|
|
256
|
+
version: { type: 'string' },
|
|
257
|
+
promotionId: { type: 'string', format: 'uuid', description: 'The promotion that set it.' },
|
|
258
|
+
setAt: { type: 'string', format: 'date-time' },
|
|
259
|
+
},
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
export const LivePinListSchema: JsonSchema = {
|
|
263
|
+
type: 'object',
|
|
264
|
+
additionalProperties: false,
|
|
265
|
+
required: ['data'],
|
|
266
|
+
properties: { data: { type: 'array', items: { $ref: '#/components/schemas/LivePin' } } },
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
export const PromotionSchema: JsonSchema = {
|
|
270
|
+
type: 'object',
|
|
271
|
+
additionalProperties: false,
|
|
272
|
+
required: [
|
|
273
|
+
'id',
|
|
274
|
+
'agentId',
|
|
275
|
+
'scope',
|
|
276
|
+
'action',
|
|
277
|
+
'fromVersion',
|
|
278
|
+
'toVersion',
|
|
279
|
+
'requestedBy',
|
|
280
|
+
'createdAt',
|
|
281
|
+
],
|
|
282
|
+
description:
|
|
283
|
+
"One change of a scope's live version, kept for good: what was live before, what is after, who asked and why.",
|
|
284
|
+
properties: {
|
|
285
|
+
id: { type: 'string', format: 'uuid' },
|
|
286
|
+
agentId: { type: 'string' },
|
|
287
|
+
scope: { $ref: '#/components/schemas/LiveScope' },
|
|
288
|
+
action: { type: 'string', enum: ['promote', 'rollback', 'unpin'] },
|
|
289
|
+
fromVersion: {
|
|
290
|
+
type: ['string', 'null'],
|
|
291
|
+
description: "The scope's own pin before; null when it had none.",
|
|
292
|
+
},
|
|
293
|
+
toVersion: {
|
|
294
|
+
type: ['string', 'null'],
|
|
295
|
+
description: "The scope's own pin after; null after an unpin.",
|
|
296
|
+
},
|
|
297
|
+
requestedBy: {
|
|
298
|
+
type: 'object',
|
|
299
|
+
additionalProperties: false,
|
|
300
|
+
required: ['kind', 'id'],
|
|
301
|
+
properties: {
|
|
302
|
+
kind: { type: 'string', enum: ['user', 'service'] },
|
|
303
|
+
id: { type: 'string' },
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
reason: { type: 'string' },
|
|
307
|
+
evalRunId: { type: 'string', description: 'The comparison the change was judged on.' },
|
|
308
|
+
createdAt: { type: 'string', format: 'date-time' },
|
|
309
|
+
status: {
|
|
310
|
+
type: 'string',
|
|
311
|
+
enum: ['promoted', 'pending-approval', 'refused', 'superseded', 'rejected', 'expired'],
|
|
312
|
+
description:
|
|
313
|
+
"A `promote` row's state: it changes once, from `pending-approval` to its final state. Absent on rollback and unpin rows, and on promotions made before gates (`promoted`).",
|
|
314
|
+
},
|
|
315
|
+
policy: {
|
|
316
|
+
oneOf: [{ $ref: '#/components/schemas/GatePolicyRef' }, { type: 'null' }],
|
|
317
|
+
description: 'The gate policy that applied; null when none did. Absent before gates.',
|
|
318
|
+
},
|
|
319
|
+
checks: { type: 'array', items: { $ref: '#/components/schemas/GateCheck' } },
|
|
320
|
+
approvalId: {
|
|
321
|
+
type: 'string',
|
|
322
|
+
description: 'The approval a `pending-approval` promotion waits on (kept once decided).',
|
|
323
|
+
},
|
|
324
|
+
resolvedAt: {
|
|
325
|
+
type: 'string',
|
|
326
|
+
format: 'date-time',
|
|
327
|
+
description: 'When a `pending-approval` promotion reached its final state.',
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
export const PromotionPageSchema: JsonSchema = {
|
|
333
|
+
type: 'object',
|
|
334
|
+
additionalProperties: false,
|
|
335
|
+
required: ['data', 'hasMore'],
|
|
336
|
+
properties: {
|
|
337
|
+
data: { type: 'array', items: { $ref: '#/components/schemas/Promotion' } },
|
|
338
|
+
hasMore: { type: 'boolean' },
|
|
339
|
+
nextCursor: { type: 'string' },
|
|
340
|
+
},
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
// ---------------- the promotion gate (evals step 4b) ----------------
|
|
344
|
+
|
|
345
|
+
export const GateCheckSchema: JsonSchema = {
|
|
346
|
+
type: 'object',
|
|
347
|
+
additionalProperties: false,
|
|
348
|
+
required: ['name', 'passed', 'message'],
|
|
349
|
+
description: "One of a gate's checks, as the promotion records it.",
|
|
350
|
+
properties: {
|
|
351
|
+
name: {
|
|
352
|
+
type: 'string',
|
|
353
|
+
description:
|
|
354
|
+
'Stable: `comparison.required`, `comparison.status`, `comparison.freshness`, `comparison.suite`, `sameContents`, `baselineIsLive`, `scopeCovered`, `evidence.<metric>.minCases|minWeight|baselineMinCases|baselineMinWeight`, `metric.<metric>.k|minCandidate|maxDrop`, `replay.maxDiverged|maxErrors|maxRefusedWrites|maxStopped`, `classWeights.restrictedOnly`.',
|
|
355
|
+
},
|
|
356
|
+
passed: { type: 'boolean' },
|
|
357
|
+
message: {
|
|
358
|
+
type: 'string',
|
|
359
|
+
description: 'A plain sentence: what was found against what the policy asks.',
|
|
360
|
+
},
|
|
361
|
+
value: { type: ['number', 'string'] },
|
|
362
|
+
threshold: { type: ['number', 'string'] },
|
|
363
|
+
},
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
export const GatePolicyRefSchema: JsonSchema = {
|
|
367
|
+
type: 'object',
|
|
368
|
+
additionalProperties: false,
|
|
369
|
+
required: ['id', 'version'],
|
|
370
|
+
properties: { id: { type: 'string' }, version: { type: 'string' } },
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
export const GateApprovalSchema: JsonSchema = {
|
|
374
|
+
type: 'object',
|
|
375
|
+
additionalProperties: false,
|
|
376
|
+
required: ['role', 'count', 'separateApprover'],
|
|
377
|
+
description: 'The approval a passing promotion waits for.',
|
|
378
|
+
properties: {
|
|
379
|
+
role: { type: 'string', enum: ['standard', 'senior', 'admin'] },
|
|
380
|
+
count: { type: 'integer', minimum: 1 },
|
|
381
|
+
separateApprover: {
|
|
382
|
+
type: 'boolean',
|
|
383
|
+
description: 'Whoever asked for the promotion may not approve it.',
|
|
384
|
+
},
|
|
385
|
+
},
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
const GateMetricSpecSchema: JsonSchema = {
|
|
389
|
+
type: 'object',
|
|
390
|
+
additionalProperties: false,
|
|
391
|
+
required: ['name'],
|
|
392
|
+
properties: {
|
|
393
|
+
name: { type: 'string', enum: ['weightedYesShare', 'judgedCoverage', 'weightedPrecisionAtK'] },
|
|
394
|
+
k: {
|
|
395
|
+
type: 'integer',
|
|
396
|
+
minimum: 1,
|
|
397
|
+
maximum: 100,
|
|
398
|
+
description: "`weightedPrecisionAtK` only: the summary's `k` must be this.",
|
|
399
|
+
},
|
|
400
|
+
minCandidate: { type: 'number', minimum: 0, maximum: 1 },
|
|
401
|
+
maxDrop: {
|
|
402
|
+
type: 'number',
|
|
403
|
+
minimum: 0,
|
|
404
|
+
maximum: 1,
|
|
405
|
+
description: 'How far the candidate may fall below the baseline (the live version).',
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
export const GatePolicySpecSchema: JsonSchema = {
|
|
411
|
+
type: 'object',
|
|
412
|
+
additionalProperties: false,
|
|
413
|
+
description:
|
|
414
|
+
'What a promotion must show. Every part is optional; an empty spec checks nothing. A promotion must name a comparison (`evalRunId`) exactly when the spec has `comparison`, `evidence`, `metrics`, `replay` or `onlyRestrictedClasses`. Unknown keys are refused.',
|
|
415
|
+
properties: {
|
|
416
|
+
comparison: {
|
|
417
|
+
type: 'object',
|
|
418
|
+
additionalProperties: false,
|
|
419
|
+
properties: {
|
|
420
|
+
maxAgeHours: { type: 'number', exclusiveMinimum: 0 },
|
|
421
|
+
suite: {
|
|
422
|
+
type: 'object',
|
|
423
|
+
additionalProperties: false,
|
|
424
|
+
required: ['id'],
|
|
425
|
+
properties: { id: { type: 'string' }, version: { type: 'string' } },
|
|
426
|
+
},
|
|
427
|
+
},
|
|
428
|
+
},
|
|
429
|
+
evidence: {
|
|
430
|
+
type: 'object',
|
|
431
|
+
additionalProperties: false,
|
|
432
|
+
description:
|
|
433
|
+
"The judged evidence behind each gated metric; for a metric with `maxDrop`, the baseline's too.",
|
|
434
|
+
properties: {
|
|
435
|
+
minCases: { type: 'integer', minimum: 0 },
|
|
436
|
+
minWeight: { type: 'number', minimum: 0 },
|
|
437
|
+
},
|
|
438
|
+
},
|
|
439
|
+
metrics: { type: 'array', items: GateMetricSpecSchema },
|
|
440
|
+
replay: {
|
|
441
|
+
type: 'object',
|
|
442
|
+
additionalProperties: false,
|
|
443
|
+
description: 'Each knob left out of the block is 0. No block: no replay checks.',
|
|
444
|
+
properties: {
|
|
445
|
+
maxDiverged: { type: 'integer', minimum: 0 },
|
|
446
|
+
maxErrors: { type: 'integer', minimum: 0 },
|
|
447
|
+
maxRefusedWrites: { type: 'integer', minimum: 0 },
|
|
448
|
+
maxStopped: { type: 'integer', minimum: 0 },
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
approvals: {
|
|
452
|
+
type: 'object',
|
|
453
|
+
additionalProperties: false,
|
|
454
|
+
description: 'A passing promotion waits for a reviewer.',
|
|
455
|
+
properties: {
|
|
456
|
+
role: {
|
|
457
|
+
type: 'string',
|
|
458
|
+
enum: ['standard', 'senior', 'admin'],
|
|
459
|
+
description: 'Default `senior`.',
|
|
460
|
+
},
|
|
461
|
+
separateApprover: { type: 'boolean', description: 'Default `true`.' },
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
onlyRestrictedClasses: {
|
|
465
|
+
type: 'boolean',
|
|
466
|
+
description:
|
|
467
|
+
"Only restricted judge classes count: the comparison must be weighted `restricted-only`, so a class anyone may assert can't move the gate.",
|
|
468
|
+
},
|
|
469
|
+
},
|
|
470
|
+
};
|
|
471
|
+
|
|
472
|
+
export const GatePolicySchema: JsonSchema = {
|
|
473
|
+
type: 'object',
|
|
474
|
+
additionalProperties: false,
|
|
475
|
+
required: ['id', 'version', 'agentId', 'scope', 'spec', 'createdAt'],
|
|
476
|
+
properties: {
|
|
477
|
+
id: { type: 'string' },
|
|
478
|
+
version: { type: 'string' },
|
|
479
|
+
agentId: { type: 'string' },
|
|
480
|
+
scope: { $ref: '#/components/schemas/LiveScope' },
|
|
481
|
+
spec: { $ref: '#/components/schemas/GatePolicySpec' },
|
|
482
|
+
description: { type: 'string' },
|
|
483
|
+
createdAt: { type: 'string', format: 'date-time' },
|
|
484
|
+
unregisteredAt: { type: 'string', format: 'date-time' },
|
|
485
|
+
},
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
export const GatePolicyPageSchema: JsonSchema = {
|
|
489
|
+
type: 'object',
|
|
490
|
+
additionalProperties: false,
|
|
491
|
+
required: ['data', 'hasMore'],
|
|
492
|
+
properties: {
|
|
493
|
+
data: { type: 'array', items: { $ref: '#/components/schemas/GatePolicy' } },
|
|
494
|
+
hasMore: { type: 'boolean' },
|
|
495
|
+
nextCursor: { type: 'string' },
|
|
496
|
+
},
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
export const PublishGatePolicyBodySchema: JsonSchema = {
|
|
500
|
+
type: 'object',
|
|
501
|
+
additionalProperties: false,
|
|
502
|
+
required: ['id', 'version', 'agentId', 'scope', 'spec'],
|
|
503
|
+
properties: {
|
|
504
|
+
id: {
|
|
505
|
+
type: 'string',
|
|
506
|
+
pattern: '^[a-z0-9][a-z0-9._-]{0,127}$',
|
|
507
|
+
description: 'Yours to choose, e.g. `acme.drafting-prod`.',
|
|
508
|
+
},
|
|
509
|
+
version: { type: 'string', pattern: '^\\d+\\.\\d+\\.\\d+$' },
|
|
510
|
+
agentId: { type: 'string' },
|
|
511
|
+
scope: { $ref: '#/components/schemas/LiveScope' },
|
|
512
|
+
spec: { $ref: '#/components/schemas/GatePolicySpec' },
|
|
513
|
+
description: { type: 'string' },
|
|
514
|
+
},
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
export const GatePolicyResolutionSchema: JsonSchema = {
|
|
518
|
+
type: 'object',
|
|
519
|
+
additionalProperties: false,
|
|
520
|
+
required: ['policy'],
|
|
521
|
+
properties: {
|
|
522
|
+
policy: {
|
|
523
|
+
oneOf: [{ $ref: '#/components/schemas/GatePolicy' }, { type: 'null' }],
|
|
524
|
+
description: 'The policy that gates a promotion for the scope; null when none does.',
|
|
525
|
+
},
|
|
526
|
+
},
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
export const PromotionCheckSchema: JsonSchema = {
|
|
530
|
+
type: 'object',
|
|
531
|
+
additionalProperties: false,
|
|
532
|
+
required: ['outcome', 'policy', 'checks'],
|
|
533
|
+
description: 'What the gate would say about a promotion. Nothing is recorded.',
|
|
534
|
+
properties: {
|
|
535
|
+
outcome: { type: 'string', enum: ['would-promote', 'needs-approval', 'gate-failed'] },
|
|
536
|
+
policy: {
|
|
537
|
+
oneOf: [{ $ref: '#/components/schemas/GatePolicyRef' }, { type: 'null' }],
|
|
538
|
+
description: 'The policy that applies; null when none does.',
|
|
539
|
+
},
|
|
540
|
+
checks: { type: 'array', items: { $ref: '#/components/schemas/GateCheck' } },
|
|
541
|
+
approval: { $ref: '#/components/schemas/GateApproval' },
|
|
542
|
+
},
|
|
543
|
+
};
|
|
544
|
+
|
|
545
|
+
export const PromoteBodySchema: JsonSchema = {
|
|
546
|
+
type: 'object',
|
|
547
|
+
additionalProperties: false,
|
|
548
|
+
required: ['version', 'scope'],
|
|
549
|
+
properties: {
|
|
550
|
+
version: {
|
|
551
|
+
type: 'string',
|
|
552
|
+
description: 'The agent version to make live (registered, active).',
|
|
553
|
+
},
|
|
554
|
+
scope: { $ref: '#/components/schemas/LiveScope' },
|
|
555
|
+
reason: { type: 'string', maxLength: 2000 },
|
|
556
|
+
evalRunId: { type: 'string', description: 'The comparison this promotion was judged on.' },
|
|
557
|
+
},
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
export const RollbackBodySchema: JsonSchema = {
|
|
561
|
+
type: 'object',
|
|
562
|
+
additionalProperties: false,
|
|
563
|
+
required: ['scope'],
|
|
564
|
+
properties: {
|
|
565
|
+
scope: { $ref: '#/components/schemas/LiveScope' },
|
|
566
|
+
toVersion: {
|
|
567
|
+
type: 'string',
|
|
568
|
+
description: "An earlier version to go back to; omit → the scope's previous live version.",
|
|
569
|
+
},
|
|
570
|
+
reason: { type: 'string', maxLength: 2000 },
|
|
571
|
+
},
|
|
572
|
+
};
|
|
573
|
+
|
|
574
|
+
export const UnpinBodySchema: JsonSchema = {
|
|
575
|
+
type: 'object',
|
|
576
|
+
additionalProperties: false,
|
|
577
|
+
required: ['scope'],
|
|
578
|
+
properties: {
|
|
579
|
+
scope: { $ref: '#/components/schemas/LiveScope' },
|
|
580
|
+
reason: { type: 'string', maxLength: 2000 },
|
|
145
581
|
},
|
|
146
582
|
};
|
|
147
583
|
|
|
@@ -194,6 +630,13 @@ export const RunSchema: JsonSchema = {
|
|
|
194
630
|
type: 'string',
|
|
195
631
|
description: 'Set on a replay run: the eval run that started it.',
|
|
196
632
|
},
|
|
633
|
+
versions: { $ref: '#/components/schemas/FlowVersionOverrides' },
|
|
634
|
+
segments: {
|
|
635
|
+
type: 'array',
|
|
636
|
+
items: { $ref: '#/components/schemas/ScopeSegment' },
|
|
637
|
+
description:
|
|
638
|
+
"The segment path the run was started with (coarse to fine), which picks live agent versions. A child run has its parent's. Absent when there was none.",
|
|
639
|
+
},
|
|
197
640
|
publicAccessToken: {
|
|
198
641
|
type: 'string',
|
|
199
642
|
description:
|
|
@@ -252,12 +695,23 @@ export const StartRunBodySchema: JsonSchema = {
|
|
|
252
695
|
required: ['agent', 'input'],
|
|
253
696
|
properties: {
|
|
254
697
|
agent: { type: 'string', description: 'AgentId.' },
|
|
255
|
-
agentVersion: {
|
|
698
|
+
agentVersion: {
|
|
699
|
+
type: 'string',
|
|
700
|
+
description:
|
|
701
|
+
"Semver. Omit → the conversation's own version for a follow-up turn, else the version live for the run's scope, else the latest.",
|
|
702
|
+
},
|
|
256
703
|
projectId: {
|
|
257
704
|
type: 'string',
|
|
258
705
|
format: 'uuid',
|
|
259
706
|
description: "Project to run under; omit → the tenant's Default project.",
|
|
260
707
|
},
|
|
708
|
+
segments: {
|
|
709
|
+
type: 'array',
|
|
710
|
+
maxItems: 8,
|
|
711
|
+
items: { $ref: '#/components/schemas/ScopeSegment' },
|
|
712
|
+
description:
|
|
713
|
+
"The run's segment path below its project, coarse to fine (an app-defined finer scope, e.g. company then role). A version live on a prefix of it serves the run.",
|
|
714
|
+
},
|
|
261
715
|
input: {
|
|
262
716
|
description: 'Opaque payload forwarded to the agent binding.',
|
|
263
717
|
},
|
|
@@ -276,6 +730,13 @@ export const StartRunBodySchema: JsonSchema = {
|
|
|
276
730
|
format: 'uuid',
|
|
277
731
|
description: "Project to run under; omit → the tenant's Default project.",
|
|
278
732
|
},
|
|
733
|
+
segments: {
|
|
734
|
+
type: 'array',
|
|
735
|
+
maxItems: 8,
|
|
736
|
+
items: { $ref: '#/components/schemas/ScopeSegment' },
|
|
737
|
+
description:
|
|
738
|
+
"The run's segment path below its project, coarse to fine (an app-defined finer scope, e.g. company then role). A version live on a prefix of it serves the run.",
|
|
739
|
+
},
|
|
279
740
|
input: {
|
|
280
741
|
description: 'Opaque payload forwarded to the flow runtime.',
|
|
281
742
|
},
|
|
@@ -794,6 +1255,28 @@ export const CompleteApprovalResultSchema: JsonSchema = {
|
|
|
794
1255
|
description:
|
|
795
1256
|
'True when the approval had a `waitTokenId` + terminal accept/reject and the run waitpoint was completed as part of this call.',
|
|
796
1257
|
},
|
|
1258
|
+
resume: {
|
|
1259
|
+
description:
|
|
1260
|
+
"How the run went on, when this call resumed it (the runtime resumes inline): `ok`, or `failed` with the run's error, e.g. `tool-version-unresolvable` when a tool version the turn started with is gone. The decision stands either way.",
|
|
1261
|
+
oneOf: [
|
|
1262
|
+
{
|
|
1263
|
+
type: 'object',
|
|
1264
|
+
additionalProperties: false,
|
|
1265
|
+
required: ['kind'],
|
|
1266
|
+
properties: { kind: { type: 'string', const: 'ok' } },
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
type: 'object',
|
|
1270
|
+
additionalProperties: false,
|
|
1271
|
+
required: ['kind', 'code', 'message'],
|
|
1272
|
+
properties: {
|
|
1273
|
+
kind: { type: 'string', const: 'failed' },
|
|
1274
|
+
code: { type: 'string' },
|
|
1275
|
+
message: { type: 'string' },
|
|
1276
|
+
},
|
|
1277
|
+
},
|
|
1278
|
+
],
|
|
1279
|
+
},
|
|
797
1280
|
},
|
|
798
1281
|
};
|
|
799
1282
|
|
|
@@ -1287,6 +1770,21 @@ export const FlowPinsSchema: JsonSchema = {
|
|
|
1287
1770
|
},
|
|
1288
1771
|
};
|
|
1289
1772
|
|
|
1773
|
+
export const FlowVersionOverridesSchema: JsonSchema = {
|
|
1774
|
+
description:
|
|
1775
|
+
"Agents and tools a flow runs at other exact versions than the flow version's pins (\"this flow, with `acme.scorer` at 0.4.0\"), without publishing a new flow version: a comparison's flow candidate (`versions` on the start body and the run's `comparison`), and the flow runs that replay it (a run's `versions`). Each id must be an agent or tool the flow uses.",
|
|
1776
|
+
type: 'object',
|
|
1777
|
+
additionalProperties: false,
|
|
1778
|
+
properties: {
|
|
1779
|
+
tools: { ...PinMapSchema, description: 'Tool id → exact version.' },
|
|
1780
|
+
agents: {
|
|
1781
|
+
...PinMapSchema,
|
|
1782
|
+
description:
|
|
1783
|
+
'Agent id → exact version, for agent nodes with or without a version of their own.',
|
|
1784
|
+
},
|
|
1785
|
+
},
|
|
1786
|
+
};
|
|
1787
|
+
|
|
1290
1788
|
export const PublishFlowBodySchema: JsonSchema = {
|
|
1291
1789
|
description:
|
|
1292
1790
|
'Full flow definition. Validated server-side via `@kindgi/flow.loadFlow` — validation failures return `400 validation-failed` with the issue list under `details.issues`.',
|
|
@@ -2086,6 +2584,34 @@ export const JudgeClassScopeSchema: JsonSchema = {
|
|
|
2086
2584
|
],
|
|
2087
2585
|
};
|
|
2088
2586
|
|
|
2587
|
+
export const JudgeClassAssertableBySchema: JsonSchema = {
|
|
2588
|
+
type: 'object',
|
|
2589
|
+
additionalProperties: false,
|
|
2590
|
+
minProperties: 1,
|
|
2591
|
+
description:
|
|
2592
|
+
'Who may assert the class: every part that is set must hold. A class with one is restricted: a judgment recorded while it is carries `restricted`, and a comparison weighted `restricted-only` counts only those.',
|
|
2593
|
+
properties: {
|
|
2594
|
+
minReviewerRole: {
|
|
2595
|
+
type: 'string',
|
|
2596
|
+
enum: ['standard', 'senior', 'admin'],
|
|
2597
|
+
description: "The caller's reviewer role is at least this (its token's, or the roster's).",
|
|
2598
|
+
},
|
|
2599
|
+
principalKinds: {
|
|
2600
|
+
type: 'array',
|
|
2601
|
+
minItems: 1,
|
|
2602
|
+
items: { type: 'string', enum: ['user', 'service'] },
|
|
2603
|
+
description: 'Users, service tokens, or both.',
|
|
2604
|
+
},
|
|
2605
|
+
principalIds: {
|
|
2606
|
+
type: 'array',
|
|
2607
|
+
minItems: 1,
|
|
2608
|
+
maxItems: 100,
|
|
2609
|
+
items: { type: 'string', minLength: 1 },
|
|
2610
|
+
description: 'Only these principals: user ids, or service token ids.',
|
|
2611
|
+
},
|
|
2612
|
+
},
|
|
2613
|
+
};
|
|
2614
|
+
|
|
2089
2615
|
export const JudgeClassSchema: JsonSchema = {
|
|
2090
2616
|
type: 'object',
|
|
2091
2617
|
additionalProperties: false,
|
|
@@ -2104,6 +2630,7 @@ export const JudgeClassSchema: JsonSchema = {
|
|
|
2104
2630
|
description: 'How much a judgment of this class counts, relative to the others.',
|
|
2105
2631
|
},
|
|
2106
2632
|
description: { type: 'string' },
|
|
2633
|
+
assertableBy: { $ref: '#/components/schemas/JudgeClassAssertableBy' },
|
|
2107
2634
|
createdAt: { type: 'string', format: 'date-time' },
|
|
2108
2635
|
updatedAt: { type: 'string', format: 'date-time' },
|
|
2109
2636
|
unregisteredAt: {
|
|
@@ -2134,6 +2661,7 @@ export const CreateJudgeClassBodySchema: JsonSchema = {
|
|
|
2134
2661
|
name: { type: 'string', minLength: 1, maxLength: 100 },
|
|
2135
2662
|
weight: { type: 'number', minimum: 0 },
|
|
2136
2663
|
description: { type: 'string' },
|
|
2664
|
+
assertableBy: { $ref: '#/components/schemas/JudgeClassAssertableBy' },
|
|
2137
2665
|
},
|
|
2138
2666
|
};
|
|
2139
2667
|
|
|
@@ -2144,6 +2672,10 @@ export const UpdateJudgeClassBodySchema: JsonSchema = {
|
|
|
2144
2672
|
properties: {
|
|
2145
2673
|
weight: { type: 'number', minimum: 0 },
|
|
2146
2674
|
description: { type: 'string' },
|
|
2675
|
+
assertableBy: {
|
|
2676
|
+
oneOf: [{ $ref: '#/components/schemas/JudgeClassAssertableBy' }, { type: 'null' }],
|
|
2677
|
+
description: 'Who may assert the class; `null` lifts the restriction.',
|
|
2678
|
+
},
|
|
2147
2679
|
},
|
|
2148
2680
|
};
|
|
2149
2681
|
|
|
@@ -2231,6 +2763,12 @@ export const JudgmentSchema: JsonSchema = {
|
|
|
2231
2763
|
description:
|
|
2232
2764
|
'The judge class the judgment is recorded under. Absent when unclassified (counts with weight 1).',
|
|
2233
2765
|
},
|
|
2766
|
+
restricted: {
|
|
2767
|
+
type: 'boolean',
|
|
2768
|
+
enum: [true],
|
|
2769
|
+
description:
|
|
2770
|
+
"Present (true) when the judge class was restricted (`assertableBy`) when the judgment was recorded, so the judge was checked against it. A restriction added or lifted later doesn't change it.",
|
|
2771
|
+
},
|
|
2234
2772
|
assertedBy: { $ref: '#/components/schemas/JudgmentAssertedBy' },
|
|
2235
2773
|
participantId: {
|
|
2236
2774
|
type: 'string',
|
|
@@ -2421,6 +2959,14 @@ export const JudgedItemSummarySchema: JsonSchema = {
|
|
|
2421
2959
|
description: 'The weight behind "yes" (an unclassified judgment counts 1).',
|
|
2422
2960
|
},
|
|
2423
2961
|
totalWeight: { type: 'number', description: 'The weight behind all judgments of the item.' },
|
|
2962
|
+
restricted: {
|
|
2963
|
+
type: 'object',
|
|
2964
|
+
additionalProperties: false,
|
|
2965
|
+
required: ['yesWeight', 'totalWeight'],
|
|
2966
|
+
description:
|
|
2967
|
+
'The same weights, counting only judgments recorded while their class was restricted (`Judgment.restricted`), for a comparison weighted `restricted-only`. Absent from a test set built before restrictions.',
|
|
2968
|
+
properties: { yesWeight: { type: 'number' }, totalWeight: { type: 'number' } },
|
|
2969
|
+
},
|
|
2424
2970
|
reasons: {
|
|
2425
2971
|
type: 'array',
|
|
2426
2972
|
description: 'The reasons given, newest first.',
|
|
@@ -4342,7 +4888,7 @@ export const PolicySchema: JsonSchema = {
|
|
|
4342
4888
|
type: 'object',
|
|
4343
4889
|
additionalProperties: true,
|
|
4344
4890
|
description:
|
|
4345
|
-
"Kind-specific policy body. For `access-control`, matches `@kindgi/specs/policy.schema.json` (rules + defaults). For `model-routing`, matches `TenantPolicy` from `@kindgi/capabilities` (providers.allow / providers.deny / models.allow / models.deny / regionAllow / maxCostPerCallUsd / maxTokensPerCall). For `tool-errors`, `ToolErrorsSpec` (maxRetries / retryOn). For `hitl`, `HitlSpec` from `@kindgi/policy-contract` (maxTimeoutMs / minReviewerRole / tools — per tool id a mode or `{ mode, requiredRole }`); it only tightens an agent's approvals. `tool-errors` and `
|
|
4891
|
+
"Kind-specific policy body. For `access-control`, matches `@kindgi/specs/policy.schema.json` (rules + defaults). For `model-routing`, matches `TenantPolicy` from `@kindgi/capabilities` (providers.allow / providers.deny / models.allow / models.deny / regionAllow / maxCostPerCallUsd / maxTokensPerCall). For `tool-errors`, `ToolErrorsSpec` (maxRetries / retryOn). For `hitl`, `HitlSpec` from `@kindgi/policy-contract` (maxTimeoutMs / minReviewerRole / tools — per tool id a mode or `{ mode, requiredRole }`); it only tightens an agent's approvals. For `retention`, `{ v: 1, doc: RetentionSpec }` from `@kindgi/policy-contract` (domain / graceSeconds / mode, which must be `purge`); a tenant has one retention policy per domain, plus one for `*`. `tool-errors`, `hitl` and `retention` specs are validated on publish. For other kinds, the shape is defined by the runtime consumer.",
|
|
4346
4892
|
},
|
|
4347
4893
|
},
|
|
4348
4894
|
};
|
|
@@ -4392,59 +4938,233 @@ export const PolicyVersionCollectionPageSchema: JsonSchema = {
|
|
|
4392
4938
|
type: 'array',
|
|
4393
4939
|
items: { $ref: '#/components/schemas/PolicyVersionRow' },
|
|
4394
4940
|
},
|
|
4395
|
-
nextCursor: { type: 'string' },
|
|
4396
|
-
hasMore: { type: 'boolean' },
|
|
4941
|
+
nextCursor: { type: 'string' },
|
|
4942
|
+
hasMore: { type: 'boolean' },
|
|
4943
|
+
},
|
|
4944
|
+
};
|
|
4945
|
+
|
|
4946
|
+
export const PublishPolicyBodySchema: JsonSchema = {
|
|
4947
|
+
type: 'object',
|
|
4948
|
+
additionalProperties: false,
|
|
4949
|
+
required: ['id', 'version', 'kind', 'spec'],
|
|
4950
|
+
properties: {
|
|
4951
|
+
id: { type: 'string', minLength: 1 },
|
|
4952
|
+
tenantId: {
|
|
4953
|
+
type: 'string',
|
|
4954
|
+
format: 'uuid',
|
|
4955
|
+
description:
|
|
4956
|
+
'Optional. When present, must match the caller tenant (server-derived from the token). Cross-tenant publish is rejected.',
|
|
4957
|
+
},
|
|
4958
|
+
version: { type: 'string', pattern: '^\\d+\\.\\d+\\.\\d+$' },
|
|
4959
|
+
kind: { $ref: '#/components/schemas/PolicyKind' },
|
|
4960
|
+
description: { type: 'string' },
|
|
4961
|
+
spec: { type: 'object', additionalProperties: true },
|
|
4962
|
+
},
|
|
4963
|
+
};
|
|
4964
|
+
|
|
4965
|
+
export const PublishPolicyResultSchema: JsonSchema = {
|
|
4966
|
+
type: 'object',
|
|
4967
|
+
additionalProperties: false,
|
|
4968
|
+
required: ['policyId', 'version'],
|
|
4969
|
+
properties: {
|
|
4970
|
+
policyId: { type: 'string' },
|
|
4971
|
+
version: { type: 'string' },
|
|
4972
|
+
},
|
|
4973
|
+
};
|
|
4974
|
+
|
|
4975
|
+
export const UnregisterPolicyResultSchema: JsonSchema = {
|
|
4976
|
+
type: 'object',
|
|
4977
|
+
additionalProperties: false,
|
|
4978
|
+
required: ['policyId', 'version', 'unregistered'],
|
|
4979
|
+
properties: {
|
|
4980
|
+
policyId: { type: 'string' },
|
|
4981
|
+
version: { type: 'string' },
|
|
4982
|
+
unregistered: { type: 'boolean', const: true },
|
|
4983
|
+
},
|
|
4984
|
+
};
|
|
4985
|
+
|
|
4986
|
+
export const ReinstatePolicyVersionResultSchema: JsonSchema = {
|
|
4987
|
+
type: 'object',
|
|
4988
|
+
additionalProperties: false,
|
|
4989
|
+
required: ['policyId', 'version', 'wasTombstoned'],
|
|
4990
|
+
properties: {
|
|
4991
|
+
policyId: { type: 'string' },
|
|
4992
|
+
version: { type: 'string' },
|
|
4993
|
+
wasTombstoned: { type: 'boolean' },
|
|
4994
|
+
},
|
|
4995
|
+
};
|
|
4996
|
+
|
|
4997
|
+
// ---------------- retention (admin plane) ----------------
|
|
4998
|
+
|
|
4999
|
+
/** A tombstoning domain a retention policy can cover; `*` is the tenant-wide default. */
|
|
5000
|
+
export const RetentionDomainSchema: JsonSchema = {
|
|
5001
|
+
type: 'string',
|
|
5002
|
+
enum: [...RETENTION_DOMAINS],
|
|
5003
|
+
};
|
|
5004
|
+
|
|
5005
|
+
/**
|
|
5006
|
+
* A domain more than one retention policy covers. Publishing refuses a
|
|
5007
|
+
* second policy for a domain, so only policies stored before that rule
|
|
5008
|
+
* can do this.
|
|
5009
|
+
*/
|
|
5010
|
+
export const RetentionPolicyConflictSchema: JsonSchema = {
|
|
5011
|
+
type: 'object',
|
|
5012
|
+
additionalProperties: false,
|
|
5013
|
+
required: ['domain', 'policyIds', 'appliedPolicyId'],
|
|
5014
|
+
properties: {
|
|
5015
|
+
domain: { $ref: '#/components/schemas/RetentionDomain' },
|
|
5016
|
+
policyIds: {
|
|
5017
|
+
type: 'array',
|
|
5018
|
+
items: { type: 'string' },
|
|
5019
|
+
minItems: 2,
|
|
5020
|
+
description: 'Every policy id that covers the domain, sorted.',
|
|
5021
|
+
},
|
|
5022
|
+
appliedPolicyId: {
|
|
5023
|
+
type: 'string',
|
|
5024
|
+
description:
|
|
5025
|
+
'The one that applies: the policy whose latest version is highest, and on equal versions the lower policy id. Unregister the others.',
|
|
5026
|
+
},
|
|
5027
|
+
},
|
|
5028
|
+
};
|
|
5029
|
+
|
|
5030
|
+
export const RetentionScheduledItemSchema: JsonSchema = {
|
|
5031
|
+
type: 'object',
|
|
5032
|
+
additionalProperties: false,
|
|
5033
|
+
required: [
|
|
5034
|
+
'domain',
|
|
5035
|
+
'id',
|
|
5036
|
+
'unregisteredAt',
|
|
5037
|
+
'purgeAt',
|
|
5038
|
+
'pastGrace',
|
|
5039
|
+
'policyId',
|
|
5040
|
+
'policyVersion',
|
|
5041
|
+
'graceSeconds',
|
|
5042
|
+
],
|
|
5043
|
+
properties: {
|
|
5044
|
+
domain: { $ref: '#/components/schemas/RetentionDomain' },
|
|
5045
|
+
id: { type: 'string', description: "The tombstoned row's id in its domain." },
|
|
5046
|
+
unregisteredAt: { type: 'string', format: 'date-time' },
|
|
5047
|
+
purgeAt: {
|
|
5048
|
+
type: 'string',
|
|
5049
|
+
format: 'date-time',
|
|
5050
|
+
description: "`unregisteredAt` plus the policy's grace: when a sweep purges the row.",
|
|
5051
|
+
},
|
|
5052
|
+
pastGrace: {
|
|
5053
|
+
type: 'boolean',
|
|
5054
|
+
description: 'Whether a sweep would purge the row now.',
|
|
5055
|
+
},
|
|
5056
|
+
policyId: { type: 'string', description: 'The retention policy that applies.' },
|
|
5057
|
+
policyVersion: { type: 'string' },
|
|
5058
|
+
graceSeconds: {
|
|
5059
|
+
type: 'integer',
|
|
5060
|
+
description: "The policy's grace, in seconds (`-1`: a hold, never purged).",
|
|
5061
|
+
},
|
|
4397
5062
|
},
|
|
4398
5063
|
};
|
|
4399
5064
|
|
|
4400
|
-
export const
|
|
5065
|
+
export const RetentionScheduledPageSchema: JsonSchema = {
|
|
4401
5066
|
type: 'object',
|
|
4402
5067
|
additionalProperties: false,
|
|
4403
|
-
required: ['
|
|
5068
|
+
required: ['data', 'domainsMissingAdapter', 'unpolicedDomains'],
|
|
4404
5069
|
properties: {
|
|
4405
|
-
|
|
4406
|
-
|
|
5070
|
+
data: {
|
|
5071
|
+
type: 'array',
|
|
5072
|
+
items: { $ref: '#/components/schemas/RetentionScheduledItem' },
|
|
5073
|
+
},
|
|
5074
|
+
hasMore: {
|
|
5075
|
+
type: 'boolean',
|
|
5076
|
+
description:
|
|
5077
|
+
'Some domain has more scheduled rows than this page returned (`limit` is per domain). Always sent from 0.1.4; a runtime before it sends none.',
|
|
5078
|
+
},
|
|
5079
|
+
nextCursor: {
|
|
4407
5080
|
type: 'string',
|
|
4408
|
-
format: 'uuid',
|
|
4409
5081
|
description:
|
|
4410
|
-
'
|
|
5082
|
+
'The `cursor` for the next page. Absent when `hasMore: false`, or when the runtime cannot continue a page.',
|
|
5083
|
+
},
|
|
5084
|
+
domainsMissingAdapter: {
|
|
5085
|
+
type: 'array',
|
|
5086
|
+
items: { $ref: '#/components/schemas/RetentionDomain' },
|
|
5087
|
+
description:
|
|
5088
|
+
"Domains a retention policy covers that this deployment can't purge (no adapter is wired).",
|
|
5089
|
+
},
|
|
5090
|
+
unpolicedDomains: {
|
|
5091
|
+
type: 'array',
|
|
5092
|
+
items: { $ref: '#/components/schemas/RetentionDomain' },
|
|
5093
|
+
description: 'Domains no retention policy covers: their tombstones are kept.',
|
|
5094
|
+
},
|
|
5095
|
+
conflicts: {
|
|
5096
|
+
type: 'array',
|
|
5097
|
+
items: { $ref: '#/components/schemas/RetentionPolicyConflict' },
|
|
5098
|
+
description: 'Domains more than one retention policy covers. Absent or empty: none.',
|
|
4411
5099
|
},
|
|
4412
|
-
version: { type: 'string', pattern: '^\\d+\\.\\d+\\.\\d+$' },
|
|
4413
|
-
kind: { $ref: '#/components/schemas/PolicyKind' },
|
|
4414
|
-
description: { type: 'string' },
|
|
4415
|
-
spec: { type: 'object', additionalProperties: true },
|
|
4416
5100
|
},
|
|
4417
5101
|
};
|
|
4418
5102
|
|
|
4419
|
-
export const
|
|
5103
|
+
export const RetentionSweepBodySchema: JsonSchema = {
|
|
4420
5104
|
type: 'object',
|
|
4421
5105
|
additionalProperties: false,
|
|
4422
|
-
required: ['policyId', 'version'],
|
|
4423
5106
|
properties: {
|
|
4424
|
-
|
|
4425
|
-
|
|
5107
|
+
domain: {
|
|
5108
|
+
$ref: '#/components/schemas/RetentionDomain',
|
|
5109
|
+
description: 'Sweep only this domain. Absent: every domain.',
|
|
5110
|
+
},
|
|
5111
|
+
maxPerDomain: {
|
|
5112
|
+
type: 'integer',
|
|
5113
|
+
minimum: 1,
|
|
5114
|
+
maximum: 10000,
|
|
5115
|
+
description:
|
|
5116
|
+
'The most rows one call purges per domain (default 500); the rest are `remaining`.',
|
|
5117
|
+
},
|
|
4426
5118
|
},
|
|
4427
5119
|
};
|
|
4428
5120
|
|
|
4429
|
-
export const
|
|
5121
|
+
export const RetentionSweepDomainBodySchema: JsonSchema = {
|
|
4430
5122
|
type: 'object',
|
|
4431
5123
|
additionalProperties: false,
|
|
4432
|
-
required: ['policyId', 'version', 'unregistered'],
|
|
4433
5124
|
properties: {
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
5125
|
+
maxPerDomain: {
|
|
5126
|
+
type: 'integer',
|
|
5127
|
+
minimum: 1,
|
|
5128
|
+
maximum: 10000,
|
|
5129
|
+
description: 'The most rows this call purges (default 500); the rest are `remaining`.',
|
|
5130
|
+
},
|
|
4437
5131
|
},
|
|
4438
5132
|
};
|
|
4439
5133
|
|
|
4440
|
-
export const
|
|
5134
|
+
export const RetentionSweepResultSchema: JsonSchema = {
|
|
4441
5135
|
type: 'object',
|
|
4442
5136
|
additionalProperties: false,
|
|
4443
|
-
required: ['
|
|
5137
|
+
required: ['perDomain', 'totalPurged'],
|
|
4444
5138
|
properties: {
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
5139
|
+
perDomain: {
|
|
5140
|
+
type: 'array',
|
|
5141
|
+
items: {
|
|
5142
|
+
type: 'object',
|
|
5143
|
+
additionalProperties: false,
|
|
5144
|
+
required: ['domain', 'purged', 'remaining'],
|
|
5145
|
+
properties: {
|
|
5146
|
+
domain: { $ref: '#/components/schemas/RetentionDomain' },
|
|
5147
|
+
purged: { type: 'integer', minimum: 0 },
|
|
5148
|
+
remaining: {
|
|
5149
|
+
type: 'integer',
|
|
5150
|
+
minimum: 0,
|
|
5151
|
+
description: 'Rows past grace this call left (the `maxPerDomain` cap); sweep again.',
|
|
5152
|
+
},
|
|
5153
|
+
policyId: { type: 'string', description: 'The retention policy that applied.' },
|
|
5154
|
+
missingAdapter: {
|
|
5155
|
+
type: 'boolean',
|
|
5156
|
+
const: true,
|
|
5157
|
+
description: "Present when this deployment can't purge the domain (no adapter).",
|
|
5158
|
+
},
|
|
5159
|
+
},
|
|
5160
|
+
},
|
|
5161
|
+
},
|
|
5162
|
+
totalPurged: { type: 'integer', minimum: 0 },
|
|
5163
|
+
conflicts: {
|
|
5164
|
+
type: 'array',
|
|
5165
|
+
items: { $ref: '#/components/schemas/RetentionPolicyConflict' },
|
|
5166
|
+
description: 'Domains more than one retention policy covers. Absent or empty: none.',
|
|
5167
|
+
},
|
|
4448
5168
|
},
|
|
4449
5169
|
};
|
|
4450
5170
|
|
|
@@ -4724,7 +5444,7 @@ export const EvalRunFlowRefSchema: JsonSchema = {
|
|
|
4724
5444
|
|
|
4725
5445
|
export const EvalBaselineSchema: JsonSchema = {
|
|
4726
5446
|
description:
|
|
4727
|
-
"What a comparison compares the candidate against: `'recorded'` (each case's recorded output, what was judged), a version (`{ agentId, version }`, replayed under the same rules), or the version live in a scope (`{ live: { projectId?, segments? } }`). Only `'recorded'` runs today; the others are refused when the run starts.",
|
|
5447
|
+
"What a comparison compares the candidate against: `'recorded'` (each case's recorded output, what was judged), a version (`{ agentId, version }`, replayed under the same rules), or the version live in a scope (`{ live: { projectId?, segments? } }`, `segments` a path in the project, coarse to fine). Only `'recorded'` runs today; the others are refused when the run starts.",
|
|
4728
5448
|
oneOf: [
|
|
4729
5449
|
{ type: 'string', enum: ['recorded'] },
|
|
4730
5450
|
{
|
|
@@ -4743,7 +5463,13 @@ export const EvalBaselineSchema: JsonSchema = {
|
|
|
4743
5463
|
additionalProperties: false,
|
|
4744
5464
|
properties: {
|
|
4745
5465
|
projectId: { type: 'string' },
|
|
4746
|
-
segments: {
|
|
5466
|
+
segments: {
|
|
5467
|
+
type: 'array',
|
|
5468
|
+
items: { $ref: '#/components/schemas/ScopeSegment' },
|
|
5469
|
+
maxItems: 8,
|
|
5470
|
+
description:
|
|
5471
|
+
'A segment path in `projectId`, coarse to fine, as live versions resolve it. Needs `projectId`.',
|
|
5472
|
+
},
|
|
4747
5473
|
},
|
|
4748
5474
|
},
|
|
4749
5475
|
},
|
|
@@ -4766,6 +5492,359 @@ export const EvalComparisonSchema: JsonSchema = {
|
|
|
4766
5492
|
},
|
|
4767
5493
|
repetitions: { type: 'integer', minimum: 1, maximum: 10 },
|
|
4768
5494
|
k: { type: 'integer', minimum: 1, maximum: 100 },
|
|
5495
|
+
versions: { $ref: '#/components/schemas/FlowVersionOverrides' },
|
|
5496
|
+
classWeights: {
|
|
5497
|
+
type: 'string',
|
|
5498
|
+
enum: ['as-recorded', 'restricted-only'],
|
|
5499
|
+
description:
|
|
5500
|
+
"Which judgments count: each at its class's weight (`as-recorded`, the default), or only those recorded while their class was restricted (`Judgment.restricted`), the others weighing 0 (`restricted-only`).",
|
|
5501
|
+
},
|
|
5502
|
+
},
|
|
5503
|
+
};
|
|
5504
|
+
|
|
5505
|
+
// ---------------- comparison results (a `judged` eval run's `result`) ----------------
|
|
5506
|
+
|
|
5507
|
+
const nullableNumber = { type: ['number', 'null'] } as const;
|
|
5508
|
+
|
|
5509
|
+
export const ComparisonMetricSchema: JsonSchema = {
|
|
5510
|
+
description:
|
|
5511
|
+
"One metric, the recorded runs beside the candidate. `null` where a side had no judged evidence; `n` / `weight` are the candidate's evidence (cases with judged items, and the judgment weight behind them), `baselineN` / `baselineWeight` the recorded side's.",
|
|
5512
|
+
type: 'object',
|
|
5513
|
+
additionalProperties: false,
|
|
5514
|
+
required: [
|
|
5515
|
+
'baseline',
|
|
5516
|
+
'candidate',
|
|
5517
|
+
'delta',
|
|
5518
|
+
'n',
|
|
5519
|
+
'weight',
|
|
5520
|
+
'baselineN',
|
|
5521
|
+
'baselineWeight',
|
|
5522
|
+
'direction',
|
|
5523
|
+
],
|
|
5524
|
+
properties: {
|
|
5525
|
+
baseline: nullableNumber,
|
|
5526
|
+
candidate: nullableNumber,
|
|
5527
|
+
delta: nullableNumber,
|
|
5528
|
+
n: { type: 'integer', minimum: 0 },
|
|
5529
|
+
weight: { type: 'number', minimum: 0 },
|
|
5530
|
+
baselineN: { type: 'integer', minimum: 0 },
|
|
5531
|
+
baselineWeight: { type: 'number', minimum: 0 },
|
|
5532
|
+
direction: { type: 'string', enum: ['higher'] },
|
|
5533
|
+
k: {
|
|
5534
|
+
type: 'integer',
|
|
5535
|
+
minimum: 1,
|
|
5536
|
+
description: '`weightedPrecisionAtK`: the ranked items it looked at.',
|
|
5537
|
+
},
|
|
5538
|
+
spread: {
|
|
5539
|
+
type: 'number',
|
|
5540
|
+
description: "With more than one repetition: the candidate's max − min across them.",
|
|
5541
|
+
},
|
|
5542
|
+
},
|
|
5543
|
+
};
|
|
5544
|
+
|
|
5545
|
+
export const ComparisonCandidateSchema: JsonSchema = {
|
|
5546
|
+
description:
|
|
5547
|
+
'What ran on the cases: an agent version, or a flow version (with any versions it swapped in).',
|
|
5548
|
+
oneOf: [
|
|
5549
|
+
{
|
|
5550
|
+
type: 'object',
|
|
5551
|
+
additionalProperties: false,
|
|
5552
|
+
required: ['kind', 'agentId', 'version'],
|
|
5553
|
+
properties: {
|
|
5554
|
+
kind: { type: 'string', enum: ['agent'] },
|
|
5555
|
+
agentId: { type: 'string' },
|
|
5556
|
+
version: { type: 'string' },
|
|
5557
|
+
pinsDigest: {
|
|
5558
|
+
type: 'string',
|
|
5559
|
+
description:
|
|
5560
|
+
"The version's pinsDigest: what it ran, as a promotion gate checks. Absent for a version published before pins, and from a comparison recorded before it.",
|
|
5561
|
+
},
|
|
5562
|
+
},
|
|
5563
|
+
},
|
|
5564
|
+
{
|
|
5565
|
+
type: 'object',
|
|
5566
|
+
additionalProperties: false,
|
|
5567
|
+
required: ['kind', 'flowId', 'version'],
|
|
5568
|
+
properties: {
|
|
5569
|
+
kind: { type: 'string', enum: ['flow'] },
|
|
5570
|
+
flowId: { type: 'string' },
|
|
5571
|
+
version: { type: 'string' },
|
|
5572
|
+
versions: { $ref: '#/components/schemas/FlowVersionOverrides' },
|
|
5573
|
+
},
|
|
5574
|
+
},
|
|
5575
|
+
],
|
|
5576
|
+
};
|
|
5577
|
+
|
|
5578
|
+
export const JudgedComparisonSummarySchema: JsonSchema = {
|
|
5579
|
+
description:
|
|
5580
|
+
'What a comparison concluded: the candidate beside the recorded runs, the case counts, and the metrics. What a promotion gate reads.',
|
|
5581
|
+
type: 'object',
|
|
5582
|
+
additionalProperties: false,
|
|
5583
|
+
required: [
|
|
5584
|
+
'evalRunId',
|
|
5585
|
+
'status',
|
|
5586
|
+
'completedAt',
|
|
5587
|
+
'suite',
|
|
5588
|
+
'candidate',
|
|
5589
|
+
'baseline',
|
|
5590
|
+
'scope',
|
|
5591
|
+
'cases',
|
|
5592
|
+
'diverged',
|
|
5593
|
+
'refusedWrites',
|
|
5594
|
+
'errors',
|
|
5595
|
+
'stopped',
|
|
5596
|
+
'reads',
|
|
5597
|
+
'sampling',
|
|
5598
|
+
'repetitions',
|
|
5599
|
+
'metrics',
|
|
5600
|
+
],
|
|
5601
|
+
properties: {
|
|
5602
|
+
evalRunId: { type: 'string' },
|
|
5603
|
+
status: { type: 'string', enum: ['completed', 'partial', 'failed'] },
|
|
5604
|
+
completedAt: { type: 'string', format: 'date-time' },
|
|
5605
|
+
suite: {
|
|
5606
|
+
type: 'object',
|
|
5607
|
+
additionalProperties: false,
|
|
5608
|
+
required: ['id', 'version'],
|
|
5609
|
+
properties: { id: { type: 'string' }, version: { type: 'string' } },
|
|
5610
|
+
},
|
|
5611
|
+
candidate: { $ref: '#/components/schemas/ComparisonCandidate' },
|
|
5612
|
+
baseline: {
|
|
5613
|
+
description:
|
|
5614
|
+
"What the candidate was compared with: `recorded` (the test set's recorded runs, with the versions that served them), or another version.",
|
|
5615
|
+
oneOf: [
|
|
5616
|
+
{
|
|
5617
|
+
type: 'object',
|
|
5618
|
+
additionalProperties: false,
|
|
5619
|
+
required: ['kind', 'versions'],
|
|
5620
|
+
properties: {
|
|
5621
|
+
kind: { type: 'string', enum: ['recorded'] },
|
|
5622
|
+
versions: {
|
|
5623
|
+
type: 'array',
|
|
5624
|
+
items: {
|
|
5625
|
+
type: 'object',
|
|
5626
|
+
additionalProperties: false,
|
|
5627
|
+
required: ['version', 'cases'],
|
|
5628
|
+
properties: {
|
|
5629
|
+
agentId: { type: 'string' },
|
|
5630
|
+
flowId: { type: 'string' },
|
|
5631
|
+
version: { type: 'string' },
|
|
5632
|
+
cases: { type: 'integer', minimum: 0 },
|
|
5633
|
+
},
|
|
5634
|
+
},
|
|
5635
|
+
},
|
|
5636
|
+
},
|
|
5637
|
+
},
|
|
5638
|
+
{
|
|
5639
|
+
type: 'object',
|
|
5640
|
+
additionalProperties: false,
|
|
5641
|
+
required: ['kind', 'agentId', 'version', 'via'],
|
|
5642
|
+
properties: {
|
|
5643
|
+
kind: { type: 'string', enum: ['version'] },
|
|
5644
|
+
agentId: { type: 'string' },
|
|
5645
|
+
version: { type: 'string' },
|
|
5646
|
+
via: { type: 'string', enum: ['explicit', 'live'] },
|
|
5647
|
+
liveScope: { type: 'object', additionalProperties: true },
|
|
5648
|
+
},
|
|
5649
|
+
},
|
|
5650
|
+
],
|
|
5651
|
+
},
|
|
5652
|
+
scope: {
|
|
5653
|
+
type: 'object',
|
|
5654
|
+
additionalProperties: false,
|
|
5655
|
+
description: "Where the test set's judgments came from.",
|
|
5656
|
+
properties: { projectId: { type: 'string' } },
|
|
5657
|
+
},
|
|
5658
|
+
cases: { type: 'integer', minimum: 0 },
|
|
5659
|
+
diverged: {
|
|
5660
|
+
type: 'integer',
|
|
5661
|
+
minimum: 0,
|
|
5662
|
+
description: "Cases where a read with no recording ran live under `reads: 'recorded'`.",
|
|
5663
|
+
},
|
|
5664
|
+
refusedWrites: {
|
|
5665
|
+
type: 'integer',
|
|
5666
|
+
minimum: 0,
|
|
5667
|
+
description: 'Tool calls refused across the cases (what the candidate would have done).',
|
|
5668
|
+
},
|
|
5669
|
+
errors: { type: 'integer', minimum: 0, description: 'Cases none of whose repetitions ran.' },
|
|
5670
|
+
stopped: {
|
|
5671
|
+
type: 'integer',
|
|
5672
|
+
minimum: 0,
|
|
5673
|
+
description:
|
|
5674
|
+
"Flow cases that stopped at a write the replay refused: no output to score, so they're left out of the metrics.",
|
|
5675
|
+
},
|
|
5676
|
+
reads: { type: 'string', enum: ['recorded', 'live'] },
|
|
5677
|
+
classWeights: {
|
|
5678
|
+
type: 'string',
|
|
5679
|
+
enum: ['as-recorded', 'restricted-only'],
|
|
5680
|
+
description:
|
|
5681
|
+
'Which judgments counted. Absent from a comparison recorded before restricted classes: `as-recorded`.',
|
|
5682
|
+
},
|
|
5683
|
+
sampling: {
|
|
5684
|
+
type: 'object',
|
|
5685
|
+
additionalProperties: false,
|
|
5686
|
+
required: ['models'],
|
|
5687
|
+
properties: {
|
|
5688
|
+
models: {
|
|
5689
|
+
type: 'array',
|
|
5690
|
+
description:
|
|
5691
|
+
"The models that answered the candidate's replays, and how many replays each.",
|
|
5692
|
+
items: {
|
|
5693
|
+
type: 'object',
|
|
5694
|
+
additionalProperties: false,
|
|
5695
|
+
required: ['providerId', 'model', 'runs'],
|
|
5696
|
+
properties: {
|
|
5697
|
+
providerId: { type: 'string' },
|
|
5698
|
+
model: { type: 'string' },
|
|
5699
|
+
runs: { type: 'integer', minimum: 0 },
|
|
5700
|
+
},
|
|
5701
|
+
},
|
|
5702
|
+
},
|
|
5703
|
+
},
|
|
5704
|
+
},
|
|
5705
|
+
repetitions: { type: 'integer', minimum: 1 },
|
|
5706
|
+
metrics: {
|
|
5707
|
+
type: 'object',
|
|
5708
|
+
additionalProperties: false,
|
|
5709
|
+
required: ['weightedYesShare', 'judgedCoverage', 'weightedPrecisionAtK'],
|
|
5710
|
+
properties: {
|
|
5711
|
+
weightedYesShare: { $ref: '#/components/schemas/ComparisonMetric' },
|
|
5712
|
+
judgedCoverage: { $ref: '#/components/schemas/ComparisonMetric' },
|
|
5713
|
+
weightedPrecisionAtK: { $ref: '#/components/schemas/ComparisonMetric' },
|
|
5714
|
+
},
|
|
5715
|
+
},
|
|
5716
|
+
},
|
|
5717
|
+
};
|
|
5718
|
+
|
|
5719
|
+
const outputScore = {
|
|
5720
|
+
type: 'object',
|
|
5721
|
+
additionalProperties: false,
|
|
5722
|
+
required: ['yesWeight', 'totalWeight', 'items', 'judgedItems', 'topK'],
|
|
5723
|
+
description:
|
|
5724
|
+
"An output's score: Σ yesWeight and Σ totalWeight over its judged items, and over those among the first `k` ranked items.",
|
|
5725
|
+
properties: {
|
|
5726
|
+
yesWeight: { type: 'number' },
|
|
5727
|
+
totalWeight: { type: 'number' },
|
|
5728
|
+
items: { type: 'integer', minimum: 0 },
|
|
5729
|
+
judgedItems: { type: 'integer', minimum: 0 },
|
|
5730
|
+
topK: {
|
|
5731
|
+
type: 'object',
|
|
5732
|
+
additionalProperties: false,
|
|
5733
|
+
required: ['yesWeight', 'totalWeight'],
|
|
5734
|
+
properties: { yesWeight: { type: 'number' }, totalWeight: { type: 'number' } },
|
|
5735
|
+
},
|
|
5736
|
+
},
|
|
5737
|
+
} as const;
|
|
5738
|
+
|
|
5739
|
+
export const ComparisonCaseResultSchema: JsonSchema = {
|
|
5740
|
+
description:
|
|
5741
|
+
"One case of a comparison: its replay runs, the scores, the items kept, dropped and new, the tool calls, and why it didn't run when it didn't.",
|
|
5742
|
+
type: 'object',
|
|
5743
|
+
additionalProperties: false,
|
|
5744
|
+
required: [
|
|
5745
|
+
'caseId',
|
|
5746
|
+
'runIds',
|
|
5747
|
+
'baseline',
|
|
5748
|
+
'candidate',
|
|
5749
|
+
'diverged',
|
|
5750
|
+
'refusedWrites',
|
|
5751
|
+
'noContext',
|
|
5752
|
+
'approvalSkipped',
|
|
5753
|
+
],
|
|
5754
|
+
properties: {
|
|
5755
|
+
caseId: { type: 'string' },
|
|
5756
|
+
runIds: {
|
|
5757
|
+
type: 'array',
|
|
5758
|
+
items: { type: 'string' },
|
|
5759
|
+
description: "The candidate's replay runs, one per repetition.",
|
|
5760
|
+
},
|
|
5761
|
+
baseline: outputScore,
|
|
5762
|
+
candidate: { type: 'array', items: outputScore, description: 'One per repetition that ran.' },
|
|
5763
|
+
changes: {
|
|
5764
|
+
type: 'object',
|
|
5765
|
+
additionalProperties: false,
|
|
5766
|
+
required: ['kept', 'dropped', 'new'],
|
|
5767
|
+
description: "The first repetition's items against the judged ones.",
|
|
5768
|
+
properties: {
|
|
5769
|
+
kept: {
|
|
5770
|
+
type: 'array',
|
|
5771
|
+
items: {
|
|
5772
|
+
type: 'object',
|
|
5773
|
+
additionalProperties: false,
|
|
5774
|
+
required: ['key'],
|
|
5775
|
+
properties: {
|
|
5776
|
+
key: { type: 'string' },
|
|
5777
|
+
rankBefore: { type: 'integer' },
|
|
5778
|
+
rank: { type: 'integer' },
|
|
5779
|
+
},
|
|
5780
|
+
},
|
|
5781
|
+
},
|
|
5782
|
+
dropped: {
|
|
5783
|
+
type: 'array',
|
|
5784
|
+
items: {
|
|
5785
|
+
type: 'object',
|
|
5786
|
+
additionalProperties: false,
|
|
5787
|
+
required: ['key'],
|
|
5788
|
+
properties: { key: { type: 'string' }, rankBefore: { type: 'integer' } },
|
|
5789
|
+
},
|
|
5790
|
+
},
|
|
5791
|
+
new: {
|
|
5792
|
+
type: 'array',
|
|
5793
|
+
items: {
|
|
5794
|
+
type: 'object',
|
|
5795
|
+
additionalProperties: false,
|
|
5796
|
+
required: ['key', 'pointer'],
|
|
5797
|
+
properties: {
|
|
5798
|
+
key: { type: 'string' },
|
|
5799
|
+
pointer: { type: 'string' },
|
|
5800
|
+
rank: { type: 'integer' },
|
|
5801
|
+
},
|
|
5802
|
+
},
|
|
5803
|
+
},
|
|
5804
|
+
},
|
|
5805
|
+
},
|
|
5806
|
+
tools: {
|
|
5807
|
+
type: 'array',
|
|
5808
|
+
description: "The first repetition's tool calls, and what happened to each.",
|
|
5809
|
+
items: {
|
|
5810
|
+
type: 'object',
|
|
5811
|
+
additionalProperties: false,
|
|
5812
|
+
required: ['step', 'callId', 'toolId', 'toolVersion', 'arguments', 'source'],
|
|
5813
|
+
properties: {
|
|
5814
|
+
step: { type: 'integer', minimum: 0 },
|
|
5815
|
+
callId: { type: 'string' },
|
|
5816
|
+
toolId: { type: 'string' },
|
|
5817
|
+
toolVersion: { type: 'string' },
|
|
5818
|
+
arguments: {},
|
|
5819
|
+
source: { type: 'string', enum: ['live', 'recorded', 'refused'] },
|
|
5820
|
+
reason: { type: 'string' },
|
|
5821
|
+
},
|
|
5822
|
+
},
|
|
5823
|
+
},
|
|
5824
|
+
diverged: { type: 'boolean' },
|
|
5825
|
+
refusedWrites: { type: 'integer', minimum: 0 },
|
|
5826
|
+
noContext: { type: 'boolean' },
|
|
5827
|
+
approvalSkipped: { type: 'boolean' },
|
|
5828
|
+
error: { type: 'string' },
|
|
5829
|
+
stopped: {
|
|
5830
|
+
type: 'object',
|
|
5831
|
+
additionalProperties: false,
|
|
5832
|
+
required: ['toolId', 'arguments'],
|
|
5833
|
+
description: 'Set when the replay stopped at a refused write: what it would have done.',
|
|
5834
|
+
properties: { toolId: { type: 'string' }, arguments: {}, reason: { type: 'string' } },
|
|
5835
|
+
},
|
|
5836
|
+
},
|
|
5837
|
+
};
|
|
5838
|
+
|
|
5839
|
+
export const JudgedComparisonResultSchema: JsonSchema = {
|
|
5840
|
+
description:
|
|
5841
|
+
"A comparison's `result` (a `judged` eval run's): the summary and each case. `EvalRun.result` stays an open object, since each kind has its own; the clients read it as this (TS `comparisonOf(run)`, Python `comparison_of(run)`).",
|
|
5842
|
+
type: 'object',
|
|
5843
|
+
additionalProperties: false,
|
|
5844
|
+
required: ['summary', 'perCase'],
|
|
5845
|
+
properties: {
|
|
5846
|
+
summary: { $ref: '#/components/schemas/JudgedComparisonSummary' },
|
|
5847
|
+
perCase: { type: 'array', items: { $ref: '#/components/schemas/ComparisonCaseResult' } },
|
|
4769
5848
|
},
|
|
4770
5849
|
};
|
|
4771
5850
|
|
|
@@ -4798,7 +5877,7 @@ export const EvalRunSchema: JsonSchema = {
|
|
|
4798
5877
|
type: 'object',
|
|
4799
5878
|
additionalProperties: true,
|
|
4800
5879
|
description:
|
|
4801
|
-
'Kind-specific opaque JSON. For `accuracy`, contains `{ passCount, totalCount, meanScore, perCase[] }`. For `judged` (a comparison), `{ summary, perCase[] }`: the summary has the baseline (the versions behind the recorded runs) and the candidate (`{ kind: "agent", agentId, version }` or `{ kind: "flow", flowId, version }`), the case counts (`cases`, `diverged`, `refusedWrites`, `errors`, and `stopped`: flow cases that stopped at a write the replay refused, left out of the metrics), the models that answered, and `metrics` (`weightedYesShare`, `judgedCoverage`, `weightedPrecisionAtK`, each `{ baseline, candidate, delta, n, weight, baselineN, baselineWeight, direction, k?, spread? }`); each case has its replay runs, the scores, the items kept, dropped and new, the tool calls with what happened to each, and `stopped` (what it would have done) when it stopped. Other kinds define their own shapes as their dispatchers ship.',
|
|
5880
|
+
'Kind-specific opaque JSON. For `accuracy`, contains `{ passCount, totalCount, meanScore, perCase[] }`. For `judged` (a comparison), `{ summary, perCase[] }`: the summary has the baseline (the versions behind the recorded runs) and the candidate (`{ kind: "agent", agentId, version }` or `{ kind: "flow", flowId, version, versions? }`), the case counts (`cases`, `diverged`, `refusedWrites`, `errors`, and `stopped`: flow cases that stopped at a write the replay refused, left out of the metrics), the models that answered, and `metrics` (`weightedYesShare`, `judgedCoverage`, `weightedPrecisionAtK`, each `{ baseline, candidate, delta, n, weight, baselineN, baselineWeight, direction, k?, spread? }`); each case has its replay runs, the scores, the items kept, dropped and new, the tool calls with what happened to each, and `stopped` (what it would have done) when it stopped. Other kinds define their own shapes as their dispatchers ship.',
|
|
4802
5881
|
},
|
|
4803
5882
|
error: { type: 'string' },
|
|
4804
5883
|
correlationId: { type: 'string' },
|
|
@@ -4831,9 +5910,16 @@ export const StartEvalRunBodySchema: JsonSchema = {
|
|
|
4831
5910
|
reads: { type: 'string', enum: ['recorded', 'live'] },
|
|
4832
5911
|
repetitions: { type: 'integer', minimum: 1, maximum: 10 },
|
|
4833
5912
|
k: { type: 'integer', minimum: 1, maximum: 100 },
|
|
5913
|
+
versions: { $ref: '#/components/schemas/FlowVersionOverrides' },
|
|
5914
|
+
classWeights: {
|
|
5915
|
+
type: 'string',
|
|
5916
|
+
enum: ['as-recorded', 'restricted-only'],
|
|
5917
|
+
description:
|
|
5918
|
+
"Which judgments count: each at its class's weight (`as-recorded`, the default), or only those recorded while their class was restricted (`Judgment.restricted`), the others weighing 0 (`restricted-only`).",
|
|
5919
|
+
},
|
|
4834
5920
|
},
|
|
4835
5921
|
description:
|
|
4836
|
-
"Exactly one of `agentRef` or `flowRef` MUST be supplied. `dryRun: true` returns a plan preview without invoking the subject. For a `judged` suite (a test set), the run is a comparison: `agentRef` or `flowRef` with its `version` is the candidate, replayed on each case without doing anything the past run didn't (a flow stops at a write the replay refuses); `baseline` (default `'recorded'`), `reads` (default `recorded`), `repetitions` (default 1) and `k` (default 10) set how.",
|
|
5922
|
+
"Exactly one of `agentRef` or `flowRef` MUST be supplied. `dryRun: true` returns a plan preview without invoking the subject. For a `judged` suite (a test set), the run is a comparison: `agentRef` or `flowRef` with its `version` is the candidate, replayed on each case without doing anything the past run didn't (a flow stops at a write the replay refuses); `baseline` (default `'recorded'`), `reads` (default `recorded`), `repetitions` (default 1) and `k` (default 10) set how. With `flowRef`, `versions` runs the flow with some of its agents or tools at other versions; an id the flow doesn't use, or a version that isn't published, is refused (`400 validation-failed`, each under `details.issues`).",
|
|
4837
5923
|
};
|
|
4838
5924
|
|
|
4839
5925
|
export const StartEvalRunResultSchema: JsonSchema = {
|
|
@@ -4923,6 +6009,10 @@ export const IdentityProviderCollectionPageSchema: JsonSchema = {
|
|
|
4923
6009
|
required: ['data'],
|
|
4924
6010
|
properties: {
|
|
4925
6011
|
data: { type: 'array', items: { $ref: '#/components/schemas/IdentityProviderConfig' } },
|
|
6012
|
+
hasMore: {
|
|
6013
|
+
type: 'boolean',
|
|
6014
|
+
description: 'Always `false`: the list comes whole. Absent from older servers.',
|
|
6015
|
+
},
|
|
4926
6016
|
},
|
|
4927
6017
|
};
|
|
4928
6018
|
|
|
@@ -6298,6 +7388,11 @@ export const EnvCollectionPageSchema: JsonSchema = {
|
|
|
6298
7388
|
required: ['data'],
|
|
6299
7389
|
properties: {
|
|
6300
7390
|
data: { type: 'array', items: { $ref: '#/components/schemas/EnvRecord' } },
|
|
7391
|
+
hasMore: {
|
|
7392
|
+
type: 'boolean',
|
|
7393
|
+
description:
|
|
7394
|
+
"Whether there's another page. Absent from older servers: there is one when `nextCursor` is set.",
|
|
7395
|
+
},
|
|
6301
7396
|
nextCursor: { type: 'string' },
|
|
6302
7397
|
},
|
|
6303
7398
|
};
|
|
@@ -6335,6 +7430,11 @@ export const SecretCollectionPageSchema: JsonSchema = {
|
|
|
6335
7430
|
required: ['data'],
|
|
6336
7431
|
properties: {
|
|
6337
7432
|
data: { type: 'array', items: { $ref: '#/components/schemas/SecretRecord' } },
|
|
7433
|
+
hasMore: {
|
|
7434
|
+
type: 'boolean',
|
|
7435
|
+
description:
|
|
7436
|
+
"Whether there's another page. Absent from older servers: there is one when `nextCursor` is set.",
|
|
7437
|
+
},
|
|
6338
7438
|
nextCursor: { type: 'string' },
|
|
6339
7439
|
},
|
|
6340
7440
|
};
|
|
@@ -6345,6 +7445,11 @@ export const SecretVersionCollectionPageSchema: JsonSchema = {
|
|
|
6345
7445
|
required: ['data'],
|
|
6346
7446
|
properties: {
|
|
6347
7447
|
data: { type: 'array', items: { $ref: '#/components/schemas/SecretVersionRecord' } },
|
|
7448
|
+
hasMore: {
|
|
7449
|
+
type: 'boolean',
|
|
7450
|
+
description:
|
|
7451
|
+
"Whether there's another page. Absent from older servers: there is one when `nextCursor` is set.",
|
|
7452
|
+
},
|
|
6348
7453
|
nextCursor: { type: 'string' },
|
|
6349
7454
|
},
|
|
6350
7455
|
};
|
|
@@ -7110,6 +8215,29 @@ export const COMPONENT_SCHEMAS: ReadonlyArray<readonly [string, JsonSchema]> = [
|
|
|
7110
8215
|
['HealthResult', HealthResultSchema],
|
|
7111
8216
|
['RunStatus', RunStatusSchema],
|
|
7112
8217
|
['RunAgent', RunAgentSchema],
|
|
8218
|
+
['ScopeSegment', ScopeSegmentSchema],
|
|
8219
|
+
['LiveScopeTenant', LiveScopeTenantSchema],
|
|
8220
|
+
['LiveScopeOrg', LiveScopeOrgSchema],
|
|
8221
|
+
['LiveScopeProject', LiveScopeProjectSchema],
|
|
8222
|
+
['LiveScopeSegment', LiveScopeSegmentSchema],
|
|
8223
|
+
['LiveScope', LiveScopeSchema],
|
|
8224
|
+
['LiveVersionResolution', LiveVersionResolutionSchema],
|
|
8225
|
+
['LivePin', LivePinSchema],
|
|
8226
|
+
['LivePinList', LivePinListSchema],
|
|
8227
|
+
['Promotion', PromotionSchema],
|
|
8228
|
+
['PromotionPage', PromotionPageSchema],
|
|
8229
|
+
['GateCheck', GateCheckSchema],
|
|
8230
|
+
['GatePolicyRef', GatePolicyRefSchema],
|
|
8231
|
+
['GateApproval', GateApprovalSchema],
|
|
8232
|
+
['GatePolicySpec', GatePolicySpecSchema],
|
|
8233
|
+
['GatePolicy', GatePolicySchema],
|
|
8234
|
+
['GatePolicyPage', GatePolicyPageSchema],
|
|
8235
|
+
['PublishGatePolicyBody', PublishGatePolicyBodySchema],
|
|
8236
|
+
['GatePolicyResolution', GatePolicyResolutionSchema],
|
|
8237
|
+
['PromotionCheck', PromotionCheckSchema],
|
|
8238
|
+
['PromoteBody', PromoteBodySchema],
|
|
8239
|
+
['RollbackBody', RollbackBodySchema],
|
|
8240
|
+
['UnpinBody', UnpinBodySchema],
|
|
7113
8241
|
['Run', RunSchema],
|
|
7114
8242
|
['StartRunOptions', StartRunOptionsSchema],
|
|
7115
8243
|
['StartRunBody', StartRunBodySchema],
|
|
@@ -7168,6 +8296,7 @@ export const COMPONENT_SCHEMAS: ReadonlyArray<readonly [string, JsonSchema]> = [
|
|
|
7168
8296
|
['CreateJudgmentBody', CreateJudgmentBodySchema],
|
|
7169
8297
|
['UnregisterJudgmentResult', UnregisterJudgmentResultSchema],
|
|
7170
8298
|
['JudgedItemSummary', JudgedItemSummarySchema],
|
|
8299
|
+
['JudgeClassAssertableBy', JudgeClassAssertableBySchema],
|
|
7171
8300
|
['JudgedEvalCase', JudgedEvalCaseSchema],
|
|
7172
8301
|
['JudgedEvalCaseCollectionPage', JudgedEvalCaseCollectionPageSchema],
|
|
7173
8302
|
['BuildJudgedSuiteBody', BuildJudgedSuiteBodySchema],
|
|
@@ -7189,6 +8318,7 @@ export const COMPONENT_SCHEMAS: ReadonlyArray<readonly [string, JsonSchema]> = [
|
|
|
7189
8318
|
['DeriveAgentVersionBody', DeriveAgentVersionBodySchema],
|
|
7190
8319
|
['AgentPinSwaps', AgentPinSwapsSchema],
|
|
7191
8320
|
['FlowPins', FlowPinsSchema],
|
|
8321
|
+
['FlowVersionOverrides', FlowVersionOverridesSchema],
|
|
7192
8322
|
['PublishAgentBody', PublishAgentBodySchema],
|
|
7193
8323
|
['PublishAgentResult', PublishAgentResultSchema],
|
|
7194
8324
|
['UnregisterAgentResult', UnregisterAgentResultSchema],
|
|
@@ -7331,6 +8461,13 @@ export const COMPONENT_SCHEMAS: ReadonlyArray<readonly [string, JsonSchema]> = [
|
|
|
7331
8461
|
['PublishPolicyResult', PublishPolicyResultSchema],
|
|
7332
8462
|
['UnregisterPolicyResult', UnregisterPolicyResultSchema],
|
|
7333
8463
|
['ReinstatePolicyVersionResult', ReinstatePolicyVersionResultSchema],
|
|
8464
|
+
['RetentionDomain', RetentionDomainSchema],
|
|
8465
|
+
['RetentionPolicyConflict', RetentionPolicyConflictSchema],
|
|
8466
|
+
['RetentionScheduledItem', RetentionScheduledItemSchema],
|
|
8467
|
+
['RetentionScheduledPage', RetentionScheduledPageSchema],
|
|
8468
|
+
['RetentionSweepBody', RetentionSweepBodySchema],
|
|
8469
|
+
['RetentionSweepDomainBody', RetentionSweepDomainBodySchema],
|
|
8470
|
+
['RetentionSweepResult', RetentionSweepResultSchema],
|
|
7334
8471
|
['EvalKind', EvalKindSchema],
|
|
7335
8472
|
['EvalSuite', EvalSuiteSchema],
|
|
7336
8473
|
['EvalSuiteCollectionPage', EvalSuiteCollectionPageSchema],
|
|
@@ -7352,6 +8489,11 @@ export const COMPONENT_SCHEMAS: ReadonlyArray<readonly [string, JsonSchema]> = [
|
|
|
7352
8489
|
['EvalRunFlowRef', EvalRunFlowRefSchema],
|
|
7353
8490
|
['EvalBaseline', EvalBaselineSchema],
|
|
7354
8491
|
['EvalComparison', EvalComparisonSchema],
|
|
8492
|
+
['ComparisonMetric', ComparisonMetricSchema],
|
|
8493
|
+
['ComparisonCandidate', ComparisonCandidateSchema],
|
|
8494
|
+
['JudgedComparisonSummary', JudgedComparisonSummarySchema],
|
|
8495
|
+
['ComparisonCaseResult', ComparisonCaseResultSchema],
|
|
8496
|
+
['JudgedComparisonResult', JudgedComparisonResultSchema],
|
|
7355
8497
|
['EvalRun', EvalRunSchema],
|
|
7356
8498
|
['EvalRunCollectionPage', EvalRunCollectionPageSchema],
|
|
7357
8499
|
['StartEvalRunBody', StartEvalRunBodySchema],
|