Events → commands → views contract: available_commands, command submit, view/lens registry, events stream #15
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
You do not have permission to read 1 dependency
Reference
Toilville/rituals-api-spec#15
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Engineering half of Toilville/toilville-design#177. Revised 2026-10-04: reframed around events → commands → views. Run streaming is dropped from this issue because it's already covered by the ratified
StreamEvent/FrameTurncontract (PR #6).Additions to
openapi.yamlCommands
GET /wishes/{id}returnsavailable_commands[], each{command, label, input_schema, sealed_confirm?}POST /wishes/{id}/commandswith{command, inputs, idempotency_key}returns202 {command_id}. The resulting fact arrives on the event stream, and a rejection arrives aswish.command_rejected.Events:
GET /api/v1/events(an SSE lifecycle stream with resume and per-actor filtering; see the gateway issue). Event payload schemas come from the exported Kafkamessage_schemaregistry, not hand-written YAML.Views:
GET /views?type=<event_or_entity_type>&variant=<row|card|detail|timeline|command_form>&surface=&actor=returns the resolved block spec (actor lens, then surface, thenany) plusprovenanceandsealed_block_ids.PUT /views/...saves a lens (user provenance, validated).Forms:
GET /intents/{name}/form(slot form) andPOST /interactions/{id}/submit, generalising/wishes/active/hydrate.Add
wishandparlayto theentity_typeenum on/{entity_type}/{entity_id}/blocks.Block vocabulary (decided in Toilville/toilville-design#177, 2026-10-05)
code,diffandprogressvariants to theForgeBlockunion inopenapi.yamlandschemas/forge_block.json. This is additive, so it's a minor version bump. Field shapes come from the design issues: Toilville/toilville-design#186 (code), #187 (diff) and #185 (progress, from the run views).confirmvariant. A confirmation is a composition of existing blocks. For a renderer to see "a confirmation" and not just a section, a toggle and actions, the wire format has to carry meaning.forge_block.jsonhas nosemantic_intentorimportancetoday, so add both as optional fields on every block. Their enums mirror UDG's:CEREMONY,ACTION_PRIMARY,STATUS_INDICATOR,MEDIA_HEROand so on, andcritical | high | normal | low.available_commands[].sealed_confirmis served as that composition withsemantic_intent: CEREMONYandimportance: critical.Lenses carry Personality, not raw tokens. A lens saved through
PUT /views/...holds block arrangement plus values for the named Personality dials: accent (a validated palette id, never a free hue), density, corner softness, motion energy and atmosphere. Hero is not a dial. Each mode is a designed preset of the same dials, so resolution runs house style, then mode preset, then actor lens. Clamp values for each dial are still open in Toilville/toilville-design#189.Acceptance criteria
surfaceenum that includescli.code,diffandprogressare in theForgeBlockunion. There is noconfirmvariant.semantic_intentandimportance, and asealed_confirmis served as a CEREMONY/critical composition.Interaction contract: served forms, generic submit, confirm/transition/progress specs, streaming invoke + cancelto Events → commands → views contract: available_commands, command submit, view/lens registry, events streamReconciled against
main(0.67.0): closingEverything this issue asked for has landed, across five merges. Item by item:
available_commands[]andPOST …/commands→ 202GET/POST /api/v1/wishes/{wish_id}/commands, #16 (0.62.0). Each command gained aformin #19 (0.65.0).GET/POST /api/v1/parlays/{parlay_id}/commands(0.64.0), plusGET /api/v1/parlaysin #20 (0.66.0)GET /api/v1/eventsSSE stream with resume and per-actor filteringLineageFact,EventsReady,EventsResyncany, withprovenanceandsealed_block_idsGET /api/v1/views→ResolvedView, #19 (0.65.0)PUT /views/...to save a lensGET/PUT/DELETE /api/v1/lens, #19. One lens per person, not one per view path.GET /intents/{name}/formformonPatternSchema, #21 (0.67.0)POST /interactions/{id}/submitPOST /api/v1/intents/{name}/runfor intents (#21) and…/commandsfor wishes and parlayswish/parlayin theentity_typeenum on/{entity_type}/{entity_id}/blocksritual-core/src/blocks.rsfetch_entity_datahas nowishorparlayarm, and this repo documents only what the server serves. Moved to Toilville/ritual-engine#917.code,diff,progress; noconfirm;semantic_intentandimportanceforge_block.json1.2 andopenapi.yaml0.63.0schemas/lens.json1.0The acceptance criteria are all met.
surfaceincludescli(openapi L1210, L3401); event schemas are referenced, not duplicated; there's noconfirmvariant; both resets work by omitting a member.Two differences from the issue as written are intentional. Both are recorded in CHANGELOG under "Differs from #15 as written":
semantics: {intent, importance, variant}object rather than flat fields, because the Flutter and macOS clients already parse it that way.Housekeeping:
feat/spec-blocks-views-forms(6db049c, the first draft of/viewsand/lens) was superseded by #19 and is deleted.The client half continues in Toilville/toilville_rituals#496.