export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; export type AuthPolicy = 'NONE' | 'PLUGIN_WITH_USER_KEY' | 'PLUGIN_OPTIONAL_USER_KEY' | 'USER_TOKEN_REQUIRED'; export type RiskLevel = 'READ_ONLY' | 'WRITE' | 'DANGEROUS'; export interface EndpointRef { method: HttpMethod; path: string; } export interface CommandMeta { id: string; authPolicy: AuthPolicy; endpoint?: EndpointRef; } export declare function isUserTokenOnlyEndpoint(path: string): boolean; export declare function assertCommandSupported(meta: CommandMeta): void; export declare function assertEndpointAllowed(endpoint?: EndpointRef): void; /** * 风险级别由命令语义决定,比按 HTTP 方法推断更稳定。 */ export declare function getCommandRiskLevel(meta: CommandMeta): RiskLevel;