feat(authority): add graph SQL store

This commit is contained in:
Youzini-afk
2026-04-28 02:20:15 +08:00
parent ee9b0afa35
commit dc37d22dcf
6 changed files with 1622 additions and 28 deletions

View File

@@ -101,6 +101,22 @@ import {
getPersistedSettingsSnapshot,
mergePersistedSettings,
} from "../runtime/settings-defaults.js";
import {
createDefaultAuthorityCapabilityState,
normalizeAuthoritySettings,
normalizeAuthorityCapabilityState,
probeAuthorityCapabilities,
} from "../runtime/authority-capabilities.js";
import {
createAuthorityBrowserState,
getAuthorityBrowserStateSnapshot,
normalizeAuthorityBrowserState,
} from "../sync/authority-browser-state.js";
import {
AUTHORITY_GRAPH_STORE_KIND,
AUTHORITY_GRAPH_STORE_MODE,
AuthorityGraphStore,
} from "../sync/authority-graph-store.js";
import {
clampFloat,
clampInt,
@@ -434,6 +450,16 @@ async function createGraphPersistenceHarness({
defaultSettings,
getPersistedSettingsSnapshot,
mergePersistedSettings,
createDefaultAuthorityCapabilityState,
normalizeAuthoritySettings,
normalizeAuthorityCapabilityState,
probeAuthorityCapabilities,
createAuthorityBrowserState,
getAuthorityBrowserStateSnapshot,
normalizeAuthorityBrowserState,
AUTHORITY_GRAPH_STORE_KIND,
AUTHORITY_GRAPH_STORE_MODE,
AuthorityGraphStore,
migrateLegacyTaskProfiles(settings = {}) {
return {
taskProfilesVersion: Number(settings?.taskProfilesVersion || 0),