@kindgi/api 0.1.2 → 0.1.4-rc.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/agent-binding.d.ts +18 -4
- package/dist/agent-binding.d.ts.map +1 -1
- package/dist/agent-pins.d.ts +48 -0
- package/dist/agent-pins.d.ts.map +1 -0
- package/dist/agent-pins.js +102 -0
- package/dist/agent-pins.js.map +1 -0
- package/dist/app.d.ts +22 -0
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +22 -3
- package/dist/app.js.map +1 -1
- package/dist/block-binding.d.ts +132 -0
- package/dist/block-binding.d.ts.map +1 -0
- package/dist/block-binding.js +4 -0
- package/dist/block-binding.js.map +1 -0
- package/dist/block-pins.d.ts +22 -0
- package/dist/block-pins.d.ts.map +1 -0
- package/dist/block-pins.js +112 -0
- package/dist/block-pins.js.map +1 -0
- package/dist/cost-binding.d.ts +100 -5
- package/dist/cost-binding.d.ts.map +1 -1
- package/dist/cost-binding.js +10 -0
- package/dist/cost-binding.js.map +1 -1
- package/dist/deploy-versions.d.ts +58 -0
- package/dist/deploy-versions.d.ts.map +1 -0
- package/dist/deploy-versions.js +91 -0
- package/dist/deploy-versions.js.map +1 -0
- package/dist/deployment-binding.d.ts +24 -3
- package/dist/deployment-binding.d.ts.map +1 -1
- package/dist/derive-agent-version.d.ts +69 -0
- package/dist/derive-agent-version.d.ts.map +1 -0
- package/dist/derive-agent-version.js +139 -0
- package/dist/derive-agent-version.js.map +1 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +17 -0
- package/dist/errors.js.map +1 -1
- package/dist/eval-case-binding.d.ts +65 -0
- package/dist/eval-case-binding.d.ts.map +1 -0
- package/dist/eval-case-binding.js +4 -0
- package/dist/eval-case-binding.js.map +1 -0
- package/dist/eval-run-binding.d.ts +30 -0
- package/dist/eval-run-binding.d.ts.map +1 -1
- package/dist/eval-run-dispatcher.d.ts +38 -3
- package/dist/eval-run-dispatcher.d.ts.map +1 -1
- package/dist/eval-run-dispatcher.js +21 -15
- package/dist/eval-run-dispatcher.js.map +1 -1
- package/dist/eval-suite-binding.d.ts +1 -1
- package/dist/eval-suite-binding.d.ts.map +1 -1
- package/dist/eval-suite-binding.js +2 -0
- package/dist/eval-suite-binding.js.map +1 -1
- package/dist/flow-binding.d.ts +10 -4
- package/dist/flow-binding.d.ts.map +1 -1
- package/dist/flow-pins.d.ts +36 -0
- package/dist/flow-pins.d.ts.map +1 -0
- package/dist/flow-pins.js +81 -0
- package/dist/flow-pins.js.map +1 -0
- package/dist/hitl-binding.d.ts +20 -5
- package/dist/hitl-binding.d.ts.map +1 -1
- package/dist/index.d.ts +19 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/judged-dispatcher.d.ts +134 -0
- package/dist/judged-dispatcher.d.ts.map +1 -0
- package/dist/judged-dispatcher.js +297 -0
- package/dist/judged-dispatcher.js.map +1 -0
- package/dist/judged-items.d.ts +86 -0
- package/dist/judged-items.d.ts.map +1 -0
- package/dist/judged-items.js +184 -0
- package/dist/judged-items.js.map +1 -0
- package/dist/judgment-binding.d.ts +316 -0
- package/dist/judgment-binding.d.ts.map +1 -0
- package/dist/judgment-binding.js +19 -0
- package/dist/judgment-binding.js.map +1 -0
- package/dist/middleware/auth.d.ts +3 -2
- package/dist/middleware/auth.d.ts.map +1 -1
- package/dist/middleware/auth.js.map +1 -1
- package/dist/middleware/idempotency.d.ts +5 -1
- package/dist/middleware/idempotency.d.ts.map +1 -1
- package/dist/middleware/idempotency.js +8 -1
- package/dist/middleware/idempotency.js.map +1 -1
- package/dist/openapi/generate.d.ts.map +1 -1
- package/dist/openapi/generate.js +4 -1
- package/dist/openapi/generate.js.map +1 -1
- package/dist/openapi/operations.d.ts.map +1 -1
- package/dist/openapi/operations.js +543 -24
- package/dist/openapi/operations.js.map +1 -1
- package/dist/openapi/schemas.d.ts +58 -0
- package/dist/openapi/schemas.d.ts.map +1 -1
- package/dist/openapi/schemas.js +1058 -27
- package/dist/openapi/schemas.js.map +1 -1
- package/dist/provenance-binding.d.ts +27 -1
- package/dist/provenance-binding.d.ts.map +1 -1
- package/dist/provenance-binding.js.map +1 -1
- package/dist/provider-binding.d.ts +12 -7
- package/dist/provider-binding.d.ts.map +1 -1
- package/dist/reviewer-binding.d.ts +10 -2
- package/dist/reviewer-binding.d.ts.map +1 -1
- package/dist/reviewer-role.d.ts +13 -0
- package/dist/reviewer-role.d.ts.map +1 -0
- package/dist/reviewer-role.js +27 -0
- package/dist/reviewer-role.js.map +1 -0
- package/dist/routes/agents.d.ts +9 -1
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/agents.js +175 -11
- package/dist/routes/agents.js.map +1 -1
- package/dist/routes/approvals.d.ts +5 -4
- package/dist/routes/approvals.d.ts.map +1 -1
- package/dist/routes/approvals.js +52 -16
- package/dist/routes/approvals.js.map +1 -1
- package/dist/routes/blocks.d.ts +19 -0
- package/dist/routes/blocks.d.ts.map +1 -0
- package/dist/routes/blocks.js +281 -0
- package/dist/routes/blocks.js.map +1 -0
- package/dist/routes/conversations.d.ts +7 -1
- package/dist/routes/conversations.d.ts.map +1 -1
- package/dist/routes/conversations.js +41 -1
- package/dist/routes/conversations.js.map +1 -1
- package/dist/routes/cost.d.ts.map +1 -1
- package/dist/routes/cost.js +142 -11
- package/dist/routes/cost.js.map +1 -1
- package/dist/routes/deployments.d.ts +3 -0
- package/dist/routes/deployments.d.ts.map +1 -1
- package/dist/routes/deployments.js +208 -55
- package/dist/routes/deployments.js.map +1 -1
- package/dist/routes/eval-comparison.d.ts +14 -0
- package/dist/routes/eval-comparison.d.ts.map +1 -0
- package/dist/routes/eval-comparison.js +87 -0
- package/dist/routes/eval-comparison.js.map +1 -0
- package/dist/routes/eval-runs.d.ts.map +1 -1
- package/dist/routes/eval-runs.js +8 -0
- package/dist/routes/eval-runs.js.map +1 -1
- package/dist/routes/flows.d.ts +13 -1
- package/dist/routes/flows.d.ts.map +1 -1
- package/dist/routes/flows.js +44 -3
- package/dist/routes/flows.js.map +1 -1
- package/dist/routes/hierarchy-errors.d.ts +35 -0
- package/dist/routes/hierarchy-errors.d.ts.map +1 -0
- package/dist/routes/hierarchy-errors.js +39 -0
- package/dist/routes/hierarchy-errors.js.map +1 -0
- package/dist/routes/identity.d.ts +7 -0
- package/dist/routes/identity.d.ts.map +1 -1
- package/dist/routes/identity.js +3 -2
- package/dist/routes/identity.js.map +1 -1
- package/dist/routes/judged-suites.d.ts +20 -0
- package/dist/routes/judged-suites.d.ts.map +1 -0
- package/dist/routes/judged-suites.js +272 -0
- package/dist/routes/judged-suites.js.map +1 -0
- package/dist/routes/judgment-context.d.ts +22 -0
- package/dist/routes/judgment-context.d.ts.map +1 -0
- package/dist/routes/judgment-context.js +88 -0
- package/dist/routes/judgment-context.js.map +1 -0
- package/dist/routes/judgment-flow-context.d.ts +32 -0
- package/dist/routes/judgment-flow-context.d.ts.map +1 -0
- package/dist/routes/judgment-flow-context.js +195 -0
- package/dist/routes/judgment-flow-context.js.map +1 -0
- package/dist/routes/judgments.d.ts +41 -0
- package/dist/routes/judgments.d.ts.map +1 -0
- package/dist/routes/judgments.js +566 -0
- package/dist/routes/judgments.js.map +1 -0
- package/dist/routes/orgs.d.ts +5 -2
- package/dist/routes/orgs.d.ts.map +1 -1
- package/dist/routes/orgs.js +38 -22
- package/dist/routes/orgs.js.map +1 -1
- package/dist/routes/policies.d.ts.map +1 -1
- package/dist/routes/policies.js +12 -1
- package/dist/routes/policies.js.map +1 -1
- package/dist/routes/projects.d.ts +10 -2
- package/dist/routes/projects.d.ts.map +1 -1
- package/dist/routes/projects.js +87 -79
- package/dist/routes/projects.js.map +1 -1
- package/dist/routes/provenance.d.ts.map +1 -1
- package/dist/routes/provenance.js +32 -1
- package/dist/routes/provenance.js.map +1 -1
- package/dist/routes/providers.d.ts.map +1 -1
- package/dist/routes/providers.js +6 -1
- package/dist/routes/providers.js.map +1 -1
- package/dist/routes/runs.d.ts +0 -7
- package/dist/routes/runs.d.ts.map +1 -1
- package/dist/routes/runs.js +65 -20
- package/dist/routes/runs.js.map +1 -1
- package/dist/routes/scope-params.d.ts +16 -1
- package/dist/routes/scope-params.d.ts.map +1 -1
- package/dist/routes/scope-params.js +28 -0
- package/dist/routes/scope-params.js.map +1 -1
- package/dist/routes/teams.d.ts +6 -2
- package/dist/routes/teams.d.ts.map +1 -1
- package/dist/routes/teams.js +77 -73
- package/dist/routes/teams.js.map +1 -1
- package/dist/types.d.ts +4 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/webhook-endpoint-binding.d.ts +11 -0
- package/dist/webhook-endpoint-binding.d.ts.map +1 -1
- package/dist/webhook-endpoint-binding.js.map +1 -1
- package/openapi.json +13316 -9299
- package/package.json +21 -21
- package/src/agent-binding.ts +19 -4
- package/src/agent-pins.ts +147 -0
- package/src/app.ts +76 -3
- package/src/block-binding.ts +137 -0
- package/src/block-pins.ts +148 -0
- package/src/cost-binding.ts +116 -5
- package/src/deploy-versions.ts +157 -0
- package/src/deployment-binding.ts +27 -3
- package/src/derive-agent-version.ts +206 -0
- package/src/errors.ts +17 -0
- package/src/eval-case-binding.ts +71 -0
- package/src/eval-run-binding.ts +33 -0
- package/src/eval-run-dispatcher.ts +57 -16
- package/src/eval-suite-binding.ts +2 -0
- package/src/flow-binding.ts +11 -4
- package/src/flow-pins.ts +113 -0
- package/src/hitl-binding.ts +20 -4
- package/src/index.ts +88 -2
- package/src/judged-dispatcher.ts +507 -0
- package/src/judged-items.ts +263 -0
- package/src/judgment-binding.ts +349 -0
- package/src/middleware/auth.ts +3 -2
- package/src/middleware/idempotency.ts +7 -1
- package/src/openapi/generate.ts +7 -1
- package/src/openapi/operations.ts +615 -24
- package/src/openapi/schemas.ts +1157 -22
- package/src/provenance-binding.ts +42 -1
- package/src/provider-binding.ts +12 -7
- package/src/reviewer-binding.ts +10 -2
- package/src/reviewer-role.ts +35 -0
- package/src/routes/agents.ts +243 -19
- package/src/routes/approvals.ts +70 -19
- package/src/routes/blocks.ts +362 -0
- package/src/routes/conversations.ts +57 -1
- package/src/routes/cost.ts +159 -21
- package/src/routes/deployments.ts +266 -56
- package/src/routes/eval-comparison.ts +101 -0
- package/src/routes/eval-runs.ts +11 -0
- package/src/routes/flows.ts +63 -5
- package/src/routes/hierarchy-errors.ts +51 -0
- package/src/routes/identity.ts +10 -2
- package/src/routes/judged-suites.ts +363 -0
- package/src/routes/judgment-context.ts +128 -0
- package/src/routes/judgment-flow-context.ts +245 -0
- package/src/routes/judgments.ts +743 -0
- package/src/routes/orgs.ts +44 -27
- package/src/routes/policies.ts +19 -0
- package/src/routes/projects.ts +106 -95
- package/src/routes/provenance.ts +48 -1
- package/src/routes/providers.ts +5 -0
- package/src/routes/runs.ts +79 -22
- package/src/routes/scope-params.ts +35 -1
- package/src/routes/teams.ts +96 -90
- package/src/types.ts +4 -3
- package/src/webhook-endpoint-binding.ts +11 -0
package/dist/openapi/schemas.js
CHANGED
|
@@ -115,6 +115,21 @@ export const RunStatusSchema = {
|
|
|
115
115
|
type: 'string',
|
|
116
116
|
enum: ['pending', 'running', 'suspended', 'completed', 'failed', 'cancelled'],
|
|
117
117
|
};
|
|
118
|
+
/**
|
|
119
|
+
* The agent a run is a turn of. A component of its own, so generated
|
|
120
|
+
* clients name it `RunAgent` (not after the `agent` property).
|
|
121
|
+
*/
|
|
122
|
+
export const RunAgentSchema = {
|
|
123
|
+
type: 'object',
|
|
124
|
+
additionalProperties: false,
|
|
125
|
+
required: ['id', 'version', 'conversationId'],
|
|
126
|
+
description: "Set on an agent's turn (an agent run, or the turn a flow's agent step started): the agent, the version that ran and the conversation. Absent on other runs, and on turns that ran before Kindgi 0.1.3.",
|
|
127
|
+
properties: {
|
|
128
|
+
id: { type: 'string', description: 'The agent id.' },
|
|
129
|
+
version: { type: 'string', description: 'The agent version that ran (semver).' },
|
|
130
|
+
conversationId: { type: 'string', format: 'uuid' },
|
|
131
|
+
},
|
|
132
|
+
};
|
|
118
133
|
export const RunSchema = {
|
|
119
134
|
type: 'object',
|
|
120
135
|
additionalProperties: false,
|
|
@@ -152,6 +167,16 @@ export const RunSchema = {
|
|
|
152
167
|
type: 'string',
|
|
153
168
|
description: 'Set on a child run: the node in the parent run that started it.',
|
|
154
169
|
},
|
|
170
|
+
agent: { $ref: '#/components/schemas/RunAgent' },
|
|
171
|
+
replayOf: {
|
|
172
|
+
type: 'string',
|
|
173
|
+
format: 'uuid',
|
|
174
|
+
description: 'Set on a replay run (an eval run re-running a past run): the run it replays.',
|
|
175
|
+
},
|
|
176
|
+
evalRunId: {
|
|
177
|
+
type: 'string',
|
|
178
|
+
description: 'Set on a replay run: the eval run that started it.',
|
|
179
|
+
},
|
|
155
180
|
publicAccessToken: {
|
|
156
181
|
type: 'string',
|
|
157
182
|
description: 'Only in the response to `POST /v1/runs`, when the deployment issues public run tokens: a read-only token for this run (and its descendants) to hand to a browser, for `GET /v1/runs/{runId}/progress` and its stream.',
|
|
@@ -507,6 +532,26 @@ export const ApprovalSchema = {
|
|
|
507
532
|
updatedAt: { type: 'string', format: 'date-time' },
|
|
508
533
|
decidedAt: { type: 'string', format: 'date-time' },
|
|
509
534
|
expiresAt: { type: 'string', format: 'date-time' },
|
|
535
|
+
decision: {
|
|
536
|
+
description: "The reviewer's decision, once one is recorded. Absent while the approval is open, and when it ended without one (it expired, or a timeout escalated it).",
|
|
537
|
+
$ref: '#/components/schemas/ApprovalDecisionRecord',
|
|
538
|
+
},
|
|
539
|
+
},
|
|
540
|
+
};
|
|
541
|
+
export const ApprovalDecisionRecordSchema = {
|
|
542
|
+
type: 'object',
|
|
543
|
+
additionalProperties: false,
|
|
544
|
+
required: ['decision', 'reviewerId', 'reviewerRoleAtDecision', 'decidedAt'],
|
|
545
|
+
properties: {
|
|
546
|
+
decision: ReviewDecisionKindSchema,
|
|
547
|
+
decidedBy: {
|
|
548
|
+
type: 'string',
|
|
549
|
+
description: "Who decided, as an actor: `user:<userId>`, the reviewer's user. The run's journal and provenance name the decider the same way. The Kindgi runtime always records it; a deployment whose HITL binding doesn't leaves it out.",
|
|
550
|
+
},
|
|
551
|
+
reviewerId: { type: 'string', format: 'uuid' },
|
|
552
|
+
reviewerRoleAtDecision: ReviewerRoleSchema,
|
|
553
|
+
decidedAt: { type: 'string', format: 'date-time' },
|
|
554
|
+
rationale: { type: 'string' },
|
|
510
555
|
},
|
|
511
556
|
};
|
|
512
557
|
export const ReviewDecisionSchema = {
|
|
@@ -544,7 +589,7 @@ export const CompleteApprovalBodySchema = {
|
|
|
544
589
|
decision: ReviewDecisionKindSchema,
|
|
545
590
|
rationale: { type: 'string' },
|
|
546
591
|
value: {
|
|
547
|
-
description:
|
|
592
|
+
description: "Payload passed to the run waitpoint (`RunBinding.completeToken`) when the approval is linked to a suspended run and the decision is `approve` or `reject`. Refused (400 `bad-input`) for an agent's tool-call or session gate (`tool-call:pending`, `agent-turn:session-hitl-gate`): those resume on the decision alone.",
|
|
548
593
|
},
|
|
549
594
|
},
|
|
550
595
|
};
|
|
@@ -803,8 +848,20 @@ export const AgentSchema = {
|
|
|
803
848
|
version: { type: 'string', description: 'Semver.' },
|
|
804
849
|
name: { type: 'string' },
|
|
805
850
|
description: { type: 'string' },
|
|
806
|
-
instructions: {
|
|
851
|
+
instructions: {
|
|
852
|
+
oneOf: [{ type: 'string', minLength: 1 }, { $ref: '#/components/schemas/PromptRef' }],
|
|
853
|
+
description: 'The system prompt (a Liquid template), or a prompt block by range whose template and parameters are used instead (pinned at publish, `pins.prompts`).',
|
|
854
|
+
},
|
|
807
855
|
parameters: { type: 'array', items: { $ref: '#/components/schemas/PromptParameter' } },
|
|
856
|
+
settings: {
|
|
857
|
+
type: 'array',
|
|
858
|
+
items: { $ref: '#/components/schemas/BlockRef' },
|
|
859
|
+
description: 'Settings blocks the agent reads, by range: tools read them as `ToolContext.settings[\'<id>\']`, templates as `settings["<id>"]`. Pinned at publish (`pins.settings`).',
|
|
860
|
+
},
|
|
861
|
+
modelSettings: {
|
|
862
|
+
$ref: '#/components/schemas/BlockRef',
|
|
863
|
+
description: "A model-settings block by range: its `temperature` and `maxOutputTokens` go into the turn's model calls. Pinned at publish.",
|
|
864
|
+
},
|
|
808
865
|
capabilities: { type: 'array', items: { $ref: '#/components/schemas/Capability' } },
|
|
809
866
|
tools: { type: 'array', items: { $ref: '#/components/schemas/ToolRef' } },
|
|
810
867
|
retrieval: { type: 'array', items: { $ref: '#/components/schemas/RetrievalIntent' } },
|
|
@@ -824,6 +881,94 @@ export const AgentSchema = {
|
|
|
824
881
|
tags: { type: 'array', items: { type: 'string' } },
|
|
825
882
|
output: { $ref: '#/components/schemas/AgentOutputSpec' },
|
|
826
883
|
toolErrors: { $ref: '#/components/schemas/ToolErrorsSpec' },
|
|
884
|
+
pins: { $ref: '#/components/schemas/AgentPins' },
|
|
885
|
+
derivedFrom: { $ref: '#/components/schemas/VersionDerivation' },
|
|
886
|
+
unregisteredAt: {
|
|
887
|
+
type: 'string',
|
|
888
|
+
format: 'date-time',
|
|
889
|
+
description: 'Present only on an unregistered version (`GET …/versions/{version}` reads those too). Unregister stops a version being chosen, not the pins that hold it: a new run naming it is refused, while a resumed run and a published version that pins it still run it.',
|
|
890
|
+
},
|
|
891
|
+
pinsDigest: {
|
|
892
|
+
type: 'string',
|
|
893
|
+
pattern: '^sha256:[0-9a-f]{64}$',
|
|
894
|
+
description: "Set by the runtime with `pins`: `sha256:<hex>` of the pins' canonical JSON (sorted keys, no whitespace). Two agent versions with the same digest run the same blocks.",
|
|
895
|
+
},
|
|
896
|
+
},
|
|
897
|
+
};
|
|
898
|
+
export const VersionDerivationSchema = {
|
|
899
|
+
description: "Set by the runtime on an agent or flow version a deploy registered in place of the definition's version, which was registered already with other pins or content (versions never change). Never in the publish body.",
|
|
900
|
+
type: 'object',
|
|
901
|
+
additionalProperties: false,
|
|
902
|
+
required: ['version', 'reason'],
|
|
903
|
+
properties: {
|
|
904
|
+
version: { type: 'string', description: 'The version the definition names.' },
|
|
905
|
+
reason: {
|
|
906
|
+
type: 'string',
|
|
907
|
+
enum: ['pins-changed', 'unpinned', 'version-taken', 'edited'],
|
|
908
|
+
description: "`pins-changed`: a block it uses has a new version; `unpinned`: the definition's version was published before pins existed; `version-taken`: the definition's version holds another definition; `edited`: derived from `version` with some data-block pins swapped (`POST /v1/agents/{agentId}/versions`).",
|
|
909
|
+
},
|
|
910
|
+
label: { type: 'string', description: 'For `edited`: a short label for the version.' },
|
|
911
|
+
by: { type: 'string', description: 'For `edited`: who derived it (`user:<id>`).' },
|
|
912
|
+
},
|
|
913
|
+
};
|
|
914
|
+
export const DeriveAgentVersionBodySchema = {
|
|
915
|
+
description: "Derive a new agent version from a pinned one with some data-block pins swapped: an expert's edit reaching an agent with no code change.",
|
|
916
|
+
type: 'object',
|
|
917
|
+
additionalProperties: false,
|
|
918
|
+
required: ['from', 'pins'],
|
|
919
|
+
properties: {
|
|
920
|
+
from: { type: 'string', description: 'The version to derive from (it must be pinned).' },
|
|
921
|
+
pins: { $ref: '#/components/schemas/AgentPinSwaps' },
|
|
922
|
+
label: { type: 'string', description: 'A short label for the new version.' },
|
|
923
|
+
projectId: {
|
|
924
|
+
type: 'string',
|
|
925
|
+
format: 'uuid',
|
|
926
|
+
description: "The agent's project, when the runtime doesn't record it on the version.",
|
|
927
|
+
},
|
|
928
|
+
},
|
|
929
|
+
};
|
|
930
|
+
const PinMapSchema = {
|
|
931
|
+
type: 'object',
|
|
932
|
+
additionalProperties: { type: 'string' },
|
|
933
|
+
};
|
|
934
|
+
export const AgentPinSwapsSchema = {
|
|
935
|
+
description: 'The data-block pins to swap, by block id → exact version. Only blocks the version already references; tool pins come from code.',
|
|
936
|
+
type: 'object',
|
|
937
|
+
additionalProperties: false,
|
|
938
|
+
properties: {
|
|
939
|
+
prompts: { ...PinMapSchema, description: 'Prompt block id → exact version.' },
|
|
940
|
+
settings: { ...PinMapSchema, description: 'Settings block id → exact version.' },
|
|
941
|
+
},
|
|
942
|
+
};
|
|
943
|
+
export const AgentPinsSchema = {
|
|
944
|
+
description: 'The exact block versions an agent version runs: its lockfile. Set by the runtime when the version is published, never in the publish body: each tool range resolves once to the version every run of that agent version uses, so a new tool version reaches the agent only through a new agent version. Absent on a version published before pins existed (its ranges resolve per run).',
|
|
945
|
+
type: 'object',
|
|
946
|
+
additionalProperties: false,
|
|
947
|
+
required: ['tools', 'prompts', 'settings'],
|
|
948
|
+
properties: {
|
|
949
|
+
tools: { ...PinMapSchema, description: 'Tool id → exact version.' },
|
|
950
|
+
prompts: { ...PinMapSchema, description: 'Prompt block id → exact version.' },
|
|
951
|
+
settings: { ...PinMapSchema, description: 'Settings block id → exact version.' },
|
|
952
|
+
},
|
|
953
|
+
};
|
|
954
|
+
export const PromptRefSchema = {
|
|
955
|
+
description: "A prompt block an agent's instructions come from, by id and semver range.",
|
|
956
|
+
type: 'object',
|
|
957
|
+
additionalProperties: false,
|
|
958
|
+
required: ['prompt', 'version'],
|
|
959
|
+
properties: {
|
|
960
|
+
prompt: { type: 'string', description: 'The prompt block id.' },
|
|
961
|
+
version: { type: 'string', description: 'A semver range (`^1.0.0`, `1.2.0`).' },
|
|
962
|
+
},
|
|
963
|
+
};
|
|
964
|
+
export const BlockRefSchema = {
|
|
965
|
+
description: 'A settings block an agent reads, by id and semver range.',
|
|
966
|
+
type: 'object',
|
|
967
|
+
additionalProperties: false,
|
|
968
|
+
required: ['id', 'version'],
|
|
969
|
+
properties: {
|
|
970
|
+
id: { type: 'string', description: 'The settings block id.' },
|
|
971
|
+
version: { type: 'string', description: 'A semver range (`^1.0.0`, `1.2.0`).' },
|
|
827
972
|
},
|
|
828
973
|
};
|
|
829
974
|
export const PublishAgentBodySchema = {
|
|
@@ -847,8 +992,20 @@ export const PublishAgentBodySchema = {
|
|
|
847
992
|
name: { type: 'string' },
|
|
848
993
|
description: { type: 'string' },
|
|
849
994
|
projectId: ContentProjectIdProperty,
|
|
850
|
-
instructions: {
|
|
995
|
+
instructions: {
|
|
996
|
+
oneOf: [{ type: 'string', minLength: 1 }, { $ref: '#/components/schemas/PromptRef' }],
|
|
997
|
+
description: 'The system prompt (a Liquid template), or a prompt block by range whose template and parameters are used instead (pinned at publish, `pins.prompts`).',
|
|
998
|
+
},
|
|
851
999
|
parameters: { type: 'array', items: { $ref: '#/components/schemas/PromptParameter' } },
|
|
1000
|
+
settings: {
|
|
1001
|
+
type: 'array',
|
|
1002
|
+
items: { $ref: '#/components/schemas/BlockRef' },
|
|
1003
|
+
description: 'Settings blocks the agent reads, by range: tools read them as `ToolContext.settings[\'<id>\']`, templates as `settings["<id>"]`. Pinned at publish (`pins.settings`).',
|
|
1004
|
+
},
|
|
1005
|
+
modelSettings: {
|
|
1006
|
+
$ref: '#/components/schemas/BlockRef',
|
|
1007
|
+
description: "A model-settings block by range: its `temperature` and `maxOutputTokens` go into the turn's model calls. Pinned at publish.",
|
|
1008
|
+
},
|
|
852
1009
|
capabilities: { type: 'array', items: { $ref: '#/components/schemas/Capability' } },
|
|
853
1010
|
tools: { type: 'array', items: { $ref: '#/components/schemas/ToolRef' } },
|
|
854
1011
|
retrieval: { type: 'array', items: { $ref: '#/components/schemas/RetrievalIntent' } },
|
|
@@ -973,6 +1130,31 @@ export const FlowSchema = {
|
|
|
973
1130
|
edges: { type: 'array', items: { $ref: '#/components/schemas/FlowEdge' } },
|
|
974
1131
|
maxParallelism: { type: 'integer', minimum: 1 },
|
|
975
1132
|
metadata: { type: 'object', additionalProperties: true },
|
|
1133
|
+
pins: { $ref: '#/components/schemas/FlowPins' },
|
|
1134
|
+
pinsDigest: {
|
|
1135
|
+
type: 'string',
|
|
1136
|
+
pattern: '^sha256:[0-9a-f]{64}$',
|
|
1137
|
+
description: "Set by the runtime with `pins`: `sha256:<hex>` of the pins' canonical JSON (sorted keys, no whitespace).",
|
|
1138
|
+
},
|
|
1139
|
+
derivedFrom: { $ref: '#/components/schemas/VersionDerivation' },
|
|
1140
|
+
unregisteredAt: {
|
|
1141
|
+
type: 'string',
|
|
1142
|
+
format: 'date-time',
|
|
1143
|
+
description: 'Present only on an unregistered version (`GET …/versions/{version}` reads those too). Unregister stops a version being chosen, not the pins that hold it: a new run naming it is refused, while a resumed run and a published version that pins it still run it.',
|
|
1144
|
+
},
|
|
1145
|
+
},
|
|
1146
|
+
};
|
|
1147
|
+
export const FlowPinsSchema = {
|
|
1148
|
+
description: 'The exact tool and agent versions a flow version runs: its lockfile. Set by the runtime when the version is published, never in the publish body: each tool the flow runs, and each agent it runs at no named version, resolves once to its latest version then, which every run of that flow version uses. Absent on a version published before pins existed (it binds the latest versions per run).',
|
|
1149
|
+
type: 'object',
|
|
1150
|
+
additionalProperties: false,
|
|
1151
|
+
required: ['tools', 'agents'],
|
|
1152
|
+
properties: {
|
|
1153
|
+
tools: { ...PinMapSchema, description: 'Tool id → exact version.' },
|
|
1154
|
+
agents: {
|
|
1155
|
+
...PinMapSchema,
|
|
1156
|
+
description: 'Agent id → exact version, for agent nodes that name no version.',
|
|
1157
|
+
},
|
|
976
1158
|
},
|
|
977
1159
|
};
|
|
978
1160
|
export const PublishFlowBodySchema = {
|
|
@@ -1497,6 +1679,11 @@ export const ConversationSchema = {
|
|
|
1497
1679
|
agentVersion: { type: 'string', description: 'Semver.' },
|
|
1498
1680
|
title: { type: 'string' },
|
|
1499
1681
|
participantId: { type: 'string' },
|
|
1682
|
+
projectId: {
|
|
1683
|
+
type: 'string',
|
|
1684
|
+
format: 'uuid',
|
|
1685
|
+
description: "The project the conversation is in: the project of the run that opened it, or `projectId` on open (the tenant's Default project when omitted). Absent on conversations from before Kindgi 0.1.3; those are listed only without a scope.",
|
|
1686
|
+
},
|
|
1500
1687
|
scope: {
|
|
1501
1688
|
type: 'object',
|
|
1502
1689
|
additionalProperties: true,
|
|
@@ -1548,6 +1735,11 @@ export const OpenConversationBodySchema = {
|
|
|
1548
1735
|
type: 'string',
|
|
1549
1736
|
description: 'Optional. Defaults to `"Untitled conversation"` when omitted.',
|
|
1550
1737
|
},
|
|
1738
|
+
projectId: {
|
|
1739
|
+
type: 'string',
|
|
1740
|
+
format: 'uuid',
|
|
1741
|
+
description: "The project the conversation is in; `GET /v1/conversations?scopeKind=project&scopeId=…` lists it. A project of the caller's tenant, else `400 bad-input`. Omitted: the tenant's Default project, as for a run.",
|
|
1742
|
+
},
|
|
1551
1743
|
scope: {
|
|
1552
1744
|
type: 'object',
|
|
1553
1745
|
additionalProperties: true,
|
|
@@ -1637,29 +1829,459 @@ export const ObservationSchema = {
|
|
|
1637
1829
|
model: { type: 'string' },
|
|
1638
1830
|
},
|
|
1639
1831
|
},
|
|
1640
|
-
provenanceRef: {
|
|
1641
|
-
type: 'object',
|
|
1642
|
-
additionalProperties: false,
|
|
1643
|
-
required: ['runId'],
|
|
1644
|
-
properties: {
|
|
1645
|
-
runId: { type: 'string', format: 'uuid' },
|
|
1646
|
-
provenanceId: { type: 'string', format: 'uuid' },
|
|
1832
|
+
provenanceRef: {
|
|
1833
|
+
type: 'object',
|
|
1834
|
+
additionalProperties: false,
|
|
1835
|
+
required: ['runId'],
|
|
1836
|
+
properties: {
|
|
1837
|
+
runId: { type: 'string', format: 'uuid' },
|
|
1838
|
+
provenanceId: { type: 'string', format: 'uuid' },
|
|
1839
|
+
},
|
|
1840
|
+
},
|
|
1841
|
+
observedAt: { type: 'string', format: 'date-time' },
|
|
1842
|
+
},
|
|
1843
|
+
};
|
|
1844
|
+
export const ObservationCollectionPageSchema = {
|
|
1845
|
+
type: 'object',
|
|
1846
|
+
additionalProperties: false,
|
|
1847
|
+
required: ['data', 'hasMore'],
|
|
1848
|
+
properties: {
|
|
1849
|
+
data: { type: 'array', items: { $ref: '#/components/schemas/Observation' } },
|
|
1850
|
+
nextCursor: {
|
|
1851
|
+
type: 'string',
|
|
1852
|
+
description: 'Opaque ISO-timestamp cursor. Treat as opaque on the client.',
|
|
1853
|
+
},
|
|
1854
|
+
hasMore: { type: 'boolean' },
|
|
1855
|
+
},
|
|
1856
|
+
};
|
|
1857
|
+
// ---------------- judgments + judge classes ----------------
|
|
1858
|
+
export const JudgeClassScopeSchema = {
|
|
1859
|
+
description: 'Where a judge class applies: the whole tenant, one project, or one agent in a project.',
|
|
1860
|
+
oneOf: [
|
|
1861
|
+
{
|
|
1862
|
+
type: 'object',
|
|
1863
|
+
additionalProperties: false,
|
|
1864
|
+
required: ['kind'],
|
|
1865
|
+
properties: { kind: { type: 'string', const: 'tenant' } },
|
|
1866
|
+
},
|
|
1867
|
+
{
|
|
1868
|
+
type: 'object',
|
|
1869
|
+
additionalProperties: false,
|
|
1870
|
+
required: ['kind', 'projectId'],
|
|
1871
|
+
properties: {
|
|
1872
|
+
kind: { type: 'string', const: 'project' },
|
|
1873
|
+
projectId: { type: 'string', minLength: 1 },
|
|
1874
|
+
},
|
|
1875
|
+
},
|
|
1876
|
+
{
|
|
1877
|
+
type: 'object',
|
|
1878
|
+
additionalProperties: false,
|
|
1879
|
+
required: ['kind', 'projectId', 'agentId'],
|
|
1880
|
+
properties: {
|
|
1881
|
+
kind: { type: 'string', const: 'agent' },
|
|
1882
|
+
projectId: { type: 'string', minLength: 1 },
|
|
1883
|
+
agentId: { type: 'string', minLength: 1 },
|
|
1884
|
+
},
|
|
1885
|
+
},
|
|
1886
|
+
],
|
|
1887
|
+
};
|
|
1888
|
+
export const JudgeClassSchema = {
|
|
1889
|
+
type: 'object',
|
|
1890
|
+
additionalProperties: false,
|
|
1891
|
+
required: ['id', 'tenantId', 'scope', 'name', 'weight', 'createdAt', 'updatedAt'],
|
|
1892
|
+
properties: {
|
|
1893
|
+
id: { type: 'string' },
|
|
1894
|
+
tenantId: { type: 'string' },
|
|
1895
|
+
scope: { $ref: '#/components/schemas/JudgeClassScope' },
|
|
1896
|
+
name: {
|
|
1897
|
+
type: 'string',
|
|
1898
|
+
description: 'The deployment\'s own word for the class: "expert", "user", "arbitrator".',
|
|
1899
|
+
},
|
|
1900
|
+
weight: {
|
|
1901
|
+
type: 'number',
|
|
1902
|
+
minimum: 0,
|
|
1903
|
+
description: 'How much a judgment of this class counts, relative to the others.',
|
|
1904
|
+
},
|
|
1905
|
+
description: { type: 'string' },
|
|
1906
|
+
createdAt: { type: 'string', format: 'date-time' },
|
|
1907
|
+
updatedAt: { type: 'string', format: 'date-time' },
|
|
1908
|
+
unregisteredAt: {
|
|
1909
|
+
type: 'string',
|
|
1910
|
+
format: 'date-time',
|
|
1911
|
+
description: 'Set when the class was retired.',
|
|
1912
|
+
},
|
|
1913
|
+
},
|
|
1914
|
+
};
|
|
1915
|
+
export const JudgeClassCollectionPageSchema = {
|
|
1916
|
+
type: 'object',
|
|
1917
|
+
additionalProperties: false,
|
|
1918
|
+
required: ['data', 'hasMore'],
|
|
1919
|
+
properties: {
|
|
1920
|
+
data: { type: 'array', items: { $ref: '#/components/schemas/JudgeClass' } },
|
|
1921
|
+
nextCursor: { type: 'string', description: 'Opaque cursor. Treat as opaque on the client.' },
|
|
1922
|
+
hasMore: { type: 'boolean' },
|
|
1923
|
+
},
|
|
1924
|
+
};
|
|
1925
|
+
export const CreateJudgeClassBodySchema = {
|
|
1926
|
+
type: 'object',
|
|
1927
|
+
additionalProperties: false,
|
|
1928
|
+
required: ['scope', 'name', 'weight'],
|
|
1929
|
+
properties: {
|
|
1930
|
+
scope: { $ref: '#/components/schemas/JudgeClassScope' },
|
|
1931
|
+
name: { type: 'string', minLength: 1, maxLength: 100 },
|
|
1932
|
+
weight: { type: 'number', minimum: 0 },
|
|
1933
|
+
description: { type: 'string' },
|
|
1934
|
+
},
|
|
1935
|
+
};
|
|
1936
|
+
export const UpdateJudgeClassBodySchema = {
|
|
1937
|
+
type: 'object',
|
|
1938
|
+
additionalProperties: false,
|
|
1939
|
+
minProperties: 1,
|
|
1940
|
+
properties: {
|
|
1941
|
+
weight: { type: 'number', minimum: 0 },
|
|
1942
|
+
description: { type: 'string' },
|
|
1943
|
+
},
|
|
1944
|
+
};
|
|
1945
|
+
export const UnregisterJudgeClassResultSchema = {
|
|
1946
|
+
type: 'object',
|
|
1947
|
+
additionalProperties: false,
|
|
1948
|
+
required: ['judgeClassId', 'unregistered'],
|
|
1949
|
+
properties: {
|
|
1950
|
+
judgeClassId: { type: 'string' },
|
|
1951
|
+
unregistered: { type: 'boolean', const: true },
|
|
1952
|
+
},
|
|
1953
|
+
};
|
|
1954
|
+
export const JudgedSubjectSchema = {
|
|
1955
|
+
type: 'object',
|
|
1956
|
+
additionalProperties: false,
|
|
1957
|
+
required: ['kind', 'id', 'version'],
|
|
1958
|
+
description: 'What a judged run ran: an agent at a version, or a flow at a version.',
|
|
1959
|
+
properties: {
|
|
1960
|
+
kind: { type: 'string', enum: ['agent', 'flow'] },
|
|
1961
|
+
id: { type: 'string' },
|
|
1962
|
+
version: { type: 'string' },
|
|
1963
|
+
},
|
|
1964
|
+
};
|
|
1965
|
+
export const JudgedItemSchema = {
|
|
1966
|
+
type: 'object',
|
|
1967
|
+
additionalProperties: false,
|
|
1968
|
+
required: ['key'],
|
|
1969
|
+
description: "The judged item of a run's output.",
|
|
1970
|
+
properties: {
|
|
1971
|
+
key: { type: 'string', minLength: 1, description: "The caller's stable id for the item." },
|
|
1972
|
+
pointer: {
|
|
1973
|
+
type: 'string',
|
|
1974
|
+
description: 'Where the item is in the run\'s output, as a JSON Pointer (RFC 6901), e.g. `/matches/2`. `""` is the whole output.',
|
|
1975
|
+
},
|
|
1976
|
+
rank: {
|
|
1977
|
+
type: 'integer',
|
|
1978
|
+
minimum: 0,
|
|
1979
|
+
description: "The item's position in a ranked list (0 = first).",
|
|
1980
|
+
},
|
|
1981
|
+
},
|
|
1982
|
+
};
|
|
1983
|
+
export const JudgmentAssertedBySchema = {
|
|
1984
|
+
type: 'object',
|
|
1985
|
+
additionalProperties: false,
|
|
1986
|
+
required: ['kind', 'id'],
|
|
1987
|
+
description: 'Who asserted a judgment: the authenticated caller, never a typed name.',
|
|
1988
|
+
properties: {
|
|
1989
|
+
kind: { type: 'string', enum: ['user', 'service'] },
|
|
1990
|
+
id: {
|
|
1991
|
+
type: 'string',
|
|
1992
|
+
description: 'A user id, or for a service token its token or session id.',
|
|
1993
|
+
},
|
|
1994
|
+
},
|
|
1995
|
+
};
|
|
1996
|
+
export const JudgmentSchema = {
|
|
1997
|
+
type: 'object',
|
|
1998
|
+
additionalProperties: false,
|
|
1999
|
+
required: [
|
|
2000
|
+
'id',
|
|
2001
|
+
'tenantId',
|
|
2002
|
+
'projectId',
|
|
2003
|
+
'runId',
|
|
2004
|
+
'subject',
|
|
2005
|
+
'item',
|
|
2006
|
+
'verdict',
|
|
2007
|
+
'assertedBy',
|
|
2008
|
+
'createdAt',
|
|
2009
|
+
],
|
|
2010
|
+
properties: {
|
|
2011
|
+
id: { type: 'string' },
|
|
2012
|
+
tenantId: { type: 'string' },
|
|
2013
|
+
projectId: { type: 'string' },
|
|
2014
|
+
runId: { type: 'string' },
|
|
2015
|
+
subject: { $ref: '#/components/schemas/JudgedSubject' },
|
|
2016
|
+
item: { $ref: '#/components/schemas/JudgedItem' },
|
|
2017
|
+
verdict: { type: 'string', enum: ['yes', 'no'] },
|
|
2018
|
+
reason: { type: 'string' },
|
|
2019
|
+
judgeClassId: {
|
|
2020
|
+
type: 'string',
|
|
2021
|
+
description: 'The judge class the judgment is recorded under. Absent when unclassified (counts with weight 1).',
|
|
2022
|
+
},
|
|
2023
|
+
assertedBy: { $ref: '#/components/schemas/JudgmentAssertedBy' },
|
|
2024
|
+
participantId: {
|
|
2025
|
+
type: 'string',
|
|
2026
|
+
description: "The app's opaque id for its end user who judged, when an app judged on their behalf.",
|
|
2027
|
+
},
|
|
2028
|
+
createdAt: { type: 'string', format: 'date-time' },
|
|
2029
|
+
unregisteredAt: {
|
|
2030
|
+
type: 'string',
|
|
2031
|
+
format: 'date-time',
|
|
2032
|
+
description: 'Set when the judgment was removed or superseded.',
|
|
2033
|
+
},
|
|
2034
|
+
supersededBy: { type: 'string', description: 'The judgment that replaced this one.' },
|
|
2035
|
+
},
|
|
2036
|
+
};
|
|
2037
|
+
export const JudgedRunContextSchema = {
|
|
2038
|
+
type: 'object',
|
|
2039
|
+
additionalProperties: false,
|
|
2040
|
+
description: 'What a judged run needs besides its input to be replayed, captured when it was first judged. For an agent turn: the conversation before it, what its retrievals returned, and the decision at its session approval gate. For a flow run: its tool calls with their results.',
|
|
2041
|
+
properties: {
|
|
2042
|
+
history: {
|
|
2043
|
+
type: 'array',
|
|
2044
|
+
items: {},
|
|
2045
|
+
description: "The conversation's messages before the turn, oldest first (at most the last 200).",
|
|
2046
|
+
},
|
|
2047
|
+
historyTruncated: {
|
|
2048
|
+
type: 'boolean',
|
|
2049
|
+
description: 'Whether older messages were left out of `history`.',
|
|
2050
|
+
},
|
|
2051
|
+
retrieved: { description: "What the turn's retrievals returned." },
|
|
2052
|
+
sessionApproval: {
|
|
2053
|
+
type: 'object',
|
|
2054
|
+
additionalProperties: false,
|
|
2055
|
+
required: ['approved'],
|
|
2056
|
+
description: "The reviewer's decision at the turn's session approval gate, when the turn waited on one. A replay of the turn follows it.",
|
|
2057
|
+
properties: {
|
|
2058
|
+
approved: { type: 'boolean' },
|
|
2059
|
+
rationale: { type: 'string', description: "The reviewer's reason for a rejection." },
|
|
2060
|
+
},
|
|
2061
|
+
},
|
|
2062
|
+
flow: {
|
|
2063
|
+
type: 'object',
|
|
2064
|
+
additionalProperties: false,
|
|
2065
|
+
required: ['calls', 'steps'],
|
|
2066
|
+
description: "For a flow run: what it did, kept at its first judgment so it can be replayed. Every tool call it made with its result (at its tool nodes, in its agent steps' turns and in its sub-flows), at most 500, and its agent steps.",
|
|
2067
|
+
properties: {
|
|
2068
|
+
calls: {
|
|
2069
|
+
type: 'array',
|
|
2070
|
+
items: {
|
|
2071
|
+
type: 'object',
|
|
2072
|
+
additionalProperties: false,
|
|
2073
|
+
required: ['runId', 'toolId'],
|
|
2074
|
+
properties: {
|
|
2075
|
+
runId: {
|
|
2076
|
+
type: 'string',
|
|
2077
|
+
description: "The run that made it: the flow run, a sub-flow's, or an agent step's turn.",
|
|
2078
|
+
},
|
|
2079
|
+
nodeId: {
|
|
2080
|
+
type: 'string',
|
|
2081
|
+
description: 'The tool node that made it, or the agent step whose turn did.',
|
|
2082
|
+
},
|
|
2083
|
+
scope: { type: 'string', description: 'The loop iteration, in a loop body.' },
|
|
2084
|
+
toolId: { type: 'string' },
|
|
2085
|
+
arguments: {},
|
|
2086
|
+
result: {},
|
|
2087
|
+
},
|
|
2088
|
+
},
|
|
2089
|
+
},
|
|
2090
|
+
steps: {
|
|
2091
|
+
type: 'array',
|
|
2092
|
+
items: {
|
|
2093
|
+
type: 'object',
|
|
2094
|
+
additionalProperties: false,
|
|
2095
|
+
required: ['runId', 'agentId', 'agentVersion'],
|
|
2096
|
+
properties: {
|
|
2097
|
+
runId: { type: 'string' },
|
|
2098
|
+
nodeId: { type: 'string' },
|
|
2099
|
+
scope: { type: 'string' },
|
|
2100
|
+
agentId: { type: 'string' },
|
|
2101
|
+
agentVersion: { type: 'string' },
|
|
2102
|
+
retrieved: { description: "What the step's turn retrieved." },
|
|
2103
|
+
},
|
|
2104
|
+
},
|
|
2105
|
+
},
|
|
2106
|
+
truncated: { type: 'boolean', description: 'More calls were made than were kept.' },
|
|
2107
|
+
},
|
|
2108
|
+
},
|
|
2109
|
+
},
|
|
2110
|
+
};
|
|
2111
|
+
export const JudgedRunCopySchema = {
|
|
2112
|
+
type: 'object',
|
|
2113
|
+
additionalProperties: false,
|
|
2114
|
+
required: ['runId', 'subject', 'input', 'output', 'capturedAt'],
|
|
2115
|
+
description: "The stored copy of a judged run's input and output, taken when it was first judged.",
|
|
2116
|
+
properties: {
|
|
2117
|
+
runId: { type: 'string' },
|
|
2118
|
+
subject: { $ref: '#/components/schemas/JudgedSubject' },
|
|
2119
|
+
input: {},
|
|
2120
|
+
context: {
|
|
2121
|
+
$ref: '#/components/schemas/JudgedRunContext',
|
|
2122
|
+
},
|
|
2123
|
+
output: {},
|
|
2124
|
+
capturedAt: { type: 'string', format: 'date-time' },
|
|
2125
|
+
},
|
|
2126
|
+
};
|
|
2127
|
+
export const JudgmentWithCopiesSchema = {
|
|
2128
|
+
description: 'A judgment with the stored copies of what was judged.',
|
|
2129
|
+
allOf: [
|
|
2130
|
+
{ $ref: '#/components/schemas/Judgment' },
|
|
2131
|
+
{
|
|
2132
|
+
type: 'object',
|
|
2133
|
+
required: ['run'],
|
|
2134
|
+
properties: {
|
|
2135
|
+
run: { $ref: '#/components/schemas/JudgedRunCopy' },
|
|
2136
|
+
itemValue: {
|
|
2137
|
+
description: "The judged item's value, when the judgment pointed at it.",
|
|
2138
|
+
},
|
|
2139
|
+
},
|
|
2140
|
+
},
|
|
2141
|
+
],
|
|
2142
|
+
};
|
|
2143
|
+
export const JudgmentCollectionPageSchema = {
|
|
2144
|
+
type: 'object',
|
|
2145
|
+
additionalProperties: false,
|
|
2146
|
+
required: ['data', 'hasMore'],
|
|
2147
|
+
properties: {
|
|
2148
|
+
data: { type: 'array', items: { $ref: '#/components/schemas/Judgment' } },
|
|
2149
|
+
nextCursor: { type: 'string', description: 'Opaque cursor. Treat as opaque on the client.' },
|
|
2150
|
+
hasMore: { type: 'boolean' },
|
|
2151
|
+
},
|
|
2152
|
+
};
|
|
2153
|
+
export const CreateJudgmentBodySchema = {
|
|
2154
|
+
type: 'object',
|
|
2155
|
+
additionalProperties: false,
|
|
2156
|
+
required: ['runId', 'item', 'verdict'],
|
|
2157
|
+
properties: {
|
|
2158
|
+
runId: { type: 'string', minLength: 1 },
|
|
2159
|
+
item: { $ref: '#/components/schemas/JudgedItem' },
|
|
2160
|
+
verdict: { type: 'string', enum: ['yes', 'no'] },
|
|
2161
|
+
reason: { type: 'string', maxLength: 4000 },
|
|
2162
|
+
judgeClassId: {
|
|
2163
|
+
type: 'string',
|
|
2164
|
+
minLength: 1,
|
|
2165
|
+
description: 'Optional. When given it must exist and apply to the run.',
|
|
2166
|
+
},
|
|
2167
|
+
participantId: {
|
|
2168
|
+
type: 'string',
|
|
2169
|
+
minLength: 1,
|
|
2170
|
+
description: "An app's opaque id for its end user, when judging on their behalf.",
|
|
2171
|
+
},
|
|
2172
|
+
},
|
|
2173
|
+
};
|
|
2174
|
+
export const UnregisterJudgmentResultSchema = {
|
|
2175
|
+
type: 'object',
|
|
2176
|
+
additionalProperties: false,
|
|
2177
|
+
required: ['judgmentId', 'unregistered'],
|
|
2178
|
+
properties: {
|
|
2179
|
+
judgmentId: { type: 'string' },
|
|
2180
|
+
unregistered: { type: 'boolean', const: true },
|
|
2181
|
+
},
|
|
2182
|
+
};
|
|
2183
|
+
export const JudgedItemSummarySchema = {
|
|
2184
|
+
type: 'object',
|
|
2185
|
+
additionalProperties: false,
|
|
2186
|
+
required: ['key', 'yes', 'no', 'yesWeight', 'totalWeight', 'reasons'],
|
|
2187
|
+
description: "The judgments of one item of a case's output, summed up.",
|
|
2188
|
+
properties: {
|
|
2189
|
+
key: { type: 'string' },
|
|
2190
|
+
pointer: { type: 'string' },
|
|
2191
|
+
rank: { type: 'integer', minimum: 0 },
|
|
2192
|
+
yes: { type: 'integer', minimum: 0, description: 'How many judgments said yes.' },
|
|
2193
|
+
no: { type: 'integer', minimum: 0, description: 'How many judgments said no.' },
|
|
2194
|
+
yesWeight: {
|
|
2195
|
+
type: 'number',
|
|
2196
|
+
description: 'The weight behind "yes" (an unclassified judgment counts 1).',
|
|
2197
|
+
},
|
|
2198
|
+
totalWeight: { type: 'number', description: 'The weight behind all judgments of the item.' },
|
|
2199
|
+
reasons: {
|
|
2200
|
+
type: 'array',
|
|
2201
|
+
description: 'The reasons given, newest first.',
|
|
2202
|
+
items: {
|
|
2203
|
+
type: 'object',
|
|
2204
|
+
additionalProperties: false,
|
|
2205
|
+
required: ['verdict', 'reason'],
|
|
2206
|
+
properties: {
|
|
2207
|
+
verdict: { type: 'string', enum: ['yes', 'no'] },
|
|
2208
|
+
reason: { type: 'string' },
|
|
2209
|
+
},
|
|
1647
2210
|
},
|
|
1648
2211
|
},
|
|
1649
|
-
observedAt: { type: 'string', format: 'date-time' },
|
|
1650
2212
|
},
|
|
1651
2213
|
};
|
|
1652
|
-
export const
|
|
2214
|
+
export const JudgedEvalCaseSchema = {
|
|
2215
|
+
type: 'object',
|
|
2216
|
+
additionalProperties: false,
|
|
2217
|
+
required: ['caseId', 'subject', 'input', 'output', 'items'],
|
|
2218
|
+
description: "One case of a `judged` eval suite: a copy of a judged run with its items' judgments summed up.",
|
|
2219
|
+
properties: {
|
|
2220
|
+
caseId: { type: 'string', description: "The judged run's id." },
|
|
2221
|
+
subject: { $ref: '#/components/schemas/JudgedSubject' },
|
|
2222
|
+
input: {},
|
|
2223
|
+
context: { $ref: '#/components/schemas/JudgedRunContext' },
|
|
2224
|
+
output: {},
|
|
2225
|
+
items: { type: 'array', items: { $ref: '#/components/schemas/JudgedItemSummary' } },
|
|
2226
|
+
},
|
|
2227
|
+
};
|
|
2228
|
+
export const JudgedEvalCaseCollectionPageSchema = {
|
|
1653
2229
|
type: 'object',
|
|
1654
2230
|
additionalProperties: false,
|
|
1655
2231
|
required: ['data', 'hasMore'],
|
|
1656
2232
|
properties: {
|
|
1657
|
-
data: { type: 'array', items: { $ref: '#/components/schemas/
|
|
1658
|
-
nextCursor: {
|
|
2233
|
+
data: { type: 'array', items: { $ref: '#/components/schemas/JudgedEvalCase' } },
|
|
2234
|
+
nextCursor: { type: 'string', description: 'Opaque cursor. Treat as opaque on the client.' },
|
|
2235
|
+
hasMore: { type: 'boolean' },
|
|
2236
|
+
},
|
|
2237
|
+
};
|
|
2238
|
+
export const BuildJudgedSuiteBodySchema = {
|
|
2239
|
+
type: 'object',
|
|
2240
|
+
additionalProperties: false,
|
|
2241
|
+
required: ['version', 'projectId'],
|
|
2242
|
+
description: 'Name the agent (`agentId`) or the flow (`flowId`) whose judged runs to use.',
|
|
2243
|
+
properties: {
|
|
2244
|
+
version: { type: 'string', description: 'Semver version to publish, e.g. `1.0.0`.' },
|
|
2245
|
+
projectId: { type: 'string', minLength: 1 },
|
|
2246
|
+
agentId: { type: 'string', minLength: 1 },
|
|
2247
|
+
agentVersion: { type: 'string', minLength: 1, description: 'Needs `agentId`.' },
|
|
2248
|
+
flowId: { type: 'string', minLength: 1 },
|
|
2249
|
+
since: {
|
|
1659
2250
|
type: 'string',
|
|
1660
|
-
|
|
2251
|
+
format: 'date-time',
|
|
2252
|
+
description: 'Runs first judged at or after this time.',
|
|
2253
|
+
},
|
|
2254
|
+
until: {
|
|
2255
|
+
type: 'string',
|
|
2256
|
+
format: 'date-time',
|
|
2257
|
+
description: 'Runs first judged before this time.',
|
|
2258
|
+
},
|
|
2259
|
+
judgeClassIds: {
|
|
2260
|
+
type: 'array',
|
|
2261
|
+
items: { type: 'string', minLength: 1 },
|
|
2262
|
+
description: 'Count only judgments recorded under these judge classes.',
|
|
2263
|
+
},
|
|
2264
|
+
minJudgments: {
|
|
2265
|
+
type: 'integer',
|
|
2266
|
+
minimum: 1,
|
|
2267
|
+
description: 'Leave out runs with fewer counted judgments. Default 1.',
|
|
2268
|
+
},
|
|
2269
|
+
description: { type: 'string' },
|
|
2270
|
+
},
|
|
2271
|
+
};
|
|
2272
|
+
export const BuildJudgedSuiteResultSchema = {
|
|
2273
|
+
type: 'object',
|
|
2274
|
+
additionalProperties: false,
|
|
2275
|
+
required: ['suiteId', 'version', 'kind', 'caseCount', 'truncated'],
|
|
2276
|
+
properties: {
|
|
2277
|
+
suiteId: { type: 'string' },
|
|
2278
|
+
version: { type: 'string' },
|
|
2279
|
+
kind: { type: 'string', enum: ['judged'] },
|
|
2280
|
+
caseCount: { type: 'integer', minimum: 0 },
|
|
2281
|
+
truncated: {
|
|
2282
|
+
type: 'boolean',
|
|
2283
|
+
description: 'Whether more judged runs matched than the 1000 cases a set holds.',
|
|
1661
2284
|
},
|
|
1662
|
-
hasMore: { type: 'boolean' },
|
|
1663
2285
|
},
|
|
1664
2286
|
};
|
|
1665
2287
|
// ---------------- memory ----------------
|
|
@@ -2253,6 +2875,11 @@ export const ProvenanceRecordMetadataSchema = {
|
|
|
2253
2875
|
description: 'True when the emission-time signature is present. Independent of whether the export route can produce a signed bundle.',
|
|
2254
2876
|
},
|
|
2255
2877
|
createdAt: { type: 'string', format: 'date-time' },
|
|
2878
|
+
projectId: {
|
|
2879
|
+
type: 'string',
|
|
2880
|
+
format: 'uuid',
|
|
2881
|
+
description: "The project of the record's run. Absent on records from before Kindgi 0.1.3; those are listed only without a scope.",
|
|
2882
|
+
},
|
|
2256
2883
|
},
|
|
2257
2884
|
};
|
|
2258
2885
|
export const ProvenanceRecordSchema = {
|
|
@@ -2277,6 +2904,21 @@ export const ProvenanceRecordSchema = {
|
|
|
2277
2904
|
},
|
|
2278
2905
|
signature: ProvenanceSignatureSchema,
|
|
2279
2906
|
createdAt: { type: 'string', format: 'date-time' },
|
|
2907
|
+
callUsage: {
|
|
2908
|
+
type: 'object',
|
|
2909
|
+
description: "Each model call's usage from the cost ledger, by the `callId` in its `model-call` node's attributes. Joined when read: not part of the signed DAG. A signed export includes it, as it stood when signed.",
|
|
2910
|
+
additionalProperties: {
|
|
2911
|
+
type: 'object',
|
|
2912
|
+
additionalProperties: false,
|
|
2913
|
+
required: ['usage'],
|
|
2914
|
+
properties: {
|
|
2915
|
+
usage: { $ref: '#/components/schemas/ModelCallTokens' },
|
|
2916
|
+
costUsd: { type: 'number', minimum: 0 },
|
|
2917
|
+
durationMs: { type: 'integer', minimum: 0 },
|
|
2918
|
+
servedModel: { type: 'string' },
|
|
2919
|
+
},
|
|
2920
|
+
},
|
|
2921
|
+
},
|
|
2280
2922
|
},
|
|
2281
2923
|
};
|
|
2282
2924
|
export const ProvenanceCollectionPageSchema = {
|
|
@@ -2307,7 +2949,7 @@ export const ExportProvenanceBodySchema = {
|
|
|
2307
2949
|
},
|
|
2308
2950
|
};
|
|
2309
2951
|
export const ExportProvenanceResultSchema = {
|
|
2310
|
-
description: 'Signed exportable bundle. `bundle` is base64 of the exact bytes that were signed (sorted-key canonical JSON, no whitespace); verifiers can pass those bytes directly to `verifyEd25519`. The bundle body itself includes `bundleSchemaVersion`, `runId`, `tenantId`, `dag: { nodes, edges }`, `messages?` (if requested), etc. See `canonicalization` for the deterministic serialization algorithm.',
|
|
2952
|
+
description: 'Signed exportable bundle. `bundle` is base64 of the exact bytes that were signed (sorted-key canonical JSON, no whitespace); verifiers can pass those bytes directly to `verifyEd25519`. The bundle body itself includes `bundleSchemaVersion`, `runId`, `tenantId`, `dag: { nodes, edges }`, `messages?` (if requested), `callUsage?` (the usage of the model calls, from the cost ledger), etc. See `canonicalization` for the deterministic serialization algorithm.',
|
|
2311
2953
|
type: 'object',
|
|
2312
2954
|
additionalProperties: false,
|
|
2313
2955
|
required: [
|
|
@@ -2329,7 +2971,7 @@ export const ExportProvenanceResultSchema = {
|
|
|
2329
2971
|
},
|
|
2330
2972
|
bundleSchemaVersion: {
|
|
2331
2973
|
type: 'string',
|
|
2332
|
-
description:
|
|
2974
|
+
description: "Semver for the shape of the bundle body. Currently `1.1.0`, which adds `callUsage`: each model call's usage from the cost ledger, by call id, as it stood when signed.",
|
|
2333
2975
|
},
|
|
2334
2976
|
algorithm: { type: 'string', const: 'ed25519' },
|
|
2335
2977
|
signingKeyId: { type: 'string' },
|
|
@@ -2597,6 +3239,13 @@ export const ProviderMetadataSchema = {
|
|
|
2597
3239
|
type: 'boolean',
|
|
2598
3240
|
description: "A fallback serves a capability only when no other provider satisfies it (e.g. `kindgi dev`'s scripted `dev-echo`); an agent turn routed to one carries a `fallback-provider` warning. Absent = `false`.",
|
|
2599
3241
|
},
|
|
3242
|
+
labels: {
|
|
3243
|
+
type: 'object',
|
|
3244
|
+
maxProperties: 32,
|
|
3245
|
+
propertyNames: { pattern: '^[a-z0-9]([a-z0-9._/-]{0,61}[a-z0-9])?$' },
|
|
3246
|
+
additionalProperties: { type: 'string', maxLength: 256 },
|
|
3247
|
+
description: 'Bookkeeping, such as who manages the provider; the router ignores labels. At most 32 keys; a key is 1-63 lowercase letters and digits, with `.`, `-`, `_` or `/` inside; a value is at most 256 characters. The convention key `kindgi.com/managed-by` names the manager (`kindgi-dev`, `kindgi-deploy:<environment>`). Out of bounds: `400 invalid-provider`, reason `invalid-labels`.',
|
|
3248
|
+
},
|
|
2600
3249
|
},
|
|
2601
3250
|
};
|
|
2602
3251
|
export const ProviderCollectionPageSchema = {
|
|
@@ -2944,7 +3593,61 @@ export const GetMCPPromptResultSchema = {
|
|
|
2944
3593
|
*/
|
|
2945
3594
|
export const CostGroupDimensionSchema = {
|
|
2946
3595
|
type: 'string',
|
|
2947
|
-
enum: [
|
|
3596
|
+
enum: [
|
|
3597
|
+
'agentId',
|
|
3598
|
+
'runId',
|
|
3599
|
+
'category',
|
|
3600
|
+
'providerId',
|
|
3601
|
+
'day',
|
|
3602
|
+
'month',
|
|
3603
|
+
'tenant',
|
|
3604
|
+
'conversationId',
|
|
3605
|
+
'model',
|
|
3606
|
+
'servedModel',
|
|
3607
|
+
'projectId',
|
|
3608
|
+
'orgId',
|
|
3609
|
+
'rootRunId',
|
|
3610
|
+
'flowId',
|
|
3611
|
+
],
|
|
3612
|
+
};
|
|
3613
|
+
/** Why a model call failed, as its cost record carries it. */
|
|
3614
|
+
export const ModelCallErrorSchema = {
|
|
3615
|
+
type: 'object',
|
|
3616
|
+
additionalProperties: false,
|
|
3617
|
+
required: ['message'],
|
|
3618
|
+
description: 'Why a model call failed (`status: failed`).',
|
|
3619
|
+
properties: { message: { type: 'string' } },
|
|
3620
|
+
};
|
|
3621
|
+
/** A model call's tokens, as a cost record and a provenance record carry them. */
|
|
3622
|
+
export const ModelCallTokensSchema = {
|
|
3623
|
+
type: 'object',
|
|
3624
|
+
additionalProperties: false,
|
|
3625
|
+
required: ['promptTokens', 'completionTokens'],
|
|
3626
|
+
description: "The call's tokens. `promptTokens` / `completionTokens` are the totals; `cacheReadTokens` / `cacheWriteTokens` are parts of `promptTokens`, `reasoningTokens` of `completionTokens`, present when the provider reports them.",
|
|
3627
|
+
properties: {
|
|
3628
|
+
promptTokens: { type: 'integer', minimum: 0 },
|
|
3629
|
+
completionTokens: { type: 'integer', minimum: 0 },
|
|
3630
|
+
cacheReadTokens: { type: 'integer', minimum: 0 },
|
|
3631
|
+
cacheWriteTokens: { type: 'integer', minimum: 0 },
|
|
3632
|
+
reasoningTokens: { type: 'integer', minimum: 0 },
|
|
3633
|
+
},
|
|
3634
|
+
};
|
|
3635
|
+
/**
|
|
3636
|
+
* Token sums of an aggregate. `prompt` / `completion` are the totals;
|
|
3637
|
+
* `cacheRead` / `cacheWrite` are parts of `prompt`, `reasoning` of
|
|
3638
|
+
* `completion` (`0` where providers didn't report them).
|
|
3639
|
+
*/
|
|
3640
|
+
export const CostTokenTotalsSchema = {
|
|
3641
|
+
type: 'object',
|
|
3642
|
+
additionalProperties: false,
|
|
3643
|
+
required: ['prompt', 'completion', 'cacheRead', 'cacheWrite', 'reasoning'],
|
|
3644
|
+
properties: {
|
|
3645
|
+
prompt: { type: 'integer', minimum: 0 },
|
|
3646
|
+
completion: { type: 'integer', minimum: 0 },
|
|
3647
|
+
cacheRead: { type: 'integer', minimum: 0 },
|
|
3648
|
+
cacheWrite: { type: 'integer', minimum: 0 },
|
|
3649
|
+
reasoning: { type: 'integer', minimum: 0 },
|
|
3650
|
+
},
|
|
2948
3651
|
};
|
|
2949
3652
|
/**
|
|
2950
3653
|
* Wire shape for a single cost record: one recorded usage entry,
|
|
@@ -2982,6 +3685,60 @@ export const CostRecordSchema = {
|
|
|
2982
3685
|
additionalProperties: true,
|
|
2983
3686
|
description: 'Free-form filter/display tags — never counters.',
|
|
2984
3687
|
},
|
|
3688
|
+
callId: {
|
|
3689
|
+
type: 'string',
|
|
3690
|
+
description: "A model call's id (`category` `llm.inference`); its provenance `model-call` node carries it too.",
|
|
3691
|
+
},
|
|
3692
|
+
projectId: { type: 'string', format: 'uuid' },
|
|
3693
|
+
rootRunId: {
|
|
3694
|
+
type: 'string',
|
|
3695
|
+
format: 'uuid',
|
|
3696
|
+
description: "The root of the record's run tree (a flow run, for its agent turns).",
|
|
3697
|
+
},
|
|
3698
|
+
parentRunId: { type: 'string', format: 'uuid' },
|
|
3699
|
+
agentVersion: { type: 'string' },
|
|
3700
|
+
flowId: { type: 'string', description: "The flow of the run tree's root." },
|
|
3701
|
+
nodeId: { type: 'string', description: 'The step that made the call.' },
|
|
3702
|
+
step: { type: 'integer', minimum: 1, description: "The turn's step number." },
|
|
3703
|
+
purpose: {
|
|
3704
|
+
type: 'string',
|
|
3705
|
+
description: "What the call was for, beyond the turn's own model step: `guardrail-judge:<guardrail id>`.",
|
|
3706
|
+
},
|
|
3707
|
+
model: { type: 'string', description: 'The model actually called.' },
|
|
3708
|
+
servedModel: {
|
|
3709
|
+
type: 'string',
|
|
3710
|
+
description: 'The exact model version the vendor reported (vendors alias).',
|
|
3711
|
+
},
|
|
3712
|
+
fallback: {
|
|
3713
|
+
type: 'boolean',
|
|
3714
|
+
description: 'The router picked a fallback provider for the turn.',
|
|
3715
|
+
},
|
|
3716
|
+
status: {
|
|
3717
|
+
type: 'string',
|
|
3718
|
+
enum: ['ok', 'failed'],
|
|
3719
|
+
description: '`ok`: the provider answered. `failed`: the call threw.',
|
|
3720
|
+
},
|
|
3721
|
+
usage: { $ref: '#/components/schemas/ModelCallTokens' },
|
|
3722
|
+
durationMs: { type: 'integer', minimum: 0 },
|
|
3723
|
+
finishReason: { type: 'string' },
|
|
3724
|
+
providerRequestId: { type: 'string', description: "The vendor's id for the request." },
|
|
3725
|
+
attempts: {
|
|
3726
|
+
type: 'integer',
|
|
3727
|
+
minimum: 1,
|
|
3728
|
+
description: "HTTP attempts the call took, the client's retries included.",
|
|
3729
|
+
},
|
|
3730
|
+
error: { $ref: '#/components/schemas/ModelCallError' },
|
|
3731
|
+
rawUsage: {
|
|
3732
|
+
type: 'object',
|
|
3733
|
+
additionalProperties: false,
|
|
3734
|
+
required: ['provider', 'model', 'usage'],
|
|
3735
|
+
description: "The vendor's own usage object, exactly as it reported it. Only with `include=rawUsage`.",
|
|
3736
|
+
properties: {
|
|
3737
|
+
provider: { type: 'string' },
|
|
3738
|
+
model: { type: 'string' },
|
|
3739
|
+
usage: { type: 'object', additionalProperties: true },
|
|
3740
|
+
},
|
|
3741
|
+
},
|
|
2985
3742
|
},
|
|
2986
3743
|
};
|
|
2987
3744
|
export const CostRecordCollectionPageSchema = {
|
|
@@ -3000,7 +3757,7 @@ export const CostRecordCollectionPageSchema = {
|
|
|
3000
3757
|
export const CostAggregateGroupSchema = {
|
|
3001
3758
|
type: 'object',
|
|
3002
3759
|
additionalProperties: false,
|
|
3003
|
-
required: ['key', 'count', 'totalUsd'],
|
|
3760
|
+
required: ['key', 'count', 'totalUsd', 'tokens'],
|
|
3004
3761
|
properties: {
|
|
3005
3762
|
key: {
|
|
3006
3763
|
type: 'object',
|
|
@@ -3009,19 +3766,31 @@ export const CostAggregateGroupSchema = {
|
|
|
3009
3766
|
},
|
|
3010
3767
|
count: { type: 'integer', minimum: 0 },
|
|
3011
3768
|
totalUsd: { type: 'number', minimum: 0 },
|
|
3769
|
+
tokens: { $ref: '#/components/schemas/CostTokenTotals' },
|
|
3012
3770
|
},
|
|
3013
3771
|
};
|
|
3014
3772
|
export const CostAggregateResultSchema = {
|
|
3015
3773
|
type: 'object',
|
|
3016
3774
|
additionalProperties: false,
|
|
3017
|
-
required: ['groups', 'totalUsd', 'totalRecords', 'timeRange', 'groupBy'],
|
|
3775
|
+
required: ['groups', 'totalUsd', 'totalRecords', 'tokens', 'timeRange', 'groupBy'],
|
|
3018
3776
|
properties: {
|
|
3019
3777
|
groups: {
|
|
3020
3778
|
type: 'array',
|
|
3021
3779
|
items: { $ref: '#/components/schemas/CostAggregateGroup' },
|
|
3780
|
+
description: 'The most expensive groups first (`totalUsd` descending, ties by key), at most `limit`.',
|
|
3781
|
+
},
|
|
3782
|
+
totalGroups: {
|
|
3783
|
+
type: 'integer',
|
|
3784
|
+
minimum: 0,
|
|
3785
|
+
description: 'How many groups there were before the `limit` cap. Absent from a runtime before 0.1.5.',
|
|
3786
|
+
},
|
|
3787
|
+
truncated: {
|
|
3788
|
+
type: 'boolean',
|
|
3789
|
+
description: '`true` when there were more groups than `limit`: `groups` holds the most expensive ones, and `totalUsd` / `totalRecords` / `tokens` still cover every record. Absent from a runtime before 0.1.5.',
|
|
3022
3790
|
},
|
|
3023
3791
|
totalUsd: { type: 'number', minimum: 0 },
|
|
3024
3792
|
totalRecords: { type: 'integer', minimum: 0 },
|
|
3793
|
+
tokens: { $ref: '#/components/schemas/CostTokenTotals' },
|
|
3025
3794
|
timeRange: {
|
|
3026
3795
|
type: 'object',
|
|
3027
3796
|
additionalProperties: false,
|
|
@@ -3279,7 +4048,7 @@ export const ReinstatePolicyVersionResultSchema = {
|
|
|
3279
4048
|
*/
|
|
3280
4049
|
export const EvalKindSchema = {
|
|
3281
4050
|
type: 'string',
|
|
3282
|
-
enum: ['accuracy', 'pairwise', 'regression', 'human-review', 'benchmark', 'custom'],
|
|
4051
|
+
enum: ['accuracy', 'pairwise', 'regression', 'human-review', 'benchmark', 'custom', 'judged'],
|
|
3283
4052
|
};
|
|
3284
4053
|
/**
|
|
3285
4054
|
* Wire shape for a single evaluation suite. `spec` is a JSON object
|
|
@@ -3371,6 +4140,122 @@ export const ReinstateEvalSuiteVersionResultSchema = {
|
|
|
3371
4140
|
wasTombstoned: { type: 'boolean' },
|
|
3372
4141
|
},
|
|
3373
4142
|
};
|
|
4143
|
+
// ---------------- data blocks ----------------
|
|
4144
|
+
export const BlockKindSchema = {
|
|
4145
|
+
type: 'string',
|
|
4146
|
+
enum: ['prompt', 'settings'],
|
|
4147
|
+
description: '`prompt`: a Liquid template an agent renders as its instructions. `settings`: a JSON object tools and templates read.',
|
|
4148
|
+
};
|
|
4149
|
+
export const PromptBlockContentSchema = {
|
|
4150
|
+
type: 'object',
|
|
4151
|
+
additionalProperties: false,
|
|
4152
|
+
required: ['template'],
|
|
4153
|
+
properties: {
|
|
4154
|
+
template: {
|
|
4155
|
+
type: 'string',
|
|
4156
|
+
minLength: 1,
|
|
4157
|
+
description: "Liquid, rendered as an agent's instructions are (same parameters and auto-injected variables).",
|
|
4158
|
+
},
|
|
4159
|
+
parameters: { type: 'array', items: { $ref: '#/components/schemas/PromptParameter' } },
|
|
4160
|
+
},
|
|
4161
|
+
};
|
|
4162
|
+
export const SettingsBlockContentSchema = {
|
|
4163
|
+
type: 'object',
|
|
4164
|
+
additionalProperties: false,
|
|
4165
|
+
required: ['values'],
|
|
4166
|
+
properties: {
|
|
4167
|
+
values: {
|
|
4168
|
+
type: 'object',
|
|
4169
|
+
additionalProperties: true,
|
|
4170
|
+
description: 'What tools read (`ToolContext.settings[<block id>]`) and templates read (`settings.<block id>.<key>`).',
|
|
4171
|
+
},
|
|
4172
|
+
schema: {
|
|
4173
|
+
type: 'object',
|
|
4174
|
+
additionalProperties: true,
|
|
4175
|
+
description: "JSON Schema (draft 2020-12) the values must satisfy. A later version's values must satisfy the latest version's schema too.",
|
|
4176
|
+
},
|
|
4177
|
+
},
|
|
4178
|
+
};
|
|
4179
|
+
export const BlockSchema = {
|
|
4180
|
+
description: 'A data block version: a prompt or settings, versioned like a tool (immutable versions, soft unregister). An agent version pins the block versions it uses when it is published. Belongs to one project and is authorized through it.',
|
|
4181
|
+
type: 'object',
|
|
4182
|
+
additionalProperties: false,
|
|
4183
|
+
required: ['id', 'version', 'kind', 'content', 'projectId', 'publishedAt'],
|
|
4184
|
+
properties: {
|
|
4185
|
+
id: { type: 'string', description: 'Dotted lowercase id (e.g. `acme.intake-prompt`).' },
|
|
4186
|
+
version: { type: 'string', pattern: '^\\d+\\.\\d+\\.\\d+$' },
|
|
4187
|
+
kind: { $ref: '#/components/schemas/BlockKind' },
|
|
4188
|
+
description: { type: 'string' },
|
|
4189
|
+
content: {
|
|
4190
|
+
oneOf: [
|
|
4191
|
+
{ $ref: '#/components/schemas/PromptBlockContent' },
|
|
4192
|
+
{ $ref: '#/components/schemas/SettingsBlockContent' },
|
|
4193
|
+
],
|
|
4194
|
+
description: '`PromptBlockContent` for a prompt, `SettingsBlockContent` for settings.',
|
|
4195
|
+
},
|
|
4196
|
+
projectId: { type: 'string', format: 'uuid' },
|
|
4197
|
+
publishedAt: { type: 'string', format: 'date-time' },
|
|
4198
|
+
unregisteredAt: {
|
|
4199
|
+
type: 'string',
|
|
4200
|
+
format: 'date-time',
|
|
4201
|
+
description: 'Present only on an unregistered version; agent versions that pin it still read it.',
|
|
4202
|
+
},
|
|
4203
|
+
},
|
|
4204
|
+
};
|
|
4205
|
+
export const BlockCollectionPageSchema = {
|
|
4206
|
+
type: 'object',
|
|
4207
|
+
additionalProperties: false,
|
|
4208
|
+
required: ['data', 'hasMore'],
|
|
4209
|
+
properties: {
|
|
4210
|
+
data: { type: 'array', items: { $ref: '#/components/schemas/Block' } },
|
|
4211
|
+
nextCursor: { type: 'string' },
|
|
4212
|
+
hasMore: { type: 'boolean' },
|
|
4213
|
+
},
|
|
4214
|
+
};
|
|
4215
|
+
export const PublishBlockBodySchema = {
|
|
4216
|
+
type: 'object',
|
|
4217
|
+
additionalProperties: false,
|
|
4218
|
+
required: ['projectId', 'id', 'version', 'kind', 'content'],
|
|
4219
|
+
properties: {
|
|
4220
|
+
projectId: ContentProjectIdProperty,
|
|
4221
|
+
id: { type: 'string', minLength: 1 },
|
|
4222
|
+
version: { type: 'string', pattern: '^\\d+\\.\\d+\\.\\d+$' },
|
|
4223
|
+
kind: { $ref: '#/components/schemas/BlockKind' },
|
|
4224
|
+
description: { type: 'string' },
|
|
4225
|
+
content: {
|
|
4226
|
+
oneOf: [
|
|
4227
|
+
{ $ref: '#/components/schemas/PromptBlockContent' },
|
|
4228
|
+
{ $ref: '#/components/schemas/SettingsBlockContent' },
|
|
4229
|
+
],
|
|
4230
|
+
},
|
|
4231
|
+
},
|
|
4232
|
+
};
|
|
4233
|
+
export const PublishBlockResultSchema = {
|
|
4234
|
+
type: 'object',
|
|
4235
|
+
additionalProperties: false,
|
|
4236
|
+
required: ['blockId', 'version'],
|
|
4237
|
+
properties: { blockId: { type: 'string' }, version: { type: 'string' } },
|
|
4238
|
+
};
|
|
4239
|
+
export const UnregisterBlockResultSchema = {
|
|
4240
|
+
type: 'object',
|
|
4241
|
+
additionalProperties: false,
|
|
4242
|
+
required: ['blockId', 'version', 'unregistered'],
|
|
4243
|
+
properties: {
|
|
4244
|
+
blockId: { type: 'string' },
|
|
4245
|
+
version: { type: 'string' },
|
|
4246
|
+
unregistered: { type: 'boolean', const: true },
|
|
4247
|
+
},
|
|
4248
|
+
};
|
|
4249
|
+
export const ReinstateBlockResultSchema = {
|
|
4250
|
+
type: 'object',
|
|
4251
|
+
additionalProperties: false,
|
|
4252
|
+
required: ['blockId', 'version', 'wasTombstoned'],
|
|
4253
|
+
properties: {
|
|
4254
|
+
blockId: { type: 'string' },
|
|
4255
|
+
version: { type: 'string' },
|
|
4256
|
+
wasTombstoned: { type: 'boolean' },
|
|
4257
|
+
},
|
|
4258
|
+
};
|
|
3374
4259
|
// ---------------- eval runs (admin plane) ----------------
|
|
3375
4260
|
/**
|
|
3376
4261
|
* Terminal + pre-terminal statuses for an eval run. Same vocabulary as
|
|
@@ -3399,6 +4284,49 @@ export const EvalRunFlowRefSchema = {
|
|
|
3399
4284
|
version: { type: 'string', pattern: '^\\d+\\.\\d+\\.\\d+$' },
|
|
3400
4285
|
},
|
|
3401
4286
|
};
|
|
4287
|
+
export const EvalBaselineSchema = {
|
|
4288
|
+
description: "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.",
|
|
4289
|
+
oneOf: [
|
|
4290
|
+
{ type: 'string', enum: ['recorded'] },
|
|
4291
|
+
{
|
|
4292
|
+
type: 'object',
|
|
4293
|
+
additionalProperties: false,
|
|
4294
|
+
required: ['agentId', 'version'],
|
|
4295
|
+
properties: { agentId: { type: 'string' }, version: { type: 'string' } },
|
|
4296
|
+
},
|
|
4297
|
+
{
|
|
4298
|
+
type: 'object',
|
|
4299
|
+
additionalProperties: false,
|
|
4300
|
+
required: ['live'],
|
|
4301
|
+
properties: {
|
|
4302
|
+
live: {
|
|
4303
|
+
type: 'object',
|
|
4304
|
+
additionalProperties: false,
|
|
4305
|
+
properties: {
|
|
4306
|
+
projectId: { type: 'string' },
|
|
4307
|
+
segments: { type: 'object', additionalProperties: { type: 'string' } },
|
|
4308
|
+
},
|
|
4309
|
+
},
|
|
4310
|
+
},
|
|
4311
|
+
},
|
|
4312
|
+
],
|
|
4313
|
+
};
|
|
4314
|
+
export const EvalComparisonSchema = {
|
|
4315
|
+
type: 'object',
|
|
4316
|
+
additionalProperties: false,
|
|
4317
|
+
required: ['baseline', 'reads', 'repetitions', 'k'],
|
|
4318
|
+
description: "A comparison eval run's settings (a `judged` suite).",
|
|
4319
|
+
properties: {
|
|
4320
|
+
baseline: { $ref: '#/components/schemas/EvalBaseline' },
|
|
4321
|
+
reads: {
|
|
4322
|
+
type: 'string',
|
|
4323
|
+
enum: ['recorded', 'live'],
|
|
4324
|
+
description: "Whether replayed reads use the past run's results when it has them (`recorded`), or run live.",
|
|
4325
|
+
},
|
|
4326
|
+
repetitions: { type: 'integer', minimum: 1, maximum: 10 },
|
|
4327
|
+
k: { type: 'integer', minimum: 1, maximum: 100 },
|
|
4328
|
+
},
|
|
4329
|
+
};
|
|
3402
4330
|
export const EvalRunSchema = {
|
|
3403
4331
|
type: 'object',
|
|
3404
4332
|
additionalProperties: false,
|
|
@@ -3427,10 +4355,11 @@ export const EvalRunSchema = {
|
|
|
3427
4355
|
result: {
|
|
3428
4356
|
type: 'object',
|
|
3429
4357
|
additionalProperties: true,
|
|
3430
|
-
description: 'Kind-specific opaque JSON. For `accuracy`, contains `{ passCount, totalCount, meanScore, perCase[] }`. Other kinds define their own shapes as their dispatchers ship.',
|
|
4358
|
+
description: '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.',
|
|
3431
4359
|
},
|
|
3432
4360
|
error: { type: 'string' },
|
|
3433
4361
|
correlationId: { type: 'string' },
|
|
4362
|
+
comparison: { $ref: '#/components/schemas/EvalComparison' },
|
|
3434
4363
|
},
|
|
3435
4364
|
};
|
|
3436
4365
|
export const EvalRunCollectionPageSchema = {
|
|
@@ -3453,8 +4382,12 @@ export const StartEvalRunBodySchema = {
|
|
|
3453
4382
|
flowRef: { $ref: '#/components/schemas/EvalRunFlowRef' },
|
|
3454
4383
|
dryRun: { type: 'boolean' },
|
|
3455
4384
|
correlationId: { type: 'string' },
|
|
4385
|
+
baseline: { $ref: '#/components/schemas/EvalBaseline' },
|
|
4386
|
+
reads: { type: 'string', enum: ['recorded', 'live'] },
|
|
4387
|
+
repetitions: { type: 'integer', minimum: 1, maximum: 10 },
|
|
4388
|
+
k: { type: 'integer', minimum: 1, maximum: 100 },
|
|
3456
4389
|
},
|
|
3457
|
-
description:
|
|
4390
|
+
description: "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.",
|
|
3458
4391
|
};
|
|
3459
4392
|
export const StartEvalRunResultSchema = {
|
|
3460
4393
|
type: 'object',
|
|
@@ -3608,7 +4541,7 @@ export const LogoutResultSchema = {
|
|
|
3608
4541
|
},
|
|
3609
4542
|
};
|
|
3610
4543
|
export const WhoamiResultSchema = {
|
|
3611
|
-
description: "Introspection of the caller's current authentication context. Always carries `tenantId` and `scopes` (empty for static bearer tokens), plus `userId` when the token carries one; session-token callers additionally see `sessionId`, `providerId`, and `expiresAt`. `user` is the caller's directory record, present when the deployment wires an identity directory and it knows the `userId`. `reviewerRole` is set when the token carries a reviewer role — clients can
|
|
4544
|
+
description: "Introspection of the caller's current authentication context. Always carries `tenantId` and `scopes` (empty for static bearer tokens), plus `userId` when the token carries one; session-token callers additionally see `sessionId`, `providerId`, and `expiresAt`. `user` is the caller's directory record, present when the deployment wires an identity directory and it knows the `userId`. `reviewerRole` is set when the caller is a reviewer — its token carries a reviewer role, or its user is a registered reviewer — so clients can gate reviewer-only UI (the approvals surface) without a second round trip.",
|
|
3612
4545
|
type: 'object',
|
|
3613
4546
|
additionalProperties: false,
|
|
3614
4547
|
required: ['tenantId', 'scopes'],
|
|
@@ -3707,6 +4640,45 @@ const DeployedPrimitiveSchema = {
|
|
|
3707
4640
|
version: { type: 'string', description: 'Absent for guardrails, which have no version.' },
|
|
3708
4641
|
},
|
|
3709
4642
|
};
|
|
4643
|
+
const DeployedVersionSchema = {
|
|
4644
|
+
type: 'object',
|
|
4645
|
+
additionalProperties: false,
|
|
4646
|
+
required: ['id', 'version'],
|
|
4647
|
+
properties: {
|
|
4648
|
+
id: { type: 'string' },
|
|
4649
|
+
version: { type: 'string', description: 'The version the agent is registered as.' },
|
|
4650
|
+
authoredVersion: {
|
|
4651
|
+
type: 'string',
|
|
4652
|
+
description: "The version the agent's or flow's definition names, present when it differs from `version`: that version was registered already with other pins or content, and versions never change, so the deploy registered the next free version in its line (or an earlier deploy did).",
|
|
4653
|
+
},
|
|
4654
|
+
reason: {
|
|
4655
|
+
type: 'string',
|
|
4656
|
+
enum: ['pins-changed', 'unpinned', 'version-taken'],
|
|
4657
|
+
description: 'Why `version` differs from `authoredVersion`: `pins-changed` (a tool or agent it uses has a new version), `unpinned` (`authoredVersion` was published before pins existed), `version-taken` (`authoredVersion` is registered with other content).',
|
|
4658
|
+
},
|
|
4659
|
+
newVersion: {
|
|
4660
|
+
type: 'boolean',
|
|
4661
|
+
description: '`true`: this deploy registered `version`; `false`: an earlier deploy did.',
|
|
4662
|
+
},
|
|
4663
|
+
pinChanges: {
|
|
4664
|
+
type: 'array',
|
|
4665
|
+
description: "For `pins-changed`: the pins that differ from `authoredVersion`'s.",
|
|
4666
|
+
items: { $ref: '#/components/schemas/PinChange' },
|
|
4667
|
+
},
|
|
4668
|
+
},
|
|
4669
|
+
};
|
|
4670
|
+
export const PinChangeSchema = {
|
|
4671
|
+
description: 'One pin that differs between two versions of an agent or a flow.',
|
|
4672
|
+
type: 'object',
|
|
4673
|
+
additionalProperties: false,
|
|
4674
|
+
required: ['kind', 'id'],
|
|
4675
|
+
properties: {
|
|
4676
|
+
kind: { type: 'string', enum: ['tool', 'prompt', 'setting', 'agent'] },
|
|
4677
|
+
id: { type: 'string' },
|
|
4678
|
+
from: { type: 'string', description: "The earlier version's pin; absent when it had none." },
|
|
4679
|
+
to: { type: 'string', description: "The later version's pin; absent when it has none." },
|
|
4680
|
+
},
|
|
4681
|
+
};
|
|
3710
4682
|
/**
|
|
3711
4683
|
* Exactly what a deployment shipped. Versions are immutable, so this
|
|
3712
4684
|
* says which code the deployment made live.
|
|
@@ -3718,8 +4690,8 @@ export const DeploymentContentsSchema = {
|
|
|
3718
4690
|
properties: {
|
|
3719
4691
|
tools: { type: 'array', items: DeployedPrimitiveSchema },
|
|
3720
4692
|
guardrails: { type: 'array', items: DeployedPrimitiveSchema },
|
|
3721
|
-
agents: { type: 'array', items:
|
|
3722
|
-
flows: { type: 'array', items:
|
|
4693
|
+
agents: { type: 'array', items: DeployedVersionSchema },
|
|
4694
|
+
flows: { type: 'array', items: DeployedVersionSchema },
|
|
3723
4695
|
},
|
|
3724
4696
|
};
|
|
3725
4697
|
/**
|
|
@@ -5313,6 +6285,18 @@ export const WebhookEndpointUnregisterResultSchema = {
|
|
|
5313
6285
|
},
|
|
5314
6286
|
},
|
|
5315
6287
|
};
|
|
6288
|
+
/** A run tree's model calls, as `run.finished` carries them. */
|
|
6289
|
+
export const RunTreeUsageSchema = {
|
|
6290
|
+
type: 'object',
|
|
6291
|
+
additionalProperties: false,
|
|
6292
|
+
required: ['calls', 'costUsd', 'tokens'],
|
|
6293
|
+
description: "The model calls of the run tree (this run and every run it started) that the cost ledger had recorded when this run finished: a child run still running then isn't in it. `calls` counts failed calls too. Absent when the runtime records no usage.",
|
|
6294
|
+
properties: {
|
|
6295
|
+
calls: { type: 'integer', minimum: 0 },
|
|
6296
|
+
costUsd: { type: 'number', minimum: 0 },
|
|
6297
|
+
tokens: { $ref: '#/components/schemas/CostTokenTotals' },
|
|
6298
|
+
},
|
|
6299
|
+
};
|
|
5316
6300
|
export const FinishedRunSchema = {
|
|
5317
6301
|
type: 'object',
|
|
5318
6302
|
additionalProperties: false,
|
|
@@ -5341,6 +6325,7 @@ export const FinishedRunSchema = {
|
|
|
5341
6325
|
},
|
|
5342
6326
|
createdAt: { type: 'string', format: 'date-time' },
|
|
5343
6327
|
completedAt: { type: 'string', format: 'date-time' },
|
|
6328
|
+
usage: { $ref: '#/components/schemas/RunTreeUsage' },
|
|
5344
6329
|
},
|
|
5345
6330
|
};
|
|
5346
6331
|
export const RunFinishedEventSchema = {
|
|
@@ -5477,6 +6462,7 @@ export const COMPONENT_SCHEMAS = [
|
|
|
5477
6462
|
['WireError', WireErrorSchema],
|
|
5478
6463
|
['HealthResult', HealthResultSchema],
|
|
5479
6464
|
['RunStatus', RunStatusSchema],
|
|
6465
|
+
['RunAgent', RunAgentSchema],
|
|
5480
6466
|
['Run', RunSchema],
|
|
5481
6467
|
['StartRunOptions', StartRunOptionsSchema],
|
|
5482
6468
|
['StartRunBody', StartRunBodySchema],
|
|
@@ -5504,6 +6490,7 @@ export const COMPONENT_SCHEMAS = [
|
|
|
5504
6490
|
['ApprovalStatus', ApprovalStatusSchema],
|
|
5505
6491
|
['ReviewDecisionKind', ReviewDecisionKindSchema],
|
|
5506
6492
|
['Approval', ApprovalSchema],
|
|
6493
|
+
['ApprovalDecisionRecord', ApprovalDecisionRecordSchema],
|
|
5507
6494
|
['ReviewDecision', ReviewDecisionSchema],
|
|
5508
6495
|
['ApprovalCollectionPage', ApprovalCollectionPageSchema],
|
|
5509
6496
|
['CompleteApprovalBody', CompleteApprovalBodySchema],
|
|
@@ -5517,6 +6504,27 @@ export const COMPONENT_SCHEMAS = [
|
|
|
5517
6504
|
['ObservationStatus', ObservationStatusSchema],
|
|
5518
6505
|
['Observation', ObservationSchema],
|
|
5519
6506
|
['ObservationCollectionPage', ObservationCollectionPageSchema],
|
|
6507
|
+
['JudgeClassScope', JudgeClassScopeSchema],
|
|
6508
|
+
['JudgeClass', JudgeClassSchema],
|
|
6509
|
+
['JudgeClassCollectionPage', JudgeClassCollectionPageSchema],
|
|
6510
|
+
['CreateJudgeClassBody', CreateJudgeClassBodySchema],
|
|
6511
|
+
['UpdateJudgeClassBody', UpdateJudgeClassBodySchema],
|
|
6512
|
+
['UnregisterJudgeClassResult', UnregisterJudgeClassResultSchema],
|
|
6513
|
+
['JudgedSubject', JudgedSubjectSchema],
|
|
6514
|
+
['JudgedItem', JudgedItemSchema],
|
|
6515
|
+
['JudgmentAssertedBy', JudgmentAssertedBySchema],
|
|
6516
|
+
['Judgment', JudgmentSchema],
|
|
6517
|
+
['JudgedRunContext', JudgedRunContextSchema],
|
|
6518
|
+
['JudgedRunCopy', JudgedRunCopySchema],
|
|
6519
|
+
['JudgmentWithCopies', JudgmentWithCopiesSchema],
|
|
6520
|
+
['JudgmentCollectionPage', JudgmentCollectionPageSchema],
|
|
6521
|
+
['CreateJudgmentBody', CreateJudgmentBodySchema],
|
|
6522
|
+
['UnregisterJudgmentResult', UnregisterJudgmentResultSchema],
|
|
6523
|
+
['JudgedItemSummary', JudgedItemSummarySchema],
|
|
6524
|
+
['JudgedEvalCase', JudgedEvalCaseSchema],
|
|
6525
|
+
['JudgedEvalCaseCollectionPage', JudgedEvalCaseCollectionPageSchema],
|
|
6526
|
+
['BuildJudgedSuiteBody', BuildJudgedSuiteBodySchema],
|
|
6527
|
+
['BuildJudgedSuiteResult', BuildJudgedSuiteResultSchema],
|
|
5520
6528
|
['PromptParameter', PromptParameterSchema],
|
|
5521
6529
|
['RetrievalIntent', RetrievalIntentSchema],
|
|
5522
6530
|
['ConversationPolicy', ConversationPolicySchema],
|
|
@@ -5526,6 +6534,14 @@ export const COMPONENT_SCHEMAS = [
|
|
|
5526
6534
|
['AgentOutputSpec', AgentOutputSpecSchema],
|
|
5527
6535
|
['ToolErrorsSpec', ToolErrorsSpecSchema],
|
|
5528
6536
|
['Agent', AgentSchema],
|
|
6537
|
+
['AgentPins', AgentPinsSchema],
|
|
6538
|
+
['PromptRef', PromptRefSchema],
|
|
6539
|
+
['BlockRef', BlockRefSchema],
|
|
6540
|
+
['PinChange', PinChangeSchema],
|
|
6541
|
+
['VersionDerivation', VersionDerivationSchema],
|
|
6542
|
+
['DeriveAgentVersionBody', DeriveAgentVersionBodySchema],
|
|
6543
|
+
['AgentPinSwaps', AgentPinSwapsSchema],
|
|
6544
|
+
['FlowPins', FlowPinsSchema],
|
|
5529
6545
|
['PublishAgentBody', PublishAgentBodySchema],
|
|
5530
6546
|
['PublishAgentResult', PublishAgentResultSchema],
|
|
5531
6547
|
['UnregisterAgentResult', UnregisterAgentResultSchema],
|
|
@@ -5647,6 +6663,9 @@ export const COMPONENT_SCHEMAS = [
|
|
|
5647
6663
|
['GetMCPPromptResult', GetMCPPromptResultSchema],
|
|
5648
6664
|
['CostGroupDimension', CostGroupDimensionSchema],
|
|
5649
6665
|
['CostRecord', CostRecordSchema],
|
|
6666
|
+
['ModelCallTokens', ModelCallTokensSchema],
|
|
6667
|
+
['ModelCallError', ModelCallErrorSchema],
|
|
6668
|
+
['CostTokenTotals', CostTokenTotalsSchema],
|
|
5650
6669
|
['CostRecordCollectionPage', CostRecordCollectionPageSchema],
|
|
5651
6670
|
['CostAggregateGroup', CostAggregateGroupSchema],
|
|
5652
6671
|
['CostAggregateResult', CostAggregateResultSchema],
|
|
@@ -5672,9 +6691,20 @@ export const COMPONENT_SCHEMAS = [
|
|
|
5672
6691
|
['PublishEvalSuiteResult', PublishEvalSuiteResultSchema],
|
|
5673
6692
|
['UnregisterEvalSuiteResult', UnregisterEvalSuiteResultSchema],
|
|
5674
6693
|
['ReinstateEvalSuiteVersionResult', ReinstateEvalSuiteVersionResultSchema],
|
|
6694
|
+
['BlockKind', BlockKindSchema],
|
|
6695
|
+
['PromptBlockContent', PromptBlockContentSchema],
|
|
6696
|
+
['SettingsBlockContent', SettingsBlockContentSchema],
|
|
6697
|
+
['Block', BlockSchema],
|
|
6698
|
+
['BlockCollectionPage', BlockCollectionPageSchema],
|
|
6699
|
+
['PublishBlockBody', PublishBlockBodySchema],
|
|
6700
|
+
['PublishBlockResult', PublishBlockResultSchema],
|
|
6701
|
+
['UnregisterBlockResult', UnregisterBlockResultSchema],
|
|
6702
|
+
['ReinstateBlockResult', ReinstateBlockResultSchema],
|
|
5675
6703
|
['EvalRunStatus', EvalRunStatusSchema],
|
|
5676
6704
|
['EvalRunAgentRef', EvalRunAgentRefSchema],
|
|
5677
6705
|
['EvalRunFlowRef', EvalRunFlowRefSchema],
|
|
6706
|
+
['EvalBaseline', EvalBaselineSchema],
|
|
6707
|
+
['EvalComparison', EvalComparisonSchema],
|
|
5678
6708
|
['EvalRun', EvalRunSchema],
|
|
5679
6709
|
['EvalRunCollectionPage', EvalRunCollectionPageSchema],
|
|
5680
6710
|
['StartEvalRunBody', StartEvalRunBodySchema],
|
|
@@ -5805,6 +6835,7 @@ export const COMPONENT_SCHEMAS = [
|
|
|
5805
6835
|
['CreateWebhookEndpointBody', CreateWebhookEndpointBodySchema],
|
|
5806
6836
|
['PatchWebhookEndpointBody', PatchWebhookEndpointBodySchema],
|
|
5807
6837
|
['WebhookEndpointUnregisterResult', WebhookEndpointUnregisterResultSchema],
|
|
6838
|
+
['RunTreeUsage', RunTreeUsageSchema],
|
|
5808
6839
|
['FinishedRun', FinishedRunSchema],
|
|
5809
6840
|
['RunFinishedEvent', RunFinishedEventSchema],
|
|
5810
6841
|
['WebhookTestEvent', WebhookTestEventSchema],
|