feat(core): add Stream Event Protocol v1 types (ADR 0001) - #41
Open
sjr666666 wants to merge 1 commit into
Open
Conversation
This was referenced Sep 11, 2026
sjr666666
force-pushed
the
feat/27-stream-event-protocol
branch
from
September 11, 2026 08:53
721898f to
99650f4
Compare
This was referenced Sep 11, 2026
Introduce the pure-type foundation for the structured streaming event protocol (issue helsome#27): versioned envelope, 12 typed events, and the idempotency/cancel/reconnect contracts as types. Zero runtime change. Adds ADR 0001 documenting context, decision, migration path and open questions for maintainer review.
sjr666666
force-pushed
the
feat/27-stream-event-protocol
branch
from
September 11, 2026 11:49
99650f4 to
e8d4bb4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First step of #27 — the pure-type foundation for the Stream Event Protocol v1:
packages/core/src/stream-events.ts: versioned envelope (protocolVersion,runId,messageId, monotonicsequence,timestamp, typedpayload) plus 12 event types with a per-type payload mapping. Addstext_delta,tool_progress,citation_added,status,cancelled,erroron top of the current 8-eventAgentEvent.@finagent/core.docs/adr/0001-stream-event-protocol.md: context, decision, migration path (types first, then runtime / transport / renderer), and 3 open questions for reviewers.No runtime/behavior change —
AgentEventand all existing consumers are untouched; the new protocol types coexist during migration.Verification
bun test packages/core/src/stream-events.test.ts→ 4 passedtsc --noEmitfor@finagent/core→ exit 0i18nextmodule resolution (pre-existing under local bun 1.4 layout, unrelated to this diff; no files outsidecore/docsare touched)Open questions
See ADR §Open questions: resume data source for v1,
status.phaseenum sufficiency, and keepingmessageIdmerged withrunId. Happy to adjust per review.