Move src/ → apps/server/ and packages/web/ → apps/web/ to adopt standard monorepo conventions (apps/ for runnable apps, packages/ for reusable libraries). Update all config files, shared package imports, test fixtures, and documentation to reflect new paths. Key fixes: - Update workspace config to ["apps/*", "packages/*"] - Update tsconfig.json rootDir/include for apps/server/ - Add apps/web/** to vitest exclude list - Update drizzle.config.ts schema path - Fix ensure-schema.ts migration path detection (3 levels up in dev, 2 levels up in dist) - Fix tests/integration/cli-server.test.ts import paths - Update packages/shared imports to apps/server/ paths - Update all docs/ files with new paths
24 lines
600 B
TypeScript
24 lines
600 B
TypeScript
/**
|
|
* Log Chunk Repository Port Interface
|
|
*
|
|
* Port for agent log chunk persistence operations.
|
|
* No FK to agents — chunks survive agent deletion.
|
|
*/
|
|
|
|
import type { AgentLogChunk } from '../schema.js';
|
|
|
|
export interface LogChunkRepository {
|
|
insertChunk(data: {
|
|
agentId: string;
|
|
agentName: string;
|
|
sessionNumber: number;
|
|
content: string;
|
|
}): Promise<void>;
|
|
|
|
findByAgentId(agentId: string): Promise<Pick<AgentLogChunk, 'content' | 'sessionNumber' | 'createdAt'>[]>;
|
|
|
|
deleteByAgentId(agentId: string): Promise<void>;
|
|
|
|
getSessionCount(agentId: string): Promise<number>;
|
|
}
|