Skip to content

sdk: list kept sessions, typed, here or in every workspace (refs #21) - #48

Merged
blockmandev merged 1 commit into
mainfrom
feat/sdk-sessions
Oct 22, 2026
Merged

blockmandev merged 1 commit into
mainfrom
feat/sdk-sessions

Conversation

@blockmandev

Copy link
Copy Markdown
Member

#21: a fuller session/list helper.

The SDKs wrapped session/list only as raw objects for the session's own workspace, though incode answers for every workspace an ACP session was recorded in when no cwd is given (src/acp_agent/mod.rs, list_sessions).

  • Python Session.sessions(all_workspaces=False) and TypeScript session.sessions({ allWorkspaces }) return SessionInfo: session id, cwd, title, updated_at/updatedAt, and the raw object.
    • They're sorted newest first.
    • Each id can be passed to load / loadSessionId.
    • list_sessions / listSessions are unchanged.
  • The shared fake advertised session/list but didn't answer it. It now does, as incode does: by cwd, or every session it opened.

Tests

One per SDK. Each checks:

  • this workspace's sessions, newest first;
  • the title and updatedAt;
  • every workspace's sessions;
  • that the raw form is unchanged.

The ordering assertion fails without the sort, because the fake lists kept-session first; the all-workspaces assertion fails if cwd is always sent.

Local results: Python 44 OK (1 skipped); TypeScript 45/46 pass, 0 fail.

session/list was wrapped only as raw objects for the session's own
workspace, though incode answers for every workspace when no cwd is
given. Session.sessions() / sessions() return SessionInfo (session id,
cwd, title, updated at), newest first, with all_workspaces / allWorkspaces
for the whole list; list_sessions / listSessions stay as they were. The
fake now answers session/list as src/acp_agent does.
@blockmandev
blockmandev merged commit 9fb0cbd into main Oct 22, 2026
9 checks passed
@blockmandev
blockmandev deleted the feat/sdk-sessions branch November 15, 2026 20:29
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