docs/plans/2026-08-27-standalone-pr4-typescript-sdk.md
Build the TypeScript SDK surface for the standalone_sessions_v1 daemon API introduced by PR #10179. This stage changes only packages/sdk-typescript plus this implementation plan. WebUI, WebShell, daemon routes, and standalone lifecycle semantics remain out of scope.
The implementation is stacked on PR #10179 at fbd3bf32bd207424e39bb7063728807f873d1668. Before publication against main, rebase onto the merged PR3 result and re-audit the final route contract.
DaemonClient methods for create, list, exact lookup, load, resume, repair, rename, export, archive, unarchive, and delete.standalone_creation_outcome_unknown response, malformed successful response, or transport-level unknown outcome, perform one exact lookup and throw an error containing the generated UUID and the observed recovery state.DaemonSessionClient standalone create/load/resume factories and store an explicit restore strategy. Reattach workspace sessions by cwd and standalone sessions through the dedicated route.standalone_sessions_v1; an old daemon fails before any standalone route is called.workspaceCwd, source, scope, branch, or worktree overrides.202 creating, 200 existing, and 404 standalone_session_not_found contract.DaemonHttpError. Only an unknown create outcome is wrapped with recovery context.globalThis.crypto.randomUUID() and introduces no Node-only import.202/200/404 lookup recovery.DaemonSessionClient tests for standalone create/load/resume and standalone versus workspace reattach.DaemonClient and session-bound recovery in DaemonSessionClient; do not add another standalone client object.