UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

39 lines (38 loc) • 1.28 kB
import { i as registerContextEngineForOwner, m as CONTEXT_ENGINE_HOST_PARAMS } from "./registry-BNPXTWdk.mjs"; import { n as delegateCompactionToRuntime } from "./delegate-7xQ3O-I9.mjs"; //#region src/context-engine/legacy.ts /** * LegacyContextEngine wraps the existing compaction behavior behind the * ContextEngine interface, preserving 100% backward compatibility. * * - ingest: no-op (SessionManager handles message persistence) * - assemble: pass-through (existing sanitize/validate/limit pipeline in attempt.ts handles this) * - compact: delegates to the built-in compaction runtime */ var LegacyContextEngine = class { constructor() { this.info = { id: "legacy", name: "Legacy Context Engine", version: "1.0.0", acceptedHostParams: [...CONTEXT_ENGINE_HOST_PARAMS] }; this.compact = delegateCompactionToRuntime; } async ingest(e) { return { ingested: false }; } async assemble(e) { return { messages: e.messages, estimatedTokens: 0 }; } }; //#endregion //#region src/context-engine/legacy.registration.ts async function registerLegacyContextEngine() { await registerContextEngineForOwner("legacy", async () => new LegacyContextEngine(), "core", { allowSameOwnerRefresh: true }); } //#endregion export { registerLegacyContextEngine as t };