/** * BSO M9-4 — skillfm-guard → sidecar HTTP client * * Refs: docs/prd/PRD-BSO-M9-HARNESS-HOOKS.md §3.5 * * hook 进程生命短(几十毫秒),对 sidecar 有严格的"秒级响应 + fail-open"要求: * - 超时 (default 500ms) → 降级放行(exit 0)+ stderr warn * - 网络错误 / sidecar 不在 → 降级放行 * - 仅在 sidecar 明确返回 412 时才阻断(exit 2) */ export interface SidecarEndpoint { url: string; port: number; } export declare function readSidecarEndpoint(): SidecarEndpoint | null; export interface GuardCheckInput { session_id: string; tool?: string; harness?: string; } export interface GuardCheckResponse { status: number; body: unknown; } /** * GET /internal/guard/check — fail-open on any error */ export declare function callGuardCheck(endpoint: SidecarEndpoint, input: GuardCheckInput, timeoutMs?: number): Promise; /** * POST /internal/guard/session-start */ export declare function callGuardSessionStart(endpoint: SidecarEndpoint, payload: { session_id: string; harness?: string; cwd?: string; }, timeoutMs?: number): Promise; /** * POST /internal/guard/post-tool-use */ export declare function callGuardPostToolUse(endpoint: SidecarEndpoint, payload: { session_id: string; tool?: string; harness?: string; outcome?: 'ok' | 'error'; }, timeoutMs?: number): Promise; //# sourceMappingURL=sidecar-client.d.ts.map