No JSDoc comment in source yet.
API
@Component()
export class TraceIndexService implements TraceIndex {
@Use() private readonly paths!: TracePaths;
@Use() readonly repo!: TraceIndexStore;
@Use() private readonly sources?: SessionOrigins;
reconcileAgent(projectId: string, agentId: string, opts: { force?: boolean } = {}): Promise<void>;
async reconcileProject(projectId: string, opts: { force?: boolean } = {}): Promise<void>;
registerImportedFile(args: {
projectId: string;
agentId: string;
sessionId: string;
fileIndex: number;
date: string;
sizeBytes: number;
records: AmspRecord[];
}): void;
removeSession(projectId: string, agentId: string, sessionId: string): void;
removeAgent(projectId: string, agentId: string): void;
removeProject(projectId: string): void;
}Dependencies & Wiring
Extracted from class decoratorsMethods (6)
reconcileAgent
reconcileAgent(projectId: string, agentId: string, opts: { force?: boolean } = {}): Promise<void>Brings one Agent's index in step with disk. Hot path: one root stat, then the
newest date dir — a change there short-circuits — else the remaining N-1 date dirs
concurrently; zero readdir either way. force ignores the mtime gate and diffs
every date dir (the consumers' miss-retry path).
@paramprojectId
string@paramagentId
string@paramopts?
{ force?: boolean }@returns
Promise<void>reconcileProject
async reconcileProject(projectId: string, opts: { force?: boolean } = {}): Promise<void>Reconciles every Agent of a Project (the subagent-pointer resolver's miss path).
@paramprojectId
string@paramopts?
{ force?: boolean }@returns
Promise<void>registerImportedFile
registerImportedFile(args: { projectId: string; agentId: string; sessionId: string; fileIndex: number; date: string; sizeBytes: number; records: AmspRecord[]; }): voidWrite-time registration for the Trace import route: the caller has the file's identity AND parsed records in hand, so the row and facts are stored synchronously with zero additional IO.
@paramargs
{ projectId: string; agentId: string; sessionId: string; fileIndex: number; date: string; sizeBytes: number; records: AmspRecord[]; }@returns
voidremoveSession
removeSession(projectId: string, agentId: string, sessionId: string): voidWrite-time removal for Session deletion (files are being rm'ed by the caller).
@paramprojectId
string@paramagentId
string@paramsessionId
string@returns
voidremoveAgent
removeAgent(projectId: string, agentId: string): voidAgent deletion: its whole tree is going away with it.
@paramprojectId
string@paramagentId
string@returns
voidremoveProject
removeProject(projectId: string): voidProject deletion.
@paramprojectId
string@returns
void