Skip to content

Add custom event remote session proto#1610

Merged
toubatbrian merged 1 commit into
brian/bump-protocol-1.46.3from
brian/custom-ev-proto
May 26, 2026
Merged

Add custom event remote session proto#1610
toubatbrian merged 1 commit into
brian/bump-protocol-1.46.3from
brian/custom-ev-proto

Conversation

@toubatbrian
Copy link
Copy Markdown
Contributor

No description provided.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 26, 2026

⚠️ No Changeset found

Latest commit: e58f245

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

Copy link
Copy Markdown

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

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: e58f245a86

ℹ️ 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 on lines +84 to +85
function dictToStruct(data: Record<string, unknown>): Struct {
return Struct.fromJson(data);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Validate custom-event payload before Struct conversion

dictToStruct() passes Record<string, unknown> directly into Struct.fromJson(), but this API only accepts JSON-compatible values. Because the new public payload type permits non-JSON data (for example { foo: undefined }, Date, bigint, or functions), emitting a custom event can throw synchronously in onCustomEvent, which can break event forwarding for the session at runtime. Tightening the type to a JSON object (or sanitizing/rejecting unsupported values before conversion) avoids this runtime failure mode.

Useful? React with 👍 / 👎.

@toubatbrian toubatbrian changed the base branch from main to brian/bump-protocol-1.46.3 May 26, 2026 22:05
@toubatbrian toubatbrian merged commit 7812356 into brian/bump-protocol-1.46.3 May 26, 2026
6 of 9 checks passed
@toubatbrian toubatbrian deleted the brian/custom-ev-proto branch May 26, 2026 22:05
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