/** * The `defineMemory(...)` input and the resolved contract the runtime reads. * * Durable memory is opt-in and owned by one root declaration: a project with no * `memory.ts` mounts nothing. The resolved form is a list of slices rather than a * flag, so later slice kinds (a private user slice, a group mount keyed by a JWT * claim) are data the runtime already knows how to carry — not a new shape. */ /** * One enabled memory mount after normalize. Mounts are always read/write. * * One kind today. The resolved shape is a list so later kinds (a private user * slice, a group mount keyed by a claim) are added here without changing what * consumers read. */ export type ResolvedMemorySlice = { kind: "agent"; }; /** Slice kinds the runtime can mount, authorable or not. */ export type MemorySliceKind = ResolvedMemorySlice["kind"]; /** * Resolved durable memory: which slices are mounted. * * Empty array means no durable memory. */ export type MemoryScope = ResolvedMemorySlice[]; /** * Authoring form of a single memory slice. * * Deployment-shared agent memory is the whole launch surface. `"user"` and the * object slice form (`{ kind, mount, access }`) are recognized and rejected with * a "not implemented yet" error rather than being silently accepted. */ export type MemorySliceInput = "agent"; /** * Authoring form of `defineMemory({ scope })`. * * - `"none"` / `[]` / omitted — no durable memory * - `"agent"` / `["agent"]` — deployment-shared memory at `/memories/agent/` */ export type MemoryScopeInput = "none" | MemorySliceInput | MemorySliceInput[]; /** The memory declaration. Every key is optional. */ export interface MemoryOptions { /** * Which memory slices runs of this deployment may use. Defaults to `"none"`, * so a declaration that names no scope mounts nothing. */ scope?: MemoryScopeInput; } /** * The resolved memory contract the managed runtime reads. * * Versioned because the authoring surface will grow slice kinds and per-slice * options: a consumer can branch on `version` instead of guessing from shape. */ export interface MemoryConfig { readonly version: 1; /** Enabled slices, agent first (empty = no durable memory). */ readonly slices: MemoryScope; } /** * The pre-runtime spec returned by `defineMemory`. * * The CLI discovers the `memory` export from a root `memory.{ts,tsx,mts,cts}` * and hands this config to the managed runtime, which mounts the named slices. */ export interface MemoryDefinition { readonly kind: "memory"; readonly config: MemoryConfig; } //# sourceMappingURL=types.d.ts.map