Skip to content

fix(routes): make RouteInput/RouteResult contract-aware for event routes - #198

Merged
ScriptedAlchemy merged 1 commit into
mainfrom
fix/pr170-typegen
Sep 1, 2026
Merged

fix(routes): make RouteInput/RouteResult contract-aware for event routes#198
ScriptedAlchemy merged 1 commit into
mainfrom
fix/pr170-typegen

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • Fixes the P1 Codex finding on feat(events): define v1 semantic route descriptors #170: generated RouteInput/RouteResult indexed AgentBundleRoutes[Id]['input']/['result'], which is wrong for event routes emitted as EventRouteContract (no input/result members).
  • The generated declarations now route through conditional ContractInput/ContractResult helpers: schema routes keep their schema-derived types; event routes infer the component's props and awaited return type.

Test plan

  • Typegen fixture test extended with an event route asserting the emitted declaration text
  • New type-level test compiles generated routes.d.ts with the TypeScript API and asserts exact Equal<> resolution of RouteInput/RouteResult for both a schema route and an event route (26/26 pass)
  • pnpm typecheck, pnpm lint clean

@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f64a972

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
agent-bundle Patch

Not sure what this means? Click here to learn what changesets are.

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 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-01T20:52:48.051836Z f64a972 PR opened
ℹ️ 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.

@pkg-pr-new

pkg-pr-new Bot commented Sep 1, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle@198
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/create-agent-bundle@198
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/runtime@198

commit: f64a972

@ScriptedAlchemy
ScriptedAlchemy merged commit d992838 into main Sep 1, 2026
10 checks passed
@ScriptedAlchemy
ScriptedAlchemy deleted the fix/pr170-typegen branch September 1, 2026 21:10
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