@fractary/codex 0.12.16 → 0.12.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -2399,6 +2399,114 @@ declare class HealthChecker {
2399
2399
  }
2400
2400
  declare function createHealthChecker(options?: HealthCheckerOptions): HealthChecker;
2401
2401
 
2402
+ type MemoryType = 'troubleshooting' | 'architectural-decision' | 'performance' | 'pattern' | 'integration' | 'convention';
2403
+ type MemoryStatus = 'draft' | 'unverified' | 'verified' | 'deprecated';
2404
+ declare const MEMORY_TYPE_PREFIXES: Record<MemoryType, string>;
2405
+ interface MemoryFrontmatter {
2406
+ title: string;
2407
+ description: string;
2408
+ tags?: string[];
2409
+ visibility?: 'public' | 'internal' | 'private';
2410
+ created: string;
2411
+ updated?: string;
2412
+ codex_sync_include?: string[];
2413
+ codex_sync_exclude?: string[];
2414
+ memory_type: MemoryType;
2415
+ memory_id: string;
2416
+ category?: string;
2417
+ severity?: 'low' | 'medium' | 'high' | 'critical';
2418
+ status: MemoryStatus;
2419
+ symptoms?: string[];
2420
+ keywords?: string[];
2421
+ agents?: string[];
2422
+ phases?: string[];
2423
+ languages?: string[];
2424
+ frameworks?: string[];
2425
+ success_count?: number;
2426
+ last_used?: string;
2427
+ usage_count?: number;
2428
+ confidence?: number;
2429
+ last_audited?: string;
2430
+ deprecated_reason?: string;
2431
+ superseded_by?: string;
2432
+ id?: string;
2433
+ verified?: boolean;
2434
+ phase?: string;
2435
+ agent?: string;
2436
+ }
2437
+ interface MemoryIndexEntry {
2438
+ file_path: string;
2439
+ mtime: string;
2440
+ source: 'local' | string;
2441
+ frontmatter: MemoryFrontmatter;
2442
+ }
2443
+ interface MemoryIndex {
2444
+ version: number;
2445
+ built_at: string;
2446
+ entries: MemoryIndexEntry[];
2447
+ }
2448
+ interface MemorySearchQuery {
2449
+ text?: string;
2450
+ memory_type?: MemoryType;
2451
+ category?: string;
2452
+ phase?: string;
2453
+ agent?: string;
2454
+ tags?: string[];
2455
+ status?: MemoryStatus;
2456
+ limit?: number;
2457
+ }
2458
+ interface MemorySearchResult {
2459
+ entry: MemoryIndexEntry;
2460
+ score: number;
2461
+ source: 'local' | string;
2462
+ filePath: string;
2463
+ }
2464
+ interface MemoryWriteOptions {
2465
+ memory_type: MemoryType;
2466
+ title: string;
2467
+ description: string;
2468
+ body: string;
2469
+ frontmatter: Partial<MemoryFrontmatter>;
2470
+ template?: string;
2471
+ }
2472
+ interface MemoryWriteResult {
2473
+ memory_id: string;
2474
+ file_path: string;
2475
+ deduplicated: boolean;
2476
+ existing_id?: string;
2477
+ }
2478
+ interface MemoryConfig {
2479
+ memoryDir: string;
2480
+ cacheDir: string;
2481
+ syncedMemoryPatterns: string[];
2482
+ }
2483
+ declare const DEFAULT_MEMORY_CONFIG: MemoryConfig;
2484
+
2485
+ declare class MemorySearcher {
2486
+ private config;
2487
+ private projectRoot;
2488
+ constructor(projectRoot: string, config?: Partial<MemoryConfig>);
2489
+ search(query: MemorySearchQuery): MemorySearchResult[];
2490
+ private calculateRelevanceScore;
2491
+ private loadOrRebuildIndex;
2492
+ private isIndexStale;
2493
+ private rebuildIndex;
2494
+ private indexFile;
2495
+ invalidateIndex(): void;
2496
+ }
2497
+
2498
+ declare class MemoryWriter {
2499
+ private config;
2500
+ private projectRoot;
2501
+ private searcher;
2502
+ constructor(projectRoot: string, config?: Partial<MemoryConfig>);
2503
+ write(options: MemoryWriteOptions): MemoryWriteResult;
2504
+ update(memoryId: string, changes: Partial<MemoryFrontmatter>): void;
2505
+ deprecate(memoryId: string, reason: string, supersededBy?: string): void;
2506
+ private checkDuplicate;
2507
+ private findMemoryFile;
2508
+ }
2509
+
2402
2510
  interface CodexClientOptions {
2403
2511
  configPath?: string;
2404
2512
  cacheDir?: string;
@@ -2444,4 +2552,4 @@ declare class CodexClient {
2444
2552
  }
2445
2553
  declare function createCodexClient(options?: CodexClientOptions): Promise<CodexClient>;
2446
2554
 
2447
- export { type ArchiveConfig, type ArtifactType, type AutoSyncPattern, AutoSyncPatternSchema, BUILT_IN_TYPES, CODEX_DIRECTORIES, CODEX_URI_PREFIX, CONFIG_SCHEMA_VERSION, type CacheEntry, type CacheEntryInfo, type CacheEntryMetadata, type CacheEntryStatus, type CacheLookupResult, CacheManager, type CacheManagerConfig, CachePersistence, type CachePersistenceOptions, type CacheStats, type ClientFetchOptions, type ClientFetchResult, CodexClient, type CodexClientOptions, type CodexConfig, CodexConfigSchema, CodexError, type CodexInitOptions, type CodexInitResult, type CodexUpdateOptions, type CodexUpdateResult, type CodexValidateResult, type CodexYamlConfig, CommonRules, type ConfigInitOptions, type ConfigInitResult, ConfigManager, ConfigurationError, type ConversionOptions, type ConvertedReference, type CustomSyncDestination, type CustomTypeConfig$1 as CustomTypeConfig, CustomTypeSchema, DEFAULT_CACHE_DIR, DEFAULT_FETCH_OPTIONS, DEFAULT_FRACTARY_GITIGNORE, DEFAULT_GLOBAL_EXCLUDES, DEFAULT_MIGRATION_OPTIONS, DEFAULT_PERMISSION_CONFIG, DEFAULT_SYNC_CONFIG, DEFAULT_TYPE, type DirectionalSyncConfig, type DirectoryStructureResult, type DiscoverCodexRepoResult, type EvaluationResult, type EvaluationSummary, type ExpandEnvOptions, type FetchOptions, type FetchResult, type FileConfig, type FileInfo, type FilePluginConfig, FilePluginFileNotFoundError, type FilePluginFileNotFoundErrorOptions, FilePluginStorage, type FilePluginStorageOptions, type FileSourceConfig, type FileSyncStatus, type GenerateSyncConfigOptions, GitHubStorage, type GitHubStorageOptions, type GitignoreResult, type HealthCheck, HealthChecker, type HealthCheckerOptions, type HealthConfig, type HealthResult, type HealthStatus, type HealthSummary, HttpStorage, type HttpStorageOptions, LEGACY_PATTERNS, LEGACY_REF_PREFIX, type LegacyAutoSyncPattern, type LegacyCodexConfig, type ListEntriesOptions, type ListEntriesResult, type LoadConfigOptions, LocalStorage, type LocalStorageOptions, type McpInstallResult, type Metadata, MetadataSchema, type MigrationChange, type MigrationOptions, type MigrationResult, type ModernCodexConfig, type ModernSyncPattern, type NameValidationResult, PERMISSION_LEVEL_ORDER, type ParseMetadataOptions, type ParseOptions, type ParseResult, type ParsedReference, type PermissionAction, type PermissionConfig, type PermissionContext, PermissionDeniedError, type PermissionLevel$1 as PermissionLevel, PermissionManager, type PermissionManagerConfig, type PermissionResult, type PermissionRule$1 as PermissionRule, type PermissionScope, type PlanStats, type ReadConfigOptions, type ReferenceConversionResult, type RemoteConfig, type ResolveOptions, type ResolveOrgOptions, type ResolvedReference, STANDARD_DIRECTORIES, SYNC_PATTERN_PRESETS, type CodexConfig$1 as SchemaCodexConfig, type SerializedCacheEntry, type ShouldSyncOptions, StorageManager, type StorageManagerConfig, type StorageProvider, type StorageProviderConfig$1 as StorageProviderConfig, type StorageProviderInfo, type StorageProviderType$1 as StorageProviderType, type SyncConfig$1 as SyncConfig, type SyncDirection, SyncManager, type SyncManagerConfig, type SyncManifest, type SyncManifestEntry, type SyncOperation, type SyncOptions, type SyncPlan, type SyncPreset, type SyncPresetConfig, type SyncResult, type SyncRule$1 as SyncRule, type SyncRules, SyncRulesSchema, TTL, TypeRegistry, type TypeRegistryOptions, type TypesConfig$1 as TypesConfig, TypesConfigSchema, type UnifiedConfig$1 as UnifiedConfig, ValidationError, type ValidationIssue, type VersionDetectionResult, type CacheConfig as YamlCacheConfig, type CustomTypeConfig as YamlCustomTypeConfig, type GitHubStorageConfig as YamlGitHubStorageConfig, type HttpStorageConfig as YamlHttpStorageConfig, type LocalStorageConfig as YamlLocalStorageConfig, type McpConfig as YamlMcpConfig, type PermissionLevel as YamlPermissionLevel, type PermissionRule as YamlPermissionRule, type PermissionsConfig as YamlPermissionsConfig, type S3StorageConfig as YamlS3StorageConfig, type StorageProviderConfig as YamlStorageProviderConfig, type StorageProviderType as YamlStorageProviderType, type SyncConfig as YamlSyncConfig, type SyncRule as YamlSyncRule, type TypesConfig as YamlTypesConfig, type UnifiedConfig as YamlUnifiedConfig, buildUri, calculateCachePath, calculateContentHash, convertLegacyReference, convertLegacyReferences, convertToUri, createCacheEntry, createCacheManager, createCachePersistence, createCodexClient, createConfigManager, createDefaultRegistry, createEmptyModernConfig, createEmptySyncPlan, createGitHubStorage, createHealthChecker, createHttpStorage, createLocalStorage, createPermissionManager, createRule, createRulesFromPatterns, createStorageManager, createSyncManager, createSyncPlan, deserializeCacheEntry, detectContentType, detectCurrentProject, detectOrganizationFromGit, detectProjectName, detectVersion, discoverCodexRepo, ensureCachePathIgnored, ensureDirectoryStructure, estimateSyncTime, evaluatePath, evaluatePaths, evaluatePatterns, evaluatePermission, evaluatePermissions, expandEnvVars, expandEnvVarsInConfig, extendType, extractEnvVarNames, extractOrgFromRepoName, extractRawFrontmatter, filterByPatterns, filterByPermission, filterPlanOperations, filterSyncablePaths, findLegacyReferences, formatBytes, formatDuration, formatPlanSummary, formatSeconds, generateCodexSection, generateMigrationReport, generateReferenceMigrationSummary, generateSyncConfigFromPreset, generateUnifiedConfig, getBuiltInType, getBuiltInTypeNames, getCacheEntryAge, getCacheEntryStatus, getCurrentContext, getCustomSyncDestinations, getDefaultCacheManager, getDefaultConfig, getDefaultDirectories, getDefaultPermissionManager, getDefaultRules, getDefaultStorageManager, getDirectory, getExtension, getFilename, getMigrationRequirements, getPlanStats, getRelativeCachePath, getRemainingTtl, getSyncPreset, getSyncPresetNames, getTargetRepos, hasContentChanged, hasEnvVars, hasFrontmatter, hasLegacyReferences, hasPermission as hasPermissionLevel, installMcpServer, isBuiltInType, isCacheEntryFresh, isCacheEntryValid, isCurrentProjectUri, isLegacyConfig, isLegacyReference, isModernConfig, isAllowed as isPermissionAllowed, isUnifiedConfig, isValidDuration, isValidSize, isValidUri, levelGrants, loadConfig, loadCustomTypes, matchAnyPattern, matchPattern, maxLevel, mergeFetchOptions, mergeRules, mergeTypes, mergeUnifiedConfigs, migrateConfig, migrateFileReferences, minLevel, needsMigration, normalizeCachePath, parseCustomDestination, parseDuration, parseMetadata, parseReference, parseSize, parseTtl, readCodexConfig, readUnifiedConfig$1 as readUnifiedConfig, readUnifiedConfig as readYamlUnifiedConfig, resolveOrganization, resolveReference, resolveReferences, ruleMatchesAction, ruleMatchesContext, ruleMatchesPath, sanitizeForS3BucketName, sanitizePath, serializeCacheEntry, setDefaultCacheManager, setDefaultPermissionManager, setDefaultStorageManager, shouldSyncToRepo, substitutePatternPlaceholders, summarizeEvaluations, touchCacheEntry, validateCustomTypes, validateMetadata, validateMigratedConfig, validateNameFormat, validateOrg, validateOrganizationName, validatePath, validateRules as validatePermissionRules, validateProject, validateRepositoryName, validateRules$1 as validateRules, validateUri, writeUnifiedConfig };
2555
+ export { type ArchiveConfig, type ArtifactType, type AutoSyncPattern, AutoSyncPatternSchema, BUILT_IN_TYPES, CODEX_DIRECTORIES, CODEX_URI_PREFIX, CONFIG_SCHEMA_VERSION, type CacheEntry, type CacheEntryInfo, type CacheEntryMetadata, type CacheEntryStatus, type CacheLookupResult, CacheManager, type CacheManagerConfig, CachePersistence, type CachePersistenceOptions, type CacheStats, type ClientFetchOptions, type ClientFetchResult, CodexClient, type CodexClientOptions, type CodexConfig, CodexConfigSchema, CodexError, type CodexInitOptions, type CodexInitResult, type CodexUpdateOptions, type CodexUpdateResult, type CodexValidateResult, type CodexYamlConfig, CommonRules, type ConfigInitOptions, type ConfigInitResult, ConfigManager, ConfigurationError, type ConversionOptions, type ConvertedReference, type CustomSyncDestination, type CustomTypeConfig$1 as CustomTypeConfig, CustomTypeSchema, DEFAULT_CACHE_DIR, DEFAULT_FETCH_OPTIONS, DEFAULT_FRACTARY_GITIGNORE, DEFAULT_GLOBAL_EXCLUDES, DEFAULT_MEMORY_CONFIG, DEFAULT_MIGRATION_OPTIONS, DEFAULT_PERMISSION_CONFIG, DEFAULT_SYNC_CONFIG, DEFAULT_TYPE, type DirectionalSyncConfig, type DirectoryStructureResult, type DiscoverCodexRepoResult, type EvaluationResult, type EvaluationSummary, type ExpandEnvOptions, type FetchOptions, type FetchResult, type FileConfig, type FileInfo, type FilePluginConfig, FilePluginFileNotFoundError, type FilePluginFileNotFoundErrorOptions, FilePluginStorage, type FilePluginStorageOptions, type FileSourceConfig, type FileSyncStatus, type GenerateSyncConfigOptions, GitHubStorage, type GitHubStorageOptions, type GitignoreResult, type HealthCheck, HealthChecker, type HealthCheckerOptions, type HealthConfig, type HealthResult, type HealthStatus, type HealthSummary, HttpStorage, type HttpStorageOptions, LEGACY_PATTERNS, LEGACY_REF_PREFIX, type LegacyAutoSyncPattern, type LegacyCodexConfig, type ListEntriesOptions, type ListEntriesResult, type LoadConfigOptions, LocalStorage, type LocalStorageOptions, MEMORY_TYPE_PREFIXES, type McpInstallResult, type MemoryConfig, type MemoryFrontmatter, type MemoryIndex, type MemoryIndexEntry, type MemorySearchQuery, type MemorySearchResult, MemorySearcher, type MemoryStatus, type MemoryType, type MemoryWriteOptions, type MemoryWriteResult, MemoryWriter, type Metadata, MetadataSchema, type MigrationChange, type MigrationOptions, type MigrationResult, type ModernCodexConfig, type ModernSyncPattern, type NameValidationResult, PERMISSION_LEVEL_ORDER, type ParseMetadataOptions, type ParseOptions, type ParseResult, type ParsedReference, type PermissionAction, type PermissionConfig, type PermissionContext, PermissionDeniedError, type PermissionLevel$1 as PermissionLevel, PermissionManager, type PermissionManagerConfig, type PermissionResult, type PermissionRule$1 as PermissionRule, type PermissionScope, type PlanStats, type ReadConfigOptions, type ReferenceConversionResult, type RemoteConfig, type ResolveOptions, type ResolveOrgOptions, type ResolvedReference, STANDARD_DIRECTORIES, SYNC_PATTERN_PRESETS, type CodexConfig$1 as SchemaCodexConfig, type SerializedCacheEntry, type ShouldSyncOptions, StorageManager, type StorageManagerConfig, type StorageProvider, type StorageProviderConfig$1 as StorageProviderConfig, type StorageProviderInfo, type StorageProviderType$1 as StorageProviderType, type SyncConfig$1 as SyncConfig, type SyncDirection, SyncManager, type SyncManagerConfig, type SyncManifest, type SyncManifestEntry, type SyncOperation, type SyncOptions, type SyncPlan, type SyncPreset, type SyncPresetConfig, type SyncResult, type SyncRule$1 as SyncRule, type SyncRules, SyncRulesSchema, TTL, TypeRegistry, type TypeRegistryOptions, type TypesConfig$1 as TypesConfig, TypesConfigSchema, type UnifiedConfig$1 as UnifiedConfig, ValidationError, type ValidationIssue, type VersionDetectionResult, type CacheConfig as YamlCacheConfig, type CustomTypeConfig as YamlCustomTypeConfig, type GitHubStorageConfig as YamlGitHubStorageConfig, type HttpStorageConfig as YamlHttpStorageConfig, type LocalStorageConfig as YamlLocalStorageConfig, type McpConfig as YamlMcpConfig, type PermissionLevel as YamlPermissionLevel, type PermissionRule as YamlPermissionRule, type PermissionsConfig as YamlPermissionsConfig, type S3StorageConfig as YamlS3StorageConfig, type StorageProviderConfig as YamlStorageProviderConfig, type StorageProviderType as YamlStorageProviderType, type SyncConfig as YamlSyncConfig, type SyncRule as YamlSyncRule, type TypesConfig as YamlTypesConfig, type UnifiedConfig as YamlUnifiedConfig, buildUri, calculateCachePath, calculateContentHash, convertLegacyReference, convertLegacyReferences, convertToUri, createCacheEntry, createCacheManager, createCachePersistence, createCodexClient, createConfigManager, createDefaultRegistry, createEmptyModernConfig, createEmptySyncPlan, createGitHubStorage, createHealthChecker, createHttpStorage, createLocalStorage, createPermissionManager, createRule, createRulesFromPatterns, createStorageManager, createSyncManager, createSyncPlan, deserializeCacheEntry, detectContentType, detectCurrentProject, detectOrganizationFromGit, detectProjectName, detectVersion, discoverCodexRepo, ensureCachePathIgnored, ensureDirectoryStructure, estimateSyncTime, evaluatePath, evaluatePaths, evaluatePatterns, evaluatePermission, evaluatePermissions, expandEnvVars, expandEnvVarsInConfig, extendType, extractEnvVarNames, extractOrgFromRepoName, extractRawFrontmatter, filterByPatterns, filterByPermission, filterPlanOperations, filterSyncablePaths, findLegacyReferences, formatBytes, formatDuration, formatPlanSummary, formatSeconds, generateCodexSection, generateMigrationReport, generateReferenceMigrationSummary, generateSyncConfigFromPreset, generateUnifiedConfig, getBuiltInType, getBuiltInTypeNames, getCacheEntryAge, getCacheEntryStatus, getCurrentContext, getCustomSyncDestinations, getDefaultCacheManager, getDefaultConfig, getDefaultDirectories, getDefaultPermissionManager, getDefaultRules, getDefaultStorageManager, getDirectory, getExtension, getFilename, getMigrationRequirements, getPlanStats, getRelativeCachePath, getRemainingTtl, getSyncPreset, getSyncPresetNames, getTargetRepos, hasContentChanged, hasEnvVars, hasFrontmatter, hasLegacyReferences, hasPermission as hasPermissionLevel, installMcpServer, isBuiltInType, isCacheEntryFresh, isCacheEntryValid, isCurrentProjectUri, isLegacyConfig, isLegacyReference, isModernConfig, isAllowed as isPermissionAllowed, isUnifiedConfig, isValidDuration, isValidSize, isValidUri, levelGrants, loadConfig, loadCustomTypes, matchAnyPattern, matchPattern, maxLevel, mergeFetchOptions, mergeRules, mergeTypes, mergeUnifiedConfigs, migrateConfig, migrateFileReferences, minLevel, needsMigration, normalizeCachePath, parseCustomDestination, parseDuration, parseMetadata, parseReference, parseSize, parseTtl, readCodexConfig, readUnifiedConfig$1 as readUnifiedConfig, readUnifiedConfig as readYamlUnifiedConfig, resolveOrganization, resolveReference, resolveReferences, ruleMatchesAction, ruleMatchesContext, ruleMatchesPath, sanitizeForS3BucketName, sanitizePath, serializeCacheEntry, setDefaultCacheManager, setDefaultPermissionManager, setDefaultStorageManager, shouldSyncToRepo, substitutePatternPlaceholders, summarizeEvaluations, touchCacheEntry, validateCustomTypes, validateMetadata, validateMigratedConfig, validateNameFormat, validateOrg, validateOrganizationName, validatePath, validateRules as validatePermissionRules, validateProject, validateRepositoryName, validateRules$1 as validateRules, validateUri, writeUnifiedConfig };
package/dist/index.d.ts CHANGED
@@ -2399,6 +2399,114 @@ declare class HealthChecker {
2399
2399
  }
2400
2400
  declare function createHealthChecker(options?: HealthCheckerOptions): HealthChecker;
2401
2401
 
2402
+ type MemoryType = 'troubleshooting' | 'architectural-decision' | 'performance' | 'pattern' | 'integration' | 'convention';
2403
+ type MemoryStatus = 'draft' | 'unverified' | 'verified' | 'deprecated';
2404
+ declare const MEMORY_TYPE_PREFIXES: Record<MemoryType, string>;
2405
+ interface MemoryFrontmatter {
2406
+ title: string;
2407
+ description: string;
2408
+ tags?: string[];
2409
+ visibility?: 'public' | 'internal' | 'private';
2410
+ created: string;
2411
+ updated?: string;
2412
+ codex_sync_include?: string[];
2413
+ codex_sync_exclude?: string[];
2414
+ memory_type: MemoryType;
2415
+ memory_id: string;
2416
+ category?: string;
2417
+ severity?: 'low' | 'medium' | 'high' | 'critical';
2418
+ status: MemoryStatus;
2419
+ symptoms?: string[];
2420
+ keywords?: string[];
2421
+ agents?: string[];
2422
+ phases?: string[];
2423
+ languages?: string[];
2424
+ frameworks?: string[];
2425
+ success_count?: number;
2426
+ last_used?: string;
2427
+ usage_count?: number;
2428
+ confidence?: number;
2429
+ last_audited?: string;
2430
+ deprecated_reason?: string;
2431
+ superseded_by?: string;
2432
+ id?: string;
2433
+ verified?: boolean;
2434
+ phase?: string;
2435
+ agent?: string;
2436
+ }
2437
+ interface MemoryIndexEntry {
2438
+ file_path: string;
2439
+ mtime: string;
2440
+ source: 'local' | string;
2441
+ frontmatter: MemoryFrontmatter;
2442
+ }
2443
+ interface MemoryIndex {
2444
+ version: number;
2445
+ built_at: string;
2446
+ entries: MemoryIndexEntry[];
2447
+ }
2448
+ interface MemorySearchQuery {
2449
+ text?: string;
2450
+ memory_type?: MemoryType;
2451
+ category?: string;
2452
+ phase?: string;
2453
+ agent?: string;
2454
+ tags?: string[];
2455
+ status?: MemoryStatus;
2456
+ limit?: number;
2457
+ }
2458
+ interface MemorySearchResult {
2459
+ entry: MemoryIndexEntry;
2460
+ score: number;
2461
+ source: 'local' | string;
2462
+ filePath: string;
2463
+ }
2464
+ interface MemoryWriteOptions {
2465
+ memory_type: MemoryType;
2466
+ title: string;
2467
+ description: string;
2468
+ body: string;
2469
+ frontmatter: Partial<MemoryFrontmatter>;
2470
+ template?: string;
2471
+ }
2472
+ interface MemoryWriteResult {
2473
+ memory_id: string;
2474
+ file_path: string;
2475
+ deduplicated: boolean;
2476
+ existing_id?: string;
2477
+ }
2478
+ interface MemoryConfig {
2479
+ memoryDir: string;
2480
+ cacheDir: string;
2481
+ syncedMemoryPatterns: string[];
2482
+ }
2483
+ declare const DEFAULT_MEMORY_CONFIG: MemoryConfig;
2484
+
2485
+ declare class MemorySearcher {
2486
+ private config;
2487
+ private projectRoot;
2488
+ constructor(projectRoot: string, config?: Partial<MemoryConfig>);
2489
+ search(query: MemorySearchQuery): MemorySearchResult[];
2490
+ private calculateRelevanceScore;
2491
+ private loadOrRebuildIndex;
2492
+ private isIndexStale;
2493
+ private rebuildIndex;
2494
+ private indexFile;
2495
+ invalidateIndex(): void;
2496
+ }
2497
+
2498
+ declare class MemoryWriter {
2499
+ private config;
2500
+ private projectRoot;
2501
+ private searcher;
2502
+ constructor(projectRoot: string, config?: Partial<MemoryConfig>);
2503
+ write(options: MemoryWriteOptions): MemoryWriteResult;
2504
+ update(memoryId: string, changes: Partial<MemoryFrontmatter>): void;
2505
+ deprecate(memoryId: string, reason: string, supersededBy?: string): void;
2506
+ private checkDuplicate;
2507
+ private findMemoryFile;
2508
+ }
2509
+
2402
2510
  interface CodexClientOptions {
2403
2511
  configPath?: string;
2404
2512
  cacheDir?: string;
@@ -2444,4 +2552,4 @@ declare class CodexClient {
2444
2552
  }
2445
2553
  declare function createCodexClient(options?: CodexClientOptions): Promise<CodexClient>;
2446
2554
 
2447
- export { type ArchiveConfig, type ArtifactType, type AutoSyncPattern, AutoSyncPatternSchema, BUILT_IN_TYPES, CODEX_DIRECTORIES, CODEX_URI_PREFIX, CONFIG_SCHEMA_VERSION, type CacheEntry, type CacheEntryInfo, type CacheEntryMetadata, type CacheEntryStatus, type CacheLookupResult, CacheManager, type CacheManagerConfig, CachePersistence, type CachePersistenceOptions, type CacheStats, type ClientFetchOptions, type ClientFetchResult, CodexClient, type CodexClientOptions, type CodexConfig, CodexConfigSchema, CodexError, type CodexInitOptions, type CodexInitResult, type CodexUpdateOptions, type CodexUpdateResult, type CodexValidateResult, type CodexYamlConfig, CommonRules, type ConfigInitOptions, type ConfigInitResult, ConfigManager, ConfigurationError, type ConversionOptions, type ConvertedReference, type CustomSyncDestination, type CustomTypeConfig$1 as CustomTypeConfig, CustomTypeSchema, DEFAULT_CACHE_DIR, DEFAULT_FETCH_OPTIONS, DEFAULT_FRACTARY_GITIGNORE, DEFAULT_GLOBAL_EXCLUDES, DEFAULT_MIGRATION_OPTIONS, DEFAULT_PERMISSION_CONFIG, DEFAULT_SYNC_CONFIG, DEFAULT_TYPE, type DirectionalSyncConfig, type DirectoryStructureResult, type DiscoverCodexRepoResult, type EvaluationResult, type EvaluationSummary, type ExpandEnvOptions, type FetchOptions, type FetchResult, type FileConfig, type FileInfo, type FilePluginConfig, FilePluginFileNotFoundError, type FilePluginFileNotFoundErrorOptions, FilePluginStorage, type FilePluginStorageOptions, type FileSourceConfig, type FileSyncStatus, type GenerateSyncConfigOptions, GitHubStorage, type GitHubStorageOptions, type GitignoreResult, type HealthCheck, HealthChecker, type HealthCheckerOptions, type HealthConfig, type HealthResult, type HealthStatus, type HealthSummary, HttpStorage, type HttpStorageOptions, LEGACY_PATTERNS, LEGACY_REF_PREFIX, type LegacyAutoSyncPattern, type LegacyCodexConfig, type ListEntriesOptions, type ListEntriesResult, type LoadConfigOptions, LocalStorage, type LocalStorageOptions, type McpInstallResult, type Metadata, MetadataSchema, type MigrationChange, type MigrationOptions, type MigrationResult, type ModernCodexConfig, type ModernSyncPattern, type NameValidationResult, PERMISSION_LEVEL_ORDER, type ParseMetadataOptions, type ParseOptions, type ParseResult, type ParsedReference, type PermissionAction, type PermissionConfig, type PermissionContext, PermissionDeniedError, type PermissionLevel$1 as PermissionLevel, PermissionManager, type PermissionManagerConfig, type PermissionResult, type PermissionRule$1 as PermissionRule, type PermissionScope, type PlanStats, type ReadConfigOptions, type ReferenceConversionResult, type RemoteConfig, type ResolveOptions, type ResolveOrgOptions, type ResolvedReference, STANDARD_DIRECTORIES, SYNC_PATTERN_PRESETS, type CodexConfig$1 as SchemaCodexConfig, type SerializedCacheEntry, type ShouldSyncOptions, StorageManager, type StorageManagerConfig, type StorageProvider, type StorageProviderConfig$1 as StorageProviderConfig, type StorageProviderInfo, type StorageProviderType$1 as StorageProviderType, type SyncConfig$1 as SyncConfig, type SyncDirection, SyncManager, type SyncManagerConfig, type SyncManifest, type SyncManifestEntry, type SyncOperation, type SyncOptions, type SyncPlan, type SyncPreset, type SyncPresetConfig, type SyncResult, type SyncRule$1 as SyncRule, type SyncRules, SyncRulesSchema, TTL, TypeRegistry, type TypeRegistryOptions, type TypesConfig$1 as TypesConfig, TypesConfigSchema, type UnifiedConfig$1 as UnifiedConfig, ValidationError, type ValidationIssue, type VersionDetectionResult, type CacheConfig as YamlCacheConfig, type CustomTypeConfig as YamlCustomTypeConfig, type GitHubStorageConfig as YamlGitHubStorageConfig, type HttpStorageConfig as YamlHttpStorageConfig, type LocalStorageConfig as YamlLocalStorageConfig, type McpConfig as YamlMcpConfig, type PermissionLevel as YamlPermissionLevel, type PermissionRule as YamlPermissionRule, type PermissionsConfig as YamlPermissionsConfig, type S3StorageConfig as YamlS3StorageConfig, type StorageProviderConfig as YamlStorageProviderConfig, type StorageProviderType as YamlStorageProviderType, type SyncConfig as YamlSyncConfig, type SyncRule as YamlSyncRule, type TypesConfig as YamlTypesConfig, type UnifiedConfig as YamlUnifiedConfig, buildUri, calculateCachePath, calculateContentHash, convertLegacyReference, convertLegacyReferences, convertToUri, createCacheEntry, createCacheManager, createCachePersistence, createCodexClient, createConfigManager, createDefaultRegistry, createEmptyModernConfig, createEmptySyncPlan, createGitHubStorage, createHealthChecker, createHttpStorage, createLocalStorage, createPermissionManager, createRule, createRulesFromPatterns, createStorageManager, createSyncManager, createSyncPlan, deserializeCacheEntry, detectContentType, detectCurrentProject, detectOrganizationFromGit, detectProjectName, detectVersion, discoverCodexRepo, ensureCachePathIgnored, ensureDirectoryStructure, estimateSyncTime, evaluatePath, evaluatePaths, evaluatePatterns, evaluatePermission, evaluatePermissions, expandEnvVars, expandEnvVarsInConfig, extendType, extractEnvVarNames, extractOrgFromRepoName, extractRawFrontmatter, filterByPatterns, filterByPermission, filterPlanOperations, filterSyncablePaths, findLegacyReferences, formatBytes, formatDuration, formatPlanSummary, formatSeconds, generateCodexSection, generateMigrationReport, generateReferenceMigrationSummary, generateSyncConfigFromPreset, generateUnifiedConfig, getBuiltInType, getBuiltInTypeNames, getCacheEntryAge, getCacheEntryStatus, getCurrentContext, getCustomSyncDestinations, getDefaultCacheManager, getDefaultConfig, getDefaultDirectories, getDefaultPermissionManager, getDefaultRules, getDefaultStorageManager, getDirectory, getExtension, getFilename, getMigrationRequirements, getPlanStats, getRelativeCachePath, getRemainingTtl, getSyncPreset, getSyncPresetNames, getTargetRepos, hasContentChanged, hasEnvVars, hasFrontmatter, hasLegacyReferences, hasPermission as hasPermissionLevel, installMcpServer, isBuiltInType, isCacheEntryFresh, isCacheEntryValid, isCurrentProjectUri, isLegacyConfig, isLegacyReference, isModernConfig, isAllowed as isPermissionAllowed, isUnifiedConfig, isValidDuration, isValidSize, isValidUri, levelGrants, loadConfig, loadCustomTypes, matchAnyPattern, matchPattern, maxLevel, mergeFetchOptions, mergeRules, mergeTypes, mergeUnifiedConfigs, migrateConfig, migrateFileReferences, minLevel, needsMigration, normalizeCachePath, parseCustomDestination, parseDuration, parseMetadata, parseReference, parseSize, parseTtl, readCodexConfig, readUnifiedConfig$1 as readUnifiedConfig, readUnifiedConfig as readYamlUnifiedConfig, resolveOrganization, resolveReference, resolveReferences, ruleMatchesAction, ruleMatchesContext, ruleMatchesPath, sanitizeForS3BucketName, sanitizePath, serializeCacheEntry, setDefaultCacheManager, setDefaultPermissionManager, setDefaultStorageManager, shouldSyncToRepo, substitutePatternPlaceholders, summarizeEvaluations, touchCacheEntry, validateCustomTypes, validateMetadata, validateMigratedConfig, validateNameFormat, validateOrg, validateOrganizationName, validatePath, validateRules as validatePermissionRules, validateProject, validateRepositoryName, validateRules$1 as validateRules, validateUri, writeUnifiedConfig };
2555
+ export { type ArchiveConfig, type ArtifactType, type AutoSyncPattern, AutoSyncPatternSchema, BUILT_IN_TYPES, CODEX_DIRECTORIES, CODEX_URI_PREFIX, CONFIG_SCHEMA_VERSION, type CacheEntry, type CacheEntryInfo, type CacheEntryMetadata, type CacheEntryStatus, type CacheLookupResult, CacheManager, type CacheManagerConfig, CachePersistence, type CachePersistenceOptions, type CacheStats, type ClientFetchOptions, type ClientFetchResult, CodexClient, type CodexClientOptions, type CodexConfig, CodexConfigSchema, CodexError, type CodexInitOptions, type CodexInitResult, type CodexUpdateOptions, type CodexUpdateResult, type CodexValidateResult, type CodexYamlConfig, CommonRules, type ConfigInitOptions, type ConfigInitResult, ConfigManager, ConfigurationError, type ConversionOptions, type ConvertedReference, type CustomSyncDestination, type CustomTypeConfig$1 as CustomTypeConfig, CustomTypeSchema, DEFAULT_CACHE_DIR, DEFAULT_FETCH_OPTIONS, DEFAULT_FRACTARY_GITIGNORE, DEFAULT_GLOBAL_EXCLUDES, DEFAULT_MEMORY_CONFIG, DEFAULT_MIGRATION_OPTIONS, DEFAULT_PERMISSION_CONFIG, DEFAULT_SYNC_CONFIG, DEFAULT_TYPE, type DirectionalSyncConfig, type DirectoryStructureResult, type DiscoverCodexRepoResult, type EvaluationResult, type EvaluationSummary, type ExpandEnvOptions, type FetchOptions, type FetchResult, type FileConfig, type FileInfo, type FilePluginConfig, FilePluginFileNotFoundError, type FilePluginFileNotFoundErrorOptions, FilePluginStorage, type FilePluginStorageOptions, type FileSourceConfig, type FileSyncStatus, type GenerateSyncConfigOptions, GitHubStorage, type GitHubStorageOptions, type GitignoreResult, type HealthCheck, HealthChecker, type HealthCheckerOptions, type HealthConfig, type HealthResult, type HealthStatus, type HealthSummary, HttpStorage, type HttpStorageOptions, LEGACY_PATTERNS, LEGACY_REF_PREFIX, type LegacyAutoSyncPattern, type LegacyCodexConfig, type ListEntriesOptions, type ListEntriesResult, type LoadConfigOptions, LocalStorage, type LocalStorageOptions, MEMORY_TYPE_PREFIXES, type McpInstallResult, type MemoryConfig, type MemoryFrontmatter, type MemoryIndex, type MemoryIndexEntry, type MemorySearchQuery, type MemorySearchResult, MemorySearcher, type MemoryStatus, type MemoryType, type MemoryWriteOptions, type MemoryWriteResult, MemoryWriter, type Metadata, MetadataSchema, type MigrationChange, type MigrationOptions, type MigrationResult, type ModernCodexConfig, type ModernSyncPattern, type NameValidationResult, PERMISSION_LEVEL_ORDER, type ParseMetadataOptions, type ParseOptions, type ParseResult, type ParsedReference, type PermissionAction, type PermissionConfig, type PermissionContext, PermissionDeniedError, type PermissionLevel$1 as PermissionLevel, PermissionManager, type PermissionManagerConfig, type PermissionResult, type PermissionRule$1 as PermissionRule, type PermissionScope, type PlanStats, type ReadConfigOptions, type ReferenceConversionResult, type RemoteConfig, type ResolveOptions, type ResolveOrgOptions, type ResolvedReference, STANDARD_DIRECTORIES, SYNC_PATTERN_PRESETS, type CodexConfig$1 as SchemaCodexConfig, type SerializedCacheEntry, type ShouldSyncOptions, StorageManager, type StorageManagerConfig, type StorageProvider, type StorageProviderConfig$1 as StorageProviderConfig, type StorageProviderInfo, type StorageProviderType$1 as StorageProviderType, type SyncConfig$1 as SyncConfig, type SyncDirection, SyncManager, type SyncManagerConfig, type SyncManifest, type SyncManifestEntry, type SyncOperation, type SyncOptions, type SyncPlan, type SyncPreset, type SyncPresetConfig, type SyncResult, type SyncRule$1 as SyncRule, type SyncRules, SyncRulesSchema, TTL, TypeRegistry, type TypeRegistryOptions, type TypesConfig$1 as TypesConfig, TypesConfigSchema, type UnifiedConfig$1 as UnifiedConfig, ValidationError, type ValidationIssue, type VersionDetectionResult, type CacheConfig as YamlCacheConfig, type CustomTypeConfig as YamlCustomTypeConfig, type GitHubStorageConfig as YamlGitHubStorageConfig, type HttpStorageConfig as YamlHttpStorageConfig, type LocalStorageConfig as YamlLocalStorageConfig, type McpConfig as YamlMcpConfig, type PermissionLevel as YamlPermissionLevel, type PermissionRule as YamlPermissionRule, type PermissionsConfig as YamlPermissionsConfig, type S3StorageConfig as YamlS3StorageConfig, type StorageProviderConfig as YamlStorageProviderConfig, type StorageProviderType as YamlStorageProviderType, type SyncConfig as YamlSyncConfig, type SyncRule as YamlSyncRule, type TypesConfig as YamlTypesConfig, type UnifiedConfig as YamlUnifiedConfig, buildUri, calculateCachePath, calculateContentHash, convertLegacyReference, convertLegacyReferences, convertToUri, createCacheEntry, createCacheManager, createCachePersistence, createCodexClient, createConfigManager, createDefaultRegistry, createEmptyModernConfig, createEmptySyncPlan, createGitHubStorage, createHealthChecker, createHttpStorage, createLocalStorage, createPermissionManager, createRule, createRulesFromPatterns, createStorageManager, createSyncManager, createSyncPlan, deserializeCacheEntry, detectContentType, detectCurrentProject, detectOrganizationFromGit, detectProjectName, detectVersion, discoverCodexRepo, ensureCachePathIgnored, ensureDirectoryStructure, estimateSyncTime, evaluatePath, evaluatePaths, evaluatePatterns, evaluatePermission, evaluatePermissions, expandEnvVars, expandEnvVarsInConfig, extendType, extractEnvVarNames, extractOrgFromRepoName, extractRawFrontmatter, filterByPatterns, filterByPermission, filterPlanOperations, filterSyncablePaths, findLegacyReferences, formatBytes, formatDuration, formatPlanSummary, formatSeconds, generateCodexSection, generateMigrationReport, generateReferenceMigrationSummary, generateSyncConfigFromPreset, generateUnifiedConfig, getBuiltInType, getBuiltInTypeNames, getCacheEntryAge, getCacheEntryStatus, getCurrentContext, getCustomSyncDestinations, getDefaultCacheManager, getDefaultConfig, getDefaultDirectories, getDefaultPermissionManager, getDefaultRules, getDefaultStorageManager, getDirectory, getExtension, getFilename, getMigrationRequirements, getPlanStats, getRelativeCachePath, getRemainingTtl, getSyncPreset, getSyncPresetNames, getTargetRepos, hasContentChanged, hasEnvVars, hasFrontmatter, hasLegacyReferences, hasPermission as hasPermissionLevel, installMcpServer, isBuiltInType, isCacheEntryFresh, isCacheEntryValid, isCurrentProjectUri, isLegacyConfig, isLegacyReference, isModernConfig, isAllowed as isPermissionAllowed, isUnifiedConfig, isValidDuration, isValidSize, isValidUri, levelGrants, loadConfig, loadCustomTypes, matchAnyPattern, matchPattern, maxLevel, mergeFetchOptions, mergeRules, mergeTypes, mergeUnifiedConfigs, migrateConfig, migrateFileReferences, minLevel, needsMigration, normalizeCachePath, parseCustomDestination, parseDuration, parseMetadata, parseReference, parseSize, parseTtl, readCodexConfig, readUnifiedConfig$1 as readUnifiedConfig, readUnifiedConfig as readYamlUnifiedConfig, resolveOrganization, resolveReference, resolveReferences, ruleMatchesAction, ruleMatchesContext, ruleMatchesPath, sanitizeForS3BucketName, sanitizePath, serializeCacheEntry, setDefaultCacheManager, setDefaultPermissionManager, setDefaultStorageManager, shouldSyncToRepo, substitutePatternPlaceholders, summarizeEvaluations, touchCacheEntry, validateCustomTypes, validateMetadata, validateMigratedConfig, validateNameFormat, validateOrg, validateOrganizationName, validatePath, validateRules as validatePermissionRules, validateProject, validateRepositoryName, validateRules$1 as validateRules, validateUri, writeUnifiedConfig };