mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-18 03:00:42 +00:00
feat: acp http adapter
This commit is contained in:
parent
2ba630c180
commit
b4c8564cb2
217 changed files with 18785 additions and 17400 deletions
33
docs/session-restoration.mdx
Normal file
33
docs/session-restoration.mdx
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
title: "Session Restoration"
|
||||
description: "How the TypeScript SDK restores sessions after connection/runtime loss."
|
||||
---
|
||||
|
||||
Sandbox Agent automatically restores stale sessions when live session state is no longer available.
|
||||
|
||||
This is driven by the configured `SessionPersistDriver` (`inMemory`, IndexedDB, SQLite, Postgres, or custom).
|
||||
|
||||
## How Auto-Restore Works
|
||||
|
||||
When you call `session.prompt(...)` (or `resumeSession(...)`) and the saved session points to a stale connection, the SDK:
|
||||
|
||||
1. Recreates a fresh session for the same local session id.
|
||||
2. Rebinds the local session to the new runtime session id.
|
||||
3. Replays recent persisted events into the next prompt as context.
|
||||
|
||||
This happens automatically; you do not need to manually rebuild the session.
|
||||
|
||||
## Replay Limits
|
||||
|
||||
Replay payload size is capped by:
|
||||
|
||||
- `replayMaxEvents` (default `50`)
|
||||
- `replayMaxChars` (default `12000`)
|
||||
|
||||
These controls limit prompt growth during restore while preserving recent context.
|
||||
|
||||
## Related Docs
|
||||
|
||||
- [SDK Overview](/sdk-overview)
|
||||
- [Persisting Sessions](/session-persistence)
|
||||
- [Agent Sessions](/agent-sessions)
|
||||
Loading…
Add table
Add a link
Reference in a new issue