glove-core 4.0.0 changes where live state reaches the model. Goals, forms and pinned context no longer rewrite the system prompt: they are resolved by runtime context providers before each model iteration and appended at the model-input tail, as transient snapshots that never enter saved conversation history. That is the one breaking change in v4, and it only affects custom runnables, custom builders and exhaustive subscriber handlers.
4.1, 4.2 and 4.3 are minor releases on top: Foundry's production controls and native goals, facts and forms; browser and sandbox mounts with Station 3 as the first backend; and the Vercel AI Gateway as a built-in provider. The current release is 4.3.0. The other Glove packages are versioned independently.
| Version | Highlights |
|---|---|
| 4.0.0 | Live runtime context at the model-input tail. Breaking for custom IGloveRunnable / IGloveBuilder implementations and exhaustive subscriber handlers. |
| 4.1.0 | Foundry production controls; lazy goals, facts and forms; durable SQLite memory adapters; an interactive project initializer; MCP stdio transport. |
| 4.2.0 | Browser scripting and persistent sandbox mounts (Station 3); runtime context accepts content parts as well as text. |
| 4.3.0 | Vercel AI Gateway provider. |
Changing memory state stays out of system prompts. Before each iteration, core resolves every registered context provider and appends the results at the tail of the model input, after stored history and complete tool-result bundles. Saved conversation history is not changed, and the resolved snapshots are exposed to tracing. Goals, forms and pinned context all use this mechanism. Realtime voice injects changed snapshots silently at startup and after tools, with an explicit refresh for external changes (see Keeping a live session current).
Your own application state can use the same channel. A provider returns the current state, or null / undefined when it has nothing to add, and registration returns a function that removes it:
const removeContext = agent.addContextProvider(async (signal) => {
const order = await loadOrder(orderId, signal);
return order ? `Order ${order.id} is ${order.status}.` : null;
});
// Later, when the state no longer applies:
removeContext();The standard Glove class implements everything below. You only have work to do if you wrote one of these yourself:
IGloveRunnable. Implement addContextProvider(provider), which returns an unregister function, and getRuntimeContext(signal?), which resolves to the current snapshot messages. A wrapper around another runnable can forward both:import type { IGloveRunnable } from "glove-core";
// Spread into a wrapper that delegates to an inner runnable.
export function forwardRuntimeContext(
inner: IGloveRunnable,
): Pick<IGloveRunnable, "addContextProvider" | "getRuntimeContext"> {
return {
addContextProvider: (provider) => inner.addContextProvider(provider),
getRuntimeContext: (signal) => inner.getRuntimeContext(signal),
};
}IGloveBuilder. Implement addContextProvider with the same signature.runtime_context event. Its data is { messages: Message[] }: the resolved snapshots, outside persisted history.runtime_context snapshots instead.4.0.0 also preserves real user-turn boundaries when runtime context, inbox reminders, skills or compaction markers are present. Current-turn tool results stay full, pending reminders are appended after complete tool-result bundles, and structured image and video content survives when the OpenAI-compatible, OpenRouter and MiMo adapters merge adjacent user messages.
glove-memory/sqlite adapters for entity, episodic, resource and pinned-context memory on Node 22.13+, with isolated namespaces, transactional writes, cross-process reads and corruption checks. The browser-safe entry points are unchanged.npx glove-foundry init is now an interactive initializer with target, starter and package-manager choices, a review before writing files, cancellation and optional dependency installation. Non-interactive flags still work for automation. It requires Node 20.12+ (22.13+ is recommended for SQLite memory). See Install & CLI.glove-core. Retained browser scopes and a portable UTF-8 sandbox writeText ship with them. See Browsers & Sandboxes.runtime_context telemetry.stationDaemon setting lets that daemon host browser and sandbox provider adapters alongside agent jobs. Mounts can register cleanup with Foundry. See Browser & sandbox agent.The Vercel AI Gateway is a built-in provider. It routes through https://ai-gateway.vercel.sh/v1 using AI_GATEWAY_API_KEY, and inside a Vercel deployment falls back to the injected VERCEL_OIDC_TOKEN. With cache enabled, cache_control breakpoints are placed at the message level so they reach Anthropic models upstream. createChatHandler({ provider: "vercel" }) in glove-next works the same way.
import { createAdapter } from "glove-core/models/providers";
const model = createAdapter({
provider: "vercel",
model: "anthropic/claude-sonnet-4",
cache: true,
});ProviderDef gains an optional fallbackEnvVars list, and the new resolveProviderApiKey(def) helper reads envVar first, then each fallback in order. See Providers.