import type { RunHomeBuildContext } from "./build.js"; export { isWithin, projectWalk } from "./walk.js"; /** * The run folder's item directories (spec §3.3), gated per mode (spec §3.2). * * skills/, commands/ code only * output-styles/ code only, and never for a dispatch child * rules/ the user's in code only; the trusted project's in every mode * agents/ every mode */ export declare function buildItems(context: RunHomeBuildContext): Promise; /** * The Winter runtime's built-in style names (agent SDK `packages/runtime/src/context/output-styles.ts`, * the built-in table). The runtime resolves a name from the run folder's `output-styles/.md` BEFORE * its built-ins, so a file of one of these names there would redefine the built-in. */ export declare const WINTER_BUILTIN_OUTPUT_STYLE_NAMES: readonly string[]; /** * A PROJECT output style for the run folder, from the runtime's own parse of it: `keep-coding-instructions` * forced to `true` (a style with no frontmatter gets one holding just that — ABSENT means drop on the Winter * runtime), everything else as parsed. The same proved re-serialisation the agents use. */ export declare function rewriteProjectOutputStyle(text: string): { ok: true; text: string; } | { ok: false; reason: "unparseable" | "no-yaml-parser"; }; /** The project rules' linked names, so the instructions step can find the ones it must rewrite. */ export interface ProjectRuleLink { /** The file name in `/rules/`. */ name: string; /** The rule's path as found under the project's dot-dir (what a report names). */ path: string; /** The rule's own real path. */ real: string; /** The walk directory whose dot-dir holds it — the anchor its `paths:` resolve from (F17). */ anchor: string; } /** The project rules `buildItems` linked for this build, in link order. */ export declare function projectRulesOf(context: RunHomeBuildContext): readonly ProjectRuleLink[]; /** * F19c: an agent's definition, rewritten for the run folder FROM THE RUNTIME'S OWN PARSE of it * (`claude-frontmatter.ts` — the runtime's frontmatter split, BOM strip, YAML parse and retry). * * `permissionMode` is removed (the daemon has always stripped it — an agent must not pick its own * approval policy), and a `memory` scope other than `user` is rewritten: `project`/`local` become * `user` (they would write `/.claude/agent-memory[-local]/`, i.e. into the repository; * `user` writes the config dir's `agent-memory/`, the persistent set linked into `sdk/agent-memory`), * and any other value — which the runtime ignores — is dropped. * * A file WITH a frontmatter block is always re-serialised from the parsed object (so both runtimes read * one unambiguous block, whatever spelling the author used), and the result is proved to read back as * that object by the runtime's split, the strict split and the runtime's parse. A block the runtime * cannot parse, a result that does not prove out, or a process with no `Bun.YAML` is SKIPPED (reported): * a definition whose reading cannot be promised is not handed to either runtime. A file with no * frontmatter block is copied as-is — the runtime reads no keys from it. */ export declare function rewriteAgentDefinition(text: string): { ok: true; text: string; } | { ok: false; reason: "unparseable" | "no-yaml-parser"; };