import type { IncomingMessage, ServerResponse } from 'node:http'; import type { DKGAgent, OpWalletsConfig } from '@origintrail-official/dkg-agent'; import type { ExtractionPipelineRegistry } from '@origintrail-official/dkg-core'; import type { ChatMemoryManager, DashboardDB, OperationTracker } from '@origintrail-official/dkg-node-ui'; import type { DkgConfig, loadNetworkConfig } from '../../config.js'; import type { createPublisherControlFromStore, PublisherState } from '../../publisher-runner.js'; import type { ExtractionStatusRecord } from '../../extraction-status.js'; import type { FileStore } from '../../file-store.js'; import type { VectorStore, EmbeddingProvider } from '../../vector-store.js'; import type { CatchupTracker } from '../types.js'; import type { RoutePlugin } from '../plugin-api.js'; import type { AdmissionStatsView } from '../http-utils.js'; export type MemoryGraphLayer = 'wm' | 'swm' | 'vm'; export interface MemoryGraphChangedEvent { contextGraphId: string; layers: MemoryGraphLayer[]; subGraphName?: string; operation: string; source?: string; counts?: { triples?: number; roots?: number; }; clearSharedMemoryAfter?: boolean; dataSynced?: unknown; sharedMemorySynced?: unknown; status?: string; } /** * Generic notifications-pane refresh signal (A5). Broadcast once per scoped * notification write (join_request/approved/rejected + assertion_activity) so * the bell pane re-fetches via a SINGLE SSE listener instead of one per type. * Payload is intentionally minimal — the client always re-reads the scoped * feed, so it only needs to know "something for this CG of kind X happened". */ export interface NotificationSseEvent { contextGraphId: string; type: string; } export interface RequestContext { req: IncomingMessage; res: ServerResponse; agent: DKGAgent; publisherControl: ReturnType; /** Lifecycle-owned runtime and readiness as one correlated state. */ publisherState: PublisherState; config: DkgConfig; startedAt: number; dashDb: DashboardDB; opWallets: OpWalletsConfig; network: Awaited>; tracker: OperationTracker; memoryManager: ChatMemoryManager; bridgeAuthToken: string | undefined; nodeVersion: string; nodeCommit: string; catchupTracker: CatchupTracker; extractionRegistry: ExtractionPipelineRegistry; fileStore: FileStore; extractionStatus: Map; assertionImportLocks: Map>; vectorStore: VectorStore; embeddingProvider: EmbeddingProvider | null; validTokens: Set; apiHost: string; apiPortRef: { value: number; }; routePlugins: RoutePlugin[]; admission: AdmissionStatsView; url: URL; path: string; requestToken: string | undefined; requestAgentAddress: string; emitMemoryGraphChanged?: (event: MemoryGraphChangedEvent) => void; /** A5: broadcast a generic `notification` SSE refresh for the bell pane. */ emitNotification?: (event: NotificationSseEvent) => void; } //# sourceMappingURL=context.d.ts.map