fix: update Rivet doc examples and peer dep#230
Open
NathanFlurry wants to merge 2 commits intomainfrom
Open
Conversation
- Fix security.mdx: move SDK/session setup from per-action to createVars to prevent resource leaks (new SDK + session was created on every submitPrompt call without cleanup) - Add onSleep cleanup hook matching multiplayer.mdx pattern - Update persist-rivet peer dependency from >=0.5.0 to >=2.0.0 (rivetkit is at 2.0.42) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
🚅 Deployed to the sandbox-agent-pr-230 environment in sandbox-agent
|
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
docs/security.mdx: ThesubmitPromptaction was creating a newSandboxAgent.connect()+createSession()on every call without cleanup, leaking SDK connections and event subscriptions. Moved SDK/session setup tocreateVarsand addedonSleepcleanup, matching the pattern used inmultiplayer.mdxandsession-persistence.mdx.sdks/persist-rivet/package.jsonhadrivetkit >=0.5.0but the lockfile showsrivetkit@2.0.42. Updated to>=2.0.0.Review notes
Also reviewed against current rivet.dev/docs:
c.broadcast()without expliciteventsdeclaration is valid (confirmed by RivetKit reference)createVars,onSleep,setup,createClient) all match current APITest plan
@sandbox-agent/persist-rivetstill installs with rivetkit 2.x🤖 Generated with Claude Code