Repository navigation
Release v5.15.0
Cratis Stage can now call extension backends written in any language. A Screenplay system ability is performed by a backend that Stage talks to over a two-way gRPC protocol, and the backend asks Stage for its settings, secrets, triggers, answers and telemetry. SDKs for C#, Kotlin, Go and TypeScript implement the backend side, and one conformance suite holds them to the same behavior.
Added
- The extension protocol,
cratis.stage.extensions.v1, as versioned.protofiles underSource/Extensions/Protocol, linted withbuf. Stage callsDescribe(a handshake that checks the running backend against the contract of its system),Invoke,HandleHttpandHealth; the backend callsGetSetting,GetSecret,RaiseTrigger,Answer,LogandRecordMetrics. Every request carries the tenant, invocation identity, idempotency key, attempt, deadline and trace context. - Durable ability invocations now reach a backend: set
Stage:Extensions:HostPortand list each system's backend underStage:Extensions:Backends. Without it nothing listens and abilities answer "not sent" as before. A backend that cannot be reached, fails the handshake or does not honor its contract is "not sent" and safe to retry; an error after the call was sent is "may have reached the system". - Host services on a separate gRPC port, scoped to one system by a session credential delivered only in the handshake. Secrets reach an extension only through
GetSecret, never through its environment or a file. Raising a trigger needs a deduplication key and reports when nothing reacts to it. Logs and metrics are tied to the invocation's causation. - Inbound HTTP at
/extensions/<System>/<path>, routed to the backend that declared the route. Cookies and authorization headers are not forwarded. - SDKs with their own tests, build and a minimal example:
Cratis.Stage.Extensions(C#,net10.0andnet11.0),io.cratis.stage:stage-extensions(Kotlin), a Go module and@cratis/stage-extensions(TypeScript). Each passes the shared conformance suite inSource/Extensions/Conformanceover the wire. - Documentation: the protocol reference, host services reference, connecting a backend, the conformance suite and a getting-started page for each SDK, linked with the Screenplay, Choreography and Scene documentation. The protocol and SDKs live in Cratis/Stage, and version one leaves out a key-value state store and an outbound credential proxy; the overview explains why. (#1065)
Changed
- A backend answers the invocations of its own system without the persona or policy meant for people who answer. The ability call now carries the timeout, the tenant and the origin of the invocation.