import type { KnowledgeEdgeRecord, KnowledgeNodeKind, KnowledgeNodeRecord, KnowledgeSourceRecord, KnowledgeReferenceKind, KnowledgeIssueUpsertInput } from '../types.js';
import type { HomeGraphKnowledgeTarget, HomeGraphNodeKind, HomeGraphObjectInput, HomeGraphObjectKind, HomeGraphSpaceInput } from './types.js';
export declare const HOME_GRAPH_CONNECTOR_ID = "homeassistant";
export declare function resolveHomeGraphSpace(input?: HomeGraphSpaceInput): {
    readonly spaceId: string;
    readonly installationId: string;
};
export declare function nodeKindForHomeGraphObject(kind: HomeGraphObjectKind | HomeGraphNodeKind): HomeGraphNodeKind;
export declare function objectKindForNodeKind(kind: HomeGraphNodeKind): HomeGraphObjectKind;
export declare function homeGraphSourceId(spaceId: string, kind: string, value: string): string;
export declare function homeGraphNodeId(spaceId: string, kind: string, objectId: string): string;
export declare function homeGraphEdgeId(spaceId: string, fromId: string, relation: string, toId: string): string;
export declare function homeGraphIssueId(spaceId: string, code: string, subjectId: string): string;
export declare function namespacedCanonicalUri(spaceId: string, kind: string, value: string): string;
export declare function buildHomeGraphMetadata(spaceId: string, installationId: string, metadata?: Record<string, unknown>): Record<string, unknown>;
export declare function buildHomeGraphNodeInput(spaceId: string, installationId: string, kind: HomeGraphObjectKind | HomeGraphNodeKind, object: HomeGraphObjectInput): {
    readonly id: string;
    readonly kind: KnowledgeNodeKind;
    readonly slug: string;
    readonly title: string;
    readonly summary?: string | undefined;
    readonly aliases: readonly string[];
    readonly metadata: Record<string, unknown>;
};
export declare function edgeIsActive(edge: KnowledgeEdgeRecord): boolean;
export declare function isGeneratedPageSource(source: KnowledgeSourceRecord): boolean;
export declare function factSourceIds(fact: KnowledgeNodeRecord): string[];
export declare function belongsToSpace(record: {
    readonly metadata?: Record<string, unknown>;
} | undefined | null, spaceId: string): boolean;
export declare function sameHomeAssistantSpace(left: string, right: string): boolean;
export declare function homeAssistantSpaceComponent(spaceId: string): string | undefined;
export declare function targetToReference(target: HomeGraphKnowledgeTarget): {
    readonly kind: KnowledgeReferenceKind;
    readonly id: string;
    readonly nodeKind?: HomeGraphNodeKind | undefined;
};
export declare function buildIssue(spaceId: string, installationId: string, code: string, message: string, subject: {
    readonly nodeId?: string;
    readonly sourceId?: string;
}): KnowledgeIssueUpsertInput;
export declare function stableHash(value: string, length?: number): string;
export declare function uniqueStrings(values: Iterable<string | undefined | null>): string[];
export declare function readRecord(value: unknown): Record<string, unknown>;
export declare function readHomeAssistantMetadataString(node: {
    readonly metadata: Record<string, unknown>;
}, ...keys: readonly string[]): string | undefined;
export declare function normalizeHomeGraphObjectInput(kind: HomeGraphObjectKind | HomeGraphNodeKind, value: HomeGraphObjectInput | Record<string, unknown>): HomeGraphObjectInput;
export declare function readString(value: unknown): string | undefined;
export declare function readStringArray(value: unknown): string[];
export declare function mergeSourceStatus(incoming: KnowledgeSourceRecord['status'], existing: KnowledgeSourceRecord['status'] | undefined): KnowledgeSourceRecord['status'];
//# sourceMappingURL=helpers.d.ts.map