-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcycles-spec-index.yaml
More file actions
554 lines (526 loc) · 29.9 KB
/
Copy pathcycles-spec-index.yaml
File metadata and controls
554 lines (526 loc) · 29.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
# ===========================================================================
# Cycles Protocol — Specification Family Index
# ===========================================================================
# This manifest is the single source of truth for the Cycles spec suite.
# It tells implementers which documents are canonical, what each owns,
# how they depend on each other, and how to assemble merged artifacts
# for tooling (SDK generators, validators, linters).
#
# This file is NOT an OpenAPI document. It is a composition manifest.
# Format is intentionally simple YAML — parseable by CI scripts, readable
# by humans, and not requiring an OpenAPI parser.
#
# VERSIONING MODEL:
# - `version` : editorial revision of a document. Bump on any change
# (typo, prose clarification, additive field, etc.).
# - `semantic_base` : frozen wire-contract identity. Documents sharing a
# semantic_base are guaranteed wire-compatible. Bump
# only on breaking changes to the wire contract.
# `semantic_base` is OPTIONAL and only declared on documents whose editorial
# revision has advanced past their frozen wire baseline (for example, an
# additive editorial revision can retain its prior semantic_base).
#
# AUTHORING CONVENTION:
# Specs describe a protocol contract, not a server implementation.
# Implementation-specific version markers (e.g. "v0.1.25.7 servers",
# "Keys created before v0.1.25.6") MUST NOT appear in normative prose.
# Feature provenance (when a clause was added to this spec) belongs in
# the document's CHANGELOG, not inline with the clause. Backward-compat
# text describes behavior ("Servers MAY encounter legacy keys...")
# rather than a server version ("Keys created before v0.1.25.6...").
# See cycles-governance-admin-v0.1.25.yaml's AUTHORING CONVENTION
# section for the authoritative statement.
# ===========================================================================
spec_family:
name: Cycles Protocol
description: >-
Budget authority, action quotas, and runtime governance for autonomous agents.
publication_model: companion-specs
publication_model_rationale: >-
The spec family uses a "companion spec" publication model rather than a
single monolithic OpenAPI file. Each document owns a distinct concern
(runtime enforcement, governance, registry) and can be versioned and
evolved independently. Cross-spec references are descriptive (prose)
rather than mechanical ($ref) to preserve companion-spec portability.
Documents are further stratified by conformance status (see the
`conformance` and `conformance_status` fields on each entry below).
The current conformance target is **v0.1.25**: cycles-protocol-v0.yaml
(normative) and cycles-governance-admin-v0.1.25.yaml (mixed — endpoint
definitions are reference; eight cross-plane operations are normative via
individual x-conformance labels; the Event, EventType, EventData*,
WebhookDelivery, WebhookRetryPolicy, and Permission schemas are normative
by enumeration in CONFORMANCE.md (schemas are not x-conformance-labeled);
PLUS a set of cross-plane normative invariants — the WEBHOOK SUBSCRIPTION
INVARIANTS in info.description — that bind regardless of any operation's
x-conformance label or the provisioning mechanism used). The three
v0.1.26 extension specs
are normative within their own spec contracts but carry
`conformance_status: upcoming` — they are SHOULD-level today and will
be promoted to MUST once the reference stack ships v0.1.26 support.
Every operation also carries an `x-conformance: normative | reference`
OpenAPI extension so tooling can filter by conformance status within
each spec. The authoritative MUST / SHOULD / MAY statement is in
CONFORMANCE.md at the repo root.
The tradeoff: human readers and implementers can read each file in
isolation; SDK generators and validator pipelines need a merged artifact.
The merge_recipes section below defines how to produce those artifacts.
current_versions:
base_runtime: "0.1.25.16" # extendReservation heartbeat guidance + additive optional remaining_ttl_ms on create/extend responses
base_runtime_semantic_base: "0.1.25" # frozen wire baseline — 0.1.25.16 addition is optional-field additive, backward compatible
base_governance: "0.1.25.42" # align non-negative policy priority across create, update, and response schemas
base_governance_semantic_base: "0.1.25.9" # frozen wire baseline
extension_runtime: "0.1.27" # ErrorCodeExtension base-list refresh (+ LIMIT_EXCEEDED, TENANT_CLOSED) against runtime 0.1.25.13
extension_governance: "0.1.28" # retain the base policy priority minimum in the extended PATCH
action_kinds: "0.1.27" # trace_id plus X-Cycles-Trace-Id response headers
evidence_envelope: "0.2.2" # remaining_ttl_ms is volatile transport metadata, excluded from reserve evidence
spec_index: "0.1.45" # evidence 0.2.2 pin + runtime 0.1.25.16 heartbeat guidance
# ---------------------------------------------------------------------------
# CANONICAL DOCUMENTS
# ---------------------------------------------------------------------------
# role values:
# base — stable base spec; changes only on major cycles protocol revisions
# extension — additive companion to a base spec; versioned with extension releases
# companion — standalone spec with integration points; versioned independently
# ---------------------------------------------------------------------------
documents:
- id: runtime_base
file: cycles-protocol-v0.yaml
version: "0.1.25.16" # extendReservation heartbeat guidance + additive optional remaining_ttl_ms on create/extend responses
semantic_base: "0.1.25" # frozen wire baseline — 0.1.25.16 addition is optional-field additive, backward compatible
role: base
conformance: normative
title: Cycles Budget Authority API
plane: runtime-enforcement
owns:
- Reserve / commit / release lifecycle
- Idempotency and concurrency invariants
- Canonical scope derivation
- dry_run shadow mode
- Overdraft / debt model
- /v1/decide, /v1/reservations, /v1/balances, /v1/events
depends_on: []
readers:
- All implementers (required reading)
- SDK authors (primary source for client generation)
- Protocol reviewers
- id: governance_base
file: cycles-governance-admin-v0.1.25.yaml
version: "0.1.25.42" # non-negative policy priority request/response alignment (matches info.version)
semantic_base: "0.1.25.9" # frozen wire baseline
role: base
conformance: mixed
conformance_note: >-
Endpoint definitions are reference (implementers MAY diverge).
Event, EventType, EventData*, WebhookDelivery, WebhookRetryPolicy, and
Permission schemas are normative; a future revision will extract them
into dedicated files. See CONFORMANCE.md and the x-conformance labels
on individual operations (listEvents / getEvent / replayEvents /
listTenantEvents / listWebhookDeliveries / listTenantWebhookDeliveries /
getBalances / introspectAuth are normative; all others are reference).
In addition to those labeled operations and schemas, the
WEBHOOK SUBSCRIPTION INVARIANTS block (info.description) is a set of
cross-plane normative invariants on persisted webhook-subscription
state that bind regardless of any operation's x-conformance label or
the provisioning mechanism used — first-class members of the normative
surface. Reference-implementation status for these is tracked in
CONFORMANCE.md §Reference-implementation status and the changelog, not
here.
title: Complete Budget Governance Admin API
plane: governance-admin
owns:
- Tenant lifecycle and hierarchy
- Budget ledger creation, allocation, and funding
- Policy caps and rate limits
- API key provisioning and permissions
- Webhook subscriptions and event delivery
- /v1/admin/* endpoints
depends_on:
- runtime_base # shares Amount, Subject, Action, Balance schemas
readers:
- Platform/operator teams (required reading)
- Admin tooling authors
- Compliance and audit tooling
- id: action_kinds
file: cycles-action-kinds-v0.1.26.yaml
version: "0.1.27" # trace_id plus X-Cycles-Trace-Id response headers
role: companion
conformance: normative
conformance_status: upcoming
conformance_note: >-
Normative within its own spec contract, but v0.1.26 is not yet the
active conformance target. runcycles' reference servers implement the
full v0.1.25 baseline today; this spec is SHOULD-level until v0.1.26 is
promoted to the active target in a future revision of CONFORMANCE.md.
title: Cycles Action Kind Registry
plane: registry-and-quota-primitives
owns:
- Canonical action kind taxonomy (62 built-in kinds)
- ActionRiskClass, ActionKind, ActionKindRegistry
- ActionPolicyKeys (request-side routing dimensions)
- ActionQuota, ActionQuotaWindow, ActionQuotaState (quota primitives)
- RiskClassQuota (risk-class-level aggregate quota primitive)
- per_minute_tumbling window (burst protection)
- threshold_pct on ActionQuota and RiskClassQuota (quota threshold warnings)
- Registry endpoints: GET /v1/action-kinds, GET /v1/action-kinds/{kind}
- Counter debug endpoint: GET /v1/admin/action-quota-counters
- "Counter reset endpoint: POST /v1/admin/action-quota-counters/reset (incident response; AdminKeyAuth-only in v0.1.26)"
integration_points:
- runtime_base: >-
Quota counters are incremented atomically within reserve.lua.
Subject.dimensions.run_id required for per_run quotas.
- governance_base: >-
ActionQuota is used by Policy.action_quotas (governance extension).
AdminKeyAuth and ApiKeyAuth security schemes for the counter endpoint
come from the governance base; the action_quotas:read permission
(with balances:read fallback for v0.1.26) is defined in the
governance extension.
depends_on: [] # no schema imports from other specs
readers:
- MCP gateway implementers (action kind normalization)
- Policy authors (quota rule design)
- Operator teams (counter debugging)
- SDK authors (action kind validation on the client side)
versioning_note: >-
Version-aligned with the spec suite (v0.1.26) for coherent releases.
Within a release, the action-kinds spec can evolve independently of
the runtime and governance specs. Adding new built-in action kinds or
changing quota schema = minor bump within the suite version.
Breaking registry API changes = major version (cycles-action-kinds-v1.yaml).
- id: runtime_extension
file: cycles-protocol-extensions-v0.1.26.yaml
version: "0.1.27" # ErrorCodeExtension base-list refresh against runtime 0.1.25.13
role: extension
extends: runtime_base
conformance: normative
conformance_status: upcoming
conformance_note: >-
Normative within its own spec contract, but v0.1.26 is not yet the
active conformance target. SHOULD-level today; will become MUST
once v0.1.26 is promoted in CONFORMANCE.md.
title: Cycles Protocol Extensions — Runtime Enforcement Plane
plane: runtime-enforcement
owns:
- DenyDetail (enriched deny context)
- ActionQuotaViolation (quota violation detail in deny responses)
- ObserveModeEnum (DISABLED / OBSERVE / ENFORCE)
- ACTION_QUOTA_EXCEEDED, ACTION_KIND_NOT_ALLOWED, ACTION_KIND_DENIED error codes
- reservation.observed_denied event type and EventDataObservedDenied
- reservation.observed_allowed event type and EventDataObservedAllowed
- quota.threshold_approaching event type and EventDataQuotaThresholdApproaching
- quota.counter_reset event type and EventDataQuotaCounterReset
- reservation.denied carries v0.1.26 reason codes and deny_detail
directly (base schema extended in v0.1.25.8 — no runtime extension needed)
- Full RESERVATION EVALUATION ORDER normative text (access control → risk-class quotas → per-kind quotas → budget)
- Additive fields on Action, DecisionResponse, ReservationCreateRequest,
ReservationCreateResponse, ErrorResponse
- No new runtime paths (all paths owned by runtime_base)
integration_points:
- action_kinds: >-
ActionQuotaViolation references ActionQuotaWindow enum values
(mirrored inline for companion-spec portability).
ActionPolicyKeys is described by reference (not $ref).
depends_on:
- runtime_base # extends its schemas
readers:
- SDK authors (required for v0.1.26 client support)
- Runtime implementers (required for v0.1.26 server support)
- id: governance_extension
file: cycles-governance-extensions-v0.1.26.yaml
version: "0.1.28" # retain the base policy priority minimum in the extended PATCH
role: extension
extends: governance_base
conformance: normative
conformance_status: upcoming
conformance_note: >-
Normative within its own spec contract, but v0.1.26 is not yet the
active conformance target. SHOULD-level today; will become MUST
once v0.1.26 is promoted in CONFORMANCE.md.
title: Cycles Governance Extensions — Admin Plane
plane: governance-admin
owns:
- Policy.action_quotas (per-kind action count quota rules on policies)
- Policy.risk_class_quotas (risk-class-level aggregate quotas on policies)
- Policy.allowed_action_kinds (action kind allowlist — access control)
- Policy.denied_action_kinds (action kind denylist — access control)
- PolicyCreateRequest extensions (same fields)
- PATCH /v1/admin/policies/{policy_id} — extended body
- Tenant.observe_mode (shadow mode default)
- PATCH /v1/admin/tenants/{tenant_id} — extended body
- action_quotas:read permission (enforced in v0.1.26 with balances:read fallback)
integration_points:
- action_kinds: >-
PolicyExtension.action_quotas uses ActionQuota from action_kinds.
Described by reference (not $ref) for companion-spec portability.
- runtime_extension: >-
ObserveModeEnum values mirrored inline in TenantExtension and
TenantPatchExtension. Canonical definition in runtime_extension.
depends_on:
- governance_base # extends its schemas
mechanical_merge_warning: >-
This file re-declares PATCH /v1/admin/tenants/{tenant_id} and
PATCH /v1/admin/policies/{policy_id}. OperationIds are distinct
(updateTenantObserveMode, updatePolicyActionQuotas) so no intra-file
collision, but bundling with governance_base produces duplicate
path+method entries. Use the merge recipe below to produce a
clean single document.
readers:
- Platform/operator teams (required for v0.1.26 admin API support)
- Admin tooling authors
- id: evidence_envelope
file: cycles-evidence-v0.2.yaml
version: "0.2.2" # remaining_ttl_ms is volatile transport metadata, excluded from reserve evidence
role: companion
conformance: normative
conformance_status: active
conformance_note: >-
NORMATIVE (v0.2). Promoted from drafts/cycles-evidence-v0.1.yaml once a
production implementation shipped (the Cycles server emits CyclesEvidence
envelopes and serves the signer JWK Set) and a cross-system consumer (APS)
integrated end-to-end including signer-key authority resolution. Specifies
the CyclesEvidence envelope (JCS-canonicalized, Ed25519-signed,
content-addressed audit artifact) that wraps the bodies the runtime
endpoints return. The runtime base (cycles-protocol-v0.yaml) ships the
consumer-facing surface — the optional `cycles_evidence` ref on
decide/reserve/commit/release/error responses, getEvidence, and
getEvidenceJwks — as additive/optional (MAY). v0.2 makes signer-key
authority resolution (did:cycles / JWKS / rotation) NORMATIVE; it is
additive to the envelope wire shape, whose `schema_version` discriminator
stays `cycles-evidence/v0.1` (v0.1 envelopes remain valid byte-for-byte).
Reserve evidence deliberately omits the transport-only `cycles_evidence`
and `remaining_ttl_ms` fields. Design agreed with APS on
runcycles/cycles-protocol#103 / #112.
title: Cycles Evidence Envelope
plane: cross-system-audit
owns:
- CyclesEvidence envelope (schema_version cycles-evidence/v0.1 — wire discriminator frozen)
- evidence_id content-hash recipe (RFC 8785 JCS + sha256) and Ed25519 signature derivation
- Per-artifact payloads (DecidePayload / ReservePayload / CommitPayload / ReleasePayload / ErrorPayload)
- Response mirrors (non-attestation note for the transport-only cycles_evidence ref)
- Signer-key resolution (NORMATIVE v0.2, additive to the wire shape) — CyclesEvidenceJwks key set, did:cycles signer_did form, window-bound selection + the five verify dispositions (authentic / binding_only / signer_authority_failed / signer_resolution_failed / signature_invalid)
integration_points:
- runtime_base: >-
cycles-protocol-v0.yaml carries the wire surface: CyclesEvidenceRef
(cycles_evidence on the five response types), getEvidence
(GET /v1/evidence/{id}), and getEvidenceJwks
(GET /v1/.well-known/cycles-jwks.json — the v0.2 signer JWK Set, public,
optional to publish). The envelope spec is what those refs resolve to.
depends_on:
- runtime_base # mirrors its request/response schemas
readers:
- Cross-system audit / receipt consumers (notably APS)
- Compliance + long-horizon archival tooling
- Cycles server + event-tier implementers (producer/signer)
# ---------------------------------------------------------------------------
# MERGE RECIPES
# ---------------------------------------------------------------------------
# Defines how to produce merged artifacts from the companion spec suite.
# Merged artifacts are NOT canonical — the companion specs above are canonical.
# Merged artifacts are generated for tooling (codegen, validators, linters).
# They MUST be regenerated when any source spec changes.
# ---------------------------------------------------------------------------
merge_recipes:
- id: protocol_merged
status: pre_built
description: >-
Pre-built merged OpenAPI file for the runtime (protocol) plane.
Suitable for: SDK generation, OpenAPI validator pipelines,
Swagger UI / Redoc hosting, Postman import, runtime server validation.
Contains: runtime_base + runtime_extension + action_kinds (schemas + paths).
Does NOT contain governance plane (admin/tenant/policy/webhook management).
output_file: merged/cycles-openapi-protocol-merged.yaml
sources:
- document: runtime_base
include: all
- document: action_kinds
include: all
- document: runtime_extension
include: all
merge_strategy:
schemas: add to components/schemas (no conflicts)
error_codes: merge ACTION_QUOTA_EXCEEDED, ACTION_KIND_NOT_ALLOWED, ACTION_KIND_DENIED into ErrorCode enum
event_types: merge reservation.observed_denied, reservation.observed_allowed, quota.threshold_approaching, quota.counter_reset into EventType enum
action_field: add policy_keys to Action schema
decision_response: add deny_detail to DecisionResponse
reservation_create_request: add observe_mode to ReservationCreateRequest
reservation_create_response: add deny_detail to ReservationCreateResponse
error_response: add details.deny_detail guidance
resolution_rules:
- ObserveModeEnum is defined once in runtime_extension schemas
- ActionQuotaViolation references ActionQuotaWindow from action_kinds
- ActionRiskClass is defined once in action_kinds schemas
- RiskClassQuota is defined once in action_kinds schemas
- No path conflicts (action_kinds adds 4 new paths; runtime_base owns the rest)
tooling:
build_command: "make merge # or: python scripts/merge_specs.py"
manual: >-
merged/cycles-openapi-protocol-merged.yaml is pre-built and committed
in each release. Regenerate with `make merge` after changing any
source spec.
- id: admin_merged
status: pre_built
description: >-
Pre-built merged OpenAPI file for the admin (governance) plane.
Suitable for: admin tooling codegen, policy editors, operator
dashboards, governance API validators.
Contains: governance_base + governance_extension + action_kinds
+ runtime_extension schemas (for DenyDetail, ObserveModeEnum, event
data payloads, and the extended ErrorCode / EventType enums that
admin event consumers and error handlers need).
Does NOT contain runtime reservation endpoints (reserve/commit/release);
those are in protocol_merged.
output_file: merged/cycles-openapi-admin-merged.yaml
sources:
- document: governance_base
include: all
- document: governance_extension
include: all
merge_strategy:
schemas: >-
Merge PolicyExtension fields into base Policy schema; merge
PolicyCreateRequestExtension into PolicyCreateRequest; merge
TenantExtension.observe_mode into base Tenant. Enables GET/POST
endpoints to reflect v0.1.26 shapes without path redeclaration.
patch_operations: >-
Merge action_quotas, risk_class_quotas, allowed_action_kinds,
denied_action_kinds into the existing updatePolicy PATCH body.
Merge observe_mode into the existing updateTenant PATCH body.
permissions: add action_quotas:read to Permission enum
- document: action_kinds
include: all
- document: runtime_extension
include: schemas_and_enum_extensions_only
merge_strategy:
purpose: >-
Admin tooling needs DenyDetail, ObserveModeEnum, event data
payload schemas (EventDataObservedDenied, EventDataObservedAllowed,
EventDataQuotaThresholdApproaching, EventDataQuotaCounterReset),
and the ErrorCode / EventType enum extensions. The runtime extension
has paths: {} so including it adds schemas only.
error_codes: >-
Merge ACTION_QUOTA_EXCEEDED, ACTION_KIND_NOT_ALLOWED,
ACTION_KIND_DENIED from ErrorCodeExtension into the governance
base ErrorCode enum.
event_types: >-
Merge reservation.observed_denied, reservation.observed_allowed,
quota.threshold_approaching, and quota.counter_reset from
EventTypeExtension into the governance base EventType enum.
denied_event_population: >-
Servers implementing this extension populate the base
EventDataReservationDenied schema (whose reason_code is open
and whose deny_detail and policy_id fields are optional)
directly. Runtime servers implementing this extension MUST
emit the extension's reason codes and populate deny_detail
per the DenyDetail schema defined in runtime_extension.
resolution_rules:
- ErrorResponse is deduplicated (governance_base version is canonical)
- ObserveModeEnum is defined once (runtime_extension version)
- PATCH path conflicts resolved via allOf body merge (handled by merge script)
- Policy schema: governance_base Policy + PolicyExtension fields (no conflict)
- PolicyCreateRequest schema: governance_base + PolicyCreateRequestExtension
- Tenant schema: governance_base Tenant + TenantExtension.observe_mode
- Permission enum: governance_base values + action_quotas:read from extension
- "Enforcement: action_quotas:read required on quota counter endpoint, balances:read accepted as fallback through v0.1.26 only"
tooling:
build_command: "make merge # or: python scripts/merge_specs.py"
manual: >-
merged/cycles-openapi-admin-merged.yaml is pre-built and committed
in each release. Regenerate with `make merge` after changing any
source spec.
# ---------------------------------------------------------------------------
# PUBLICATION MODEL SUMMARY
# ---------------------------------------------------------------------------
publication_model_summary:
canonical_sources:
- cycles-protocol-v0.yaml # runtime base — never changes for v0.x
- cycles-governance-admin-v0.1.25.yaml # governance base
- cycles-action-kinds-v0.1.26.yaml # registry + quota primitives
- cycles-protocol-extensions-v0.1.26.yaml # runtime extension
- cycles-governance-extensions-v0.1.26.yaml # governance extension
- cycles-evidence-v0.2.yaml # evidence envelope companion
pre_built_artifacts:
# These files ARE pre-built and committed in each v0.1.26 release:
- merged/cycles-openapi-protocol-merged.yaml # runtime (protocol) plane — SDK codegen, runtime server validation
- merged/cycles-openapi-admin-merged.yaml # admin (governance) plane — admin tooling, dashboards
source_of_truth: companion-specs # generated artifacts are derived, not canonical
update_policy: >-
When any companion spec changes:
1. Update the companion spec (increment its version).
2. Update this index if structural changes (document entries, merge recipes).
3. Regenerate pre-built merged artifacts: `make merge` or
`python scripts/merge_specs.py`.
4. Commit the regenerated merged/*.yaml files alongside the source change.
The base specs (runtime_base, governance_base) change rarely (patch bumps
only). Extension specs and action_kinds evolve with feature releases.
sdk_generation_guidance: >-
For runtime / client SDK generation (Python, TypeScript, Go, etc.):
Use merged/cycles-openapi-protocol-merged.yaml.
Contains the complete runtime API surface: reserve/commit/release/decide/
balance endpoints, all runtime extension schemas (DenyDetail,
ObserveModeEnum, EventDataObservedDenied/Allowed, etc.), action kind
registry endpoints, quota counter endpoint + reset, and both
ApiKeyAuth and AdminKeyAuth security schemes. No post-processing needed.
For admin tooling generation (policy editors, dashboards, CLIs):
Use merged/cycles-openapi-admin-merged.yaml.
Contains the complete governance surface: tenant/budget/policy/api-key/
webhook management, v0.1.26 policy and tenant extensions, action kind
registry, quota counter observability, and the runtime extension
schemas admins need for event consumers and error handlers.
validator_guidance: >-
For request/response validation in production:
- Runtime servers: validate against merged/cycles-openapi-protocol-merged.yaml
- Admin/governance servers: validate against merged/cycles-openapi-admin-merged.yaml
Both files are pre-built and committed in each release. Regenerate via
`make merge` if you modify source specs locally.
human_reading_order:
implementer_building_runtime_server:
- cycles-protocol-v0.yaml (foundation)
- cycles-protocol-extensions-v0.1.26.yaml (runtime additions)
- cycles-action-kinds-v0.1.26.yaml (quota primitives and registry)
implementer_building_admin_tooling:
- cycles-governance-admin-v0.1.25.yaml (foundation)
- cycles-governance-extensions-v0.1.26.yaml (governance additions)
- cycles-action-kinds-v0.1.26.yaml (quota rules used in policies)
sdk_author_runtime:
- merged/cycles-openapi-protocol-merged.yaml (start here)
sdk_author_admin:
- merged/cycles-openapi-admin-merged.yaml (start here)
policy_operator:
- cycles-action-kinds-v0.1.26.yaml (action kind taxonomy and quota rules)
- cycles-governance-extensions-v0.1.26.yaml (how to attach quotas to policies)
# ---------------------------------------------------------------------------
# IMPLEMENTATION RESOURCES (non-normative)
# ---------------------------------------------------------------------------
implementation_resources:
description: >-
Non-normative implementation aids. The OpenAPI specs above are authoritative.
These resources help implementers build correct servers faster.
files:
- file: impl/reserve-lua-pseudocode.md
description: >-
Pseudocode for the 5-step reservation evaluation path (access control,
risk-class quotas, per-kind quotas, budget checks, atomic commit).
Covers counter increment/decrement lifecycle and threshold detection.
- file: impl/test-vectors.yaml
description: >-
12 reference request/response pairs covering: happy path ALLOW,
ACTION_KIND_DENIED, ACTION_KIND_NOT_ALLOWED, risk-class quota deny,
per-kind quota deny, budget exceeded, observe mode deny/allow,
threshold crossing, per-request observe override, burst protection,
and agent spawn quota (multi-agent safety).
# ---------------------------------------------------------------------------
# REGISTRY GOVERNANCE (future work)
# ---------------------------------------------------------------------------
registry_governance:
status: specified
location: cycles-action-kinds-v0.1.26.yaml info.description
covers:
- Deprecation process (minimum two-version notice, replacement_kind required)
- Provider aliasing policy (capability-scoped kinds + host routing)
- Process for adding new built-in kinds (criteria, review, versioning)
- custom.* namespace rules (naming, risk_class, prefix non-overlap)
- Risk class reclassification (breaking change, transition period)
owner: action-kinds spec maintainers
note: >-
The action kinds registry is version-aligned with the spec suite
(currently v0.1.26) and can evolve within a release without touching
the protocol or governance specs.