[PR #536] feat(acp): support persistent checkpointer/sessions and relax visibility #548

Open
opened 2026-06-05 17:23:38 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagentsjs/pull/536
Author: @wanxger
Created: 5/13/2026
Status: 🔄 Open

Base: mainHead: feat/acp-server-persistent-sessions


📝 Commits (2)

  • bd637a8 feat(acp): support persistent checkpointer/sessions and relax visibility
  • 9b60d3b chore: lint

📊 Changes

2 files changed (+58 additions, -12 deletions)

View changed files

📝 libs/acp/src/server.ts (+28 -12)
📝 libs/acp/src/types.ts (+30 -0)

📄 Description

Summary

Add persistent session/checkpointer support to the ACP server and relax visibility for extensibility.

Changes

feat: persistent checkpointer and sessions (types.ts, server.ts)

  • Added optional checkpointer option — allows passing a custom BaseCheckpointSaver (e.g. SqliteSaver) to persist conversation history across server restarts. Defaults to MemorySaver.
  • Added optional sessions option — allows passing a custom Map<string, SessionState> for persisting session metadata. Defaults to in-memory Map.
  • handleLoadSession() now re-creates the agent on demand when recovering a session after server restart.

fix: guard sessions.clear() against persistent sessions (server.ts)

  • stop() no longer calls sessions.clear() when a custom sessions map was provided, preventing accidental data loss.

refactor: relax visibility from private to protected (server.ts)

  • Fields: agents, agentConfigs, sessions, checkpointer, acpBackends
  • Methods: createAgentHandler(), handleLoadSession(), createAgent(), log()
    These changes enable subclassing DeepAgentsServer to customize behavior.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/deepagentsjs/pull/536 **Author:** [@wanxger](https://github.com/wanxger) **Created:** 5/13/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/acp-server-persistent-sessions` --- ### 📝 Commits (2) - [`bd637a8`](https://github.com/langchain-ai/deepagentsjs/commit/bd637a87fe26b43cd965f2c14af7ca9b99466de2) feat(acp): support persistent checkpointer/sessions and relax visibility - [`9b60d3b`](https://github.com/langchain-ai/deepagentsjs/commit/9b60d3bbca364de8b7f2332f0ba9c0cb3988db7c) chore: lint ### 📊 Changes **2 files changed** (+58 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `libs/acp/src/server.ts` (+28 -12) 📝 `libs/acp/src/types.ts` (+30 -0) </details> ### 📄 Description ## Summary Add persistent session/checkpointer support to the ACP server and relax visibility for extensibility. ## Changes ### feat: persistent checkpointer and sessions (`types.ts`, `server.ts`) - Added optional `checkpointer` option — allows passing a custom `BaseCheckpointSaver` (e.g. `SqliteSaver`) to persist conversation history across server restarts. Defaults to `MemorySaver`. - Added optional `sessions` option — allows passing a custom `Map<string, SessionState>` for persisting session metadata. Defaults to in-memory `Map`. - `handleLoadSession()` now re-creates the agent on demand when recovering a session after server restart. ### fix: guard `sessions.clear()` against persistent sessions (`server.ts`) - `stop()` no longer calls `sessions.clear()` when a custom sessions map was provided, preventing accidental data loss. ### refactor: relax visibility from `private` to `protected` (`server.ts`) - Fields: `agents`, `agentConfigs`, `sessions`, `checkpointer`, `acpBackends` - Methods: `createAgentHandler()`, `handleLoadSession()`, `createAgent()`, `log()` These changes enable subclassing `DeepAgentsServer` to customize behavior. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 17:23:38 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagentsjs#548