export declare const HASNA_KNOWLEDGE_APP_PATH: string; export declare const LEGACY_HASNA_KNOWLEDGE_APP_PATH: string; /** * Stable, unique key for a project-scoped knowledge workspace derived from the * project's resolved cwd. The full absolute path is slugified so two repos with * the same basename never collide, and the key is deterministic for the same * checkout path across runs and machines. */ export declare function projectKey(cwd?: string): string; export interface KnowledgeWorkspace { home: string; configPath: string; jsonStorePath: string; knowledgeDbPath: string; artifactsDir: string; cacheDir: string; exportsDir: string; indexesDir: string; logsDir: string; runsDir: string; schemasDir: string; wikiDir: string; } export interface KnowledgeConfig { version: 1; storage: { type: 'local' | 's3'; artifacts_root: string; s3?: { bucket: string; prefix?: string; region?: string; profile?: string; max_attempts?: number; server_side_encryption?: 'AES256' | 'aws:kms'; kms_key_id?: string; }; }; sources: { preferred_ref: 'open-files'; allowed_schemes: string[]; }; embeddings?: { default_model?: string; dimensions?: number; batch_size?: number; max_parallel_calls?: number; }; providers?: { default_model?: string; aliases?: Record; openai?: { api_key_env?: string; base_url?: string; default_model?: string; }; anthropic?: { api_key_env?: string; base_url?: string; default_model?: string; }; deepseek?: { api_key_env?: string; base_url?: string; default_model?: string; }; }; safety?: { network?: { web_search_enabled?: boolean; s3_reads_enabled?: boolean; allowed_s3_buckets?: string[]; }; redaction?: { enabled?: boolean; }; approvals?: { generated_writes_require_approval?: boolean; }; }; } export declare const EXAMPLE_KNOWLEDGE_CANONICAL: { readonly division: "xyz"; readonly app_type: "opensource"; readonly app: "knowledge"; readonly env: "prod"; readonly local_path: string; readonly s3: { readonly bucket: "example-knowledge-prod"; readonly region: "us-east-1"; readonly profile: "example-infra"; readonly prefix: ".hasna/knowledge"; readonly server_side_encryption: "AES256"; }; readonly secrets: { readonly env: "example/knowledge/prod/env"; readonly aws: "example/knowledge/prod/aws"; readonly s3: "example/knowledge/prod/s3"; readonly rds: any; readonly future_rds: "example/knowledge/prod/rds"; }; readonly source_owner: "open-files"; readonly evidence_doc: "docs/canonical-secrets-bootstrap-2026-06-08.md"; }; export declare function canonicalExampleKnowledgeStorage(): KnowledgeConfig['storage']; export declare function legacyGlobalStorePath(): string; export declare function globalKnowledgeHome(): string; /** * The canonical project-scoped knowledge home: /projects/. * Project-scoped stores live in a per-project sub-root of the knowledge app's * own home (the effective data home resolved through @hasna/paths — legacy * `~/.hasna/knowledge` until the XDG data home is adopted) rather than inside * the checked-out repository. An explicit `home` base (used by tests to inject * an isolated home) keeps the legacy `~/.hasna/knowledge/projects/` * construction; production callers use the resolver-resolved knowledge home. */ export declare function projectKnowledgeHome(cwd?: string, home?: string | undefined): string; /** * The previous project-scoped knowledge home: /.hasna/knowledge. This is * the pre-canonical default that a one-time migration moves into * ~/.hasna/knowledge/projects/. */ export declare function previousProjectKnowledgeHome(cwd?: string): string; export declare function legacyGlobalKnowledgeHome(): string; export declare function legacyProjectKnowledgeHome(cwd?: string): string; export declare function resolveLegacyScopedWorkspace(scope: string | undefined, cwd?: string): KnowledgeWorkspace; export declare function workspaceForHome(home: string): KnowledgeWorkspace; export declare function defaultKnowledgeConfig(): KnowledgeConfig; export declare function ensureKnowledgeWorkspace(home: string): KnowledgeWorkspace; export declare function resolveScopedWorkspace(scope: string | undefined, cwd?: string): KnowledgeWorkspace; export declare function ensureParentDir(path: string): void; export declare function readKnowledgeConfig(path: string): KnowledgeConfig; export declare function writeKnowledgeConfig(path: string, config: KnowledgeConfig): void;