ProjectsModule · library/project/src/repos/agents.ts:14

AgentsRepo

component

No JSDoc comment in source yet.

API

@Component()
export class AgentsRepo implements AgentIndex {
  @Use() private readonly db!: Db;
  insertOrIgnore(row: AgentRow): void;
  exists(projectId: string, agentId: string): boolean;
  list(projectId: string): AgentRow[];
  delete(projectId: string, agentId: string): void;
  deleteByProject(projectId: string): void;
}

Dependencies & Wiring

Extracted from class decorators
implementsinterfaces
@Userequires (1)
db: Db

Methods (5)

insertOrIgnore

insertOrIgnore(row: AgentRow): void

Idempotent insert: backfills an untracked Agent discovered via directory scan; shared with explicit creation.

@paramrowAgentRow
@returnsvoid

exists

exists(projectId: string, agentId: string): boolean
@paramprojectIdstring
@paramagentIdstring
@returnsboolean

list

list(projectId: string): AgentRow[]
@paramprojectIdstring
@returnsAgentRow[]

delete

delete(projectId: string, agentId: string): void
@paramprojectIdstring
@paramagentIdstring
@returnsvoid

deleteByProject

deleteByProject(projectId: string): void
@paramprojectIdstring
@returnsvoid