feat(spec): wish command endpoints and the GET /api/v1/events stream (#15) #16
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/wish-commands-events-spec"
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?
Scope
This is the first part of #15. It documents the three endpoints ritual-server now serves for toilville-design#177:
GET /api/v1/wishes/{wish_id}/commands(ritual-engine#847)POST /api/v1/wishes/{wish_id}/commands, with the same command on Kafka asforge.cmd.wish(ritual-engine#847)GET /api/v1/events, a resumable SSE stream of wish and parlay facts (ritual-engine#856, merged)It adds eight component schemas and a
streamingtag, and bumpsopenapi.yamlto 0.62.0.Where it differs from #15 as written, deliberately. The spec follows the server:
available_commands[]field onGET /wishes/{id}.applied/noop/duplicate, 409 withreasonforrejected. It does not return202 {command_id}, because a command form needs the outcome in the response. Producers that can't wait useforge.cmd.wish.command_id, the same id the command's fact carries on the stream.commandis a string, not an enum.core.wish_commandsis the catalog, and the list endpoint serves it.Left for later parts of #15: parlay commands, views and lenses (the lens dials are still open in toilville-design#189), intent forms, the
code/diff/progressblocks, andsemantic_intent/importance. The server serves none of these yet. #15 stays open.Testing
pytest: 18 passed, 1 xfailed.tools/check_schema_registry.pypasses.spectral lintwithspectral:oasreports the same 58 problems before and after (1 error, pre-existing, inJsonValue). The additions introduce no new findings.ritual-core/src/forge_handlers/wish_command.rsritual-server/src/wish_commands.rsritual-server/src/events_gateway.rscore.wish_commands(13 commands).breaking_change_detector.pywas not run. It compares database migrations, needs a database connection, and this change touches none.Impact Statement
forge.cmd.wishcommand asx-kafka-command.schemas/*.json.LineageFact.payloadis untyped. Per-topic payload schemas stay incore.kafka_topics.message_schema, and generating components from that registry is still to do (a #15 acceptance criterion).Docs
CHANGELOG.mdhas the additions, the deliberate differences from #15, and what's not included.