[{"data":1,"prerenderedAt":2641},["ShallowReactive",2],{"navigation_docs":3,"-developers-kv":613,"-developers-kv-surround":2638},[4,39,101,378,540,562,584,606],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":38},"Start","i-lucide-rocket","\u002Fstart","1.start",[10,14,18,22,26,30,34],{"title":11,"path":12,"stem":13},"Our approach","\u002Fstart\u002Four-approach","1.start\u002F0.our-approach",{"title":15,"path":16,"stem":17},"Introduction","\u002Fstart\u002Fintroduction","1.start\u002F1.introduction",{"title":19,"path":20,"stem":21},"Concepts","\u002Fstart\u002Fconcepts","1.start\u002F2.concepts",{"title":23,"path":24,"stem":25},"Glossary","\u002Fstart\u002Fglossary","1.start\u002F3.glossary",{"title":27,"path":28,"stem":29},"Try it locally","\u002Fstart\u002Ftry-it-locally","1.start\u002F4.try-it-locally",{"title":31,"path":32,"stem":33},"Features","\u002Fstart\u002Ffeatures","1.start\u002F5.features",{"title":35,"path":36,"stem":37},"Questions","\u002Fstart\u002Ffaq","1.start\u002F6.faq",false,{"title":40,"icon":41,"path":42,"stem":43,"children":44,"page":38},"Run SHADE","i-lucide-server","\u002Frun","2.run",[45,49,53,57,61,65,69,73,77,81,85,89,93,97],{"title":46,"path":47,"stem":48},"Setting up an instance (Coolify)","\u002Frun\u002Fcoolify","2.run\u002F1.coolify",{"title":50,"path":51,"stem":52},"Console commands","\u002Frun\u002Fconsole","2.run\u002F10.console",{"title":54,"path":55,"stem":56},"Rotating APP_SECRET","\u002Frun\u002Frotating-app-secret","2.run\u002F11.rotating-app-secret",{"title":58,"path":59,"stem":60},"Checking an instance","\u002Frun\u002Fdoctor","2.run\u002F12.doctor",{"title":62,"path":63,"stem":64},"Self-hosting by hand","\u002Frun\u002Fown-server-by-hand","2.run\u002F13.own-server-by-hand",{"title":66,"path":67,"stem":68},"NixOS (experimental)","\u002Frun\u002Fnixos","2.run\u002F14.nixos",{"title":70,"path":71,"stem":72},"Self-hosting without Coolify","\u002Frun\u002Fown-server","2.run\u002F2.own-server",{"title":74,"path":75,"stem":76},"Hosting the site on a static host","\u002Frun\u002Fstatic-hosts","2.run\u002F3.static-hosts",{"title":78,"path":79,"stem":80},"Licence","\u002Frun\u002Flicence","2.run\u002F4.licence",{"title":82,"path":83,"stem":84},"Updating and backups","\u002Frun\u002Fupdating-and-backups","2.run\u002F5.updating-and-backups",{"title":86,"path":87,"stem":88},"Troubleshooting","\u002Frun\u002Ftroubleshooting","2.run\u002F6.troubleshooting",{"title":90,"path":91,"stem":92},"Logs, request ids, traces and metrics","\u002Frun\u002Flogs","2.run\u002F7.logs",{"title":94,"path":95,"stem":96},"Maintenance mode","\u002Frun\u002Fmaintenance-mode","2.run\u002F8.maintenance-mode",{"title":98,"path":99,"stem":100},"Usage limits","\u002Frun\u002Fusage-limits","2.run\u002F9.usage-limits",{"title":102,"icon":103,"path":104,"stem":105,"children":106},"Guide","i-lucide-book-open","\u002Fguide","3.guide",[107,109,147,192,210,280,310,364],{"title":102,"path":104,"stem":108},"3.guide\u002Findex",{"title":110,"icon":111,"path":112,"stem":113,"children":114,"page":38},"Content","i-lucide-file-text","\u002Fguide\u002Fcontent","3.guide\u002F1.content",[115,119,123,127,131,135,139,143],{"title":116,"path":117,"stem":118},"Collections and entries","\u002Fguide\u002Fcontent\u002Fcollections","3.guide\u002F1.content\u002F1.collections",{"title":120,"path":121,"stem":122},"Field types","\u002Fguide\u002Fcontent\u002Ffields","3.guide\u002F1.content\u002F2.fields",{"title":124,"path":125,"stem":126},"Drafts, publishing and version history","\u002Fguide\u002Fcontent\u002Fversions","3.guide\u002F1.content\u002F3.versions",{"title":128,"path":129,"stem":130},"Languages","\u002Fguide\u002Fcontent\u002Flanguages","3.guide\u002F1.content\u002F4.languages",{"title":132,"path":133,"stem":134},"Data sources","\u002Fguide\u002Fcontent\u002Fdata-sources","3.guide\u002F1.content\u002F5.data-sources",{"title":136,"path":137,"stem":138},"Media","\u002Fguide\u002Fcontent\u002Fmedia","3.guide\u002F1.content\u002F6.media",{"title":140,"path":141,"stem":142},"Search","\u002Fguide\u002Fcontent\u002Fsearch","3.guide\u002F1.content\u002F7.search",{"title":144,"path":145,"stem":146},"Trash","\u002Fguide\u002Fcontent\u002Ftrash","3.guide\u002F1.content\u002F8.trash",{"title":148,"icon":149,"path":150,"stem":151,"children":152,"page":38},"Website","i-lucide-globe","\u002Fguide\u002Fwebsite","3.guide\u002F2.website",[153,156,160,164,168,172,176,180,184,188],{"title":148,"path":154,"stem":155},"\u002Fguide\u002Fwebsite\u002Fwebsite","3.guide\u002F2.website\u002F1.website",{"title":157,"path":158,"stem":159},"Scroll scenes","\u002Fguide\u002Fwebsite\u002Fscroll-scenes","3.guide\u002F2.website\u002F10.scroll-scenes",{"title":161,"path":162,"stem":163},"Pages and posts","\u002Fguide\u002Fwebsite\u002Fpages","3.guide\u002F2.website\u002F2.pages",{"title":165,"path":166,"stem":167},"The visual editor","\u002Fguide\u002Fwebsite\u002Fvisual-editor","3.guide\u002F2.website\u002F3.visual-editor",{"title":169,"path":170,"stem":171},"Roles and locks","\u002Fguide\u002Fwebsite\u002Froles-and-locks","3.guide\u002F2.website\u002F4.roles-and-locks",{"title":173,"path":174,"stem":175},"Header and footer","\u002Fguide\u002Fwebsite\u002Fheader-and-footer","3.guide\u002F2.website\u002F5.header-and-footer",{"title":177,"path":178,"stem":179},"Theme","\u002Fguide\u002Fwebsite\u002Ftheme","3.guide\u002F2.website\u002F6.theme",{"title":181,"path":182,"stem":183},"Redirects","\u002Fguide\u002Fwebsite\u002Fredirects","3.guide\u002F2.website\u002F7.redirects",{"title":185,"path":186,"stem":187},"Site settings","\u002Fguide\u002Fwebsite\u002Fsite-settings","3.guide\u002F2.website\u002F8.site-settings",{"title":189,"path":190,"stem":191},"The site","\u002Fguide\u002Fwebsite\u002Fthe-site","3.guide\u002F2.website\u002F9.the-site",{"title":193,"icon":194,"path":195,"stem":196,"children":197,"page":38},"Publishing","i-lucide-send","\u002Fguide\u002Fpublishing","3.guide\u002F3.publishing",[198,202,206],{"title":199,"path":200,"stem":201},"Publishing and preview","\u002Fguide\u002Fpublishing\u002Fpublishing","3.guide\u002F3.publishing\u002F1.publishing",{"title":203,"path":204,"stem":205},"Builds","\u002Fguide\u002Fpublishing\u002Fbuilds","3.guide\u002F3.publishing\u002F2.builds",{"title":207,"path":208,"stem":209},"CDN caches","\u002Fguide\u002Fpublishing\u002Fcaches","3.guide\u002F3.publishing\u002F3.caches",{"title":211,"icon":212,"path":213,"stem":214,"children":215,"page":38},"People, security and privacy","i-lucide-shield","\u002Fguide\u002Fpeople-and-security","3.guide\u002F4.people-and-security",[216,220,224,228,232,236,240,244,248,252,256,260,264,268,272,276],{"title":217,"path":218,"stem":219},"People in SHADE","\u002Fguide\u002Fpeople-and-security\u002Fpeople-in-shade","3.guide\u002F4.people-and-security\u002F0.people-in-shade",{"title":221,"path":222,"stem":223},"Team and roles","\u002Fguide\u002Fpeople-and-security\u002Fteam","3.guide\u002F4.people-and-security\u002F1.team",{"title":225,"path":226,"stem":227},"Errors and security alerts","\u002Fguide\u002Fpeople-and-security\u002Ferrors","3.guide\u002F4.people-and-security\u002F10.errors",{"title":229,"path":230,"stem":231},"Exporting an instance","\u002Fguide\u002Fpeople-and-security\u002Fexporting","3.guide\u002F4.people-and-security\u002F11.exporting",{"title":233,"path":234,"stem":235},"Organisations","\u002Fguide\u002Fpeople-and-security\u002Forganisations","3.guide\u002F4.people-and-security\u002F12.organisations",{"title":237,"path":238,"stem":239},"Signing in through an identity provider (team)","\u002Fguide\u002Fpeople-and-security\u002Fidentity-providers","3.guide\u002F4.people-and-security\u002F13.identity-providers",{"title":241,"path":242,"stem":243},"System status","\u002Fguide\u002Fpeople-and-security\u002Fsystem-status","3.guide\u002F4.people-and-security\u002F14.system-status",{"title":245,"path":246,"stem":247},"Appearance","\u002Fguide\u002Fpeople-and-security\u002Fappearance","3.guide\u002F4.people-and-security\u002F15.appearance",{"title":249,"path":250,"stem":251},"Accounts and personal pages","\u002Fguide\u002Fpeople-and-security\u002Faccounts","3.guide\u002F4.people-and-security\u002F2.accounts",{"title":253,"path":254,"stem":255},"Signing in (team)","\u002Fguide\u002Fpeople-and-security\u002Fsign-in","3.guide\u002F4.people-and-security\u002F3.sign-in",{"title":257,"path":258,"stem":259},"API tokens","\u002Fguide\u002Fpeople-and-security\u002Fapi-tokens","3.guide\u002F4.people-and-security\u002F4.api-tokens",{"title":261,"path":262,"stem":263},"Audit log","\u002Fguide\u002Fpeople-and-security\u002Faudit","3.guide\u002F4.people-and-security\u002F5.audit",{"title":265,"path":266,"stem":267},"Request protection","\u002Fguide\u002Fpeople-and-security\u002Fprotection","3.guide\u002F4.people-and-security\u002F6.protection",{"title":269,"path":270,"stem":271},"Personal data per person","\u002Fguide\u002Fpeople-and-security\u002Fprivacy","3.guide\u002F4.people-and-security\u002F7.privacy",{"title":273,"path":274,"stem":275},"Data retention","\u002Fguide\u002Fpeople-and-security\u002Fretention","3.guide\u002F4.people-and-security\u002F8.retention",{"title":277,"path":278,"stem":279},"Consent banner","\u002Fguide\u002Fpeople-and-security\u002Fconsent","3.guide\u002F4.people-and-security\u002F9.consent",{"title":281,"icon":282,"path":283,"stem":284,"children":285,"page":38},"Services","i-lucide-plug","\u002Fguide\u002Fservices","3.guide\u002F5.services",[286,290,294,298,302,306],{"title":287,"path":288,"stem":289},"Email","\u002Fguide\u002Fservices\u002Femail","3.guide\u002F5.services\u002F1.email",{"title":291,"path":292,"stem":293},"Opening hours","\u002Fguide\u002Fservices\u002Fopening-hours","3.guide\u002F5.services\u002F4.opening-hours",{"title":295,"path":296,"stem":297},"Webhooks","\u002Fguide\u002Fservices\u002Fwebhooks","3.guide\u002F5.services\u002F5.webhooks",{"title":299,"path":300,"stem":301},"Locations","\u002Fguide\u002Fservices\u002Flocations","3.guide\u002F5.services\u002F6.locations",{"title":303,"path":304,"stem":305},"VAT rates","\u002Fguide\u002Fservices\u002Fvat-rates","3.guide\u002F5.services\u002F7.vat-rates",{"title":307,"path":308,"stem":309},"Channels","\u002Fguide\u002Fservices\u002Fchannels","3.guide\u002F5.services\u002F8.channels",{"title":311,"icon":312,"path":313,"stem":314,"children":315,"page":38},"InstalledModules","i-lucide-puzzle","\u002Fguide\u002Fmodules","3.guide\u002F6.modules",[316,320,324,328,332,336,340,344,348,352,356,360],{"title":317,"path":318,"stem":319},"Modules","\u002Fguide\u002Fmodules\u002Fmanaging","3.guide\u002F6.modules\u002F1.managing",{"title":321,"path":322,"stem":323},"Dutch services (module)","\u002Fguide\u002Fmodules\u002Fnl","3.guide\u002F6.modules\u002F10.nl",{"title":325,"path":326,"stem":327},"Editorial (module)","\u002Fguide\u002Fmodules\u002Feditorial","3.guide\u002F6.modules\u002F11.editorial",{"title":329,"path":330,"stem":331},"Appointments (module)","\u002Fguide\u002Fmodules\u002Fappointments","3.guide\u002F6.modules\u002F2.appointments",{"title":333,"path":334,"stem":335},"Shop (the commerce module)","\u002Fguide\u002Fmodules\u002Fshop","3.guide\u002F6.modules\u002F3.shop",{"title":337,"path":338,"stem":339},"Untrusted modules","\u002Fguide\u002Fmodules\u002Funtrusted","3.guide\u002F6.modules\u002F4.untrusted",{"title":341,"path":342,"stem":343},"Analytics (module)","\u002Fguide\u002Fmodules\u002Fanalytics","3.guide\u002F6.modules\u002F5.analytics",{"title":345,"path":346,"stem":347},"Error forwarding (module)","\u002Fguide\u002Fmodules\u002Ferror-forwarding","3.guide\u002F6.modules\u002F6.error-forwarding",{"title":349,"path":350,"stem":351},"Client programs","\u002Fguide\u002Fmodules\u002Fprograms","3.guide\u002F6.modules\u002F7.programs",{"title":353,"path":354,"stem":355},"Import and export (module)","\u002Fguide\u002Fmodules\u002Fimport","3.guide\u002F6.modules\u002F8.import",{"title":357,"path":358,"stem":359},"Payments (module)","\u002Fguide\u002Fmodules\u002Fpayments","3.guide\u002F6.modules\u002F8.payments",{"title":361,"path":362,"stem":363},"Forms (module)","\u002Fguide\u002Fmodules\u002Fforms","3.guide\u002F6.modules\u002F9.forms",{"title":365,"icon":366,"path":367,"stem":368,"children":369,"page":38},"AI assistants","i-lucide-bot","\u002Fguide\u002Fai","3.guide\u002F7.ai",[370,374],{"title":371,"path":372,"stem":373},"AI assistants (MCP)","\u002Fguide\u002Fai\u002Fassistants","3.guide\u002F7.ai\u002F1.assistants",{"title":375,"path":376,"stem":377},"Connecting an AI assistant","\u002Fguide\u002Fai\u002Fconnecting","3.guide\u002F7.ai\u002F2.connecting",{"title":379,"icon":380,"path":381,"stem":382,"children":383,"page":38},"Developers","i-lucide-code","\u002Fdevelopers","4.developers",[384,388,392,396,400,404,408,412,416,420,424,428,432,435,489,493,497,501,536],{"title":385,"path":386,"stem":387},"Architecture","\u002Fdevelopers\u002Farchitecture","4.developers\u002F1.architecture",{"title":389,"path":390,"stem":391},"Capabilities","\u002Fdevelopers\u002Fcapabilities","4.developers\u002F10.capabilities",{"title":393,"path":394,"stem":395},"Trust","\u002Fdevelopers\u002Ftrust","4.developers\u002F11.trust",{"title":397,"path":398,"stem":399},"Redis and the ports","\u002Fdevelopers\u002Fredis","4.developers\u002F12.redis",{"title":401,"path":402,"stem":403},"The worker container role","\u002Fdevelopers\u002Fworker","4.developers\u002F13.worker",{"title":405,"path":406,"stem":407},"kv: a module's own key-value storage","\u002Fdevelopers\u002Fkv","4.developers\u002F14.kv",{"title":409,"path":410,"stem":411},"Processes: long-running work on the worker","\u002Fdevelopers\u002Fprocesses","4.developers\u002F15.processes",{"title":413,"path":414,"stem":415},"Network: a module's outgoing calls","\u002Fdevelopers\u002Fnetwork","4.developers\u002F16.network",{"title":417,"path":418,"stem":419},"Realtime","\u002Fdevelopers\u002Frealtime","4.developers\u002F17.realtime",{"title":421,"path":422,"stem":423},"Private files","\u002Fdevelopers\u002Ffiles","4.developers\u002F18.files",{"title":425,"path":426,"stem":427},"Notify","\u002Fdevelopers\u002Fnotify","4.developers\u002F19.notify",{"title":429,"path":430,"stem":431},"Collections","\u002Fdevelopers\u002Fcollections","4.developers\u002F2.collections",{"title":337,"path":433,"stem":434},"\u002Fdevelopers\u002Funtrusted","4.developers\u002F20.untrusted",{"title":436,"icon":312,"path":437,"stem":438,"children":439},"Writing a plugin","\u002Fdevelopers\u002Fmodules","4.developers\u002F3.modules\u002Findex",[440,442,446,450,454,458,462,466,470,473,477,481,485],{"title":441,"path":437,"stem":438},"Writing a module",{"title":443,"path":444,"stem":445},"Module SDK and tooling","\u002Fdevelopers\u002Fmodules\u002Fsdk-and-tooling","4.developers\u002F3.modules\u002F1.sdk-and-tooling",{"title":447,"path":448,"stem":449},"Connecting accounts with OAuth2","\u002Fdevelopers\u002Fmodules\u002Foauth","4.developers\u002F3.modules\u002F10.oauth",{"title":451,"path":452,"stem":453},"Calls between modules","\u002Fdevelopers\u002Fmodules\u002Fcalls-between-modules","4.developers\u002F3.modules\u002F11.calls-between-modules",{"title":455,"path":456,"stem":457},"Experimental parts","\u002Fdevelopers\u002Fmodules\u002Fexperimental-parts","4.developers\u002F3.modules\u002F12.experimental-parts",{"title":459,"path":460,"stem":461},"The manifest","\u002Fdevelopers\u002Fmodules\u002Fmanifest","4.developers\u002F3.modules\u002F2.manifest",{"title":463,"path":464,"stem":465},"Routes","\u002Fdevelopers\u002Fmodules\u002Froutes","4.developers\u002F3.modules\u002F3.routes",{"title":467,"path":468,"stem":469},"Admin screens and the site part","\u002Fdevelopers\u002Fmodules\u002Fadmin-and-site","4.developers\u002F3.modules\u002F4.admin-and-site",{"title":110,"path":471,"stem":472},"\u002Fdevelopers\u002Fmodules\u002Fcontent","4.developers\u002F3.modules\u002F5.content",{"title":474,"path":475,"stem":476},"Background work and services","\u002Fdevelopers\u002Fmodules\u002Fbackground-and-services","4.developers\u002F3.modules\u002F6.background-and-services",{"title":478,"path":479,"stem":480},"SDK reference","\u002Fdevelopers\u002Fmodules\u002Fsdk-reference","4.developers\u002F3.modules\u002F7.sdk-reference",{"title":482,"path":483,"stem":484},"The website module's SDK","\u002Fdevelopers\u002Fmodules\u002Fwebsite-sdk","4.developers\u002F3.modules\u002F8.website-sdk",{"title":486,"path":487,"stem":488},"Incoming webhooks","\u002Fdevelopers\u002Fmodules\u002Fincoming-webhooks","4.developers\u002F3.modules\u002F9.incoming-webhooks",{"title":490,"path":491,"stem":492},"Core and the website module","\u002Fdevelopers\u002Fcore-and-website-module","4.developers\u002F4.core-and-website-module",{"title":494,"path":495,"stem":496},"The API","\u002Fdevelopers\u002Fapi","4.developers\u002F6.api",{"title":498,"path":499,"stem":500},"API reference","\u002Fdevelopers\u002Fapi-reference","4.developers\u002F6.api-reference",{"title":502,"icon":503,"path":504,"stem":505,"children":506},"Sites in other frameworks","i-lucide-layout-template","\u002Fdevelopers\u002Fframeworks","4.developers\u002F7.frameworks\u002Findex",[507,508,512,516,520,524,528,532],{"title":502,"path":504,"stem":505},{"title":509,"path":510,"stem":511},"Accounts: sign-in and modules' routes","\u002Fdevelopers\u002Fframeworks\u002Faccounts","4.developers\u002F7.frameworks\u002F1.accounts",{"title":513,"path":514,"stem":515},"`@shadestack\u002Ftree`","\u002Fdevelopers\u002Fframeworks\u002Ftree","4.developers\u002F7.frameworks\u002F2.tree",{"title":517,"path":518,"stem":519},"Expressions and styles","\u002Fdevelopers\u002Fframeworks\u002Fexpressions-and-styles","4.developers\u002F7.frameworks\u002F3.expressions-and-styles",{"title":521,"path":522,"stem":523},"`@shadestack\u002Frender`","\u002Fdevelopers\u002Fframeworks\u002Frender","4.developers\u002F7.frameworks\u002F4.render",{"title":525,"path":526,"stem":527},"`@shadestack\u002Finteractions`","\u002Fdevelopers\u002Fframeworks\u002Finteractions","4.developers\u002F7.frameworks\u002F5.interactions",{"title":529,"path":530,"stem":531},"`@shadestack\u002Fa11y`","\u002Fdevelopers\u002Fframeworks\u002Fa11y","4.developers\u002F7.frameworks\u002F6.a11y",{"title":533,"path":534,"stem":535},"Your own page for SHADE's links","\u002Fdevelopers\u002Fframeworks\u002Flinks","4.developers\u002F7.frameworks\u002F7.links",{"title":537,"path":538,"stem":539},"Build a client module","\u002Fdevelopers\u002Fclient-module","4.developers\u002F9.client-module",{"title":541,"icon":542,"path":543,"stem":544,"children":545,"page":38},"Security","i-lucide-shield-check","\u002Fsecurity","5.security",[546,550,554,558],{"title":547,"path":548,"stem":549},"Reporting a vulnerability","\u002Fsecurity\u002Freporting","5.security\u002F0.reporting",{"title":551,"path":552,"stem":553},"Security testing","\u002Fsecurity\u002Ftesting","5.security\u002F1.testing",{"title":555,"path":556,"stem":557},"Hardening a production instance","\u002Fsecurity\u002Fhardening","5.security\u002F2.hardening",{"title":559,"path":560,"stem":561},"Manual testing with Kali Linux","\u002Fsecurity\u002Fmanual-testing","5.security\u002F3.manual-testing",{"title":563,"icon":564,"path":565,"stem":566,"children":567,"page":38},"Contributing","i-lucide-git-pull-request","\u002Fcontributing","6.contributing",[568,572,576,580],{"title":569,"path":570,"stem":571},"Reading the code","\u002Fcontributing\u002Freading-the-code","6.contributing\u002F1.reading-the-code",{"title":573,"path":574,"stem":575},"Docs site","\u002Fcontributing\u002Fdocs-site","6.contributing\u002F2.docs-site",{"title":577,"path":578,"stem":579},"Releases","\u002Fcontributing\u002Freleases","6.contributing\u002F3.releases",{"title":581,"path":582,"stem":583},"Load tests","\u002Fcontributing\u002Fload-tests","6.contributing\u002F4.load-tests",{"title":585,"icon":586,"path":587,"stem":588,"children":589,"page":38},"Project","i-lucide-map","\u002Fproject","7.project",[590,594,598,602],{"title":591,"path":592,"stem":593},"Roadmap","\u002Fproject\u002Froadmap","7.project\u002F1.roadmap",{"title":595,"path":596,"stem":597},"Known issues","\u002Fproject\u002Fknown-issues","7.project\u002F2.known-issues",{"title":599,"path":600,"stem":601},"Changelog","\u002Fproject\u002Fchangelog","7.project\u002F3.changelog",{"title":603,"path":604,"stem":605},"Decisions","\u002Fproject\u002Fdecisions","7.project\u002F4.decisions",{"title":607,"path":608,"stem":609,"children":610,"icon":612},"Community","\u002Fcommunity","8.community\u002Findex",[611],{"title":607,"path":608,"stem":609},"i-lucide-users",{"id":614,"title":405,"body":615,"description":653,"extension":2633,"links":2634,"meta":2635,"navigation":941,"path":406,"seo":2636,"stem":407,"__hash__":2637},"docs\u002F4.developers\u002F14.kv.md",{"type":616,"value":617,"toc":2620},"minimark",[618,635,640,647,833,902,908,1366,1504,1782,1789,1903,1939,1945,2194,2223,2227,2294,2298,2498,2501,2539,2543,2616],[619,620,621,622,626,627,630,631,634],"p",{},"Every module, trusted or untrusted, can keep its own keys and counters: kv. A trusted module\ncalls ",[623,624,625],"code",{},"moduleKv(ctx)"," from the module SDK; an untrusted one calls ",[623,628,629],{},"shade.kv"," in the sandbox. Both reach the same service\nin core, with the same checks and the same quotas. Keys are records: they live in Postgres (",[623,632,633],{},"module_kv","), are in the\nbackup, and an account's keys are found, exported and erased with their account.",[636,637,639],"h2",{"id":638},"declaring-it","Declaring it",[619,641,642,643,646],{},"kv is a capability (see ",[644,645,389],"a",{"href":390},"). Declare it with what it keeps:",[648,649,654],"pre",{"className":650,"code":651,"language":652,"meta":653,"style":653},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export default defineModule({\n  name: 'readme-cards',\n  \u002F\u002F …\n  capabilities: {\n    kv: {\n      data: { purpose: 'readmeCards.keeps', personal: 'none' },  \u002F\u002F a key of the module's own texts\n      maxKeys: 20_000,                                          \u002F\u002F default 10 000, at most 100 000\n      maxValueBytes: 64 * 1024                                  \u002F\u002F default 256 KB, at most 1 MB\n    }\n  }\n})\n","ts","",[623,655,656,680,703,710,721,731,775,792,812,818,824],{"__ignoreMap":653},[657,658,661,665,668,672,676],"span",{"class":659,"line":660},"line",1,[657,662,664],{"class":663},"s7zQu","export",[657,666,667],{"class":663}," default",[657,669,671],{"class":670},"s2Zo4"," defineModule",[657,673,675],{"class":674},"sTEyZ","(",[657,677,679],{"class":678},"sMK4o","{\n",[657,681,683,687,690,693,697,700],{"class":659,"line":682},2,[657,684,686],{"class":685},"swJcz","  name",[657,688,689],{"class":678},":",[657,691,692],{"class":678}," '",[657,694,696],{"class":695},"sfazB","readme-cards",[657,698,699],{"class":678},"'",[657,701,702],{"class":678},",\n",[657,704,706],{"class":659,"line":705},3,[657,707,709],{"class":708},"sHwdD","  \u002F\u002F …\n",[657,711,713,716,718],{"class":659,"line":712},4,[657,714,715],{"class":685},"  capabilities",[657,717,689],{"class":678},[657,719,720],{"class":678}," {\n",[657,722,724,727,729],{"class":659,"line":723},5,[657,725,726],{"class":685},"    kv",[657,728,689],{"class":678},[657,730,720],{"class":678},[657,732,734,737,739,742,745,747,749,752,754,757,760,762,764,767,769,772],{"class":659,"line":733},6,[657,735,736],{"class":685},"      data",[657,738,689],{"class":678},[657,740,741],{"class":678}," {",[657,743,744],{"class":685}," purpose",[657,746,689],{"class":678},[657,748,692],{"class":678},[657,750,751],{"class":695},"readmeCards.keeps",[657,753,699],{"class":678},[657,755,756],{"class":678},",",[657,758,759],{"class":685}," personal",[657,761,689],{"class":678},[657,763,692],{"class":678},[657,765,766],{"class":695},"none",[657,768,699],{"class":678},[657,770,771],{"class":678}," },",[657,773,774],{"class":708},"  \u002F\u002F a key of the module's own texts\n",[657,776,778,781,783,787,789],{"class":659,"line":777},7,[657,779,780],{"class":685},"      maxKeys",[657,782,689],{"class":678},[657,784,786],{"class":785},"sbssI"," 20_000",[657,788,756],{"class":678},[657,790,791],{"class":708},"                                          \u002F\u002F default 10 000, at most 100 000\n",[657,793,795,798,800,803,806,809],{"class":659,"line":794},8,[657,796,797],{"class":685},"      maxValueBytes",[657,799,689],{"class":678},[657,801,802],{"class":785}," 64",[657,804,805],{"class":678}," *",[657,807,808],{"class":785}," 1024",[657,810,811],{"class":708},"                                  \u002F\u002F default 256 KB, at most 1 MB\n",[657,813,815],{"class":659,"line":814},9,[657,816,817],{"class":678},"    }\n",[657,819,821],{"class":659,"line":820},10,[657,822,823],{"class":678},"  }\n",[657,825,827,830],{"class":659,"line":826},11,[657,828,829],{"class":678},"}",[657,831,832],{"class":674},")\n",[834,835,836,866,884,890,893],"ul",{},[837,838,839,842,843,845,846,849,850,853,854,857,858,861,862,865],"li",{},[623,840,841],{},"data.personal"," says whether it keeps anything about a person: ",[623,844,766],{},", ",[623,847,848],{},"account"," (keys for an account, through\n",[623,851,852],{},"forAccount",") or ",[623,855,856],{},"person"," (other personal data, which needs a source named ",[623,859,860],{},"kv"," in the module's ",[623,863,864],{},"personalData",").",[837,867,868,869,845,871,874,875,878,879,883],{},"Unless it is ",[623,870,766],{},[623,872,873],{},"data.retention"," names one of the module's own retention kinds (its ",[623,876,877],{},"retention"," part). Keys not\nwritten within that kind's period are deleted (see ",[880,881,882],"em",{},"Retention"," below).",[837,885,886,889],{},[623,887,888],{},"need: 'optional'"," makes it a switch an admin turns on; until then every call is refused.",[837,891,892],{},"The consent shows the quotas in words (\"at most 20000 keys\", \"values of at most 64 KB\") and what it keeps. An update\nthat raises a quota, starts keeping data about a person or changes the retention kind asks again.",[837,894,895,896,898,899,901],{},"Untrusted modules keep nothing about a person in kv: their ",[623,897,841],{}," must be ",[623,900,766],{}," (they have no account routes to\nscope keys to an account, and no retention or personal data parts to declare it with).",[636,903,905,906],{"id":904},"a-trusted-module-modulekvctx","A trusted module: ",[623,907,625],{},[648,909,911],{"className":650,"code":910,"language":652,"meta":653,"style":653},"import { moduleKv } from '@shadestack\u002Fmodule-sdk\u002Fserver'\n\n\u002F\u002F In a route, hook or schedule: the context SHADE gave the module's code.\nconst kv = moduleKv(ctx)\n\nawait kv.set('card:octocat', { stars: 120, at: new Date().toISOString() })\nconst card = await kv.get\u003C{ stars: number, at: string }>('card:octocat')   \u002F\u002F null when missing or expired\n\nawait kv.set('session:abc', { step: 2 }, { ttlMs: 30 * 60_000 })           \u002F\u002F expires after 30 minutes\nconst views = await kv.increment('views')                                  \u002F\u002F 1, 2, 3 … atomically\nawait kv.increment('stock:mug', -1)                                        \u002F\u002F counts down too\n\nconst page = await kv.list({ prefix: 'card:', limit: 50 })                 \u002F\u002F { keys: [{ key, updatedAt }], cursor }\nconst next = page.cursor ? await kv.list({ prefix: 'card:', cursor: page.cursor }) : null\n\nawait kv.delete('card:octocat')\n",[623,912,913,937,943,948,965,969,1032,1088,1092,1148,1181,1214,1219,1273,1339,1344],{"__ignoreMap":653},[657,914,915,918,920,923,926,929,931,934],{"class":659,"line":660},[657,916,917],{"class":663},"import",[657,919,741],{"class":678},[657,921,922],{"class":674}," moduleKv",[657,924,925],{"class":678}," }",[657,927,928],{"class":663}," from",[657,930,692],{"class":678},[657,932,933],{"class":695},"@shadestack\u002Fmodule-sdk\u002Fserver",[657,935,936],{"class":678},"'\n",[657,938,939],{"class":659,"line":682},[657,940,942],{"emptyLinePlaceholder":941},true,"\n",[657,944,945],{"class":659,"line":705},[657,946,947],{"class":708},"\u002F\u002F In a route, hook or schedule: the context SHADE gave the module's code.\n",[657,949,950,954,957,960,962],{"class":659,"line":712},[657,951,953],{"class":952},"spNyl","const",[657,955,956],{"class":674}," kv ",[657,958,959],{"class":678},"=",[657,961,922],{"class":670},[657,963,964],{"class":674},"(ctx)\n",[657,966,967],{"class":659,"line":723},[657,968,942],{"emptyLinePlaceholder":941},[657,970,971,974,977,980,983,985,987,990,992,994,996,999,1001,1004,1006,1009,1011,1014,1017,1020,1022,1025,1028,1030],{"class":659,"line":733},[657,972,973],{"class":663},"await",[657,975,976],{"class":674}," kv",[657,978,979],{"class":678},".",[657,981,982],{"class":670},"set",[657,984,675],{"class":674},[657,986,699],{"class":678},[657,988,989],{"class":695},"card:octocat",[657,991,699],{"class":678},[657,993,756],{"class":678},[657,995,741],{"class":678},[657,997,998],{"class":685}," stars",[657,1000,689],{"class":678},[657,1002,1003],{"class":785}," 120",[657,1005,756],{"class":678},[657,1007,1008],{"class":685}," at",[657,1010,689],{"class":678},[657,1012,1013],{"class":678}," new",[657,1015,1016],{"class":670}," Date",[657,1018,1019],{"class":674},"()",[657,1021,979],{"class":678},[657,1023,1024],{"class":670},"toISOString",[657,1026,1027],{"class":674},"() ",[657,1029,829],{"class":678},[657,1031,832],{"class":674},[657,1033,1034,1036,1039,1041,1044,1046,1048,1051,1054,1056,1058,1062,1064,1066,1068,1071,1074,1076,1078,1080,1082,1085],{"class":659,"line":777},[657,1035,953],{"class":952},[657,1037,1038],{"class":674}," card ",[657,1040,959],{"class":678},[657,1042,1043],{"class":663}," await",[657,1045,976],{"class":674},[657,1047,979],{"class":678},[657,1049,1050],{"class":670},"get",[657,1052,1053],{"class":678},"\u003C{",[657,1055,998],{"class":685},[657,1057,689],{"class":678},[657,1059,1061],{"class":1060},"sBMFI"," number",[657,1063,756],{"class":678},[657,1065,1008],{"class":685},[657,1067,689],{"class":678},[657,1069,1070],{"class":1060}," string",[657,1072,1073],{"class":678}," }>",[657,1075,675],{"class":674},[657,1077,699],{"class":678},[657,1079,989],{"class":695},[657,1081,699],{"class":678},[657,1083,1084],{"class":674},")   ",[657,1086,1087],{"class":708},"\u002F\u002F null when missing or expired\n",[657,1089,1090],{"class":659,"line":794},[657,1091,942],{"emptyLinePlaceholder":941},[657,1093,1094,1096,1098,1100,1102,1104,1106,1109,1111,1113,1115,1118,1120,1123,1125,1127,1130,1132,1135,1137,1140,1142,1145],{"class":659,"line":814},[657,1095,973],{"class":663},[657,1097,976],{"class":674},[657,1099,979],{"class":678},[657,1101,982],{"class":670},[657,1103,675],{"class":674},[657,1105,699],{"class":678},[657,1107,1108],{"class":695},"session:abc",[657,1110,699],{"class":678},[657,1112,756],{"class":678},[657,1114,741],{"class":678},[657,1116,1117],{"class":685}," step",[657,1119,689],{"class":678},[657,1121,1122],{"class":785}," 2",[657,1124,771],{"class":678},[657,1126,741],{"class":678},[657,1128,1129],{"class":685}," ttlMs",[657,1131,689],{"class":678},[657,1133,1134],{"class":785}," 30",[657,1136,805],{"class":678},[657,1138,1139],{"class":785}," 60_000",[657,1141,925],{"class":678},[657,1143,1144],{"class":674},")           ",[657,1146,1147],{"class":708},"\u002F\u002F expires after 30 minutes\n",[657,1149,1150,1152,1155,1157,1159,1161,1163,1166,1168,1170,1173,1175,1178],{"class":659,"line":820},[657,1151,953],{"class":952},[657,1153,1154],{"class":674}," views ",[657,1156,959],{"class":678},[657,1158,1043],{"class":663},[657,1160,976],{"class":674},[657,1162,979],{"class":678},[657,1164,1165],{"class":670},"increment",[657,1167,675],{"class":674},[657,1169,699],{"class":678},[657,1171,1172],{"class":695},"views",[657,1174,699],{"class":678},[657,1176,1177],{"class":674},")                                  ",[657,1179,1180],{"class":708},"\u002F\u002F 1, 2, 3 … atomically\n",[657,1182,1183,1185,1187,1189,1191,1193,1195,1198,1200,1202,1205,1208,1211],{"class":659,"line":826},[657,1184,973],{"class":663},[657,1186,976],{"class":674},[657,1188,979],{"class":678},[657,1190,1165],{"class":670},[657,1192,675],{"class":674},[657,1194,699],{"class":678},[657,1196,1197],{"class":695},"stock:mug",[657,1199,699],{"class":678},[657,1201,756],{"class":678},[657,1203,1204],{"class":678}," -",[657,1206,1207],{"class":785},"1",[657,1209,1210],{"class":674},")                                        ",[657,1212,1213],{"class":708},"\u002F\u002F counts down too\n",[657,1215,1217],{"class":659,"line":1216},12,[657,1218,942],{"emptyLinePlaceholder":941},[657,1220,1222,1224,1227,1229,1231,1233,1235,1238,1240,1243,1246,1248,1250,1253,1255,1257,1260,1262,1265,1267,1270],{"class":659,"line":1221},13,[657,1223,953],{"class":952},[657,1225,1226],{"class":674}," page ",[657,1228,959],{"class":678},[657,1230,1043],{"class":663},[657,1232,976],{"class":674},[657,1234,979],{"class":678},[657,1236,1237],{"class":670},"list",[657,1239,675],{"class":674},[657,1241,1242],{"class":678},"{",[657,1244,1245],{"class":685}," prefix",[657,1247,689],{"class":678},[657,1249,692],{"class":678},[657,1251,1252],{"class":695},"card:",[657,1254,699],{"class":678},[657,1256,756],{"class":678},[657,1258,1259],{"class":685}," limit",[657,1261,689],{"class":678},[657,1263,1264],{"class":785}," 50",[657,1266,925],{"class":678},[657,1268,1269],{"class":674},")                 ",[657,1271,1272],{"class":708},"\u002F\u002F { keys: [{ key, updatedAt }], cursor }\n",[657,1274,1276,1278,1281,1283,1286,1288,1291,1294,1296,1298,1300,1302,1304,1306,1308,1310,1312,1314,1316,1318,1321,1323,1325,1327,1329,1331,1334,1336],{"class":659,"line":1275},14,[657,1277,953],{"class":952},[657,1279,1280],{"class":674}," next ",[657,1282,959],{"class":678},[657,1284,1285],{"class":674}," page",[657,1287,979],{"class":678},[657,1289,1290],{"class":674},"cursor ",[657,1292,1293],{"class":678},"?",[657,1295,1043],{"class":663},[657,1297,976],{"class":674},[657,1299,979],{"class":678},[657,1301,1237],{"class":670},[657,1303,675],{"class":674},[657,1305,1242],{"class":678},[657,1307,1245],{"class":685},[657,1309,689],{"class":678},[657,1311,692],{"class":678},[657,1313,1252],{"class":695},[657,1315,699],{"class":678},[657,1317,756],{"class":678},[657,1319,1320],{"class":685}," cursor",[657,1322,689],{"class":678},[657,1324,1285],{"class":674},[657,1326,979],{"class":678},[657,1328,1290],{"class":674},[657,1330,829],{"class":678},[657,1332,1333],{"class":674},") ",[657,1335,689],{"class":678},[657,1337,1338],{"class":678}," null\n",[657,1340,1342],{"class":659,"line":1341},15,[657,1343,942],{"emptyLinePlaceholder":941},[657,1345,1347,1349,1351,1353,1356,1358,1360,1362,1364],{"class":659,"line":1346},16,[657,1348,973],{"class":663},[657,1350,976],{"class":674},[657,1352,979],{"class":678},[657,1354,1355],{"class":670},"delete",[657,1357,675],{"class":674},[657,1359,699],{"class":678},[657,1361,989],{"class":695},[657,1363,699],{"class":678},[657,1365,832],{"class":674},[1367,1368,1369,1382],"table",{},[1370,1371,1372],"thead",{},[1373,1374,1375,1379],"tr",{},[1376,1377,1378],"th",{},"Method",[1376,1380,1381],{},"What it does",[1383,1384,1385,1400,1436,1446,1480,1494],"tbody",{},[1373,1386,1387,1393],{},[1388,1389,1390],"td",{},[623,1391,1392],{},"get(key)",[1388,1394,1395,1396,1399],{},"The value, or a counter's count; ",[623,1397,1398],{},"null"," for a key that is not there or has expired.",[1373,1401,1402,1407],{},[1388,1403,1404],{},[623,1405,1406],{},"set(key, value, { ttlMs?, ifUnchanged? })",[1388,1408,1409,1410,1413,1414,1417,1418,1421,1422,1425,1426,1428,1429,1431,1432,1435],{},"Stores what JSON keeps of ",[623,1411,1412],{},"value"," (a ",[623,1415,1416],{},"Date"," becomes its text). ",[623,1419,1420],{},"ttlMs"," (1 second to 366 days) makes it expire. Replaces a counter. With ",[623,1423,1424],{},"ifUnchanged",", only while the key still holds that value as ",[623,1427,1050],{}," gave it (",[623,1430,1398],{},": while it is not there); CONFLICT (",[623,1433,1434],{},"kv.errors.changed",") otherwise.",[1373,1437,1438,1443],{},[1388,1439,1440],{},[623,1441,1442],{},"delete(key)",[1388,1444,1445],{},"Removes the key; nothing happens when it isn't there.",[1373,1447,1448,1453],{},[1388,1449,1450],{},[623,1451,1452],{},"list({ prefix?, limit?, cursor? })",[1388,1454,1455,1456,1459,1460,1463,1464,1467,1468,1471,1472,1475,1476,1479],{},"Keys starting with ",[623,1457,1458],{},"prefix",", in key order, at most ",[623,1461,1462],{},"limit"," (default 100, at most 1000), with ",[623,1465,1466],{},"updatedAt","; ",[623,1469,1470],{},"cursor"," is the last key of the page when there are more. ",[623,1473,1474],{},"_"," and ",[623,1477,1478],{},"%"," are plain characters.",[1373,1481,1482,1487],{},[1388,1483,1484],{},[623,1485,1486],{},"increment(key, by = 1)",[1388,1488,1489,1490,1493],{},"Adds a whole number to a counter in one atomic statement and returns the new count. A missing or expired key starts at ",[623,1491,1492],{},"by",". CONFLICT on a key that holds a value.",[1373,1495,1496,1501],{},[1388,1497,1498],{},[623,1499,1500],{},"forAccount(accountId)",[1388,1502,1503],{},"The same methods for one account's keys (below).",[834,1505,1506,1738,1744,1760,1773],{},[837,1507,1508,1512,1513,1516,1517,1731,1734,1735,1737],{},[1509,1510,1511],"strong",{},"A list or map kept in one key"," is changed by read, change, write. Two calls doing that at once lose one change,\nunless the write says what it read: ",[623,1514,1515],{},"set(key, next, { ifUnchanged: before })",". A refused write reads again and redoes\nits change:",[648,1518,1520],{"className":650,"code":1519,"language":652,"meta":653,"style":653},"for (;;) {\n  const tags = await kv.get\u003Cstring[]>('tags')\n  try {\n    await kv.set('tags', [...(tags ?? []), 'new'], { ifUnchanged: tags })\n    break\n  } catch (error) {\n    if ((error as { code?: string }).code !== 'CONFLICT') throw error\n  }\n}\n",[623,1521,1522,1537,1579,1586,1650,1655,1672,1722,1726],{"__ignoreMap":653},[657,1523,1524,1527,1530,1533,1535],{"class":659,"line":660},[657,1525,1526],{"class":663},"for",[657,1528,1529],{"class":674}," (",[657,1531,1532],{"class":678},";;",[657,1534,1333],{"class":674},[657,1536,679],{"class":678},[657,1538,1539,1542,1545,1548,1550,1552,1554,1556,1559,1562,1565,1568,1570,1572,1575,1577],{"class":659,"line":682},[657,1540,1541],{"class":952},"  const",[657,1543,1544],{"class":674}," tags",[657,1546,1547],{"class":678}," =",[657,1549,1043],{"class":663},[657,1551,976],{"class":674},[657,1553,979],{"class":678},[657,1555,1050],{"class":670},[657,1557,1558],{"class":678},"\u003C",[657,1560,1561],{"class":1060},"string",[657,1563,1564],{"class":685},"[]",[657,1566,1567],{"class":678},">",[657,1569,675],{"class":685},[657,1571,699],{"class":678},[657,1573,1574],{"class":695},"tags",[657,1576,699],{"class":678},[657,1578,832],{"class":685},[657,1580,1581,1584],{"class":659,"line":705},[657,1582,1583],{"class":663},"  try",[657,1585,720],{"class":678},[657,1587,1588,1591,1593,1595,1597,1599,1601,1603,1605,1607,1610,1613,1615,1617,1620,1623,1625,1627,1630,1632,1635,1637,1639,1642,1644,1646,1648],{"class":659,"line":712},[657,1589,1590],{"class":663},"    await",[657,1592,976],{"class":674},[657,1594,979],{"class":678},[657,1596,982],{"class":670},[657,1598,675],{"class":685},[657,1600,699],{"class":678},[657,1602,1574],{"class":695},[657,1604,699],{"class":678},[657,1606,756],{"class":678},[657,1608,1609],{"class":685}," [",[657,1611,1612],{"class":678},"...",[657,1614,675],{"class":685},[657,1616,1574],{"class":674},[657,1618,1619],{"class":678}," ??",[657,1621,1622],{"class":685}," [])",[657,1624,756],{"class":678},[657,1626,692],{"class":678},[657,1628,1629],{"class":695},"new",[657,1631,699],{"class":678},[657,1633,1634],{"class":685},"]",[657,1636,756],{"class":678},[657,1638,741],{"class":678},[657,1640,1641],{"class":685}," ifUnchanged",[657,1643,689],{"class":678},[657,1645,1544],{"class":674},[657,1647,925],{"class":678},[657,1649,832],{"class":685},[657,1651,1652],{"class":659,"line":723},[657,1653,1654],{"class":663},"    break\n",[657,1656,1657,1660,1663,1665,1668,1670],{"class":659,"line":733},[657,1658,1659],{"class":678},"  }",[657,1661,1662],{"class":663}," catch",[657,1664,1529],{"class":685},[657,1666,1667],{"class":674},"error",[657,1669,1333],{"class":685},[657,1671,679],{"class":678},[657,1673,1674,1677,1680,1682,1685,1687,1690,1693,1695,1697,1700,1702,1704,1707,1709,1712,1714,1716,1719],{"class":659,"line":777},[657,1675,1676],{"class":663},"    if",[657,1678,1679],{"class":685}," ((",[657,1681,1667],{"class":674},[657,1683,1684],{"class":663}," as",[657,1686,741],{"class":678},[657,1688,1689],{"class":685}," code",[657,1691,1692],{"class":678},"?:",[657,1694,1070],{"class":1060},[657,1696,925],{"class":678},[657,1698,1699],{"class":685},")",[657,1701,979],{"class":678},[657,1703,623],{"class":674},[657,1705,1706],{"class":678}," !==",[657,1708,692],{"class":678},[657,1710,1711],{"class":695},"CONFLICT",[657,1713,699],{"class":678},[657,1715,1333],{"class":685},[657,1717,1718],{"class":663},"throw",[657,1720,1721],{"class":674}," error\n",[657,1723,1724],{"class":659,"line":794},[657,1725,823],{"class":678},[657,1727,1728],{"class":659,"line":814},[657,1729,1730],{"class":678},"}\n",[1732,1733],"br",{},"A counter needs none of this: ",[623,1736,1165],{}," is atomic.",[837,1739,1740,1743],{},[1509,1741,1742],{},"Keys"," are texts of 1 to 200 characters without control characters.",[837,1745,1746,1749,1750,1753,1754,1756,1757,1759],{},[1509,1747,1748],{},"Errors"," are SHADE's own: VALIDATION (a key, value or option it doesn't take, a value over ",[623,1751,1752],{},"maxValueBytes","),\nCONFLICT (\"The module's kv is full (20000 keys)\", a value where a counter is asked for), FORBIDDEN (no ",[623,1755,860],{},"\ncapability), NOT_FOUND (",[623,1758,852],{}," with an id that is no account).",[837,1761,1762,1529,1765,1768,1769,1772],{},[1509,1763,1764],{},"The module is the one SHADE made the context for",[623,1766,1767],{},"moduleOfContext","). Setting ",[623,1770,1771],{},"ctx.plugin",", or copying the\ncontext, never reaches another module's keys; a context SHADE didn't make for a module is refused.",[837,1774,1775,1778,1779,1781],{},[1509,1776,1777],{},"Every call checks the capability"," first, so switching an optional ",[623,1780,860],{}," off stops it at once.",[1783,1784,1786,1787],"h3",{"id":1785},"an-accounts-keys-foraccount","An account's keys: ",[623,1788,852],{},[648,1790,1792],{"className":650,"code":1791,"language":652,"meta":653,"style":653},"\u002F\u002F In an account route (`auth: 'account'`): the signed-in account is request.account (request.account after the accounts pull request).\nconst cart = moduleKv(ctx).forAccount(request.account!.id)\nawait cart.set('cart', [{ product: 'mug', quantity: 2 }])\nawait cart.increment('visits')\n",[623,1793,1794,1799,1830,1882],{"__ignoreMap":653},[657,1795,1796],{"class":659,"line":660},[657,1797,1798],{"class":708},"\u002F\u002F In an account route (`auth: 'account'`): the signed-in account is request.account (request.account after the accounts pull request).\n",[657,1800,1801,1803,1806,1808,1810,1813,1815,1817,1820,1822,1824,1827],{"class":659,"line":682},[657,1802,953],{"class":952},[657,1804,1805],{"class":674}," cart ",[657,1807,959],{"class":678},[657,1809,922],{"class":670},[657,1811,1812],{"class":674},"(ctx)",[657,1814,979],{"class":678},[657,1816,852],{"class":670},[657,1818,1819],{"class":674},"(request",[657,1821,979],{"class":678},[657,1823,848],{"class":674},[657,1825,1826],{"class":678},"!.",[657,1828,1829],{"class":674},"id)\n",[657,1831,1832,1834,1837,1839,1841,1843,1845,1848,1850,1852,1854,1856,1859,1861,1863,1866,1868,1870,1873,1875,1877,1879],{"class":659,"line":705},[657,1833,973],{"class":663},[657,1835,1836],{"class":674}," cart",[657,1838,979],{"class":678},[657,1840,982],{"class":670},[657,1842,675],{"class":674},[657,1844,699],{"class":678},[657,1846,1847],{"class":695},"cart",[657,1849,699],{"class":678},[657,1851,756],{"class":678},[657,1853,1609],{"class":674},[657,1855,1242],{"class":678},[657,1857,1858],{"class":685}," product",[657,1860,689],{"class":678},[657,1862,692],{"class":678},[657,1864,1865],{"class":695},"mug",[657,1867,699],{"class":678},[657,1869,756],{"class":678},[657,1871,1872],{"class":685}," quantity",[657,1874,689],{"class":678},[657,1876,1122],{"class":785},[657,1878,925],{"class":678},[657,1880,1881],{"class":674},"])\n",[657,1883,1884,1886,1888,1890,1892,1894,1896,1899,1901],{"class":659,"line":712},[657,1885,973],{"class":663},[657,1887,1836],{"class":674},[657,1889,979],{"class":678},[657,1891,1165],{"class":670},[657,1893,675],{"class":674},[657,1895,699],{"class":678},[657,1897,1898],{"class":695},"visits",[657,1900,699],{"class":678},[657,1902,832],{"class":674},[834,1904,1905,1911,1918,1933],{},[837,1906,1907,1908,979],{},"Declare ",[623,1909,1910],{},"data: { personal: 'account', retention: '\u003Ckind>' }",[837,1912,1913,1914,1917],{},"An account's keys are apart from the module's own and from every other account's: ",[623,1915,1916],{},"moduleKv(ctx).list()"," never shows them.",[837,1919,1920,1921,1924,1925,1928,1929,1932],{},"They are found and exported on the ",[880,1922,1923],{},"Personal data"," screen and in the account's own download, erased with the person,\nand deleted when the account is deleted, by an admin or by the account (see\nPersonal data per person (",[623,1926,1927],{},"shade\u002Ffeatures\u002Fprivacy\u002FREADME.md"," in the ",[623,1930,1931],{},"shade"," repository)).",[837,1934,1935,1936,979],{},"They count toward the module's ",[623,1937,1938],{},"maxKeys",[636,1940,1942,1943],{"id":1941},"an-untrusted-module-shadekv","An untrusted module: ",[623,1944,629],{},[648,1946,1950],{"className":1947,"code":1948,"language":1949,"meta":653,"style":653},"language-js shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { connect } from 'shade'\n\nexport default {\n  async fetch(request, env) {\n    const shade = connect(env)\n    const views = await shade.kv.increment('views')\n    await shade.kv.set('last-visit', new Date().toISOString(), { ttlMs: 86_400_000 })\n    const page = await shade.kv.list({ prefix: 'card:' }) \u002F\u002F as a trusted module's: { keys, cursor }\n    return Response.json({ views, keys: page.keys })\n  }\n}\n","js",[623,1951,1952,1971,1975,1983,2006,2025,2056,2108,2149,2186,2190],{"__ignoreMap":653},[657,1953,1954,1956,1958,1961,1963,1965,1967,1969],{"class":659,"line":660},[657,1955,917],{"class":663},[657,1957,741],{"class":678},[657,1959,1960],{"class":674}," connect",[657,1962,925],{"class":678},[657,1964,928],{"class":663},[657,1966,692],{"class":678},[657,1968,1931],{"class":695},[657,1970,936],{"class":678},[657,1972,1973],{"class":659,"line":682},[657,1974,942],{"emptyLinePlaceholder":941},[657,1976,1977,1979,1981],{"class":659,"line":705},[657,1978,664],{"class":663},[657,1980,667],{"class":663},[657,1982,720],{"class":678},[657,1984,1985,1988,1991,1993,1997,1999,2002,2004],{"class":659,"line":712},[657,1986,1987],{"class":952},"  async",[657,1989,1990],{"class":685}," fetch",[657,1992,675],{"class":678},[657,1994,1996],{"class":1995},"sHdIc","request",[657,1998,756],{"class":678},[657,2000,2001],{"class":1995}," env",[657,2003,1699],{"class":678},[657,2005,720],{"class":678},[657,2007,2008,2011,2014,2016,2018,2020,2023],{"class":659,"line":723},[657,2009,2010],{"class":952},"    const",[657,2012,2013],{"class":674}," shade",[657,2015,1547],{"class":678},[657,2017,1960],{"class":670},[657,2019,675],{"class":685},[657,2021,2022],{"class":674},"env",[657,2024,832],{"class":685},[657,2026,2027,2029,2032,2034,2036,2038,2040,2042,2044,2046,2048,2050,2052,2054],{"class":659,"line":733},[657,2028,2010],{"class":952},[657,2030,2031],{"class":674}," views",[657,2033,1547],{"class":678},[657,2035,1043],{"class":663},[657,2037,2013],{"class":674},[657,2039,979],{"class":678},[657,2041,860],{"class":674},[657,2043,979],{"class":678},[657,2045,1165],{"class":670},[657,2047,675],{"class":685},[657,2049,699],{"class":678},[657,2051,1172],{"class":695},[657,2053,699],{"class":678},[657,2055,832],{"class":685},[657,2057,2058,2060,2062,2064,2066,2068,2070,2072,2074,2077,2079,2081,2083,2085,2087,2089,2091,2093,2095,2097,2099,2101,2104,2106],{"class":659,"line":777},[657,2059,1590],{"class":663},[657,2061,2013],{"class":674},[657,2063,979],{"class":678},[657,2065,860],{"class":674},[657,2067,979],{"class":678},[657,2069,982],{"class":670},[657,2071,675],{"class":685},[657,2073,699],{"class":678},[657,2075,2076],{"class":695},"last-visit",[657,2078,699],{"class":678},[657,2080,756],{"class":678},[657,2082,1013],{"class":678},[657,2084,1016],{"class":670},[657,2086,1019],{"class":685},[657,2088,979],{"class":678},[657,2090,1024],{"class":670},[657,2092,1019],{"class":685},[657,2094,756],{"class":678},[657,2096,741],{"class":678},[657,2098,1129],{"class":685},[657,2100,689],{"class":678},[657,2102,2103],{"class":785}," 86_400_000",[657,2105,925],{"class":678},[657,2107,832],{"class":685},[657,2109,2110,2112,2114,2116,2118,2120,2122,2124,2126,2128,2130,2132,2134,2136,2138,2140,2142,2144,2146],{"class":659,"line":794},[657,2111,2010],{"class":952},[657,2113,1285],{"class":674},[657,2115,1547],{"class":678},[657,2117,1043],{"class":663},[657,2119,2013],{"class":674},[657,2121,979],{"class":678},[657,2123,860],{"class":674},[657,2125,979],{"class":678},[657,2127,1237],{"class":670},[657,2129,675],{"class":685},[657,2131,1242],{"class":678},[657,2133,1245],{"class":685},[657,2135,689],{"class":678},[657,2137,692],{"class":678},[657,2139,1252],{"class":695},[657,2141,699],{"class":678},[657,2143,925],{"class":678},[657,2145,1333],{"class":685},[657,2147,2148],{"class":708},"\u002F\u002F as a trusted module's: { keys, cursor }\n",[657,2150,2151,2154,2157,2159,2162,2164,2166,2168,2170,2173,2175,2177,2179,2182,2184],{"class":659,"line":814},[657,2152,2153],{"class":663},"    return",[657,2155,2156],{"class":674}," Response",[657,2158,979],{"class":678},[657,2160,2161],{"class":670},"json",[657,2163,675],{"class":685},[657,2165,1242],{"class":678},[657,2167,2031],{"class":674},[657,2169,756],{"class":678},[657,2171,2172],{"class":685}," keys",[657,2174,689],{"class":678},[657,2176,1285],{"class":674},[657,2178,979],{"class":678},[657,2180,2181],{"class":674},"keys",[657,2183,925],{"class":678},[657,2185,832],{"class":685},[657,2187,2188],{"class":659,"line":820},[657,2189,823],{"class":678},[657,2191,2192],{"class":659,"line":826},[657,2193,1730],{"class":678},[619,2195,2196,845,2198,845,2201,845,2203,1475,2206,2209,2210,2213,2214,845,2217,702,2219,2222],{},[623,2197,1050],{},[623,2199,2200],{},"set(key, value, { ttlMs, ifUnchanged })",[623,2202,1355],{},[623,2204,2205],{},"list({ prefix, limit, cursor })",[623,2207,2208],{},"increment(key, by)"," go through the bridge\n(",[623,2211,2212],{},"kv.*",") to the same service, as the module itself. A sandbox package built before the declaration keeps kv with\ntoday's limits (10 000 keys of 256 KB). A refused call answers with the error's code (",[623,2215,2216],{},"FORBIDDEN",[623,2218,1711],{},[623,2220,2221],{},"VALIDATION",") and is counted for the module like any capability refusal.",[636,2224,2226],{"id":2225},"retention-and-uninstalling","Retention and uninstalling",[834,2228,2229,2239,2264,2273],{},[837,2230,2231,2234,2235,2238],{},[1509,2232,2233],{},"Expired keys"," read as missing at once. The core schedule ",[623,2236,2237],{},"kv.purge",", on the worker container role every 15\nminutes, deletes them.",[837,2240,2241,2244,2245,2248,2249,2252,2253,2256,2257,2260,2261,979],{},[1509,2242,2243],{},"Keys past their retention",": for a module whose kv names a retention kind, the same schedule deletes the keys not\nwritten within the kind's period (by ",[623,2246,2247],{},"updated_at","), also while the module is off, with an audit entry\n(",[623,2250,2251],{},"retention.purge",", target ",[623,2254,2255],{},"\u003Cplugin>.\u003Ckind>","). The kind still has its own ",[623,2258,2259],{},"purge",", which may delete nothing:\n",[623,2262,2263],{},"{ key: 'carts', label: 'shop.retention.carts', defaultDays: 30, minDays: 1, purge: async () => 0 }",[837,2265,2266,1529,2269,2272],{},[1509,2267,2268],{},"Without a retention kind",[623,2270,2271],{},"personal: 'none'","), keys stay until the module deletes them or is uninstalled.",[837,2274,2275,2278,2279,2282,2283,2285,2286,2289,2290,2293],{},[1509,2276,2277],{},"Uninstalling"," a trusted module backs its keys up with its data (",[623,2280,2281],{},"module_backups",", table ",[623,2284,633],{},") and deletes\nthem. ",[1509,2287,2288],{},"Removing"," an untrusted module deletes them; ",[880,2291,2292],{},"Export"," saves them first.",[636,2295,2297],{"id":2296},"where-it-is","Where it is",[1367,2299,2300,2310],{},[1370,2301,2302],{},[1373,2303,2304,2307],{},[1376,2305,2306],{},"Part",[1376,2308,2309],{},"What",[1383,2311,2312,2343,2371,2397,2431,2447,2466,2484],{},[1373,2313,2314,2319],{},[1388,2315,2316],{},[623,2317,2318],{},"shade\u002Ffeatures\u002Fkv\u002Fserver\u002Fkv.ts",[1388,2320,2321,845,2323,845,2326,2329,2330,845,2333,845,2336,845,2339,2342],{},[623,2322,625],{},[623,2324,2325],{},"ModuleKv",[623,2327,2328],{},"KvValue",", the quotas' defaults; ",[623,2331,2332],{},"kvOfAccounts",[623,2334,2335],{},"forgetKvOfAccounts",[623,2337,2338],{},"kvRowsOf",[623,2340,2341],{},"forgetKv"," for privacy and uninstalling.",[1373,2344,2345,2350],{},[1388,2346,2347],{},[623,2348,2349],{},"shade\u002Ffeatures\u002Fkv\u002Fserver\u002Fmanifest.ts",[1388,2351,2352,2353,2355,2356,845,2359,2362,2363,2366,2367,2370],{},"The ",[623,2354,860],{}," capability's definition (",[623,2357,2358],{},"kvCapability",[623,2360,2361],{},"KvParamsSchema",") and its privacy entry (",[623,2364,2365],{},"registerKvPrivacy","), registered when ",[623,2368,2369],{},"shade\u002Fexports\u002Fmanifest-parts.ts"," loads it.",[1373,2372,2373,2378],{},[1388,2374,2375],{},[623,2376,2377],{},"shade\u002Ffeatures\u002Fkv\u002Fserver\u002Fpurge.ts",[1388,2379,2380,1529,2383,2385,2386,845,2389,2392,2393,2396],{},[623,2381,2382],{},"KV_PURGE_SCHEDULE",[623,2384,2237],{},", expired keys: ",[623,2387,2388],{},"purgeKvKeys",[623,2390,2391],{},"purgeExpiredKv","); ",[623,2394,2395],{},"purgeKv",", registered with retention for the keys a retention kind limits.",[1373,2398,2399,2404],{},[1388,2400,2401],{},[623,2402,2403],{},"shade\u002Ffeatures\u002Fkv\u002Fserver\u002Fkv.sql.ts",[1388,2405,2406,1529,2408,2411,2412,845,2415,2417,2418,2421,2422,845,2425,2427,2428,979],{},[623,2407,633],{},[623,2409,2410],{},"moduleKvData","): module, key, ",[623,2413,2414],{},"account_id",[623,2416,1412],{}," (jsonb), ",[623,2419,2420],{},"counter"," (bigint), ",[623,2423,2424],{},"expires_at",[623,2426,2247],{},"; primary key module and key. An account's key is stored as ",[623,2429,2430],{},"\\u001f\u003Caccount id>\\u001f\u003Ckey>",[1373,2432,2433,2438],{},[1388,2434,2435],{},[623,2436,2437],{},"shade\u002Fkernel\u002Fmodules\u002Fcapabilities.ts",[1388,2439,2440,2443,2444,865],{},[623,2441,2442],{},"requireCapability(ctx, 'kv')",": refuses a module without it and gives the parameters agreed to (the module manager's ",[623,2445,2446],{},"activeCapabilityParams",[1373,2448,2449,2454],{},[1388,2450,2451],{},[623,2452,2453],{},"shade\u002Ffeatures\u002Fprivacy\u002Fserver\u002Fprivacy.ts",[1388,2455,2456,845,2459,845,2462,2465],{},[623,2457,2458],{},"registerAccountData",[623,2460,2461],{},"registerAccountDirectory",[623,2463,2464],{},"eraseAccountData",": data kept by account id.",[1373,2467,2468,2473],{},[1388,2469,2470],{},[623,2471,2472],{},"shade\u002Ffeatures\u002Fpackages\u002Fserver\u002Funtrusted.ts",[1388,2474,2475,2476,1529,2478,845,2481,865],{},"The bridge's ",[623,2477,2212],{},[623,2479,2480],{},"sandboxCall",[623,2482,2483],{},"kvCall",[1373,2485,2486,2491],{},[1388,2487,2488],{},[623,2489,2490],{},"apps\u002Fapi\u002Fsrc\u002Fsandbox\u002Fworkers.ts",[1388,2492,2352,2493,2495,2496,979],{},[623,2494,1931],{}," module's ",[623,2497,860],{},[619,2499,2500],{},"How it works:",[834,2502,2503,2509,2522,2525],{},[837,2504,2505,2506,2508],{},"A new key is added in a transaction under a lock per module, after counting the module's keys, so writes at the same\nmoment never pass ",[623,2507,1938],{},". Expired keys are deleted first when the module is full. Changing a key it has needs no\nlock.",[837,2510,2511,2513,2514,2517,2518,2521],{},[623,2512,1165],{}," on a counter is one ",[623,2515,2516],{},"UPDATE … SET counter = counter + $by","; a new counter is an\n",[623,2519,2520],{},"INSERT … ON CONFLICT DO UPDATE",", so increments at the same moment all count.",[837,2523,2524],{},"Redis holds nothing of kv. It may later speed up counters and expiry, rebuilt from the table.",[837,2526,2527,2528,2531,2532,2535,2536,2538],{},"Untrusted modules' keys were in ",[623,2529,2530],{},"uploaded_plugin_data"," until migration ",[623,2533,2534],{},"0010_kv_uploaded_plugin_data_into_plugin_kv","\nmoved every row into ",[623,2537,633],{}," (same module and key, value and time) and dropped the old table.",[636,2540,2542],{"id":2541},"tests","Tests",[834,2544,2545,2589,2595,2601,2607],{},[837,2546,2547,2550,2551],{},[623,2548,2549],{},"shade\u002Ftest\u002Ffeatures\u002Fkv\u002Fserver\u002Fkv.test.ts"," (Postgres):\n",[834,2552,2553,2556,2559,2562,2565,2571,2574,2577,2580],{},[837,2554,2555],{},"get, set, delete, list and increment for a trusted module, and a key that expires;",[837,2557,2558],{},"\"counts atomically under concurrent increments\", from a trusted module and through the bridge;",[837,2560,2561],{},"\"keeps to its quota\": ten new keys at once for five places keep five; a value over its limit; an account's keys\ncounting; an untrusted module held to its own declaration;",[837,2563,2564],{},"\"checks the kv capability on every call, for both kinds of module\": not declared, optional and off, core's own\ncontext, and refusals counted for an untrusted module;",[837,2566,2567,2568,2570],{},"\"keeps one module from another's keys\": two trusted and two untrusted modules with the same keys, a forged\n",[623,2569,1771],{},", accounts' keys apart from each other and from the module's own;",[837,2572,2573],{},"\"exports and erases an account's keys with the account\": the privacy lookup, the erase, an admin deleting the\naccount;",[837,2575,2576],{},"\"purges by the declared retention kind\", following the admin's period;",[837,2578,2579],{},"uninstalling backs the keys up, then deletes them;",[837,2581,2582,2583,2585,2586,2588],{},"the migration moving ",[623,2584,2530],{}," into ",[623,2587,633],{}," with each row's module and key.",[837,2590,2591,2594],{},[623,2592,2593],{},"apps\u002Fapi\u002Ftest\u002Fsandbox\u002Fhost.test.ts",": \"gives an untrusted module kv.increment only with the kv capability,\natomically\", in real workerd.",[837,2596,2597,2600],{},[623,2598,2599],{},"shade\u002Ftest\u002Fkernel\u002Fmodules\u002Fcapabilities.test.ts",": kv for both kinds, its quotas' limits, and untrusted modules keeping\nnothing about a person.",[837,2602,2603,2606],{},[623,2604,2605],{},"shade\u002Ftest\u002Ffeatures\u002Faccounts\u002Fserver\u002Faccounts.test.ts",": an account deleting their own account deletes their keys.",[837,2608,2609,2612,2613,2615],{},[623,2610,2611],{},"apps\u002Fapi\u002Ftest\u002Fbootstrap\u002Fworker.test.ts",": ",[623,2614,2237],{}," runs on the worker every 15 minutes.",[2617,2618,2619],"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 .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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 .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}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 .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}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":653,"searchDepth":682,"depth":682,"links":2621},[2622,2623,2628,2630,2631,2632],{"id":638,"depth":682,"text":639},{"id":904,"depth":682,"text":2624,"children":2625},"A trusted module: moduleKv(ctx)",[2626],{"id":1785,"depth":705,"text":2627},"An account's keys: forAccount",{"id":1941,"depth":682,"text":2629},"An untrusted module: shade.kv",{"id":2225,"depth":682,"text":2226},{"id":2296,"depth":682,"text":2297},{"id":2541,"depth":682,"text":2542},"md",null,{},{"title":405,"description":653},"1CzKNZ-wQyImGa60asGCblkcAUACnrnpM8Op0Xj_9Fc",[2639,2640],{"title":401,"path":402,"stem":403,"description":653,"children":-1},{"title":409,"path":410,"stem":411,"description":653,"children":-1},1796500154749]