From ffbbcf692a97ec8648af39353b49f32896367207 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Thu, 11 Jun 2026 13:08:38 +0900 Subject: feat(surfaces): NumberField + per-conversation surface scoping; cache-warming controls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extend the surface framework so cache-warming exposes per-conversation controls: - ui-contract: add NumberField (settable free-value numeric) to SurfaceField; add optional conversationId to subscribe/unsubscribe/invoke + surface/update - surface-registry: SurfaceContext { conversationId? } on getSpec/invoke (backward-compatible) - transport-ws: thread conversationId; key subscriptions by (surfaceId, conversationId); tag surface/update replies with conversationId - cache-warming: per-conversation surface — Toggle(enabled) + Number(interval seconds, cache-warming/set-interval) + Stat(last cache %); drop the currentConversationId closure Global surfaces (surface-loaded-extensions) unchanged. 784 vitest + 109 bun = 893 tests; tsc -b EXIT 0; biome clean. --- packages/cache-warming/src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'packages/cache-warming/src/index.ts') diff --git a/packages/cache-warming/src/index.ts b/packages/cache-warming/src/index.ts index 8670dc5..d77f4ec 100644 --- a/packages/cache-warming/src/index.ts +++ b/packages/cache-warming/src/index.ts @@ -1,12 +1,17 @@ export { extension, manifest } from "./extension.js"; export { + buildConversationSpec, + buildDefaultSpec, type ConversationSettings, type ConversationState, computeCachePct, DEFAULT_INTERVAL_MS, isTokenCurrent, MIN_INTERVAL_MS, + msToSeconds, + parseIntervalPayload, parseSettings, + secondsToMs, serializeSettings, settingsKey, shouldWarm, -- cgit v1.2.3