Skip to content

Update to Chronicle 17.0.4 wire contracts - #61

Merged
einari merged 2 commits into
mainfrom
feat/chronicle-17-wire-migration
Sep 7, 2026
Merged

Update to Chronicle 17.0.4 wire contracts#61
einari merged 2 commits into
mainfrom
feat/chronicle-17-wire-migration

Conversation

@einari

@einari einari commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Changed

  • Updated to @cratis/chronicle.contracts 17.0.4, matching Chronicle's wire-contract migration where every gRPC service moved to ones generated from Arc [Command]/[ReadModel] artifacts. Most RPC methods were renamed and responses now travel inside a CommandResult/QueryResult envelope instead of bare payloads.
  • EventSequence.appendMany (multi-event-source overload) now calls the new AppendManyForEventSources RPC; the wire's own AppendMany became single-event-source only.
  • Event type filters on EventSequences queries (getTailSequenceNumber, getForEventSourceIdAndEventTypes, getFromSequenceNumber) now send a comma-joined list of event type ids instead of full event type objects, matching the C# client.
  • ReadModels.getSnapshotsById now calls the new ReadModelExplorer.allSnapshotsForReadModel service.
  • Webhooks.registerDiscovered/register/remove follow the renamed addWebhooks/removeWebhooks RPCs (the Owner field was dropped from the wire).
  • EventSeeding.seed -> seedEvents; EventTypes.register -> registerEventTypes.
  • AllEventStores/AllNamespaces/AllJobs stopped streaming; each now resolves a single response.

Fixed

  • Appended event content is now sent as a parsed JSON object rather than a serialized string, matching the wire's structured Content field (previously type-checked but would have serialized incorrectly at runtime).

Important

This requires the Chronicle 17.0.4 kernel or later. The public TypeScript API surface is unchanged.

Test plan

  • yarn ci (clean + build) — zero errors
  • yarn test — 275/275 relevant specs pass (one pre-existing, unrelated @cratis/fundamentals peer-range drift failure, not touched by this change)

🤖 Generated with Claude Code

Cratis.Chronicle 17.0.4 replaced every hand-written gRPC service with ones
generated from Arc [Command]/[ReadModel] artifacts: most RPC methods were
renamed, request/response messages reshaped, and responses now travel inside
a CommandResult/QueryResult envelope (validation results, exceptions,
authorization) instead of bare payloads. EventSequences in particular split
into a single-event-source AppendMany and a new AppendManyForEventSources
for the multi-source batch this client already supported.

- Bump @cratis/chronicle.contracts to 17.0.4.
- Add ensureCommandResponse to callResults.ts for commands whose envelope
  carries a Response payload (Append, AppendMany, CompleteStream), alongside
  the existing ensureCommandSuccess/ensureQuerySuccess helpers.
- Follow every RPC rename and reshape: EventTypes.register -> registerEventTypes,
  Webhooks add/remove -> addWebhooks/removeWebhooks (dropped the unused Owner
  field), EventSeeding.seed -> seedEvents, ReadModels.getSnapshotsByKey moved
  to the new ReadModelExplorer.allSnapshotsForReadModel service, AllEventStores/
  AllNamespaces/AllJobs stopped streaming, and EventType filters on
  EventSequences queries collapsed from EventType[] to a comma-joined
  EventTypeIds string (mirrors the C# client's JoinEventTypeIds).
- Reshape Append/AppendMany event content from a serialized JSON string to a
  parsed JSON object, matching the wire's new structured Content field.
- Wire up the new ReadModelExplorer client end to end (ChronicleServices,
  ChronicleConnection).

This is a breaking change for consumers only insofar as it requires the
17.0.4 kernel; the public TypeScript API is unchanged.
@einari einari added the major label Sep 7, 2026
AllNamespaces stopped streaming in the 17.0.4 wire migration (observing was
split out into a separate ObserveNamespaces RPC), so the snippet's stream-and-
take-first pattern no longer compiles against the new client.
@einari
einari merged commit 5a06111 into main Sep 7, 2026
4 checks passed
@woksin
woksin deleted the feat/chronicle-17-wire-migration branch September 9, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant