/** Stable multi-session protocol error codes. */
export declare const RPC_ERROR_UNKNOWN_SESSION = "unknown_session";
/** `set_session_context` requires an attachment on the requesting connection. */
export declare const RPC_ERROR_SESSION_NOT_ATTACHED = "session_not_attached";
export declare const RPC_ERROR_SESSION_IDENTITY_MISMATCH = "session_identity_mismatch";
export declare const RPC_ERROR_SESSION_BUSY_LIFECYCLE = "session_busy_lifecycle";
export declare const RPC_ERROR_ATTACHED_ELSEWHERE = "attached_elsewhere";
export declare const RPC_ERROR_SESSION_CLOSING = "session_closing";
export declare const RPC_ERROR_SESSION_PATH_IN_USE = "session_path_in_use";
/** A live process outside this host holds the session JSONL; retry after it exits. */
export declare const RPC_ERROR_SESSION_HELD = "session_held";
export declare const RPC_ERROR_SESSION_RESERVATION_LIMIT = "session_reservation_limit";
export declare const RPC_ERROR_MISSING_SESSION_ID = "missing_session_id";
export declare const RPC_ERROR_MULTI_SESSION_DISABLED = "multi_session_disabled";
export declare const RPC_ERROR_INVALID_PATH = "invalid_path";
/** A command field outside its documented range; `errorData` carries `reason` and `action`. */
export declare const RPC_ERROR_INVALID_ARGUMENT = "invalid_argument";
/** An answer would pass the per-response byte budget; read the history in pages (`get_entries` `limit`/`maxBytes`). */
export declare const RPC_ERROR_RESPONSE_TOO_LARGE = "response_too_large";
/**
 * The answer to this request was built but could not be written (its value cannot be serialized: a BigInt, a cycle, a
 * throwing `toJSON`); `error` names the cause. Sent in place of the reply so the caller is never left waiting (senpi#5702).
 */
export declare const RPC_ERROR_RESPONSE_UNWRITABLE = "response_unwritable";
/**
 * A project write stated the folder its caller means (`expectedCwd`) and the session is in another one: nothing is
 * written. A client that names a session by a key that may since point at another session states the folder it
 * means, so a write never lands in the wrong project.
 */
export declare const RPC_ERROR_PROJECT_CWD_MISMATCH = "project_cwd_mismatch";
export declare const RPC_ERROR_OPEN_FAILED = "open_failed";
export declare const RPC_ERROR_OWNER_CHANGED = "owner_changed";
export declare const RPC_ERROR_SESSION_NOT_HELD = "session_not_held";
export declare const RPC_ERROR_MEDIA_NOT_FOUND = "media_not_found";
/** `set_project_trust` on an engine launched with `--approve`/`--no-approve`: the flag outranks every saved decision. */
export declare const RPC_ERROR_PROJECT_TRUST_LOCKED = "project_trust_locked";
/** `set_project_trust` against what a `project_trust` extension handler decides; nothing is saved or applied. */
export declare const RPC_ERROR_PROJECT_TRUST_EXTENSION_DECIDED = "project_trust_extension_decided";
/** `set_project_setting` whose write to the project settings file failed (permissions, a held lock). */
export declare const RPC_ERROR_PROJECT_SETTINGS_WRITE_FAILED = "project_settings_write_failed";
/** `set_project_setting` while the session's project is untrusted; `set_project_trust` first. */
export declare const RPC_ERROR_PROJECT_NOT_TRUSTED = "project_not_trusted";
/** `set_project_setting` while the project settings file does not parse; fix the file first. */
export declare const RPC_ERROR_PROJECT_SETTINGS_UNREADABLE = "project_settings_unreadable";
/** `read_project_file`/`write_project_file` on a path outside the instruction-file allowlist or the workspace. */
export declare const RPC_ERROR_PROJECT_FILE_NOT_ALLOWED = "project_file_not_allowed";
/** `write_project_file` whose `ifEtag` is not the file's current version; `errorData.currentEtag` names it. */
export declare const RPC_ERROR_PROJECT_FILE_CONFLICT = "project_file_conflict";
/** `read_project_file`/`write_project_file` over the project file size limit. */
export declare const RPC_ERROR_PROJECT_FILE_TOO_LARGE = "project_file_too_large";
/** `write_project_file` whose write failed (permissions, disk). */
export declare const RPC_ERROR_PROJECT_FILE_WRITE_FAILED = "project_file_write_failed";
/** A folder-file write over RPC the machine's own permission decision for that edit refused (senpi#6485). */
export declare const RPC_ERROR_PROJECT_FILE_PERMISSION_DENIED = "project_file_permission_denied";
/** `set_project_mcp_servers` while the stored project MCP file does not parse; `errorData.parseError` says why. */
export declare const RPC_ERROR_PROJECT_MCP_CONFIG_UNPARSEABLE = "project_mcp_config_unparseable";
/** `set_project_mcp_servers` whose merged file the engine's MCP config loader would reject. */
export declare const RPC_ERROR_PROJECT_MCP_CONFIG_INVALID = "project_mcp_config_invalid";
/** `read_project_skill_file`/`write_project_skill_file` for a skill the engine does not list for the session. */
export declare const RPC_ERROR_PROJECT_SKILL_NOT_LISTED = "project_skill_not_listed";
/** `read_user_skill_file`/`write_user_skill_file` for a skill the engine does not list for the session. */
export declare const RPC_ERROR_USER_SKILL_NOT_LISTED = "user_skill_not_listed";
/** A listed skill whose file is outside every user skills root, or reached through a link or a `..` path. */
export declare const RPC_ERROR_USER_SKILL_FILE_NOT_ALLOWED = "user_skill_file_not_allowed";
/** A user skill write from another device that the user on the skill's machine denied. */
export declare const RPC_ERROR_USER_SKILL_WRITE_DECLINED = "user_skill_write_declined";
/** A user skill write from another device that nobody on the skill's machine answered (no app open there, or no answer). */
export declare const RPC_ERROR_USER_SKILL_WRITE_UNCONFIRMED = "user_skill_write_unconfirmed";
/** `open_session.context` broke a documented cap (key count, key syntax, value or total bytes). */
export declare const RPC_ERROR_INVALID_SESSION_CONTEXT = "invalid_session_context";
/** `open_session.env` is malformed or names a variable that is not caller-passable on this host (senpi#4381). */
export declare const RPC_ERROR_INVALID_SESSION_ENV = "invalid_session_env";
/** `subscribe_sessions` named a malformed selector, mirror or flag; `errorData { reason, action }` says what to send. */
export declare const RPC_ERROR_INVALID_SUBSCRIPTION = "invalid_subscription";
/** `unsubscribe_sessions` named a subscription this connection does not hold. */
export declare const RPC_ERROR_UNKNOWN_SUBSCRIPTION = "unknown_subscription";
/** `subscribe_sessions` on a connection that already holds the documented maximum number of subscriptions. */
export declare const RPC_ERROR_SUBSCRIPTION_LIMIT = "subscription_limit";
/** `subscribe_sessions`/`unsubscribe_sessions` on a transport with no per-connection identity (stdio). */
export declare const RPC_ERROR_UNSUPPORTED_TRANSPORT = "unsupported_transport";
/**
 * A public method whose host feature is off. `errorData.feature` names it, e.g. `compact_updates` for `reset_stream`,
 * `cancel_attempt`, `get_recovery_page` and `release_recovery` while engine-socket compact updates are off (senpi#5748).
 */
export declare const RPC_ERROR_FEATURE_DISABLED = "feature_disabled";
/** `open_session.kind` was neither `interactive` nor `worker`; an unknown kind is never downgraded. */
export declare const RPC_ERROR_INVALID_SESSION_KIND = "invalid_session_kind";
/** A launch-profile field on `open_session` (currently `auto_title`) was the wrong type. */
export declare const RPC_ERROR_INVALID_LAUNCH_PROFILE = "invalid_launch_profile";
/** `open_session.durableSessionId` was not a legal session id (see `assertValidSessionId`). */
export declare const RPC_ERROR_INVALID_SESSION_ID = "invalid_session_id";
/**
 * `open_session.durableSessionId` is already held by a LIVE session. Two live sessions may
 * never share one durable id: every per-session artifact a client keys by that id (goal files,
 * subagent and team attribution) would collide. Close the holder, or open with a different id.
 */
export declare const RPC_ERROR_SESSION_ID_IN_USE = "session_id_in_use";
/**
 * Sent only by hosts released before senpi#2207, which declined NEW worker sessions above an RSS
 * watermark with `errorData { rssMb, retry_after_ms }`. Current hosts never refuse an open for
 * memory; clients keep recognizing the code while older generations may still answer.
 */
export declare const RPC_ERROR_HOST_MEMORY_PRESSURE = "host_memory_pressure";
/** `warm` could not load the profile it was asked for (missing cwd, an extension that failed to load). */
export declare const RPC_ERROR_WARM_FAILED = "warm_failed";
export declare const RPC_ERROR_STREAMING = "streaming";
export declare const RPC_ERROR_ENTRY_NOT_FOUND = "not_found";
/** `set_model` named a provider/model pair the session's registry does not offer. */
export declare const RPC_ERROR_MODEL_NOT_FOUND = "model_not_found";
/** An `effectId` was reused for a different request; `errorData` carries `reason` and `action`. */
export declare const RPC_ERROR_EFFECT_ID_CONFLICT = "effect_id_conflict";
/** `get_effect_status { sessionPath }` could not read the transcript; this is never a `found: false`. */
export declare const RPC_ERROR_TRANSCRIPT_UNREADABLE = "transcript_unreadable";
/** `set_model { effectId }` was refused because the model's provider cannot serve it now. */
export declare const RPC_ERROR_PROVIDER_UNAVAILABLE = "provider_unavailable";
export declare const RPC_ERROR_PROVIDER_CREDENTIALS_MISSING = "provider_credentials_missing";
export declare const RPC_ERROR_PROVIDER_CREDENTIALS_EXPIRED = "provider_credentials_expired";
export declare const RPC_ERROR_NO_MODEL_SELECTED = "no_model_selected";
/** A `prompt` steer/follow-up, `steer` or `follow_up` named an `expectedTurnId` that is not running (`errorData { currentTurnId? }`). */
export declare const RPC_ERROR_TURN_CONFLICT = "turn_conflict";
/** `set_model { effectId }` was refused because the target cannot hold the session context. */
export declare const RPC_ERROR_CONTEXT_BUDGET = "context_budget";
export declare const RPC_ERROR_EVAL_CELL_NOT_FOUND = "eval_cell_not_found";
export declare const RPC_ERROR_INVALID_EVAL_CELL_REQUEST = "invalid_eval_cell_request";
export declare const RPC_ERROR_EVAL_CELLS_UNAVAILABLE = "eval_cells_unavailable";
export declare const RPC_ERROR_NOT_ASSISTANT = "not_assistant";
export declare const RPC_ERROR_NOT_USER = "not_user";
export declare const RPC_ERROR_EMPTY_TEXT = "empty";
export declare const RPC_ERROR_STALE_LEAF = "stale_leaf";
/** `prompt` text was command-shaped but no command handles it; mirrors `UnknownCommandError`. */
export declare const RPC_ERROR_UNKNOWN_COMMAND = "unknown_command";
/**
 * `release_session` while a turn runs or is about to start (a prompt in preflight, an admitted delivery
 * not yet written), without `interrupt: true`; `errorData.busy` names the signals.
 */
export declare const RPC_ERROR_TURN_ACTIVE = "turn_active";
/** `release_session` while other session work runs (bash, compaction, another request for the session); `errorData.busy` names it. */
export declare const RPC_ERROR_SESSION_BUSY = "session_busy";
/** `release_session` while OTHER clients are attached (the requesting connection does not count), without `force`; `errorData.attachments` names how many. */
export declare const RPC_ERROR_ATTACHED = "attached";
/** `release_session` with a `reason` other than `takeover`. */
export declare const RPC_ERROR_INVALID_RELEASE_REASON = "invalid_release_reason";
/** `release_session` for a session this host cannot hand over: `errorData.detail` is `worker_runtime` or `no_session_file`. */
export declare const RPC_ERROR_RELEASE_UNSUPPORTED = "release_unsupported";
/**
 * `release_session` whose hand-over failed after it began (writing the `session_released` entry or the
 * teardown threw): `errorData.detail` is the error message, plus `interrupted`/`dropped` after an interrupt.
 * When the entry could not be written the session stays on this host, admission open and no entry left in
 * memory; a teardown that fails after it claimed the session leaves it closing.
 */
export declare const RPC_ERROR_RELEASE_FAILED = "release_failed";
/** A draining host parks every session itself; `release_session` and `open_session` are refused meanwhile. */
export declare const RPC_ERROR_HOST_DRAINING = "host_draining";
/** The supervisor has closed admission; a launch-owning caller may ensure a successor. */
export declare const RPC_ERROR_HOST_STOPPING = "host_stopping";
export type RpcErrorCode = typeof RPC_ERROR_SESSION_IDENTITY_MISMATCH | typeof RPC_ERROR_SESSION_BUSY_LIFECYCLE | typeof RPC_ERROR_ATTACHED_ELSEWHERE | typeof RPC_ERROR_OWNER_CHANGED | typeof RPC_ERROR_SESSION_NOT_HELD | typeof RPC_ERROR_HOST_STOPPING | typeof RPC_ERROR_UNKNOWN_SESSION | typeof RPC_ERROR_SESSION_NOT_ATTACHED | typeof RPC_ERROR_SESSION_CLOSING | typeof RPC_ERROR_SESSION_PATH_IN_USE | typeof RPC_ERROR_SESSION_HELD | typeof RPC_ERROR_SESSION_RESERVATION_LIMIT | typeof RPC_ERROR_MISSING_SESSION_ID | typeof RPC_ERROR_MULTI_SESSION_DISABLED | typeof RPC_ERROR_INVALID_PATH | typeof RPC_ERROR_OPEN_FAILED | typeof RPC_ERROR_MEDIA_NOT_FOUND | typeof RPC_ERROR_PROJECT_TRUST_LOCKED | typeof RPC_ERROR_PROJECT_TRUST_EXTENSION_DECIDED | typeof RPC_ERROR_PROJECT_SETTINGS_WRITE_FAILED | typeof RPC_ERROR_PROJECT_NOT_TRUSTED | typeof RPC_ERROR_PROJECT_SETTINGS_UNREADABLE | typeof RPC_ERROR_PROJECT_FILE_NOT_ALLOWED | typeof RPC_ERROR_PROJECT_FILE_CONFLICT | typeof RPC_ERROR_PROJECT_FILE_TOO_LARGE | typeof RPC_ERROR_PROJECT_FILE_WRITE_FAILED | typeof RPC_ERROR_PROJECT_FILE_PERMISSION_DENIED | typeof RPC_ERROR_PROJECT_MCP_CONFIG_UNPARSEABLE | typeof RPC_ERROR_PROJECT_MCP_CONFIG_INVALID | typeof RPC_ERROR_PROJECT_SKILL_NOT_LISTED | typeof RPC_ERROR_INVALID_SESSION_CONTEXT | typeof RPC_ERROR_INVALID_SUBSCRIPTION | typeof RPC_ERROR_UNKNOWN_SUBSCRIPTION | typeof RPC_ERROR_SUBSCRIPTION_LIMIT | typeof RPC_ERROR_UNSUPPORTED_TRANSPORT | typeof RPC_ERROR_INVALID_SESSION_KIND | typeof RPC_ERROR_INVALID_LAUNCH_PROFILE | typeof RPC_ERROR_INVALID_SESSION_ID | typeof RPC_ERROR_SESSION_ID_IN_USE | typeof RPC_ERROR_HOST_MEMORY_PRESSURE | typeof RPC_ERROR_WARM_FAILED | typeof RPC_ERROR_STREAMING | typeof RPC_ERROR_ENTRY_NOT_FOUND | typeof RPC_ERROR_MODEL_NOT_FOUND | typeof RPC_ERROR_EFFECT_ID_CONFLICT | typeof RPC_ERROR_TRANSCRIPT_UNREADABLE | typeof RPC_ERROR_PROVIDER_UNAVAILABLE | typeof RPC_ERROR_PROVIDER_CREDENTIALS_MISSING | typeof RPC_ERROR_PROVIDER_CREDENTIALS_EXPIRED | typeof RPC_ERROR_NO_MODEL_SELECTED | typeof RPC_ERROR_TURN_CONFLICT | typeof RPC_ERROR_CONTEXT_BUDGET | typeof RPC_ERROR_EVAL_CELL_NOT_FOUND | typeof RPC_ERROR_INVALID_EVAL_CELL_REQUEST | typeof RPC_ERROR_EVAL_CELLS_UNAVAILABLE | typeof RPC_ERROR_NOT_ASSISTANT | typeof RPC_ERROR_NOT_USER | typeof RPC_ERROR_EMPTY_TEXT | typeof RPC_ERROR_UNKNOWN_COMMAND | typeof RPC_ERROR_STALE_LEAF | typeof RPC_ERROR_TURN_ACTIVE | typeof RPC_ERROR_SESSION_BUSY | typeof RPC_ERROR_ATTACHED | typeof RPC_ERROR_INVALID_RELEASE_REASON | typeof RPC_ERROR_RELEASE_UNSUPPORTED | typeof RPC_ERROR_RELEASE_FAILED | typeof RPC_ERROR_HOST_DRAINING | typeof RPC_ERROR_RESPONSE_UNWRITABLE | typeof RPC_ERROR_PROJECT_CWD_MISMATCH;
//# sourceMappingURL=rpc-error-types.d.ts.map