/**
 * Copilot workflow source validation + helpers.
 *
 * Checks that Copilot workflow source files use the runtime-managed
 * `s.client` and `s.session` instead of manual SDK client creation.
 */
import type { CopilotClientOptions, SessionConfig as CopilotSessionConfig } from "@github/copilot-sdk";
/**
 * Return `true` when `candidate` is a Node.js / npm-loader JavaScript shim
 * that should not be passed to the Copilot SDK as the CLI executable.
 *
 * Filesystem errors for a given candidate are treated as "not a shim" so
 * that the SDK can surface the real error (e.g. permission denied, ENOENT).
 */
export declare function isCopilotShim(candidate: string): boolean;
/**
 * Build the subprocess environment for the Copilot CLI process.
 * Normalises locale to UTF-8 and suppresses Node.js deprecation warnings.
 */
export declare function copilotSubprocessEnv(baseEnv?: NodeJS.ProcessEnv): Record<string, string | undefined>;
/**
 * Enumerate every existing `cmd` candidate across PATH order.
 */
export declare function enumeratePathCandidates(cmd: string, pathEnv: string): string[];
export type CommandPathResolver = (cmd: string) => string | null;
export declare function resolveCopilotCliPath(resolveCommandPath?: CommandPathResolver): string | undefined;
/**
 * Build options suitable for `new CopilotClient(...)`.
 *
 * Includes:
 * - `env` from {@link copilotSubprocessEnv} (UTF-8 locale + `NODE_NO_WARNINGS=1`).
 * - `cliPath` from {@link resolveCopilotCliPath} when resolvable; omitted
 *   otherwise so the SDK falls back to its bundled CLI.
 */
export declare function copilotSdkLaunchOptions(resolveCommandPath?: CommandPathResolver): CopilotClientOptions;
/**
 * Fold the atomic-managed additional instructions into a caller's
 * `systemMessage` value on `client.createSession`. Behavior:
 *
 *   - **No caller value** → `{ mode: "append", content: extra }`. The
 *     SDK's default mode is append and preserves the SDK persona.
 *   - **Append/customize mode** → concatenate our content to the existing
 *     `content` field (newline-separated when both are present).
 *   - **Replace mode** → leave alone. The caller has explicitly opted out
 *     of SDK-managed sections; silently re-adding the persona-style append
 *     would violate that contract.
 *
 * Exported for unit testing.
 */
export declare function mergeCopilotSystemMessage(existing: CopilotSessionConfig["systemMessage"], extra: string): CopilotSessionConfig["systemMessage"];
/**
 * Validate a Copilot workflow source file for common mistakes.
 */
export declare const validateCopilotWorkflow: (source: string) => import("../types.ts").ValidationWarning[];
//# sourceMappingURL=copilot.d.ts.map