import type { ArtifactStore } from '../../artifacts/index.js'; import type { KnowledgeStore } from '../store.js'; import type { KnowledgeEdgeRecord, KnowledgeIssueRecord, KnowledgeNodeRecord, KnowledgeSourceRecord } from '../types.js'; import { type HomeGraphReviewResult } from './review.js'; import type { KnowledgeSemanticService } from '../semantic/index.js'; import type { HomeGraphTriageOptions } from './triage.js'; import type { HomeGraphAskInput, HomeGraphAskResult, HomeGraphDevicePassportResult, HomeGraphExport, HomeGraphIngestArtifactInput, HomeGraphIngestNoteInput, HomeGraphIngestResult, HomeGraphIngestUrlInput, HomeGraphLinkInput, HomeGraphLinkResult, HomeGraphUnlinkResult, HomeGraphMapInput, HomeGraphMapResult, HomeGraphProjectionInput, HomeGraphProjectionResult, HomeGraphPageListResult, HomeGraphReindexInput, HomeGraphReindexResult, HomeGraphResetInput, HomeGraphResetResult, HomeGraphReviewInput, HomeGraphSpaceInput, HomeGraphSnapshotInput, HomeGraphStatus, HomeGraphSyncResult } from './types.js'; export declare class HomeGraphService { private readonly store; private readonly artifactStore; private readonly options; private activeReindex; private pendingSyncSelfImprove; private syncSelfImproveControllers; constructor(store: KnowledgeStore, artifactStore: ArtifactStore, options?: { readonly semanticService?: KnowledgeSemanticService; /** * MemoryGovernor admission gate: the HTTP-exposed ingest verbs run the * whole ingestion pipeline (artifact writes, extraction, enrichment), * at the critical tier they refuse with an honest structured reason. */ readonly admitExpensiveWork?: ((label: string) => { allowed: boolean; reason?: string | undefined; }) | undefined; }); /** Refuse expensive work at the critical memory tier (see MemoryGovernor). */ private requireAdmission; dispose(): void; status(input?: { readonly installationId?: string; readonly knowledgeSpaceId?: string; }): Promise; syncSnapshot(input: HomeGraphSnapshotInput): Promise; ingestUrl(input: HomeGraphIngestUrlInput): Promise; ingestNote(input: HomeGraphIngestNoteInput): Promise; ingestArtifact(input: HomeGraphIngestArtifactInput): Promise; linkKnowledge(input: HomeGraphLinkInput): Promise; unlinkKnowledge(input: HomeGraphLinkInput): Promise; ask(input: HomeGraphAskInput): Promise; reindex(input?: HomeGraphReindexInput): Promise; private repairStaleExtractionsForAsk; refreshDevicePassport(input: HomeGraphProjectionInput): Promise; generateRoomPage(input: HomeGraphProjectionInput): Promise; generatePacket(input: HomeGraphProjectionInput): Promise; listIssues(input: HomeGraphSpaceInput & { readonly status?: string | undefined; readonly severity?: string | undefined; readonly code?: string | undefined; readonly limit?: number | undefined; }): Promise<{ readonly ok: true; readonly spaceId: string; readonly issues: readonly KnowledgeIssueRecord[]; }>; reviewFact(input: HomeGraphReviewInput): Promise; listSources(input?: HomeGraphSpaceInput & { readonly limit?: number; }): Promise<{ readonly ok: true; readonly spaceId: string; readonly sources: readonly KnowledgeSourceRecord[]; }>; listPages(input?: HomeGraphSpaceInput & { readonly limit?: number; readonly includeMarkdown?: boolean; }): Promise; listRefinementTasks(input?: HomeGraphSpaceInput & { readonly limit?: number | undefined; readonly state?: string | undefined; readonly subjectId?: string | undefined; readonly gapId?: string | undefined; }): Promise<{ readonly ok: true; readonly spaceId: string; readonly tasks: readonly import("../types.js").KnowledgeRefinementTaskRecord[]; }>; getRefinementTask(input: HomeGraphSpaceInput & { readonly taskId: string; }): Promise<{ readonly ok: true; readonly spaceId: string; readonly task: import("../types.js").KnowledgeRefinementTaskRecord | null; }>; runRefinement(input?: HomeGraphSpaceInput & { readonly gapIds?: readonly string[] | undefined; readonly sourceIds?: readonly string[] | undefined; readonly limit?: number | undefined; readonly maxRunMs?: number | undefined; readonly force?: boolean | undefined; readonly triage?: HomeGraphTriageOptions | boolean | undefined; readonly skipGapRefinement?: boolean | undefined; }): Promise<{ readonly ok: boolean; readonly spaceId: string; readonly error?: string | undefined; readonly result?: Awaited> | undefined; readonly triage?: import("./triage.js").HomeGraphTriageResult | undefined; }>; cancelRefinementTask(input: HomeGraphSpaceInput & { readonly taskId: string; }): Promise<{ ok: boolean; spaceId: string; error: string; task?: never; } | { ok: boolean; spaceId: string; task: import("../types.js").KnowledgeRefinementTaskRecord; error?: never; }>; browse(input?: HomeGraphSpaceInput & { readonly limit?: number; }): Promise<{ readonly ok: true; readonly spaceId: string; readonly nodes: readonly KnowledgeNodeRecord[]; readonly edges: readonly KnowledgeEdgeRecord[]; readonly sources: readonly KnowledgeSourceRecord[]; readonly issues: readonly KnowledgeIssueRecord[]; }>; map(input?: HomeGraphMapInput): Promise; exportSpace(input?: HomeGraphSpaceInput): Promise; importSpace(input: HomeGraphSpaceInput & { readonly data: HomeGraphExport; }): Promise<{ readonly ok: true; readonly spaceId: string; readonly imported: { readonly sources: number; readonly nodes: number; readonly edges: number; readonly issues: number; readonly extractions: number; }; }>; resetSpace(input: HomeGraphResetInput): Promise; private ingestCreatedArtifact; private extractArtifact; private autoLinkExistingSources; private refreshQualityIssues; /** * Start the post-sync self-improvement pump for a Home Graph space. * The pump is intentionally delayed so the foreground sync response can * return before source search, semantic repair, and page refresh work begins. */ private scheduleSyncSelfImprovement; /** Cancel pending or active post-sync improvement work for one space or all spaces. */ private cancelSyncSelfImprovement; /** * Relentlessly repairs gaps discovered during sync until the run budget, * task budget, or cooperative abort signal says to stop. */ private runSyncSelfImprovementPump; private enrichSpaceSources; private enrichAndImproveSource; private requireSelfImprovementRuntime; private reportBackgroundError; } //# sourceMappingURL=service.d.ts.map