[{"data":1,"prerenderedAt":4586},["ShallowReactive",2],{"navigation":3,"\u002Fservices\u002Fsync":927,"mdc--7sa3b2-key":4528,"mdc--u49wcx-key":4540,"mdc-jlvjlq-key":4552,"mdc-8qka9q-key":4564,"mdc-mis6bk-key":4577},[4,40,114,446,474,498,596,903],{"title":5,"path":6,"stem":7,"children":8},"Architecture","\u002Farchitecture","architecture",[9,14,28,32,36],{"title":10,"path":6,"stem":11,"access":12,"icon":13},"Overview","architecture\u002Findex","public","i-lucide-network",{"title":10,"path":15,"stem":16,"children":17,"access":12,"icon":19},"\u002Farchitecture\u002Fkernel","architecture\u002F1.kernel\u002Findex",[18,20,24],{"title":10,"path":15,"stem":16,"access":12,"icon":19},"i-lucide-box",{"title":21,"path":22,"stem":23,"access":12},"Enclave","\u002Farchitecture\u002Fkernel\u002Fenclave","architecture\u002F1.kernel\u002Fenclave",{"title":25,"path":26,"stem":27,"access":12},"Forking the enclave","\u002Farchitecture\u002Fkernel\u002Fforking-the-enclave","architecture\u002F1.kernel\u002Fforking-the-enclave",{"title":29,"path":30,"stem":31,"access":12},"Ports","\u002Farchitecture\u002Fports","architecture\u002F2.ports",{"title":33,"path":34,"stem":35,"access":12},"Service layers","\u002Farchitecture\u002Fservice-layers","architecture\u002F3.service-layers",{"title":37,"path":38,"stem":39,"access":12},"Families","\u002Farchitecture\u002Ffamilies","architecture\u002F4.families",{"title":41,"path":42,"stem":43,"children":44},"Core","\u002Fcore","core",[45,47,50,53,56,88,97],{"title":10,"path":42,"stem":46,"access":12,"icon":19},"core\u002Findex",{"title":10,"path":48,"stem":49,"access":12},"\u002Fcore\u002F01-overview","core\u002F01-overview",{"title":10,"path":51,"stem":52,"access":12},"\u002Fcore\u002F05-stores","core\u002F05-stores",{"title":10,"path":54,"stem":55,"access":12},"\u002Fcore\u002F06-permissions-and-keyring","core\u002F06-permissions-and-keyring",{"title":10,"path":57,"stem":58,"children":59,"access":12},"\u002Fcore\u002Fnoydb","core\u002F2.noydb\u002Findex",[60,61,65,68,72,76,80,84],{"title":10,"path":57,"stem":58,"access":12},{"title":62,"path":63,"stem":64,"access":12},"Noydb","\u002Fcore\u002Fnoydb\u002Fmethods","core\u002F2.noydb\u002F1.methods",{"title":21,"path":66,"stem":67,"access":12},"\u002Fcore\u002Fnoydb\u002Fenclave","core\u002F2.noydb\u002F2.enclave",{"title":69,"path":70,"stem":71,"access":12},"Secret & keyring","\u002Fcore\u002Fnoydb\u002Fkeyring","core\u002F2.noydb\u002F3.keyring",{"title":73,"path":74,"stem":75,"access":12},"Authentication","\u002Fcore\u002Fnoydb\u002Fauthentication","core\u002F2.noydb\u002F4.authentication",{"title":77,"path":78,"stem":79,"access":12},"Auth recovery","\u002Fcore\u002Fnoydb\u002Frecovery","core\u002F2.noydb\u002F5.recovery",{"title":81,"path":82,"stem":83,"access":12},"Configuration","\u002Fcore\u002Fnoydb\u002Fconfiguration","core\u002F2.noydb\u002F6.configuration",{"title":85,"path":86,"stem":87,"access":12},"Strategies","\u002Fcore\u002Fnoydb\u002Fstrategies","core\u002F2.noydb\u002F7.strategies",{"title":10,"path":89,"stem":90,"children":91,"access":12},"\u002Fcore\u002Fvault","core\u002F3.vault\u002Findex",[92,93],{"title":10,"path":89,"stem":90,"access":12},{"title":94,"path":95,"stem":96,"access":12},"Vault","\u002Fcore\u002Fvault\u002Fmethods","core\u002F3.vault\u002F1.methods",{"title":10,"path":98,"stem":99,"children":100,"access":12},"\u002Fcore\u002Fcollection","core\u002F4.collection\u002Findex",[101,102,106,110],{"title":10,"path":98,"stem":99,"access":12},{"title":103,"path":104,"stem":105,"access":12},"Collection","\u002Fcore\u002Fcollection\u002Fmethods","core\u002F4.collection\u002F1.methods",{"title":107,"path":108,"stem":109,"access":12},"Querying","\u002Fcore\u002Fcollection\u002Fquerying","core\u002F4.collection\u002F2.querying",{"title":111,"path":112,"stem":113,"access":12},"Schema","\u002Fcore\u002Fcollection\u002Fschema","core\u002F4.collection\u002F3.schema",{"title":37,"path":115,"stem":116,"children":117},"\u002Ffamilies","families",[118,121,168,194,208,212,216,294,340],{"title":10,"path":115,"stem":119,"access":12,"icon":120},"families\u002Findex","i-lucide-plug",{"title":122,"path":123,"stem":124,"children":125,"access":12,"icon":127},"as-Exports","\u002Ffamilies\u002Fas","families\u002Fas\u002Findex",[126,128,132,136,140,144,148,152,156,160,164],{"title":122,"path":123,"stem":124,"access":12,"icon":127},"i-lucide-book-open",{"title":129,"path":130,"stem":131,"access":12},"aws-s3","\u002Ffamilies\u002Fas\u002Faws-s3","families\u002Fas\u002Faws-s3",{"title":133,"path":134,"stem":135,"access":12},"blob","\u002Ffamilies\u002Fas\u002Fblob","families\u002Fas\u002Fblob",{"title":137,"path":138,"stem":139,"access":12},"csv","\u002Ffamilies\u002Fas\u002Fcsv","families\u002Fas\u002Fcsv",{"title":141,"path":142,"stem":143,"access":12},"json","\u002Ffamilies\u002Fas\u002Fjson","families\u002Fas\u002Fjson",{"title":145,"path":146,"stem":147,"access":12},"ndjson","\u002Ffamilies\u002Fas\u002Fndjson","families\u002Fas\u002Fndjson",{"title":149,"path":150,"stem":151,"access":12},"noydb","\u002Ffamilies\u002Fas\u002Fnoydb","families\u002Fas\u002Fnoydb",{"title":153,"path":154,"stem":155,"access":12},"sql","\u002Ffamilies\u002Fas\u002Fsql","families\u002Fas\u002Fsql",{"title":157,"path":158,"stem":159,"access":12},"xlsx","\u002Ffamilies\u002Fas\u002Fxlsx","families\u002Fas\u002Fxlsx",{"title":161,"path":162,"stem":163,"access":12},"xml","\u002Ffamilies\u002Fas\u002Fxml","families\u002Fas\u002Fxml",{"title":165,"path":166,"stem":167,"access":12},"zip","\u002Ffamilies\u002Fas\u002Fzip","families\u002Fas\u002Fzip",{"title":169,"path":170,"stem":171,"children":172,"access":12,"icon":127},"at-Seals","\u002Ffamilies\u002Fat","families\u002Fat\u002Findex",[173,174,178,182,186,190],{"title":169,"path":170,"stem":171,"access":12,"icon":127},{"title":175,"path":176,"stem":177,"access":12},"aws-kms","\u002Ffamilies\u002Fat\u002Faws-kms","families\u002Fat\u002Faws-kms",{"title":179,"path":180,"stem":181,"access":12},"azure-keyvault","\u002Ffamilies\u002Fat\u002Fazure-keyvault","families\u002Fat\u002Fazure-keyvault",{"title":183,"path":184,"stem":185,"access":12},"env","\u002Ffamilies\u002Fat\u002Fenv","families\u002Fat\u002Fenv",{"title":187,"path":188,"stem":189,"access":12},"gcp-kms","\u002Ffamilies\u002Fat\u002Fgcp-kms","families\u002Fat\u002Fgcp-kms",{"title":191,"path":192,"stem":193,"access":12},"macos-keychain","\u002Ffamilies\u002Fat\u002Fmacos-keychain","families\u002Fat\u002Fmacos-keychain",{"title":195,"path":196,"stem":197,"children":198,"access":12,"icon":127},"by-Sessions","\u002Ffamilies\u002Fby","families\u002Fby\u002Findex",[199,200,204],{"title":195,"path":196,"stem":197,"access":12,"icon":127},{"title":201,"path":202,"stem":203,"access":12},"peer","\u002Ffamilies\u002Fby\u002Fpeer","families\u002Fby\u002Fpeer",{"title":205,"path":206,"stem":207,"access":12},"tabs","\u002Ffamilies\u002Fby\u002Ftabs","families\u002Fby\u002Ftabs",{"title":209,"path":210,"stem":211,"access":12},"Classifying a package","\u002Ffamilies\u002Fclassification","families\u002Fclassification",{"title":213,"path":214,"stem":215,"access":12},"Command-line tools","\u002Ffamilies\u002Fcli","families\u002Fcli",{"title":217,"path":218,"stem":219,"children":220,"access":12,"icon":127},"in-Frameworks","\u002Ffamilies\u002Fin","families\u002Fin\u002Findex",[221,222,226,230,234,238,242,246,250,254,258,262,266,270,274,278,282,286,290],{"title":217,"path":218,"stem":219,"access":12,"icon":127},{"title":223,"path":224,"stem":225,"access":12},"ai","\u002Ffamilies\u002Fin\u002Fai","families\u002Fin\u002Fai",{"title":227,"path":228,"stem":229,"access":12},"devtools","\u002Ffamilies\u002Fin\u002Fdevtools","families\u002Fin\u002Fdevtools",{"title":231,"path":232,"stem":233,"access":12},"devtools-tui","\u002Ffamilies\u002Fin\u002Fdevtools-tui","families\u002Fin\u002Fdevtools-tui",{"title":235,"path":236,"stem":237,"access":12},"liff","\u002Ffamilies\u002Fin\u002Fliff","families\u002Fin\u002Fliff",{"title":239,"path":240,"stem":241,"access":12},"nextjs","\u002Ffamilies\u002Fin\u002Fnextjs","families\u002Fin\u002Fnextjs",{"title":243,"path":244,"stem":245,"access":12},"nuxt","\u002Ffamilies\u002Fin\u002Fnuxt","families\u002Fin\u002Fnuxt",{"title":247,"path":248,"stem":249,"access":12},"pinia","\u002Ffamilies\u002Fin\u002Fpinia","families\u002Fin\u002Fpinia",{"title":251,"path":252,"stem":253,"access":12},"pwa","\u002Ffamilies\u002Fin\u002Fpwa","families\u002Fin\u002Fpwa",{"title":255,"path":256,"stem":257,"access":12},"react","\u002Ffamilies\u002Fin\u002Freact","families\u002Fin\u002Freact",{"title":259,"path":260,"stem":261,"access":12},"relay","\u002Ffamilies\u002Fin\u002Frelay","families\u002Fin\u002Frelay",{"title":263,"path":264,"stem":265,"access":12},"rest","\u002Ffamilies\u002Fin\u002Frest","families\u002Fin\u002Frest",{"title":267,"path":268,"stem":269,"access":12},"solid","\u002Ffamilies\u002Fin\u002Fsolid","families\u002Fin\u002Fsolid",{"title":271,"path":272,"stem":273,"access":12},"svelte","\u002Ffamilies\u002Fin\u002Fsvelte","families\u002Fin\u002Fsvelte",{"title":275,"path":276,"stem":277,"access":12},"tanstack-query","\u002Ffamilies\u002Fin\u002Ftanstack-query","families\u002Fin\u002Ftanstack-query",{"title":279,"path":280,"stem":281,"access":12},"tanstack-table","\u002Ffamilies\u002Fin\u002Ftanstack-table","families\u002Fin\u002Ftanstack-table",{"title":283,"path":284,"stem":285,"access":12},"vue","\u002Ffamilies\u002Fin\u002Fvue","families\u002Fin\u002Fvue",{"title":287,"path":288,"stem":289,"access":12},"yjs","\u002Ffamilies\u002Fin\u002Fyjs","families\u002Fin\u002Fyjs",{"title":291,"path":292,"stem":293,"access":12},"zustand","\u002Ffamilies\u002Fin\u002Fzustand","families\u002Fin\u002Fzustand",{"title":295,"path":296,"stem":297,"children":298,"access":12,"icon":127},"on-Auth","\u002Ffamilies\u002Fon","families\u002Fon\u002Findex",[299,300,304,308,312,316,320,324,328,332,336],{"title":295,"path":296,"stem":297,"access":12,"icon":127},{"title":301,"path":302,"stem":303,"access":12},"email-otp","\u002Ffamilies\u002Fon\u002Femail-otp","families\u002Fon\u002Femail-otp",{"title":305,"path":306,"stem":307,"access":12},"magic-link","\u002Ffamilies\u002Fon\u002Fmagic-link","families\u002Fon\u002Fmagic-link",{"title":309,"path":310,"stem":311,"access":12},"oidc","\u002Ffamilies\u002Fon\u002Foidc","families\u002Fon\u002Foidc",{"title":313,"path":314,"stem":315,"access":12},"password","\u002Ffamilies\u002Fon\u002Fpassword","families\u002Fon\u002Fpassword",{"title":317,"path":318,"stem":319,"access":12},"pin","\u002Ffamilies\u002Fon\u002Fpin","families\u002Fon\u002Fpin",{"title":321,"path":322,"stem":323,"access":12},"recovery","\u002Ffamilies\u002Fon\u002Frecovery","families\u002Fon\u002Frecovery",{"title":325,"path":326,"stem":327,"access":12},"shamir","\u002Ffamilies\u002Fon\u002Fshamir","families\u002Fon\u002Fshamir",{"title":329,"path":330,"stem":331,"access":12},"threat","\u002Ffamilies\u002Fon\u002Fthreat","families\u002Fon\u002Fthreat",{"title":333,"path":334,"stem":335,"access":12},"totp","\u002Ffamilies\u002Fon\u002Ftotp","families\u002Fon\u002Ftotp",{"title":337,"path":338,"stem":339,"access":12},"webauthn","\u002Ffamilies\u002Fon\u002Fwebauthn","families\u002Fon\u002Fwebauthn",{"title":341,"path":342,"stem":343,"children":344,"access":12,"icon":127},"to-Stores","\u002Ffamilies\u002Fto","families\u002Fto\u002Findex",[345,346,350,353,357,361,365,370,374,378,382,386,390,394,398,402,406,410,414,417,421,425,429,434,438,442],{"title":341,"path":342,"stem":343,"access":12,"icon":127},{"title":347,"path":348,"stem":349,"access":12},"aws-dynamo","\u002Ffamilies\u002Fto\u002Faws-dynamo","families\u002Fto\u002Faws-dynamo",{"title":129,"path":351,"stem":352,"access":12},"\u002Ffamilies\u002Fto\u002Faws-s3","families\u002Fto\u002Faws-s3",{"title":354,"path":355,"stem":356,"access":12},"browser-fs","\u002Ffamilies\u002Fto\u002Fbrowser-fs","families\u002Fto\u002Fbrowser-fs",{"title":358,"path":359,"stem":360,"access":12},"browser-idb","\u002Ffamilies\u002Fto\u002Fbrowser-idb","families\u002Fto\u002Fbrowser-idb",{"title":362,"path":363,"stem":364,"access":12},"browser-local","\u002Ffamilies\u002Fto\u002Fbrowser-local","families\u002Fto\u002Fbrowser-local",{"title":366,"path":367,"stem":368,"access":12,"icon":369},"Choosing a store","\u002Ffamilies\u002Fto\u002Fchoosing-a-store","families\u002Fto\u002Fchoosing-a-store","i-lucide-split",{"title":371,"path":372,"stem":373,"access":12},"cloudflare-d1","\u002Ffamilies\u002Fto\u002Fcloudflare-d1","families\u002Fto\u002Fcloudflare-d1",{"title":375,"path":376,"stem":377,"access":12},"cloudflare-r2","\u002Ffamilies\u002Fto\u002Fcloudflare-r2","families\u002Fto\u002Fcloudflare-r2",{"title":379,"path":380,"stem":381,"access":12},"drive","\u002Ffamilies\u002Fto\u002Fdrive","families\u002Fto\u002Fdrive",{"title":383,"path":384,"stem":385,"access":12},"file","\u002Ffamilies\u002Fto\u002Ffile","families\u002Fto\u002Ffile",{"title":387,"path":388,"stem":389,"access":12},"icloud","\u002Ffamilies\u002Fto\u002Ficloud","families\u002Fto\u002Ficloud",{"title":391,"path":392,"stem":393,"access":12},"memory","\u002Ffamilies\u002Fto\u002Fmemory","families\u002Fto\u002Fmemory",{"title":395,"path":396,"stem":397,"access":12},"meter","\u002Ffamilies\u002Fto\u002Fmeter","families\u002Fto\u002Fmeter",{"title":399,"path":400,"stem":401,"access":12},"mysql","\u002Ffamilies\u002Fto\u002Fmysql","families\u002Fto\u002Fmysql",{"title":403,"path":404,"stem":405,"access":12},"nfs","\u002Ffamilies\u002Fto\u002Fnfs","families\u002Fto\u002Fnfs",{"title":407,"path":408,"stem":409,"access":12},"postgres","\u002Ffamilies\u002Fto\u002Fpostgres","families\u002Fto\u002Fpostgres",{"title":411,"path":412,"stem":413,"access":12},"probe","\u002Ffamilies\u002Fto\u002Fprobe","families\u002Fto\u002Fprobe",{"title":263,"path":415,"stem":416,"access":12},"\u002Ffamilies\u002Fto\u002Frest","families\u002Fto\u002Frest",{"title":418,"path":419,"stem":420,"access":12},"smb","\u002Ffamilies\u002Fto\u002Fsmb","families\u002Fto\u002Fsmb",{"title":422,"path":423,"stem":424,"access":12},"sqlite","\u002Ffamilies\u002Fto\u002Fsqlite","families\u002Fto\u002Fsqlite",{"title":426,"path":427,"stem":428,"access":12},"ssh","\u002Ffamilies\u002Fto\u002Fssh","families\u002Fto\u002Fssh",{"title":430,"path":431,"stem":432,"access":12,"icon":433},"Store-locator descriptors","\u002Ffamilies\u002Fto\u002Fstore-locator","families\u002Fto\u002Fstore-locator","i-lucide-map-pin",{"title":435,"path":436,"stem":437,"access":12},"supabase","\u002Ffamilies\u002Fto\u002Fsupabase","families\u002Fto\u002Fsupabase",{"title":439,"path":440,"stem":441,"access":12},"turso","\u002Ffamilies\u002Fto\u002Fturso","families\u002Fto\u002Fturso",{"title":443,"path":444,"stem":445,"access":12},"webdav","\u002Ffamilies\u002Fto\u002Fwebdav","families\u002Fto\u002Fwebdav",{"title":447,"path":448,"stem":449,"children":450},"Faq","\u002Ffaq","faq",[451,454,458,462,466,470],{"title":10,"path":448,"stem":452,"access":12,"icon":453},"faq\u002Findex","i-lucide-circle-help",{"title":455,"path":456,"stem":457,"access":12},"Where can noy-db run?","\u002Ffaq\u002Fwhere-can-noy-db-run","faq\u002F1.where-can-noy-db-run",{"title":459,"path":460,"stem":461,"access":12},"Native mobile & PWA","\u002Ffaq\u002Fmobile-and-pwa","faq\u002F2.mobile-and-pwa",{"title":463,"path":464,"stem":465,"access":12},"Threat model","\u002Ffaq\u002Fthreat-model","faq\u002F3.threat-model",{"title":467,"path":468,"stem":469,"access":12},"Community & ecosystem","\u002Ffaq\u002Fcommunity-and-ecosystem","faq\u002F4.community-and-ecosystem",{"title":471,"path":472,"stem":473,"access":12},"Licensing","\u002Ffaq\u002Flicensing","faq\u002F5.licensing",{"title":475,"path":476,"stem":477,"children":478},"Glossary","\u002Fglossary","glossary",[479,482,486,490,494],{"title":10,"path":476,"stem":480,"access":12,"icon":481},"glossary\u002Findex","i-lucide-book-a",{"title":483,"path":484,"stem":485,"access":12},"Core vocabulary","\u002Fglossary\u002Fcore-vocabulary","glossary\u002Fcore-vocabulary",{"title":487,"path":488,"stem":489,"access":12},"Deletion vocabulary","\u002Fglossary\u002Fdeletion","glossary\u002Fdeletion",{"title":491,"path":492,"stem":493,"access":12},"Satellite collection vocabulary","\u002Fglossary\u002Fsatellite-collections","glossary\u002Fsatellite-collections",{"title":495,"path":496,"stem":497,"access":12},"Schema migration vocabulary","\u002Fglossary\u002Fschema-migration","glossary\u002Fschema-migration",{"title":499,"path":500,"stem":501,"children":502},"Recipes","\u002Frecipes","recipes",[503,506,510,514,518,522,526,530,534,538,542,546,550,554,558,562,567,571,575,580,584,588,592],{"title":10,"path":500,"stem":504,"access":12,"icon":505},"recipes\u002Findex","i-lucide-play",{"title":507,"path":508,"stem":509,"access":12},"Accounting app","\u002Frecipes\u002Faccounting-app","recipes\u002Faccounting-app",{"title":511,"path":512,"stem":513,"access":12},"Analytics app","\u002Frecipes\u002Fanalytics-app","recipes\u002Fanalytics-app",{"title":515,"path":516,"stem":517,"access":12},"Attestation verifier","\u002Frecipes\u002Fattestation-verifier","recipes\u002Fattestation-verifier",{"title":519,"path":520,"stem":521,"access":12},"AWS-KMS attestation","\u002Frecipes\u002Faws-kms-pdf-attestation","recipes\u002Faws-kms-pdf-attestation",{"title":523,"path":524,"stem":525,"access":12},"Browser durability","\u002Frecipes\u002Fbrowser-durability","recipes\u002Fbrowser-durability",{"title":527,"path":528,"stem":529,"access":12},"Production cloud store","\u002Frecipes\u002Fcloud-store","recipes\u002Fcloud-store",{"title":531,"path":532,"stem":533,"access":12},"Compose your own setup","\u002Frecipes\u002Fcompose-your-own","recipes\u002Fcompose-your-own",{"title":535,"path":536,"stem":537,"access":12},"Confidential HR records","\u002Frecipes\u002Fconfidential-hr","recipes\u002Fconfidential-hr",{"title":539,"path":540,"stem":541,"access":12},"Composing an echo secret","\u002Frecipes\u002Fecho-secret-enrollment","recipes\u002Fecho-secret-enrollment",{"title":543,"path":544,"stem":545,"access":12},"Email archive","\u002Frecipes\u002Femail-archive","recipes\u002Femail-archive",{"title":547,"path":548,"stem":549,"access":12},"Email archive — threads & revisions","\u002Frecipes\u002Femail-archive-threads-revisions","recipes\u002Femail-archive-threads-revisions",{"title":551,"path":552,"stem":553,"access":12},"Export & portability","\u002Frecipes\u002Fexport-portability","recipes\u002Fexport-portability",{"title":555,"path":556,"stem":557,"access":12},"Passwordless OIDC (AWS Cognito)","\u002Frecipes\u002Fpasswordless-oidc","recipes\u002Fpasswordless-oidc",{"title":559,"path":560,"stem":561,"access":12},"Personal notebook","\u002Frecipes\u002Fpersonal-notebook","recipes\u002Fpersonal-notebook",{"title":563,"path":564,"stem":565,"access":12,"icon":566},"Playgrounds","\u002Frecipes\u002Fplaygrounds","recipes\u002Fplaygrounds","i-lucide-gamepad-2",{"title":568,"path":569,"stem":570,"access":12},"React invoice app","\u002Frecipes\u002Freact-invoices","recipes\u002Freact-invoices",{"title":572,"path":573,"stem":574,"access":12},"Collaborative app","\u002Frecipes\u002Frealtime-crdt-app","recipes\u002Frealtime-crdt-app",{"title":576,"path":577,"stem":578,"access":12,"icon":579},"Run the showcases","\u002Frecipes\u002Frun-the-showcases","recipes\u002Frun-the-showcases","i-lucide-flask-conical",{"title":581,"path":582,"stem":583,"access":12},"Search & RAG","\u002Frecipes\u002Fsearch-rag","recipes\u002Fsearch-rag",{"title":585,"path":586,"stem":587,"access":12},"Team vault topology","\u002Frecipes\u002Fteam-vault-topology","recipes\u002Fteam-vault-topology",{"title":589,"path":590,"stem":591,"access":12},"Unlock ceremonies","\u002Frecipes\u002Funlock-ceremonies","recipes\u002Funlock-ceremonies",{"title":593,"path":594,"stem":595,"access":12},"User preferences","\u002Frecipes\u002Fuser-preferences","recipes\u002Fuser-preferences",{"title":597,"path":598,"stem":599,"children":600},"Services","\u002Fservices","services",[601,604,608,612,616,620,624,628,632,636,640,644,648,652,656,660,664,668,672,676,680,684,688,692,696,700,704,710,714,718,722,726,730,734,738,742,746,750,755,759,763,767,771,775,779,783,787,791,795,799,803,807,811,815,819,823,827,831,835,839,843,847,851,855,859,863,867,871,875,879,883,887,891,895,899],{"title":10,"path":598,"stem":602,"access":12,"icon":603},"services\u002Findex","i-lucide-layers",{"title":605,"path":606,"stem":607,"access":12},"archive","\u002Fservices\u002Farchive","services\u002Farchive",{"title":609,"path":610,"stem":611,"access":12},"attestation","\u002Fservices\u002Fattestation","services\u002Fattestation",{"title":613,"path":614,"stem":615,"access":12},"auth-introspection","\u002Fservices\u002Fauth-introspection","services\u002Fauth-introspection",{"title":617,"path":618,"stem":619,"access":12},"auth-landscape","\u002Fservices\u002Fauth-landscape","services\u002Fauth-landscape",{"title":621,"path":622,"stem":623,"access":12},"blobs","\u002Fservices\u002Fblobs","services\u002Fblobs",{"title":625,"path":626,"stem":627,"access":12},"broker","\u002Fservices\u002Fbroker","services\u002Fbroker",{"title":629,"path":630,"stem":631,"access":12},"bundle","\u002Fservices\u002Fbundle","services\u002Fbundle",{"title":633,"path":634,"stem":635,"access":12},"classified","\u002Fservices\u002Fclassified","services\u002Fclassified",{"title":637,"path":638,"stem":639,"access":12},"computed","\u002Fservices\u002Fcomputed","services\u002Fcomputed",{"title":641,"path":642,"stem":643,"access":12},"consent","\u002Fservices\u002Fconsent","services\u002Fconsent",{"title":645,"path":646,"stem":647,"access":12},"cover","\u002Fservices\u002Fcover","services\u002Fcover",{"title":649,"path":650,"stem":651,"access":12},"coverage","\u002Fservices\u002Fcoverage","services\u002Fcoverage",{"title":653,"path":654,"stem":655,"access":12},"crdt","\u002Fservices\u002Fcrdt","services\u002Fcrdt",{"title":657,"path":658,"stem":659,"access":12},"cross-join","\u002Fservices\u002Fcross-join","services\u002Fcross-join",{"title":661,"path":662,"stem":663,"access":12},"custody","\u002Fservices\u002Fcustody","services\u002Fcustody",{"title":665,"path":666,"stem":667,"access":12},"derivations","\u002Fservices\u002Fderivations","services\u002Fderivations",{"title":669,"path":670,"stem":671,"access":12},"directory","\u002Fservices\u002Fdirectory","services\u002Fdirectory",{"title":673,"path":674,"stem":675,"access":12},"search — AI","\u002Fservices\u002Fembeddings","services\u002Fembeddings",{"title":677,"path":678,"stem":679,"access":12},"Field metadata","\u002Fservices\u002Ffield-metadata","services\u002Ffield-metadata",{"title":681,"path":682,"stem":683,"access":12},"Foreign refs","\u002Fservices\u002Fforeign-refs","services\u002Fforeign-refs",{"title":685,"path":686,"stem":687,"access":12},"forget","\u002Fservices\u002Fforget","services\u002Fforget",{"title":689,"path":690,"stem":691,"access":12},"governance","\u002Fservices\u002Fgovernance","services\u002Fgovernance",{"title":693,"path":694,"stem":695,"access":12},"guards","\u002Fservices\u002Fguards","services\u002Fguards",{"title":697,"path":698,"stem":699,"access":12},"history","\u002Fservices\u002Fhistory","services\u002Fhistory",{"title":701,"path":702,"stem":703,"access":12},"i18n","\u002Fservices\u002Fi18n","services\u002Fi18n",{"title":705,"path":706,"stem":707,"children":708,"access":12},"indexing","\u002Fservices\u002Findexing","services\u002Findexing",[709],{"title":705,"path":706,"stem":707,"access":12},{"title":711,"path":712,"stem":713,"access":12},"introspection","\u002Fservices\u002Fintrospection","services\u002Fintrospection",{"title":715,"path":716,"stem":717,"access":12},"joins","\u002Fservices\u002Fjoins","services\u002Fjoins",{"title":719,"path":720,"stem":721,"access":12},"lazy","\u002Fservices\u002Flazy","services\u002Flazy",{"title":723,"path":724,"stem":725,"access":12},"links","\u002Fservices\u002Flinks","services\u002Flinks",{"title":727,"path":728,"stem":729,"access":12},"live","\u002Fservices\u002Flive","services\u002Flive",{"title":731,"path":732,"stem":733,"access":12},"lookup","\u002Fservices\u002Flookup","services\u002Flookup",{"title":735,"path":736,"stem":737,"access":12},"manifest","\u002Fservices\u002Fmanifest","services\u002Fmanifest",{"title":739,"path":740,"stem":741,"access":12},"materialized-views","\u002Fservices\u002Fmaterialized-views","services\u002Fmaterialized-views",{"title":743,"path":744,"stem":745,"access":12},"Metadata ladder","\u002Fservices\u002Fmetadata-ladder","services\u002Fmetadata-ladder",{"title":747,"path":748,"stem":749,"access":12},"Metadata riders","\u002Fservices\u002Fmetadata-riders","services\u002Fmetadata-riders",{"title":751,"path":752,"stem":753,"access":12,"badge":754},"metrics","\u002Fservices\u002Fmetrics","services\u002Fmetrics","Planned",{"title":756,"path":757,"stem":758,"access":12,"badge":754},"migrations","\u002Fservices\u002Fmigrations","services\u002Fmigrations",{"title":760,"path":761,"stem":762,"access":12},"money","\u002Fservices\u002Fmoney","services\u002Fmoney",{"title":764,"path":765,"stem":766,"access":12},"numbering","\u002Fservices\u002Fnumbering","services\u002Fnumbering",{"title":768,"path":769,"stem":770,"access":12},"overlay-views","\u002Fservices\u002Foverlay-views","services\u002Foverlay-views",{"title":772,"path":773,"stem":774,"access":12,"badge":754},"partitioning","\u002Fservices\u002Fpartitioning","services\u002Fpartitioning",{"title":776,"path":777,"stem":778,"access":12},"periods","\u002Fservices\u002Fperiods","services\u002Fperiods",{"title":780,"path":781,"stem":782,"access":12},"persisted-schemas","\u002Fservices\u002Fpersisted-schemas","services\u002Fpersisted-schemas",{"title":784,"path":785,"stem":786,"access":12},"plaintext-bypass","\u002Fservices\u002Fplaintext-bypass","services\u002Fplaintext-bypass",{"title":788,"path":789,"stem":790,"access":12},"pod-redirect","\u002Fservices\u002Fpod-redirect","services\u002Fpod-redirect",{"title":792,"path":793,"stem":794,"access":12},"pod-signature","\u002Fservices\u002Fpod-signature","services\u002Fpod-signature",{"title":796,"path":797,"stem":798,"access":12},"policy","\u002Fservices\u002Fpolicy","services\u002Fpolicy",{"title":800,"path":801,"stem":802,"access":12},"portability","\u002Fservices\u002Fportability","services\u002Fportability",{"title":804,"path":805,"stem":806,"access":12},"reduce","\u002Fservices\u002Freduce","services\u002Freduce",{"title":808,"path":809,"stem":810,"access":12},"routing","\u002Fservices\u002Frouting","services\u002Frouting",{"title":812,"path":813,"stem":814,"access":12},"satellites","\u002Fservices\u002Fsatellites","services\u002Fsatellites",{"title":816,"path":817,"stem":818,"access":12},"schema-identifiers","\u002Fservices\u002Fschema-identifiers","services\u002Fschema-identifiers",{"title":820,"path":821,"stem":822,"access":12},"schema-update","\u002Fservices\u002Fschema-update","services\u002Fschema-update",{"title":824,"path":825,"stem":826,"access":12},"sealed-record","\u002Fservices\u002Fsealed-record","services\u002Fsealed-record",{"title":828,"path":829,"stem":830,"access":12},"sealing provider id","\u002Fservices\u002Fsealing-pid-stability","services\u002Fsealing-pid-stability",{"title":832,"path":833,"stem":834,"access":12},"search — full-text","\u002Fservices\u002Fsearch","services\u002Fsearch",{"title":836,"path":837,"stem":838,"access":12},"sequence","\u002Fservices\u002Fsequence","services\u002Fsequence",{"title":840,"path":841,"stem":842,"access":12},"session","\u002Fservices\u002Fsession","services\u002Fsession",{"title":844,"path":845,"stem":846,"access":12},"session-tiers","\u002Fservices\u002Fsession-tiers","services\u002Fsession-tiers",{"title":848,"path":849,"stem":850,"access":12},"shadow","\u002Fservices\u002Fshadow","services\u002Fshadow",{"title":852,"path":853,"stem":854,"access":12},"share-link","\u002Fservices\u002Fshare-link","services\u002Fshare-link",{"title":856,"path":857,"stem":858,"access":12},"snapshots","\u002Fservices\u002Fsnapshots","services\u002Fsnapshots",{"title":860,"path":861,"stem":862,"access":12},"store capabilities","\u002Fservices\u002Fstorage-capability-matrix","services\u002Fstorage-capability-matrix",{"title":864,"path":865,"stem":866,"access":12},"sync","\u002Fservices\u002Fsync","services\u002Fsync",{"title":868,"path":869,"stem":870,"access":12},"team","\u002Fservices\u002Fteam","services\u002Fteam",{"title":872,"path":873,"stem":874,"access":12},"tiers","\u002Fservices\u002Ftiers","services\u002Ftiers",{"title":876,"path":877,"stem":878,"access":12},"transactions","\u002Fservices\u002Ftransactions","services\u002Ftransactions",{"title":880,"path":881,"stem":882,"access":12},"partitions","\u002Fservices\u002Ftransferable-partitions","services\u002Ftransferable-partitions",{"title":884,"path":885,"stem":886,"access":12},"user-envelope","\u002Fservices\u002Fuser-envelope","services\u002Fuser-envelope",{"title":888,"path":889,"stem":890,"access":12,"badge":754},"validation","\u002Fservices\u002Fvalidation","services\u002Fvalidation",{"title":892,"path":893,"stem":894,"access":12},"vault-head","\u002Fservices\u002Fvault-head","services\u002Fvault-head",{"title":896,"path":897,"stem":898,"access":12},"via","\u002Fservices\u002Fvia","services\u002Fvia",{"title":900,"path":901,"stem":902,"access":12},"withdrawal","\u002Fservices\u002Fwithdrawal","services\u002Fwithdrawal",{"title":904,"path":905,"stem":906,"children":907},"Start","\u002Fstart","start",[908,911,915,919,923],{"title":10,"path":905,"stem":909,"access":12,"icon":910},"start\u002Findex","i-lucide-flag",{"title":912,"path":913,"stem":914,"access":12},"Install","\u002Fstart\u002Finstall","start\u002F1.install",{"title":916,"path":917,"stem":918,"access":12},"Your first vault","\u002Fstart\u002Ffirst-vault","start\u002F2.first-vault",{"title":920,"path":921,"stem":922,"access":12},"Your first service","\u002Fstart\u002Ffirst-service","start\u002F3.first-service",{"title":924,"path":925,"stem":926,"access":12},"See the ciphertext","\u002Fstart\u002Fsee-the-ciphertext","start\u002F4.see-the-ciphertext",{"id":928,"title":864,"access":12,"apiToc":929,"body":930,"category":4519,"description":4520,"extension":4521,"meta":4522,"navigation":4519,"nest":4523,"path":865,"seo":4524,"sinceVersion":4519,"status":4525,"stem":866,"subtitle":4519,"tier":4526,"tocExternal":4519,"__hash__":4527},"docs\u002Fservices\u002Fsync.md",false,{"type":931,"value":932,"toc":4491},"minimark",[933,936,940,945,974,978,994,998,1041,1045,1267,1274,1428,1467,1471,1476,1639,1704,1724,1757,1812,1819,1850,1922,1941,1983,2111,2115,2134,2172,2182,2187,2340,2419,2444,2469,2473,2536,2550,2561,2565,2572,2715,2776,2779,2851,2886,2890,2934,2959,2981,2985,3019,3123,3146,3150,3162,3265,3272,3334,3347,3475,3518,3558,3561,3575,3746,3847,3880,3884,3985,3989,4087,4092,4151,4155,4262,4266,4291,4295,4340,4344,4381,4385,4443,4447,4487],[934,935,864],"h1",{"id":864},[937,938],"service-meta",{":rows":939},"[{\"label\":\"Subpath\",\"value\":\"`@noy-db\u002Fhub\u002Fsync`\"},{\"label\":\"Factory\",\"value\":\"`withSync()`\"},{\"label\":\"Layer\",\"value\":\"`with-sync`\"},{\"label\":\"Cluster\",\"value\":\"G — Collaboration & Auth\"},{\"label\":\"LOC cost\",\"value\":\"~856 (off-bundle when not opted in)\"}]",[941,942,944],"h2",{"id":943},"what-it-does","What it does",[946,947,948,949,953,954,958,959,962,963,966,967,970,971,973],"p",{},"Sync replicates a ",[950,951,952],"strong",{},"vault"," — noy-db's end-to-end-encrypted document store (see\n",[955,956,957],"a",{"href":48},"Vaults & collections",") — between a local store and one or more\nremote stores. It tracks which records changed locally since the last push (\"dirty tracking\"),\nsends only those changes to the remote, pulls back whatever the remote has that's newer, and\nresolves conflicts when both sides changed the same record. Everything that crosses the wire is\nthe same encrypted envelope your collections already write (see\n",[955,960,961],{"href":66},"Core 02 — Enclave","), so a remote store you don't fully trust — a cloud\nbucket, a peer's device — never sees plaintext. On top of replication, sync also exposes\n",[950,964,965],{},"presence",": short-lived \"who's looking at this collection right now\" awareness, broadcast over\nan ephemeral channel whose key is derived from the collection's data-encryption key (its ",[950,968,969],{},"DEK"," —\nsee ",[955,972,961],{"href":66},") via HKDF, a one-way key-derivation function. When\nthe store adapter supports real-time pub\u002Fsub, the whole presence message — user ID and payload\ntogether — travels encrypted under that key, so the adapter can't identify users either. Without\npub\u002Fsub support, presence falls back to polling records written to the store, and that fallback\nwrites the user ID in the clear (only the payload is encrypted) — see the storage-poll note below.",[941,975,977],{"id":976},"when-you-need-it","When you need it",[979,980,981,985,988,991],"ul",{},[982,983,984],"li",{},"Multi-device single-user apps (laptop + phone sharing one vault)",[982,986,987],{},"Multi-user collaboration where each device keeps a local cache plus a shared cloud target",[982,989,990],{},"Active backup \u002F archive replication to a second store",[982,992,993],{},"Live \"who's viewing this\" presence in a collaborative UI",[941,995,997],{"id":996},"prerequisites","Prerequisites",[979,999,1000,1022],{},[982,1001,1002,1005,1006,1010,1011,1014,1015,1017,1018,1021],{},[950,1003,1004],{},"A shared sync adapter"," — pass a store both devices can reach as the ",[1007,1008,1009],"code",{},"sync:"," option; ",[1007,1012,1013],{},"withSync()"," without it (or ",[1007,1016,1009],{}," without the strategy) throws on the first ",[1007,1019,1020],{},"openVault()",".",[982,1023,1024,1028,1029,1032,1033,1036,1037,1040],{},[1025,1026,1027],"em",{},"For real-time presence:"," the adapter must implement ",[1007,1030,1031],{},"presencePublish"," \u002F ",[1007,1034,1035],{},"presenceSubscribe","; ",[1007,1038,1039],{},"collection.presence()"," also always requires the strategy itself.",[941,1042,1044],{"id":1043},"opt-in","Opt in",[1046,1047,1052],"pre",{"className":1048,"code":1049,"language":1050,"meta":1051,"style":1051},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { createNoydb } from '@noy-db\u002Fhub'\nimport { withSync } from '@noy-db\u002Fhub\u002Fsync'\n\nconst db = await createNoydb({\n  store: localStore,       \u002F\u002F local cache — see Core 05: Stores\n  sync: remoteStore,       \u002F\u002F primary sync target\n  user: 'alice',\n  secret: 'alice-secret-2026',\n  syncStrategy: withSync(),\n})\nconst vault = await db.openVault('notes')\n","ts","",[1007,1053,1054,1087,1108,1115,1140,1160,1176,1195,1212,1227,1236],{"__ignoreMap":1051},[1055,1056,1059,1063,1067,1071,1074,1077,1080,1084],"span",{"class":1057,"line":1058},"line",1,[1055,1060,1062],{"class":1061},"s7zQu","import",[1055,1064,1066],{"class":1065},"sMK4o"," {",[1055,1068,1070],{"class":1069},"sTEyZ"," createNoydb",[1055,1072,1073],{"class":1065}," }",[1055,1075,1076],{"class":1061}," from",[1055,1078,1079],{"class":1065}," '",[1055,1081,1083],{"class":1082},"sfazB","@noy-db\u002Fhub",[1055,1085,1086],{"class":1065},"'\n",[1055,1088,1090,1092,1094,1097,1099,1101,1103,1106],{"class":1057,"line":1089},2,[1055,1091,1062],{"class":1061},[1055,1093,1066],{"class":1065},[1055,1095,1096],{"class":1069}," withSync",[1055,1098,1073],{"class":1065},[1055,1100,1076],{"class":1061},[1055,1102,1079],{"class":1065},[1055,1104,1105],{"class":1082},"@noy-db\u002Fhub\u002Fsync",[1055,1107,1086],{"class":1065},[1055,1109,1111],{"class":1057,"line":1110},3,[1055,1112,1114],{"emptyLinePlaceholder":1113},true,"\n",[1055,1116,1118,1122,1125,1128,1131,1134,1137],{"class":1057,"line":1117},4,[1055,1119,1121],{"class":1120},"spNyl","const",[1055,1123,1124],{"class":1069}," db ",[1055,1126,1127],{"class":1065},"=",[1055,1129,1130],{"class":1061}," await",[1055,1132,1070],{"class":1133},"s2Zo4",[1055,1135,1136],{"class":1069},"(",[1055,1138,1139],{"class":1065},"{\n",[1055,1141,1143,1147,1150,1153,1156],{"class":1057,"line":1142},5,[1055,1144,1146],{"class":1145},"swJcz","  store",[1055,1148,1149],{"class":1065},":",[1055,1151,1152],{"class":1069}," localStore",[1055,1154,1155],{"class":1065},",",[1055,1157,1159],{"class":1158},"sHwdD","       \u002F\u002F local cache — see Core 05: Stores\n",[1055,1161,1163,1166,1168,1171,1173],{"class":1057,"line":1162},6,[1055,1164,1165],{"class":1145},"  sync",[1055,1167,1149],{"class":1065},[1055,1169,1170],{"class":1069}," remoteStore",[1055,1172,1155],{"class":1065},[1055,1174,1175],{"class":1158},"       \u002F\u002F primary sync target\n",[1055,1177,1179,1182,1184,1186,1189,1192],{"class":1057,"line":1178},7,[1055,1180,1181],{"class":1145},"  user",[1055,1183,1149],{"class":1065},[1055,1185,1079],{"class":1065},[1055,1187,1188],{"class":1082},"alice",[1055,1190,1191],{"class":1065},"'",[1055,1193,1194],{"class":1065},",\n",[1055,1196,1198,1201,1203,1205,1208,1210],{"class":1057,"line":1197},8,[1055,1199,1200],{"class":1145},"  secret",[1055,1202,1149],{"class":1065},[1055,1204,1079],{"class":1065},[1055,1206,1207],{"class":1082},"alice-secret-2026",[1055,1209,1191],{"class":1065},[1055,1211,1194],{"class":1065},[1055,1213,1215,1218,1220,1222,1225],{"class":1057,"line":1214},9,[1055,1216,1217],{"class":1145},"  syncStrategy",[1055,1219,1149],{"class":1065},[1055,1221,1096],{"class":1133},[1055,1223,1224],{"class":1069},"()",[1055,1226,1194],{"class":1065},[1055,1228,1230,1233],{"class":1057,"line":1229},10,[1055,1231,1232],{"class":1065},"}",[1055,1234,1235],{"class":1069},")\n",[1055,1237,1239,1241,1244,1246,1248,1251,1253,1256,1258,1260,1263,1265],{"class":1057,"line":1238},11,[1055,1240,1121],{"class":1120},[1055,1242,1243],{"class":1069}," vault ",[1055,1245,1127],{"class":1065},[1055,1247,1130],{"class":1061},[1055,1249,1250],{"class":1069}," db",[1055,1252,1021],{"class":1065},[1055,1254,1255],{"class":1133},"openVault",[1055,1257,1136],{"class":1069},[1055,1259,1191],{"class":1065},[1055,1261,1262],{"class":1082},"notes",[1055,1264,1191],{"class":1065},[1055,1266,1235],{"class":1069},[946,1268,1269,1270,1273],{},"Multiple targets — a bidirectional peer plus a push-only archive — pass an array of\n",[1007,1271,1272],{},"{ store, role }"," pairs instead of a bare store:",[1046,1275,1277],{"className":1048,"code":1276,"language":1050,"meta":1051,"style":1051},"const db = await createNoydb({\n  store: localStore,\n  sync: [\n    { store: peerStore, role: 'sync-peer' },   \u002F\u002F bidirectional\n    { store: archiveStore, role: 'archive' },  \u002F\u002F push-only\n  ],\n  user: 'alice',\n  secret: 'alice-secret-2026',\n  syncStrategy: withSync(),\n})\n",[1007,1278,1279,1295,1305,1314,1347,1375,1382,1396,1410,1422],{"__ignoreMap":1051},[1055,1280,1281,1283,1285,1287,1289,1291,1293],{"class":1057,"line":1058},[1055,1282,1121],{"class":1120},[1055,1284,1124],{"class":1069},[1055,1286,1127],{"class":1065},[1055,1288,1130],{"class":1061},[1055,1290,1070],{"class":1133},[1055,1292,1136],{"class":1069},[1055,1294,1139],{"class":1065},[1055,1296,1297,1299,1301,1303],{"class":1057,"line":1089},[1055,1298,1146],{"class":1145},[1055,1300,1149],{"class":1065},[1055,1302,1152],{"class":1069},[1055,1304,1194],{"class":1065},[1055,1306,1307,1309,1311],{"class":1057,"line":1110},[1055,1308,1165],{"class":1145},[1055,1310,1149],{"class":1065},[1055,1312,1313],{"class":1069}," [\n",[1055,1315,1316,1319,1322,1324,1327,1329,1332,1334,1336,1339,1341,1344],{"class":1057,"line":1117},[1055,1317,1318],{"class":1065},"    {",[1055,1320,1321],{"class":1145}," store",[1055,1323,1149],{"class":1065},[1055,1325,1326],{"class":1069}," peerStore",[1055,1328,1155],{"class":1065},[1055,1330,1331],{"class":1145}," role",[1055,1333,1149],{"class":1065},[1055,1335,1079],{"class":1065},[1055,1337,1338],{"class":1082},"sync-peer",[1055,1340,1191],{"class":1065},[1055,1342,1343],{"class":1065}," },",[1055,1345,1346],{"class":1158},"   \u002F\u002F bidirectional\n",[1055,1348,1349,1351,1353,1355,1358,1360,1362,1364,1366,1368,1370,1372],{"class":1057,"line":1142},[1055,1350,1318],{"class":1065},[1055,1352,1321],{"class":1145},[1055,1354,1149],{"class":1065},[1055,1356,1357],{"class":1069}," archiveStore",[1055,1359,1155],{"class":1065},[1055,1361,1331],{"class":1145},[1055,1363,1149],{"class":1065},[1055,1365,1079],{"class":1065},[1055,1367,605],{"class":1082},[1055,1369,1191],{"class":1065},[1055,1371,1343],{"class":1065},[1055,1373,1374],{"class":1158},"  \u002F\u002F push-only\n",[1055,1376,1377,1380],{"class":1057,"line":1162},[1055,1378,1379],{"class":1069},"  ]",[1055,1381,1194],{"class":1065},[1055,1383,1384,1386,1388,1390,1392,1394],{"class":1057,"line":1178},[1055,1385,1181],{"class":1145},[1055,1387,1149],{"class":1065},[1055,1389,1079],{"class":1065},[1055,1391,1188],{"class":1082},[1055,1393,1191],{"class":1065},[1055,1395,1194],{"class":1065},[1055,1397,1398,1400,1402,1404,1406,1408],{"class":1057,"line":1197},[1055,1399,1200],{"class":1145},[1055,1401,1149],{"class":1065},[1055,1403,1079],{"class":1065},[1055,1405,1207],{"class":1082},[1055,1407,1191],{"class":1065},[1055,1409,1194],{"class":1065},[1055,1411,1412,1414,1416,1418,1420],{"class":1057,"line":1214},[1055,1413,1217],{"class":1145},[1055,1415,1149],{"class":1065},[1055,1417,1096],{"class":1133},[1055,1419,1224],{"class":1069},[1055,1421,1194],{"class":1065},[1055,1423,1424,1426],{"class":1057,"line":1229},[1055,1425,1232],{"class":1065},[1055,1427,1235],{"class":1069},[946,1429,1430,1431,1434,1435,1438,1439,1442,1443,1445,1446,1448,1449,1452,1453,1455,1456,1194,1459,1462,1463,1466],{},"Roles: ",[1007,1432,1433],{},"'sync-peer'"," pushes and pulls; ",[1007,1436,1437],{},"'backup'"," and ",[1007,1440,1441],{},"'archive'"," only ever receive pushes — they\nnever feed data back into the local store. This holds even when a ",[1007,1444,1437],{},"\u002F",[1007,1447,1441],{}," target\nends up elected as the ",[1025,1450,1451],{},"primary"," (a config with no ",[1007,1454,1433],{}," at all): since ",[1007,1457,1458],{},"0.3.0-pre.8",[1007,1460,1461],{},"db.pull()"," against such a primary is a no-op returning an empty result, and ",[1007,1464,1465],{},"db.sync()"," runs\npush-only against it — a backup sink is never pulled from.",[941,1468,1470],{"id":1469},"usage","Usage",[1472,1473,1475],"h3",{"id":1474},"push-pull-and-status","Push, pull, and status",[1046,1477,1479],{"className":1048,"code":1478,"language":1050,"meta":1051,"style":1051},"interface Note { title: string; body: string }\nconst notes = vault.collection\u003CNote>('notes')\n\nawait notes.put('n1', { title: 'Grocery list', body: 'eggs, milk' })\n\nconst pushResult = await db.push('notes')\n",[1007,1480,1481,1513,1549,1553,1607,1611],{"__ignoreMap":1051},[1055,1482,1483,1486,1490,1492,1495,1497,1500,1503,1506,1508,1510],{"class":1057,"line":1058},[1055,1484,1485],{"class":1120},"interface",[1055,1487,1489],{"class":1488},"sBMFI"," Note",[1055,1491,1066],{"class":1065},[1055,1493,1494],{"class":1145}," title",[1055,1496,1149],{"class":1065},[1055,1498,1499],{"class":1488}," string",[1055,1501,1502],{"class":1065},";",[1055,1504,1505],{"class":1145}," body",[1055,1507,1149],{"class":1065},[1055,1509,1499],{"class":1488},[1055,1511,1512],{"class":1065}," }\n",[1055,1514,1515,1517,1520,1522,1525,1527,1530,1533,1536,1539,1541,1543,1545,1547],{"class":1057,"line":1089},[1055,1516,1121],{"class":1120},[1055,1518,1519],{"class":1069}," notes ",[1055,1521,1127],{"class":1065},[1055,1523,1524],{"class":1069}," vault",[1055,1526,1021],{"class":1065},[1055,1528,1529],{"class":1133},"collection",[1055,1531,1532],{"class":1065},"\u003C",[1055,1534,1535],{"class":1488},"Note",[1055,1537,1538],{"class":1065},">",[1055,1540,1136],{"class":1069},[1055,1542,1191],{"class":1065},[1055,1544,1262],{"class":1082},[1055,1546,1191],{"class":1065},[1055,1548,1235],{"class":1069},[1055,1550,1551],{"class":1057,"line":1110},[1055,1552,1114],{"emptyLinePlaceholder":1113},[1055,1554,1555,1558,1561,1563,1566,1568,1570,1573,1575,1577,1579,1581,1583,1585,1588,1590,1592,1594,1596,1598,1601,1603,1605],{"class":1057,"line":1117},[1055,1556,1557],{"class":1061},"await",[1055,1559,1560],{"class":1069}," notes",[1055,1562,1021],{"class":1065},[1055,1564,1565],{"class":1133},"put",[1055,1567,1136],{"class":1069},[1055,1569,1191],{"class":1065},[1055,1571,1572],{"class":1082},"n1",[1055,1574,1191],{"class":1065},[1055,1576,1155],{"class":1065},[1055,1578,1066],{"class":1065},[1055,1580,1494],{"class":1145},[1055,1582,1149],{"class":1065},[1055,1584,1079],{"class":1065},[1055,1586,1587],{"class":1082},"Grocery list",[1055,1589,1191],{"class":1065},[1055,1591,1155],{"class":1065},[1055,1593,1505],{"class":1145},[1055,1595,1149],{"class":1065},[1055,1597,1079],{"class":1065},[1055,1599,1600],{"class":1082},"eggs, milk",[1055,1602,1191],{"class":1065},[1055,1604,1073],{"class":1065},[1055,1606,1235],{"class":1069},[1055,1608,1609],{"class":1057,"line":1142},[1055,1610,1114],{"emptyLinePlaceholder":1113},[1055,1612,1613,1615,1618,1620,1622,1624,1626,1629,1631,1633,1635,1637],{"class":1057,"line":1162},[1055,1614,1121],{"class":1120},[1055,1616,1617],{"class":1069}," pushResult ",[1055,1619,1127],{"class":1065},[1055,1621,1130],{"class":1061},[1055,1623,1250],{"class":1069},[1055,1625,1021],{"class":1065},[1055,1627,1628],{"class":1133},"push",[1055,1630,1136],{"class":1069},[1055,1632,1191],{"class":1065},[1055,1634,1262],{"class":1082},[1055,1636,1191],{"class":1065},[1055,1638,1235],{"class":1069},[1046,1640,1643],{"className":1641,"code":1642,"language":141,"meta":1051,"style":1051},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{ \"pushed\": 1, \"conflicts\": [], \"errors\": [], \"erasures\": [] }\n",[1007,1644,1645],{"__ignoreMap":1051},[1055,1646,1647,1650,1653,1656,1659,1661,1665,1667,1669,1672,1674,1676,1679,1681,1684,1686,1688,1690,1692,1695,1697,1699,1702],{"class":1057,"line":1058},[1055,1648,1649],{"class":1065},"{",[1055,1651,1652],{"class":1065}," \"",[1055,1654,1655],{"class":1120},"pushed",[1055,1657,1658],{"class":1065},"\"",[1055,1660,1149],{"class":1065},[1055,1662,1664],{"class":1663},"sbssI"," 1",[1055,1666,1155],{"class":1065},[1055,1668,1652],{"class":1065},[1055,1670,1671],{"class":1120},"conflicts",[1055,1673,1658],{"class":1065},[1055,1675,1149],{"class":1065},[1055,1677,1678],{"class":1065}," [],",[1055,1680,1652],{"class":1065},[1055,1682,1683],{"class":1120},"errors",[1055,1685,1658],{"class":1065},[1055,1687,1149],{"class":1065},[1055,1689,1678],{"class":1065},[1055,1691,1652],{"class":1065},[1055,1693,1694],{"class":1120},"erasures",[1055,1696,1658],{"class":1065},[1055,1698,1149],{"class":1065},[1055,1700,1701],{"class":1065}," []",[1055,1703,1512],{"class":1065},[946,1705,1706,1709,1710,1713,1714,1716,1717,1719,1720,1723],{},[1007,1707,1708],{},"db.push(vault, options?)"," sends only ",[950,1711,1712],{},"dirty"," records — ones written locally since the last\nsuccessful push — to the vault's primary sync target (the first ",[1007,1715,1433],{},", or the first\nconfigured target if none is marked ",[1007,1718,1433],{},"). ",[1007,1721,1722],{},"db.pull(vault, options?)"," is the mirror: it\nreads the remote's full snapshot and applies anything newer than the local copy.",[1046,1725,1727],{"className":1048,"code":1726,"language":1050,"meta":1051,"style":1051},"const pullResult = await db.pull('notes')\n",[1007,1728,1729],{"__ignoreMap":1051},[1055,1730,1731,1733,1736,1738,1740,1742,1744,1747,1749,1751,1753,1755],{"class":1057,"line":1058},[1055,1732,1121],{"class":1120},[1055,1734,1735],{"class":1069}," pullResult ",[1055,1737,1127],{"class":1065},[1055,1739,1130],{"class":1061},[1055,1741,1250],{"class":1069},[1055,1743,1021],{"class":1065},[1055,1745,1746],{"class":1133},"pull",[1055,1748,1136],{"class":1069},[1055,1750,1191],{"class":1065},[1055,1752,1262],{"class":1082},[1055,1754,1191],{"class":1065},[1055,1756,1235],{"class":1069},[1046,1758,1760],{"className":1641,"code":1759,"language":141,"meta":1051,"style":1051},"{ \"pulled\": 3, \"conflicts\": [], \"errors\": [], \"erasures\": [] }\n",[1007,1761,1762],{"__ignoreMap":1051},[1055,1763,1764,1766,1768,1771,1773,1775,1778,1780,1782,1784,1786,1788,1790,1792,1794,1796,1798,1800,1802,1804,1806,1808,1810],{"class":1057,"line":1058},[1055,1765,1649],{"class":1065},[1055,1767,1652],{"class":1065},[1055,1769,1770],{"class":1120},"pulled",[1055,1772,1658],{"class":1065},[1055,1774,1149],{"class":1065},[1055,1776,1777],{"class":1663}," 3",[1055,1779,1155],{"class":1065},[1055,1781,1652],{"class":1065},[1055,1783,1671],{"class":1120},[1055,1785,1658],{"class":1065},[1055,1787,1149],{"class":1065},[1055,1789,1678],{"class":1065},[1055,1791,1652],{"class":1065},[1055,1793,1683],{"class":1120},[1055,1795,1658],{"class":1065},[1055,1797,1149],{"class":1065},[1055,1799,1678],{"class":1065},[1055,1801,1652],{"class":1065},[1055,1803,1694],{"class":1120},[1055,1805,1658],{"class":1065},[1055,1807,1149],{"class":1065},[1055,1809,1701],{"class":1065},[1055,1811,1512],{"class":1065},[946,1813,1814,1815,1818],{},"Check what's outstanding at any time with ",[1007,1816,1817],{},"db.syncStatus(vault)"," — it reads the engine's tracked\ndirty log, no network call:",[1046,1820,1822],{"className":1048,"code":1821,"language":1050,"meta":1051,"style":1051},"const status = db.syncStatus('notes')\n",[1007,1823,1824],{"__ignoreMap":1051},[1055,1825,1826,1828,1831,1833,1835,1837,1840,1842,1844,1846,1848],{"class":1057,"line":1058},[1055,1827,1121],{"class":1120},[1055,1829,1830],{"class":1069}," status ",[1055,1832,1127],{"class":1065},[1055,1834,1250],{"class":1069},[1055,1836,1021],{"class":1065},[1055,1838,1839],{"class":1133},"syncStatus",[1055,1841,1136],{"class":1069},[1055,1843,1191],{"class":1065},[1055,1845,1262],{"class":1082},[1055,1847,1191],{"class":1065},[1055,1849,1235],{"class":1069},[1046,1851,1853],{"className":1641,"code":1852,"language":141,"meta":1051,"style":1051},"{ \"dirty\": 0, \"lastPush\": \"2026-07-08T10:02:00.000Z\", \"lastPull\": \"2026-07-08T10:02:05.000Z\", \"online\": true }\n",[1007,1854,1855],{"__ignoreMap":1051},[1055,1856,1857,1859,1861,1863,1865,1867,1870,1872,1874,1877,1879,1881,1883,1886,1888,1890,1892,1895,1897,1899,1901,1904,1906,1908,1910,1913,1915,1917,1920],{"class":1057,"line":1058},[1055,1858,1649],{"class":1065},[1055,1860,1652],{"class":1065},[1055,1862,1712],{"class":1120},[1055,1864,1658],{"class":1065},[1055,1866,1149],{"class":1065},[1055,1868,1869],{"class":1663}," 0",[1055,1871,1155],{"class":1065},[1055,1873,1652],{"class":1065},[1055,1875,1876],{"class":1120},"lastPush",[1055,1878,1658],{"class":1065},[1055,1880,1149],{"class":1065},[1055,1882,1652],{"class":1065},[1055,1884,1885],{"class":1082},"2026-07-08T10:02:00.000Z",[1055,1887,1658],{"class":1065},[1055,1889,1155],{"class":1065},[1055,1891,1652],{"class":1065},[1055,1893,1894],{"class":1120},"lastPull",[1055,1896,1658],{"class":1065},[1055,1898,1149],{"class":1065},[1055,1900,1652],{"class":1065},[1055,1902,1903],{"class":1082},"2026-07-08T10:02:05.000Z",[1055,1905,1658],{"class":1065},[1055,1907,1155],{"class":1065},[1055,1909,1652],{"class":1065},[1055,1911,1912],{"class":1120},"online",[1055,1914,1658],{"class":1065},[1055,1916,1149],{"class":1065},[1055,1918,1919],{"class":1065}," true",[1055,1921,1512],{"class":1065},[946,1923,1924,1927,1928,1445,1930,1932,1933,1935,1936,1445,1938,1940],{},[1007,1925,1926],{},"db.sync(vault, options?)"," is a convenience that pulls then pushes in one call and, unlike\n",[1007,1929,1628],{},[1007,1931,1746],{}," on their own, fans out to every configured target: ",[1007,1934,1433],{}," targets get a full\npull+push, ",[1007,1937,1437],{},[1007,1939,1441],{}," targets get push-only.",[1046,1942,1944],{"className":1048,"code":1943,"language":1050,"meta":1051,"style":1051},"const { pull, push } = await db.sync('notes')\n",[1007,1945,1946],{"__ignoreMap":1051},[1055,1947,1948,1950,1952,1955,1957,1960,1962,1965,1967,1969,1971,1973,1975,1977,1979,1981],{"class":1057,"line":1058},[1055,1949,1121],{"class":1120},[1055,1951,1066],{"class":1065},[1055,1953,1954],{"class":1069}," pull",[1055,1956,1155],{"class":1065},[1055,1958,1959],{"class":1069}," push ",[1055,1961,1232],{"class":1065},[1055,1963,1964],{"class":1065}," =",[1055,1966,1130],{"class":1061},[1055,1968,1250],{"class":1069},[1055,1970,1021],{"class":1065},[1055,1972,864],{"class":1133},[1055,1974,1136],{"class":1069},[1055,1976,1191],{"class":1065},[1055,1978,1262],{"class":1082},[1055,1980,1191],{"class":1065},[1055,1982,1235],{"class":1069},[1046,1984,1986],{"className":1641,"code":1985,"language":141,"meta":1051,"style":1051},"{\n  \"pull\": { \"pulled\": 3, \"conflicts\": [], \"errors\": [], \"erasures\": [] },\n  \"push\": { \"pushed\": 1, \"conflicts\": [], \"errors\": [], \"erasures\": [] }\n}\n",[1007,1987,1988,1992,2050,2106],{"__ignoreMap":1051},[1055,1989,1990],{"class":1057,"line":1058},[1055,1991,1139],{"class":1065},[1055,1993,1994,1997,1999,2001,2003,2005,2007,2009,2011,2013,2015,2017,2019,2021,2023,2025,2027,2029,2031,2033,2035,2037,2039,2041,2043,2045,2047],{"class":1057,"line":1089},[1055,1995,1996],{"class":1065},"  \"",[1055,1998,1746],{"class":1120},[1055,2000,1658],{"class":1065},[1055,2002,1149],{"class":1065},[1055,2004,1066],{"class":1065},[1055,2006,1652],{"class":1065},[1055,2008,1770],{"class":1488},[1055,2010,1658],{"class":1065},[1055,2012,1149],{"class":1065},[1055,2014,1777],{"class":1663},[1055,2016,1155],{"class":1065},[1055,2018,1652],{"class":1065},[1055,2020,1671],{"class":1488},[1055,2022,1658],{"class":1065},[1055,2024,1149],{"class":1065},[1055,2026,1678],{"class":1065},[1055,2028,1652],{"class":1065},[1055,2030,1683],{"class":1488},[1055,2032,1658],{"class":1065},[1055,2034,1149],{"class":1065},[1055,2036,1678],{"class":1065},[1055,2038,1652],{"class":1065},[1055,2040,1694],{"class":1488},[1055,2042,1658],{"class":1065},[1055,2044,1149],{"class":1065},[1055,2046,1701],{"class":1065},[1055,2048,2049],{"class":1065}," },\n",[1055,2051,2052,2054,2056,2058,2060,2062,2064,2066,2068,2070,2072,2074,2076,2078,2080,2082,2084,2086,2088,2090,2092,2094,2096,2098,2100,2102,2104],{"class":1057,"line":1110},[1055,2053,1996],{"class":1065},[1055,2055,1628],{"class":1120},[1055,2057,1658],{"class":1065},[1055,2059,1149],{"class":1065},[1055,2061,1066],{"class":1065},[1055,2063,1652],{"class":1065},[1055,2065,1655],{"class":1488},[1055,2067,1658],{"class":1065},[1055,2069,1149],{"class":1065},[1055,2071,1664],{"class":1663},[1055,2073,1155],{"class":1065},[1055,2075,1652],{"class":1065},[1055,2077,1671],{"class":1488},[1055,2079,1658],{"class":1065},[1055,2081,1149],{"class":1065},[1055,2083,1678],{"class":1065},[1055,2085,1652],{"class":1065},[1055,2087,1683],{"class":1488},[1055,2089,1658],{"class":1065},[1055,2091,1149],{"class":1065},[1055,2093,1678],{"class":1065},[1055,2095,1652],{"class":1065},[1055,2097,1694],{"class":1488},[1055,2099,1658],{"class":1065},[1055,2101,1149],{"class":1065},[1055,2103,1701],{"class":1065},[1055,2105,1512],{"class":1065},[1055,2107,2108],{"class":1057,"line":1117},[1055,2109,2110],{"class":1065},"}\n",[1472,2112,2114],{"id":2113},"the-automation-ladder","The automation ladder",[946,2116,2117,2118,2121,2122,2124,2125,2127,2128,2130,2131,2133],{},"Everything above is ",[950,2119,2120],{},"rung 1 — explicit",": replication happens when you call ",[1007,2123,1628],{},", ",[1007,2126,1746],{}," or\n",[1007,2129,864],{},", and at no other time. That is the whole behavior you get from ",[1007,2132,1009],{}," alone, and it is\nwhere you stay unless you do the one thing below.",[2135,2136,2139],"callout",{"color":2137,"icon":2138},"warning","i-lucide-alert-triangle",[946,2140,2141,2148,2149,2152,2153,2156,2157,2160,2161,2164,2165,2168,2169,2171],{},[950,2142,2143,2144,2147],{},"Declaring ",[1007,2145,2146],{},"syncPolicy"," is the opt-in."," noy-db resolves a policy from the store category —\nper-record stores get ",[1007,2150,2151],{},"INDEXED_STORE_POLICY",", pod stores get ",[1007,2154,2155],{},"POD_STORE_POLICY"," — but ",[1025,2158,2159],{},"resolving","\none does not start anything. The scheduler starts only for a policy you ",[950,2162,2163],{},"declared",", via\n",[1007,2166,2167],{},"createNoydb({ syncPolicy })"," or a per-target ",[1007,2170,796],{},". Fall back to the resolved default and you\nstay on rung 1 forever.",[946,2173,2174,2175,2178,2179,1021],{},"That distinction is deliberate rather than an oversight. Starting automation on the resolved\ndefault was tried and rejected: ",[1007,2176,2177],{},"push: 'on-change'"," fires an unawaited push, which races anything\nelse touching the remote, so turning it on by inference made previously deterministic behavior\nracy — including a conflict-resolution ",[1025,2180,2181],{},"outcome",[2183,2184,2186],"h4",{"id":2185},"rung-2-declare-a-policy","Rung 2 — declare a policy",[1046,2188,2190],{"className":1048,"code":2189,"language":1050,"meta":1051,"style":1051},"const db = await createNoydb({\n  user: 'me',\n  store: \u002F* … *\u002F,\n  sync: remote,\n  syncPolicy: {\n    push: { mode: 'on-change', minIntervalMs: 0, onUnload: true },\n    pull: { mode: 'interval', intervalMs: 60_000 },\n  },\n})\n",[1007,2191,2192,2208,2223,2234,2245,2255,2297,2329,2334],{"__ignoreMap":1051},[1055,2193,2194,2196,2198,2200,2202,2204,2206],{"class":1057,"line":1058},[1055,2195,1121],{"class":1120},[1055,2197,1124],{"class":1069},[1055,2199,1127],{"class":1065},[1055,2201,1130],{"class":1061},[1055,2203,1070],{"class":1133},[1055,2205,1136],{"class":1069},[1055,2207,1139],{"class":1065},[1055,2209,2210,2212,2214,2216,2219,2221],{"class":1057,"line":1089},[1055,2211,1181],{"class":1145},[1055,2213,1149],{"class":1065},[1055,2215,1079],{"class":1065},[1055,2217,2218],{"class":1082},"me",[1055,2220,1191],{"class":1065},[1055,2222,1194],{"class":1065},[1055,2224,2225,2227,2229,2232],{"class":1057,"line":1110},[1055,2226,1146],{"class":1145},[1055,2228,1149],{"class":1065},[1055,2230,2231],{"class":1158}," \u002F* … *\u002F",[1055,2233,1194],{"class":1065},[1055,2235,2236,2238,2240,2243],{"class":1057,"line":1117},[1055,2237,1165],{"class":1145},[1055,2239,1149],{"class":1065},[1055,2241,2242],{"class":1069}," remote",[1055,2244,1194],{"class":1065},[1055,2246,2247,2250,2252],{"class":1057,"line":1142},[1055,2248,2249],{"class":1145},"  syncPolicy",[1055,2251,1149],{"class":1065},[1055,2253,2254],{"class":1065}," {\n",[1055,2256,2257,2260,2262,2264,2267,2269,2271,2274,2276,2278,2281,2283,2285,2287,2290,2292,2295],{"class":1057,"line":1162},[1055,2258,2259],{"class":1145},"    push",[1055,2261,1149],{"class":1065},[1055,2263,1066],{"class":1065},[1055,2265,2266],{"class":1145}," mode",[1055,2268,1149],{"class":1065},[1055,2270,1079],{"class":1065},[1055,2272,2273],{"class":1082},"on-change",[1055,2275,1191],{"class":1065},[1055,2277,1155],{"class":1065},[1055,2279,2280],{"class":1145}," minIntervalMs",[1055,2282,1149],{"class":1065},[1055,2284,1869],{"class":1663},[1055,2286,1155],{"class":1065},[1055,2288,2289],{"class":1145}," onUnload",[1055,2291,1149],{"class":1065},[1055,2293,1919],{"class":2294},"sfNiH",[1055,2296,2049],{"class":1065},[1055,2298,2299,2302,2304,2306,2308,2310,2312,2315,2317,2319,2322,2324,2327],{"class":1057,"line":1178},[1055,2300,2301],{"class":1145},"    pull",[1055,2303,1149],{"class":1065},[1055,2305,1066],{"class":1065},[1055,2307,2266],{"class":1145},[1055,2309,1149],{"class":1065},[1055,2311,1079],{"class":1065},[1055,2313,2314],{"class":1082},"interval",[1055,2316,1191],{"class":1065},[1055,2318,1155],{"class":1065},[1055,2320,2321],{"class":1145}," intervalMs",[1055,2323,1149],{"class":1065},[1055,2325,2326],{"class":1663}," 60_000",[1055,2328,2049],{"class":1065},[1055,2330,2331],{"class":1057,"line":1197},[1055,2332,2333],{"class":1065},"  },\n",[1055,2335,2336,2338],{"class":1057,"line":1214},[1055,2337,1232],{"class":1065},[1055,2339,1235],{"class":1069},[2341,2342,2343,2356],"table",{},[2344,2345,2346],"thead",{},[2347,2348,2349,2353],"tr",{},[2350,2351,2352],"th",{},"Half",[2350,2354,2355],{},"Modes",[2357,2358,2359,2392],"tbody",{},[2347,2360,2361,2366],{},[2362,2363,2364],"td",{},[1007,2365,1628],{},[2362,2367,2368,2371,2372,2374,2375,2378,2379,2382,2383,2386,2387,2378,2390],{},[1007,2369,2370],{},"manual"," · ",[1007,2373,2273],{}," (after every local write, respecting ",[1007,2376,2377],{},"minIntervalMs",") · ",[1007,2380,2381],{},"debounce"," (after ",[1007,2384,2385],{},"debounceMs"," of quiet, default ",[1007,2388,2389],{},"30_000",[1007,2391,2314],{},[2347,2393,2394,2398],{},[2362,2395,2396],{},[1007,2397,1746],{},[2362,2399,2400,2371,2402,2404,2405,2408,2409,2378,2412,2415,2416],{},[1007,2401,2370],{},[1007,2403,2314],{}," (",[1007,2406,2407],{},"intervalMs",", default ",[1007,2410,2411],{},"60_000",[1007,2413,2414],{},"on-focus"," (tab regains visibility) · ",[1007,2417,2418],{},"phased",[946,2420,2421,2424,2425,2428,2429,2432,2433,2436,2437,2440,2441,1021],{},[1007,2422,2423],{},"push.onUnload"," (default ",[1007,2426,2427],{},"true"," for non-manual modes) forces a final push on ",[1007,2430,2431],{},"pagehide"," \u002F\n",[1007,2434,2435],{},"visibilitychange → hidden"," in browsers and ",[1007,2438,2439],{},"beforeExit"," in Node. The escape hatch — automation\noff, but declared rather than inferred — is\n",[1007,2442,2443],{},"{ push: { mode: 'manual' }, pull: { mode: 'manual' } }",[946,2445,2446,2449,2450,2452,2453,2455,2456,2458,2459,2461,2462,2465,2466,2468],{},[950,2447,2448],{},"Scheduler-initiated pulls are role-gated."," Only a ",[1007,2451,1433],{}," target auto-pulls; a ",[1007,2454,1437],{},"\nor ",[1007,2457,1441],{}," target with an ",[1007,2460,2314],{}," pull policy does ",[950,2463,2464],{},"not",", because a backup sink has no\nbusiness feeding data back. An explicit ",[1007,2467,1461],{}," still pulls for every role.",[2183,2470,2472],{"id":2471},"rung-3-phased-pull","Rung 3 — phased pull",[1046,2474,2476],{"className":1048,"code":2475,"language":1050,"meta":1051,"style":1051},"pull: { mode: 'phased', sequence: ['clients', 'invoices', 'attachments'] }\n",[1007,2477,2478],{"__ignoreMap":1051},[1055,2479,2480,2482,2484,2486,2488,2490,2492,2494,2496,2498,2501,2503,2506,2508,2511,2513,2515,2517,2520,2522,2524,2526,2529,2531,2534],{"class":1057,"line":1058},[1055,2481,1746],{"class":1488},[1055,2483,1149],{"class":1065},[1055,2485,1066],{"class":1065},[1055,2487,2266],{"class":1488},[1055,2489,1149],{"class":1065},[1055,2491,1079],{"class":1065},[1055,2493,2418],{"class":1082},[1055,2495,1191],{"class":1065},[1055,2497,1155],{"class":1065},[1055,2499,2500],{"class":1488}," sequence",[1055,2502,1149],{"class":1065},[1055,2504,2505],{"class":1145}," [",[1055,2507,1191],{"class":1065},[1055,2509,2510],{"class":1082},"clients",[1055,2512,1191],{"class":1065},[1055,2514,1155],{"class":1065},[1055,2516,1079],{"class":1065},[1055,2518,2519],{"class":1082},"invoices",[1055,2521,1191],{"class":1065},[1055,2523,1155],{"class":1065},[1055,2525,1079],{"class":1065},[1055,2527,2528],{"class":1082},"attachments",[1055,2530,1191],{"class":1065},[1055,2532,2533],{"class":1145},"] ",[1055,2535,2110],{"class":1065},[946,2537,2538,2539,2542,2543,2546,2547,2549],{},"Collections are pulled ",[950,2540,2541],{},"one at a time, in the order given"," — each phase an ordinary\n",[1007,2544,2545],{},"pull({ collections: [name] })",". It is strictly sequential; running phases concurrently would\ndefeat the prioritisation that is the entire point. A failing phase does not abort the ones behind\nit. When the sequence drains, the scheduler settles into steady state — ",[1007,2548,2407],{}," if you gave\none, idle if you didn't — so bootstrap and steady-state sync are one flow rather than two APIs.",[946,2551,2552,2554,2555,2557,2558,1021],{},[1007,2553,836],{}," entries must be non-empty and unique, and ",[1007,2556,836],{}," is rejected unless\n",[1007,2559,2560],{},"mode: 'phased'",[2183,2562,2564],{"id":2563},"rung-4-readiness","Rung 4 — readiness",[946,2566,2567,2568,2571],{},"Under a phased pull, a ",[1007,2569,2570],{},"get()"," miss is ambiguous: the record may not exist, or its collection may\nsimply not have arrived yet. Readiness is how you tell those apart.",[1046,2573,2575],{"className":1048,"code":2574,"language":1050,"meta":1051,"style":1051},"const inv = await invoices.get('inv-1')\nconst { readiness } = db.syncStatus('acme')\n\nif (inv === null && readiness?.get('invoices') !== 'live') showSkeleton()\nelse if (inv === null) showNotFound()\n",[1007,2576,2577,2607,2637,2641,2694],{"__ignoreMap":1051},[1055,2578,2579,2581,2584,2586,2588,2591,2593,2596,2598,2600,2603,2605],{"class":1057,"line":1058},[1055,2580,1121],{"class":1120},[1055,2582,2583],{"class":1069}," inv ",[1055,2585,1127],{"class":1065},[1055,2587,1130],{"class":1061},[1055,2589,2590],{"class":1069}," invoices",[1055,2592,1021],{"class":1065},[1055,2594,2595],{"class":1133},"get",[1055,2597,1136],{"class":1069},[1055,2599,1191],{"class":1065},[1055,2601,2602],{"class":1082},"inv-1",[1055,2604,1191],{"class":1065},[1055,2606,1235],{"class":1069},[1055,2608,2609,2611,2613,2616,2618,2620,2622,2624,2626,2628,2630,2633,2635],{"class":1057,"line":1089},[1055,2610,1121],{"class":1120},[1055,2612,1066],{"class":1065},[1055,2614,2615],{"class":1069}," readiness ",[1055,2617,1232],{"class":1065},[1055,2619,1964],{"class":1065},[1055,2621,1250],{"class":1069},[1055,2623,1021],{"class":1065},[1055,2625,1839],{"class":1133},[1055,2627,1136],{"class":1069},[1055,2629,1191],{"class":1065},[1055,2631,2632],{"class":1082},"acme",[1055,2634,1191],{"class":1065},[1055,2636,1235],{"class":1069},[1055,2638,2639],{"class":1057,"line":1110},[1055,2640,1114],{"emptyLinePlaceholder":1113},[1055,2642,2643,2646,2649,2652,2655,2658,2661,2664,2666,2668,2670,2672,2674,2677,2680,2682,2684,2686,2688,2691],{"class":1057,"line":1117},[1055,2644,2645],{"class":1061},"if",[1055,2647,2648],{"class":1069}," (inv ",[1055,2650,2651],{"class":1065},"===",[1055,2653,2654],{"class":1065}," null",[1055,2656,2657],{"class":1065}," &&",[1055,2659,2660],{"class":1069}," readiness",[1055,2662,2663],{"class":1065},"?.",[1055,2665,2595],{"class":1133},[1055,2667,1136],{"class":1069},[1055,2669,1191],{"class":1065},[1055,2671,2519],{"class":1082},[1055,2673,1191],{"class":1065},[1055,2675,2676],{"class":1069},") ",[1055,2678,2679],{"class":1065},"!==",[1055,2681,1079],{"class":1065},[1055,2683,727],{"class":1082},[1055,2685,1191],{"class":1065},[1055,2687,2676],{"class":1069},[1055,2689,2690],{"class":1133},"showSkeleton",[1055,2692,2693],{"class":1069},"()\n",[1055,2695,2696,2699,2702,2704,2706,2708,2710,2713],{"class":1057,"line":1142},[1055,2697,2698],{"class":1061},"else",[1055,2700,2701],{"class":1061}," if",[1055,2703,2648],{"class":1069},[1055,2705,2651],{"class":1065},[1055,2707,2654],{"class":1065},[1055,2709,2676],{"class":1069},[1055,2711,2712],{"class":1133},"showNotFound",[1055,2714,2693],{"class":1069},[2341,2716,2717,2727],{},[2344,2718,2719],{},[2347,2720,2721,2724],{},[2350,2722,2723],{},"State",[2350,2725,2726],{},"What it licenses",[2357,2728,2729,2739,2763],{},[2347,2730,2731,2736],{},[2362,2732,2733],{},[1007,2734,2735],{},"'cold'",[2362,2737,2738],{},"Not pulled yet, or its phase did not finish cleanly — a miss proves nothing",[2347,2740,2741,2746],{},[2362,2742,2743],{},[1007,2744,2745],{},"'pulling'",[2362,2747,2748,2749,2752,2753,2756,2757,2759,2760,2762],{},"Phase in flight. ",[950,2750,2751],{},"Never terminal",": it always resolves to ",[1007,2754,2755],{},"'live'"," or back to ",[1007,2758,2735],{},", so a stuck ",[1007,2761,2745],{}," can't leave a permanent skeleton",[2347,2764,2765,2769],{},[2362,2766,2767],{},[1007,2768,2755],{},[2362,2770,2771,2772,2775],{},"Phase completed cleanly, so a miss ",[950,2773,2774],{},"is"," a real absence",[946,2777,2778],{},"Three rules are easy to get wrong:",[979,2780,2781,2813,2827],{},[982,2782,2783,2788,2789,2791,2792,2795,2796,2799,2800,1445,2803,2806,2807,1445,2810,2812],{},[950,2784,2785,2786,1021],{},"Only a clean phase reaches ",[1007,2787,2755],{}," A pull that reports errors leaves the collection\n",[1007,2790,2735],{}," — and ",[1007,2793,2794],{},"PullResult.errors"," accumulates ",[1025,2797,2798],{},"without throwing",", so a partial failure is\ninvisible to a ",[1007,2801,2802],{},"try",[1007,2804,2805],{},"catch",". So does a pull that throws, and one skipped by the role gate on a\n",[1007,2808,2809],{},"backup",[1007,2811,605],{}," target. Completeness is never claimed by a target that never read.",[982,2814,2815,2818,2819,2822,2823,2826],{},[950,2816,2817],{},"A collection the sequence never names is absent from the map."," ",[1007,2820,2821],{},"undefined"," means ",[1025,2824,2825],{},"\"no claim\nmade\"",", which is never a reason to gate a UI.",[982,2828,2829,2832,2833,2836,2837,2840,2841,1438,2844,2846,2847,2850],{},[1007,2830,2831],{},"phase"," is ",[1007,2834,2835],{},"{ index, total }"," (1-based) while the sequence runs and ",[1007,2838,2839],{},"null"," once it drains.\nBoth ",[1007,2842,2843],{},"readiness",[1007,2845,2831],{}," are ",[950,2848,2849],{},"absent entirely"," for non-phased policies.",[2135,2852,2855],{"color":2853,"icon":2854},"info","i-lucide-git-branch",[946,2856,2857,2858,1438,2860,2862,2863,2866,2867,2870,2871,2874,2875,2878,2879,2882,2883,2885],{},"Rungs 3 and 4 — ",[1007,2859,2560],{},[1007,2861,2843],{}," — arrived in ",[1007,2864,2865],{},"0.4.0-pre.10",", and so did the\nscheduler running at all: below that version ",[1007,2868,2869],{},"startScheduler()"," had no callers and\n",[1007,2872,2873],{},"notifyChange()"," returned at its ",[1007,2876,2877],{},"if (!this.started)"," guard, so ",[950,2880,2881],{},"no"," policy ran automatically.\nEvery published version from ",[1007,2884,2865],{}," on has all four rungs — the rung you get is decided by\nthe hub version you install, not by which dist-tag you install from.",[1472,2887,2889],{"id":2888},"deletes-converge-as-delete-markers","Deletes converge as delete markers",[946,2891,2892,2893,2124,2896,2899,2900,2903,2904,2907,2908,2911,2912,1445,2914,2916,2917,2919,2920,2922,2923,2926,2927,2929,2930,2933],{},"Since ",[1007,2894,2895],{},"0.3.0-pre.7",[1007,2897,2898],{},"collection.delete()"," on a ",[950,2901,2902],{},"synced"," vault\nno longer physically removes the envelope. It writes a version-ordered ",[950,2905,2906],{},"delete marker"," instead —\nan envelope with ",[1007,2909,2910],{},"_del: true"," and an empty body — so the delete travels through ",[1007,2913,1628],{},[1007,2915,1746],{}," like\nany other write and an offline peer can no longer resurrect a deleted record by pushing its stale\ncopy back. Reads treat a marker as absent (",[1007,2918,2570],{}," returns ",[1007,2921,2839],{},"), and a legitimate re-create at a\nhigher version still resurrects the id — guaranteed ",[1025,2924,2925],{},"non","-resurrection remains\n",[955,2928,685],{"href":686},"'s job, not ",[1007,2931,2932],{},"delete()","'s. A concurrent same-version delete-vs-edit\nresolves through the collection's conflict resolver when one is configured; without one, the\ndelete wins. Local-only (non-synced) collections keep physical deletes — nothing changes there.",[946,2935,2936,2937,2940,2941,2944,2945,2948,2949,2951,2952,2955,2956,1021],{},"The marker rides the store contract as an optional ",[1007,2938,2939],{},"_del"," field on the encrypted envelope (see\n",[955,2942,2943],{"href":51},"Stores",") — additive, and every ",[1007,2946,2947],{},"to-*"," store round-trips it (it is part of the\nshared adapter-conformance suite). Markers accumulate until explicitly reclaimed: the\n",[955,2950,776],{"href":777}," service purges a closed period's markers locally with\n",[1007,2953,2954],{},"vault.freezePeriod()"," and sweeps them off push-only sync targets with\n",[1007,2957,2958],{},"vault.purgePeriodTargets()",[946,2960,2961,2962,2965,2966,2968,2969,2972,2973,2976,2977,1021],{},"Reserved dictionary collections (",[1007,2963,2964],{},"_dict_*",", backing ",[955,2967,731],{"href":732}," fields) participate\nin sync the same way since ",[1007,2970,2971],{},"0.3.0-pre.9",": dictionary writes enter the dirty log, ",[1007,2974,2975],{},"pull()"," applies\nthem through the ordinary path, and dictionary deletes travel as the same delete markers — see\n",[955,2978,2980],{"href":2979},"\u002Fservices\u002Flookup#reserved-tier-sync-dictionaries-travel","lookup → reserved-tier sync",[1472,2982,2984],{"id":2983},"erasures-are-terminal","Erasures are terminal",[946,2986,2987,2988,2990,2991,2993,2994,2997,2998,3000,3001,3004,3005,3007,3008,3010,3011,3014,3015,3018],{},"A record erased with ",[955,2989,685],{"href":686}," is crypto-shredded down to a tombstone, and since\n",[1007,2992,2895],{}," sync treats that tombstone as ",[950,2995,2996],{},"terminal"," for its record id: ",[1007,2999,2975],{}," never\noverwrites a tombstone with a live remote envelope regardless of version — it re-asserts the shred\noutward instead — and ",[1007,3002,3003],{},"push()"," asserts tombstones unconditionally, bypassing conflict resolvers\nentirely (an erasure cannot be overruled by a merge function). Forget tombstones also enter the\nsync dirty log, so the shred itself propagates on the next ",[1007,3006,3003],{},". Every suppressed live envelope\nis reported on the ",[1007,3009,1694],{}," array of the push\u002Fpull result (the ",[1007,3012,3013],{},"ErasureEnforcement"," shape under\nTypes below) and through the ",[1007,3016,3017],{},"sync:erasure"," event:",[1046,3020,3022],{"className":1048,"code":3021,"language":1050,"meta":1051,"style":1051},"db.on('sync:erasure', (e) => {\n  console.log(`${e.direction}: erased ${e.collection}\u002F${e.id} won over a live edit`)\n})\n",[1007,3023,3024,3058,3117],{"__ignoreMap":1051},[1055,3025,3026,3029,3031,3034,3036,3038,3040,3042,3044,3046,3050,3053,3056],{"class":1057,"line":1058},[1055,3027,3028],{"class":1069},"db",[1055,3030,1021],{"class":1065},[1055,3032,3033],{"class":1133},"on",[1055,3035,1136],{"class":1069},[1055,3037,1191],{"class":1065},[1055,3039,3017],{"class":1082},[1055,3041,1191],{"class":1065},[1055,3043,1155],{"class":1065},[1055,3045,2404],{"class":1065},[1055,3047,3049],{"class":3048},"sHdIc","e",[1055,3051,3052],{"class":1065},")",[1055,3054,3055],{"class":1120}," =>",[1055,3057,2254],{"class":1065},[1055,3059,3060,3063,3065,3068,3070,3073,3075,3077,3080,3082,3085,3088,3090,3092,3094,3096,3098,3100,3102,3104,3107,3109,3112,3115],{"class":1057,"line":1089},[1055,3061,3062],{"class":1069},"  console",[1055,3064,1021],{"class":1065},[1055,3066,3067],{"class":1133},"log",[1055,3069,1136],{"class":1145},[1055,3071,3072],{"class":1065},"`${",[1055,3074,3049],{"class":1069},[1055,3076,1021],{"class":1065},[1055,3078,3079],{"class":1069},"direction",[1055,3081,1232],{"class":1065},[1055,3083,3084],{"class":1082},": erased ",[1055,3086,3087],{"class":1065},"${",[1055,3089,3049],{"class":1069},[1055,3091,1021],{"class":1065},[1055,3093,1529],{"class":1069},[1055,3095,1232],{"class":1065},[1055,3097,1445],{"class":1082},[1055,3099,3087],{"class":1065},[1055,3101,3049],{"class":1069},[1055,3103,1021],{"class":1065},[1055,3105,3106],{"class":1069},"id",[1055,3108,1232],{"class":1065},[1055,3110,3111],{"class":1082}," won over a live edit",[1055,3113,3114],{"class":1065},"`",[1055,3116,1235],{"class":1145},[1055,3118,3119,3121],{"class":1057,"line":1110},[1055,3120,1232],{"class":1065},[1055,3122,1235],{"class":1069},[946,3124,3125,3126,2124,3128,3131,3132,3134,3135,1445,3137,3139,3140,3142,3143,3145],{},"Sync-applied writes also refresh the collection's in-memory caches, so a reader in the same\nsession sees pull results immediately — and never a decrypted residue of a shredded record. On\nvaults using ",[955,3127,665],{"href":666},[955,3129,3130],{"href":740},"materialized views",",\nor ",[955,3133,637],{"href":638}," fields, a batched dispatch wave at the end of each ",[1007,3136,2975],{},[1007,3138,3003],{},"\nrecomputes affected derived targets exactly once per target (since ",[1007,3141,2971],{}," — see the\ndependency graph on the ",[955,3144,896],{"href":897}," page).",[1472,3147,3149],{"id":3148},"conflict-resolution","Conflict resolution",[946,3151,3152,3153,1445,3155,3157,3158,3161],{},"When both sides changed the same record, ",[1007,3154,1628],{},[1007,3156,1746],{}," resolve the conflict instead of failing.\nThe database-level default is ",[1007,3159,3160],{},"conflict: 'version'"," — whichever side has the higher internal\nrecord version wins:",[1046,3163,3165],{"className":1048,"code":3164,"language":1050,"meta":1051,"style":1051},"const db = await createNoydb({\n  store: localStore, sync: remoteStore, user: 'alice', secret: 'alice-secret-2026',\n  syncStrategy: withSync(),\n  conflict: 'remote-wins',   \u002F\u002F or 'local-wins', or (conflict) => 'local' | 'remote'\n})\n",[1007,3166,3167,3183,3228,3240,3259],{"__ignoreMap":1051},[1055,3168,3169,3171,3173,3175,3177,3179,3181],{"class":1057,"line":1058},[1055,3170,1121],{"class":1120},[1055,3172,1124],{"class":1069},[1055,3174,1127],{"class":1065},[1055,3176,1130],{"class":1061},[1055,3178,1070],{"class":1133},[1055,3180,1136],{"class":1069},[1055,3182,1139],{"class":1065},[1055,3184,3185,3187,3189,3191,3193,3196,3198,3200,3202,3205,3207,3209,3211,3213,3215,3218,3220,3222,3224,3226],{"class":1057,"line":1089},[1055,3186,1146],{"class":1145},[1055,3188,1149],{"class":1065},[1055,3190,1152],{"class":1069},[1055,3192,1155],{"class":1065},[1055,3194,3195],{"class":1145}," sync",[1055,3197,1149],{"class":1065},[1055,3199,1170],{"class":1069},[1055,3201,1155],{"class":1065},[1055,3203,3204],{"class":1145}," user",[1055,3206,1149],{"class":1065},[1055,3208,1079],{"class":1065},[1055,3210,1188],{"class":1082},[1055,3212,1191],{"class":1065},[1055,3214,1155],{"class":1065},[1055,3216,3217],{"class":1145}," secret",[1055,3219,1149],{"class":1065},[1055,3221,1079],{"class":1065},[1055,3223,1207],{"class":1082},[1055,3225,1191],{"class":1065},[1055,3227,1194],{"class":1065},[1055,3229,3230,3232,3234,3236,3238],{"class":1057,"line":1110},[1055,3231,1217],{"class":1145},[1055,3233,1149],{"class":1065},[1055,3235,1096],{"class":1133},[1055,3237,1224],{"class":1069},[1055,3239,1194],{"class":1065},[1055,3241,3242,3245,3247,3249,3252,3254,3256],{"class":1057,"line":1117},[1055,3243,3244],{"class":1145},"  conflict",[1055,3246,1149],{"class":1065},[1055,3248,1079],{"class":1065},[1055,3250,3251],{"class":1082},"remote-wins",[1055,3253,1191],{"class":1065},[1055,3255,1155],{"class":1065},[1055,3257,3258],{"class":1158},"   \u002F\u002F or 'local-wins', or (conflict) => 'local' | 'remote'\n",[1055,3260,3261,3263],{"class":1057,"line":1142},[1055,3262,1232],{"class":1065},[1055,3264,1235],{"class":1069},[946,3266,3267,3268,3271],{},"Override per collection with ",[1007,3269,3270],{},"conflictPolicy",", which offers richer choices — a custom function here\nreceives and returns the record content directly, not just a side:",[1046,3273,3275],{"className":1048,"code":3274,"language":1050,"meta":1051,"style":1051},"const notes = vault.collection\u003CNote>('notes', {\n  conflictPolicy: 'last-writer-wins',   \u002F\u002F or 'first-writer-wins', 'manual', or (local, remote) => merged\n})\n",[1007,3276,3277,3309,3328],{"__ignoreMap":1051},[1055,3278,3279,3281,3283,3285,3287,3289,3291,3293,3295,3297,3299,3301,3303,3305,3307],{"class":1057,"line":1058},[1055,3280,1121],{"class":1120},[1055,3282,1519],{"class":1069},[1055,3284,1127],{"class":1065},[1055,3286,1524],{"class":1069},[1055,3288,1021],{"class":1065},[1055,3290,1529],{"class":1133},[1055,3292,1532],{"class":1065},[1055,3294,1535],{"class":1488},[1055,3296,1538],{"class":1065},[1055,3298,1136],{"class":1069},[1055,3300,1191],{"class":1065},[1055,3302,1262],{"class":1082},[1055,3304,1191],{"class":1065},[1055,3306,1155],{"class":1065},[1055,3308,2254],{"class":1065},[1055,3310,3311,3314,3316,3318,3321,3323,3325],{"class":1057,"line":1089},[1055,3312,3313],{"class":1145},"  conflictPolicy",[1055,3315,1149],{"class":1065},[1055,3317,1079],{"class":1065},[1055,3319,3320],{"class":1082},"last-writer-wins",[1055,3322,1191],{"class":1065},[1055,3324,1155],{"class":1065},[1055,3326,3327],{"class":1158},"   \u002F\u002F or 'first-writer-wins', 'manual', or (local, remote) => merged\n",[1055,3329,3330,3332],{"class":1057,"line":1110},[1055,3331,1232],{"class":1065},[1055,3333,1235],{"class":1069},[946,3335,3336,3337,3339,3340,1445,3343,3346],{},"Every resolved conflict is also reported on the ",[1007,3338,1671],{}," array of the ",[1007,3341,3342],{},"PushResult",[1007,3344,3345],{},"PullResult","\nshown above, with both sides' record version:",[1046,3348,3350],{"className":1641,"code":3349,"language":141,"meta":1051,"style":1051},"{\n  \"vault\": \"notes\", \"collection\": \"notes\", \"id\": \"n1\",\n  \"localVersion\": 2, \"remoteVersion\": 3,\n  \"local\": \"{ encrypted envelope }\", \"remote\": \"{ encrypted envelope }\"\n}\n",[1007,3351,3352,3356,3406,3435,3471],{"__ignoreMap":1051},[1055,3353,3354],{"class":1057,"line":1058},[1055,3355,1139],{"class":1065},[1055,3357,3358,3360,3362,3364,3366,3368,3370,3372,3374,3376,3378,3380,3382,3384,3386,3388,3390,3392,3394,3396,3398,3400,3402,3404],{"class":1057,"line":1089},[1055,3359,1996],{"class":1065},[1055,3361,952],{"class":1120},[1055,3363,1658],{"class":1065},[1055,3365,1149],{"class":1065},[1055,3367,1652],{"class":1065},[1055,3369,1262],{"class":1082},[1055,3371,1658],{"class":1065},[1055,3373,1155],{"class":1065},[1055,3375,1652],{"class":1065},[1055,3377,1529],{"class":1120},[1055,3379,1658],{"class":1065},[1055,3381,1149],{"class":1065},[1055,3383,1652],{"class":1065},[1055,3385,1262],{"class":1082},[1055,3387,1658],{"class":1065},[1055,3389,1155],{"class":1065},[1055,3391,1652],{"class":1065},[1055,3393,3106],{"class":1120},[1055,3395,1658],{"class":1065},[1055,3397,1149],{"class":1065},[1055,3399,1652],{"class":1065},[1055,3401,1572],{"class":1082},[1055,3403,1658],{"class":1065},[1055,3405,1194],{"class":1065},[1055,3407,3408,3410,3413,3415,3417,3420,3422,3424,3427,3429,3431,3433],{"class":1057,"line":1110},[1055,3409,1996],{"class":1065},[1055,3411,3412],{"class":1120},"localVersion",[1055,3414,1658],{"class":1065},[1055,3416,1149],{"class":1065},[1055,3418,3419],{"class":1663}," 2",[1055,3421,1155],{"class":1065},[1055,3423,1652],{"class":1065},[1055,3425,3426],{"class":1120},"remoteVersion",[1055,3428,1658],{"class":1065},[1055,3430,1149],{"class":1065},[1055,3432,1777],{"class":1663},[1055,3434,1194],{"class":1065},[1055,3436,3437,3439,3442,3444,3446,3448,3451,3453,3455,3457,3460,3462,3464,3466,3468],{"class":1057,"line":1117},[1055,3438,1996],{"class":1065},[1055,3440,3441],{"class":1120},"local",[1055,3443,1658],{"class":1065},[1055,3445,1149],{"class":1065},[1055,3447,1652],{"class":1065},[1055,3449,3450],{"class":1082},"{ encrypted envelope }",[1055,3452,1658],{"class":1065},[1055,3454,1155],{"class":1065},[1055,3456,1652],{"class":1065},[1055,3458,3459],{"class":1120},"remote",[1055,3461,1658],{"class":1065},[1055,3463,1149],{"class":1065},[1055,3465,1652],{"class":1065},[1055,3467,3450],{"class":1082},[1055,3469,3470],{"class":1065},"\"\n",[1055,3472,3473],{"class":1057,"line":1142},[1055,3474,2110],{"class":1065},[946,3476,3477,3484,3485,3488,3489,3492,3493,3499,3500,3502,3503,3506,3507,3509,3510,3513,3514,3517],{},[950,3478,3479,3480,3483],{},"Same-version ties converge (since hub ",[1007,3481,3482],{},"0.5.0",")."," When a push CAS conflict resolves local-wins and the winning envelope's ",[1007,3486,3487],{},"_v"," does not already exceed the remote's — the concurrent-edit tie — the engine re-stamps the winner at ",[1007,3490,3491],{},"remote._v + 1"," and mirrors the advanced envelope into the local store (",[955,3494,3498],{"href":3495,"rel":3496},"https:\u002F\u002Fgithub.com\u002Fnoy-db\u002Fcore\u002Fissues\u002F936",[3497],"nofollow","noy-db#936","). The losing peer's next ",[1007,3501,2975],{}," then sees a genuine version advance and adopts the winner through the ordinary pull path, instead of reporting ",[1007,3504,3505],{},"pulled: 0"," while both peers hold different content at the same ",[1007,3508,3487],{},". (A ",[1007,3511,3512],{},"'merged'"," resolution already stamped ",[1007,3515,3516],{},"max(local, remote) + 1",".)",[946,3519,3520,3523,3524,3527,3528,3530,3531,3533,3534,1032,3537,3540,3541,2124,3544,2124,3547,3550,3551,3554,3555,3557],{},[950,3521,3522],{},"A delete marker does not always beat a concurrent edit."," For an ",[1025,3525,3526],{},"ordinary"," delete marker (from\n",[1007,3529,2932],{}," — distinct from a terminal forget tombstone, which is never overruled), whether the\ndelete or the edit wins depends on the policy. A custom-function ",[1007,3532,3270],{}," and the CRDT\nmodes ",[1007,3535,3536],{},"'lww-map'",[1007,3538,3539],{},"'rga'"," can never keep an edit over a delete: the shared resolver checks for a\ndeleted side first and returns it unconditionally, before the merge function or the CRDT merge runs.\n",[1007,3542,3543],{},"'last-writer-wins'",[1007,3545,3546],{},"'first-writer-wins'",[1007,3548,3549],{},"'manual'",", and CRDT mode ",[1007,3552,3553],{},"'yjs'"," (a raw version\ncompare, no decrypt) do ",[950,3556,2464],{}," special-case delete markers — so a higher-versioned edit can win\nover the delete under those.",[1472,3559,3560],{"id":965},"Presence",[946,3562,3563,3566,3567,3570,3571,3574],{},[1007,3564,3565],{},"collection.presence\u003CP>(opts?)"," returns a handle scoped to one collection. ",[1007,3568,3569],{},"update()"," announces\nyour own payload; ",[1007,3572,3573],{},"subscribe()"," receives everyone else's:",[1046,3576,3578],{"className":1048,"code":3577,"language":1050,"meta":1051,"style":1051},"interface Cursor { path: string; action: 'viewing' | 'editing' }\nconst presence = notes.presence\u003CCursor>()\n\nconst unsubscribe = presence.subscribe((peers) => {\n  console.log(peers)\n})\n\nawait presence.update({ path: 'notes\u002Fn1', action: 'editing' })\n",[1007,3579,3580,3622,3646,3650,3680,3694,3700,3704],{"__ignoreMap":1051},[1055,3581,3582,3584,3587,3589,3592,3594,3596,3598,3601,3603,3605,3608,3610,3613,3615,3618,3620],{"class":1057,"line":1058},[1055,3583,1485],{"class":1120},[1055,3585,3586],{"class":1488}," Cursor",[1055,3588,1066],{"class":1065},[1055,3590,3591],{"class":1145}," path",[1055,3593,1149],{"class":1065},[1055,3595,1499],{"class":1488},[1055,3597,1502],{"class":1065},[1055,3599,3600],{"class":1145}," action",[1055,3602,1149],{"class":1065},[1055,3604,1079],{"class":1065},[1055,3606,3607],{"class":1082},"viewing",[1055,3609,1191],{"class":1065},[1055,3611,3612],{"class":1065}," |",[1055,3614,1079],{"class":1065},[1055,3616,3617],{"class":1082},"editing",[1055,3619,1191],{"class":1065},[1055,3621,1512],{"class":1065},[1055,3623,3624,3626,3629,3631,3633,3635,3637,3639,3642,3644],{"class":1057,"line":1089},[1055,3625,1121],{"class":1120},[1055,3627,3628],{"class":1069}," presence ",[1055,3630,1127],{"class":1065},[1055,3632,1560],{"class":1069},[1055,3634,1021],{"class":1065},[1055,3636,965],{"class":1133},[1055,3638,1532],{"class":1065},[1055,3640,3641],{"class":1488},"Cursor",[1055,3643,1538],{"class":1065},[1055,3645,2693],{"class":1069},[1055,3647,3648],{"class":1057,"line":1110},[1055,3649,1114],{"emptyLinePlaceholder":1113},[1055,3651,3652,3654,3657,3659,3662,3664,3667,3669,3671,3674,3676,3678],{"class":1057,"line":1117},[1055,3653,1121],{"class":1120},[1055,3655,3656],{"class":1069}," unsubscribe ",[1055,3658,1127],{"class":1065},[1055,3660,3661],{"class":1069}," presence",[1055,3663,1021],{"class":1065},[1055,3665,3666],{"class":1133},"subscribe",[1055,3668,1136],{"class":1069},[1055,3670,1136],{"class":1065},[1055,3672,3673],{"class":3048},"peers",[1055,3675,3052],{"class":1065},[1055,3677,3055],{"class":1120},[1055,3679,2254],{"class":1065},[1055,3681,3682,3684,3686,3688,3690,3692],{"class":1057,"line":1142},[1055,3683,3062],{"class":1069},[1055,3685,1021],{"class":1065},[1055,3687,3067],{"class":1133},[1055,3689,1136],{"class":1145},[1055,3691,3673],{"class":1069},[1055,3693,1235],{"class":1145},[1055,3695,3696,3698],{"class":1057,"line":1162},[1055,3697,1232],{"class":1065},[1055,3699,1235],{"class":1069},[1055,3701,3702],{"class":1057,"line":1178},[1055,3703,1114],{"emptyLinePlaceholder":1113},[1055,3705,3706,3708,3710,3712,3715,3717,3719,3721,3723,3725,3728,3730,3732,3734,3736,3738,3740,3742,3744],{"class":1057,"line":1197},[1055,3707,1557],{"class":1061},[1055,3709,3661],{"class":1069},[1055,3711,1021],{"class":1065},[1055,3713,3714],{"class":1133},"update",[1055,3716,1136],{"class":1069},[1055,3718,1649],{"class":1065},[1055,3720,3591],{"class":1145},[1055,3722,1149],{"class":1065},[1055,3724,1079],{"class":1065},[1055,3726,3727],{"class":1082},"notes\u002Fn1",[1055,3729,1191],{"class":1065},[1055,3731,1155],{"class":1065},[1055,3733,3600],{"class":1145},[1055,3735,1149],{"class":1065},[1055,3737,1079],{"class":1065},[1055,3739,3617],{"class":1082},[1055,3741,1191],{"class":1065},[1055,3743,1073],{"class":1065},[1055,3745,1235],{"class":1069},[1046,3747,3749],{"className":1641,"code":3748,"language":141,"meta":1051,"style":1051},"[\n  { \"userId\": \"bob\", \"payload\": { \"path\": \"notes\u002Fn1\", \"action\": \"viewing\" }, \"lastSeen\": \"2026-07-08T10:03:40.000Z\" }\n]\n",[1007,3750,3751,3756,3842],{"__ignoreMap":1051},[1055,3752,3753],{"class":1057,"line":1058},[1055,3754,3755],{"class":1065},"[\n",[1055,3757,3758,3761,3763,3766,3768,3770,3772,3775,3777,3779,3781,3784,3786,3788,3790,3792,3795,3797,3799,3801,3803,3805,3807,3809,3812,3814,3816,3818,3820,3822,3824,3826,3829,3831,3833,3835,3838,3840],{"class":1057,"line":1089},[1055,3759,3760],{"class":1065},"  {",[1055,3762,1652],{"class":1065},[1055,3764,3765],{"class":1120},"userId",[1055,3767,1658],{"class":1065},[1055,3769,1149],{"class":1065},[1055,3771,1652],{"class":1065},[1055,3773,3774],{"class":1082},"bob",[1055,3776,1658],{"class":1065},[1055,3778,1155],{"class":1065},[1055,3780,1652],{"class":1065},[1055,3782,3783],{"class":1120},"payload",[1055,3785,1658],{"class":1065},[1055,3787,1149],{"class":1065},[1055,3789,1066],{"class":1065},[1055,3791,1652],{"class":1065},[1055,3793,3794],{"class":1488},"path",[1055,3796,1658],{"class":1065},[1055,3798,1149],{"class":1065},[1055,3800,1652],{"class":1065},[1055,3802,3727],{"class":1082},[1055,3804,1658],{"class":1065},[1055,3806,1155],{"class":1065},[1055,3808,1652],{"class":1065},[1055,3810,3811],{"class":1488},"action",[1055,3813,1658],{"class":1065},[1055,3815,1149],{"class":1065},[1055,3817,1652],{"class":1065},[1055,3819,3607],{"class":1082},[1055,3821,1658],{"class":1065},[1055,3823,1343],{"class":1065},[1055,3825,1652],{"class":1065},[1055,3827,3828],{"class":1120},"lastSeen",[1055,3830,1658],{"class":1065},[1055,3832,1149],{"class":1065},[1055,3834,1652],{"class":1065},[1055,3836,3837],{"class":1082},"2026-07-08T10:03:40.000Z",[1055,3839,1658],{"class":1065},[1055,3841,1512],{"class":1065},[1055,3843,3844],{"class":1057,"line":1110},[1055,3845,3846],{"class":1065},"]\n",[946,3848,3849,3850,3853,3854,3857,3858,1445,3860,3862,3863,3866,3867,3870,3871,3873,3874,3876,3877,3879],{},"Call ",[1007,3851,3852],{},"unsubscribe()"," to stop receiving updates, and ",[1007,3855,3856],{},"presence.stop()"," to release the handle\nentirely (stops polling, drops the pub\u002Fsub listener, clears subscribers). When the store adapter\nimplements ",[1007,3859,1031],{},[1007,3861,1035],{},", presence is real-time; otherwise it falls back to\npolling a reserved ",[1007,3864,3865],{},"_presence_\u003Ccollection>"," collection on the sync target (or the local store if\nnone is configured) every ",[1007,3868,3869],{},"pollIntervalMs"," (default 5,000 ms). Each polled record stores ",[1007,3872,3765],{},"\nand ",[1007,3875,3828],{}," as plain fields alongside the encrypted ",[1007,3878,3783],{}," — the storage-poll fallback trades\nadapter-side user-ID privacy for working on any adapter, unlike the pub\u002Fsub path above.",[941,3881,3883],{"id":3882},"api-reference","API reference",[2341,3885,3886,3899],{},[2344,3887,3888],{},[2347,3889,3890,3893,3896],{},[2350,3891,3892],{},"Method",[2350,3894,3895],{},"Returns",[2350,3897,3898],{},"Purpose",[2357,3900,3901,3915,3929,3950,3964],{},[2347,3902,3903,3907,3912],{},[2362,3904,3905],{},[1007,3906,1708],{},[2362,3908,3909],{},[1007,3910,3911],{},"Promise\u003CPushResult>",[2362,3913,3914],{},"Send dirty local records to the vault's primary sync target.",[2347,3916,3917,3921,3926],{},[2362,3918,3919],{},[1007,3920,1722],{},[2362,3922,3923],{},[1007,3924,3925],{},"Promise\u003CPullResult>",[2362,3927,3928],{},"Apply newer remote records to the local store.",[2347,3930,3931,3935,3940],{},[2362,3932,3933],{},[1007,3934,1926],{},[2362,3936,3937],{},[1007,3938,3939],{},"Promise\u003C{ pull: PullResult, push: PushResult }>",[2362,3941,3942,3943,1445,3945,3947,3948,1021],{},"Pull then push against the primary target; also pushes to every ",[1007,3944,1437],{},[1007,3946,1441],{}," target and syncs every other ",[1007,3949,1433],{},[2347,3951,3952,3956,3961],{},[2362,3953,3954],{},[1007,3955,1817],{},[2362,3957,3958],{},[1007,3959,3960],{},"SyncStatus",[2362,3962,3963],{},"Current dirty count and last push\u002Fpull timestamps.",[2347,3965,3966,3970,3975],{},[2362,3967,3968],{},[1007,3969,3565],{},[2362,3971,3972],{},[1007,3973,3974],{},"PresenceHandle\u003CP>",[2362,3976,3977,3978,3981,3982,1021],{},"A presence channel scoped to this collection. ",[1007,3979,3980],{},"opts",": ",[1007,3983,3984],{},"{ staleMs?, pollIntervalMs? }",[1472,3986,3988],{"id":3987},"options","Options",[2341,3990,3991,4004],{},[2344,3992,3993],{},[2347,3994,3995,3998,4001],{},[2350,3996,3997],{},"Option bag",[2350,3999,4000],{},"Field",[2350,4002,4003],{},"Meaning",[2357,4005,4006,4021,4035,4051,4072],{},[2347,4007,4008,4013,4018],{},[2362,4009,4010],{},[1007,4011,4012],{},"PushOptions",[2362,4014,4015],{},[1007,4016,4017],{},"collections?: string[]",[2362,4019,4020],{},"Push only these collections; omit to push everything dirty.",[2347,4022,4023,4028,4032],{},[2362,4024,4025],{},[1007,4026,4027],{},"PullOptions",[2362,4029,4030],{},[1007,4031,4017],{},[2362,4033,4034],{},"Pull only these collections; omit to pull everything.",[2347,4036,4037,4039,4044],{},[2362,4038],{},[2362,4040,4041],{},[1007,4042,4043],{},"modifiedSince?: string",[2362,4045,4046,4047,4050],{},"Only pull records with ",[1007,4048,4049],{},"_ts"," strictly after this ISO timestamp.",[2347,4052,4053,4062,4067],{},[2362,4054,4055,4058,4059,3052],{},[1007,4056,4057],{},"PresenceHandleOpts"," (via ",[1007,4060,4061],{},"presence(opts)",[2362,4063,4064],{},[1007,4065,4066],{},"staleMs?: number",[2362,4068,4069,4070,1021],{},"How long before a peer is considered gone. Default ",[1007,4071,2389],{},[2347,4073,4074,4076,4081],{},[2362,4075],{},[2362,4077,4078],{},[1007,4079,4080],{},"pollIntervalMs?: number",[2362,4082,4083,4084,1021],{},"Poll interval for the storage-poll fallback. Default ",[1007,4085,4086],{},"5_000",[1472,4088,4090],{"id":4089},"presencehandlep",[1007,4091,3974],{},[2341,4093,4094,4104],{},[2344,4095,4096],{},[2347,4097,4098,4100,4102],{},[2350,4099,3892],{},[2350,4101,3895],{},[2350,4103,3898],{},[2357,4105,4106,4121,4136],{},[2347,4107,4108,4113,4118],{},[2362,4109,4110],{},[1007,4111,4112],{},"update(payload: P)",[2362,4114,4115],{},[1007,4116,4117],{},"Promise\u003Cvoid>",[2362,4119,4120],{},"Encrypt and publish your presence payload.",[2347,4122,4123,4128,4133],{},[2362,4124,4125],{},[1007,4126,4127],{},"subscribe(cb: (peers: PresencePeer\u003CP>[]) => void)",[2362,4129,4130],{},[1007,4131,4132],{},"() => void",[2362,4134,4135],{},"Register for peer updates; returns an unsubscribe function.",[2347,4137,4138,4143,4148],{},[2362,4139,4140],{},[1007,4141,4142],{},"stop()",[2362,4144,4145],{},[1007,4146,4147],{},"void",[2362,4149,4150],{},"Release the handle — stops polling\u002Flistening, clears subscribers.",[1472,4152,4154],{"id":4153},"types","Types",[979,4156,4157,4165,4172,4179,4195,4217,4225,4233,4250],{},[982,4158,4159,4161,4162],{},[1007,4160,3342],{}," — ",[1007,4163,4164],{},"{ pushed: number, conflicts: Conflict[], errors: Error[], erasures: ErasureEnforcement[] }",[982,4166,4167,4161,4169],{},[1007,4168,3345],{},[1007,4170,4171],{},"{ pulled: number, conflicts: Conflict[], errors: Error[], erasures: ErasureEnforcement[] }",[982,4173,4174,4161,4176],{},[1007,4175,3960],{},[1007,4177,4178],{},"{ dirty: number, lastPush: string | null, lastPull: string | null, online: boolean }",[982,4180,4181,4161,4184,4187,4188,4191,4192],{},[1007,4182,4183],{},"Conflict",[1007,4185,4186],{},"{ vault, collection, id, local, remote, localVersion, remoteVersion, resolve? }"," —\n",[1007,4189,4190],{},"resolve"," is only present under ",[1007,4193,4194],{},"conflictPolicy: 'manual'",[982,4196,4197,4161,4199,4202,4203,4205,4206,4209,4210,4212,4213,4216],{},[1007,4198,3013],{},[1007,4200,4201],{},"{ vault, collection, id, tombstone, suppressed, direction: 'pull' | 'push' }","\n— reported whenever push\u002Fpull encounters a record erased with ",[955,4204,685],{"href":686}," on one\nside and a live edit on the other; the tombstone always wins, ",[1007,4207,4208],{},"suppressed"," carries the envelope\nit overwrote (also emitted per enforcement as the ",[1007,4211,3017],{}," event). Empty (",[1007,4214,4215],{},"[]",") unless a\nsync run actually re-asserts an erasure.",[982,4218,4219,4161,4222],{},[1007,4220,4221],{},"PresencePeer\u003CP>",[1007,4223,4224],{},"{ userId: string, payload: P, lastSeen: string }",[982,4226,4227,4161,4230],{},[1007,4228,4229],{},"SyncTarget",[1007,4231,4232],{},"{ store, role: 'sync-peer' | 'backup' | 'archive', policy?, label? }",[982,4234,4235,4238,4239,4242,4243,4246,4247],{},[1007,4236,4237],{},"ConflictStrategy"," (db-level ",[1007,4240,4241],{},"conflict"," option, default ",[1007,4244,4245],{},"'version'",") —\n",[1007,4248,4249],{},"'local-wins' | 'remote-wins' | 'version' | ((conflict: Conflict) => 'local' | 'remote')",[982,4251,4252,4255,4256,4258,4259],{},[1007,4253,4254],{},"ConflictPolicy\u003CT>"," (collection-level ",[1007,4257,3270],{}," option) —\n",[1007,4260,4261],{},"'last-writer-wins' | 'first-writer-wins' | 'manual' | ((local: T, remote: T) => T)",[1472,4263,4265],{"id":4264},"lower-level-exports","Lower-level exports",[946,4267,4268,2124,4271,4274,4275,4278,4279,4281,4282,4285,4286,1032,4289,1021],{},[1007,4269,4270],{},"SyncEngine",[1007,4272,4273],{},"SyncTransaction",", and ",[1007,4276,4277],{},"PresenceHandle"," — the classes ",[1007,4280,1013],{}," constructs — are\nalso exported from ",[1007,4283,4284],{},"@noy-db\u002Fhub\u002Fteam"," for advanced consumers that want to construct them directly\ninstead of going through ",[1007,4287,4288],{},"createNoydb",[1007,4290,1039],{},[941,4292,4294],{"id":4293},"behavior-when-not-opted-in","Behavior when NOT opted in",[979,4296,4297,4313,4329],{},[982,4298,4299,4300,4303,4304,4307,4308,4310,4311,1021],{},"Configuring ",[1007,4301,4302],{},"sync: ..."," without ",[1007,4305,4306],{},"syncStrategy: withSync()"," throws on the first ",[1007,4309,1020],{},"\ncall, pointing at ",[1007,4312,1105],{},[982,4314,4315,1032,4318,4321,4322,4324,4325,4328],{},[1007,4316,4317],{},"db.push(vault)",[1007,4319,4320],{},"db.pull(vault)"," on a vault with no ",[1007,4323,864],{}," target configured throw\n(",[1007,4326,4327],{},"\"No sync adapter configured. Pass a \\","sync` adapter to createNoydb().\"`).",[982,4330,4331,4333,4334,4336,4337,4339],{},[1007,4332,1039],{}," always requires ",[1007,4335,4306],{}," — even a vault with no\nremote ",[1007,4338,864],{}," target can use presence (it falls back to polling the local store), but without\nthe strategy it throws.",[941,4341,4343],{"id":4342},"pairs-well-with","Pairs well with",[979,4345,4346,4358,4374],{},[982,4347,4348,4352,4353,1445,4355,4357],{},[950,4349,4350],{},[955,4351,653],{"href":653}," — sync defers to CRDT merge semantics for collections that opt in; conflicts\nresolve inside the CRDT merge instead of the ",[1007,4354,4241],{},[1007,4356,3270],{}," strategies above",[982,4359,4360,4161,4364,1445,4367,1445,4370,4373],{},[950,4361,4362],{},[955,4363,868],{"href":868},[1007,4365,4366],{},"db.grant",[1007,4368,4369],{},"db.revoke",[1007,4371,4372],{},"db.rotate"," manage vault membership\nindependently of this service; multi-user vaults typically pair the two so every device can\npush\u002Fpull the shared collections",[982,4375,4376,4380],{},[950,4377,4378],{},[955,4379,840],{"href":840}," — long-lived sessions suit always-on, frequently-syncing devices",[941,4382,4384],{"id":4383},"edge-cases-limits","Edge cases & limits",[979,4386,4387,4390,4401,4424,4432],{},[982,4388,4389],{},"Presence keys are derived from the collection DEK via HKDF — revoked users lose presence access\non the next DEK rotation, with no change needed to the presence code itself.",[982,4391,4392,4393,1445,4395,4397,4398,4400],{},"Real-time presence needs a store adapter that implements ",[1007,4394,1031],{},[1007,4396,1035],{},";\nadapters that don't fall back to polling, trading latency (up to ",[1007,4399,3869],{},") for working\neverywhere.",[982,4402,4403,1445,4406,4409,4410,4412,4413,4415,4416,1445,4418,4420,4421,1021],{},[1007,4404,4405],{},"db.push",[1007,4407,4408],{},"db.pull"," only touch the vault's ",[1025,4411,1451],{}," target (the first ",[1007,4414,1433],{},", or the\nfirst target if none is a peer). Reach ",[1007,4417,1437],{},[1007,4419,1441],{}," targets via ",[1007,4422,4423],{},"db.sync(vault)",[982,4425,4426,4427,2124,4429,4431],{},"When the elected primary is not a ",[1007,4428,1433],{},[1007,4430,1461],{}," returns an empty result without\ntouching the target — the role→direction policy applies to the primary the same way it always\napplied to the secondary fan-out.",[982,4433,4434,4435,1032,4437,4439,4440,4442],{},"Delete markers are how deletes converge, not how space is reclaimed — a heavily-deleting synced\nvault should close periods and run ",[1007,4436,2954],{},[1007,4438,2958],{},"\n(",[955,4441,776],{"href":777},") to physically purge converged markers.",[941,4444,4446],{"id":4445},"see-also","See also",[979,4448,4449,4454,4459,4468,4477],{},[982,4450,4451,4453],{},[955,4452,957],{"href":48}," — the vault\u002Fcollection model sync\nreplicates",[982,4455,4456,4458],{},[955,4457,961],{"href":66}," — the encrypted envelope format sync moves as-is",[982,4460,4461,2371,4463,2371,4465,4467],{},[955,4462,653],{"href":653},[955,4464,868],{"href":868},[955,4466,840],{"href":840}," — related services",[982,4469,4470,2371,4473],{},[955,4471,4472],{"href":598},"Services overview",[955,4474,4476],{"href":4475},"\u002Forientation","Orientation map",[982,4478,4479,4480,1021],{},"Proven by showcase ",[955,4481,4484],{"href":4482,"rel":4483},"https:\u002F\u002Fgithub.com\u002Fnoy-db\u002Fdocs\u002Fblob\u002Fmain\u002Fshowcases\u002Fsrc\u002F15-with-sync.showcase.test.ts",[3497],[1007,4485,4486],{},"15-with-sync",[4488,4489,4490],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}",{"title":1051,"searchDepth":1110,"depth":1110,"links":4492},[4493,4494,4495,4496,4497,4509,4515,4516,4517,4518],{"id":943,"depth":1089,"text":944},{"id":976,"depth":1089,"text":977},{"id":996,"depth":1089,"text":997},{"id":1043,"depth":1089,"text":1044},{"id":1469,"depth":1089,"text":1470,"children":4498},[4499,4500,4505,4506,4507,4508],{"id":1474,"depth":1110,"text":1475},{"id":2113,"depth":1110,"text":2114,"children":4501},[4502,4503,4504],{"id":2185,"depth":1117,"text":2186},{"id":2471,"depth":1117,"text":2472},{"id":2563,"depth":1117,"text":2564},{"id":2888,"depth":1110,"text":2889},{"id":2983,"depth":1110,"text":2984},{"id":3148,"depth":1110,"text":3149},{"id":965,"depth":1110,"text":3560},{"id":3882,"depth":1089,"text":3883,"children":4510},[4511,4512,4513,4514],{"id":3987,"depth":1110,"text":3988},{"id":4089,"depth":1110,"text":3974},{"id":4153,"depth":1110,"text":4154},{"id":4264,"depth":1110,"text":4265},{"id":4293,"depth":1089,"text":4294},{"id":4342,"depth":1089,"text":4343},{"id":4383,"depth":1089,"text":4384},{"id":4445,"depth":1089,"text":4446},null,"Replication engine — dirty tracking, push\u002Fpull between a local store and remote targets, conflict resolution — plus live presence over an encrypted channel.","md",{},"service",{"title":864,"description":4520},"stable","important","gYZ3nNUiTw9w834DsA2j2NpuV7DIdyJr8b6wytPHgP4",{"data":4529,"body":4530},{},{"type":4531,"children":4532},"root",[4533],{"type":4534,"tag":946,"props":4535,"children":4536},"element",{},[4537],{"type":4538,"value":4539},"text","G — Collaboration & Auth",{"data":4541,"body":4542},{},{"type":4531,"children":4543},[4544],{"type":4534,"tag":946,"props":4545,"children":4546},{},[4547],{"type":4534,"tag":1007,"props":4548,"children":4550},{"className":4549},[],[4551],{"type":4538,"value":1105},{"data":4553,"body":4554},{},{"type":4531,"children":4555},[4556],{"type":4534,"tag":946,"props":4557,"children":4558},{},[4559],{"type":4534,"tag":1007,"props":4560,"children":4562},{"className":4561},[],[4563],{"type":4538,"value":1013},{"data":4565,"body":4566},{},{"type":4531,"children":4567},[4568],{"type":4534,"tag":946,"props":4569,"children":4570},{},[4571],{"type":4534,"tag":1007,"props":4572,"children":4574},{"className":4573},[],[4575],{"type":4538,"value":4576},"with-sync",{"data":4578,"body":4579},{},{"type":4531,"children":4580},[4581],{"type":4534,"tag":946,"props":4582,"children":4583},{},[4584],{"type":4538,"value":4585},"~856 (off-bundle when not opted in)",1791896591175]