v2 phase 1: foundation — types, DB layer, logging
Add the v2 data layer: typed interfaces, central DB with migration runner, per-entity CRUD, and agent-runner session DB operations. - src/log.ts: concise message-first logging API - src/types-v2.ts: AgentGroup, MessagingGroup, Session, MessageIn/Out - src/db/: connection (WAL), migration runner, 001-initial schema, CRUD for agent_groups, messaging_groups, sessions, pending_questions - container/agent-runner/src/db/: session DB connection, messages_in reads + status transitions, messages_out writes - 31 new tests, all 277 tests pass Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
37
src/db/index.ts
Normal file
37
src/db/index.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
export { initDb, initTestDb, getDb, closeDb } from './connection.js';
|
||||
export { runMigrations } from './migrations/index.js';
|
||||
export {
|
||||
createAgentGroup,
|
||||
getAgentGroup,
|
||||
getAgentGroupByFolder,
|
||||
getAllAgentGroups,
|
||||
getAdminAgentGroup,
|
||||
updateAgentGroup,
|
||||
deleteAgentGroup,
|
||||
} from './agent-groups.js';
|
||||
export {
|
||||
createMessagingGroup,
|
||||
getMessagingGroup,
|
||||
getMessagingGroupByPlatform,
|
||||
getAllMessagingGroups,
|
||||
updateMessagingGroup,
|
||||
deleteMessagingGroup,
|
||||
createMessagingGroupAgent,
|
||||
getMessagingGroupAgents,
|
||||
getMessagingGroupAgent,
|
||||
updateMessagingGroupAgent,
|
||||
deleteMessagingGroupAgent,
|
||||
} from './messaging-groups.js';
|
||||
export {
|
||||
createSession,
|
||||
getSession,
|
||||
findSession,
|
||||
getSessionsByAgentGroup,
|
||||
getActiveSessions,
|
||||
getRunningSessions,
|
||||
updateSession,
|
||||
deleteSession,
|
||||
createPendingQuestion,
|
||||
getPendingQuestion,
|
||||
deletePendingQuestion,
|
||||
} from './sessions.js';
|
||||
Reference in New Issue
Block a user