import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { IRemoteAgentHostConnectionInfo } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/remoteAgentHostService"; export declare const COPILOT_CLI_LOCAL_AH_SCHEME = "agent-host-copilotcli"; export declare const COPILOT_CLI_EH_SCHEME = "copilotcli"; /** * Builds the local `events.jsonl` URI under `~/.copilot/session-state//`. * * Used for both the local Agent Host Copilot CLI provider and the * extension-host Copilot CLI provider, which share the same on-disk layout * and the same chat session URI shape (`copilotcli:/`). */ export declare function buildLocalEventsUri(userHome: URI, rawSessionId: string): URI; /** * Builds a `vscode-agent-host://` URI for the `events.jsonl` file inside * the host's user home directory, using the connection's reported * `defaultDirectory` (set from `os.homedir()` on the host during the * AHP handshake). * * The path is joined at the URI-path level using forward slashes, which * works for both POSIX hosts (`/home/me`) and Windows hosts whose * `URI.file(os.homedir()).path` is also forward-slash-rooted (e.g. * `/c:/Users/me`). Returns `undefined` if the host did not report a * usable `defaultDirectory`. */ export declare function buildRemoteEventsUri(connection: IRemoteAgentHostConnectionInfo, rawSessionId: string): URI | undefined; /** * Parses the connection authority out of a remote AH chat session scheme * of the form `remote--copilotcli`. Returns `undefined` for * any other scheme, including the local `copilotcli` scheme. */ export declare function parseRemoteAuthorityFromScheme(scheme: string): string | undefined; export type ResolveEventsUriResult = { readonly kind: "ok"; readonly resource: URI; } | { readonly kind: "no-session"; } | { readonly kind: "unsupported-scheme"; readonly scheme: string; } | { readonly kind: "remote-not-connected"; readonly authority: string; } | { readonly kind: "remote-no-home"; readonly authority: string; }; /** * Pure resolver for tests. Translates a chat session resource into the * `events.jsonl` URI for the corresponding Copilot CLI session, or * returns a structured error. */ export declare function resolveEventsUri(sessionResource: URI | undefined, userHome: URI, getConnectionByAuthority: (authority: string) => IRemoteAgentHostConnectionInfo | undefined): ResolveEventsUriResult;