[{"data":1,"prerenderedAt":3905},["ShallowReactive",2],{"navigation":3,"\u002Fservices\u002Fpersisted-schemas":927,"mdc-8bt02u-key":3872,"mdc-9z71ft-key":3889},[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":780,"access":12,"apiToc":929,"body":930,"category":3863,"description":3864,"extension":3865,"meta":3866,"navigation":3863,"nest":3867,"path":781,"seo":3868,"sinceVersion":3863,"status":3869,"stem":782,"subtitle":3863,"tier":3870,"tocExternal":3863,"__hash__":3871},"docs\u002Fservices\u002Fpersisted-schemas.md",false,{"type":931,"value":932,"toc":3839},"minimark",[933,936,940,945,962,974,985,989,1356,1375,1382,1401,1405,1410,1473,1581,1593,1827,1831,1858,2065,2068,2072,2084,2347,2351,2363,2490,2597,2618,2622,2628,2634,2690,2704,2710,2747,2756,2836,2842,2868,2876,2886,3084,3125,3131,3151,3154,3163,3314,3354,3363,3533,3557,3560,3776,3780,3835],[934,935,780],"h1",{"id":780},[937,938],"service-meta",{":rows":939},"[{\"label\":\"Subpath\",\"value\":\"`@noy-db\u002Fhub` (root export)\"},{\"label\":\"Type\",\"value\":\"Core feature — activated per collection by the `persistJsonSchema: true` option.\"}]",[941,942,944],"h2",{"id":943},"what-it-does","What it does",[946,947,948,949,953,954,961],"p",{},"Your collection's schema (a Zod object, say) lives in your application code — it's not visible to anything that only has the vault's data, like a bundle file handed to a teammate or the ",[950,951,952],"code",{},"noydb describe"," CLI. Persisted JSON Schema closes that gap: opt a collection in and, on every vault open, the hub converts your validator to ",[955,956,960],"a",{"href":957,"rel":958},"https:\u002F\u002Fjson-schema.org\u002F",[959],"nofollow","JSON Schema"," and writes it into the vault as an encrypted record, next to the collection's own data.",[946,963,964,965,968,969,973],{},"The record lives at ",[950,966,967],{},"_schemas\u002F\u003Ccollection>"," and is encrypted with the same per-collection key (",[955,970,972],{"href":971},"..\u002Fcore\u002Fnoydb\u002Fenclave","DEK",") that encrypts the collection's records — so anyone who can unlock the collection's data can also read its schema, and no one else. Writing is skip-aware: the hub hashes the freshly-derived JSON Schema and compares it to what's already stored, so an unchanged schema costs one read and no write.",[946,975,976,977,980,981,984],{},"This is always on within its layer — there's no ",[950,978,979],{},"with*()"," factory to add. The opt-in is the ",[950,982,983],{},"persistJsonSchema: true"," collection option.",[941,986,988],{"id":987},"setup","Setup",[990,991,996],"pre",{"className":992,"code":993,"language":994,"meta":995,"style":995},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { z } from 'zod'\nimport { createNoydb } from '@noy-db\u002Fhub'\nimport { toMemory } from '@noy-db\u002Fto-memory'\n\nconst store = toMemory()\nconst db = await createNoydb({\n  store,\n  user: 'alice',\n  secret: 'a-strong-secret',\n})\n\nconst vault = await db.openVault('acme')\n\nconst InvoiceSchema = z.object({\n  id: z.string(),\n  amount: z.number(),\n})\n\nconst invoices = vault.collection('invoices', {\n  schema: InvoiceSchema,\n  persistJsonSchema: true,\n})\n","ts","",[950,997,998,1031,1052,1073,1080,1099,1120,1129,1149,1166,1175,1180,1212,1217,1238,1258,1277,1284,1289,1322,1335,1349],{"__ignoreMap":995},[999,1000,1003,1007,1011,1015,1018,1021,1024,1028],"span",{"class":1001,"line":1002},"line",1,[999,1004,1006],{"class":1005},"s7zQu","import",[999,1008,1010],{"class":1009},"sMK4o"," {",[999,1012,1014],{"class":1013},"sTEyZ"," z",[999,1016,1017],{"class":1009}," }",[999,1019,1020],{"class":1005}," from",[999,1022,1023],{"class":1009}," '",[999,1025,1027],{"class":1026},"sfazB","zod",[999,1029,1030],{"class":1009},"'\n",[999,1032,1034,1036,1038,1041,1043,1045,1047,1050],{"class":1001,"line":1033},2,[999,1035,1006],{"class":1005},[999,1037,1010],{"class":1009},[999,1039,1040],{"class":1013}," createNoydb",[999,1042,1017],{"class":1009},[999,1044,1020],{"class":1005},[999,1046,1023],{"class":1009},[999,1048,1049],{"class":1026},"@noy-db\u002Fhub",[999,1051,1030],{"class":1009},[999,1053,1055,1057,1059,1062,1064,1066,1068,1071],{"class":1001,"line":1054},3,[999,1056,1006],{"class":1005},[999,1058,1010],{"class":1009},[999,1060,1061],{"class":1013}," toMemory",[999,1063,1017],{"class":1009},[999,1065,1020],{"class":1005},[999,1067,1023],{"class":1009},[999,1069,1070],{"class":1026},"@noy-db\u002Fto-memory",[999,1072,1030],{"class":1009},[999,1074,1076],{"class":1001,"line":1075},4,[999,1077,1079],{"emptyLinePlaceholder":1078},true,"\n",[999,1081,1083,1087,1090,1093,1096],{"class":1001,"line":1082},5,[999,1084,1086],{"class":1085},"spNyl","const",[999,1088,1089],{"class":1013}," store ",[999,1091,1092],{"class":1009},"=",[999,1094,1061],{"class":1095},"s2Zo4",[999,1097,1098],{"class":1013},"()\n",[999,1100,1102,1104,1107,1109,1112,1114,1117],{"class":1001,"line":1101},6,[999,1103,1086],{"class":1085},[999,1105,1106],{"class":1013}," db ",[999,1108,1092],{"class":1009},[999,1110,1111],{"class":1005}," await",[999,1113,1040],{"class":1095},[999,1115,1116],{"class":1013},"(",[999,1118,1119],{"class":1009},"{\n",[999,1121,1123,1126],{"class":1001,"line":1122},7,[999,1124,1125],{"class":1013},"  store",[999,1127,1128],{"class":1009},",\n",[999,1130,1132,1136,1139,1141,1144,1147],{"class":1001,"line":1131},8,[999,1133,1135],{"class":1134},"swJcz","  user",[999,1137,1138],{"class":1009},":",[999,1140,1023],{"class":1009},[999,1142,1143],{"class":1026},"alice",[999,1145,1146],{"class":1009},"'",[999,1148,1128],{"class":1009},[999,1150,1152,1155,1157,1159,1162,1164],{"class":1001,"line":1151},9,[999,1153,1154],{"class":1134},"  secret",[999,1156,1138],{"class":1009},[999,1158,1023],{"class":1009},[999,1160,1161],{"class":1026},"a-strong-secret",[999,1163,1146],{"class":1009},[999,1165,1128],{"class":1009},[999,1167,1169,1172],{"class":1001,"line":1168},10,[999,1170,1171],{"class":1009},"}",[999,1173,1174],{"class":1013},")\n",[999,1176,1178],{"class":1001,"line":1177},11,[999,1179,1079],{"emptyLinePlaceholder":1078},[999,1181,1183,1185,1188,1190,1192,1195,1198,1201,1203,1205,1208,1210],{"class":1001,"line":1182},12,[999,1184,1086],{"class":1085},[999,1186,1187],{"class":1013}," vault ",[999,1189,1092],{"class":1009},[999,1191,1111],{"class":1005},[999,1193,1194],{"class":1013}," db",[999,1196,1197],{"class":1009},".",[999,1199,1200],{"class":1095},"openVault",[999,1202,1116],{"class":1013},[999,1204,1146],{"class":1009},[999,1206,1207],{"class":1026},"acme",[999,1209,1146],{"class":1009},[999,1211,1174],{"class":1013},[999,1213,1215],{"class":1001,"line":1214},13,[999,1216,1079],{"emptyLinePlaceholder":1078},[999,1218,1220,1222,1225,1227,1229,1231,1234,1236],{"class":1001,"line":1219},14,[999,1221,1086],{"class":1085},[999,1223,1224],{"class":1013}," InvoiceSchema ",[999,1226,1092],{"class":1009},[999,1228,1014],{"class":1013},[999,1230,1197],{"class":1009},[999,1232,1233],{"class":1095},"object",[999,1235,1116],{"class":1013},[999,1237,1119],{"class":1009},[999,1239,1241,1244,1246,1248,1250,1253,1256],{"class":1001,"line":1240},15,[999,1242,1243],{"class":1134},"  id",[999,1245,1138],{"class":1009},[999,1247,1014],{"class":1013},[999,1249,1197],{"class":1009},[999,1251,1252],{"class":1095},"string",[999,1254,1255],{"class":1013},"()",[999,1257,1128],{"class":1009},[999,1259,1261,1264,1266,1268,1270,1273,1275],{"class":1001,"line":1260},16,[999,1262,1263],{"class":1134},"  amount",[999,1265,1138],{"class":1009},[999,1267,1014],{"class":1013},[999,1269,1197],{"class":1009},[999,1271,1272],{"class":1095},"number",[999,1274,1255],{"class":1013},[999,1276,1128],{"class":1009},[999,1278,1280,1282],{"class":1001,"line":1279},17,[999,1281,1171],{"class":1009},[999,1283,1174],{"class":1013},[999,1285,1287],{"class":1001,"line":1286},18,[999,1288,1079],{"emptyLinePlaceholder":1078},[999,1290,1292,1294,1297,1299,1302,1304,1307,1309,1311,1314,1316,1319],{"class":1001,"line":1291},19,[999,1293,1086],{"class":1085},[999,1295,1296],{"class":1013}," invoices ",[999,1298,1092],{"class":1009},[999,1300,1301],{"class":1013}," vault",[999,1303,1197],{"class":1009},[999,1305,1306],{"class":1095},"collection",[999,1308,1116],{"class":1013},[999,1310,1146],{"class":1009},[999,1312,1313],{"class":1026},"invoices",[999,1315,1146],{"class":1009},[999,1317,1318],{"class":1009},",",[999,1320,1321],{"class":1009}," {\n",[999,1323,1325,1328,1330,1333],{"class":1001,"line":1324},20,[999,1326,1327],{"class":1134},"  schema",[999,1329,1138],{"class":1009},[999,1331,1332],{"class":1013}," InvoiceSchema",[999,1334,1128],{"class":1009},[999,1336,1338,1341,1343,1347],{"class":1001,"line":1337},21,[999,1339,1340],{"class":1134},"  persistJsonSchema",[999,1342,1138],{"class":1009},[999,1344,1346],{"class":1345},"sfNiH"," true",[999,1348,1128],{"class":1009},[999,1350,1352,1354],{"class":1001,"line":1351},22,[999,1353,1171],{"class":1009},[999,1355,1174],{"class":1013},[946,1357,1358,1359,1362,1363,1367,1368,1370,1371,1374],{},"Two things are required: a ",[950,1360,1361],{},"schema"," (v0 derives real JSON Schema only from Zod — see ",[955,1364,1366],{"href":1365},"#limits-gotchas","Limits & gotchas",") and ",[950,1369,983],{},". Default is ",[950,1372,1373],{},"false","; omitting the option writes nothing.",[946,1376,1377,1378,1381],{},"The write is asynchronous and does not block ",[950,1379,1380],{},"vault.collection()"," — it's queued in the background against the DEK derivation and the store write, so normal application code never waits on it. Tests (or anything that must observe the write immediately, as in the examples below) can drain the queue explicitly:",[990,1383,1385],{"className":992,"code":1384,"language":994,"meta":995,"style":995},"await vault._drainPendingSchemaWrites()\n",[950,1386,1387],{"__ignoreMap":995},[999,1388,1389,1392,1394,1396,1399],{"class":1001,"line":1002},[999,1390,1391],{"class":1005},"await",[999,1393,1301],{"class":1013},[999,1395,1197],{"class":1009},[999,1397,1398],{"class":1095},"_drainPendingSchemaWrites",[999,1400,1098],{"class":1013},[941,1402,1404],{"id":1403},"usage","Usage",[1406,1407,1409],"h3",{"id":1408},"first-open-the-envelope-is-written","First open — the envelope is written",[990,1411,1413],{"className":992,"code":1412,"language":994,"meta":995,"style":995},"await vault._drainPendingSchemaWrites()\nconst stored = await store.get('acme', '_schemas', 'invoices')\n",[950,1414,1415,1427],{"__ignoreMap":995},[999,1416,1417,1419,1421,1423,1425],{"class":1001,"line":1002},[999,1418,1391],{"class":1005},[999,1420,1301],{"class":1013},[999,1422,1197],{"class":1009},[999,1424,1398],{"class":1095},[999,1426,1098],{"class":1013},[999,1428,1429,1431,1434,1436,1438,1441,1443,1446,1448,1450,1452,1454,1456,1458,1461,1463,1465,1467,1469,1471],{"class":1001,"line":1033},[999,1430,1086],{"class":1085},[999,1432,1433],{"class":1013}," stored ",[999,1435,1092],{"class":1009},[999,1437,1111],{"class":1005},[999,1439,1440],{"class":1013}," store",[999,1442,1197],{"class":1009},[999,1444,1445],{"class":1095},"get",[999,1447,1116],{"class":1013},[999,1449,1146],{"class":1009},[999,1451,1207],{"class":1026},[999,1453,1146],{"class":1009},[999,1455,1318],{"class":1009},[999,1457,1023],{"class":1009},[999,1459,1460],{"class":1026},"_schemas",[999,1462,1146],{"class":1009},[999,1464,1318],{"class":1009},[999,1466,1023],{"class":1009},[999,1468,1313],{"class":1026},[999,1470,1146],{"class":1009},[999,1472,1174],{"class":1013},[990,1474,1477],{"className":1475,"code":1476,"language":141,"meta":995,"style":995},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"_noydb\": 1,\n  \"_v\": 1,\n  \"_ts\": \"2026-07-08T10:00:00.000Z\",\n  \"_iv\": \"…\",\n  \"_data\": \"…\"\n}\n",[950,1478,1479,1483,1502,1517,1538,1558,1576],{"__ignoreMap":995},[999,1480,1481],{"class":1001,"line":1002},[999,1482,1119],{"class":1009},[999,1484,1485,1488,1491,1494,1496,1500],{"class":1001,"line":1033},[999,1486,1487],{"class":1009},"  \"",[999,1489,1490],{"class":1085},"_noydb",[999,1492,1493],{"class":1009},"\"",[999,1495,1138],{"class":1009},[999,1497,1499],{"class":1498},"sbssI"," 1",[999,1501,1128],{"class":1009},[999,1503,1504,1506,1509,1511,1513,1515],{"class":1001,"line":1054},[999,1505,1487],{"class":1009},[999,1507,1508],{"class":1085},"_v",[999,1510,1493],{"class":1009},[999,1512,1138],{"class":1009},[999,1514,1499],{"class":1498},[999,1516,1128],{"class":1009},[999,1518,1519,1521,1524,1526,1528,1531,1534,1536],{"class":1001,"line":1075},[999,1520,1487],{"class":1009},[999,1522,1523],{"class":1085},"_ts",[999,1525,1493],{"class":1009},[999,1527,1138],{"class":1009},[999,1529,1530],{"class":1009}," \"",[999,1532,1533],{"class":1026},"2026-07-08T10:00:00.000Z",[999,1535,1493],{"class":1009},[999,1537,1128],{"class":1009},[999,1539,1540,1542,1545,1547,1549,1551,1554,1556],{"class":1001,"line":1082},[999,1541,1487],{"class":1009},[999,1543,1544],{"class":1085},"_iv",[999,1546,1493],{"class":1009},[999,1548,1138],{"class":1009},[999,1550,1530],{"class":1009},[999,1552,1553],{"class":1026},"…",[999,1555,1493],{"class":1009},[999,1557,1128],{"class":1009},[999,1559,1560,1562,1565,1567,1569,1571,1573],{"class":1001,"line":1101},[999,1561,1487],{"class":1009},[999,1563,1564],{"class":1085},"_data",[999,1566,1493],{"class":1009},[999,1568,1138],{"class":1009},[999,1570,1530],{"class":1009},[999,1572,1553],{"class":1026},[999,1574,1575],{"class":1009},"\"\n",[999,1577,1578],{"class":1001,"line":1122},[999,1579,1580],{"class":1009},"}\n",[946,1582,1583,1584,1586,1587,1589,1590,1592],{},"The record on the wire is a standard encrypted envelope — ",[950,1585,1544],{},"\u002F",[950,1588,1564],{}," hide the payload from anything that doesn't hold the collection's DEK. Decrypted, ",[950,1591,1564],{}," holds:",[990,1594,1596],{"className":1475,"code":1595,"language":141,"meta":995,"style":995},"{\n  \"_noydb_schema\": 1,\n  \"kind\": \"Zod\",\n  \"jsonSchema\": {\n    \"type\": \"object\",\n    \"properties\": {\n      \"id\": { \"type\": \"string\" },\n      \"amount\": { \"type\": \"number\" }\n    },\n    \"required\": [\"id\", \"amount\"]\n  },\n  \"hash\": \"3f2e...c9\",\n  \"derivedAt\": \"2026-07-08T10:00:00.000Z\"\n}\n",[950,1597,1598,1602,1617,1637,1650,1671,1684,1715,1745,1750,1781,1786,1806,1823],{"__ignoreMap":995},[999,1599,1600],{"class":1001,"line":1002},[999,1601,1119],{"class":1009},[999,1603,1604,1606,1609,1611,1613,1615],{"class":1001,"line":1033},[999,1605,1487],{"class":1009},[999,1607,1608],{"class":1085},"_noydb_schema",[999,1610,1493],{"class":1009},[999,1612,1138],{"class":1009},[999,1614,1499],{"class":1498},[999,1616,1128],{"class":1009},[999,1618,1619,1621,1624,1626,1628,1630,1633,1635],{"class":1001,"line":1054},[999,1620,1487],{"class":1009},[999,1622,1623],{"class":1085},"kind",[999,1625,1493],{"class":1009},[999,1627,1138],{"class":1009},[999,1629,1530],{"class":1009},[999,1631,1632],{"class":1026},"Zod",[999,1634,1493],{"class":1009},[999,1636,1128],{"class":1009},[999,1638,1639,1641,1644,1646,1648],{"class":1001,"line":1075},[999,1640,1487],{"class":1009},[999,1642,1643],{"class":1085},"jsonSchema",[999,1645,1493],{"class":1009},[999,1647,1138],{"class":1009},[999,1649,1321],{"class":1009},[999,1651,1652,1655,1659,1661,1663,1665,1667,1669],{"class":1001,"line":1082},[999,1653,1654],{"class":1009},"    \"",[999,1656,1658],{"class":1657},"sBMFI","type",[999,1660,1493],{"class":1009},[999,1662,1138],{"class":1009},[999,1664,1530],{"class":1009},[999,1666,1233],{"class":1026},[999,1668,1493],{"class":1009},[999,1670,1128],{"class":1009},[999,1672,1673,1675,1678,1680,1682],{"class":1001,"line":1101},[999,1674,1654],{"class":1009},[999,1676,1677],{"class":1657},"properties",[999,1679,1493],{"class":1009},[999,1681,1138],{"class":1009},[999,1683,1321],{"class":1009},[999,1685,1686,1689,1692,1694,1696,1698,1700,1702,1704,1706,1708,1710,1712],{"class":1001,"line":1122},[999,1687,1688],{"class":1009},"      \"",[999,1690,1691],{"class":1498},"id",[999,1693,1493],{"class":1009},[999,1695,1138],{"class":1009},[999,1697,1010],{"class":1009},[999,1699,1530],{"class":1009},[999,1701,1658],{"class":1134},[999,1703,1493],{"class":1009},[999,1705,1138],{"class":1009},[999,1707,1530],{"class":1009},[999,1709,1252],{"class":1026},[999,1711,1493],{"class":1009},[999,1713,1714],{"class":1009}," },\n",[999,1716,1717,1719,1722,1724,1726,1728,1730,1732,1734,1736,1738,1740,1742],{"class":1001,"line":1131},[999,1718,1688],{"class":1009},[999,1720,1721],{"class":1498},"amount",[999,1723,1493],{"class":1009},[999,1725,1138],{"class":1009},[999,1727,1010],{"class":1009},[999,1729,1530],{"class":1009},[999,1731,1658],{"class":1134},[999,1733,1493],{"class":1009},[999,1735,1138],{"class":1009},[999,1737,1530],{"class":1009},[999,1739,1272],{"class":1026},[999,1741,1493],{"class":1009},[999,1743,1744],{"class":1009}," }\n",[999,1746,1747],{"class":1001,"line":1151},[999,1748,1749],{"class":1009},"    },\n",[999,1751,1752,1754,1757,1759,1761,1764,1766,1768,1770,1772,1774,1776,1778],{"class":1001,"line":1168},[999,1753,1654],{"class":1009},[999,1755,1756],{"class":1657},"required",[999,1758,1493],{"class":1009},[999,1760,1138],{"class":1009},[999,1762,1763],{"class":1009}," [",[999,1765,1493],{"class":1009},[999,1767,1691],{"class":1026},[999,1769,1493],{"class":1009},[999,1771,1318],{"class":1009},[999,1773,1530],{"class":1009},[999,1775,1721],{"class":1026},[999,1777,1493],{"class":1009},[999,1779,1780],{"class":1009},"]\n",[999,1782,1783],{"class":1001,"line":1177},[999,1784,1785],{"class":1009},"  },\n",[999,1787,1788,1790,1793,1795,1797,1799,1802,1804],{"class":1001,"line":1182},[999,1789,1487],{"class":1009},[999,1791,1792],{"class":1085},"hash",[999,1794,1493],{"class":1009},[999,1796,1138],{"class":1009},[999,1798,1530],{"class":1009},[999,1800,1801],{"class":1026},"3f2e...c9",[999,1803,1493],{"class":1009},[999,1805,1128],{"class":1009},[999,1807,1808,1810,1813,1815,1817,1819,1821],{"class":1001,"line":1214},[999,1809,1487],{"class":1009},[999,1811,1812],{"class":1085},"derivedAt",[999,1814,1493],{"class":1009},[999,1816,1138],{"class":1009},[999,1818,1530],{"class":1009},[999,1820,1533],{"class":1026},[999,1822,1575],{"class":1009},[999,1824,1825],{"class":1001,"line":1219},[999,1826,1580],{"class":1009},[1406,1828,1830],{"id":1829},"reopening-with-an-unchanged-schema-no-write","Reopening with an unchanged schema — no write",[946,1832,1833,1835,1836,1838,1839,1842,1843,1846,1847,1849,1850,1853,1854,1857],{},[950,1834,1380],{}," caches by name on that ",[950,1837,94],{}," instance — calling it again for ",[950,1840,1841],{},"'invoices'"," on the same ",[950,1844,1845],{},"vault"," object is a no-op, it doesn't re-derive anything. To observe the hash-skip you need a genuinely fresh session: a new ",[950,1848,62],{}," (via ",[950,1851,1852],{},"createNoydb",") opening the same vault name against the same ",[950,1855,1856],{},"store",", exactly as a second process or a later run of your app would:",[990,1859,1861],{"className":992,"code":1860,"language":994,"meta":995,"style":995},"\u002F\u002F a fresh session against the same store — same user\u002Fsecret, new Noydb instance:\nconst db2 = await createNoydb({ store, user: 'alice', secret: 'a-strong-secret' })\nconst vault2 = await db2.openVault('acme')\n\nvault2.collection('invoices', { schema: InvoiceSchema, persistJsonSchema: true })\nawait vault2._drainPendingSchemaWrites()\n\nconst after = await store.get('acme', '_schemas', 'invoices')\nafter._v \u002F\u002F → 1  (unchanged — the derived hash matched, so the write was skipped)\n",[950,1862,1863,1869,1919,1947,1951,1992,2005,2009,2052],{"__ignoreMap":995},[999,1864,1865],{"class":1001,"line":1002},[999,1866,1868],{"class":1867},"sHwdD","\u002F\u002F a fresh session against the same store — same user\u002Fsecret, new Noydb instance:\n",[999,1870,1871,1873,1876,1878,1880,1882,1884,1887,1889,1891,1894,1896,1898,1900,1902,1904,1907,1909,1911,1913,1915,1917],{"class":1001,"line":1033},[999,1872,1086],{"class":1085},[999,1874,1875],{"class":1013}," db2 ",[999,1877,1092],{"class":1009},[999,1879,1111],{"class":1005},[999,1881,1040],{"class":1095},[999,1883,1116],{"class":1013},[999,1885,1886],{"class":1009},"{",[999,1888,1440],{"class":1013},[999,1890,1318],{"class":1009},[999,1892,1893],{"class":1134}," user",[999,1895,1138],{"class":1009},[999,1897,1023],{"class":1009},[999,1899,1143],{"class":1026},[999,1901,1146],{"class":1009},[999,1903,1318],{"class":1009},[999,1905,1906],{"class":1134}," secret",[999,1908,1138],{"class":1009},[999,1910,1023],{"class":1009},[999,1912,1161],{"class":1026},[999,1914,1146],{"class":1009},[999,1916,1017],{"class":1009},[999,1918,1174],{"class":1013},[999,1920,1921,1923,1926,1928,1930,1933,1935,1937,1939,1941,1943,1945],{"class":1001,"line":1054},[999,1922,1086],{"class":1085},[999,1924,1925],{"class":1013}," vault2 ",[999,1927,1092],{"class":1009},[999,1929,1111],{"class":1005},[999,1931,1932],{"class":1013}," db2",[999,1934,1197],{"class":1009},[999,1936,1200],{"class":1095},[999,1938,1116],{"class":1013},[999,1940,1146],{"class":1009},[999,1942,1207],{"class":1026},[999,1944,1146],{"class":1009},[999,1946,1174],{"class":1013},[999,1948,1949],{"class":1001,"line":1075},[999,1950,1079],{"emptyLinePlaceholder":1078},[999,1952,1953,1956,1958,1960,1962,1964,1966,1968,1970,1972,1975,1977,1979,1981,1984,1986,1988,1990],{"class":1001,"line":1082},[999,1954,1955],{"class":1013},"vault2",[999,1957,1197],{"class":1009},[999,1959,1306],{"class":1095},[999,1961,1116],{"class":1013},[999,1963,1146],{"class":1009},[999,1965,1313],{"class":1026},[999,1967,1146],{"class":1009},[999,1969,1318],{"class":1009},[999,1971,1010],{"class":1009},[999,1973,1974],{"class":1134}," schema",[999,1976,1138],{"class":1009},[999,1978,1332],{"class":1013},[999,1980,1318],{"class":1009},[999,1982,1983],{"class":1134}," persistJsonSchema",[999,1985,1138],{"class":1009},[999,1987,1346],{"class":1345},[999,1989,1017],{"class":1009},[999,1991,1174],{"class":1013},[999,1993,1994,1996,1999,2001,2003],{"class":1001,"line":1101},[999,1995,1391],{"class":1005},[999,1997,1998],{"class":1013}," vault2",[999,2000,1197],{"class":1009},[999,2002,1398],{"class":1095},[999,2004,1098],{"class":1013},[999,2006,2007],{"class":1001,"line":1122},[999,2008,1079],{"emptyLinePlaceholder":1078},[999,2010,2011,2013,2016,2018,2020,2022,2024,2026,2028,2030,2032,2034,2036,2038,2040,2042,2044,2046,2048,2050],{"class":1001,"line":1131},[999,2012,1086],{"class":1085},[999,2014,2015],{"class":1013}," after ",[999,2017,1092],{"class":1009},[999,2019,1111],{"class":1005},[999,2021,1440],{"class":1013},[999,2023,1197],{"class":1009},[999,2025,1445],{"class":1095},[999,2027,1116],{"class":1013},[999,2029,1146],{"class":1009},[999,2031,1207],{"class":1026},[999,2033,1146],{"class":1009},[999,2035,1318],{"class":1009},[999,2037,1023],{"class":1009},[999,2039,1460],{"class":1026},[999,2041,1146],{"class":1009},[999,2043,1318],{"class":1009},[999,2045,1023],{"class":1009},[999,2047,1313],{"class":1026},[999,2049,1146],{"class":1009},[999,2051,1174],{"class":1013},[999,2053,2054,2057,2059,2062],{"class":1001,"line":1151},[999,2055,2056],{"class":1013},"after",[999,2058,1197],{"class":1009},[999,2060,2061],{"class":1013},"_v ",[999,2063,2064],{"class":1867},"\u002F\u002F → 1  (unchanged — the derived hash matched, so the write was skipped)\n",[946,2066,2067],{},"The hub re-derives the JSON Schema, hashes it, and compares the hash to the one already stored. Equal hash means equal shape, so it skips the write entirely — reopening a vault with hundreds of persisted-schema collections doesn't churn every one of them on every startup.",[1406,2069,2071],{"id":2070},"changing-the-schema-a-new-version-is-written","Changing the schema — a new version is written",[946,2073,2074,2075,2077,2078,2080,2081,2083],{},"Same pattern — a fresh ",[950,2076,62],{},"\u002Fvault against the same ",[950,2079,1856],{}," — but this time the collection's ",[950,2082,1361],{}," has a new field:",[990,2085,2087],{"className":992,"code":2086,"language":994,"meta":995,"style":995},"const db3 = await createNoydb({ store, user: 'alice', secret: 'a-strong-secret' })\nconst vault3 = await db3.openVault('acme')\n\nvault3.collection('invoices', {\n  schema: z.object({ id: z.string(), amount: z.number(), note: z.string() }), \u002F\u002F shape changed\n  persistJsonSchema: true,\n})\nawait vault3._drainPendingSchemaWrites()\n\nconst bumped = await store.get('acme', '_schemas', 'invoices')\nbumped._v \u002F\u002F → 2\n",[950,2088,2089,2136,2164,2168,2189,2259,2269,2275,2288,2292,2335],{"__ignoreMap":995},[999,2090,2091,2093,2096,2098,2100,2102,2104,2106,2108,2110,2112,2114,2116,2118,2120,2122,2124,2126,2128,2130,2132,2134],{"class":1001,"line":1002},[999,2092,1086],{"class":1085},[999,2094,2095],{"class":1013}," db3 ",[999,2097,1092],{"class":1009},[999,2099,1111],{"class":1005},[999,2101,1040],{"class":1095},[999,2103,1116],{"class":1013},[999,2105,1886],{"class":1009},[999,2107,1440],{"class":1013},[999,2109,1318],{"class":1009},[999,2111,1893],{"class":1134},[999,2113,1138],{"class":1009},[999,2115,1023],{"class":1009},[999,2117,1143],{"class":1026},[999,2119,1146],{"class":1009},[999,2121,1318],{"class":1009},[999,2123,1906],{"class":1134},[999,2125,1138],{"class":1009},[999,2127,1023],{"class":1009},[999,2129,1161],{"class":1026},[999,2131,1146],{"class":1009},[999,2133,1017],{"class":1009},[999,2135,1174],{"class":1013},[999,2137,2138,2140,2143,2145,2147,2150,2152,2154,2156,2158,2160,2162],{"class":1001,"line":1033},[999,2139,1086],{"class":1085},[999,2141,2142],{"class":1013}," vault3 ",[999,2144,1092],{"class":1009},[999,2146,1111],{"class":1005},[999,2148,2149],{"class":1013}," db3",[999,2151,1197],{"class":1009},[999,2153,1200],{"class":1095},[999,2155,1116],{"class":1013},[999,2157,1146],{"class":1009},[999,2159,1207],{"class":1026},[999,2161,1146],{"class":1009},[999,2163,1174],{"class":1013},[999,2165,2166],{"class":1001,"line":1054},[999,2167,1079],{"emptyLinePlaceholder":1078},[999,2169,2170,2173,2175,2177,2179,2181,2183,2185,2187],{"class":1001,"line":1075},[999,2171,2172],{"class":1013},"vault3",[999,2174,1197],{"class":1009},[999,2176,1306],{"class":1095},[999,2178,1116],{"class":1013},[999,2180,1146],{"class":1009},[999,2182,1313],{"class":1026},[999,2184,1146],{"class":1009},[999,2186,1318],{"class":1009},[999,2188,1321],{"class":1009},[999,2190,2191,2193,2195,2197,2199,2201,2203,2205,2208,2210,2212,2214,2216,2218,2220,2223,2225,2227,2229,2231,2233,2235,2238,2240,2242,2244,2246,2249,2251,2254,2256],{"class":1001,"line":1082},[999,2192,1327],{"class":1134},[999,2194,1138],{"class":1009},[999,2196,1014],{"class":1013},[999,2198,1197],{"class":1009},[999,2200,1233],{"class":1095},[999,2202,1116],{"class":1013},[999,2204,1886],{"class":1009},[999,2206,2207],{"class":1134}," id",[999,2209,1138],{"class":1009},[999,2211,1014],{"class":1013},[999,2213,1197],{"class":1009},[999,2215,1252],{"class":1095},[999,2217,1255],{"class":1013},[999,2219,1318],{"class":1009},[999,2221,2222],{"class":1134}," amount",[999,2224,1138],{"class":1009},[999,2226,1014],{"class":1013},[999,2228,1197],{"class":1009},[999,2230,1272],{"class":1095},[999,2232,1255],{"class":1013},[999,2234,1318],{"class":1009},[999,2236,2237],{"class":1134}," note",[999,2239,1138],{"class":1009},[999,2241,1014],{"class":1013},[999,2243,1197],{"class":1009},[999,2245,1252],{"class":1095},[999,2247,2248],{"class":1013},"() ",[999,2250,1171],{"class":1009},[999,2252,2253],{"class":1013},")",[999,2255,1318],{"class":1009},[999,2257,2258],{"class":1867}," \u002F\u002F shape changed\n",[999,2260,2261,2263,2265,2267],{"class":1001,"line":1101},[999,2262,1340],{"class":1134},[999,2264,1138],{"class":1009},[999,2266,1346],{"class":1345},[999,2268,1128],{"class":1009},[999,2270,2271,2273],{"class":1001,"line":1122},[999,2272,1171],{"class":1009},[999,2274,1174],{"class":1013},[999,2276,2277,2279,2282,2284,2286],{"class":1001,"line":1131},[999,2278,1391],{"class":1005},[999,2280,2281],{"class":1013}," vault3",[999,2283,1197],{"class":1009},[999,2285,1398],{"class":1095},[999,2287,1098],{"class":1013},[999,2289,2290],{"class":1001,"line":1151},[999,2291,1079],{"emptyLinePlaceholder":1078},[999,2293,2294,2296,2299,2301,2303,2305,2307,2309,2311,2313,2315,2317,2319,2321,2323,2325,2327,2329,2331,2333],{"class":1001,"line":1168},[999,2295,1086],{"class":1085},[999,2297,2298],{"class":1013}," bumped ",[999,2300,1092],{"class":1009},[999,2302,1111],{"class":1005},[999,2304,1440],{"class":1013},[999,2306,1197],{"class":1009},[999,2308,1445],{"class":1095},[999,2310,1116],{"class":1013},[999,2312,1146],{"class":1009},[999,2314,1207],{"class":1026},[999,2316,1146],{"class":1009},[999,2318,1318],{"class":1009},[999,2320,1023],{"class":1009},[999,2322,1460],{"class":1026},[999,2324,1146],{"class":1009},[999,2326,1318],{"class":1009},[999,2328,1023],{"class":1009},[999,2330,1313],{"class":1026},[999,2332,1146],{"class":1009},[999,2334,1174],{"class":1013},[999,2336,2337,2340,2342,2344],{"class":1001,"line":1177},[999,2338,2339],{"class":1013},"bumped",[999,2341,1197],{"class":1009},[999,2343,2061],{"class":1013},[999,2345,2346],{"class":1867},"\u002F\u002F → 2\n",[1406,2348,2350],{"id":2349},"a-non-zod-validator-a-stub-envelope-not-a-json-schema","A non-Zod validator — a stub envelope, not a JSON Schema",[946,2352,2353,2354,2356,2357,2362],{},"If the collection's ",[950,2355,1361],{}," isn't Zod (Valibot, ArkType, Effect Schema — any other ",[955,2358,2361],{"href":2359,"rel":2360},"https:\u002F\u002Fstandardschema.dev",[959],"Standard Schema"," validator), the hub still writes a record, but without a derived body:",[990,2364,2366],{"className":992,"code":2365,"language":994,"meta":995,"style":995},"import { derivePersistedSchema } from '@noy-db\u002Fhub'\n\n\u002F\u002F a Standard Schema v1 validator that isn't Zod (shape a real Valibot\u002FArkType\u002F\n\u002F\u002F Effect Schema value carries — the `~standard.vendor` tag is what's detected)\nconst nonZodValidator = { '~standard': { version: 1, vendor: 'valibot', validate: () => ({}) } }\n\nconst stub = await derivePersistedSchema(nonZodValidator)\n",[950,2367,2368,2387,2391,2396,2401,2470,2474],{"__ignoreMap":995},[999,2369,2370,2372,2374,2377,2379,2381,2383,2385],{"class":1001,"line":1002},[999,2371,1006],{"class":1005},[999,2373,1010],{"class":1009},[999,2375,2376],{"class":1013}," derivePersistedSchema",[999,2378,1017],{"class":1009},[999,2380,1020],{"class":1005},[999,2382,1023],{"class":1009},[999,2384,1049],{"class":1026},[999,2386,1030],{"class":1009},[999,2388,2389],{"class":1001,"line":1033},[999,2390,1079],{"emptyLinePlaceholder":1078},[999,2392,2393],{"class":1001,"line":1054},[999,2394,2395],{"class":1867},"\u002F\u002F a Standard Schema v1 validator that isn't Zod (shape a real Valibot\u002FArkType\u002F\n",[999,2397,2398],{"class":1001,"line":1075},[999,2399,2400],{"class":1867},"\u002F\u002F Effect Schema value carries — the `~standard.vendor` tag is what's detected)\n",[999,2402,2403,2405,2408,2410,2412,2414,2417,2419,2421,2423,2426,2428,2430,2432,2435,2437,2439,2442,2444,2446,2449,2451,2454,2457,2460,2463,2466,2468],{"class":1001,"line":1082},[999,2404,1086],{"class":1085},[999,2406,2407],{"class":1013}," nonZodValidator ",[999,2409,1092],{"class":1009},[999,2411,1010],{"class":1009},[999,2413,1023],{"class":1009},[999,2415,2416],{"class":1134},"~standard",[999,2418,1146],{"class":1009},[999,2420,1138],{"class":1009},[999,2422,1010],{"class":1009},[999,2424,2425],{"class":1134}," version",[999,2427,1138],{"class":1009},[999,2429,1499],{"class":1498},[999,2431,1318],{"class":1009},[999,2433,2434],{"class":1134}," vendor",[999,2436,1138],{"class":1009},[999,2438,1023],{"class":1009},[999,2440,2441],{"class":1026},"valibot",[999,2443,1146],{"class":1009},[999,2445,1318],{"class":1009},[999,2447,2448],{"class":1095}," validate",[999,2450,1138],{"class":1009},[999,2452,2453],{"class":1009}," ()",[999,2455,2456],{"class":1085}," =>",[999,2458,2459],{"class":1013}," (",[999,2461,2462],{"class":1009},"{}",[999,2464,2465],{"class":1013},") ",[999,2467,1171],{"class":1009},[999,2469,1744],{"class":1009},[999,2471,2472],{"class":1001,"line":1101},[999,2473,1079],{"emptyLinePlaceholder":1078},[999,2475,2476,2478,2481,2483,2485,2487],{"class":1001,"line":1122},[999,2477,1086],{"class":1085},[999,2479,2480],{"class":1013}," stub ",[999,2482,1092],{"class":1009},[999,2484,1111],{"class":1005},[999,2486,2376],{"class":1095},[999,2488,2489],{"class":1013},"(nonZodValidator)\n",[990,2491,2493],{"className":1475,"code":2492,"language":141,"meta":995,"style":995},"{\n  \"_noydb_schema\": 1,\n  \"kind\": \"Unknown\",\n  \"jsonSchema\": null,\n  \"hash\": null,\n  \"reason\": \"derivation not yet supported for kind=Unknown (v0 supports Zod only)\",\n  \"derivedAt\": \"2026-07-08T10:00:00.000Z\"\n}\n",[950,2494,2495,2499,2513,2532,2545,2557,2577,2593],{"__ignoreMap":995},[999,2496,2497],{"class":1001,"line":1002},[999,2498,1119],{"class":1009},[999,2500,2501,2503,2505,2507,2509,2511],{"class":1001,"line":1033},[999,2502,1487],{"class":1009},[999,2504,1608],{"class":1085},[999,2506,1493],{"class":1009},[999,2508,1138],{"class":1009},[999,2510,1499],{"class":1498},[999,2512,1128],{"class":1009},[999,2514,2515,2517,2519,2521,2523,2525,2528,2530],{"class":1001,"line":1054},[999,2516,1487],{"class":1009},[999,2518,1623],{"class":1085},[999,2520,1493],{"class":1009},[999,2522,1138],{"class":1009},[999,2524,1530],{"class":1009},[999,2526,2527],{"class":1026},"Unknown",[999,2529,1493],{"class":1009},[999,2531,1128],{"class":1009},[999,2533,2534,2536,2538,2540,2542],{"class":1001,"line":1075},[999,2535,1487],{"class":1009},[999,2537,1643],{"class":1085},[999,2539,1493],{"class":1009},[999,2541,1138],{"class":1009},[999,2543,2544],{"class":1009}," null,\n",[999,2546,2547,2549,2551,2553,2555],{"class":1001,"line":1082},[999,2548,1487],{"class":1009},[999,2550,1792],{"class":1085},[999,2552,1493],{"class":1009},[999,2554,1138],{"class":1009},[999,2556,2544],{"class":1009},[999,2558,2559,2561,2564,2566,2568,2570,2573,2575],{"class":1001,"line":1101},[999,2560,1487],{"class":1009},[999,2562,2563],{"class":1085},"reason",[999,2565,1493],{"class":1009},[999,2567,1138],{"class":1009},[999,2569,1530],{"class":1009},[999,2571,2572],{"class":1026},"derivation not yet supported for kind=Unknown (v0 supports Zod only)",[999,2574,1493],{"class":1009},[999,2576,1128],{"class":1009},[999,2578,2579,2581,2583,2585,2587,2589,2591],{"class":1001,"line":1122},[999,2580,1487],{"class":1009},[999,2582,1812],{"class":1085},[999,2584,1493],{"class":1009},[999,2586,1138],{"class":1009},[999,2588,1530],{"class":1009},[999,2590,1533],{"class":1026},[999,2592,1575],{"class":1009},[999,2594,2595],{"class":1001,"line":1131},[999,2596,1580],{"class":1009},[946,2598,2599,2601,2602,2605,2606,2608,2609,2611,2612,2614,2615,2617],{},[950,2600,1623],{}," reports ",[950,2603,2604],{},"'Unknown'"," for anything the hub can't fingerprint as Zod today (see ",[955,2607,1366],{"href":1365}," for what ",[950,2610,1623],{}," can be). Because there's no hash to compare, a later reopen skips the write only when ",[950,2613,1623],{}," hasn't changed — a ",[950,2616,1623],{}," change is the only signal available without a body.",[941,2619,2621],{"id":2620},"api-reference","API reference",[946,2623,2624,2625,2627],{},"All exports below come from the ",[950,2626,1049],{}," root.",[1406,2629,2631],{"id":2630},"persistjsonschema",[950,2632,2633],{},"persistJsonSchema",[990,2635,2637],{"className":992,"code":2636,"language":994,"meta":995,"style":995},"vault.collection\u003CT>(name, {\n  schema,\n  persistJsonSchema?: boolean,  \u002F\u002F default: false\n})\n",[950,2638,2639,2663,2669,2684],{"__ignoreMap":995},[999,2640,2641,2643,2645,2647,2650,2653,2656,2659,2661],{"class":1001,"line":1002},[999,2642,1845],{"class":1013},[999,2644,1197],{"class":1009},[999,2646,1306],{"class":1095},[999,2648,2649],{"class":1009},"\u003C",[999,2651,2652],{"class":1657},"T",[999,2654,2655],{"class":1009},">",[999,2657,2658],{"class":1013},"(name",[999,2660,1318],{"class":1009},[999,2662,1321],{"class":1009},[999,2664,2665,2667],{"class":1001,"line":1033},[999,2666,1327],{"class":1013},[999,2668,1128],{"class":1009},[999,2670,2671,2674,2676,2679,2681],{"class":1001,"line":1054},[999,2672,2673],{"class":1013},"  persistJsonSchema?",[999,2675,1138],{"class":1009},[999,2677,2678],{"class":1013}," boolean",[999,2680,1318],{"class":1009},[999,2682,2683],{"class":1867},"  \u002F\u002F default: false\n",[999,2685,2686,2688],{"class":1001,"line":1075},[999,2687,1171],{"class":1009},[999,2689,1174],{"class":1013},[946,2691,2692,2693,2696,2697,2699,2700,2703],{},"When ",[950,2694,2695],{},"true"," and ",[950,2698,1361],{}," is set, the hub derives, hashes, and (if changed) writes the ",[950,2701,2702],{},"_schemas\u002F\u003Cname>"," envelope on every vault open.",[1406,2705,2707],{"id":2706},"derivepersistedschemavalidator",[950,2708,2709],{},"derivePersistedSchema(validator)",[990,2711,2713],{"className":992,"code":2712,"language":994,"meta":995,"style":995},"function derivePersistedSchema(validator: unknown): Promise\u003CPersistedSchemaEnvelope>\n",[950,2714,2715],{"__ignoreMap":995},[999,2716,2717,2720,2722,2724,2728,2730,2733,2736,2739,2741,2744],{"class":1001,"line":1002},[999,2718,2719],{"class":1085},"function",[999,2721,2376],{"class":1095},[999,2723,1116],{"class":1009},[999,2725,2727],{"class":2726},"sHdIc","validator",[999,2729,1138],{"class":1009},[999,2731,2732],{"class":1657}," unknown",[999,2734,2735],{"class":1009},"):",[999,2737,2738],{"class":1657}," Promise",[999,2740,2649],{"class":1009},[999,2742,2743],{"class":1657},"PersistedSchemaEnvelope",[999,2745,2746],{"class":1009},">\n",[946,2748,2749,2750,2752,2753,2755],{},"Converts a validator to a ",[950,2751,2743],{}," without touching storage — the pure derive step ",[950,2754,2633],{}," runs internally. Useful for previewing what would be persisted, or for computing a JSON Schema outside a vault entirely.",[990,2757,2759],{"className":992,"code":2758,"language":994,"meta":995,"style":995},"import { derivePersistedSchema } from '@noy-db\u002Fhub'\n\nconst env = await derivePersistedSchema(z.object({ id: z.string() }))\nenv.hash \u002F\u002F → 64-char hex SHA-256 of the canonicalized JSON Schema\n",[950,2760,2761,2779,2783,2824],{"__ignoreMap":995},[999,2762,2763,2765,2767,2769,2771,2773,2775,2777],{"class":1001,"line":1002},[999,2764,1006],{"class":1005},[999,2766,1010],{"class":1009},[999,2768,2376],{"class":1013},[999,2770,1017],{"class":1009},[999,2772,1020],{"class":1005},[999,2774,1023],{"class":1009},[999,2776,1049],{"class":1026},[999,2778,1030],{"class":1009},[999,2780,2781],{"class":1001,"line":1033},[999,2782,1079],{"emptyLinePlaceholder":1078},[999,2784,2785,2787,2790,2792,2794,2796,2799,2801,2803,2805,2807,2809,2811,2813,2815,2817,2819,2821],{"class":1001,"line":1054},[999,2786,1086],{"class":1085},[999,2788,2789],{"class":1013}," env ",[999,2791,1092],{"class":1009},[999,2793,1111],{"class":1005},[999,2795,2376],{"class":1095},[999,2797,2798],{"class":1013},"(z",[999,2800,1197],{"class":1009},[999,2802,1233],{"class":1095},[999,2804,1116],{"class":1013},[999,2806,1886],{"class":1009},[999,2808,2207],{"class":1134},[999,2810,1138],{"class":1009},[999,2812,1014],{"class":1013},[999,2814,1197],{"class":1009},[999,2816,1252],{"class":1095},[999,2818,2248],{"class":1013},[999,2820,1171],{"class":1009},[999,2822,2823],{"class":1013},"))\n",[999,2825,2826,2828,2830,2833],{"class":1001,"line":1075},[999,2827,183],{"class":1013},[999,2829,1197],{"class":1009},[999,2831,2832],{"class":1013},"hash ",[999,2834,2835],{"class":1867},"\u002F\u002F → 64-char hex SHA-256 of the canonicalized JSON Schema\n",[1406,2837,2839],{"id":2838},"iszodschemavalue",[950,2840,2841],{},"isZodSchema(value)",[990,2843,2845],{"className":992,"code":2844,"language":994,"meta":995,"style":995},"function isZodSchema(value: unknown): boolean\n",[950,2846,2847],{"__ignoreMap":995},[999,2848,2849,2851,2854,2856,2859,2861,2863,2865],{"class":1001,"line":1002},[999,2850,2719],{"class":1085},[999,2852,2853],{"class":1095}," isZodSchema",[999,2855,1116],{"class":1009},[999,2857,2858],{"class":2726},"value",[999,2860,1138],{"class":1009},[999,2862,2732],{"class":1657},[999,2864,2735],{"class":1009},[999,2866,2867],{"class":1657}," boolean\n",[946,2869,2870,2872,2873,2875],{},[950,2871,2695],{}," when ",[950,2874,2858],{}," is a Zod schema (Zod v3 or v4). Used internally to pick the derivation path; exported because it's a generally useful duck-type check.",[1406,2877,2879,2881,2882,2885],{"id":2878},"persistedschemaenvelope-persistedschemakind-types",[950,2880,2743],{}," \u002F ",[950,2883,2884],{},"PersistedSchemaKind"," (types)",[990,2887,2889],{"className":992,"code":2888,"language":994,"meta":995,"style":995},"type PersistedSchemaKind = 'Zod' | 'Valibot' | 'ArkType' | 'Effect' | 'Unknown'\n\ninterface PersistedSchemaEnvelope {\n  readonly _noydb_schema: 1\n  readonly kind: PersistedSchemaKind\n  readonly jsonSchema: object | null   \u002F\u002F null when kind isn't Zod\n  readonly hash: string | null         \u002F\u002F null when jsonSchema is null\n  readonly reason?: string             \u002F\u002F populated when jsonSchema is null\n  readonly derivedAt: string           \u002F\u002F ISO-8601\n  readonly classified?: ClassifiedMarker  \u002F\u002F config-drift marker, see classified.md\n  readonly satellite?: PairingMarker      \u002F\u002F satellite pairing marker, see satellites docs\n}\n",[950,2890,2891,2943,2947,2957,2970,2982,3002,3021,3036,3050,3065,3080],{"__ignoreMap":995},[999,2892,2893,2895,2898,2901,2903,2905,2907,2910,2912,2915,2917,2919,2921,2924,2926,2928,2930,2933,2935,2937,2939,2941],{"class":1001,"line":1002},[999,2894,1658],{"class":1085},[999,2896,2897],{"class":1657}," PersistedSchemaKind",[999,2899,2900],{"class":1009}," =",[999,2902,1023],{"class":1009},[999,2904,1632],{"class":1026},[999,2906,1146],{"class":1009},[999,2908,2909],{"class":1009}," |",[999,2911,1023],{"class":1009},[999,2913,2914],{"class":1026},"Valibot",[999,2916,1146],{"class":1009},[999,2918,2909],{"class":1009},[999,2920,1023],{"class":1009},[999,2922,2923],{"class":1026},"ArkType",[999,2925,1146],{"class":1009},[999,2927,2909],{"class":1009},[999,2929,1023],{"class":1009},[999,2931,2932],{"class":1026},"Effect",[999,2934,1146],{"class":1009},[999,2936,2909],{"class":1009},[999,2938,1023],{"class":1009},[999,2940,2527],{"class":1026},[999,2942,1030],{"class":1009},[999,2944,2945],{"class":1001,"line":1033},[999,2946,1079],{"emptyLinePlaceholder":1078},[999,2948,2949,2952,2955],{"class":1001,"line":1054},[999,2950,2951],{"class":1085},"interface",[999,2953,2954],{"class":1657}," PersistedSchemaEnvelope",[999,2956,1321],{"class":1009},[999,2958,2959,2962,2965,2967],{"class":1001,"line":1075},[999,2960,2961],{"class":1085},"  readonly",[999,2963,2964],{"class":1134}," _noydb_schema",[999,2966,1138],{"class":1009},[999,2968,2969],{"class":1498}," 1\n",[999,2971,2972,2974,2977,2979],{"class":1001,"line":1082},[999,2973,2961],{"class":1085},[999,2975,2976],{"class":1134}," kind",[999,2978,1138],{"class":1009},[999,2980,2981],{"class":1657}," PersistedSchemaKind\n",[999,2983,2984,2986,2989,2991,2994,2996,2999],{"class":1001,"line":1101},[999,2985,2961],{"class":1085},[999,2987,2988],{"class":1134}," jsonSchema",[999,2990,1138],{"class":1009},[999,2992,2993],{"class":1657}," object",[999,2995,2909],{"class":1009},[999,2997,2998],{"class":1657}," null",[999,3000,3001],{"class":1867},"   \u002F\u002F null when kind isn't Zod\n",[999,3003,3004,3006,3009,3011,3014,3016,3018],{"class":1001,"line":1122},[999,3005,2961],{"class":1085},[999,3007,3008],{"class":1134}," hash",[999,3010,1138],{"class":1009},[999,3012,3013],{"class":1657}," string",[999,3015,2909],{"class":1009},[999,3017,2998],{"class":1657},[999,3019,3020],{"class":1867},"         \u002F\u002F null when jsonSchema is null\n",[999,3022,3023,3025,3028,3031,3033],{"class":1001,"line":1131},[999,3024,2961],{"class":1085},[999,3026,3027],{"class":1134}," reason",[999,3029,3030],{"class":1009},"?:",[999,3032,3013],{"class":1657},[999,3034,3035],{"class":1867},"             \u002F\u002F populated when jsonSchema is null\n",[999,3037,3038,3040,3043,3045,3047],{"class":1001,"line":1151},[999,3039,2961],{"class":1085},[999,3041,3042],{"class":1134}," derivedAt",[999,3044,1138],{"class":1009},[999,3046,3013],{"class":1657},[999,3048,3049],{"class":1867},"           \u002F\u002F ISO-8601\n",[999,3051,3052,3054,3057,3059,3062],{"class":1001,"line":1168},[999,3053,2961],{"class":1085},[999,3055,3056],{"class":1134}," classified",[999,3058,3030],{"class":1009},[999,3060,3061],{"class":1657}," ClassifiedMarker",[999,3063,3064],{"class":1867},"  \u002F\u002F config-drift marker, see classified.md\n",[999,3066,3067,3069,3072,3074,3077],{"class":1001,"line":1177},[999,3068,2961],{"class":1085},[999,3070,3071],{"class":1134}," satellite",[999,3073,3030],{"class":1009},[999,3075,3076],{"class":1657}," PairingMarker",[999,3078,3079],{"class":1867},"      \u002F\u002F satellite pairing marker, see satellites docs\n",[999,3081,3082],{"class":1001,"line":1182},[999,3083,1580],{"class":1009},[946,3085,3086,3087,3089,3090,3092,3093,3097,3098,3100,3101,3104,3105,3108,3109,3111,3112,2696,3114,3117,3118,3120,3121,3124],{},"The decrypted shape of the ",[950,3088,967],{}," record's payload. ",[950,3091,1623],{}," is a ",[3094,3095,3096],"em",{},"detected"," label — v0 only ever derives a real ",[950,3099,1643],{}," for ",[950,3102,3103],{},"'Zod'","; every other value in the union writes a stub with ",[950,3106,3107],{},"jsonSchema: null"," and a ",[950,3110,2563],{},". ",[950,3113,633],{},[950,3115,3116],{},"satellite"," are independent of ",[950,3119,2633],{}," — they're written into this same shared record by ",[955,3122,633],{"href":3123},".\u002Fclassified"," collections and satellite declarations respectively, and a schema-persisting write preserves whichever of them is already stored rather than dropping it.",[1406,3126,3128],{"id":3127},"schemas_collection",[950,3129,3130],{},"SCHEMAS_COLLECTION",[990,3132,3134],{"className":992,"code":3133,"language":994,"meta":995,"style":995},"const SCHEMAS_COLLECTION = '_schemas'\n",[950,3135,3136],{"__ignoreMap":995},[999,3137,3138,3140,3143,3145,3147,3149],{"class":1001,"line":1002},[999,3139,1086],{"class":1085},[999,3141,3142],{"class":1013}," SCHEMAS_COLLECTION ",[999,3144,1092],{"class":1009},[999,3146,1023],{"class":1009},[999,3148,1460],{"class":1026},[999,3150,1030],{"class":1009},[946,3152,3153],{},"The reserved collection name the envelopes are stored under, exported so callers don't have to hardcode the string.",[1406,3155,3157,2881,3160],{"id":3156},"loadpersistedschemastore-vault-collection-dek-savepersistedschemastore-vault-collection-dek-payload",[950,3158,3159],{},"loadPersistedSchema(store, vault, collection, dek)",[950,3161,3162],{},"savePersistedSchema(store, vault, collection, dek, payload)",[990,3164,3166],{"className":992,"code":3165,"language":994,"meta":995,"style":995},"function loadPersistedSchema(\n  store: NoydbStore, vault: string, collection: string, dek: EnclaveKey,\n): Promise\u003CPersistedSchemaEnvelope | undefined>\n\nfunction savePersistedSchema(\n  store: NoydbStore, vault: string, collection: string, dek: EnclaveKey,\n  payload: PersistedSchemaEnvelope, expectedVersion?: number,\n): Promise\u003Cvoid>\n",[950,3167,3168,3178,3216,3233,3237,3246,3280,3301],{"__ignoreMap":995},[999,3169,3170,3172,3175],{"class":1001,"line":1002},[999,3171,2719],{"class":1085},[999,3173,3174],{"class":1095}," loadPersistedSchema",[999,3176,3177],{"class":1009},"(\n",[999,3179,3180,3182,3184,3187,3189,3191,3193,3195,3197,3200,3202,3204,3206,3209,3211,3214],{"class":1001,"line":1033},[999,3181,1125],{"class":2726},[999,3183,1138],{"class":1009},[999,3185,3186],{"class":1657}," NoydbStore",[999,3188,1318],{"class":1009},[999,3190,1301],{"class":2726},[999,3192,1138],{"class":1009},[999,3194,3013],{"class":1657},[999,3196,1318],{"class":1009},[999,3198,3199],{"class":2726}," collection",[999,3201,1138],{"class":1009},[999,3203,3013],{"class":1657},[999,3205,1318],{"class":1009},[999,3207,3208],{"class":2726}," dek",[999,3210,1138],{"class":1009},[999,3212,3213],{"class":1657}," EnclaveKey",[999,3215,1128],{"class":1009},[999,3217,3218,3220,3222,3224,3226,3228,3231],{"class":1001,"line":1054},[999,3219,2735],{"class":1009},[999,3221,2738],{"class":1657},[999,3223,2649],{"class":1009},[999,3225,2743],{"class":1657},[999,3227,2909],{"class":1009},[999,3229,3230],{"class":1657}," undefined",[999,3232,2746],{"class":1009},[999,3234,3235],{"class":1001,"line":1075},[999,3236,1079],{"emptyLinePlaceholder":1078},[999,3238,3239,3241,3244],{"class":1001,"line":1082},[999,3240,2719],{"class":1085},[999,3242,3243],{"class":1095}," savePersistedSchema",[999,3245,3177],{"class":1009},[999,3247,3248,3250,3252,3254,3256,3258,3260,3262,3264,3266,3268,3270,3272,3274,3276,3278],{"class":1001,"line":1101},[999,3249,1125],{"class":2726},[999,3251,1138],{"class":1009},[999,3253,3186],{"class":1657},[999,3255,1318],{"class":1009},[999,3257,1301],{"class":2726},[999,3259,1138],{"class":1009},[999,3261,3013],{"class":1657},[999,3263,1318],{"class":1009},[999,3265,3199],{"class":2726},[999,3267,1138],{"class":1009},[999,3269,3013],{"class":1657},[999,3271,1318],{"class":1009},[999,3273,3208],{"class":2726},[999,3275,1138],{"class":1009},[999,3277,3213],{"class":1657},[999,3279,1128],{"class":1009},[999,3281,3282,3285,3287,3289,3291,3294,3296,3299],{"class":1001,"line":1122},[999,3283,3284],{"class":2726},"  payload",[999,3286,1138],{"class":1009},[999,3288,2954],{"class":1657},[999,3290,1318],{"class":1009},[999,3292,3293],{"class":2726}," expectedVersion",[999,3295,3030],{"class":1009},[999,3297,3298],{"class":1657}," number",[999,3300,1128],{"class":1009},[999,3302,3303,3305,3307,3309,3312],{"class":1001,"line":1131},[999,3304,2735],{"class":1009},[999,3306,2738],{"class":1657},[999,3308,2649],{"class":1009},[999,3310,3311],{"class":1657},"void",[999,3313,2746],{"class":1009},[946,3315,3316,3317,1586,3319,3321,3322,3325,3326,3329,3330,3332,3333,3339,3340,3342,3343,3345,3346,3349,3350,3353],{},"Low-level read\u002Fwrite against the raw storage adapter and a resolved DEK, rather than a ",[950,3318,94],{},[950,3320,103],{}," handle. ",[950,3323,3324],{},"dek"," is an opaque ",[950,3327,3328],{},"EnclaveKey"," token — the hub's internal per-collection key type, not part of the public surface exported from ",[950,3331,1049],{}," — obtainable only from inside the hub itself. These two functions are documented here for completeness (they're the layer ",[955,3334,3336],{"href":3335},".\u002Fintrospection",[950,3337,3338],{},"collection.describe()"," and the ",[950,3341,952],{}," bundle-inspection command use internally to read a schema from a store or bundle that has no live validator in memory), not as plumbing you wire up yourself; ",[950,3344,983],{}," is the opt-in that matters for application code. ",[950,3347,3348],{},"loadPersistedSchema"," returns ",[950,3351,3352],{},"undefined"," when nothing has been written yet, or when decryption fails (wrong DEK, corrupt record).",[1406,3355,3357,2881,3360],{"id":3356},"persistschemaifneededopts-persistschemaresult",[950,3358,3359],{},"persistSchemaIfNeeded(opts)",[950,3361,3362],{},"PersistSchemaResult",[990,3364,3366],{"className":992,"code":3365,"language":994,"meta":995,"style":995},"function persistSchemaIfNeeded(opts: {\n  store: NoydbStore\n  vault: string\n  collectionName: string\n  validator: unknown\n  dek: EnclaveKey\n  strategies?: readonly SchemaUpdateStrategy[]\n}): Promise\u003CPersistSchemaResult>\n\ninterface PersistSchemaResult {\n  readonly written: boolean   \u002F\u002F true when a fresh envelope was written\n  readonly skipped: boolean   \u002F\u002F true when the stored envelope already matched\n  readonly envelope: PersistedSchemaEnvelope\n  readonly decision?: UpdateDecision   \u002F\u002F present when strategies ran, see schema-update.md\n}\n",[950,3367,3368,3384,3393,3403,3412,3422,3432,3448,3461,3465,3474,3488,3502,3514,3529],{"__ignoreMap":995},[999,3369,3370,3372,3375,3377,3380,3382],{"class":1001,"line":1002},[999,3371,2719],{"class":1085},[999,3373,3374],{"class":1095}," persistSchemaIfNeeded",[999,3376,1116],{"class":1009},[999,3378,3379],{"class":2726},"opts",[999,3381,1138],{"class":1009},[999,3383,1321],{"class":1009},[999,3385,3386,3388,3390],{"class":1001,"line":1033},[999,3387,1125],{"class":1134},[999,3389,1138],{"class":1009},[999,3391,3392],{"class":1657}," NoydbStore\n",[999,3394,3395,3398,3400],{"class":1001,"line":1054},[999,3396,3397],{"class":1134},"  vault",[999,3399,1138],{"class":1009},[999,3401,3402],{"class":1657}," string\n",[999,3404,3405,3408,3410],{"class":1001,"line":1075},[999,3406,3407],{"class":1134},"  collectionName",[999,3409,1138],{"class":1009},[999,3411,3402],{"class":1657},[999,3413,3414,3417,3419],{"class":1001,"line":1082},[999,3415,3416],{"class":1134},"  validator",[999,3418,1138],{"class":1009},[999,3420,3421],{"class":1657}," unknown\n",[999,3423,3424,3427,3429],{"class":1001,"line":1101},[999,3425,3426],{"class":1134},"  dek",[999,3428,1138],{"class":1009},[999,3430,3431],{"class":1657}," EnclaveKey\n",[999,3433,3434,3437,3439,3442,3445],{"class":1001,"line":1122},[999,3435,3436],{"class":1134},"  strategies",[999,3438,3030],{"class":1009},[999,3440,3441],{"class":1085}," readonly",[999,3443,3444],{"class":1657}," SchemaUpdateStrategy",[999,3446,3447],{"class":1013},"[]\n",[999,3449,3450,3453,3455,3457,3459],{"class":1001,"line":1131},[999,3451,3452],{"class":1009},"}):",[999,3454,2738],{"class":1657},[999,3456,2649],{"class":1009},[999,3458,3362],{"class":1657},[999,3460,2746],{"class":1009},[999,3462,3463],{"class":1001,"line":1151},[999,3464,1079],{"emptyLinePlaceholder":1078},[999,3466,3467,3469,3472],{"class":1001,"line":1168},[999,3468,2951],{"class":1085},[999,3470,3471],{"class":1657}," PersistSchemaResult",[999,3473,1321],{"class":1009},[999,3475,3476,3478,3481,3483,3485],{"class":1001,"line":1177},[999,3477,2961],{"class":1085},[999,3479,3480],{"class":1134}," written",[999,3482,1138],{"class":1009},[999,3484,2678],{"class":1657},[999,3486,3487],{"class":1867},"   \u002F\u002F true when a fresh envelope was written\n",[999,3489,3490,3492,3495,3497,3499],{"class":1001,"line":1182},[999,3491,2961],{"class":1085},[999,3493,3494],{"class":1134}," skipped",[999,3496,1138],{"class":1009},[999,3498,2678],{"class":1657},[999,3500,3501],{"class":1867},"   \u002F\u002F true when the stored envelope already matched\n",[999,3503,3504,3506,3509,3511],{"class":1001,"line":1214},[999,3505,2961],{"class":1085},[999,3507,3508],{"class":1134}," envelope",[999,3510,1138],{"class":1009},[999,3512,3513],{"class":1657}," PersistedSchemaEnvelope\n",[999,3515,3516,3518,3521,3523,3526],{"class":1001,"line":1219},[999,3517,2961],{"class":1085},[999,3519,3520],{"class":1134}," decision",[999,3522,3030],{"class":1009},[999,3524,3525],{"class":1657}," UpdateDecision",[999,3527,3528],{"class":1867},"   \u002F\u002F present when strategies ran, see schema-update.md\n",[999,3530,3531],{"class":1001,"line":1240},[999,3532,1580],{"class":1009},[946,3534,3535,3536,3539,3540,3111,3542,3545,3546,3549,3550,3553,3554,3556],{},"The derive → hash-compare → skip-or-write orchestration that ",[950,3537,3538],{},"vault.collection({ persistJsonSchema: true })"," calls internally. Exported for advanced callers that manage their own store\u002FDEK plumbing outside a ",[950,3541,94],{},[950,3543,3544],{},"strategies"," is the opt-in ",[955,3547,820],{"href":3548},".\u002Fschema-update"," plugs into: when the derived schema changed and a stored baseline exists, each strategy gets a chance to allow, reject, or run a coordinated cutover before the write happens — ",[950,3551,3552],{},"decision"," reports which. Omit ",[950,3555,3544],{}," (or pass none) and every change is allowed, matching the plain skip-or-write behavior described above.",[941,3558,1366],{"id":3559},"limits-gotchas",[3561,3562,3563,3602,3617,3623,3629,3641],"ul",{},[3564,3565,3566,3570,3571,3574,3575,3578,3579,3581,3582,3584,3585,2881,3588,2881,3591,3594,3595,3598,3599,3601],"li",{},[3567,3568,3569],"strong",{},"v0 detects Zod vs. everything else — not each validator family individually."," Zod 3 (via the optional peer-dep ",[950,3572,3573],{},"zod-to-json-schema",") and Zod 4 (via Zod's own ",[950,3576,3577],{},"toJSONSchema()",") are both supported and auto-detected, and derive a real ",[950,3580,1643],{}," body. ",[950,3583,2884],{}," also has ",[950,3586,3587],{},"'Valibot'",[950,3589,3590],{},"'ArkType'",[950,3592,3593],{},"'Effect'"," members for future per-library detection, but today any non-Zod Standard Schema validator is reported as ",[950,3596,3597],{},"kind: 'Unknown'"," and always gets a stub envelope (",[950,3600,3107],{},"), never a derived JSON Schema body.",[3564,3603,3604,3609,3610,3613,3614,3616],{},[3567,3605,3606,3607,1197],{},"The write is asynchronous and not awaited by ",[950,3608,1380],{}," It's queued against a background drain; call ",[950,3611,3612],{},"await vault._drainPendingSchemaWrites()"," when a test or script needs to observe the write before reading ",[950,3615,967],{}," back.",[3564,3618,3619,3622],{},[3567,3620,3621],{},"Hash-skip only inspects the derived JSON Schema, not your Zod source."," Renaming a field or changing a constraint changes the derived shape (and the hash) and triggers a write; comments or code reordering in your schema definition do not.",[3564,3624,3625,3628],{},[3567,3626,3627],{},"Encrypted with the collection's own key."," There is no separate \"schema visibility\" permission — whoever can decrypt the collection's records can decrypt its schema, and no one else can.",[3564,3630,3631,3634,3635,3637,3638,3640],{},[3567,3632,3633],{},"Requires Zod's optional peer-dep for Zod 3 schemas."," Calling ",[950,3636,983],{}," on a Zod 3 validator without ",[950,3639,3573],{}," installed throws with an install hint; Zod 4 schemas use Zod's built-in converter and need no extra package.",[3564,3642,3643,3654,3655,3658,3659,3662,3663,3666,3667,3670,3671,3674,3675],{},[3567,3644,3645,3647,3648,3650,3651],{},[950,3646,1027],{}," itself is an optional peer of ",[950,3649,1049],{}," from ",[950,3652,3653],{},"0.7.0-pre.14"," (noy-db#1227). Hub\npreviously bundled ",[950,3656,3657],{},"zod@4.4.3"," into ",[950,3660,3661],{},"dist\u002F"," at a build-frozen version, declared in no manifest\nfield — so ",[950,3664,3665],{},"npm ls zod"," showed nothing while that copy was reachable, SBOM tooling missed it, and\na consumer could not remediate a zod advisory by bumping their own. Declaring it is also the\ncorrectness fix: ",[950,3668,3669],{},"toJSONSchema"," reads a schema's internals, and the schema is built by ",[3567,3672,3673],{},"your","\nzod, so there is now one zod rather than two with undetected skew.",[3676,3677,3680,3689,3706,3759],"callout",{"color":3678,"icon":3679},"warning","i-lucide-alert-triangle",[946,3681,3682,3688],{},[3567,3683,3684,3685],{},"The range is ",[950,3686,3687],{},"^3.0.0 || ^4.0.0"," — both majors, and the peer is optional, so a project with\nno zod at all installs fine and never reaches the converter.",[946,3690,3691,3692,3697,3698,3701,3702,3705],{},"⛔ ",[3567,3693,3694,3696],{},[950,3695,3653],{}," is the one release to skip if you are on Zod 3."," It declared the peer as\n",[950,3699,3700],{},"^4.0.0"," alone, and a published manifest cannot be amended, so that version refuses the pair\nunder npm permanently. ",[950,3703,3704],{},"0.7.0-pre.15"," corrects the declaration. Measured:",[3707,3708,3709,3721],"table",{},[3710,3711,3712],"thead",{},[3713,3714,3715,3718],"tr",{},[3716,3717],"th",{},[3716,3719,3720],{},"result",[3722,3723,3724,3735,3744],"tbody",{},[3713,3725,3726,3732],{},[3727,3728,3729],"td",{},[950,3730,3731],{},"npm i @noy-db\u002Fhub@0.7.0-pre.15 zod@3",[3727,3733,3734],{},"fine",[3713,3736,3737,3742],{},[3727,3738,3739],{},[950,3740,3741],{},"npm i @noy-db\u002Fhub@0.7.0-pre.15 zod@4",[3727,3743,3734],{},[3713,3745,3746,3751],{},[3727,3747,3748],{},[950,3749,3750],{},"npm i @noy-db\u002Fhub@0.7.0-pre.14 zod@3",[3727,3752,3753,3758],{},[3567,3754,3755],{},[950,3756,3757],{},"ERESOLVE"," — that release only",[946,3760,3761,3764,3765,3768,3769,3771,3772,3775],{},[3567,3762,3763],{},"Zod 3 was never unsupported","; only ",[950,3766,3767],{},"pre.14","'s declaration said otherwise, and the runtime\nbehaviour was unaffected throughout. If you meet that error, the fix is to move off ",[950,3770,3767],{}," —\nnot to downgrade a plan onto zod 4, and not ",[950,3773,3774],{},"--legacy-peer-deps",", which would have suppressed a\ntrue statement about a real manifest rather than working around a false one.",[941,3777,3779],{"id":3778},"see-also","See also",[3561,3781,3782,3787,3795,3804,3809,3817,3825],{},[3564,3783,3784,3786],{},[955,3785,21],{"href":971}," — the DEK and envelope format persisted-schema envelopes reuse",[3564,3788,3789,3791,3792,3794],{},[955,3790,711],{"href":3335}," — ",[950,3793,3338],{}," reads the persisted envelope as a fallback when no live validator is in memory",[3564,3796,3797,3799,3800,3803],{},[955,3798,820],{"href":3548}," — strategies that react to a ",[3094,3801,3802],{},"changed"," persisted schema (additive-only, locked, coordinated cutover)",[3564,3805,3806,3808],{},[955,3807,888],{"href":889}," — planned richer runtime validators; today the JSON Schema derived and persisted here is the closest thing to a schema-level validation surface",[3564,3810,3811,3813,3814,3816],{},[955,3812,633],{"href":3123}," — a config-drift marker that shares the same ",[950,3815,967],{}," record",[3564,3818,3819,3822,3823,3816],{},[955,3820,812],{"href":3821},".\u002Fsatellites"," — the satellite pairing marker that also shares the ",[950,3824,967],{},[3564,3826,3827,3830,3831],{},[955,3828,3829],{"href":598},"Services overview"," · ",[955,3832,3834],{"href":3833},"\u002Forientation","Orientation map",[3836,3837,3838],"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 .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}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 .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}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 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":995,"searchDepth":1054,"depth":1054,"links":3840},[3841,3842,3843,3849,3861,3862],{"id":943,"depth":1033,"text":944},{"id":987,"depth":1033,"text":988},{"id":1403,"depth":1033,"text":1404,"children":3844},[3845,3846,3847,3848],{"id":1408,"depth":1054,"text":1409},{"id":1829,"depth":1054,"text":1830},{"id":2070,"depth":1054,"text":2071},{"id":2349,"depth":1054,"text":2350},{"id":2620,"depth":1033,"text":2621,"children":3850},[3851,3852,3853,3854,3856,3857,3859],{"id":2630,"depth":1054,"text":2633},{"id":2706,"depth":1054,"text":2709},{"id":2838,"depth":1054,"text":2841},{"id":2878,"depth":1054,"text":3855},"PersistedSchemaEnvelope \u002F PersistedSchemaKind (types)",{"id":3127,"depth":1054,"text":3130},{"id":3156,"depth":1054,"text":3858},"loadPersistedSchema(store, vault, collection, dek) \u002F savePersistedSchema(store, vault, collection, dek, payload)",{"id":3356,"depth":1054,"text":3860},"persistSchemaIfNeeded(opts) \u002F PersistSchemaResult",{"id":3559,"depth":1033,"text":1366},{"id":3778,"depth":1033,"text":3779},null,"Persisted JSON Schema: write an encrypted snapshot of your validator into the vault so tools without your live validator can still see the shape.","md",{},"service",{"title":780,"description":3864},"stable","important","alnnZQMfChR2vFDdlkFD0TWKhl0cOkVf_PS_36qoePM",{"data":3873,"body":3874},{},{"type":3875,"children":3876},"root",[3877],{"type":3878,"tag":946,"props":3879,"children":3880},"element",{},[3881,3887],{"type":3878,"tag":950,"props":3882,"children":3884},{"className":3883},[],[3885],{"type":3886,"value":1049},"text",{"type":3886,"value":3888}," (root export)",{"data":3890,"body":3891},{},{"type":3875,"children":3892},[3893],{"type":3878,"tag":946,"props":3894,"children":3895},{},[3896,3898,3903],{"type":3886,"value":3897},"Core feature — activated per collection by the ",{"type":3878,"tag":950,"props":3899,"children":3901},{"className":3900},[],[3902],{"type":3886,"value":983},{"type":3886,"value":3904}," option.",1791896580990]