@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
|
@@ -31,6 +31,12 @@ export interface ParameterSpec {
|
|
|
31
31
|
readonly required?: boolean;
|
|
32
32
|
readonly description?: string;
|
|
33
33
|
readonly schema: JsonSchema;
|
|
34
|
+
/**
|
|
35
|
+
* A segment path, one `key:value` per repeated value, coarse to fine.
|
|
36
|
+
* Emitted as `x-kindgi-segment-path: true`; a generated client takes
|
|
37
|
+
* `{key, value}` steps and writes the values itself.
|
|
38
|
+
*/
|
|
39
|
+
readonly segmentPath?: boolean;
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
export interface ResponseSpec {
|
|
@@ -158,6 +164,15 @@ const RunReplaysQueryParam: ParameterSpec = {
|
|
|
158
164
|
schema: { type: 'string', enum: ['exclude', 'include', 'only'], default: 'exclude' },
|
|
159
165
|
};
|
|
160
166
|
|
|
167
|
+
const ConversationReplaysQueryParam: ParameterSpec = {
|
|
168
|
+
name: 'replays',
|
|
169
|
+
in: 'query',
|
|
170
|
+
required: false,
|
|
171
|
+
description:
|
|
172
|
+
"Replay conversations (opened by a comparison's replay turn; `metadata.replayOf` names the run it replays). `exclude` (default) leaves them out; `include` lists them with the others; `only` lists just them.",
|
|
173
|
+
schema: { type: 'string', enum: ['exclude', 'include', 'only'], default: 'exclude' },
|
|
174
|
+
};
|
|
175
|
+
|
|
161
176
|
const RunEvalRunIdQueryParam: ParameterSpec = {
|
|
162
177
|
name: 'evalRunId',
|
|
163
178
|
in: 'query',
|
|
@@ -167,6 +182,39 @@ const RunEvalRunIdQueryParam: ParameterSpec = {
|
|
|
167
182
|
schema: { type: 'string', minLength: 1 },
|
|
168
183
|
};
|
|
169
184
|
|
|
185
|
+
const LiveProjectQueryParam: ParameterSpec = {
|
|
186
|
+
name: 'projectId',
|
|
187
|
+
in: 'query',
|
|
188
|
+
required: false,
|
|
189
|
+
description: "The run's project; omit → only the agent's tenant-wide pin applies.",
|
|
190
|
+
schema: { type: 'string', format: 'uuid' },
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
const SegmentQueryParam: ParameterSpec = {
|
|
194
|
+
name: 'segment',
|
|
195
|
+
in: 'query',
|
|
196
|
+
required: false,
|
|
197
|
+
description: 'One step of the segment path, `key:value`; repeat it in order, coarse to fine.',
|
|
198
|
+
schema: { type: 'array', items: { type: 'string' } },
|
|
199
|
+
segmentPath: true,
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
const PromotionScopeKindQueryParam: ParameterSpec = {
|
|
203
|
+
name: 'scopeKind',
|
|
204
|
+
in: 'query',
|
|
205
|
+
required: false,
|
|
206
|
+
description:
|
|
207
|
+
'Only one scope: `tenant`, `org` or `project` (with `scopeId`), or `segment` (with `scopeId` and `segment`).',
|
|
208
|
+
schema: { type: 'string', enum: ['tenant', 'org', 'project', 'segment'] },
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
const PromotionIdPathParam: ParameterSpec = {
|
|
212
|
+
name: 'promotionId',
|
|
213
|
+
in: 'path',
|
|
214
|
+
required: true,
|
|
215
|
+
schema: { type: 'string', format: 'uuid' },
|
|
216
|
+
};
|
|
217
|
+
|
|
170
218
|
const RunIncludeQueryParam: ParameterSpec = {
|
|
171
219
|
name: 'include',
|
|
172
220
|
in: 'query',
|
|
@@ -201,6 +249,22 @@ const LastEventIdParam: ParameterSpec = {
|
|
|
201
249
|
schema: { type: 'string' },
|
|
202
250
|
};
|
|
203
251
|
|
|
252
|
+
const GatePolicyIdPathParam: ParameterSpec = {
|
|
253
|
+
name: 'policyId',
|
|
254
|
+
in: 'path',
|
|
255
|
+
required: true,
|
|
256
|
+
description: 'The gate policy id.',
|
|
257
|
+
schema: { type: 'string' },
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
const GatePolicyVersionPathParam: ParameterSpec = {
|
|
261
|
+
name: 'version',
|
|
262
|
+
in: 'path',
|
|
263
|
+
required: true,
|
|
264
|
+
description: 'A semver version of the gate policy.',
|
|
265
|
+
schema: { type: 'string' },
|
|
266
|
+
};
|
|
267
|
+
|
|
204
268
|
const AgentIdPathParam: ParameterSpec = {
|
|
205
269
|
name: 'agentId',
|
|
206
270
|
in: 'path',
|
|
@@ -367,6 +431,38 @@ const SupervisorIdQueryParam: ParameterSpec = {
|
|
|
367
431
|
schema: { type: 'string' },
|
|
368
432
|
};
|
|
369
433
|
|
|
434
|
+
const ObservationAgentVersionQueryParam: ParameterSpec = {
|
|
435
|
+
name: 'agentVersion',
|
|
436
|
+
in: 'query',
|
|
437
|
+
required: false,
|
|
438
|
+
description: 'Only the observations of this agent version (with `agentId`).',
|
|
439
|
+
schema: { type: 'string' },
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
const ObservationConversationIdQueryParam: ParameterSpec = {
|
|
443
|
+
name: 'conversationId',
|
|
444
|
+
in: 'query',
|
|
445
|
+
required: false,
|
|
446
|
+
description: 'Only the observations of turns in this conversation.',
|
|
447
|
+
schema: { type: 'string' },
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
const ObservationSinceQueryParam: ParameterSpec = {
|
|
451
|
+
name: 'since',
|
|
452
|
+
in: 'query',
|
|
453
|
+
required: false,
|
|
454
|
+
description: 'Only the observations at or after this time (ISO 8601).',
|
|
455
|
+
schema: { type: 'string', format: 'date-time' },
|
|
456
|
+
};
|
|
457
|
+
|
|
458
|
+
const ObservationUntilQueryParam: ParameterSpec = {
|
|
459
|
+
name: 'until',
|
|
460
|
+
in: 'query',
|
|
461
|
+
required: false,
|
|
462
|
+
description: 'Only the observations at or before this time (ISO 8601).',
|
|
463
|
+
schema: { type: 'string', format: 'date-time' },
|
|
464
|
+
};
|
|
465
|
+
|
|
370
466
|
const FactIdPathParam: ParameterSpec = {
|
|
371
467
|
name: 'factId',
|
|
372
468
|
in: 'path',
|
|
@@ -456,7 +552,7 @@ const ProvenanceAgentIdQueryParam: ParameterSpec = {
|
|
|
456
552
|
in: 'query',
|
|
457
553
|
required: false,
|
|
458
554
|
description:
|
|
459
|
-
|
|
555
|
+
"Only the records of this agent's turns, at any version: the agent the record's run names, as `GET /v1/runs?agentId=` matches it. Turns that ran before Kindgi 0.1.3 don't name their agent and aren't matched.",
|
|
460
556
|
schema: { type: 'string' },
|
|
461
557
|
};
|
|
462
558
|
|
|
@@ -769,7 +865,7 @@ const PolicyKindFilterQueryParam: ParameterSpec = {
|
|
|
769
865
|
in: 'query',
|
|
770
866
|
required: false,
|
|
771
867
|
description:
|
|
772
|
-
'Filter to policies of a single kind. Values: `access-control | model-routing | adapter-allowlist | rate-limit | retention | compliance`.',
|
|
868
|
+
'Filter to policies of a single kind. Values: `access-control | model-routing | adapter-allowlist | rate-limit | retention | compliance | tool-errors | hitl`.',
|
|
773
869
|
schema: { $ref: '#/components/schemas/PolicyKind' },
|
|
774
870
|
};
|
|
775
871
|
|
|
@@ -781,6 +877,32 @@ const PolicyNameFilterQueryParam: ParameterSpec = {
|
|
|
781
877
|
schema: { type: 'string' },
|
|
782
878
|
};
|
|
783
879
|
|
|
880
|
+
// Admin plane — retention.
|
|
881
|
+
|
|
882
|
+
const RetentionDomainQueryParam: ParameterSpec = {
|
|
883
|
+
name: 'domain',
|
|
884
|
+
in: 'query',
|
|
885
|
+
required: false,
|
|
886
|
+
description: 'Only this domain. Absent: every domain.',
|
|
887
|
+
schema: { $ref: '#/components/schemas/RetentionDomain' },
|
|
888
|
+
};
|
|
889
|
+
|
|
890
|
+
const RetentionPastGraceOnlyQueryParam: ParameterSpec = {
|
|
891
|
+
name: 'pastGraceOnly',
|
|
892
|
+
in: 'query',
|
|
893
|
+
required: false,
|
|
894
|
+
description: '`true`: only rows past their grace, the ones a sweep would purge now.',
|
|
895
|
+
schema: { type: 'boolean', default: false },
|
|
896
|
+
};
|
|
897
|
+
|
|
898
|
+
const RetentionDomainPathParam: ParameterSpec = {
|
|
899
|
+
name: 'domain',
|
|
900
|
+
in: 'path',
|
|
901
|
+
required: true,
|
|
902
|
+
description: 'The domain to sweep (not `*`).',
|
|
903
|
+
schema: { $ref: '#/components/schemas/RetentionDomain' },
|
|
904
|
+
};
|
|
905
|
+
|
|
784
906
|
// Admin plane — eval suites.
|
|
785
907
|
|
|
786
908
|
const EvalSuiteIdPathParam: ParameterSpec = {
|
|
@@ -1115,8 +1237,13 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
1115
1237
|
schema: ref('Run'),
|
|
1116
1238
|
},
|
|
1117
1239
|
...CommonMutationErrors,
|
|
1118
|
-
'404': ErrorResponse(
|
|
1240
|
+
'404': ErrorResponse(
|
|
1241
|
+
'Agent or flow not found; or `projectId` names no project of this tenant (`project-not-found`).',
|
|
1242
|
+
),
|
|
1119
1243
|
'422': ErrorResponse('Guardrail violation or budget exceeded.'),
|
|
1244
|
+
'400': ErrorResponse(
|
|
1245
|
+
"Malformed request body, or the body's `projectId` isn't a project id (a UUID).",
|
|
1246
|
+
),
|
|
1120
1247
|
},
|
|
1121
1248
|
},
|
|
1122
1249
|
{
|
|
@@ -1386,6 +1513,12 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
1386
1513
|
'201': { description: 'Token minted.', schema: ref('MintTokenResult') },
|
|
1387
1514
|
...CommonMutationErrors,
|
|
1388
1515
|
'403': ErrorResponse('Not a tenant admin, or a capability the caller does not hold.'),
|
|
1516
|
+
'400': ErrorResponse(
|
|
1517
|
+
"Malformed request body, or the body's `projectId` isn't a project id (a UUID).",
|
|
1518
|
+
),
|
|
1519
|
+
'404': ErrorResponse(
|
|
1520
|
+
"The body's `projectId` names no project of this tenant (`project-not-found`).",
|
|
1521
|
+
),
|
|
1389
1522
|
},
|
|
1390
1523
|
},
|
|
1391
1524
|
{
|
|
@@ -1576,6 +1709,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
1576
1709
|
responses: {
|
|
1577
1710
|
'201': { description: 'Reviewer registered.', schema: ref('Reviewer') },
|
|
1578
1711
|
...CommonMutationErrors,
|
|
1712
|
+
'403': ErrorResponse(
|
|
1713
|
+
'With authorization enforced, the caller is not an admin of the tenant.',
|
|
1714
|
+
),
|
|
1579
1715
|
},
|
|
1580
1716
|
},
|
|
1581
1717
|
{
|
|
@@ -1593,6 +1729,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
1593
1729
|
'200': { description: 'Unregistered.', schema: ref('UnregisterReviewerResult') },
|
|
1594
1730
|
...CommonMutationErrors,
|
|
1595
1731
|
'404': ErrorResponse('No reviewer with that id under this tenant.'),
|
|
1732
|
+
'403': ErrorResponse(
|
|
1733
|
+
'With authorization enforced, the caller is not an admin of the tenant.',
|
|
1734
|
+
),
|
|
1596
1735
|
},
|
|
1597
1736
|
},
|
|
1598
1737
|
{
|
|
@@ -1686,12 +1825,22 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
1686
1825
|
parameters: [AgentIdPathParam, IdempotencyKeyParam],
|
|
1687
1826
|
requestBody: { required: true, schema: ref('DeriveAgentVersionBody') },
|
|
1688
1827
|
responses: {
|
|
1828
|
+
'200': {
|
|
1829
|
+
description:
|
|
1830
|
+
'An active version already holds this definition and these pins (the same swap derived before, or a deploy that registered it): that version, unchanged.',
|
|
1831
|
+
schema: ref('Agent'),
|
|
1832
|
+
},
|
|
1689
1833
|
'201': { description: 'The derived agent version.', schema: ref('Agent') },
|
|
1690
1834
|
...CommonMutationErrors,
|
|
1835
|
+
'409': ErrorResponse(
|
|
1836
|
+
"Idempotency-Key was reused with a different body, or resource-state conflict. Or `registry-read-only`: this registry takes no writes (under `kindgi dev`, the pack's files are the source); the message says what to do instead.",
|
|
1837
|
+
),
|
|
1691
1838
|
'400': ErrorResponse(
|
|
1692
|
-
"`validation-failed`: `from` has no pins, a swap names a block it doesn't reference, or a version that isn't published, active or the right kind (see `details.issues`).",
|
|
1839
|
+
"`validation-failed`: `from` has no pins, a swap names a block it doesn't reference, or a version that isn't published, active or the right kind (see `details.issues`); or `projectId` isn't a project id (a UUID).",
|
|
1840
|
+
),
|
|
1841
|
+
'404': ErrorResponse(
|
|
1842
|
+
'`agent-not-found`: no agent at `from`; or `projectId` names no project of this tenant (`project-not-found`).',
|
|
1693
1843
|
),
|
|
1694
|
-
'404': ErrorResponse('`agent-not-found`: no agent at `from`.'),
|
|
1695
1844
|
},
|
|
1696
1845
|
},
|
|
1697
1846
|
{
|
|
@@ -1724,8 +1873,15 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
1724
1873
|
responses: {
|
|
1725
1874
|
'201': { description: 'Agent published.', schema: ref('PublishAgentResult') },
|
|
1726
1875
|
...CommonMutationErrors,
|
|
1727
|
-
'400': ErrorResponse(
|
|
1728
|
-
|
|
1876
|
+
'400': ErrorResponse(
|
|
1877
|
+
"Validation failed (see `details.issues`); or `projectId` isn't a project id (a UUID).",
|
|
1878
|
+
),
|
|
1879
|
+
'409': ErrorResponse(
|
|
1880
|
+
"Agent already registered at that (id, version). Or `registry-read-only`: this registry takes no writes (under `kindgi dev`, the pack's files are the source); the message says what to do instead.",
|
|
1881
|
+
),
|
|
1882
|
+
'404': ErrorResponse(
|
|
1883
|
+
"The body's `projectId` names no project of this tenant (`project-not-found`).",
|
|
1884
|
+
),
|
|
1729
1885
|
},
|
|
1730
1886
|
},
|
|
1731
1887
|
{
|
|
@@ -1740,6 +1896,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
1740
1896
|
responses: {
|
|
1741
1897
|
'200': { description: 'Unregistered.', schema: ref('UnregisterAgentResult') },
|
|
1742
1898
|
...CommonMutationErrors,
|
|
1899
|
+
'409': ErrorResponse(
|
|
1900
|
+
"Idempotency-Key was reused with a different body, or resource-state conflict. Or `registry-read-only`: this registry takes no writes (under `kindgi dev`, the pack's files are the source); the message says what to do instead. Or `agent-version-live`: the version is the live version of the scopes in `details.scopes`; roll back, unpin, or promote another version there first.",
|
|
1901
|
+
),
|
|
1743
1902
|
'404': ErrorResponse('No agent at that (id, version) under this tenant.'),
|
|
1744
1903
|
},
|
|
1745
1904
|
},
|
|
@@ -1757,9 +1916,328 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
1757
1916
|
responses: {
|
|
1758
1917
|
'200': { description: 'Reinstated.', schema: ref('ReinstateAgentVersionResult') },
|
|
1759
1918
|
...CommonMutationErrors,
|
|
1919
|
+
'409': ErrorResponse(
|
|
1920
|
+
"Idempotency-Key was reused with a different body, or resource-state conflict. Or `registry-read-only`: this registry takes no writes (under `kindgi dev`, the pack's files are the source); the message says what to do instead.",
|
|
1921
|
+
),
|
|
1760
1922
|
'404': ErrorResponse('No agent at that (id, version) under this tenant.'),
|
|
1761
1923
|
},
|
|
1762
1924
|
},
|
|
1925
|
+
{
|
|
1926
|
+
method: 'get',
|
|
1927
|
+
honoPath: '/v1/agents/:agentId/live',
|
|
1928
|
+
openapiPath: '/v1/agents/{agentId}/live',
|
|
1929
|
+
operationId: 'agents.live.resolve',
|
|
1930
|
+
summary: 'The version a run would use',
|
|
1931
|
+
description:
|
|
1932
|
+
"Resolves the version a run of this agent would use for a project and segment path: the most specific live version (segment path, project, org, tenant), else the latest registered. A run that names its version, or a follow-up turn in a conversation, isn't resolved this way.",
|
|
1933
|
+
tags: ['agents'],
|
|
1934
|
+
security: 'bearer',
|
|
1935
|
+
parameters: [AgentIdPathParam, LiveProjectQueryParam, SegmentQueryParam],
|
|
1936
|
+
responses: {
|
|
1937
|
+
'200': { description: 'The resolved version.', schema: ref('LiveVersionResolution') },
|
|
1938
|
+
...CommonAuthErrors,
|
|
1939
|
+
'400': ErrorResponse('A malformed project id or segment, or a segment without a project.'),
|
|
1940
|
+
'404': ErrorResponse('No agent with that id.'),
|
|
1941
|
+
},
|
|
1942
|
+
},
|
|
1943
|
+
{
|
|
1944
|
+
method: 'get',
|
|
1945
|
+
honoPath: '/v1/agents/:agentId/live-versions',
|
|
1946
|
+
openapiPath: '/v1/agents/{agentId}/live-versions',
|
|
1947
|
+
operationId: 'agents.live.list',
|
|
1948
|
+
summary: "List an agent's live versions",
|
|
1949
|
+
description: 'Every scope with a live version pinned, and the promotion that set it.',
|
|
1950
|
+
tags: ['agents'],
|
|
1951
|
+
security: 'bearer',
|
|
1952
|
+
parameters: [AgentIdPathParam],
|
|
1953
|
+
responses: {
|
|
1954
|
+
'200': { description: 'The pins.', schema: ref('LivePinList') },
|
|
1955
|
+
...CommonAuthErrors,
|
|
1956
|
+
},
|
|
1957
|
+
},
|
|
1958
|
+
{
|
|
1959
|
+
method: 'post',
|
|
1960
|
+
honoPath: '/v1/agents/:agentId/promotions',
|
|
1961
|
+
openapiPath: '/v1/agents/{agentId}/promotions',
|
|
1962
|
+
operationId: 'agents.promotions.create',
|
|
1963
|
+
summary: 'Make a version live for a scope',
|
|
1964
|
+
description:
|
|
1965
|
+
"Pins `version` live for `scope`: runs in that scope that don't name a version use it, from the next run. Open conversations keep their version. The version must be registered and active. Every promotion is recorded, with who asked and why. Needs `promote` on the agent.\n\nWith a gate policy for the scope (`GET …/gate-policy`), the promotion is checked first against the comparison named by `evalRunId`: `201` promoted; `202` the gate passed and the policy wants a reviewer's approval (a HITL approval, subject `agent-promotion`; the live version moves once it's approved, if nothing changed meanwhile); `422 gate-failed` with `details.promotionId`, `details.policy` and every check in `details.checks`. A refused promotion is recorded too.",
|
|
1966
|
+
tags: ['agents'],
|
|
1967
|
+
security: 'bearer',
|
|
1968
|
+
parameters: [AgentIdPathParam, IdempotencyKeyParam],
|
|
1969
|
+
requestBody: { required: true, schema: ref('PromoteBody') },
|
|
1970
|
+
responses: {
|
|
1971
|
+
'201': { description: 'Promoted.', schema: ref('Promotion') },
|
|
1972
|
+
'202': {
|
|
1973
|
+
description: 'The gate passed; the promotion waits for an approval (`approvalId`).',
|
|
1974
|
+
schema: ref('Promotion'),
|
|
1975
|
+
},
|
|
1976
|
+
...CommonMutationErrors,
|
|
1977
|
+
'404': ErrorResponse(
|
|
1978
|
+
'The version is not registered, or was unregistered; or the eval run is not found.',
|
|
1979
|
+
),
|
|
1980
|
+
'409': ErrorResponse(
|
|
1981
|
+
"`promotion-superseded`: the scope's live version changed while the gate ran; check again.",
|
|
1982
|
+
),
|
|
1983
|
+
'422': ErrorResponse(
|
|
1984
|
+
'`gate-failed`: the gate refused it. `details.checks` has every check; the refusal is recorded (`details.promotionId`).',
|
|
1985
|
+
),
|
|
1986
|
+
'501': ErrorResponse(
|
|
1987
|
+
"`promotion-gate-unsupported`: a gate policy applies, and the deployment can't record a gated promotion.",
|
|
1988
|
+
),
|
|
1989
|
+
},
|
|
1990
|
+
},
|
|
1991
|
+
{
|
|
1992
|
+
method: 'post',
|
|
1993
|
+
honoPath: '/v1/agents/:agentId/promotions/check',
|
|
1994
|
+
openapiPath: '/v1/agents/{agentId}/promotions/check',
|
|
1995
|
+
operationId: 'agents.promotions.check',
|
|
1996
|
+
summary: 'Check a promotion against its gate',
|
|
1997
|
+
description:
|
|
1998
|
+
'What `POST …/promotions` with the same body would do, with nothing recorded: `would-promote`, `needs-approval` (with the approval it needs) or `gate-failed`, with every check. For a pipeline: evaluate, check, promote. Needs `read` on the agent.',
|
|
1999
|
+
tags: ['agents'],
|
|
2000
|
+
security: 'bearer',
|
|
2001
|
+
parameters: [AgentIdPathParam],
|
|
2002
|
+
requestBody: { required: true, schema: ref('PromoteBody') },
|
|
2003
|
+
responses: {
|
|
2004
|
+
'200': { description: "The gate's answer.", schema: ref('PromotionCheck') },
|
|
2005
|
+
...CommonAuthErrors,
|
|
2006
|
+
'400': ErrorResponse('Malformed body, or the eval run is not a finished comparison.'),
|
|
2007
|
+
'404': ErrorResponse('The version, the agent or the eval run is not found.'),
|
|
2008
|
+
},
|
|
2009
|
+
},
|
|
2010
|
+
{
|
|
2011
|
+
method: 'get',
|
|
2012
|
+
honoPath: '/v1/agents/:agentId/gate-policy',
|
|
2013
|
+
openapiPath: '/v1/agents/{agentId}/gate-policy',
|
|
2014
|
+
operationId: 'agents.gatePolicy.resolve',
|
|
2015
|
+
summary: 'The gate policy for a scope',
|
|
2016
|
+
description:
|
|
2017
|
+
"The gate policy a promotion of the agent for the scope would be checked against: the most specific scope with an active policy (a segment path's longer prefixes first, then its project, the project's org, the tenant), at its latest active version. `policy: null` when none applies.",
|
|
2018
|
+
tags: ['agents'],
|
|
2019
|
+
security: 'bearer',
|
|
2020
|
+
parameters: [
|
|
2021
|
+
AgentIdPathParam,
|
|
2022
|
+
PromotionScopeKindQueryParam,
|
|
2023
|
+
ScopeIdQueryParam,
|
|
2024
|
+
SegmentQueryParam,
|
|
2025
|
+
],
|
|
2026
|
+
responses: {
|
|
2027
|
+
'200': { description: 'The policy, or null.', schema: ref('GatePolicyResolution') },
|
|
2028
|
+
...CommonAuthErrors,
|
|
2029
|
+
'400': ErrorResponse('Missing or malformed scope.'),
|
|
2030
|
+
},
|
|
2031
|
+
},
|
|
2032
|
+
{
|
|
2033
|
+
method: 'get',
|
|
2034
|
+
honoPath: '/v1/gate-policies',
|
|
2035
|
+
openapiPath: '/v1/gate-policies',
|
|
2036
|
+
operationId: 'gatePolicies.list',
|
|
2037
|
+
summary: 'List gate policies',
|
|
2038
|
+
description:
|
|
2039
|
+
"Each gate policy's latest active version. `agentId` narrows it to one agent's; `scopeKind` (with `scopeId` and `segment`) to one scope's.",
|
|
2040
|
+
tags: ['gate-policies'],
|
|
2041
|
+
security: 'bearer',
|
|
2042
|
+
parameters: [
|
|
2043
|
+
LimitQueryParam,
|
|
2044
|
+
CursorQueryParam,
|
|
2045
|
+
{
|
|
2046
|
+
name: 'agentId',
|
|
2047
|
+
in: 'query',
|
|
2048
|
+
required: false,
|
|
2049
|
+
description: 'Only the policies gating this agent.',
|
|
2050
|
+
schema: { type: 'string' },
|
|
2051
|
+
},
|
|
2052
|
+
PromotionScopeKindQueryParam,
|
|
2053
|
+
ScopeIdQueryParam,
|
|
2054
|
+
SegmentQueryParam,
|
|
2055
|
+
],
|
|
2056
|
+
responses: {
|
|
2057
|
+
'200': { description: 'Page of gate policies.', schema: ref('GatePolicyPage') },
|
|
2058
|
+
...CommonAuthErrors,
|
|
2059
|
+
'400': ErrorResponse('Malformed scope or cursor.'),
|
|
2060
|
+
},
|
|
2061
|
+
},
|
|
2062
|
+
{
|
|
2063
|
+
method: 'post',
|
|
2064
|
+
honoPath: '/v1/gate-policies',
|
|
2065
|
+
openapiPath: '/v1/gate-policies',
|
|
2066
|
+
operationId: 'gatePolicies.publish',
|
|
2067
|
+
summary: 'Publish a gate policy',
|
|
2068
|
+
description:
|
|
2069
|
+
"Registers a gate policy, or a new version of one: what a promotion of `agentId` for `scope` must show. One policy per agent and scope: another policy id for a scope that has one is refused with `409 gate-policy-scope-taken` (`details.heldBy` names it; publish a new version of that one instead), and a new version can't change the agent or scope (`409 gate-policy-scope-changed`). The `spec` is checked strictly: an unknown key is refused (`400 validation-failed`, `details.issues`). Needs `admin` on the tenant: whoever may promote can't loosen their own gate.",
|
|
2070
|
+
tags: ['gate-policies'],
|
|
2071
|
+
security: 'bearer',
|
|
2072
|
+
parameters: [IdempotencyKeyParam],
|
|
2073
|
+
requestBody: { required: true, schema: ref('PublishGatePolicyBody') },
|
|
2074
|
+
responses: {
|
|
2075
|
+
'201': { description: 'Gate policy published.', schema: ref('GatePolicy') },
|
|
2076
|
+
...CommonMutationErrors,
|
|
2077
|
+
'400': ErrorResponse('Validation failed (see `details.issues`).'),
|
|
2078
|
+
'409': ErrorResponse(
|
|
2079
|
+
'`gate-policy-already-registered`: that (id, version) exists. `gate-policy-scope-taken`: another policy gates the agent for the scope (`details.heldBy`). `gate-policy-scope-changed`: the version would change the agent or scope. `gate-policy-scope-unpinned`: nothing covering the scope is pinned, so a published version would go live there ungated; pin a version for the scope, or one above it, first.',
|
|
2080
|
+
),
|
|
2081
|
+
},
|
|
2082
|
+
},
|
|
2083
|
+
{
|
|
2084
|
+
method: 'get',
|
|
2085
|
+
honoPath: '/v1/gate-policies/:policyId',
|
|
2086
|
+
openapiPath: '/v1/gate-policies/{policyId}',
|
|
2087
|
+
operationId: 'gatePolicies.get',
|
|
2088
|
+
summary: 'Get a gate policy',
|
|
2089
|
+
description: "The policy's latest active version.",
|
|
2090
|
+
tags: ['gate-policies'],
|
|
2091
|
+
security: 'bearer',
|
|
2092
|
+
parameters: [GatePolicyIdPathParam],
|
|
2093
|
+
responses: {
|
|
2094
|
+
'200': { description: 'The gate policy.', schema: ref('GatePolicy') },
|
|
2095
|
+
...CommonAuthErrors,
|
|
2096
|
+
'404': ErrorResponse('No active gate policy with that id.'),
|
|
2097
|
+
},
|
|
2098
|
+
},
|
|
2099
|
+
{
|
|
2100
|
+
method: 'get',
|
|
2101
|
+
honoPath: '/v1/gate-policies/:policyId/versions',
|
|
2102
|
+
openapiPath: '/v1/gate-policies/{policyId}/versions',
|
|
2103
|
+
operationId: 'gatePolicies.versions.list',
|
|
2104
|
+
summary: "List a gate policy's versions",
|
|
2105
|
+
description: 'Every version, oldest first, unregistered ones too (with `unregisteredAt`).',
|
|
2106
|
+
tags: ['gate-policies'],
|
|
2107
|
+
security: 'bearer',
|
|
2108
|
+
parameters: [GatePolicyIdPathParam],
|
|
2109
|
+
responses: {
|
|
2110
|
+
'200': { description: 'The versions.', schema: ref('GatePolicyPage') },
|
|
2111
|
+
...CommonAuthErrors,
|
|
2112
|
+
'404': ErrorResponse('No gate policy with that id.'),
|
|
2113
|
+
},
|
|
2114
|
+
},
|
|
2115
|
+
{
|
|
2116
|
+
method: 'get',
|
|
2117
|
+
honoPath: '/v1/gate-policies/:policyId/versions/:version',
|
|
2118
|
+
openapiPath: '/v1/gate-policies/{policyId}/versions/{version}',
|
|
2119
|
+
operationId: 'gatePolicies.versions.get',
|
|
2120
|
+
summary: 'Get a gate policy version',
|
|
2121
|
+
tags: ['gate-policies'],
|
|
2122
|
+
security: 'bearer',
|
|
2123
|
+
parameters: [GatePolicyIdPathParam, GatePolicyVersionPathParam],
|
|
2124
|
+
responses: {
|
|
2125
|
+
'200': { description: 'The version.', schema: ref('GatePolicy') },
|
|
2126
|
+
...CommonAuthErrors,
|
|
2127
|
+
'404': ErrorResponse('No such version.'),
|
|
2128
|
+
},
|
|
2129
|
+
},
|
|
2130
|
+
{
|
|
2131
|
+
method: 'post',
|
|
2132
|
+
honoPath: '/v1/gate-policies/:policyId/versions/:version/unregister',
|
|
2133
|
+
openapiPath: '/v1/gate-policies/{policyId}/versions/{version}/unregister',
|
|
2134
|
+
operationId: 'gatePolicies.versions.unregister',
|
|
2135
|
+
summary: 'Unregister a gate policy version',
|
|
2136
|
+
description:
|
|
2137
|
+
"The version stops applying; the policy's latest remaining active version applies, or, with none, the scope above's policy. Promotions keep the version they were checked against. Needs `admin` on the tenant.",
|
|
2138
|
+
tags: ['gate-policies'],
|
|
2139
|
+
security: 'bearer',
|
|
2140
|
+
parameters: [GatePolicyIdPathParam, GatePolicyVersionPathParam],
|
|
2141
|
+
responses: {
|
|
2142
|
+
'200': { description: 'The unregistered version.', schema: ref('GatePolicy') },
|
|
2143
|
+
...CommonMutationErrors,
|
|
2144
|
+
'404': ErrorResponse('No such version.'),
|
|
2145
|
+
},
|
|
2146
|
+
},
|
|
2147
|
+
{
|
|
2148
|
+
method: 'post',
|
|
2149
|
+
honoPath: '/v1/gate-policies/:policyId/versions/:version/reinstate',
|
|
2150
|
+
openapiPath: '/v1/gate-policies/{policyId}/versions/{version}/reinstate',
|
|
2151
|
+
operationId: 'gatePolicies.versions.reinstate',
|
|
2152
|
+
summary: 'Reinstate a gate policy version',
|
|
2153
|
+
description: 'Needs `admin` on the tenant.',
|
|
2154
|
+
tags: ['gate-policies'],
|
|
2155
|
+
security: 'bearer',
|
|
2156
|
+
parameters: [GatePolicyIdPathParam, GatePolicyVersionPathParam],
|
|
2157
|
+
responses: {
|
|
2158
|
+
'200': { description: 'The reinstated version.', schema: ref('GatePolicy') },
|
|
2159
|
+
...CommonMutationErrors,
|
|
2160
|
+
'404': ErrorResponse('No such version.'),
|
|
2161
|
+
},
|
|
2162
|
+
},
|
|
2163
|
+
{
|
|
2164
|
+
method: 'get',
|
|
2165
|
+
honoPath: '/v1/agents/:agentId/promotions',
|
|
2166
|
+
openapiPath: '/v1/agents/{agentId}/promotions',
|
|
2167
|
+
operationId: 'agents.promotions.list',
|
|
2168
|
+
summary: "List an agent's promotions",
|
|
2169
|
+
description:
|
|
2170
|
+
'The history of live-version changes (promotions, rollbacks, unpins), newest first. `scopeKind` (`tenant`, `org`, `project`, `segment`) with `scopeId` and `segment` narrows it to one scope.',
|
|
2171
|
+
tags: ['agents'],
|
|
2172
|
+
security: 'bearer',
|
|
2173
|
+
parameters: [
|
|
2174
|
+
AgentIdPathParam,
|
|
2175
|
+
LimitQueryParam,
|
|
2176
|
+
CursorQueryParam,
|
|
2177
|
+
PromotionScopeKindQueryParam,
|
|
2178
|
+
ScopeIdQueryParam,
|
|
2179
|
+
SegmentQueryParam,
|
|
2180
|
+
],
|
|
2181
|
+
responses: {
|
|
2182
|
+
'200': { description: 'Page of promotions.', schema: ref('PromotionPage') },
|
|
2183
|
+
...CommonAuthErrors,
|
|
2184
|
+
'400': ErrorResponse('Malformed scope or cursor.'),
|
|
2185
|
+
},
|
|
2186
|
+
},
|
|
2187
|
+
{
|
|
2188
|
+
method: 'get',
|
|
2189
|
+
honoPath: '/v1/agents/:agentId/promotions/:promotionId',
|
|
2190
|
+
openapiPath: '/v1/agents/{agentId}/promotions/{promotionId}',
|
|
2191
|
+
operationId: 'agents.promotions.get',
|
|
2192
|
+
summary: 'Get a promotion',
|
|
2193
|
+
tags: ['agents'],
|
|
2194
|
+
security: 'bearer',
|
|
2195
|
+
parameters: [AgentIdPathParam, PromotionIdPathParam],
|
|
2196
|
+
responses: {
|
|
2197
|
+
'200': { description: 'The promotion.', schema: ref('Promotion') },
|
|
2198
|
+
...CommonAuthErrors,
|
|
2199
|
+
'404': ErrorResponse('No such promotion for this agent.'),
|
|
2200
|
+
},
|
|
2201
|
+
},
|
|
2202
|
+
{
|
|
2203
|
+
method: 'post',
|
|
2204
|
+
honoPath: '/v1/agents/:agentId/live/rollback',
|
|
2205
|
+
openapiPath: '/v1/agents/{agentId}/live/rollback',
|
|
2206
|
+
operationId: 'agents.live.rollback',
|
|
2207
|
+
summary: 'Roll a scope back to its previous live version',
|
|
2208
|
+
description:
|
|
2209
|
+
"Back to the scope's previous live version, or `toVersion`. Recorded like a promotion. Needs `promote` on the agent.",
|
|
2210
|
+
tags: ['agents'],
|
|
2211
|
+
security: 'bearer',
|
|
2212
|
+
parameters: [AgentIdPathParam, IdempotencyKeyParam],
|
|
2213
|
+
requestBody: { required: true, schema: ref('RollbackBody') },
|
|
2214
|
+
responses: {
|
|
2215
|
+
'200': { description: 'Rolled back.', schema: ref('Promotion') },
|
|
2216
|
+
...CommonMutationErrors,
|
|
2217
|
+
'404': ErrorResponse('`toVersion` is not registered, or was unregistered.'),
|
|
2218
|
+
'409': ErrorResponse('The scope has no pin, or no earlier version to go back to.'),
|
|
2219
|
+
},
|
|
2220
|
+
},
|
|
2221
|
+
{
|
|
2222
|
+
method: 'post',
|
|
2223
|
+
honoPath: '/v1/agents/:agentId/live/unpin',
|
|
2224
|
+
openapiPath: '/v1/agents/{agentId}/live/unpin',
|
|
2225
|
+
operationId: 'agents.live.unpin',
|
|
2226
|
+
summary: "Remove a scope's live version",
|
|
2227
|
+
description:
|
|
2228
|
+
"Removes the scope's own pin: its runs use the next scope up (and the latest when nothing is pinned). Recorded like a promotion. Needs `promote` on the agent.",
|
|
2229
|
+
tags: ['agents'],
|
|
2230
|
+
security: 'bearer',
|
|
2231
|
+
parameters: [AgentIdPathParam, IdempotencyKeyParam],
|
|
2232
|
+
requestBody: { required: true, schema: ref('UnpinBody') },
|
|
2233
|
+
responses: {
|
|
2234
|
+
'200': { description: 'Unpinned.', schema: ref('Promotion') },
|
|
2235
|
+
...CommonMutationErrors,
|
|
2236
|
+
'409': ErrorResponse(
|
|
2237
|
+
'`not-pinned`: the scope has no pin of its own. `gate-policy-needs-pin`: unpinning would leave a scope a gate policy applies to on the latest version, where publishing goes live ungated.',
|
|
2238
|
+
),
|
|
2239
|
+
},
|
|
2240
|
+
},
|
|
1763
2241
|
|
|
1764
2242
|
// ---------- flows ----------
|
|
1765
2243
|
{
|
|
@@ -1847,8 +2325,15 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
1847
2325
|
responses: {
|
|
1848
2326
|
'201': { description: 'Flow published.', schema: ref('PublishFlowResult') },
|
|
1849
2327
|
...CommonMutationErrors,
|
|
1850
|
-
'400': ErrorResponse(
|
|
1851
|
-
|
|
2328
|
+
'400': ErrorResponse(
|
|
2329
|
+
"Validation failed (see `details.issues`); or `projectId` isn't a project id (a UUID).",
|
|
2330
|
+
),
|
|
2331
|
+
'409': ErrorResponse(
|
|
2332
|
+
"Flow already registered at that (id, version). Or `registry-read-only`: this registry takes no writes (under `kindgi dev`, the pack's files are the source); the message says what to do instead.",
|
|
2333
|
+
),
|
|
2334
|
+
'404': ErrorResponse(
|
|
2335
|
+
"The body's `projectId` names no project of this tenant (`project-not-found`).",
|
|
2336
|
+
),
|
|
1852
2337
|
},
|
|
1853
2338
|
},
|
|
1854
2339
|
{
|
|
@@ -1863,6 +2348,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
1863
2348
|
responses: {
|
|
1864
2349
|
'200': { description: 'Unregistered.', schema: ref('UnregisterFlowResult') },
|
|
1865
2350
|
...CommonMutationErrors,
|
|
2351
|
+
'409': ErrorResponse(
|
|
2352
|
+
"Idempotency-Key was reused with a different body, or resource-state conflict. Or `registry-read-only`: this registry takes no writes (under `kindgi dev`, the pack's files are the source); the message says what to do instead.",
|
|
2353
|
+
),
|
|
1866
2354
|
'404': ErrorResponse('No flow at that (id, version) under this tenant.'),
|
|
1867
2355
|
},
|
|
1868
2356
|
},
|
|
@@ -1880,6 +2368,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
1880
2368
|
responses: {
|
|
1881
2369
|
'200': { description: 'Reinstated.', schema: ref('ReinstateFlowVersionResult') },
|
|
1882
2370
|
...CommonMutationErrors,
|
|
2371
|
+
'409': ErrorResponse(
|
|
2372
|
+
"Idempotency-Key was reused with a different body, or resource-state conflict. Or `registry-read-only`: this registry takes no writes (under `kindgi dev`, the pack's files are the source); the message says what to do instead.",
|
|
2373
|
+
),
|
|
1883
2374
|
'404': ErrorResponse('No flow at that (id, version) under this tenant.'),
|
|
1884
2375
|
},
|
|
1885
2376
|
},
|
|
@@ -1974,8 +2465,15 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
1974
2465
|
responses: {
|
|
1975
2466
|
'201': { description: 'Tool registered.', schema: ref('RegisterToolResult') },
|
|
1976
2467
|
...CommonMutationErrors,
|
|
1977
|
-
'400': ErrorResponse(
|
|
1978
|
-
|
|
2468
|
+
'400': ErrorResponse(
|
|
2469
|
+
"Validation failed (see `details.issues`); or `projectId` isn't a project id (a UUID).",
|
|
2470
|
+
),
|
|
2471
|
+
'409': ErrorResponse(
|
|
2472
|
+
"Tool already registered at that id. Or `registry-read-only`: this registry takes no writes (under `kindgi dev`, the pack's files are the source); the message says what to do instead.",
|
|
2473
|
+
),
|
|
2474
|
+
'404': ErrorResponse(
|
|
2475
|
+
"The body's `projectId` names no project of this tenant (`project-not-found`).",
|
|
2476
|
+
),
|
|
1979
2477
|
},
|
|
1980
2478
|
},
|
|
1981
2479
|
{
|
|
@@ -1990,6 +2488,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
1990
2488
|
responses: {
|
|
1991
2489
|
'200': { description: 'Unregistered.', schema: ref('UnregisterToolResult') },
|
|
1992
2490
|
...CommonMutationErrors,
|
|
2491
|
+
'409': ErrorResponse(
|
|
2492
|
+
"Idempotency-Key was reused with a different body, or resource-state conflict. Or `registry-read-only`: this registry takes no writes (under `kindgi dev`, the pack's files are the source); the message says what to do instead.",
|
|
2493
|
+
),
|
|
1993
2494
|
'404': ErrorResponse('No tool at that (id, version) under this tenant.'),
|
|
1994
2495
|
},
|
|
1995
2496
|
},
|
|
@@ -2007,6 +2508,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
2007
2508
|
responses: {
|
|
2008
2509
|
'200': { description: 'Reinstated.', schema: ref('ReinstateToolVersionResult') },
|
|
2009
2510
|
...CommonMutationErrors,
|
|
2511
|
+
'409': ErrorResponse(
|
|
2512
|
+
"Idempotency-Key was reused with a different body, or resource-state conflict. Or `registry-read-only`: this registry takes no writes (under `kindgi dev`, the pack's files are the source); the message says what to do instead.",
|
|
2513
|
+
),
|
|
2010
2514
|
'404': ErrorResponse('No tool at that (id, version) under this tenant.'),
|
|
2011
2515
|
},
|
|
2012
2516
|
},
|
|
@@ -2066,8 +2570,15 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
2066
2570
|
responses: {
|
|
2067
2571
|
'201': { description: 'Guardrail registered.', schema: ref('RegisterGuardrailResult') },
|
|
2068
2572
|
...CommonMutationErrors,
|
|
2069
|
-
'400': ErrorResponse(
|
|
2070
|
-
|
|
2573
|
+
'400': ErrorResponse(
|
|
2574
|
+
"Validation failed (see `details.issues`); or `projectId` isn't a project id (a UUID).",
|
|
2575
|
+
),
|
|
2576
|
+
'409': ErrorResponse(
|
|
2577
|
+
"Guardrail already registered at that id. Or `registry-read-only`: this registry takes no writes (under `kindgi dev`, the pack's files are the source); the message says what to do instead.",
|
|
2578
|
+
),
|
|
2579
|
+
'404': ErrorResponse(
|
|
2580
|
+
"The body's `projectId` names no project of this tenant (`project-not-found`).",
|
|
2581
|
+
),
|
|
2071
2582
|
},
|
|
2072
2583
|
},
|
|
2073
2584
|
{
|
|
@@ -2082,6 +2593,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
2082
2593
|
responses: {
|
|
2083
2594
|
'200': { description: 'Unregistered.', schema: ref('UnregisterGuardrailResult') },
|
|
2084
2595
|
...CommonMutationErrors,
|
|
2596
|
+
'409': ErrorResponse(
|
|
2597
|
+
"Idempotency-Key was reused with a different body, or resource-state conflict. Or `registry-read-only`: this registry takes no writes (under `kindgi dev`, the pack's files are the source); the message says what to do instead.",
|
|
2598
|
+
),
|
|
2085
2599
|
'404': ErrorResponse('No guardrail with that id under this tenant.'),
|
|
2086
2600
|
},
|
|
2087
2601
|
},
|
|
@@ -2094,7 +2608,7 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
2094
2608
|
operationId: 'conversations.list',
|
|
2095
2609
|
summary: 'List conversations',
|
|
2096
2610
|
description:
|
|
2097
|
-
"Cursor-paginated. Fixed sort: `openedAt desc, id desc`. Filters: `?agentId=`, `?status=open|closed`, and `scopeKind`/`scopeId` for one project's conversations, or every project's in an org. Conversations from before Kindgi 0.1.3 have no project and are listed only without a scope.",
|
|
2611
|
+
"Cursor-paginated. Fixed sort: `openedAt desc, id desc`. Filters: `?agentId=`, `?status=open|closed`, `?replays=exclude|include|only` (default `exclude`: a comparison's replay conversations are left out), and `scopeKind`/`scopeId` for one project's conversations, or every project's in an org. Conversations from before Kindgi 0.1.3 have no project and are listed only without a scope.",
|
|
2098
2612
|
tags: ['conversations'],
|
|
2099
2613
|
security: 'bearer',
|
|
2100
2614
|
parameters: [
|
|
@@ -2104,6 +2618,7 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
2104
2618
|
ScopeIdQueryParam,
|
|
2105
2619
|
AgentIdQueryParam,
|
|
2106
2620
|
ConversationStatusQueryParam,
|
|
2621
|
+
ConversationReplaysQueryParam,
|
|
2107
2622
|
],
|
|
2108
2623
|
responses: {
|
|
2109
2624
|
'200': {
|
|
@@ -2126,6 +2641,7 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
2126
2641
|
responses: {
|
|
2127
2642
|
'200': { description: 'Conversation.', schema: ref('Conversation') },
|
|
2128
2643
|
...CommonAuthErrors,
|
|
2644
|
+
'400': ErrorResponse('`conversationId` is not a conversation id (a UUID).'),
|
|
2129
2645
|
'404': ErrorResponse('No conversation with that id under this tenant.'),
|
|
2130
2646
|
},
|
|
2131
2647
|
},
|
|
@@ -2163,6 +2679,7 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
2163
2679
|
schema: ref('Conversation'),
|
|
2164
2680
|
},
|
|
2165
2681
|
...CommonMutationErrors,
|
|
2682
|
+
'400': ErrorResponse('`conversationId` is not a conversation id (a UUID).'),
|
|
2166
2683
|
'404': ErrorResponse('No conversation with that id under this tenant.'),
|
|
2167
2684
|
},
|
|
2168
2685
|
},
|
|
@@ -2183,7 +2700,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
2183
2700
|
schema: ref('ConversationMessageCollectionPage'),
|
|
2184
2701
|
},
|
|
2185
2702
|
...CommonAuthErrors,
|
|
2186
|
-
'400': ErrorResponse(
|
|
2703
|
+
'400': ErrorResponse(
|
|
2704
|
+
'Malformed cursor, or `conversationId` is not a conversation id (a UUID).',
|
|
2705
|
+
),
|
|
2187
2706
|
'404': ErrorResponse('No conversation with that id under this tenant.'),
|
|
2188
2707
|
},
|
|
2189
2708
|
},
|
|
@@ -2675,7 +3194,11 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
2675
3194
|
CursorQueryParam,
|
|
2676
3195
|
ObservationStatusQueryParam,
|
|
2677
3196
|
AgentIdQueryParam,
|
|
3197
|
+
ObservationAgentVersionQueryParam,
|
|
2678
3198
|
SupervisorIdQueryParam,
|
|
3199
|
+
ObservationConversationIdQueryParam,
|
|
3200
|
+
ObservationSinceQueryParam,
|
|
3201
|
+
ObservationUntilQueryParam,
|
|
2679
3202
|
],
|
|
2680
3203
|
responses: {
|
|
2681
3204
|
'200': {
|
|
@@ -2835,7 +3358,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
2835
3358
|
'400': ErrorResponse(
|
|
2836
3359
|
'Malformed body, or `item-not-found` (the pointer resolves to nothing in the output), or `judge-class-not-applicable`.',
|
|
2837
3360
|
),
|
|
2838
|
-
'403': ErrorResponse(
|
|
3361
|
+
'403': ErrorResponse(
|
|
3362
|
+
'`permission-denied`: not allowed to judge this run. `judge-class-not-allowed`: the judge class is restricted (`assertableBy`) and the caller may not assert it.',
|
|
3363
|
+
),
|
|
2839
3364
|
'404': ErrorResponse('`run-not-found`.'),
|
|
2840
3365
|
'409': ErrorResponse('`run-not-finished`: the run has no output to judge yet.'),
|
|
2841
3366
|
},
|
|
@@ -3404,7 +3929,7 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
3404
3929
|
operationId: 'policies.publish',
|
|
3405
3930
|
summary: 'Publish a policy',
|
|
3406
3931
|
description:
|
|
3407
|
-
"Body is a full `Policy` — the server validates top-level shape (id, tenantId, semver version, kind ∈ closed enum, spec is an object)
|
|
3932
|
+
"Body is a full `Policy` — the server validates top-level shape (id, tenantId, semver version, kind ∈ closed enum, spec is an object), and `spec` for `tool-errors`, `hitl` and `retention` (a retention policy with an unknown domain or `mode: archive` is refused with `400 validation-failed`, naming the field). Other kinds' specs are their runtime consumer's to validate. Re-publishing an existing `(policyId, version)` returns `409 policy-already-registered`. A tenant has one retention policy per domain, plus one for `*`: a second policy id for a covered domain is refused with `409 policy-scope-taken` (`details.heldBy` names the policy that covers it; publish a new version of that one instead), and a new version can't move a policy to another domain (`409 policy-scope-changed`). A known kind that no runtime consumer applies yet (`access-control`, `adapter-allowlist`, `rate-limit`, `compliance`) is refused with `400 kind-not-applied` (`details.appliedKinds` lists the ones that are): publishing it would change nothing. Idempotency-Key applies (retries with the same key replay the original 201).",
|
|
3408
3933
|
tags: ['policies'],
|
|
3409
3934
|
security: 'bearer',
|
|
3410
3935
|
parameters: [IdempotencyKeyParam],
|
|
@@ -3415,7 +3940,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
3415
3940
|
'400': ErrorResponse(
|
|
3416
3941
|
'Validation failed (see `details.issues`), or `kind-not-applied`: no runtime consumer applies that kind yet.',
|
|
3417
3942
|
),
|
|
3418
|
-
'409': ErrorResponse(
|
|
3943
|
+
'409': ErrorResponse(
|
|
3944
|
+
'`policy-already-registered`: that (id, version) exists. `policy-scope-taken`: another policy covers the retention domain (`details.heldBy`). `policy-scope-changed`: the version would move the policy to another domain.',
|
|
3945
|
+
),
|
|
3419
3946
|
},
|
|
3420
3947
|
},
|
|
3421
3948
|
{
|
|
@@ -3448,6 +3975,70 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
3448
3975
|
'200': { description: 'Reinstated.', schema: ref('ReinstatePolicyVersionResult') },
|
|
3449
3976
|
...CommonMutationErrors,
|
|
3450
3977
|
'404': ErrorResponse('No policy at that (id, version) under this tenant.'),
|
|
3978
|
+
'409': ErrorResponse(
|
|
3979
|
+
"`policy-scope-taken`: another policy now covers the version's retention domain (`details.heldBy`); unregister it first. `policy-scope-changed`: the version covers a different domain from the policy's other versions.",
|
|
3980
|
+
),
|
|
3981
|
+
},
|
|
3982
|
+
},
|
|
3983
|
+
|
|
3984
|
+
// ---------- retention (admin plane) ----------
|
|
3985
|
+
{
|
|
3986
|
+
method: 'get',
|
|
3987
|
+
honoPath: '/v1/retention/scheduled',
|
|
3988
|
+
openapiPath: '/v1/retention/scheduled',
|
|
3989
|
+
operationId: 'retention.scheduled',
|
|
3990
|
+
summary: 'List deleted rows scheduled for purging',
|
|
3991
|
+
description:
|
|
3992
|
+
"Tombstoned rows in every domain a retention policy covers, with when each is purged (`purgeAt`) and the policy that decides it. `domainsMissingAdapter` names the covered domains this deployment can't purge; `unpolicedDomains` the ones no policy covers, whose tombstones are kept; `conflicts` the domains two policies cover (stored before one policy per domain was enforced). `limit` caps the rows **per domain**; `hasMore` says some domain has more than it returned, and `nextCursor` (when the runtime can continue) is the `cursor` for the next page. Requires `admin` on the tenant.",
|
|
3993
|
+
tags: ['retention'],
|
|
3994
|
+
security: 'bearer',
|
|
3995
|
+
parameters: [
|
|
3996
|
+
RetentionDomainQueryParam,
|
|
3997
|
+
RetentionPastGraceOnlyQueryParam,
|
|
3998
|
+
LimitQueryParam,
|
|
3999
|
+
CursorQueryParam,
|
|
4000
|
+
],
|
|
4001
|
+
responses: {
|
|
4002
|
+
'200': { description: 'Scheduled rows.', schema: ref('RetentionScheduledPage') },
|
|
4003
|
+
...CommonAuthErrors,
|
|
4004
|
+
'403': ErrorResponse('Not a tenant admin.'),
|
|
4005
|
+
'400': ErrorResponse('Unknown `domain`.'),
|
|
4006
|
+
},
|
|
4007
|
+
},
|
|
4008
|
+
{
|
|
4009
|
+
method: 'post',
|
|
4010
|
+
honoPath: '/v1/retention/sweep',
|
|
4011
|
+
openapiPath: '/v1/retention/sweep',
|
|
4012
|
+
operationId: 'retention.sweep',
|
|
4013
|
+
summary: 'Purge the deleted rows past their grace',
|
|
4014
|
+
description:
|
|
4015
|
+
"Purges, for good, every tombstoned row past the grace of the retention policy that covers its domain (or only `domain`'s), up to `maxPerDomain` per domain; `remaining` counts what is left for the next call. Nothing sweeps on its own: call this (or `POST /v1/retention/sweep/{domain}`) from a schedule. A hold (`graceSeconds: -1`) keeps its domain's rows. Idempotent: a second call purges nothing new. Requires `admin` on the tenant.",
|
|
4016
|
+
tags: ['retention'],
|
|
4017
|
+
security: 'bearer',
|
|
4018
|
+
requestBody: { required: false, schema: ref('RetentionSweepBody') },
|
|
4019
|
+
responses: {
|
|
4020
|
+
'200': { description: 'What was purged, per domain.', schema: ref('RetentionSweepResult') },
|
|
4021
|
+
...CommonMutationErrors,
|
|
4022
|
+
'403': ErrorResponse('Not a tenant admin.'),
|
|
4023
|
+
'400': ErrorResponse('Unknown `domain`, or `maxPerDomain` outside 1..10000.'),
|
|
4024
|
+
},
|
|
4025
|
+
},
|
|
4026
|
+
{
|
|
4027
|
+
method: 'post',
|
|
4028
|
+
honoPath: '/v1/retention/sweep/:domain',
|
|
4029
|
+
openapiPath: '/v1/retention/sweep/{domain}',
|
|
4030
|
+
operationId: 'retention.sweepDomain',
|
|
4031
|
+
summary: "Purge one domain's deleted rows past their grace",
|
|
4032
|
+
description: 'As `POST /v1/retention/sweep`, for one domain. Requires `admin` on the tenant.',
|
|
4033
|
+
tags: ['retention'],
|
|
4034
|
+
security: 'bearer',
|
|
4035
|
+
parameters: [RetentionDomainPathParam],
|
|
4036
|
+
requestBody: { required: false, schema: ref('RetentionSweepDomainBody') },
|
|
4037
|
+
responses: {
|
|
4038
|
+
'200': { description: 'What was purged.', schema: ref('RetentionSweepResult') },
|
|
4039
|
+
...CommonMutationErrors,
|
|
4040
|
+
'403': ErrorResponse('Not a tenant admin.'),
|
|
4041
|
+
'400': ErrorResponse('Unknown `domain` (or `*`), or `maxPerDomain` outside 1..10000.'),
|
|
3451
4042
|
},
|
|
3452
4043
|
},
|
|
3453
4044
|
|
|
@@ -3541,8 +4132,13 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
3541
4132
|
responses: {
|
|
3542
4133
|
'201': { description: 'Eval suite published.', schema: ref('PublishEvalSuiteResult') },
|
|
3543
4134
|
...CommonMutationErrors,
|
|
3544
|
-
'400': ErrorResponse(
|
|
4135
|
+
'400': ErrorResponse(
|
|
4136
|
+
"Validation failed (see `details.issues`); or `projectId` isn't a project id (a UUID).",
|
|
4137
|
+
),
|
|
3545
4138
|
'409': ErrorResponse('Eval suite already registered at that (id, version).'),
|
|
4139
|
+
'404': ErrorResponse(
|
|
4140
|
+
"The body's `projectId` names no project of this tenant (`project-not-found`).",
|
|
4141
|
+
),
|
|
3546
4142
|
},
|
|
3547
4143
|
},
|
|
3548
4144
|
{
|
|
@@ -3560,10 +4156,13 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
3560
4156
|
responses: {
|
|
3561
4157
|
'201': { description: 'Version published.', schema: ref('BuildJudgedSuiteResult') },
|
|
3562
4158
|
...CommonMutationErrors,
|
|
3563
|
-
'400': ErrorResponse(
|
|
4159
|
+
'400': ErrorResponse("Malformed body; or `projectId` isn't a project id (a UUID)."),
|
|
3564
4160
|
'403': ErrorResponse('`permission-denied`.'),
|
|
3565
4161
|
'409': ErrorResponse('Eval suite already registered at that (id, version).'),
|
|
3566
4162
|
'501': ErrorResponse('`test-sets-not-supported`: this deployment cannot build test sets.'),
|
|
4163
|
+
'404': ErrorResponse(
|
|
4164
|
+
"The body's `projectId` names no project of this tenant (`project-not-found`).",
|
|
4165
|
+
),
|
|
3567
4166
|
},
|
|
3568
4167
|
},
|
|
3569
4168
|
{
|
|
@@ -3713,10 +4312,13 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
3713
4312
|
'201': { description: 'Published.', schema: ref('PublishBlockResult') },
|
|
3714
4313
|
...CommonMutationErrors,
|
|
3715
4314
|
'400': ErrorResponse(
|
|
3716
|
-
|
|
4315
|
+
"`validation-failed` (see `details.issues`), or an unknown `projectId`; or `projectId` isn't a project id (a UUID).",
|
|
3717
4316
|
),
|
|
3718
4317
|
'403': ErrorResponse('`permission-denied`: no `write` on the project.'),
|
|
3719
4318
|
'409': ErrorResponse('`block-already-registered` or `block-project-mismatch`.'),
|
|
4319
|
+
'404': ErrorResponse(
|
|
4320
|
+
"The body's `projectId` names no project of this tenant (`project-not-found`).",
|
|
4321
|
+
),
|
|
3720
4322
|
},
|
|
3721
4323
|
},
|
|
3722
4324
|
{
|
|
@@ -3770,9 +4372,11 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
3770
4372
|
'201': { description: 'Eval run started.', schema: ref('StartEvalRunResult') },
|
|
3771
4373
|
...CommonMutationErrors,
|
|
3772
4374
|
'400': ErrorResponse(
|
|
3773
|
-
|
|
4375
|
+
"Malformed body (both / neither of `agentRef` / `flowRef`, dispatcher-input-invalid); or `projectId` isn't a project id (a UUID).",
|
|
4376
|
+
),
|
|
4377
|
+
'404': ErrorResponse(
|
|
4378
|
+
'No eval suite with that id under this tenant; or `projectId` names no project of this tenant (`project-not-found`).',
|
|
3774
4379
|
),
|
|
3775
|
-
'404': ErrorResponse('No eval suite with that id under this tenant.'),
|
|
3776
4380
|
'422': ErrorResponse('No dispatcher registered for the suite kind.'),
|
|
3777
4381
|
},
|
|
3778
4382
|
},
|
|
@@ -4131,6 +4735,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
4131
4735
|
schema: ref('DeploymentRecord'),
|
|
4132
4736
|
},
|
|
4133
4737
|
...CommonMutationErrors,
|
|
4738
|
+
'409': ErrorResponse(
|
|
4739
|
+
"Idempotency-Key was reused with a different body, or resource-state conflict. Or `registry-read-only`: this registry takes no writes (under `kindgi dev`, the pack's files are the source); the message says what to do instead.",
|
|
4740
|
+
),
|
|
4134
4741
|
'400': ErrorResponse(
|
|
4135
4742
|
'Signature invalid, image unverifiable, or deployment-validation-failed with per-primitive `details[]`.',
|
|
4136
4743
|
),
|
|
@@ -4352,7 +4959,7 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
4352
4959
|
operationId: 'audit.authz.list',
|
|
4353
4960
|
summary: 'List authz decision audit events',
|
|
4354
4961
|
description:
|
|
4355
|
-
'Cursor-paginated read of `authz-decision` audit events for the tenant. Filters (all AND-composed): `?actorSubject=` / `?onBehalfOf=` / `?action=` / `?resource=` / `?outcome=` / `?runId=` / `?from=` / `?to=`. Admin@tenant only. Only mounted when `CreateAppInput.auditEvents` is wired.',
|
|
4962
|
+
'Cursor-paginated read of `authz-decision` audit events for the tenant. Filters (all AND-composed): `?actorSubject=` / `?onBehalfOf=` / `?action=` / `?resource=` / `?outcome=` / `?runId=` / `?from=` / `?to=`. Oldest first; `?order=desc` for newest first. Admin@tenant only. Only mounted when `CreateAppInput.auditEvents` is wired.',
|
|
4356
4963
|
tags: ['audit'],
|
|
4357
4964
|
security: 'bearer',
|
|
4358
4965
|
parameters: [
|
|
@@ -4414,6 +5021,14 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
4414
5021
|
description: 'ISO 8601 upper bound (inclusive) on `timestamp`.',
|
|
4415
5022
|
schema: { type: 'string', format: 'date-time' },
|
|
4416
5023
|
},
|
|
5024
|
+
{
|
|
5025
|
+
name: 'order',
|
|
5026
|
+
in: 'query',
|
|
5027
|
+
required: false,
|
|
5028
|
+
description:
|
|
5029
|
+
'`asc` (the default): oldest first. `desc`: newest first. `nextCursor` continues in the same order.',
|
|
5030
|
+
schema: { type: 'string', enum: ['asc', 'desc'] },
|
|
5031
|
+
},
|
|
4417
5032
|
],
|
|
4418
5033
|
responses: {
|
|
4419
5034
|
'200': {
|
|
@@ -4460,7 +5075,7 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
4460
5075
|
},
|
|
4461
5076
|
},
|
|
4462
5077
|
...CommonAuthErrors,
|
|
4463
|
-
'400': ErrorResponse('Malformed cursor, `from`, `to`, or `
|
|
5078
|
+
'400': ErrorResponse('Malformed cursor, `from`, `to`, `outcome`, or `order`.'),
|
|
4464
5079
|
},
|
|
4465
5080
|
},
|
|
4466
5081
|
|
|
@@ -4632,6 +5247,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
4632
5247
|
responses: {
|
|
4633
5248
|
'201': { description: 'Team created.', schema: ref('CreateResourceResult') },
|
|
4634
5249
|
...CommonMutationErrors,
|
|
5250
|
+
'404': ErrorResponse(
|
|
5251
|
+
'org-not-found: `orgId` names no org of the tenant (it never existed, or it was deleted).',
|
|
5252
|
+
),
|
|
4635
5253
|
},
|
|
4636
5254
|
},
|
|
4637
5255
|
{
|
|
@@ -4679,7 +5297,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
4679
5297
|
responses: {
|
|
4680
5298
|
'204': { description: 'Updated. No body.' },
|
|
4681
5299
|
...CommonMutationErrors,
|
|
4682
|
-
'404': ErrorResponse(
|
|
5300
|
+
'404': ErrorResponse(
|
|
5301
|
+
'team-not-found: no team with that id under this tenant; or org-not-found: `orgId` names no org of the tenant (it never existed, or it was deleted).',
|
|
5302
|
+
),
|
|
4683
5303
|
},
|
|
4684
5304
|
},
|
|
4685
5305
|
{
|
|
@@ -4790,6 +5410,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
4790
5410
|
responses: {
|
|
4791
5411
|
'204': { description: 'Removed (or already absent). No body.' },
|
|
4792
5412
|
...CommonAuthErrors,
|
|
5413
|
+
'501': ErrorResponse(
|
|
5414
|
+
"With authorization enforced, a runtime whose tenant-hierarchy binding can't change the membership together with its authorization tuple refuses with `authz-membership-unsupported`; nothing is changed.",
|
|
5415
|
+
),
|
|
4793
5416
|
},
|
|
4794
5417
|
},
|
|
4795
5418
|
{
|
|
@@ -4824,6 +5447,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
4824
5447
|
'404': ErrorResponse(
|
|
4825
5448
|
'No membership for that (team, user) pair, or no such team under this tenant.',
|
|
4826
5449
|
),
|
|
5450
|
+
'501': ErrorResponse(
|
|
5451
|
+
"With authorization enforced, a runtime whose tenant-hierarchy binding can't change the membership together with its authorization tuple refuses with `authz-membership-unsupported`; nothing is changed.",
|
|
5452
|
+
),
|
|
4827
5453
|
},
|
|
4828
5454
|
},
|
|
4829
5455
|
|
|
@@ -4893,6 +5519,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
4893
5519
|
responses: {
|
|
4894
5520
|
'201': { description: 'Project created.', schema: ref('CreateResourceResult') },
|
|
4895
5521
|
...CommonMutationErrors,
|
|
5522
|
+
'404': ErrorResponse(
|
|
5523
|
+
'org-not-found: `orgId` names no org of the tenant (it never existed, or it was deleted).',
|
|
5524
|
+
),
|
|
4896
5525
|
},
|
|
4897
5526
|
},
|
|
4898
5527
|
{
|
|
@@ -4942,7 +5571,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
4942
5571
|
responses: {
|
|
4943
5572
|
'204': { description: 'Updated. No body.' },
|
|
4944
5573
|
...CommonMutationErrors,
|
|
4945
|
-
'404': ErrorResponse(
|
|
5574
|
+
'404': ErrorResponse(
|
|
5575
|
+
'project-not-found: no project with that id under this tenant; or org-not-found: `orgId` names no org of the tenant (it never existed, or it was deleted).',
|
|
5576
|
+
),
|
|
4946
5577
|
},
|
|
4947
5578
|
},
|
|
4948
5579
|
{
|
|
@@ -5056,6 +5687,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
5056
5687
|
responses: {
|
|
5057
5688
|
'204': { description: 'Removed (or already absent). No body.' },
|
|
5058
5689
|
...CommonAuthErrors,
|
|
5690
|
+
'501': ErrorResponse(
|
|
5691
|
+
"With authorization enforced, a runtime whose tenant-hierarchy binding can't change the membership together with its authorization tuple refuses with `authz-membership-unsupported`; nothing is changed.",
|
|
5692
|
+
),
|
|
5059
5693
|
},
|
|
5060
5694
|
},
|
|
5061
5695
|
{
|
|
@@ -5090,6 +5724,9 @@ export const OPERATIONS: readonly OperationSpec[] = [
|
|
|
5090
5724
|
'404': ErrorResponse(
|
|
5091
5725
|
'No membership for that (project, user) pair, or no such project under this tenant.',
|
|
5092
5726
|
),
|
|
5727
|
+
'501': ErrorResponse(
|
|
5728
|
+
"With authorization enforced, a runtime whose tenant-hierarchy binding can't change the membership together with its authorization tuple refuses with `authz-membership-unsupported`; nothing is changed.",
|
|
5729
|
+
),
|
|
5093
5730
|
},
|
|
5094
5731
|
},
|
|
5095
5732
|
|