export declare const type = "codex_local"; export declare const label = "Codex"; export declare const SANDBOX_INSTALL_COMMAND = "npm install -g @openai/codex"; export declare const DEFAULT_CODEX_LOCAL_MODEL: "gpt-5.6-sol"; export declare const DEFAULT_CODEX_LOCAL_BYPASS_APPROVALS_AND_SANDBOX = true; export declare function resolveCodexLocalCliPolicy(config: unknown, options?: { networkAccess?: boolean; }): { extraArgs: string[]; explicitSandbox: boolean; bypass: boolean; }; export declare const CODEX_LOCAL_FAST_MODE_SUPPORTED_MODELS: readonly ["gpt-6-astra", "gpt-6.1-sol", "gpt-6-sol", "gpt-6-luna", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.4"]; declare const CODEX_LOCAL_DEFAULT_REASONING_EFFORTS: readonly ["minimal", "low", "medium", "high", "xhigh"]; declare const CODEX_LOCAL_ULTRA_REASONING_EFFORTS: readonly ["low", "medium", "high", "xhigh", "max", "ultra"]; export type CodexLocalReasoningEffort = (typeof CODEX_LOCAL_DEFAULT_REASONING_EFFORTS)[number] | (typeof CODEX_LOCAL_ULTRA_REASONING_EFFORTS)[number]; export declare function normalizeCodexModel(model: string | null | undefined): string; export declare function codexLocalReasoningEffortsForModel(model: string | null | undefined): readonly CodexLocalReasoningEffort[]; export declare function minimumCodexCliVersionForModel(model: string | null | undefined): string | null; /** Read the version from `codex --version` output; prerelease or ambiguous output yields null. */ export declare function parseCodexCliVersionOutput(output: string): string | null; export declare function codexCliVersionAtLeast(version: string, minimum: string): boolean; export declare const CODEX_CHATGPT_MODEL_REJECTION_RE: RegExp; export declare function isCodexLocalKnownModel(model: string | null | undefined): boolean; export declare function isCodexLocalManualModel(model: string | null | undefined): boolean; export declare function isCodexLocalFastModeSupported(model: string | null | undefined): boolean; export declare const models: { id: string; label: string; }[]; export declare const agentConfigurationDoc = "# codex_local agent configuration\n\nNew agents select the Codex harness with adapterType: codex_local and an optional request-level runner: auto, paperclip, or legacy. Automatic selection uses Paperclip Runner on qualified Linux x64/ARM64 targets with GNU libc 2.39 or newer and macOS arm64/x64 targets. It stores adapterType: paperclip_runner with provider: codex. Windows, 32-bit ARM, Alpine/musl, and older or unknown Linux libc retain automatic legacy selection. Qualification and artifact checks use the selected execution environment, including its architecture, rather than the controller's platform. Other harness defaults are unchanged.\n\nSet runner: legacy to retain this adapter's execution and custom settings. Explicit runner: paperclip requires a qualified target. Existing agents and reviewed pending hires retain their saved runner; authentication, model, dependency, and runtime errors never silently switch runners. The fields below describe legacy codex_local execution. Native creation translates supported settings and rejects unsupported settings with the explicit Legacy runner option.\n\nAdapter: codex_local\n\nCore fields:\n- engine (string, optional): defaults to ACP, including legacy unset/\"auto\" values. Missing prerequisites and execution failures fail the run without changing engines. Set \"cli\" to explicitly select the CLI engine.\n- cwd (string, optional): default absolute working directory fallback for the agent process (created if missing when possible)\n- instructionsFilePath (string, optional): absolute path to a markdown instructions file prepended to stdin prompt at runtime\n- model (string, optional): Codex model id\n- modelReasoningEffort (string, optional): reasoning effort override passed via -c model_reasoning_effort=...; GPT-6 Astra, GPT-6.1 Sol, GPT-6 Sol, and GPT-5.6 Sol/Terra support low|medium|high|xhigh|max|ultra; GPT-6 Luna and GPT-5.6 Luna support low|medium|high|xhigh|max\n- promptTemplate (string, optional): run prompt template\n- search (boolean, optional): run codex with --search\n- fastMode (boolean, optional): enable Codex Fast mode; supported on GPT-6 (astra/sol/luna), GPT-6.1 Sol, GPT-5.6 (sol/terra/luna), GPT-5.5, GPT-5.4 and passed through for manual model IDs\n- dangerouslyBypassApprovalsAndSandbox (boolean, optional): run with bypass flag\n- command (string, optional): defaults to \"codex\"\n- extraArgs (string[], optional): additional CLI args\n- env (object, optional): KEY=VALUE environment variables\n- workspaceStrategy (object, optional): execution workspace strategy; currently supports { type: \"git_worktree\", baseRef?, branchTemplate?, worktreeParentDir? }\n- workspaceRuntime (object, optional): reserved for workspace runtime metadata; workspace runtime services are manually controlled from the workspace UI and are not auto-started by heartbeats\n- filesystemScope (string, optional): set to \"workspace\" to confine local CLI filesystem access with Bubblewrap. Off by default. The workspace and managed CODEX_HOME remain writable; other host paths are hidden.\n- filesystemExtraPaths (array, optional): additional absolute host paths exposed inside the workspace sandbox. String entries are read-only; object entries use { path: \"/absolute/path\", access: \"ro\" | \"rw\" }.\n- filesystemSandboxCommand (string, optional): Bubblewrap executable name or absolute path; defaults to \"bwrap\". Linux only.\n- networkScope (string, optional): \"deny\" blocks all network egress; \"allowlist\" permits only networkAllowlist targets through Paperclip's HTTP(S) proxy. Off by default.\n- networkAllowlist (string[], optional): exact hostnames, hostname:port entries, or origin URLs. Include the configured Codex provider origin, such as \"api.openai.com\" or a custom model provider gateway.\n\nOperational fields:\n- timeoutSec (number, optional): run timeout in seconds\n- graceSec (number, optional): SIGTERM grace period in seconds\n- outputInactivityTimeoutMs (number | null, optional): inactivity monitor around the codex child. Resets whenever the child emits stdout/stderr bytes or, on Linux, its process group shows meaningful CPU, disk I/O, or child-process churn during a silent build. Defaults to 30 * 60_000 ms when unset or non-positive. Set to `null` to disable the monitor entirely (only do this for known-slow tasks; the platform-level 1h silent-run safety net still applies). On fire, the adapter sends SIGTERM to the process group, waits 5s, then SIGKILL, and surfaces the run as failed with errorMessage \"monitor: no codex activity (output or process) for {N}m {S}s\".\n- agentCommand (string, optional): ACP server command override used only when engine=\"acp\"; defaults to the package-local codex-acp binary\n- mode (string, optional): ACP session mode when engine=\"acp\"; persistent or oneshot\n- nonInteractivePermissions (string, optional): ACP non-interactive permission fallback when engine=\"acp\"; deny or fail\n- stateDir (string, optional): ACP state directory override when engine=\"acp\"\n- warmHandleIdleMs (number, optional): warm ACP process idle timeout when engine=\"acp\"; defaults to 0\n\nNotes:\n- filesystemScope and networkScope are spawn-level confinement and are orthogonal to Codex approval/sandbox flags. Both require Bubblewrap on the host and explicit engine=\"cli\"; default or explicit ACP is rejected because ACP confinement is not yet supported. networkScope=\"allowlist\" injects HTTP_PROXY/HTTPS_PROXY for the CLI while its private network namespace blocks direct sockets, so every required provider/API hostname must be listed explicitly.\n- Prompts are piped via stdin (Codex receives \"-\" prompt argument).\n- If instructionsFilePath is configured, Paperclip prepends that file's contents to the stdin prompt on every run.\n- Codex exec automatically applies repo-scoped AGENTS.md instructions from the active workspace. Paperclip cannot suppress that discovery in exec mode, so repo AGENTS.md files may still apply even when you only configured an explicit instructionsFilePath.\n- Paperclip injects desired local skills into the effective CODEX_HOME/skills/ directory at execution time so Codex can discover \"$paperclip\" and related skills without polluting the project working directory. For new and updated agents, Paperclip assigns an isolated managed home at ~/.paperclip/instances//companies//agents//codex-home/skills/; when CODEX_HOME is explicitly overridden in adapter config, that override is used instead.\n- New and updated codex_local agents persist an empty OPENAI_API_KEY override by default so a host-level OPENAI_API_KEY cannot leak into Codex runs through process inheritance. Explicit CODEX_HOME overrides must not point at the shared company codex-home, $CODEX_HOME, or ~/.codex.\n- Some model/tool combinations reject certain effort levels (for example minimal with web search enabled).\n- With ChatGPT sign-in, model availability depends on the installed Codex capabilities. Legacy setup reports known model/version mismatches. Native setup tests the actual app-server and selected model; a version number alone does not reject or replace an installed CLI. If the provider rejects the model, select an available model or update Codex in the execution environment.\n- Fast mode is supported on GPT-6 (astra/sol/luna), GPT-6.1 Sol, GPT-5.6 (sol/terra/luna), GPT-5.5, GPT-5.4 and manual model IDs. When enabled for those models, Paperclip applies `service_tier=\"fast\"` and `features.fast_mode=true`.\n- When Paperclip realizes a workspace/runtime for a run, it injects PAPERCLIP_WORKSPACE_* and PAPERCLIP_RUNTIME_* env vars for agent-side tooling.\n- The ACP engine keeps its workspace sandbox and enables network access on each turn. Explicit sandbox_workspace_write.network_access overrides in extraArgs (or env.PAPERCLIP_CODEX_ACP_NETWORK_ACCESS=\"false\") disable it; execution-target network denial wins. The bundled ACP patch is needed because upstream mode presets override Codex config.toml on every turn.\n- The CLI engine defaults to a writable workspace sandbox with network access for unattended work and Paperclip API calls. It does not enable the dangerous bypass flag. Explicit sandbox modes/profiles and network overrides in extraArgs retain their meaning. An execution-target network denial remains enforced.\n- Codex ACP is the preferred auto lane when Node >=24.11.0 and the Codex ACP server are available. It reuses shared ACP prompt/runtime guidance, selected skill materialization into CODEX_HOME/skills, model/reasoning/fast-mode session config, and existing quota-window reporting. Missing ACP prerequisites fail both default and explicit ACP runs with an actionable setup error; the adapter never switches engines automatically.\n"; export {}; //# sourceMappingURL=index.d.ts.map