import type { Context, CursorExecHandlers } from "../types.js"; import { AssistantMessageEventStream } from "./event-stream.js"; /** Per-request glyph codec applied at the provider wire boundary. */ export interface GlyphCodec { /** Context with model-bound glyphs encoded and one conditional convention notice. */ context: Context; /** Decodes glyph tokens in the stream's terminal assistant message. */ wrap(inner: AssistantMessageEventStream): AssistantMessageEventStream; /** Decodes Cursor Pi calls and encodes their provider-bound results. */ wrapCursorExecHandlers(handlers: CursorExecHandlers): CursorExecHandlers; /** Whether this request has encoded at least one glyph or literal token prefix. */ active: boolean; } /** Encode one string; returns the same reference when nothing changed. */ export declare function encodeGlyphText(text: string): string; /** Decodes glyph tokens and unescapes `⟦E⟧` to `⟦`. */ export declare function decodeGlyphText(text: string): string; /** * Encode a context for the provider wire without mutating stored history. * Reapplying it to the returned branded context is an inert identity pass. */ export declare function applyGlyphCodec(context: Context): GlyphCodec;