import type { KnowledgeEdgeRecord, KnowledgeExtractionRecord, KnowledgeIssueRecord, KnowledgeNodeRecord, KnowledgeSourceRecord } from './types.js';
export type KnowledgeSpaceId = string;
export declare const DEFAULT_KNOWLEDGE_SPACE_ID = "default";
export declare const HOME_ASSISTANT_KNOWLEDGE_SPACE_PREFIX = "homeassistant:";
export declare const PROJECT_KNOWLEDGE_SPACE_PREFIX = "project:";
export type KnowledgeSpaceBackedRecord = KnowledgeSourceRecord | KnowledgeNodeRecord | KnowledgeEdgeRecord | KnowledgeIssueRecord | KnowledgeExtractionRecord | {
    readonly metadata?: Record<string, unknown>;
};
export interface KnowledgeSpaceScopeInput {
    readonly knowledgeSpaceId?: string | undefined;
    readonly includeAllSpaces?: boolean | undefined;
}
export declare function normalizeKnowledgeSpaceId(value?: string | null): KnowledgeSpaceId;
export declare function homeAssistantKnowledgeSpaceId(installationId?: string | null): KnowledgeSpaceId;
export declare function normalizeHomeAssistantInstallationId(value?: string | null): string;
export declare function isHomeAssistantKnowledgeSpace(spaceId: string): boolean;
export declare function projectKnowledgeSpaceId(projectId?: string | null): KnowledgeSpaceId;
export declare function normalizeProjectId(value?: string | null): string;
export declare function isProjectKnowledgeSpace(spaceId: string): boolean;
export declare function knowledgeSpaceMetadata(spaceId: string, metadata?: Record<string, unknown>): Record<string, unknown>;
export declare function withKnowledgeSpace<T extends {
    readonly metadata?: Record<string, unknown>;
}>(input: T, spaceId: string): T;
export declare function getKnowledgeSpaceId(input: KnowledgeSpaceBackedRecord | Record<string, unknown> | undefined | null): KnowledgeSpaceId;
export declare function getExplicitKnowledgeSpaceId(input: KnowledgeSpaceBackedRecord | Record<string, unknown> | undefined | null): KnowledgeSpaceId | null;
export declare function isInKnowledgeSpace(input: KnowledgeSpaceBackedRecord | undefined | null, spaceId: string): boolean;
export declare function resolveKnowledgeSpaceScope(input?: KnowledgeSpaceScopeInput): KnowledgeSpaceId | null;
export declare function isInKnowledgeSpaceScope(input: KnowledgeSpaceBackedRecord | undefined | null, scope?: KnowledgeSpaceScopeInput): boolean;
export declare function ensureKnowledgeSpaceMetadata(metadata?: Record<string, unknown>, fallbackSpaceId?: string): Record<string, unknown>;
export declare function normalizeSpaceComponent(value?: string | null): string;
//# sourceMappingURL=spaces.d.ts.map