Skip to content

fix(nuxi): migrate eve client to 0.31 session api - #2377

Merged
benjamincanac merged 4 commits into
mainfrom
fix/eve-0.31-session-api
Aug 10, 2026
Merged

fix(nuxi): migrate eve client to 0.31 session api#2377
benjamincanac merged 4 commits into
mainfrom
fix/eve-0.31-session-api

Conversation

@benjamincanac

@benjamincanac benjamincanac commented Aug 10, 2026

Copy link
Copy Markdown
Member

eve 0.31 replaced continuation-token session APIs with fixed, ID-addressed handles, so the bump and the migration have to land together. Pulling it out of #2366 leaves that PR with only the unrelated check-provenance failure. Same upgrade as HugoRCD/evlog#553.

Clientsend is positional, so agent.send({ message: X }) becomes agent.send(X). initialSession now means attach to this session, so it's only set once a cursor exists; a fresh chat leaves it undefined and lets eve create the session, which createChatSyncHandler already persists. Renaming the old key to sessionId compiles but would attach every new chat to a session that doesn't exist yet (409 session_not_active). Existing chats are unaffected: syncChatToDb only ever persists a cursor when sessionId is set, and the sync route validates it, so no continuation-token-only row exists.

AgentScheduleHandlerArgs is { to, waitUntil, appAuth } and RouteHandlerArgs has no receive, so receive(slack, ...) became to(slack, { channelId }).send(message, { auth }) across lib/workflows.ts, both digest schedules and channels/ops.ts. receiveOnSlack is now sendToSlack, and the workflow template in layers/nuxi/README.md is updated to match. Without this the weekly digest, firehose summary and their ops triggers throw on first fire.

Also drops chatId from UseEveChatOptions, which nothing reads since initialSession stopped using it.

Worth knowing — nothing under layers/*/agent/** is in any tsconfig, and eve build bundles without typechecking (I put args.receive back and it still exited 0 and produced a deployable bundle). So the agent half of this diff has no automated verification, and the schedules only run on cron. Verified against the shipped 0.31.3 type declarations instead.

hooks/rate-limit.ts and hooks/chat-title.ts still read ctx.channel.continuationToken, which still exists in 0.31.3, so they're untouched. If that value stops matching the chat id both hooks early-return and titles quietly stop generating.

pnpm typecheck, pnpm lint, vitest 59/59 and eve build pass. Not exercised against a running eve: worth starting a fresh chat, reloading it, and firing one ops trigger before merging.

@benjamincanac
benjamincanac requested a review from atinux as a code owner August 10, 2026 15:07
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nuxt Ready Ready Preview Aug 10, 2026 4:43pm

Request Review

@socket-security

socket-security Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedeve@​0.31.3991001009880

View full report

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The Eve dependency updates from ^0.29.4 to ^0.31.3. useEveChat removes chatId, sends text and file payloads directly to agent.send, and uses the persisted session cursor for initialization. Scheduled digest and firehose workflows now send Slack messages through the schedule handler's to callback.

Area Changes
Eve chat Updated the public options, send payloads, and session initialization.
Scheduled Slack delivery Replaced receive with to in workflow delivery and documentation.
Dependency Updated the Eve version constraint.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes the Eve dependency upgrade and session API migration, which are the primary changes.
Description check ✅ Passed The description explains the Eve 0.31 client and agent API migration, affected files, verification, and remaining test limitation.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/eve-0.31-session-api

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@benjamincanac
benjamincanac merged commit a53d397 into main Aug 10, 2026
15 checks passed
@benjamincanac
benjamincanac deleted the fix/eve-0.31-session-api branch August 10, 2026 16:44
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.

2 participants