/** * Reader for the permission metadata a remote agent host echoes onto a tool * call that is waiting for approval. * * A remote host describes the pending decision (run a command, read a file, …) * but does not stamp the `_meta.toolKind` rendering hint local agent adapters * provide, so the kind is recovered from here instead. * * Compatibility bridge, not the durable contract: `promptRequest` and * `permissionRequest` are raw Copilot runtime payloads, not protocol fields, so * their shape can change without a version bump and every client has to learn * Copilot internals to render an approval. Delete this file, and its use in * `getToolKind`, once the minimum supported host describes confirmations * natively. */ interface IHasPermissionRequestMeta { readonly _meta?: Record; } /** * The permission kinds that carry a rendering consequence. A remote host * reports more kinds than these; the rest are left unrecognized so they fall * through to the generic tool presentation. */ export declare enum AgentPermissionRequestKind { /** Execute a shell command. */ Commands = "commands", /** Read a single file. */ Read = "read", /** Write a single file. */ Write = "write", /** Open a URL. */ Url = "url" } export interface IAgentPermissionRequestMeta { readonly kind?: AgentPermissionRequestKind; readonly fileName?: string; readonly url?: string; } /** * Reads the recognized permission metadata from a tool call's `_meta` bag. * * Hosts echo the same request as `promptRequest` (the prompt-shaped * projection) and `permissionRequest` (the raw form); older hosts send only * the raw one. */ export declare function readPermissionRequestMeta(source: IHasPermissionRequestMeta): IAgentPermissionRequestMeta; /** Adds the edit diff consumed by Copilot clients without replacing native AHP edits. */ export declare function withPermissionDiff(meta: Record | undefined, diff: string | undefined): Record | undefined; export {};