import type { ExtensionAPI } from "@earendil-works/pi-coding-agent"; /** * Child-side guard, loaded by the worker with -e only for `modelMatch: "exact"`. * * Pi swallows an exception thrown by an extension handler and goes on with the * request, so throwing is no veto. `ctx.abort()` also kept the provider from being * entered in Pi 1.0.4 probes, but only because credential lookup before the stream * honours the aborted signal, and the run would fail as a plain abort without a * fixed reason. Ending this process before the call depends on neither. * * Three checks, all against the pin: * - `model_select`: any switch away from the pin ends the child at once, so * nothing runs on the other model afterwards, including the summaries that Pi's * compaction and branch summarization build from the session's current model. * Pi emits it only when the model changes, so the `--model` launch and Fabric's * own `set_model` to the pin never reach it. A settings default model does not * either: `--model` wins before any extension runs. * - `context`, `context_with_system` and `before_provider_request`: Pi's current * model is the pin before each conversation request. * - `before_provider_request`: the model id inside the outgoing payload is the one * Pi sends for the pin, for the APIs listed in PAYLOAD_MODEL_FIELD. This sees * a rewrite made by a handler that ran before this one, and none made after it. * * Model calls an extension makes itself are outside this guard. */ export default function fabricModelPinGuard(pi: ExtensionAPI): void; //# sourceMappingURL=model-pin-guard.d.ts.map