/** * The environment readers the lifecycle hook relay calls. They live apart from `config.ts`, which * imports the core barrel, because a hook process that loaded that barrel would load the NATS * client, zod and yaml on every lifecycle event and use none of them. */ import { type LaunchMaterial } from "@cotal-ai/core/launch-material"; /** Resolve the launch-material file, if this launch uses one. Refuses the two-carrier case: a * material file AND direct material vars means two answers to "who is this session", and picking * one silently is how a seat ends up connected as something nobody chose. An unreadable or * permissive file throws from {@link readLaunchMaterial} - never a fall back to the env, which * would turn a broken launch into a quietly different one. */ export declare function readMaterial(env: NodeJS.ProcessEnv): LaunchMaterial | undefined; /** * This session's local control endpoint: the socket PATH from the env (not a secret, and the * short-lived hook processes need it too) and the first-frame token out of the launch material, * which is where the token now rides instead of `COTAL_CONTROL_TOKEN`. * * NOTHING means nothing: neither half present, so this is a session with no control plane, which is * a normal launch. HALF A PAIR THROWS HERE, centrally, and that is the change worth explaining. * * Returning `undefined` for a half pair made every caller's own check the real contract, and the * callers do not agree: the in-agent server would refuse to serve, a hook would fall silent, and one * caller could simply forget, leaving a session that runs with a control plane it believes it * configured and does not have. That is a silent degradation wearing the shape of an optional * feature. Half a pair is not an absent control endpoint, it is a BROKEN one, and the difference * belongs where the pair is resolved rather than in five copies downstream. * * Callers that must survive anything still can, and do so visibly: the lifecycle hook relay wraps * this call in a try/catch because a hook that throws is a hook that blocked the session, and fail * open is that relay's whole documented contract. Every other caller wants exactly this throw. */ export declare function controlFromEnv(env?: NodeJS.ProcessEnv): { path: string; token: string; } | undefined; /** True iff the env carries a Cotal identity — i.e. this is a launcher-spawned * session, not an operator's plain `claude`. `COTAL_LINK` / `COTAL_AGENT_FILE` * count: setting either is itself the explicit opt-in. The connector stays * inert otherwise. */ export declare function hasIdentity(env?: NodeJS.ProcessEnv): boolean; //# sourceMappingURL=session-env.d.ts.map