aiwg
Version:
Deployment tool and support utility for AI context. Copies agents, skills, commands, rules, and behaviors into the paths each AI platform reads (Claude Code, Codex, Copilot, Cursor, Warp, OpenClaw, and 6 more) so one source of truth works across 10 platfo
40 lines • 2 kB
TypeScript
/**
* Storage Adapter Registry
*
* `resolveStorage(subsystem)` is the consumer-facing entry point. Loads
* `.aiwg/storage.config` lazily, picks the configured backend per
* subsystem, and memoizes the adapter instance for the lifetime of the
* process.
*
* @design @.aiwg/architecture/storage-design.md
* @issue #934
* @issue #953
*/
import type { StorageAdapter, StorageConfig, SubsystemKey } from './types.js';
export { type StorageAdapter, type StorageEntry, type WriteMeta, type SubsystemKey, type BackendType, type BackendConfig, type StorageConfig, SUBSYSTEM_KEYS, BACKEND_TYPES, } from './types.js';
export { loadStorageConfig, storageConfigPath, validateStorageConfig, resolveSubsystemRoot, walkRejectingCredentials, FORBIDDEN_CREDENTIAL_KEYS, DEFAULT_SUBSYSTEM_ROOTS, } from './config.js';
export { FilesystemAdapter } from './backends/fs.js';
export { ObsidianAdapter } from './backends/obsidian.js';
export { LogseqAdapter } from './backends/logseq.js';
export { FortemiAdapter } from './backends/fortemi.js';
export type { McpClientLike, McpClientFactory, FortemiAdapterOptions } from './backends/fortemi.js';
/**
* Initialize or reset the registry for a given project root. Most
* callers use the implicit lazy initialization triggered by
* `resolveStorage()`; explicit init is useful for tests and for the
* `aiwg storage` CLI.
*/
export declare function initStorage(projectRoot?: string): Promise<void>;
/** Reset memoized state. Test-only escape hatch. */
export declare function resetStorage(): void;
/**
* Return the adapter for a subsystem. Loads `.aiwg/storage.config`
* lazily on first call.
*/
export declare function resolveStorage(subsystem: SubsystemKey): Promise<StorageAdapter>;
/**
* Return the loaded config (or null if `.aiwg/storage.config` does not
* exist). Triggers a load if not yet initialized. Used by the CLI.
*/
export declare function getLoadedConfig(projectRoot?: string): Promise<StorageConfig | null>;
//# sourceMappingURL=index.d.ts.map