/** * Exported for pushSessionBundle's legacy bundle-mode parser * (splitBundleByManifest), which slices the same delimiter-escaped text * produced by serializeBundle and needs the matching decode step. */ export declare function unescapeBundleContent(content: string): string; /** * Combine an array of pages into a single bundle string. * Each page is preceded by a delimiter line containing its name. */ export declare function serializeBundle(pages: Array<{ name: string; content: string; }>): string; /** * Build the self-describing header prepended to a pulled bundle. * * The working-set contract already exists in seed/instructions and in the * generated per-project instructions ("Do NOT call read_page on pages already * in the bundle"). It was not reaching agents: tool descriptions are in context * on every turn, wiki instruction pages only if the client loaded them, and an * MCP client such as Claude Code never does. Meanwhile read_page's own * description prescribes a "REQUIRED" list_pages -> read_page workflow with no * bundle carve-out, so the contradiction resolved in favour of re-reading — * measured at 10.04s of individual reads versus 3.47s for the same ten pages * bundled (GH #426). * * Stating the contract inside the payload makes it independent of client, * loaded instructions and context trimming: it arrives with the data. * * The header deliberately lists page names in a plain indented list rather than * as `===PAGE: name===` lines. push_session_bundle's manifest parser locates * pages with indexOf on that exact delimiter, so repeating it here would let a * header line shadow the real one. parseBundle ignores everything before the * first delimiter, so both round-trip paths are unaffected. */ export declare function buildBundleHeader(pages: Array<{ name: string; }>, options?: { truncated?: boolean; filter?: string; totalMatching?: number; /** * Conventional project entry points (`readme.md`, `status.md`, * `open-loops.md`, `index.md`) that matched the filter but did not fit. * Named rather than counted: an agent cannot act on "20 of 132", but it can * act on "status.md is missing" (GH #462). */ omittedConventional?: string[]; }): string; /** * Parse a bundle string back into named pages. * Throws if the bundle contains no valid page delimiters. */ export declare function parseBundle(bundle: string): Array<{ name: string; content: string; }>; //# sourceMappingURL=bundle.d.ts.map