import type { Database } from "../client.js"; export declare function inferCategory(toolName: string): string; export declare function inferAccessPattern(toolName: string): "read" | "write" | "admin" | "unknown"; export declare function observationQueries(db: Database): { /** * Record a tool call observation. */ record(data: { agentId: string; sessionKey?: string; toolName: string; params?: Record; phase: "before" | "after"; result?: unknown; error?: string; durationMs?: number; blocked?: boolean; blockReason?: string; tenantId?: string; }): Promise; /** * Upsert an agent permission entry based on observed tool call. */ upsertPermission(data: { agentId: string; toolName: string; category: string; accessPattern: string; params?: Record; hasError: boolean; tenantId: string; }): Promise; /** * Get recent observations, optionally filtered by agentId. */ findRecent(opts?: { agentId?: string; limit?: number; tenantId?: string; }): Promise; /** * Get the aggregated permission profile for an agent. */ getPermissions(agentId: string, tenantId?: string): Promise; /** * Get permissions for all agents (overview). */ getAllPermissions(tenantId?: string): Promise; /** * Find first-seen tool calls (anomalies) — permissions with callCount = 1. */ findAnomalies(tenantId?: string, limit?: number): Promise; /** * Get observation count summary per agent. */ summary(tenantId?: string): Promise; }; //# sourceMappingURL=observations.d.ts.map