Skip to content

feat(cli): add event stream over the public event stream - #13

Merged
purpshell merged 5 commits into
devfrom
codex/event-stream
Sep 23, 2026
Merged

purpshell merged 5 commits into
devfrom
codex/event-stream

Conversation

@purpshell

@purpshell purpshell commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds polymorfa event stream for a project's public developer event stream through the published SDK's events.stream() method.

polymorfa event stream --owner project --project <id> --type 'message.*' --json

The command supports repeatable type filters, a resume cursor, maximum event count, and continue/stop behavior for retention gaps. JSON output emits one event or gap per line; human output includes a resume hint and reconnect notices.

Output follows stdout backpressure before consuming another SDK event. Closed pipes stop cleanly. SIGINT/SIGTERM abort a drain wait, clean up the iterator and listeners, and exit 0 even when an unread pipe keeps a write queued. In that interrupted case, buffered output may be discarded; the README states this behavior.

The exact published dependency is @polymorfa/sdk@0.1.0-dev.20260922102711; the previous Git pin and unmerged-SDK prerequisite are gone. polymorfa listen continues to use its existing forwarding/checkpoint protocol.

Six-part assessment

Part Status Evidence
API Unaffected implementation Consumes the public event-stream API introduced by polymorfa/polymorfa#200. Project ownership, scope, release eligibility, and revocation remain server authority.
SDKs Unaffected implementation; dependency verified Published npm artifact supplies events.stream(), filters, gap handling, cancellation, and reconnect behavior. No SDK source or dependency change in this follow-through.
CLI Updated New command, flags, human/JSON output, exit mapping, backpressure, and signal/pipe handling.
Docs Updated README, command help, and examples describe event streaming and interrupted output. Public API guide already documents release eligibility. Public CLI release claims and changelog wait for package availability.
Feature releases Existing authority preserved API developer.event-stream eligibility and project authorization remain authoritative. Denials produce authorization exit 3; missing project context exits 8, stop-on-gap exits 9. No new flag or enrollment.
Admin Unaffected No staff action, operational capability, durable state, or worker changes.

Verification

  • Existing command tests cover JSON filters/resume, human output, maximum events, gap behavior, project requirement, authorization denial, stdout backpressure, and closed pipes.
  • Two real child-process regressions leave stdout unread, wait for actual backpressure, send SIGINT or SIGTERM, and require clean termination within five seconds. Both passed on Node 22 and Node 24.
  • Build, typecheck, scoped lint, and diff checks passed.

No deployed event stream or released CLI installation was exercised. Exact-head hosted CI must pass before merge; package publication and live acceptance remain separate.

@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 75 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: fa03403f-e04a-44f0-bed1-f28c393b16a2

📥 Commits

Reviewing files that changed from the base of the PR and between 0895876 and 4ec9eb9.

📒 Files selected for processing (5)
  • README.md
  • src/commands/event/stream.ts
  • test/commands/event-stream-process.test.ts
  • test/commands/event-stream.test.ts
  • test/fixtures/event-stream-blocked-output.ts

Comment @coderabbitai help to get the list of available commands.

@purpshell

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-22T12:09:42.833324Z 95d5025 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6070e0669f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/commands/event/stream.ts Resolved
@purpshell

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 95acc22d14

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/commands/event/stream.ts Resolved
@purpshell

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e35b8f2fc4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/commands/event/stream.ts Resolved
@purpshell

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 95d5025d62

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/commands/event/stream.ts Resolved
@purpshell
purpshell marked this pull request as ready for review September 23, 2026 09:27
@purpshell
purpshell merged commit fa7fdef into dev Sep 23, 2026
3 checks passed
@purpshell
purpshell deleted the codex/event-stream branch October 26, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant