@xemahq/agent-session-runtime
v0.12.10
Published
Runtime for composing and running Xema agent sessions — workspace manifests, skill bundles, environment resolution, and drift detection.
Readme
@xemahq/agent-session-runtime
Runtime-agnostic agent session substrate and image composer
Overview
The runtime-agnostic interfaces and workspace-image composer that turn a
compiled workspace manifest plus bind context into a typed mount plan. It does
not know which agent runtime executes the session — that is a concrete driver
package. Provided here: the session-driver and image-applier/composer
interfaces, a default mount-plan composer, the session-frame discriminator,
environment resolution, drift detection, lifecycle state, and canonical launch
identity contracts. RuntimeTemplateKey identifies only reusable immutable
compute; SessionBinding contains tenant/session refs; ThreadReuseKey is the
strict same-user conversation and filesystem reuse identity. Adding a new
runtime adapter means one new package implementing these interfaces.
When to use it
- Use it to compose a mount plan from a workspace manifest, or to implement a concrete agent-session driver against the shared interfaces.
- Use the launch identity constructors and hashes to keep warm-compute compatibility separate from tenant binding and Thread reuse decisions.
Installation
pnpm add @xemahq/agent-session-runtimeUsage
import { DefaultWorkspaceImageComposer } from '@xemahq/agent-session-runtime';
const composer = new DefaultWorkspaceImageComposer();
const mountPlan = composer.compose(workspaceManifest, bindContext);License
Apache-2.0 © Xema — xema.dev
