/** * Per-Agent Workspace Isolation * * Each registered agent gets its own working memory partition within the * shared SQLite database. Agent-specific context stays isolated; shared * memories require explicit cross-agent promotion. * * Inspired by Clawe's per-agent isolated workspaces. */ import Database from 'better-sqlite3'; export interface AgentMemoryPartition { agentId: string; agentName: string; entryCount: number; lastActivity: string; } export interface AgentScopedEntry { id: number; agentId: string; timestamp: string; type: string; content: string; importance: number; shared: boolean; } /** * Ensure the agent-scoped memory table exists. */ export declare function ensureAgentScopedSchema(db: Database.Database): void; export declare class AgentScopedMemory { private db; constructor(dbPath: string); /** * Store a memory scoped to a specific agent. */ store(agentId: string, content: string, type?: string, importance?: number): number; /** * Query memories for a specific agent (includes shared memories). */ query(agentId: string, search: string, limit?: number): AgentScopedEntry[]; /** * Get all memories for a specific agent (includes shared). */ getForAgent(agentId: string, limit?: number): AgentScopedEntry[]; /** * Promote a memory to shared (visible to all agents). */ share(entryId: number): void; /** * Unshare a memory (make agent-private again). */ unshare(entryId: number): void; /** * Get partition statistics per agent. */ getPartitions(): AgentMemoryPartition[]; /** * Count memories for a specific agent. */ countForAgent(agentId: string): number; /** * Delete all memories for a specific agent (used on deregister). */ clearAgent(agentId: string): number; close(): void; } //# sourceMappingURL=agent-scoped-memory.d.ts.map