@im-nobsidian/core 0.1.10 → 0.1.12

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.ts CHANGED
@@ -129,19 +129,49 @@ declare const ConfigSchema: z.ZodObject<{
129
129
  }>;
130
130
  advanced: z.ZodObject<{
131
131
  concurrency: z.ZodDefault<z.ZodNumber>;
132
- maxRetries: z.ZodDefault<z.ZodNumber>;
133
132
  timeoutMs: z.ZodDefault<z.ZodNumber>;
133
+ pageSize: z.ZodDefault<z.ZodNumber>;
134
134
  batchSize: z.ZodDefault<z.ZodNumber>;
135
+ rateLimitIntervalMs: z.ZodDefault<z.ZodNumber>;
136
+ maxRetries: z.ZodDefault<z.ZodNumber>;
137
+ retryBaseDelayMs: z.ZodDefault<z.ZodNumber>;
138
+ retryBackoffFactor: z.ZodDefault<z.ZodNumber>;
139
+ retryWaitMs: z.ZodDefault<z.ZodNumber>;
140
+ mediaConcurrency: z.ZodDefault<z.ZodNumber>;
141
+ mediaMaxRetries: z.ZodDefault<z.ZodNumber>;
142
+ mediaRetryBaseMs: z.ZodDefault<z.ZodNumber>;
143
+ fileConcurrency: z.ZodDefault<z.ZodNumber>;
144
+ maxFileSizeBytes: z.ZodDefault<z.ZodNumber>;
135
145
  }, "strip", z.ZodTypeAny, {
136
146
  concurrency: number;
137
- maxRetries: number;
138
147
  timeoutMs: number;
148
+ pageSize: number;
139
149
  batchSize: number;
150
+ rateLimitIntervalMs: number;
151
+ maxRetries: number;
152
+ retryBaseDelayMs: number;
153
+ retryBackoffFactor: number;
154
+ retryWaitMs: number;
155
+ mediaConcurrency: number;
156
+ mediaMaxRetries: number;
157
+ mediaRetryBaseMs: number;
158
+ fileConcurrency: number;
159
+ maxFileSizeBytes: number;
140
160
  }, {
141
161
  concurrency?: number | undefined;
142
- maxRetries?: number | undefined;
143
162
  timeoutMs?: number | undefined;
163
+ pageSize?: number | undefined;
144
164
  batchSize?: number | undefined;
165
+ rateLimitIntervalMs?: number | undefined;
166
+ maxRetries?: number | undefined;
167
+ retryBaseDelayMs?: number | undefined;
168
+ retryBackoffFactor?: number | undefined;
169
+ retryWaitMs?: number | undefined;
170
+ mediaConcurrency?: number | undefined;
171
+ mediaMaxRetries?: number | undefined;
172
+ mediaRetryBaseMs?: number | undefined;
173
+ fileConcurrency?: number | undefined;
174
+ maxFileSizeBytes?: number | undefined;
145
175
  }>;
146
176
  }, "strip", z.ZodTypeAny, {
147
177
  version: 1;
@@ -180,9 +210,19 @@ declare const ConfigSchema: z.ZodObject<{
180
210
  };
181
211
  advanced: {
182
212
  concurrency: number;
183
- maxRetries: number;
184
213
  timeoutMs: number;
214
+ pageSize: number;
185
215
  batchSize: number;
216
+ rateLimitIntervalMs: number;
217
+ maxRetries: number;
218
+ retryBaseDelayMs: number;
219
+ retryBackoffFactor: number;
220
+ retryWaitMs: number;
221
+ mediaConcurrency: number;
222
+ mediaMaxRetries: number;
223
+ mediaRetryBaseMs: number;
224
+ fileConcurrency: number;
225
+ maxFileSizeBytes: number;
186
226
  };
187
227
  }, {
188
228
  version: 1;
@@ -221,9 +261,19 @@ declare const ConfigSchema: z.ZodObject<{
221
261
  };
222
262
  advanced: {
223
263
  concurrency?: number | undefined;
224
- maxRetries?: number | undefined;
225
264
  timeoutMs?: number | undefined;
265
+ pageSize?: number | undefined;
226
266
  batchSize?: number | undefined;
267
+ rateLimitIntervalMs?: number | undefined;
268
+ maxRetries?: number | undefined;
269
+ retryBaseDelayMs?: number | undefined;
270
+ retryBackoffFactor?: number | undefined;
271
+ retryWaitMs?: number | undefined;
272
+ mediaConcurrency?: number | undefined;
273
+ mediaMaxRetries?: number | undefined;
274
+ mediaRetryBaseMs?: number | undefined;
275
+ fileConcurrency?: number | undefined;
276
+ maxFileSizeBytes?: number | undefined;
227
277
  };
228
278
  }>;
229
279
  type Config = z.infer<typeof ConfigSchema>;
@@ -279,28 +329,19 @@ interface ProgressItem {
279
329
  readonly operation: "create" | "update" | "delete";
280
330
  }
281
331
  type ProgressCallback = (current: number, total: number, item: ProgressItem) => void;
282
- interface PushOptions {
332
+ /** push/pull/sync 가 공통으로 받는 동기화 옵션. */
333
+ interface BaseSyncOptions {
283
334
  readonly paths?: string[];
284
- readonly excludePaths?: string[];
285
335
  readonly force?: boolean;
286
336
  readonly dryRun?: boolean;
287
337
  readonly onProgress?: ProgressCallback;
288
338
  readonly signal?: AbortSignal;
289
339
  }
290
- interface PullOptions {
291
- readonly paths?: string[];
292
- readonly force?: boolean;
293
- readonly dryRun?: boolean;
294
- readonly onProgress?: ProgressCallback;
295
- readonly signal?: AbortSignal;
296
- }
297
- interface SyncOptions {
298
- readonly paths?: string[];
299
- readonly force?: boolean;
300
- readonly dryRun?: boolean;
301
- readonly onProgress?: ProgressCallback;
302
- readonly signal?: AbortSignal;
340
+ interface PushOptions extends BaseSyncOptions {
341
+ readonly excludePaths?: string[];
303
342
  }
343
+ type PullOptions = BaseSyncOptions;
344
+ type SyncOptions = BaseSyncOptions;
304
345
  interface PushResult {
305
346
  readonly created: number;
306
347
  readonly updated: number;
@@ -478,10 +519,14 @@ interface IStateDB {
478
519
  setNotionLastEdited(id: string, lastEdited: string): void;
479
520
  updateStatCache(id: string, mtime: string, fileSize: number): void;
480
521
  setNotionParentId(id: string, parentId: string): void;
522
+ /** 레코드의 로컬 경로를 갱신한다 (파일 rename/move 추적용). */
523
+ updatePath(id: string, newPath: string): void;
481
524
  delete(id: string): void;
482
525
  resolveWikilink(text: string): WikilinkEntry | null;
483
526
  resolvePageId(pageId: string): WikilinkEntry | null;
484
527
  upsertWikilink(entry: WikilinkEntry): void;
528
+ /** 레코드 삭제 시 해당 경로의 wikilink 항목을 제거한다 (stale 링크 방지). */
529
+ deleteWikilink(obsidianPath: string): void;
485
530
  getMeta(key: string): string | null;
486
531
  setMeta(key: string, value: string): void;
487
532
  isFileRegistered(localPath: string): boolean;
@@ -511,10 +556,12 @@ declare class StateDB implements IStateDB {
511
556
  setNotionLastEdited(id: string, lastEdited: string): void;
512
557
  updateStatCache(id: string, mtime: string, fileSize: number): void;
513
558
  setNotionParentId(id: string, parentId: string): void;
559
+ updatePath(id: string, newPath: string): void;
514
560
  delete(id: string): void;
515
561
  resolveWikilink(text: string): WikilinkEntry | null;
516
562
  resolvePageId(pageId: string): WikilinkEntry | null;
517
563
  upsertWikilink(entry: WikilinkEntry): void;
564
+ deleteWikilink(obsidianPath: string): void;
518
565
  getMeta(key: string): string | null;
519
566
  setMeta(key: string, value: string): void;
520
567
  isFileRegistered(localPath: string): boolean;
@@ -565,6 +612,12 @@ interface NotionClientOptions {
565
612
  readonly token: string;
566
613
  readonly concurrency?: number;
567
614
  readonly timeoutMs?: number;
615
+ readonly rateLimitIntervalMs?: number;
616
+ readonly maxRetries?: number;
617
+ readonly retryBaseDelayMs?: number;
618
+ readonly retryBackoffFactor?: number;
619
+ readonly pageSize?: number;
620
+ readonly batchSize?: number;
568
621
  readonly fetch?: typeof globalThis.fetch;
569
622
  }
570
623
  declare class NotionClient {
@@ -573,7 +626,15 @@ declare class NotionClient {
573
626
  private readonly token;
574
627
  private readonly propertyMapper;
575
628
  private readonly customFetch?;
629
+ private readonly minRequestInterval;
630
+ private readonly maxRetries;
631
+ private readonly retryBaseDelayMs;
632
+ private readonly retryBackoffFactor;
633
+ private readonly defaultPageSize;
634
+ private readonly batchSize;
576
635
  constructor(options: NotionClientOptions);
636
+ /** config.advanced 의 운영 튜닝값으로 클라이언트를 생성한다 (매직넘버 단일 진실원). */
637
+ static fromConfig(config: Config, fetch?: typeof globalThis.fetch): NotionClient;
577
638
  getInternalClient(): Client;
578
639
  getPage(pageId: string): Promise<PageObjectResponse>;
579
640
  createPage(params: {
@@ -660,7 +721,16 @@ declare class NotionClient {
660
721
  id: string;
661
722
  last_edited_time: string;
662
723
  }>>;
724
+ /**
725
+ * 통합이 접근 가능한 모든 페이지를 search API로 일괄 조회한다(요청당 최대 100건).
726
+ * 블록 트리를 페이지별로 재귀 순회하는 getChildPagesRecursive 대비 API 호출 수가
727
+ * 페이지 수의 수십분의 1로 줄어든다. search API는 휴지통(in_trash) 페이지를 반환하지 않는다.
728
+ * 반환 객체에는 parent 정보가 포함되어 호출 측에서 root subtree ancestry 필터링이 가능하다.
729
+ */
730
+ searchAllPages(): Promise<PageObjectResponse[]>;
663
731
  getChildPages(parentId: string): Promise<PageObjectResponse[]>;
732
+ /** 페이지가 휴지통(in_trash)이거나 보관(archived) 상태인지 판정한다. */
733
+ private static isTrashedOrArchived;
664
734
  getChildDatabaseIds(parentId: string): Promise<string[]>;
665
735
  getChildPagesRecursive(parentId: string): Promise<PageObjectResponse[]>;
666
736
  listDatabaseViews(databaseId: string): Promise<ViewConfig[]>;
@@ -671,7 +741,6 @@ declare class NotionClient {
671
741
  extractTitle(page: PageObjectResponse): string;
672
742
  extractProperties(page: PageObjectResponse): Record<string, unknown>;
673
743
  private lastRequestTime;
674
- private readonly minRequestInterval;
675
744
  private withRateLimit;
676
745
  private executeWithRetry;
677
746
  }
@@ -853,6 +922,7 @@ declare class SyncOrchestrator {
853
922
  private dbSchemaLoaded;
854
923
  private _pullImageCount;
855
924
  private _pullFileCount;
925
+ private _inlineDbRefs;
856
926
  constructor(config: Config, stateDb: IStateDB, notionClient: NotionClient, vaultFs: VaultFS, customFetch?: typeof globalThis.fetch);
857
927
  push(options?: PushOptions): Promise<PushResult>;
858
928
  pull(options?: PullOptions): Promise<PullResult>;
@@ -868,6 +938,14 @@ declare class SyncOrchestrator {
868
938
  private buildConflictsFromRecords;
869
939
  private get isDatabaseMode();
870
940
  private discoverChildDatabases;
941
+ /**
942
+ * 자동 발견된 child_database 1개를 DatabaseSyncer 설정으로 변환한다.
943
+ * 블록 스캔/markdown 양쪽 발견 경로에서 공통으로 사용한다.
944
+ * - localFolder: 부모 페이지의 obsidianPath 기준으로 폴더를 잡아 원본 중첩 구조를 보존
945
+ * (예: 부모 "AI Engineer (1).md" + DB "Minirecord Project" → "AI Engineer (1)/Minirecord-Project")
946
+ * - 제목 취득 실패 시 부모 폴더명 기반 안전 이름으로 폴백
947
+ */
948
+ private buildDiscoveredDbConfig;
871
949
  private pullDiscoveredDatabases;
872
950
  private resolveNotionLinks;
873
951
  private ensureDbSchema;
@@ -878,6 +956,15 @@ declare class SyncOrchestrator {
878
956
  private detectRemoteChanges;
879
957
  private detectRemoteChangesIncremental;
880
958
  private isTrackedParent;
959
+ /**
960
+ * search API로 받은 전체 접근 가능 페이지 중 rootPageId 하위(자손)만 남긴다.
961
+ * 각 페이지의 parent 체인을 root에 닿을 때까지 거슬러 올라가며 판정한다.
962
+ * - 부모가 이미 받은 페이지면 추가 API 호출 없이 메모리에서 해석(공통 경로)
963
+ * - 부모가 검색 결과에 없으면(데이터베이스·미공유 조상 등) getPage로 1회 조회 후 캐시
964
+ * - 조회 불가/순환/깊이 초과 시 보수적으로 root 하위가 아님으로 판정
965
+ * 판정 결과는 체인 전체에 메모이즈해 형제 페이지 처리 시 재사용한다.
966
+ */
967
+ private filterPagesUnderRoot;
881
968
  private pullCreate;
882
969
  private pullUpdate;
883
970
  private pullDelete;
@@ -889,6 +976,8 @@ declare class SyncOrchestrator {
889
976
  private pushCreatePage;
890
977
  private pushUpdatePage;
891
978
  private fetchPageMarkdown;
979
+ private collectInlineDbRefs;
980
+ private resolveNotionIdWikilinks;
892
981
  private extractParentId;
893
982
  private resolveBlockToPageId;
894
983
  private cleanupInterruptedSync;
@@ -924,6 +1013,13 @@ declare class NodeVaultFS implements VaultFS {
924
1013
  private walkDir;
925
1014
  }
926
1015
 
1016
+ /** 미디어(이미지/파일) 다운로드 운영 튜닝값. 미지정 시 기존 동작과 동일한 기본값 사용. */
1017
+ interface MediaOptions {
1018
+ readonly concurrency?: number;
1019
+ readonly maxRetries?: number;
1020
+ readonly retryBaseMs?: number;
1021
+ readonly maxFileSizeBytes?: number;
1022
+ }
927
1023
  interface ImageDownloadResult {
928
1024
  readonly originalUrl: string;
929
1025
  readonly localPath: string;
@@ -939,7 +1035,11 @@ declare class ImageHandler {
939
1035
  private readonly attachmentFolder;
940
1036
  private readonly notionClient?;
941
1037
  private readonly customFetch?;
942
- constructor(vaultFs: VaultFS, attachmentFolder?: string, notionClient?: NotionClient | undefined, customFetch?: typeof globalThis.fetch);
1038
+ private readonly concurrency;
1039
+ private readonly maxRetries;
1040
+ private readonly retryBaseMs;
1041
+ private readonly maxFileSizeBytes;
1042
+ constructor(vaultFs: VaultFS, attachmentFolder?: string, notionClient?: NotionClient | undefined, customFetch?: typeof globalThis.fetch, options?: MediaOptions);
943
1043
  private get fetchFn();
944
1044
  downloadImage(url: string, pageTitle: string): Promise<ImageDownloadResult>;
945
1045
  downloadAllImages(markdown: string, pageTitle: string): Promise<{
@@ -979,7 +1079,7 @@ declare class FileHandler {
979
1079
  private readonly notionClient;
980
1080
  private readonly stateDb;
981
1081
  private readonly sema;
982
- constructor(vaultFs: VaultFS, notionClient: NotionClient, stateDb: IStateDB);
1082
+ constructor(vaultFs: VaultFS, notionClient: NotionClient, stateDb: IStateDB, concurrency?: number);
983
1083
  pushFilesForFolder(folderPageId: string, folderPath: string): Promise<FileUploadResult[]>;
984
1084
  pushAllFiles(): Promise<FileUploadResult[]>;
985
1085
  downloadFileBlock(url: string, filename: string, targetFolder: string): Promise<FileDownloadResult>;
@@ -1006,6 +1106,8 @@ declare class ConversionPipeline {
1006
1106
  interface DatabaseSyncResult {
1007
1107
  created: number;
1008
1108
  updated: number;
1109
+ /** Pull 시 로컬·리모트 동시 수정으로 발생한 충돌 (push 는 항상 빈 배열). */
1110
+ conflicts: Conflict[];
1009
1111
  failed: FailedOperation[];
1010
1112
  }
1011
1113
  declare class DatabaseSyncer {
@@ -1025,6 +1127,12 @@ declare class DatabaseSyncer {
1025
1127
  private generateBaseFile;
1026
1128
  private pullDatabasePage;
1027
1129
  private pushDatabase;
1130
+ /**
1131
+ * rename 감지를 위한 고아 레코드 인덱스(내용 해시 → 레코드)를 만든다.
1132
+ * 고아 = 해당 DB 소속 db-row 레코드 중 로컬 파일이 더 이상 존재하지 않는(livePaths 에 없는) 것.
1133
+ * 같은 해시가 여러 고아에 걸리면 첫 항목을 유지한다(희박한 케이스).
1134
+ */
1135
+ private buildOrphanHashIndex;
1028
1136
  }
1029
1137
 
1030
1138
  declare class BlockConverter {
@@ -1184,6 +1292,24 @@ interface MergeConflictRegion {
1184
1292
  readonly localLines: string[];
1185
1293
  readonly remoteLines: string[];
1186
1294
  }
1295
+ /**
1296
+ * 3-way 병합 (diff3). base 를 공통 조상으로 보고 local/remote 의 변경을 합친다.
1297
+ *
1298
+ * 표준 diff3 알고리즘:
1299
+ * 1. base↔local, base↔remote 각각의 LCS 로 "변경 조각(hunk)"을 추출한다.
1300
+ * (hunk = base 의 어떤 구간 [baseStart, baseEnd) 을 새 내용으로 치환·삭제·삽입)
1301
+ * 2. 모든 hunk 를 base 위치순으로 정렬하고, **base 구간이 겹치는** hunk 들을
1302
+ * 하나의 region 으로 묶는다. 겹치지 않는 hunk 사이의 base 줄은 양쪽 공통이므로 그대로 출력.
1303
+ * 3. 각 region 에서 local/remote 가 만들어낸 내용을 비교해 판정한다.
1304
+ * - local 결과 == base → local 미변경 → remote 채택
1305
+ * - remote 결과 == base → remote 미변경 → local 채택
1306
+ * - local 결과 == remote 결과 → 동일 변경 → 한쪽 채택
1307
+ * - 그 외 → 충돌 (양쪽이 같은 구간을 다르게 변경)
1308
+ *
1309
+ * 핵심은 hunk 의 base 구간이 **실제로 겹칠 때만** 충돌로 본다는 점이다. 서로 다른(인접
1310
+ * 포함) 줄을 고친 삽입·삭제·수정은 충돌 없이 합쳐진다. (이전 단순 라인-치환 구현은
1311
+ * 삽입/삭제를 오정렬해 거짓 충돌을 만들거나 무한 루프에 빠질 수 있었다.)
1312
+ */
1187
1313
  declare function threeWayMerge(base: string, local: string, remote: string): MergeResult;
1188
1314
 
1189
1315
  type ResolutionChoice = "local" | "remote" | "merge" | "duplicate";
@@ -1260,12 +1386,12 @@ declare class FileWatcher {
1260
1386
  private watcher;
1261
1387
  constructor(rootPath: string, callback: WatchCallback);
1262
1388
  start(): void;
1389
+ private toVaultPath;
1263
1390
  stop(): Promise<void>;
1264
1391
  }
1265
1392
 
1266
1393
  interface WatchSyncOptions {
1267
1394
  readonly debounceMs?: number;
1268
- readonly syncDirection?: "push" | "pull" | "both";
1269
1395
  readonly onSyncStart?: () => void;
1270
1396
  readonly onSyncComplete?: (result: SyncResult) => void;
1271
1397
  readonly onSyncError?: (error: Error) => void;
@@ -1385,7 +1511,14 @@ declare class BaseFileGenerator {
1385
1511
  private writeViews;
1386
1512
  private convertView;
1387
1513
  private toNoteRef;
1514
+ /**
1515
+ * 속성 참조(order/sort/groupBy/image)를 YAML로 안전하게 출력한다.
1516
+ * `file.name`·`formula.coverImage`·`note.cover` 같은 접두사 식별자와 공백 포함 일반 속성명은
1517
+ * 평문 스칼라로 안전하므로 그대로 두고, 콜론·해시·따옴표 등 YAML 메타문자가 있을 때만 인용한다.
1518
+ */
1519
+ private propRef;
1388
1520
  private resolvePropertyName;
1521
+ private decodeId;
1389
1522
  private yamlKey;
1390
1523
  private yamlValue;
1391
1524
  }
@@ -1437,4 +1570,47 @@ interface PipelineOptions {
1437
1570
  }
1438
1571
  declare function createDefaultPipeline(options?: PipelineOptions): ConversionPipeline;
1439
1572
 
1440
- export { BaseFileGenerator, type BaseFileOptions, type BasePropertySchema, BlockConverter, type CalendarEntry, CalloutRestorer, CalloutTransformer, ChangeDetector, ColorAnnotator, type Config, ConfigManager, ConfigSchema, type Conflict, ConflictResolver, type ConflictStrategy, type ConversionContext, type ConversionPath, ConversionPipeline, type ConversionResult, type CoverConfig, type DBEntry, DEFAULT_CONFIG, type DatabaseSyncConfig, type DatabaseSyncResult, DatabaseSyncer, type DatabaseViewsConfig, EmbedResolver, EntryEditor, type FailedOperation, type FileDownloadResult, FileHandler, type FileInfo, type FileRegistryEntry, type FileStatInfo, type FileSystemEntry, type FileType, type FileUploadResult, FileWatcher, type FilterCondition, FrontmatterExtractor, FrontmatterGenerator, type GroupByConfig, type GroupedEntries, HtmlAnnotationStripper, type IStateDB, type ImageDownloadResult, ImageHandler, type ImageReference, InlineDBParser, type LocalChange, LocalImageRestorer, type Logger, type MappingResult, type MappingType, MathNormalizer, MentionToWikilink, type MergeConflictRegion, type MergeResult, NodeVaultFS, type NonMdFileInfo, type NotionBlock, NotionBlockBuilder, NotionClient, type NotionClientOptions, type NotionColor, type NotionPageNode, type NotionRichText, type RichTextItem as NotionRichTextItem, type OperationType, type PageCover, type PageCreationPlan, type PageIcon, type PathFilterConfig, type PreserveMarker, PreserveMarkerCollector, PreserveMarkerInjector, type Processor, type ProcessorInput, type ProcessorMetadata, type ProcessorOutput, type ProgressCallback, type ProgressItem, PropertiesTableInjector, PropertiesTableRestorer, PropertyMapper, type PropertyOption, type PropertySchema, type PropertyValue, type PullOptions, type PullResult, type PushOptions, type PushResult, type RegisterFileInput, type RemoteChange, type ResolutionChoice, type ResolutionResult, type RichTextSegment, StateDB, type StatusResult, type SyncDirection, type SyncOptions, SyncOrchestrator, type SyncRecord, type SyncResult, type SyncStatus, TreeMapper, UnsupportedBlockStripper, type UpsertSyncRecord, type VaultFS, type ViewConfig, ViewDataProvider, type ViewPropertyConfig, type ViewRenderData, type ViewType, type WatchSyncOptions, WatchSyncService, type WikilinkEntry, WikilinkResolver, computeBufferHash, computeHash, createDefaultPipeline, extractCalendarEntries, filterByMonth, filterEntries, generateColorCSS, generateId, getLogger, getNotionBgColor, getNotionColor, getVisibleProperties, groupEntries, normalizeNotionId, notionIdsEqual, sanitizeFileName, setLogger, sortEntries, threeWayMerge };
1573
+ /**
1574
+ * 내부 메타데이터 경로 단일 진실원(SSOT).
1575
+ *
1576
+ * `.im-nobsidian` 디렉터리·하위 파일명·ignore 파일·gitignore 항목을 한곳에서 정의한다.
1577
+ * 디렉터리/파일명을 바꾸거나 리브랜딩할 때 이 파일만 수정하면 전 패키지에 반영된다.
1578
+ */
1579
+ /** 내부 메타데이터 디렉터리명 (vault 루트 기준). */
1580
+ declare const INTERNAL_DIR = ".im-nobsidian";
1581
+ /** 동기화 설정 파일명. */
1582
+ declare const CONFIG_FILE = "config.json";
1583
+ /** SQLite 상태 DB 파일명. */
1584
+ declare const STATE_DB_FILE = "sync.db";
1585
+ /** DB 뷰 메타데이터 파일명. */
1586
+ declare const DB_VIEWS_FILE = "db-views.json";
1587
+ /** 동기화 제외 패턴 파일명 (디렉터리 외부, vault 루트 직속). */
1588
+ declare const IGNORE_FILE = ".im-nobsidian-ignore";
1589
+ /** `.gitignore`에 추가하는 항목. */
1590
+ declare const GITIGNORE_ENTRY = ".im-nobsidian/";
1591
+ /** vault 상대 POSIX 경로 — DB 뷰 메타데이터. */
1592
+ declare const DB_VIEWS_PATH = ".im-nobsidian/db-views.json";
1593
+ /** vault 상대 POSIX 경로 — 상태 DB. */
1594
+ declare const STATE_DB_PATH = ".im-nobsidian/sync.db";
1595
+ /** 파일 감시에서 제외할 내부 디렉터리 glob. */
1596
+ declare const INTERNAL_DIR_GLOB = "**/.im-nobsidian/**";
1597
+ /**
1598
+ * 주어진 vault 상대 경로(POSIX)가 내부 메타데이터 디렉터리에 속하는지 판별한다.
1599
+ */
1600
+ declare function isInternalPath(path: string): boolean;
1601
+
1602
+ /**
1603
+ * 보존 마커(preserve marker) 단일 진실원(SSOT).
1604
+ *
1605
+ * 변환 불가 요소를 라운드트립 보존하기 위해 본문에 삽입하는 마커가 공유하는
1606
+ * 브랜드 토큰을 한곳에서 정의한다. 리브랜딩 시 {@link MARKER_BRAND}만 바꾸면
1607
+ * 모든 빌더·정규식에 반영된다.
1608
+ *
1609
+ * 주의: 마커 포맷(공백 유무)은 기존 vault·Notion에 이미 기록된 데이터와의 호환을
1610
+ * 위해 변경하지 않는다. 두 포맷이 공존한다 — 공백형(`%% brand:... %%`)과
1611
+ * 압축형(`%%brand:...%%`).
1612
+ */
1613
+ /** 모든 보존 마커가 공유하는 브랜드 토큰. */
1614
+ declare const MARKER_BRAND = "im-nobsidian";
1615
+
1616
+ export { BaseFileGenerator, type BaseFileOptions, type BasePropertySchema, type BaseSyncOptions, BlockConverter, CONFIG_FILE, type CalendarEntry, CalloutRestorer, CalloutTransformer, ChangeDetector, ColorAnnotator, type Config, ConfigManager, ConfigSchema, type Conflict, ConflictResolver, type ConflictStrategy, type ConversionContext, type ConversionPath, ConversionPipeline, type ConversionResult, type CoverConfig, type DBEntry, DB_VIEWS_FILE, DB_VIEWS_PATH, DEFAULT_CONFIG, type DatabaseSyncConfig, type DatabaseSyncResult, DatabaseSyncer, type DatabaseViewsConfig, EmbedResolver, EntryEditor, type FailedOperation, type FileDownloadResult, FileHandler, type FileInfo, type FileRegistryEntry, type FileStatInfo, type FileSystemEntry, type FileType, type FileUploadResult, FileWatcher, type FilterCondition, FrontmatterExtractor, FrontmatterGenerator, GITIGNORE_ENTRY, type GroupByConfig, type GroupedEntries, HtmlAnnotationStripper, IGNORE_FILE, INTERNAL_DIR, INTERNAL_DIR_GLOB, type IStateDB, type ImageDownloadResult, ImageHandler, type ImageReference, InlineDBParser, type LocalChange, LocalImageRestorer, type Logger, MARKER_BRAND, type MappingResult, type MappingType, MathNormalizer, MentionToWikilink, type MergeConflictRegion, type MergeResult, NodeVaultFS, type NonMdFileInfo, type NotionBlock, NotionBlockBuilder, NotionClient, type NotionClientOptions, type NotionColor, type NotionPageNode, type NotionRichText, type RichTextItem as NotionRichTextItem, type OperationType, type PageCover, type PageCreationPlan, type PageIcon, type PathFilterConfig, type PreserveMarker, PreserveMarkerCollector, PreserveMarkerInjector, type Processor, type ProcessorInput, type ProcessorMetadata, type ProcessorOutput, type ProgressCallback, type ProgressItem, PropertiesTableInjector, PropertiesTableRestorer, PropertyMapper, type PropertyOption, type PropertySchema, type PropertyValue, type PullOptions, type PullResult, type PushOptions, type PushResult, type RegisterFileInput, type RemoteChange, type ResolutionChoice, type ResolutionResult, type RichTextSegment, STATE_DB_FILE, STATE_DB_PATH, StateDB, type StatusResult, type SyncDirection, type SyncOptions, SyncOrchestrator, type SyncRecord, type SyncResult, type SyncStatus, TreeMapper, UnsupportedBlockStripper, type UpsertSyncRecord, type VaultFS, type ViewConfig, ViewDataProvider, type ViewPropertyConfig, type ViewRenderData, type ViewType, type WatchSyncOptions, WatchSyncService, type WikilinkEntry, WikilinkResolver, computeBufferHash, computeHash, createDefaultPipeline, extractCalendarEntries, filterByMonth, filterEntries, generateColorCSS, generateId, getLogger, getNotionBgColor, getNotionColor, getVisibleProperties, groupEntries, isInternalPath, normalizeNotionId, notionIdsEqual, sanitizeFileName, setLogger, sortEntries, threeWayMerge };