Skip to content

HookDbApi

Defined in: hooks.ts:55

Scoped API surface available to server-side hook handlers. Intentionally narrow — handlers should not have full StateDb access.

appendEvent: (sessionId, type, data?, context?) => { created_at: string; event_id: string; } | null

Defined in: hooks.ts:68

string | null | undefined

string

DbFieldValue

EventContext | null

{ created_at: string; event_id: string; } | null


generateRetrospective: (sessionId) => string | null

Defined in: hooks.ts:70

string

string | null


getPushSubscriptionCount: () => number

Defined in: hooks.ts:74

number


proposeLessonFromRetro: (project, section, content, source?) => Lesson | null

Defined in: hooks.ts:69

string | null

string

string

string

Lesson | null


resolveProjectPath: (ref) => string | null

Defined in: hooks.ts:63

string | null | undefined

string | null


resolveProjectSlug: (ref) => string

Defined in: hooks.ts:62

string | null | undefined

string


sendPushToAll: (payload) => Promise<{ cleaned: number; failed: number; sent: number; }>

Defined in: hooks.ts:73

string

string

Record<string, unknown>

string

string

string

Promise<{ cleaned: number; failed: number; sent: number; }>

broadcast(channel, payload?): void

Defined in: hooks.ts:75

string

unknown

void


createSession(opts): Session | null

Defined in: hooks.ts:67

CreateSessionOpts

Session | null


getProjectMemory(projectPath?): string

Defined in: hooks.ts:61

string | null

string


getSession(id): Session | null

Defined in: hooks.ts:58

string

Session | null


getSettings(): Settings

Defined in: hooks.ts:57

Settings


getTask(id): Task | null

Defined in: hooks.ts:59

string

Task | null


getTasks(opts?): Task[]

Defined in: hooks.ts:60

GetTasksOpts

Task[]


updateTask(id, fields): Task | null

Defined in: hooks.ts:66

string

object

Task | null