Skip to content

Add session memory, automations and desktop recording SDK APIs - #24

Open
ryw wants to merge 7 commits into
mainfrom
codex/session-file-automations
Open

ryw wants to merge 7 commits into
mainfrom
codex/session-file-automations

Conversation

@ryw

@ryw ryw commented Sep 14, 2026

Copy link
Copy Markdown
Member

Add generated Session APIs for opt-in file memory, file-backed automations, computer lifecycle and desktop recordings, resumable SSE, and retry-safe message IDs. Existing Agent APIs retain their behavior.

The session OpenAPI is exported from actual Hono routes. A deterministic additive generator updates SDK resources, merged OpenAPI, Scalar configuration and operation manifest. Recording controls are available through sessions.computer.recordings.list/start/stop; Start accepts a stable UUID and Stop finalizes the VM capture before its learning turn is queued.

Version 0.3.2-session.2 is a local prerelease used by Tembo Bot 0.1.9; this PR does not publish it. Validation: build/typecheck, ESM/CJS consumers and all 17 tests, including authenticated/escaped recording paths and real HTTP SSE. Deploy the backend/manager/scheduler/worker/guest changes before enabling recording readiness.

Backend: https://github.com/tembo/monorepo/pull/11340


Note

Medium Risk
Large additive session/computer/automation/recording API with optimistic concurrency (409) and idempotent message/recording IDs; clients must gate on backend readiness flags and deploy platform dependencies before enabling recording/teaching.

Overview
Adds session extension surface to the SDK and merged OpenAPI: session computer lifecycle (retrieve / start / reconnect), file-backed automations (list/create/update/delete/run with revision + requestId semantics), resumable SSE via sessions.streamEvents (raw Promise<Response>), and desktop recordings (sessions.computer.recordings list/start/stop with a stable client UUID on start).

Existing session/message contracts gain memoryEnabled (opt-in file memory, default off), mcpServers on session payloads, optional client id on messages.create for retry-safe submission, isQueued on listed messages, and richer session event metadata (routine/occurrence/status). README, SESSION_EXTENSIONS.md, and api.md document usage, regeneration (generate:sessions), and deployment readiness flags for session files vs. teaching/recording.

Agent APIs are documented as unchanged; this is primarily generated types, extension resources, and OpenAPI merge from backend-exported routes.

Reviewed by Cursor Bugbot for commit e3963f3. Bugbot is set up for automated code reviews on this repo. Configure here.

@ryw
ryw requested a review from cooper-gadd as a code owner September 14, 2026 23:20

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The verify check is failing because Biome would reformat this generator and a few generated/test files. Running npx --yes @biomejs/biome@2.5.7 format . and committing the output should clear CI.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/resources/sessions/sessions.ts
@ryw ryw changed the title Add session memory and file-backed automation SDK APIs Add session memory, automations and desktop recording SDK APIs Sep 15, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 730b623. Configure here.

messageId: string | null;
}>;
};
export type SessionRecordingInput = { id: string };

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recording types omitted from public exports

Low Severity

SessionRecording, SessionRecordingList, and SessionRecordingInput are generated as public types but are not re-exported from the package entry, unlike SessionAutomation* and SessionComputer. Consumers cannot import these contracts from @tembo-io/sdk and must rely on inference or a deep path.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 730b623. Configure here.

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