Skip to content

Refine embedded host SDK surfaces#230

Merged
roackb2 merged 1 commit into
mainfrom
codex/sdk-host-friction-slices
Jul 11, 2026
Merged

Refine embedded host SDK surfaces#230
roackb2 merged 1 commit into
mainfrom
codex/sdk-host-friction-slices

Conversation

@roackb2

@roackb2 roackb2 commented Jul 11, 2026

Copy link
Copy Markdown
Owner

What changed

  • add engine.sessions.readExisting(id) for direct persisted-session lookup without materializing the fallback session
  • export HeddleEventType and HeddleEventTypeValue from the curated package entrypoint
  • document both embedded-host APIs in the programmatic conversation-engine guide

Why

Embedded hosts currently need to scan listExisting() to safely reuse a deterministic session ID. Calling read(id) is not equivalent because it materializes Heddle's fallback session in an empty repository.

Hosts translating conversation activity into their own event stream also had to duplicate event-name string literals even though Heddle already owns a canonical vocabulary.

These additions expose the existing domain semantics directly without adding host-side workarounds or a parallel event model.

Impact

  • persisted session lookup is direct and non-materializing
  • host event adapters can compare against the canonical HeddleEventType values
  • existing session and event behavior remains unchanged

Validation

  • yarn lint
  • yarn test — 613 unit tests and 285 integration tests passed
  • yarn build
  • packed and installed the unpublished package into an external embedded host
  • external host typecheck, tests, and production build passed
  • real three-turn direct and HTTP/SSE flows reused one durable session, produced validated artifacts, and exposed zero memory-tool events when using toolProfile.memoryMode: 'none'

@roackb2 roackb2 marked this pull request as ready for review July 11, 2026 03:35
@roackb2 roackb2 merged commit 6075e71 into main Jul 11, 2026
5 checks passed
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