import type { Message, MessageAttachment, ToolDefinition, UsageInfo } from "../../state/protocol/state.js"; import type { CopilotErrorDetail, CopilotToolAvailability, CopilotToolDefer, CopilotUsageDetail } from "./generated/copilotdMetadata.js"; interface IMetadataSource { readonly _meta?: Record; } export declare function readCopilotMessageSource(message: Pick): string | undefined; export declare function isCopilotMessageInternal(message: Pick): boolean; export declare function withCopilotMessageInternal>(message: T): T; export declare function readCopilotModelCategory(source: IMetadataSource): "lightweight" | "versatile" | "powerful" | undefined; export declare function readCopilotErrorDetail(source: IMetadataSource): CopilotErrorDetail | undefined; export declare function readCopilotUsageDetail(source: Pick): CopilotUsageDetail | undefined; export interface IAgentContextUsage { readonly currentTokens: number; readonly tokenLimit: number; readonly messagesLength: number; readonly conversationTokens?: number; readonly systemTokens?: number; readonly toolDefinitionsTokens?: number; } export declare function readCopilotUsageInfo(source: IMetadataSource): Readonly> | undefined; export declare function readCopilotModelCallFailure(source: IMetadataSource): Readonly> | undefined; export declare function readCopilotContext(source: IMetadataSource): Readonly> | undefined; export declare function readCopilotAutoTierSwitchFailure(source: IMetadataSource): Readonly> | undefined; export declare function readCopilotContextUsage(source: IMetadataSource): IAgentContextUsage | undefined; export interface IAgentToolOrigin { readonly kind: string; readonly namespacedName?: string; readonly mcpServerName?: string; readonly mcpToolName?: string; readonly deferLoading?: boolean; } export declare function readCopilotToolOrigin(tool: Pick): IAgentToolOrigin | undefined; export declare function readCopilotToolTelemetry(source: IMetadataSource): Readonly> | undefined; export interface IAgentToolOutputChunk { readonly output: string; readonly isPty: boolean; } export declare function readCopilotToolOutputDelta(source: IMetadataSource): IAgentToolOutputChunk | undefined; export interface IAgentClientToolPreferences { readonly defer?: CopilotToolDefer; readonly availability?: CopilotToolAvailability; } export declare function readCopilotToolDefer(tool: Pick): CopilotToolDefer | undefined; export declare function readCopilotToolAvailability(tool: Pick): CopilotToolAvailability; export declare function withCopilotToolPreferences(tool: T, preferences: IAgentClientToolPreferences | undefined): T; /** The original open payload is retained for lossless attachment round trips. */ export interface IAgentCopilotAttachmentDetail { readonly type: string; readonly raw: Record; readonly text?: string; readonly url?: string; } export declare function readCopilotAttachmentDetail(attachment: Pick): IAgentCopilotAttachmentDetail | undefined; export declare function withCopilotAttachmentDetail(attachment: T, detail: Record): T; export {};