Miscellaneous

Miscellaneous

Export Index

Root runtime exports

ExportDescription
digOriginalUnwraps nested wrappers to root filesystem. See file system.
prefixWrapperExposes a prefixed directory as an Fs root. See file system.
setNeedMigrationAdds migration confirmation behavior to a setting toggle; see Settings and UI.
pipeTransfer a file between two filesystems with auto-streaming. See file system.
readWithSizeRead a file with auto-streaming by size threshold. See file system.
writeWithValueWrite a value with auto-streaming by input type. See file system.
sCombines a parent setting definition with nested setting definitions. See Settings and UI.
reactivelyValidateAttaches reactive validation to a setting text input. See Settings and UI.
generateEditableListGenerates an editable list setting definition backed by an ephemeral draft store. See Settings and UI.

/dev runtime exports

ExportDescription
debugWrapperFS wrapper that logs calls. See debug and testing.
testKitTest harness utilities. See debug and testing.
sha256SHA-256 hash utility. See distribution.

/tsdown-plugin exports

ExportDescription
syncEngineModuleTsdown plugin bridging obsidian imports and embedding module metadata as magic bytes. See writing a module.

Root type exports

GroupExports
ContextContext, Settings, Events, Translations, SelectFromContext
EventsDispatch, On
Core dataBinary, MaybePromise, Progress, FileStat, FolderStat, Stat, StatsMap, RecordStat, RecordStatsMap
FilesystemRootFs, WrappedFs, Fs, WriteAtom, DeleteAtom, MoveAtom, MkdirAtom, InputAtom, CustomAtom, OutputAtom, OptimizerInput, OptimizerOutput, BatchOptimizer
RegistrationFsWrapperEntry, RemoteFsEntry, RemoteRequestMiddlewareEntry, LocalRequestMiddlewareEntry, TriggerEntry, DeciderEntry, OptimizerEntry, SettingEntry, CallableOrObjectTree, LabelDefinition, ConflictResolverEntry, Request, CheckConnectionResult
SyncTaskNames, BaseTask, AddRecord, RemoveRecord, Download, Upload, CreateLocalDir, CreateRemoteDir, RemoveLocal, RemoveRemote, MoveLocal, MoveRemote, ResolveConflict, TaskFactory, DeciderInput, Decider, SyncOptions, RemoteLister, ConflictResolver, ConflictResolverPayload, SyncTerminateReason
StorageRecordStore, StoreAsync, StoreSync, StoreOperations, DatabaseAsync, DatabaseSync
ModulesModuleMeta, AugmentedModuleMeta
RequestVaultRequest, RequestParam, RequestResponse (the response type returned by Request)
InternationalizationObsidianLanguageCode, Fragment, Snippet, TranslationResource, Translate
OtherExistingMemoryDB

Internal supporting types can appear in exported signatures but are not standalone root exports. They include TogglableValue, GlobMatchRule, Infras, BaseTaskOptions, TaskOptions, TaskOptionsMap, TaskInfo, FailedTaskInfo, DeleteConfirmReturn, and CustomHeaders.

Settings

Settings is a merged object at ctx.settings. For descriptions of each setting, see usage: settings.

KeyType
moduleSourcesArray<string> of registry URLs
modulesRecord<string, object> of per-module settings
moduleAutoUpdateboolean
remoteFsstring selected backend ID
deciderstring selected decider ID
conflictResolverstring selected conflict-resolver ID
maxFileSizeTogglableValue max file size in bytes
confirmTasksInSyncboolean
confirmDeleteInAutoSyncboolean
noticeStatusOnMobileboolean
avoidAutoSyncWhenOfflineboolean
startupSyncTogglableValue delay in milliseconds
scheduledSyncTogglableValue interval in milliseconds
realtimeSyncTogglableValue debounce delay in milliseconds
inclusionRulesArray<GlobMatchRule>
exclusionRulesArray<GlobMatchRule>
maxMemoryConsumptionTogglableValue in bytes
maxRequestConcurrencyTogglableValue
minRequestIntervalTogglableValue in milliseconds
realtimeSyncFastModeboolean
asymmetricStorageboolean
customHeadersArray<{ type: 'plaintext' | 'secret'; value: string; key: string }>

TogglableValue has shape { enabled: boolean; value: number }.

Other Context Members

These Context members are not commonly used by modules. Explore source code to obtain usage patterns.

Module Management

MemberPurpose
discoveredModulesMap from discovered module ID to AugmentedModuleMeta.
loadedModulesMap from loaded module ID to module constructor.
fetchSources(manual?)Fetches module metadata from sources. manual: true forces refetch; false uses in-memory cache.
loadAllModules()Loads all enabled installed modules.
loadModule(meta, start?)Loads named module; optional second argument starts it.
unloadModule(id)Unloads named module.
updateModules()Finds and downloads available module updates.
downloadModule(meta)Downloads one module from URL.
installModule(meta, module)Installs module from in-memory file text: writes, stores metadata, loads when enabled.
deleteModule(id)Deletes named installed module.
enableModule(id)Enables and loads a module.
disableModule(id)Unloads and disables a module.
updateModuleMeta(meta)Updates stored module metadata.
addSettingTab(plugin)Adds Sync Engine setting tab to supplied Obsidian plugin.

Filesystem and Sync

MemberPurpose
createLocalFs()Creates wrapped local filesystem.
createRemoteFs(id?)Creates selected wrapped remote filesystem.
getRequest()Gets composed remote request function.
getVaultRequest()Gets composed local vault request function.
getNamespace(local?, remote?)Creates storage namespace for optional local/remote FS pair.
initializeSync()Creates local FS, remote FS, and record store for sync.
getCheckConnection()Gets selected backend connection-check function.
getDecider()Gets selected Decider.
getConflictResolver()Gets selected ConflictResolver.
optimizeLocal(input)Applies selected local BatchOptimizer.
optimizeRemote(input)Applies selected remote BatchOptimizer.
reduceTriggers(triggers)Reduces trigger names to the highest-priority entry.
executeSync(trigger, options?)Executes synchronization immediately.
requestSync(trigger)Queues sync; resolves with SyncTerminateReason.
remoteFsRegistryMap<string, RemoteFsEntry>.
deciderRegistryMap<string, DeciderEntry>.
conflictResolverRegistryMap<string, ConflictResolverEntry>.

UI and Observability

MemberPurpose
executionProgressReactive Progress for task execution.
walkProgressReactive Progress for remote traversal.
syncStageReactive current sync stage.
showProgress()Opens progress UI.
hideProgress()Hides progress UI.
getLogs()Returns formatted current logs.
exportLogs()Exports logs to vault file.
startScheduledSync()Starts interval sync.
stopScheduledSync()Stops interval sync.

Core and Host

MemberPurpose
settingsMerged Settings object.
eventsMerged Events map.
i18nMerged Translations resource map.
appObsidian App instance.
addCommand(cmd)Registers Obsidian command and returns it.
registerEvent(ref)Registers Obsidian EventRef for automatic cleanup.
addRibbonIcon(...)Adds ribbon icon and returns element.
addStatusBarItem()Adds and returns status-bar element.
saveSettings()Persists current settings.
on(key, cb)Subscribes to typed SDK event. See events.
dispatch(key, payload?)Dispatches typed SDK event. See events.
isIdleSynthKernel Ref<boolean> for sync-idle state.
translateTranslates a key from merged resources. See Settings and UI.
rerenderSettingTab()Renders contributed settings again.
refreshSettingTab()Cheap setting page rerender that makes Obsidian reevaluate the visibility of each setting entry.

Framework Members

SynthKernel internal members. Module code normally should not call them.

MemberPurpose
__modules__Internal module-instance WeakMap.
__getModule__Gets internal module instance.
__addModule__Adds module constructor to context.
__assign__Extends context with merged values.

All content licensed under the CC BY 4.0 License.