[{"data":1,"prerenderedAt":3837},["ShallowReactive",2],{"docs-navigation:en":3,"content-page:docs:Fkgsoln22c3ggSc4NlAvWlPLxOpFnr04sItURAX-870":842,"content-page-surround:docs:Fkgsoln22c3ggSc4NlAvWlPLxOpFnr04sItURAX-870":3823,"i-lucide:braces":3828,"i-logos:typescript-icon":3832,"i-lucide:clipboard":3835},[4,41,110,540,643,708,772,837],{"title":5,"page":6,"canonicalKey":7,"locale":8,"id":9,"draft":6,"icon":10,"sidebar":11,"children":12},"Learn",false,"1","en","content:docs:1.overview:.navigation.yml","i-lucide-book-open","section",[13,20,27,34],{"title":14,"id":15,"canonicalKey":16,"locale":8,"draft":6,"navigation":17,"icon":18,"path":19},"Better Convex Nuxt","content:docs:1.overview:1.introduction.md","1\u002F1",{"icon":18},"i-lucide-orbit","\u002Fdocs\u002Foverview\u002Fintroduction",{"title":21,"id":22,"canonicalKey":23,"locale":8,"draft":6,"navigation":24,"icon":25,"path":26},"Who it is for","content:docs:1.overview:2.who-it-is-for.md","1\u002F2",{"icon":25},"i-lucide-users","\u002Fdocs\u002Foverview\u002Fwho-it-is-for",{"title":28,"id":29,"canonicalKey":30,"locale":8,"draft":6,"navigation":31,"icon":32,"path":33},"Limitations and trade-offs","content:docs:1.overview:3.limitations.md","1\u002F3",{"icon":32},"i-lucide-triangle-alert","\u002Fdocs\u002Foverview\u002Flimitations",{"title":35,"id":36,"canonicalKey":37,"locale":8,"draft":6,"navigation":38,"icon":39,"path":40},"Compare Nuxt integrations","content:docs:1.overview:4.comparison.md","1\u002F4",{"icon":39},"i-lucide-scale","\u002Fdocs\u002Foverview\u002Fcomparison",{"title":42,"page":6,"canonicalKey":43,"locale":8,"id":44,"draft":6,"icon":45,"children":46},"Get started","2","content:docs:2.get-started:.navigation.yml","i-lucide-rocket",[47,54,61,68,75,82,89,96,103],{"title":48,"id":49,"canonicalKey":50,"locale":8,"draft":6,"navigation":51,"icon":52,"path":53},"Choose your path","content:docs:2.get-started:1.choose-your-path.md","2\u002F1",{"icon":52},"i-lucide-signpost","\u002Fdocs\u002Fget-started\u002Fchoose-your-path",{"title":55,"id":56,"canonicalKey":57,"locale":8,"draft":6,"navigation":58,"icon":59,"path":60},"Installation","content:docs:2.get-started:2.installation.md","2\u002F2",{"icon":59},"i-lucide-download","\u002Fdocs\u002Fget-started\u002Finstallation",{"title":62,"id":63,"canonicalKey":64,"locale":8,"draft":6,"navigation":65,"icon":66,"path":67},"First real-time page","content:docs:2.get-started:3.first-realtime-page.md","2\u002F3",{"icon":66},"i-lucide-radio","\u002Fdocs\u002Fget-started\u002Ffirst-realtime-page",{"title":69,"id":70,"canonicalKey":71,"locale":8,"draft":6,"navigation":72,"icon":73,"path":74},"Complete and delete","content:docs:2.get-started:4.complete-and-delete.md","2\u002F4",{"icon":73},"i-lucide-square-check","\u002Fdocs\u002Fget-started\u002Fcomplete-and-delete",{"title":76,"id":77,"canonicalKey":78,"locale":8,"draft":6,"navigation":79,"icon":80,"path":81},"Add authentication","content:docs:2.get-started:5.add-authentication.md","2\u002F5",{"icon":80},"i-lucide-log-in","\u002Fdocs\u002Fget-started\u002Fadd-authentication",{"title":83,"id":84,"canonicalKey":85,"locale":8,"draft":6,"navigation":86,"icon":87,"path":88},"Protect data","content:docs:2.get-started:6.protect-data.md","2\u002F6",{"icon":87},"i-lucide-shield-check","\u002Fdocs\u002Fget-started\u002Fprotect-data",{"title":90,"id":91,"canonicalKey":92,"locale":8,"draft":6,"navigation":93,"icon":94,"path":95},"Project structure","content:docs:2.get-started:7.project-structure.md","2\u002F7",{"icon":94},"i-lucide-folder-tree","\u002Fdocs\u002Fget-started\u002Fproject-structure",{"title":97,"id":98,"canonicalKey":99,"locale":8,"draft":6,"navigation":100,"icon":101,"path":102},"Next steps","content:docs:2.get-started:8.next-steps.md","2\u002F8",{"icon":101},"i-lucide-arrow-right","\u002Fdocs\u002Fget-started\u002Fnext-steps",{"title":104,"id":105,"canonicalKey":106,"locale":8,"draft":6,"navigation":107,"icon":108,"path":109},"Plain Vue and Vite","content:docs:2.get-started:9.plain-vue.md","2\u002F9",{"icon":108},"i-lucide-panels-top-left","\u002Fdocs\u002Fget-started\u002Fplain-vue",{"title":111,"page":6,"canonicalKey":112,"locale":8,"id":113,"draft":6,"icon":114,"sidebar":11,"children":115},"Build","3","content:docs:3.build:.navigation.yml","i-lucide-blocks",[116,154,200,321,353,385,431,481],{"title":117,"page":6,"canonicalKey":118,"locale":8,"children":119},"Queries","3\u002F1",[120,126,133,140,147],{"title":117,"id":121,"canonicalKey":122,"locale":8,"draft":6,"navigation":123,"icon":124,"path":125},"content:docs:3.build:1.queries:1.queries.md","3\u002F1\u002F1",{"icon":124},"i-lucide-database","\u002Fdocs\u002Fbuild\u002Fqueries\u002Fqueries",{"title":127,"id":128,"canonicalKey":129,"locale":8,"draft":6,"navigation":130,"icon":131,"path":132},"Reactive arguments","content:docs:3.build:1.queries:2.reactive-arguments.md","3\u002F1\u002F2",{"icon":131},"i-lucide-sliders-horizontal","\u002Fdocs\u002Fbuild\u002Fqueries\u002Freactive-arguments",{"title":134,"id":135,"canonicalKey":136,"locale":8,"draft":6,"navigation":137,"icon":138,"path":139},"Loading and stale data","content:docs:3.build:1.queries:3.loading-and-stale-data.md","3\u002F1\u002F3",{"icon":138},"i-lucide-loader-circle","\u002Fdocs\u002Fbuild\u002Fqueries\u002Floading-and-stale-data",{"title":141,"id":142,"canonicalKey":143,"locale":8,"draft":6,"navigation":144,"icon":145,"path":146},"Query execution options","content:docs:3.build:1.queries:4.ssr-options.md","3\u002F1\u002F4",{"icon":145},"i-lucide-server-cog","\u002Fdocs\u002Fbuild\u002Fqueries\u002Fssr-options",{"title":148,"id":149,"canonicalKey":150,"locale":8,"draft":6,"navigation":151,"icon":152,"path":153},"Pagination","content:docs:3.build:1.queries:6.pagination.md","3\u002F1\u002F6",{"icon":152},"i-lucide-list-plus","\u002Fdocs\u002Fbuild\u002Fqueries\u002Fpagination",{"title":155,"page":6,"canonicalKey":156,"locale":8,"children":157},"Write Data","3\u002F2",[158,165,172,179,186,193],{"title":159,"id":160,"canonicalKey":161,"locale":8,"draft":6,"navigation":162,"icon":163,"path":164},"Mutations","content:docs:3.build:2.write-data:1.mutations.md","3\u002F2\u002F1",{"icon":163},"i-lucide-square-pen","\u002Fdocs\u002Fbuild\u002Fwrite-data\u002Fmutations",{"title":166,"id":167,"canonicalKey":168,"locale":8,"draft":6,"navigation":169,"icon":170,"path":171},"Actions","content:docs:3.build:2.write-data:2.actions.md","3\u002F2\u002F2",{"icon":170},"i-lucide-zap","\u002Fdocs\u002Fbuild\u002Fwrite-data\u002Factions",{"title":173,"id":174,"canonicalKey":175,"locale":8,"draft":6,"navigation":176,"icon":177,"path":178},"Optimistic updates","content:docs:3.build:2.write-data:3.optimistic-updates.md","3\u002F2\u002F3",{"icon":177},"i-lucide-gauge","\u002Fdocs\u002Fbuild\u002Fwrite-data\u002Foptimistic-updates",{"title":180,"id":181,"canonicalKey":182,"locale":8,"draft":6,"navigation":183,"icon":184,"path":185},"Concurrent operations","content:docs:3.build:2.write-data:4.concurrent-operations.md","3\u002F2\u002F4",{"icon":184},"i-lucide-git-fork","\u002Fdocs\u002Fbuild\u002Fwrite-data\u002Fconcurrent-operations",{"title":187,"id":188,"canonicalKey":189,"locale":8,"draft":6,"navigation":190,"icon":191,"path":192},"Form submissions","content:docs:3.build:2.write-data:5.forms.md","3\u002F2\u002F5",{"icon":191},"i-lucide-list-checks","\u002Fdocs\u002Fbuild\u002Fwrite-data\u002Fforms",{"title":194,"id":195,"canonicalKey":196,"locale":8,"draft":6,"navigation":197,"icon":198,"path":199},"Multi-step operations","content:docs:3.build:2.write-data:6.multi-step-operations.md","3\u002F2\u002F6",{"icon":198},"i-lucide-list-ordered","\u002Fdocs\u002Fbuild\u002Fwrite-data\u002Fmulti-step-operations",{"title":201,"page":6,"canonicalKey":202,"locale":8,"children":203},"Authentication","3\u002F3",[204,210,217,224,230,237,244,251,258,265,272,279,286,293,300,307,314],{"title":201,"id":205,"canonicalKey":206,"locale":8,"draft":6,"navigation":207,"icon":208,"path":209},"content:docs:3.build:3.authentication:1.overview.md","3\u002F3\u002F1",{"icon":208},"i-lucide-shield","\u002Fdocs\u002Fbuild\u002Fauthentication\u002Foverview",{"title":211,"id":212,"canonicalKey":213,"locale":8,"draft":6,"navigation":214,"icon":215,"path":216},"Better Auth setup","content:docs:3.build:3.authentication:2.better-auth-setup.md","3\u002F3\u002F2",{"icon":215},"i-lucide-settings-2","\u002Fdocs\u002Fbuild\u002Fauthentication\u002Fbetter-auth-setup",{"title":218,"id":219,"canonicalKey":220,"locale":8,"draft":6,"navigation":221,"icon":222,"path":223},"Auth state and user data","content:docs:3.build:3.authentication:3.auth-state-and-user.md","3\u002F3\u002F3",{"icon":222},"i-lucide-user-round","\u002Fdocs\u002Fbuild\u002Fauthentication\u002Fauth-state-and-user",{"title":225,"id":226,"canonicalKey":227,"locale":8,"draft":6,"navigation":228,"icon":80,"path":229},"Sign in and sign out","content:docs:3.build:3.authentication:4.sign-in-and-sign-out.md","3\u002F3\u002F4",{"icon":80},"\u002Fdocs\u002Fbuild\u002Fauthentication\u002Fsign-in-and-sign-out",{"title":231,"id":232,"canonicalKey":233,"locale":8,"draft":6,"navigation":234,"icon":235,"path":236},"Route protection","content:docs:3.build:3.authentication:5.route-protection.md","3\u002F3\u002F5",{"icon":235},"i-lucide-route","\u002Fdocs\u002Fbuild\u002Fauthentication\u002Froute-protection",{"title":238,"id":239,"canonicalKey":240,"locale":8,"draft":6,"navigation":241,"icon":242,"path":243},"Backend authorization","content:docs:3.build:3.authentication:6.backend-authorization.md","3\u002F3\u002F6",{"icon":242},"i-lucide-lock-keyhole","\u002Fdocs\u002Fbuild\u002Fauthentication\u002Fbackend-authorization",{"title":245,"id":246,"canonicalKey":247,"locale":8,"draft":6,"navigation":248,"icon":249,"path":250},"Better Auth plugins","content:docs:3.build:3.authentication:7.better-auth-plugins.md","3\u002F3\u002F7",{"icon":249},"i-lucide-plug","\u002Fdocs\u002Fbuild\u002Fauthentication\u002Fbetter-auth-plugins",{"title":252,"id":253,"canonicalKey":254,"locale":8,"draft":6,"navigation":255,"icon":256,"path":257},"Custom user fields","content:docs:3.build:3.authentication:8.custom-user-fields.md","3\u002F3\u002F8",{"icon":256},"i-lucide-user-cog","\u002Fdocs\u002Fbuild\u002Fauthentication\u002Fcustom-user-fields",{"title":259,"id":260,"canonicalKey":261,"locale":8,"draft":6,"navigation":262,"icon":263,"path":264},"User synchronization","content:docs:3.build:3.authentication:9.user-synchronization.md","3\u002F3\u002F9",{"icon":263},"i-lucide-refresh-ccw","\u002Fdocs\u002Fbuild\u002Fauthentication\u002Fuser-synchronization",{"title":266,"id":267,"canonicalKey":268,"locale":8,"draft":6,"navigation":269,"icon":270,"path":271},"Delegated OAuth and MCP","content:docs:3.build:3.authentication:10.delegated-oauth-and-mcp.md","3\u002F3\u002F10",{"icon":270},"i-lucide-bot","\u002Fdocs\u002Fbuild\u002Fauthentication\u002Fdelegated-oauth-and-mcp",{"title":273,"id":274,"canonicalKey":275,"locale":8,"draft":6,"navigation":276,"icon":277,"path":278},"Transactional auth email","content:docs:3.build:3.authentication:11.transactional-email.md","3\u002F3\u002F11",{"icon":277},"i-lucide-mail","\u002Fdocs\u002Fbuild\u002Fauthentication\u002Ftransactional-email",{"title":280,"id":281,"canonicalKey":282,"locale":8,"draft":6,"navigation":283,"icon":284,"path":285},"Social sign-in","content:docs:3.build:3.authentication:12.social-sign-in.md","3\u002F3\u002F12",{"icon":284},"i-lucide-github","\u002Fdocs\u002Fbuild\u002Fauthentication\u002Fsocial-sign-in",{"title":287,"id":288,"canonicalKey":289,"locale":8,"draft":6,"navigation":290,"icon":291,"path":292},"Better Auth plugin support","content:docs:3.build:3.authentication:13.better-auth-plugin-support.md","3\u002F3\u002F13",{"icon":291},"i-lucide-puzzle","\u002Fdocs\u002Fbuild\u002Fauthentication\u002Fbetter-auth-plugin-support",{"title":294,"id":295,"canonicalKey":296,"locale":8,"draft":6,"navigation":297,"icon":298,"path":299},"Cacheable public pages","content:docs:3.build:3.authentication:14.cacheable-public-pages.md","3\u002F3\u002F14",{"icon":298},"i-lucide-globe","\u002Fdocs\u002Fbuild\u002Fauthentication\u002Fcacheable-public-pages",{"title":301,"id":302,"canonicalKey":303,"locale":8,"draft":6,"navigation":304,"icon":305,"path":306},"Several sites on one deployment","content:docs:3.build:3.authentication:15.multiple-site-origins.md","3\u002F3\u002F15",{"icon":305},"i-lucide-network","\u002Fdocs\u002Fbuild\u002Fauthentication\u002Fmultiple-site-origins",{"title":308,"id":309,"canonicalKey":310,"locale":8,"draft":6,"navigation":311,"icon":312,"path":313},"Account deletion","content:docs:3.build:3.authentication:16.account-deletion.md","3\u002F3\u002F16",{"icon":312},"i-lucide-user-x","\u002Fdocs\u002Fbuild\u002Fauthentication\u002Faccount-deletion",{"title":315,"id":316,"canonicalKey":317,"locale":8,"draft":6,"navigation":318,"icon":319,"path":320},"Company sign-in (OIDC)","content:docs:3.build:3.authentication:17.company-sign-in.md","3\u002F3\u002F17",{"icon":319},"i-lucide-building-2","\u002Fdocs\u002Fbuild\u002Fauthentication\u002Fcompany-sign-in",{"title":322,"page":6,"canonicalKey":323,"locale":8,"children":324},"Server","3\u002F4",[325,332,339,346],{"title":326,"id":327,"canonicalKey":328,"locale":8,"draft":6,"navigation":329,"icon":330,"path":331},"serverConvex","content:docs:3.build:4.server:1.server-convex.md","3\u002F4\u002F1",{"icon":330},"i-lucide-server","\u002Fdocs\u002Fbuild\u002Fserver\u002Fserver-convex",{"title":333,"id":334,"canonicalKey":335,"locale":8,"draft":6,"navigation":336,"icon":337,"path":338},"Server routes","content:docs:3.build:4.server:2.server-routes.md","3\u002F4\u002F2",{"icon":337},"i-lucide-waypoints","\u002Fdocs\u002Fbuild\u002Fserver\u002Fserver-routes",{"title":340,"id":341,"canonicalKey":342,"locale":8,"draft":6,"navigation":343,"icon":344,"path":345},"Webhooks and jobs","content:docs:3.build:4.server:3.webhooks-and-jobs.md","3\u002F4\u002F3",{"icon":344},"i-lucide-webhook","\u002Fdocs\u002Fbuild\u002Fserver\u002Fwebhooks-and-jobs",{"title":347,"id":348,"canonicalKey":349,"locale":8,"draft":6,"navigation":350,"icon":351,"path":352},"Credentials and server security","content:docs:3.build:4.server:4.credentials-and-security.md","3\u002F4\u002F4",{"icon":351},"i-lucide-key-round","\u002Fdocs\u002Fbuild\u002Fserver\u002Fcredentials-and-security",{"title":354,"page":6,"canonicalKey":355,"locale":8,"children":356},"Files","3\u002F5",[357,364,371,378],{"title":358,"id":359,"canonicalKey":360,"locale":8,"draft":6,"navigation":361,"icon":362,"path":363},"Upload files","content:docs:3.build:5.files:1.upload-files.md","3\u002F5\u002F1",{"icon":362},"i-lucide-upload","\u002Fdocs\u002Fbuild\u002Ffiles\u002Fupload-files",{"title":365,"id":366,"canonicalKey":367,"locale":8,"draft":6,"navigation":368,"icon":369,"path":370},"Storage URLs","content:docs:3.build:5.files:3.storage-urls.md","3\u002F5\u002F3",{"icon":369},"i-lucide-link","\u002Fdocs\u002Fbuild\u002Ffiles\u002Fstorage-urls",{"title":372,"id":373,"canonicalKey":374,"locale":8,"draft":6,"navigation":375,"icon":376,"path":377},"File validation and deletion","content:docs:3.build:5.files:4.validation-and-deletion.md","3\u002F5\u002F4",{"icon":376},"i-lucide-file-x","\u002Fdocs\u002Fbuild\u002Ffiles\u002Fvalidation-and-deletion",{"title":379,"id":380,"canonicalKey":381,"locale":8,"draft":6,"navigation":382,"icon":383,"path":384},"Private downloads","content:docs:3.build:5.files:5.private-downloads.md","3\u002F5\u002F5",{"icon":383},"i-lucide-file-lock","\u002Fdocs\u002Fbuild\u002Ffiles\u002Fprivate-downloads",{"title":386,"page":6,"canonicalKey":387,"locale":8,"children":388},"Application Behavior","3\u002F6",[389,396,403,410,417,424],{"title":390,"id":391,"canonicalKey":392,"locale":8,"draft":6,"navigation":393,"icon":394,"path":395},"Connection state","content:docs:3.build:6.application-behavior:1.connection-state.md","3\u002F6\u002F1",{"icon":394},"i-lucide-wifi","\u002Fdocs\u002Fbuild\u002Fapplication-behavior\u002Fconnection-state",{"title":397,"id":398,"canonicalKey":399,"locale":8,"draft":6,"navigation":400,"icon":401,"path":402},"Error handling","content:docs:3.build:6.application-behavior:2.error-handling.md","3\u002F6\u002F2",{"icon":401},"i-lucide-circle-alert","\u002Fdocs\u002Fbuild\u002Fapplication-behavior\u002Ferror-handling",{"title":404,"id":405,"canonicalKey":406,"locale":8,"draft":6,"navigation":407,"icon":408,"path":409},"Logging","content:docs:3.build:6.application-behavior:3.logging.md","3\u002F6\u002F3",{"icon":408},"i-lucide-scroll-text","\u002Fdocs\u002Fbuild\u002Fapplication-behavior\u002Flogging",{"title":411,"id":412,"canonicalKey":413,"locale":8,"draft":6,"navigation":414,"icon":415,"path":416},"DevTools","content:docs:3.build:6.application-behavior:4.devtools.md","3\u002F6\u002F4",{"icon":415},"i-lucide-wrench","\u002Fdocs\u002Fbuild\u002Fapplication-behavior\u002Fdevtools",{"title":418,"id":419,"canonicalKey":420,"locale":8,"draft":6,"navigation":421,"icon":422,"path":423},"Performance","content:docs:3.build:6.application-behavior:5.performance.md","3\u002F6\u002F5",{"icon":422},"i-lucide-chart-no-axes-combined","\u002Fdocs\u002Fbuild\u002Fapplication-behavior\u002Fperformance",{"title":425,"id":426,"canonicalKey":427,"locale":8,"draft":6,"navigation":428,"icon":429,"path":430},"Start the client on demand","content:docs:3.build:6.application-behavior:6.on-demand-client.md","3\u002F6\u002F6",{"icon":429},"i-lucide-power","\u002Fdocs\u002Fbuild\u002Fapplication-behavior\u002Fon-demand-client",{"title":432,"page":6,"canonicalKey":433,"locale":8,"id":434,"draft":6,"icon":270,"children":435},"Agents and MCP","3\u002F7","content:docs:3.build:7.agents:.navigation.yml",[436,442,449,456,463,469,475],{"title":437,"id":438,"canonicalKey":439,"locale":8,"draft":6,"navigation":440,"icon":415,"path":441},"Tools and approvals","content:docs:3.build:7.agents:1.tools-and-approvals.md","3\u002F7\u002F1",{"icon":415},"\u002Fdocs\u002Fbuild\u002Fagents\u002Ftools-and-approvals",{"title":443,"id":444,"canonicalKey":445,"locale":8,"draft":6,"navigation":446,"icon":447,"path":448},"The MCP door","content:docs:3.build:7.agents:2.mcp-door.md","3\u002F7\u002F2",{"icon":447},"i-lucide-door-open","\u002Fdocs\u002Fbuild\u002Fagents\u002Fmcp-door",{"title":450,"id":451,"canonicalKey":452,"locale":8,"draft":6,"navigation":453,"icon":454,"path":455},"Limits","content:docs:3.build:7.agents:3.limits.md","3\u002F7\u002F3",{"icon":454},"i-lucide-traffic-cone","\u002Fdocs\u002Fbuild\u002Fagents\u002Flimits",{"title":457,"id":458,"canonicalKey":459,"locale":8,"draft":6,"navigation":460,"icon":461,"path":462},"MCP on Convex","content:docs:3.build:7.agents:4.mcp.md","3\u002F7\u002F4",{"icon":461},"i-lucide-plug-zap","\u002Fdocs\u002Fbuild\u002Fagents\u002Fmcp",{"title":464,"id":465,"canonicalKey":466,"locale":8,"draft":6,"navigation":467,"icon":249,"path":468},"Add MCP to your application","content:docs:3.build:7.agents:5.mcp-application.md","3\u002F7\u002F5",{"icon":249},"\u002Fdocs\u002Fbuild\u002Fagents\u002Fmcp-application",{"title":470,"id":471,"canonicalKey":472,"locale":8,"draft":6,"navigation":473,"icon":369,"path":474},"Connect ChatGPT and Claude","content:docs:3.build:7.agents:6.connect-chatgpt-and-claude.md","3\u002F7\u002F6",{"icon":369},"\u002Fdocs\u002Fbuild\u002Fagents\u002Fconnect-chatgpt-and-claude",{"title":476,"id":477,"canonicalKey":478,"locale":8,"draft":6,"navigation":479,"icon":108,"path":480},"MCP Apps","content:docs:3.build:7.agents:7.mcp-apps.md","3\u002F7\u002F7",{"icon":108},"\u002Fdocs\u002Fbuild\u002Fagents\u002Fmcp-apps",{"title":482,"page":6,"canonicalKey":483,"locale":8,"id":484,"draft":6,"icon":485,"children":486},"Operations and policy","3\u002F8","content:docs:3.build:8.functions:.navigation.yml","i-lucide-shield-half",[487,494,500,507,514,521,527,534],{"title":488,"id":489,"canonicalKey":490,"locale":8,"draft":6,"navigation":491,"icon":492,"path":493},"Start here","content:docs:3.build:8.functions:1.start-here.md","3\u002F8\u002F1",{"icon":492},"i-lucide-flag","\u002Fdocs\u002Fbuild\u002Ffunctions\u002Fstart-here",{"title":495,"id":496,"canonicalKey":497,"locale":8,"draft":6,"navigation":498,"icon":39,"path":499},"Policy and roles","content:docs:3.build:8.functions:2.policy-and-roles.md","3\u002F8\u002F2",{"icon":39},"\u002Fdocs\u002Fbuild\u002Ffunctions\u002Fpolicy-and-roles",{"title":501,"id":502,"canonicalKey":503,"locale":8,"draft":6,"navigation":504,"icon":505,"path":506},"Row rules","content:docs:3.build:8.functions:3.row-rules.md","3\u002F8\u002F3",{"icon":505},"i-lucide-rows-3","\u002Fdocs\u002Fbuild\u002Ffunctions\u002Frow-rules",{"title":508,"id":509,"canonicalKey":510,"locale":8,"draft":6,"navigation":511,"icon":512,"path":513},"Internal operations","content:docs:3.build:8.functions:4.internal-operations.md","3\u002F8\u002F4",{"icon":512},"i-lucide-workflow","\u002Fdocs\u002Fbuild\u002Ffunctions\u002Finternal-operations",{"title":515,"id":516,"canonicalKey":517,"locale":8,"draft":6,"navigation":518,"icon":519,"path":520},"Test your app","content:docs:3.build:8.functions:5.testing.md","3\u002F8\u002F5",{"icon":519},"i-lucide-flask-conical","\u002Fdocs\u002Fbuild\u002Ffunctions\u002Ftesting",{"title":522,"id":523,"canonicalKey":524,"locale":8,"draft":6,"navigation":525,"icon":177,"path":526},"Cost","content:docs:3.build:8.functions:6.cost.md","3\u002F8\u002F6",{"icon":177},"\u002Fdocs\u002Fbuild\u002Ffunctions\u002Fcost",{"title":528,"id":529,"canonicalKey":530,"locale":8,"draft":6,"navigation":531,"icon":532,"path":533},"Threat model","content:docs:3.build:8.functions:7.threat-model.md","3\u002F8\u002F7",{"icon":532},"i-lucide-shield-alert","\u002Fdocs\u002Fbuild\u002Ffunctions\u002Fthreat-model",{"title":535,"id":536,"canonicalKey":537,"locale":8,"draft":6,"navigation":538,"icon":408,"path":539},"Rate limits, audit log and call events","content:docs:3.build:8.functions:8.limits-and-audit.md","3\u002F8\u002F8",{"icon":408},"\u002Fdocs\u002Fbuild\u002Ffunctions\u002Flimits-and-audit",{"title":541,"page":6,"canonicalKey":542,"locale":8,"id":543,"draft":6,"icon":544,"children":545},"Recipes","4","content:docs:4.recipes:.navigation.yml","i-lucide-cooking-pot",[546,553,560,567,574,581,587,593,599,605,612,619,626,633,638],{"title":547,"id":548,"canonicalKey":549,"locale":8,"draft":6,"navigation":550,"icon":551,"path":552},"Protected dashboard","content:docs:4.recipes:1.protected-dashboard.md","4\u002F1",{"icon":551},"i-lucide-layout-dashboard","\u002Fdocs\u002Frecipes\u002Fprotected-dashboard",{"title":554,"id":555,"canonicalKey":556,"locale":8,"draft":6,"navigation":557,"icon":558,"path":559},"Real-time feed","content:docs:4.recipes:2.realtime-feed.md","4\u002F2",{"icon":558},"i-lucide-messages-square","\u002Fdocs\u002Frecipes\u002Frealtime-feed",{"title":561,"id":562,"canonicalKey":563,"locale":8,"draft":6,"navigation":564,"icon":565,"path":566},"Optimistic todo list","content:docs:4.recipes:3.optimistic-todo-list.md","4\u002F3",{"icon":565},"i-lucide-list-todo","\u002Fdocs\u002Frecipes\u002Foptimistic-todo-list",{"title":568,"id":569,"canonicalKey":570,"locale":8,"draft":6,"navigation":571,"icon":572,"path":573},"Infinite scroll","content:docs:4.recipes:4.infinite-scroll.md","4\u002F4",{"icon":572},"i-lucide-mouse","\u002Fdocs\u002Frecipes\u002Finfinite-scroll",{"title":575,"id":576,"canonicalKey":577,"locale":8,"draft":6,"navigation":578,"icon":579,"path":580},"File upload form","content:docs:4.recipes:5.file-upload-form.md","4\u002F5",{"icon":579},"i-lucide-file-up","\u002Fdocs\u002Frecipes\u002Ffile-upload-form",{"title":582,"id":583,"canonicalKey":584,"locale":8,"draft":6,"navigation":585,"icon":319,"path":586},"Organization permissions","content:docs:4.recipes:6.organization-permissions.md","4\u002F6",{"icon":319},"\u002Fdocs\u002Frecipes\u002Forganization-permissions",{"title":588,"id":589,"canonicalKey":590,"locale":8,"draft":6,"navigation":591,"icon":330,"path":592},"Authenticated server route","content:docs:4.recipes:7.authenticated-server-route.md","4\u002F7",{"icon":330},"\u002Fdocs\u002Frecipes\u002Fauthenticated-server-route",{"title":594,"id":595,"canonicalKey":596,"locale":8,"draft":6,"navigation":597,"icon":108,"path":598},"Public and private data","content:docs:4.recipes:8.public-and-private-data.md","4\u002F8",{"icon":108},"\u002Fdocs\u002Frecipes\u002Fpublic-and-private-data",{"title":600,"id":601,"canonicalKey":602,"locale":8,"draft":6,"navigation":603,"icon":519,"path":604},"Test signed-in screens","content:docs:4.recipes:9.component-testing.md","4\u002F9",{"icon":519},"\u002Fdocs\u002Frecipes\u002Fcomponent-testing",{"title":606,"id":607,"canonicalKey":608,"locale":8,"draft":6,"navigation":609,"icon":610,"path":611},"Time-based data","content:docs:4.recipes:10.time-based-data.md","4\u002F10",{"icon":610},"i-lucide-clock","\u002Fdocs\u002Frecipes\u002Ftime-based-data",{"title":613,"id":614,"canonicalKey":615,"locale":8,"draft":6,"navigation":616,"icon":617,"path":618},"A list of queries","content:docs:4.recipes:11.dynamic-query-list.md","4\u002F11",{"icon":617},"i-lucide-list-tree","\u002Fdocs\u002Frecipes\u002Fdynamic-query-list",{"title":620,"id":621,"canonicalKey":622,"locale":8,"draft":6,"navigation":623,"icon":624,"path":625},"Error messages","content:docs:4.recipes:12.error-messages.md","4\u002F12",{"icon":624},"i-lucide-message-circle-warning","\u002Fdocs\u002Frecipes\u002Ferror-messages",{"title":627,"id":628,"canonicalKey":629,"locale":8,"draft":6,"navigation":630,"icon":631,"path":632},"Several file uploads","content:docs:4.recipes:13.multiple-file-uploads.md","4\u002F13",{"icon":631},"i-lucide-files","\u002Fdocs\u002Frecipes\u002Fmultiple-file-uploads",{"title":634,"id":635,"canonicalKey":636,"locale":8,"draft":6,"path":637},"Guest users","content:docs:4.recipes:15.guest-users.md","4\u002F15","\u002Fdocs\u002Frecipes\u002Fguest-users",{"title":639,"id":640,"canonicalKey":641,"locale":8,"draft":6,"path":642},"Sign-in link","content:docs:4.recipes:16.sign-in-link.md","4\u002F16","\u002Fdocs\u002Frecipes\u002Fsign-in-link",{"title":644,"page":6,"canonicalKey":645,"locale":8,"id":646,"draft":6,"icon":647,"children":648},"Concepts","5","content:docs:5.concepts:.navigation.yml","i-lucide-brain",[649,655,661,668,674,681,687,694,701],{"title":650,"id":651,"canonicalKey":652,"locale":8,"draft":6,"navigation":653,"icon":647,"path":654},"Mental model","content:docs:5.concepts:1.mental-model.md","5\u002F1",{"icon":647},"\u002Fdocs\u002Fconcepts\u002Fmental-model",{"title":656,"id":657,"canonicalKey":658,"locale":8,"draft":6,"navigation":659,"icon":235,"path":660},"Request lifecycle","content:docs:5.concepts:2.request-lifecycle.md","5\u002F2",{"icon":235},"\u002Fdocs\u002Fconcepts\u002Frequest-lifecycle",{"title":662,"id":663,"canonicalKey":664,"locale":8,"draft":6,"navigation":665,"icon":666,"path":667},"SSR, hydration, and real-time","content:docs:5.concepts:3.ssr-hydration-realtime.md","5\u002F3",{"icon":666},"i-lucide-refresh-cw","\u002Fdocs\u002Fconcepts\u002Fssr-hydration-realtime",{"title":669,"id":670,"canonicalKey":671,"locale":8,"draft":6,"navigation":672,"icon":124,"path":673},"Query state and caching","content:docs:5.concepts:4.query-ownership-and-caching.md","5\u002F4",{"icon":124},"\u002Fdocs\u002Fconcepts\u002Fquery-ownership-and-caching",{"title":675,"id":676,"canonicalKey":677,"locale":8,"draft":6,"navigation":678,"icon":679,"path":680},"Authentication and identity","content:docs:5.concepts:5.authentication-and-identity.md","5\u002F5",{"icon":679},"i-lucide-fingerprint","\u002Fdocs\u002Fconcepts\u002Fauthentication-and-identity",{"title":682,"id":683,"canonicalKey":684,"locale":8,"draft":6,"navigation":685,"icon":108,"path":686},"Server and client boundaries","content:docs:5.concepts:6.server-and-client-boundaries.md","5\u002F6",{"icon":108},"\u002Fdocs\u002Fconcepts\u002Fserver-and-client-boundaries",{"title":688,"id":689,"canonicalKey":690,"locale":8,"draft":6,"navigation":691,"icon":692,"path":693},"Errors and failures","content:docs:5.concepts:7.errors-and-failures.md","5\u002F7",{"icon":692},"i-lucide-circle-x","\u002Fdocs\u002Fconcepts\u002Ferrors-and-failures",{"title":695,"id":696,"canonicalKey":697,"locale":8,"draft":6,"navigation":698,"icon":699,"path":700},"Design decisions","content:docs:5.concepts:8.design-decisions.md","5\u002F8",{"icon":699},"i-lucide-git-branch","\u002Fdocs\u002Fconcepts\u002Fdesign-decisions",{"title":702,"id":703,"canonicalKey":704,"locale":8,"draft":6,"navigation":705,"icon":706,"path":707},"Glossary","content:docs:5.concepts:9.glossary.md","5\u002F9",{"icon":706},"i-lucide-book-a","\u002Fdocs\u002Fconcepts\u002Fglossary",{"title":709,"page":6,"canonicalKey":710,"locale":8,"id":711,"draft":6,"icon":215,"children":712},"Operations","6","content:docs:6.operations:.navigation.yml",[713,719,726,733,739,746,752,759,765],{"title":714,"id":715,"canonicalKey":716,"locale":8,"draft":6,"navigation":717,"icon":45,"path":718},"Deployment","content:docs:6.operations:1.deployment.md","6\u002F1",{"icon":45},"\u002Fdocs\u002Foperations\u002Fdeployment",{"title":720,"id":721,"canonicalKey":722,"locale":8,"draft":6,"navigation":723,"icon":724,"path":725},"Environment variables","content:docs:6.operations:2.environment-variables.md","6\u002F2",{"icon":724},"i-lucide-variable","\u002Fdocs\u002Foperations\u002Fenvironment-variables",{"title":727,"id":728,"canonicalKey":729,"locale":8,"draft":6,"navigation":730,"icon":731,"path":732},"Deploy to Vercel","content:docs:6.operations:3.deploy-to-vercel.md","6\u002F3",{"icon":731},"i-lucide-triangle","\u002Fdocs\u002Foperations\u002Fdeploy-to-vercel",{"title":734,"id":735,"canonicalKey":736,"locale":8,"draft":6,"navigation":737,"icon":415,"path":738},"Troubleshooting","content:docs:6.operations:4.troubleshooting.md","6\u002F4",{"icon":415},"\u002Fdocs\u002Foperations\u002Ftroubleshooting",{"title":740,"id":741,"canonicalKey":742,"locale":8,"draft":6,"navigation":743,"icon":744,"path":745},"Release compatibility","content:docs:6.operations:5.release-compatibility.md","6\u002F5",{"icon":744},"i-lucide-badge-check","\u002Fdocs\u002Foperations\u002Frelease-compatibility",{"title":747,"id":748,"canonicalKey":749,"locale":8,"draft":6,"navigation":750,"icon":87,"path":751},"Security model","content:docs:6.operations:6.security-model.md","6\u002F6",{"icon":87},"\u002Fdocs\u002Foperations\u002Fsecurity-model",{"title":753,"id":754,"canonicalKey":755,"locale":8,"draft":6,"navigation":756,"icon":757,"path":758},"Upgrade to 1.0","content:docs:6.operations:7.upgrade-to-1-0.md","6\u002F7",{"icon":757},"i-lucide-arrow-up-circle","\u002Fdocs\u002Foperations\u002Fupgrade-to-1-0",{"title":760,"id":761,"canonicalKey":762,"locale":8,"draft":6,"navigation":763,"icon":45,"path":764},"Before your app goes live","content:docs:6.operations:8.before-launch.md","6\u002F8",{"icon":45},"\u002Fdocs\u002Foperations\u002Fbefore-launch",{"title":766,"id":767,"canonicalKey":768,"locale":8,"draft":6,"navigation":769,"icon":770,"path":771},"Log streams and PostHog","content:docs:6.operations:9.log-streams.md","6\u002F9",{"icon":770},"i-lucide-activity","\u002Fdocs\u002Foperations\u002Flog-streams",{"title":773,"page":6,"canonicalKey":774,"locale":8,"id":775,"draft":6,"icon":776,"children":777},"Reference","7","content:docs:7.reference:.navigation.yml","i-lucide-braces",[778,784,790,796,803,810,817,823,830],{"title":779,"id":780,"canonicalKey":781,"locale":8,"draft":6,"navigation":782,"icon":776,"path":783},"Composables","content:docs:7.reference:1.composables.md","7\u002F1",{"icon":776},"\u002Fdocs\u002Freference\u002Fcomposables",{"title":785,"id":786,"canonicalKey":787,"locale":8,"draft":6,"navigation":788,"icon":330,"path":789},"Server API","content:docs:7.reference:3.server-api.md","7\u002F3",{"icon":330},"\u002Fdocs\u002Freference\u002Fserver-api",{"title":791,"id":792,"canonicalKey":793,"locale":8,"draft":6,"navigation":794,"icon":692,"path":795},"Error types","content:docs:7.reference:4.error-types.md","7\u002F4",{"icon":692},"\u002Fdocs\u002Freference\u002Ferror-types",{"title":797,"id":798,"canonicalKey":799,"locale":8,"draft":6,"navigation":800,"icon":801,"path":802},"Module configuration","content:docs:7.reference:5.module-configuration.md","7\u002F5",{"icon":801},"i-lucide-settings","\u002Fdocs\u002Freference\u002Fmodule-configuration",{"title":804,"id":805,"canonicalKey":806,"locale":8,"draft":6,"navigation":807,"icon":808,"path":809},"Package exports","content:docs:7.reference:6.package-exports.md","7\u002F6",{"icon":808},"i-lucide-package-open","\u002Fdocs\u002Freference\u002Fpackage-exports",{"title":811,"id":812,"canonicalKey":813,"locale":8,"draft":6,"navigation":814,"icon":815,"path":816},"API reference","content:docs:7.reference:7.api-surface.md","7\u002F7",{"icon":815},"i-lucide-list","\u002Fdocs\u002Freference\u002Fapi-surface",{"title":818,"id":819,"canonicalKey":820,"locale":8,"draft":6,"navigation":821,"icon":519,"path":822},"Experimental APIs","content:docs:7.reference:8.experimental.md","7\u002F8",{"icon":519},"\u002Fdocs\u002Freference\u002Fexperimental",{"title":824,"id":825,"canonicalKey":826,"locale":8,"draft":6,"navigation":827,"icon":828,"path":829},"Command line","content:docs:7.reference:9.cli.md","7\u002F9",{"icon":828},"i-lucide-terminal","\u002Fdocs\u002Freference\u002Fcli",{"title":831,"id":832,"canonicalKey":833,"locale":8,"draft":6,"navigation":834,"icon":835,"path":836},"Operation error codes","content:docs:7.reference:10.operation-error-codes.md","7\u002F10",{"icon":835},"i-lucide-octagon-alert","\u002Fdocs\u002Freference\u002Foperation-error-codes",{"title":838,"id":839,"canonicalKey":840,"locale":8,"draft":6,"path":841},"Better Convex documentation","content:docs:index.md","\u002F","\u002Fdocs",{"title":437,"description":843,"navigation":844,"body":845,"type":3811,"id":438,"canonicalKey":439,"draft":6,"partial":6,"locale":8,"collection":3812,"navigationFile":6,"file":3813,"route":3818,"resolution":3820},"Turn operations into tools for agents, hold risky actions for a person, and show what agents did.",{"icon":415},{"type":846,"children":847,"toc":3796},"root",[848,884,890,897,936,1039,1051,1138,1144,1150,1161,1633,1676,1687,1693,1712,1844,1897,1915,1922,1940,3012,3079,3085,3094,3148,3195,3212,3218,3230,3241,3305,3310,3320,3377,3394,3400,3410,3452,3475,3480,3498,3619,3770],{"type":849,"tag":850,"props":851,"children":852},"element","p",{},[853,860,862,867,869,875,877,882],{"type":849,"tag":854,"props":855,"children":856},"code",{},[857],{"type":858,"value":859},"text","@lupinum\u002Fbetter-convex-agents",{"type":858,"value":861}," turns operations from\n",{"type":849,"tag":854,"props":863,"children":864},{},[865],{"type":858,"value":866},"@lupinum\u002Fbetter-convex-functions",{"type":858,"value":868}," into tools. A tool call runs the same\noperation as the web, with the same policy and row rules, as an ",{"type":849,"tag":870,"props":871,"children":872},"strong",{},[873],{"type":858,"value":874},"agent",{"type":858,"value":876},": the\nAI host or in-app assistant that acts for one person, within the scopes that\nperson granted. Start with ",{"type":849,"tag":878,"props":879,"children":880},"a",{"href":493},[881],{"type":858,"value":488},{"type":858,"value":883}," if\nyou have no operations yet.",{"type":849,"tag":885,"props":886,"children":887},"note",{},[888],{"type":858,"value":889},"In-app agent runs are experimental in 0.1: their API may change in a minor release. The MCP door, tools and approvals are stable.",{"type":849,"tag":891,"props":892,"children":894},"h2",{"id":893},"give-an-operation-a-tool",[895],{"type":858,"value":896},"Give an operation a tool",{"type":849,"tag":850,"props":898,"children":899},{},[900,902,907,909,914,916,921,923,927,929,934],{"type":858,"value":901},"Add a ",{"type":849,"tag":854,"props":903,"children":904},{},[905],{"type":858,"value":906},"tool",{"type":858,"value":908}," field to a query or mutation, as ",{"type":849,"tag":854,"props":910,"children":911},{},[912],{"type":858,"value":913},"list",{"type":858,"value":915}," and ",{"type":849,"tag":854,"props":917,"children":918},{},[919],{"type":858,"value":920},"archive",{"type":858,"value":922}," in\n",{"type":849,"tag":878,"props":924,"children":925},{"href":493},[926],{"type":858,"value":488},{"type":858,"value":928}," do:\n",{"type":849,"tag":854,"props":930,"children":931},{},[932],{"type":858,"value":933},"tool: { name, description, args }",{"type":858,"value":935},".",{"type":849,"tag":937,"props":938,"children":939},"table",{},[940,959],{"type":849,"tag":941,"props":942,"children":943},"thead",{},[944],{"type":849,"tag":945,"props":946,"children":947},"tr",{},[948,954],{"type":849,"tag":949,"props":950,"children":951},"th",{},[952],{"type":858,"value":953},"Field",{"type":849,"tag":949,"props":955,"children":956},{},[957],{"type":858,"value":958},"Rule",{"type":849,"tag":960,"props":961,"children":962},"tbody",{},[963,1007,1023],{"type":849,"tag":945,"props":964,"children":965},{},[966,975],{"type":849,"tag":967,"props":968,"children":969},"td",{},[970],{"type":849,"tag":854,"props":971,"children":972},{},[973],{"type":858,"value":974},"name",{"type":849,"tag":967,"props":976,"children":977},{},[978,980,985,987,992,994,999,1000,1005],{"type":858,"value":979},"1 to 64 letters, digits, ",{"type":849,"tag":854,"props":981,"children":982},{},[983],{"type":858,"value":984},"_",{"type":858,"value":986}," or ",{"type":849,"tag":854,"props":988,"children":989},{},[990],{"type":858,"value":991},"-",{"type":858,"value":993},". Unique. ",{"type":849,"tag":854,"props":995,"children":996},{},[997],{"type":858,"value":998},"check_approval",{"type":858,"value":915},{"type":849,"tag":854,"props":1001,"children":1002},{},[1003],{"type":858,"value":1004},"housekeeping",{"type":858,"value":1006}," are taken",{"type":849,"tag":945,"props":1008,"children":1009},{},[1010,1018],{"type":849,"tag":967,"props":1011,"children":1012},{},[1013],{"type":849,"tag":854,"props":1014,"children":1015},{},[1016],{"type":858,"value":1017},"description",{"type":849,"tag":967,"props":1019,"children":1020},{},[1021],{"type":858,"value":1022},"What the tool does, for the model. Say which other tool gives the IDs it needs",{"type":849,"tag":945,"props":1024,"children":1025},{},[1026,1034],{"type":849,"tag":967,"props":1027,"children":1028},{},[1029],{"type":849,"tag":854,"props":1030,"children":1031},{},[1032],{"type":858,"value":1033},"args",{"type":849,"tag":967,"props":1035,"children":1036},{},[1037],{"type":858,"value":1038},"Optional text for each argument. Convex validators carry no descriptions",{"type":849,"tag":850,"props":1040,"children":1041},{},[1042,1044,1049],{"type":858,"value":1043},"The tool's input schema comes from the operation's validators. The tool\nchecks every input against the same validators, and a wrong field fails with\n",{"type":849,"tag":854,"props":1045,"children":1046},{},[1047],{"type":858,"value":1048},"INVALID_INPUT",{"type":858,"value":1050}," and a message that names it.",{"type":849,"tag":1052,"props":1053,"children":1054},"ul",{},[1055,1102],{"type":849,"tag":1056,"props":1057,"children":1058},"li",{},[1059,1061,1066,1068,1073,1074,1079,1081,1086,1088,1093,1095,1101],{"type":858,"value":1060},"A query with ",{"type":849,"tag":854,"props":1062,"children":1063},{},[1064],{"type":858,"value":1065},"paginationOpts",{"type":858,"value":1067}," becomes a tool with ",{"type":849,"tag":854,"props":1069,"children":1070},{},[1071],{"type":858,"value":1072},"cursor",{"type":858,"value":915},{"type":849,"tag":854,"props":1075,"children":1076},{},[1077],{"type":858,"value":1078},"limit",{"type":858,"value":1080},"\n(1 to 100, 50 by default). Its ",{"type":849,"tag":854,"props":1082,"children":1083},{},[1084],{"type":858,"value":1085},"result",{"type":858,"value":1087}," is ",{"type":849,"tag":854,"props":1089,"children":1090},{},[1091],{"type":858,"value":1092},"{ items, next }",{"type":858,"value":1094},"; see\n",{"type":849,"tag":878,"props":1096,"children":1098},{"href":1097},"#what-a-tool-returns",[1099],{"type":858,"value":1100},"What a tool returns",{"type":858,"value":935},{"type":849,"tag":1056,"props":1103,"children":1104},{},[1105,1107,1112,1114,1118,1120,1124,1125,1129,1131,1136],{"type":858,"value":1106},"A mutation gets an optional ",{"type":849,"tag":854,"props":1108,"children":1109},{},[1110],{"type":858,"value":1111},"request_id",{"type":858,"value":1113},". A host that retries with the same\nvalue gets the first result back; the write runs once. A new value is a new\ncall: while the same call waits for a person, it joins that request, but\nafter the decision it asks again. Do not name an argument ",{"type":849,"tag":854,"props":1115,"children":1116},{},[1117],{"type":858,"value":1111},{"type":858,"value":1119},",\n",{"type":849,"tag":854,"props":1121,"children":1122},{},[1123],{"type":858,"value":1072},{"type":858,"value":986},{"type":849,"tag":854,"props":1126,"children":1127},{},[1128],{"type":858,"value":1078},{"type":858,"value":1130}," yourself; ",{"type":849,"tag":854,"props":1132,"children":1133},{},[1134],{"type":858,"value":1135},"defineTools",{"type":858,"value":1137}," refuses it.",{"type":849,"tag":1139,"props":1140,"children":1141},"warning",{},[1142],{"type":858,"value":1143},"Change a tool only by adding to it: a new argument is optional, and an old one\nkeeps its meaning. Hosts keep the tool list until they reconnect. For a\nbreaking change, add a tool with a new name and keep the old one until no host\nuses it.",{"type":849,"tag":891,"props":1145,"children":1147},{"id":1146},"collect-the-tools",[1148],{"type":858,"value":1149},"Collect the tools",{"type":849,"tag":850,"props":1151,"children":1152},{},[1153,1155,1159],{"type":858,"value":1154},"One module calls ",{"type":849,"tag":854,"props":1156,"children":1157},{},[1158],{"type":858,"value":1135},{"type":858,"value":1160}," with the operation modules, and exports one\ninternal function per tool under the tool's name. Logs and usage then name the\ntool.",{"type":849,"tag":1162,"props":1163,"children":1167},"pre",{"language":1164,"filename":1165,"class":1166},"ts","convex\u002Fagents.ts","shiki shiki-themes light-plus dark-plus dark:dark-plus",[1168],{"type":849,"tag":854,"props":1169,"children":1171},{"class":1170},"language-ts",[1172,1211,1213,1216,1217,1246,1247,1276,1277,1310,1311,1340,1341,1344,1345,1432,1433,1436,1437,1496,1497,1514,1515,1518,1519,1528,1529,1595,1596,1604,1605],{"type":849,"tag":1173,"props":1174,"children":1177},"span",{"class":1175,"style":1176},"line","display: inline",[1178,1184,1190,1195,1200,1205],{"type":849,"tag":1173,"props":1179,"children":1181},{"style":1180},"color:#AF00DB;--shiki-dark:#C586C0",[1182],{"type":858,"value":1183},"import",{"type":849,"tag":1173,"props":1185,"children":1187},{"style":1186},"color:#000000;--shiki-dark:#D4D4D4",[1188],{"type":858,"value":1189}," { ",{"type":849,"tag":1173,"props":1191,"children":1193},{"style":1192},"color:#001080;--shiki-dark:#9CDCFE",[1194],{"type":858,"value":1135},{"type":849,"tag":1173,"props":1196,"children":1197},{"style":1186},[1198],{"type":858,"value":1199}," } ",{"type":849,"tag":1173,"props":1201,"children":1202},{"style":1180},[1203],{"type":858,"value":1204},"from",{"type":849,"tag":1173,"props":1206,"children":1208},{"style":1207},"color:#A31515;--shiki-dark:#CE9178",[1209],{"type":858,"value":1210}," '@lupinum\u002Fbetter-convex-agents'",{"type":858,"value":1212},"\n",{"type":849,"tag":1173,"props":1214,"children":1215},{"class":1175,"style":1176},[],{"type":858,"value":1212},{"type":849,"tag":1173,"props":1218,"children":1219},{"class":1175,"style":1176},[1220,1224,1228,1233,1237,1241],{"type":849,"tag":1173,"props":1221,"children":1222},{"style":1180},[1223],{"type":858,"value":1183},{"type":849,"tag":1173,"props":1225,"children":1226},{"style":1186},[1227],{"type":858,"value":1189},{"type":849,"tag":1173,"props":1229,"children":1230},{"style":1192},[1231],{"type":858,"value":1232},"internal",{"type":849,"tag":1173,"props":1234,"children":1235},{"style":1186},[1236],{"type":858,"value":1199},{"type":849,"tag":1173,"props":1238,"children":1239},{"style":1180},[1240],{"type":858,"value":1204},{"type":849,"tag":1173,"props":1242,"children":1243},{"style":1207},[1244],{"type":858,"value":1245}," '.\u002F_generated\u002Fapi'",{"type":858,"value":1212},{"type":849,"tag":1173,"props":1248,"children":1249},{"class":1175,"style":1176},[1250,1254,1258,1263,1267,1271],{"type":849,"tag":1173,"props":1251,"children":1252},{"style":1180},[1253],{"type":858,"value":1183},{"type":849,"tag":1173,"props":1255,"children":1256},{"style":1186},[1257],{"type":858,"value":1189},{"type":849,"tag":1173,"props":1259,"children":1260},{"style":1192},[1261],{"type":858,"value":1262},"fns",{"type":849,"tag":1173,"props":1264,"children":1265},{"style":1186},[1266],{"type":858,"value":1199},{"type":849,"tag":1173,"props":1268,"children":1269},{"style":1180},[1270],{"type":858,"value":1204},{"type":849,"tag":1173,"props":1272,"children":1273},{"style":1207},[1274],{"type":858,"value":1275}," '.\u002Ffunctions'",{"type":858,"value":1212},{"type":849,"tag":1173,"props":1278,"children":1279},{"class":1175,"style":1176},[1280,1284,1290,1295,1300,1305],{"type":849,"tag":1173,"props":1281,"children":1282},{"style":1180},[1283],{"type":858,"value":1183},{"type":849,"tag":1173,"props":1285,"children":1287},{"style":1286},"color:#0000FF;--shiki-dark:#569CD6",[1288],{"type":858,"value":1289}," *",{"type":849,"tag":1173,"props":1291,"children":1292},{"style":1180},[1293],{"type":858,"value":1294}," as",{"type":849,"tag":1173,"props":1296,"children":1297},{"style":1192},[1298],{"type":858,"value":1299}," pages",{"type":849,"tag":1173,"props":1301,"children":1302},{"style":1180},[1303],{"type":858,"value":1304}," from",{"type":849,"tag":1173,"props":1306,"children":1307},{"style":1207},[1308],{"type":858,"value":1309}," '.\u002Fpages'",{"type":858,"value":1212},{"type":849,"tag":1173,"props":1312,"children":1313},{"class":1175,"style":1176},[1314,1318,1322,1326,1331,1335],{"type":849,"tag":1173,"props":1315,"children":1316},{"style":1180},[1317],{"type":858,"value":1183},{"type":849,"tag":1173,"props":1319,"children":1320},{"style":1286},[1321],{"type":858,"value":1289},{"type":849,"tag":1173,"props":1323,"children":1324},{"style":1180},[1325],{"type":858,"value":1294},{"type":849,"tag":1173,"props":1327,"children":1328},{"style":1192},[1329],{"type":858,"value":1330}," projects",{"type":849,"tag":1173,"props":1332,"children":1333},{"style":1180},[1334],{"type":858,"value":1304},{"type":849,"tag":1173,"props":1336,"children":1337},{"style":1207},[1338],{"type":858,"value":1339}," '.\u002Fprojects'",{"type":858,"value":1212},{"type":849,"tag":1173,"props":1342,"children":1343},{"class":1175,"style":1176},[],{"type":858,"value":1212},{"type":849,"tag":1173,"props":1346,"children":1347},{"class":1175,"style":1176},[1348,1353,1358,1364,1369,1374,1379,1383,1388,1393,1398,1403,1408,1413,1418,1422,1427],{"type":849,"tag":1173,"props":1349,"children":1350},{"style":1180},[1351],{"type":858,"value":1352},"export",{"type":849,"tag":1173,"props":1354,"children":1355},{"style":1286},[1356],{"type":858,"value":1357}," const",{"type":849,"tag":1173,"props":1359,"children":1361},{"style":1360},"color:#0070C1;--shiki-dark:#4FC1FF",[1362],{"type":858,"value":1363}," tools",{"type":849,"tag":1173,"props":1365,"children":1366},{"style":1186},[1367],{"type":858,"value":1368}," = ",{"type":849,"tag":1173,"props":1370,"children":1372},{"style":1371},"color:#795E26;--shiki-dark:#DCDCAA",[1373],{"type":858,"value":1135},{"type":849,"tag":1173,"props":1375,"children":1376},{"style":1186},[1377],{"type":858,"value":1378},"(",{"type":849,"tag":1173,"props":1380,"children":1381},{"style":1192},[1382],{"type":858,"value":1262},{"type":849,"tag":1173,"props":1384,"children":1385},{"style":1186},[1386],{"type":858,"value":1387},", { ",{"type":849,"tag":1173,"props":1389,"children":1390},{"style":1192},[1391],{"type":858,"value":1392},"pages",{"type":849,"tag":1173,"props":1394,"children":1395},{"style":1186},[1396],{"type":858,"value":1397},", ",{"type":849,"tag":1173,"props":1399,"children":1400},{"style":1192},[1401],{"type":858,"value":1402},"projects",{"type":849,"tag":1173,"props":1404,"children":1405},{"style":1186},[1406],{"type":858,"value":1407}," }, { ",{"type":849,"tag":1173,"props":1409,"children":1410},{"style":1192},[1411],{"type":858,"value":1412},"functions:",{"type":849,"tag":1173,"props":1414,"children":1415},{"style":1192},[1416],{"type":858,"value":1417}," internal",{"type":849,"tag":1173,"props":1419,"children":1420},{"style":1186},[1421],{"type":858,"value":935},{"type":849,"tag":1173,"props":1423,"children":1424},{"style":1192},[1425],{"type":858,"value":1426},"agents",{"type":849,"tag":1173,"props":1428,"children":1429},{"style":1186},[1430],{"type":858,"value":1431}," })",{"type":858,"value":1212},{"type":849,"tag":1173,"props":1434,"children":1435},{"class":1175,"style":1176},[],{"type":858,"value":1212},{"type":849,"tag":1173,"props":1438,"children":1439},{"class":1175,"style":1176},[1440,1444,1448,1452,1457,1461,1466,1470,1475,1479,1483,1487,1491],{"type":849,"tag":1173,"props":1441,"children":1442},{"style":1180},[1443],{"type":858,"value":1352},{"type":849,"tag":1173,"props":1445,"children":1446},{"style":1286},[1447],{"type":858,"value":1357},{"type":849,"tag":1173,"props":1449,"children":1450},{"style":1186},[1451],{"type":858,"value":1189},{"type":849,"tag":1173,"props":1453,"children":1454},{"style":1360},[1455],{"type":858,"value":1456},"edit_page",{"type":849,"tag":1173,"props":1458,"children":1459},{"style":1186},[1460],{"type":858,"value":1397},{"type":849,"tag":1173,"props":1462,"children":1463},{"style":1360},[1464],{"type":858,"value":1465},"list_projects",{"type":849,"tag":1173,"props":1467,"children":1468},{"style":1186},[1469],{"type":858,"value":1397},{"type":849,"tag":1173,"props":1471,"children":1472},{"style":1360},[1473],{"type":858,"value":1474},"archive_project",{"type":849,"tag":1173,"props":1476,"children":1477},{"style":1186},[1478],{"type":858,"value":1397},{"type":849,"tag":1173,"props":1480,"children":1481},{"style":1360},[1482],{"type":858,"value":998},{"type":849,"tag":1173,"props":1484,"children":1485},{"style":1186},[1486],{"type":858,"value":1397},{"type":849,"tag":1173,"props":1488,"children":1489},{"style":1360},[1490],{"type":858,"value":1004},{"type":849,"tag":1173,"props":1492,"children":1493},{"style":1186},[1494],{"type":858,"value":1495}," } =",{"type":858,"value":1212},{"type":849,"tag":1173,"props":1498,"children":1499},{"class":1175,"style":1176},[1500,1505,1509],{"type":849,"tag":1173,"props":1501,"children":1502},{"style":1192},[1503],{"type":858,"value":1504},"  tools",{"type":849,"tag":1173,"props":1506,"children":1507},{"style":1186},[1508],{"type":858,"value":935},{"type":849,"tag":1173,"props":1510,"children":1511},{"style":1192},[1512],{"type":858,"value":1513},"functions",{"type":858,"value":1212},{"type":849,"tag":1173,"props":1516,"children":1517},{"class":1175,"style":1176},[],{"type":858,"value":1212},{"type":849,"tag":1173,"props":1520,"children":1521},{"class":1175,"style":1176},[1522],{"type":849,"tag":1173,"props":1523,"children":1525},{"style":1524},"color:#008000;--shiki-dark:#6A9955",[1526],{"type":858,"value":1527},"\u002F\u002F For the approval page: open requests, one request, and the decision.",{"type":858,"value":1212},{"type":849,"tag":1173,"props":1530,"children":1531},{"class":1175,"style":1176},[1532,1536,1540,1544,1549,1553,1558,1562,1567,1571,1576,1581,1586,1590],{"type":849,"tag":1173,"props":1533,"children":1534},{"style":1180},[1535],{"type":858,"value":1352},{"type":849,"tag":1173,"props":1537,"children":1538},{"style":1286},[1539],{"type":858,"value":1357},{"type":849,"tag":1173,"props":1541,"children":1542},{"style":1186},[1543],{"type":858,"value":1189},{"type":849,"tag":1173,"props":1545,"children":1546},{"style":1360},[1547],{"type":858,"value":1548},"pending",{"type":849,"tag":1173,"props":1550,"children":1551},{"style":1186},[1552],{"type":858,"value":1397},{"type":849,"tag":1173,"props":1554,"children":1555},{"style":1360},[1556],{"type":858,"value":1557},"get",{"type":849,"tag":1173,"props":1559,"children":1560},{"style":1186},[1561],{"type":858,"value":1397},{"type":849,"tag":1173,"props":1563,"children":1564},{"style":1360},[1565],{"type":858,"value":1566},"approve",{"type":849,"tag":1173,"props":1568,"children":1569},{"style":1186},[1570],{"type":858,"value":1397},{"type":849,"tag":1173,"props":1572,"children":1573},{"style":1360},[1574],{"type":858,"value":1575},"decline",{"type":849,"tag":1173,"props":1577,"children":1578},{"style":1186},[1579],{"type":858,"value":1580}," } = ",{"type":849,"tag":1173,"props":1582,"children":1583},{"style":1192},[1584],{"type":858,"value":1585},"tools",{"type":849,"tag":1173,"props":1587,"children":1588},{"style":1186},[1589],{"type":858,"value":935},{"type":849,"tag":1173,"props":1591,"children":1592},{"style":1192},[1593],{"type":858,"value":1594},"approvals",{"type":858,"value":1212},{"type":849,"tag":1173,"props":1597,"children":1598},{"class":1175,"style":1176},[1599],{"type":849,"tag":1173,"props":1600,"children":1601},{"style":1524},[1602],{"type":858,"value":1603},"\u002F\u002F What agents did, newest first.",{"type":858,"value":1212},{"type":849,"tag":1173,"props":1606,"children":1607},{"class":1175,"style":1176},[1608,1612,1616,1620,1625,1629],{"type":849,"tag":1173,"props":1609,"children":1610},{"style":1180},[1611],{"type":858,"value":1352},{"type":849,"tag":1173,"props":1613,"children":1614},{"style":1286},[1615],{"type":858,"value":1357},{"type":849,"tag":1173,"props":1617,"children":1618},{"style":1186},[1619],{"type":858,"value":1189},{"type":849,"tag":1173,"props":1621,"children":1622},{"style":1360},[1623],{"type":858,"value":1624},"activity",{"type":849,"tag":1173,"props":1626,"children":1627},{"style":1186},[1628],{"type":858,"value":1580},{"type":849,"tag":1173,"props":1630,"children":1631},{"style":1192},[1632],{"type":858,"value":1585},{"type":849,"tag":850,"props":1634,"children":1635},{},[1636,1640,1642,1647,1649,1654,1656,1660,1662,1668,1670,1674],{"type":849,"tag":854,"props":1637,"children":1638},{},[1639],{"type":858,"value":1513},{"type":858,"value":1641}," must be ",{"type":849,"tag":854,"props":1643,"children":1644},{},[1645],{"type":858,"value":1646},"internal.\u003Cthis module>",{"type":858,"value":1648},". When ",{"type":849,"tag":854,"props":1650,"children":1651},{},[1652],{"type":858,"value":1653},"createMcpServer",{"type":858,"value":1655}," loads, a\ntool that is not exported fails, with the missing names in the message. An\noperation in a module that you do not pass to ",{"type":849,"tag":854,"props":1657,"children":1658},{},[1659],{"type":858,"value":1135},{"type":858,"value":1661}," has no tool. The\n",{"type":849,"tag":878,"props":1663,"children":1665},{"href":1664},"\u002Fdocs\u002Fbuild\u002Ffunctions\u002Ftesting#launch-check",[1666],{"type":858,"value":1667},"launch check",{"type":858,"value":1669}," names each such\noperation that has a ",{"type":849,"tag":854,"props":1671,"children":1672},{},[1673],{"type":858,"value":906},{"type":858,"value":1675}," field.",{"type":849,"tag":850,"props":1677,"children":1678},{},[1679,1681,1685],{"type":858,"value":1680},"Every tool's action must be in at least one scope of the policy; ",{"type":849,"tag":854,"props":1682,"children":1683},{},[1684],{"type":858,"value":1135},{"type":858,"value":1686}," throws for a tool whose action is in none.",{"type":849,"tag":891,"props":1688,"children":1690},{"id":1689},"hold-an-action-for-a-person",[1691],{"type":858,"value":1692},"Hold an action for a person",{"type":849,"tag":850,"props":1694,"children":1695},{},[1696,1698,1703,1705,1710],{"type":858,"value":1697},"Set the agent rule of the action to ",{"type":849,"tag":854,"props":1699,"children":1700},{},[1701],{"type":858,"value":1702},"'approve'",{"type":858,"value":1704}," in the\n",{"type":849,"tag":878,"props":1706,"children":1707},{"href":499},[1708],{"type":858,"value":1709},"policy",{"type":858,"value":1711},". An agent that calls the tool\nthen gets this result instead of the effect:",{"type":849,"tag":1162,"props":1713,"children":1715},{"language":1714,"class":1166},"json",[1716],{"type":849,"tag":854,"props":1717,"children":1719},{"class":1718},"language-json",[1720,1728,1729,1753,1754,1775,1776,1817,1818,1835,1836],{"type":849,"tag":1173,"props":1721,"children":1722},{"class":1175,"style":1176},[1723],{"type":849,"tag":1173,"props":1724,"children":1725},{"style":1186},[1726],{"type":858,"value":1727},"{",{"type":858,"value":1212},{"type":849,"tag":1173,"props":1730,"children":1731},{"class":1175,"style":1176},[1732,1738,1743,1748],{"type":849,"tag":1173,"props":1733,"children":1735},{"style":1734},"color:#0451A5;--shiki-dark:#9CDCFE",[1736],{"type":858,"value":1737},"  \"status\"",{"type":849,"tag":1173,"props":1739,"children":1740},{"style":1186},[1741],{"type":858,"value":1742},": ",{"type":849,"tag":1173,"props":1744,"children":1745},{"style":1207},[1746],{"type":858,"value":1747},"\"needs_approval\"",{"type":849,"tag":1173,"props":1749,"children":1750},{"style":1186},[1751],{"type":858,"value":1752},",",{"type":858,"value":1212},{"type":849,"tag":1173,"props":1755,"children":1756},{"class":1175,"style":1176},[1757,1762,1766,1771],{"type":849,"tag":1173,"props":1758,"children":1759},{"style":1734},[1760],{"type":858,"value":1761},"  \"approvalId\"",{"type":849,"tag":1173,"props":1763,"children":1764},{"style":1186},[1765],{"type":858,"value":1742},{"type":849,"tag":1173,"props":1767,"children":1768},{"style":1207},[1769],{"type":858,"value":1770},"\"k57…\"",{"type":849,"tag":1173,"props":1772,"children":1773},{"style":1186},[1774],{"type":858,"value":1752},{"type":858,"value":1212},{"type":849,"tag":1173,"props":1777,"children":1778},{"class":1175,"style":1176},[1779,1784,1788,1793,1799,1804,1808,1813],{"type":849,"tag":1173,"props":1780,"children":1781},{"style":1734},[1782],{"type":858,"value":1783},"  \"summary\"",{"type":849,"tag":1173,"props":1785,"children":1786},{"style":1186},[1787],{"type":858,"value":1742},{"type":849,"tag":1173,"props":1789,"children":1790},{"style":1207},[1791],{"type":858,"value":1792},"\"Archive the project ",{"type":849,"tag":1173,"props":1794,"children":1796},{"style":1795},"color:#EE0000;--shiki-dark:#D7BA7D",[1797],{"type":858,"value":1798},"\\\"",{"type":849,"tag":1173,"props":1800,"children":1801},{"style":1207},[1802],{"type":858,"value":1803},"Website relaunch",{"type":849,"tag":1173,"props":1805,"children":1806},{"style":1795},[1807],{"type":858,"value":1798},{"type":849,"tag":1173,"props":1809,"children":1810},{"style":1207},[1811],{"type":858,"value":1812},".\"",{"type":849,"tag":1173,"props":1814,"children":1815},{"style":1186},[1816],{"type":858,"value":1752},{"type":858,"value":1212},{"type":849,"tag":1173,"props":1819,"children":1820},{"class":1175,"style":1176},[1821,1826,1830],{"type":849,"tag":1173,"props":1822,"children":1823},{"style":1734},[1824],{"type":858,"value":1825},"  \"url\"",{"type":849,"tag":1173,"props":1827,"children":1828},{"style":1186},[1829],{"type":858,"value":1742},{"type":849,"tag":1173,"props":1831,"children":1832},{"style":1207},[1833],{"type":858,"value":1834},"\"https:\u002F\u002Fapp.example.com\u002Fapprovals\u002Fk57…\"",{"type":858,"value":1212},{"type":849,"tag":1173,"props":1837,"children":1838},{"class":1175,"style":1176},[1839],{"type":849,"tag":1173,"props":1840,"children":1841},{"style":1186},[1842],{"type":858,"value":1843},"}",{"type":849,"tag":850,"props":1845,"children":1846},{},[1847,1849,1854,1856,1861,1863,1868,1869,1874,1876,1881,1883,1888,1890,1895],{"type":858,"value":1848},"The agent tells the person to open the link. Your approval page at\n",{"type":849,"tag":854,"props":1850,"children":1851},{},[1852],{"type":858,"value":1853},"\u002Fapprovals\u002F[id]",{"type":858,"value":1855}," reads the request with ",{"type":849,"tag":854,"props":1857,"children":1858},{},[1859],{"type":858,"value":1860},"api.agents.get",{"type":858,"value":1862}," and calls\n",{"type":849,"tag":854,"props":1864,"children":1865},{},[1866],{"type":858,"value":1867},"api.agents.approve",{"type":858,"value":986},{"type":849,"tag":854,"props":1870,"children":1871},{},[1872],{"type":858,"value":1873},"api.agents.decline",{"type":858,"value":1875},". ",{"type":849,"tag":854,"props":1877,"children":1878},{},[1879],{"type":858,"value":1880},"starters\u002Fmcp-oauth-agent",{"type":858,"value":1882}," has\nthe page in ",{"type":849,"tag":854,"props":1884,"children":1885},{},[1886],{"type":858,"value":1887},"app\u002Fpages\u002Fapprovals\u002F[id].vue",{"type":858,"value":1889},". Set ",{"type":849,"tag":854,"props":1891,"children":1892},{},[1893],{"type":858,"value":1894},"SITE_URL",{"type":858,"value":1896}," on the Convex\ndeployment: the link is built from it.",{"type":849,"tag":850,"props":1898,"children":1899},{},[1900,1902,1906,1908,1914],{"type":858,"value":1901},"Use ",{"type":849,"tag":854,"props":1903,"children":1904},{},[1905],{"type":858,"value":1702},{"type":858,"value":1907}," for every action that destroys, publishes, sends, spends or\nchanges who has access. See ",{"type":849,"tag":878,"props":1909,"children":1911},{"href":1910},"\u002Fdocs\u002Fbuild\u002Ffunctions\u002Fthreat-model#prompt-injection",[1912],{"type":858,"value":1913},"Prompt injection",{"type":858,"value":935},{"type":849,"tag":1916,"props":1917,"children":1919},"h3",{"id":1918},"hold-an-action-for-a-person-the-plan",[1920],{"type":858,"value":1921},"The plan",{"type":849,"tag":850,"props":1923,"children":1924},{},[1925,1927,1932,1934,1938],{"type":858,"value":1926},"A person approves a plan: a fixed list, not an instruction. Give the mutation a\n",{"type":849,"tag":854,"props":1928,"children":1929},{},[1930],{"type":858,"value":1931},"plan",{"type":858,"value":1933}," function, as ",{"type":849,"tag":854,"props":1935,"children":1936},{},[1937],{"type":858,"value":920},{"type":858,"value":1939}," in Start here does. It returns the sentence the\nperson reads and the existing rows the work will change:",{"type":849,"tag":1162,"props":1941,"children":1943},{"language":1164,"filename":1942,"class":1166},"convex\u002Fcleanup.ts",[1944],{"type":849,"tag":854,"props":1945,"children":1946},{"class":1170},[1947,1976,1977,1980,1981,2009,2010,2013,2014,2043,2044,2061,2062,2130,2131,2157,2158,2171,2172,2189,2190,2207,2208,2216,2217,2277,2278,2314,2315,2342,2343,2383,2384,2450,2451,2459,2460,2486,2487,2570,2571,2583,2584,2707,2708,2761,2762,2770,2771,2778,2779,2787,2788,2841,2842,2887,2888,2967,2968,2995,2996,3003,3004],{"type":849,"tag":1173,"props":1948,"children":1949},{"class":1175,"style":1176},[1950,1954,1958,1963,1967,1971],{"type":849,"tag":1173,"props":1951,"children":1952},{"style":1180},[1953],{"type":858,"value":1183},{"type":849,"tag":1173,"props":1955,"children":1956},{"style":1186},[1957],{"type":858,"value":1189},{"type":849,"tag":1173,"props":1959,"children":1960},{"style":1192},[1961],{"type":858,"value":1962},"v",{"type":849,"tag":1173,"props":1964,"children":1965},{"style":1186},[1966],{"type":858,"value":1199},{"type":849,"tag":1173,"props":1968,"children":1969},{"style":1180},[1970],{"type":858,"value":1204},{"type":849,"tag":1173,"props":1972,"children":1973},{"style":1207},[1974],{"type":858,"value":1975}," 'convex\u002Fvalues'",{"type":858,"value":1212},{"type":849,"tag":1173,"props":1978,"children":1979},{"class":1175,"style":1176},[],{"type":858,"value":1212},{"type":849,"tag":1173,"props":1982,"children":1983},{"class":1175,"style":1176},[1984,1988,1992,1997,2001,2005],{"type":849,"tag":1173,"props":1985,"children":1986},{"style":1180},[1987],{"type":858,"value":1183},{"type":849,"tag":1173,"props":1989,"children":1990},{"style":1186},[1991],{"type":858,"value":1189},{"type":849,"tag":1173,"props":1993,"children":1994},{"style":1192},[1995],{"type":858,"value":1996},"mutation",{"type":849,"tag":1173,"props":1998,"children":1999},{"style":1186},[2000],{"type":858,"value":1199},{"type":849,"tag":1173,"props":2002,"children":2003},{"style":1180},[2004],{"type":858,"value":1204},{"type":849,"tag":1173,"props":2006,"children":2007},{"style":1207},[2008],{"type":858,"value":1275},{"type":858,"value":1212},{"type":849,"tag":1173,"props":2011,"children":2012},{"class":1175,"style":1176},[],{"type":858,"value":1212},{"type":849,"tag":1173,"props":2015,"children":2016},{"class":1175,"style":1176},[2017,2021,2025,2030,2034,2038],{"type":849,"tag":1173,"props":2018,"children":2019},{"style":1180},[2020],{"type":858,"value":1352},{"type":849,"tag":1173,"props":2022,"children":2023},{"style":1286},[2024],{"type":858,"value":1357},{"type":849,"tag":1173,"props":2026,"children":2027},{"style":1360},[2028],{"type":858,"value":2029}," archiveMatching",{"type":849,"tag":1173,"props":2031,"children":2032},{"style":1186},[2033],{"type":858,"value":1368},{"type":849,"tag":1173,"props":2035,"children":2036},{"style":1371},[2037],{"type":858,"value":1996},{"type":849,"tag":1173,"props":2039,"children":2040},{"style":1186},[2041],{"type":858,"value":2042},"({",{"type":858,"value":1212},{"type":849,"tag":1173,"props":2045,"children":2046},{"class":1175,"style":1176},[2047,2052,2057],{"type":849,"tag":1173,"props":2048,"children":2049},{"style":1192},[2050],{"type":858,"value":2051},"  action:",{"type":849,"tag":1173,"props":2053,"children":2054},{"style":1207},[2055],{"type":858,"value":2056}," 'projects.archive'",{"type":849,"tag":1173,"props":2058,"children":2059},{"style":1186},[2060],{"type":858,"value":1752},{"type":858,"value":1212},{"type":849,"tag":1173,"props":2063,"children":2064},{"class":1175,"style":1176},[2065,2070,2074,2079,2084,2088,2093,2097,2102,2107,2112,2116,2120,2125],{"type":849,"tag":1173,"props":2066,"children":2067},{"style":1192},[2068],{"type":858,"value":2069},"  args:",{"type":849,"tag":1173,"props":2071,"children":2072},{"style":1186},[2073],{"type":858,"value":1189},{"type":849,"tag":1173,"props":2075,"children":2076},{"style":1192},[2077],{"type":858,"value":2078},"organizationId:",{"type":849,"tag":1173,"props":2080,"children":2081},{"style":1192},[2082],{"type":858,"value":2083}," v",{"type":849,"tag":1173,"props":2085,"children":2086},{"style":1186},[2087],{"type":858,"value":935},{"type":849,"tag":1173,"props":2089,"children":2090},{"style":1371},[2091],{"type":858,"value":2092},"id",{"type":849,"tag":1173,"props":2094,"children":2095},{"style":1186},[2096],{"type":858,"value":1378},{"type":849,"tag":1173,"props":2098,"children":2099},{"style":1207},[2100],{"type":858,"value":2101},"'organizations'",{"type":849,"tag":1173,"props":2103,"children":2104},{"style":1186},[2105],{"type":858,"value":2106},"), ",{"type":849,"tag":1173,"props":2108,"children":2109},{"style":1192},[2110],{"type":858,"value":2111},"prefix:",{"type":849,"tag":1173,"props":2113,"children":2114},{"style":1192},[2115],{"type":858,"value":2083},{"type":849,"tag":1173,"props":2117,"children":2118},{"style":1186},[2119],{"type":858,"value":935},{"type":849,"tag":1173,"props":2121,"children":2122},{"style":1371},[2123],{"type":858,"value":2124},"string",{"type":849,"tag":1173,"props":2126,"children":2127},{"style":1186},[2128],{"type":858,"value":2129},"() },",{"type":858,"value":1212},{"type":849,"tag":1173,"props":2132,"children":2133},{"class":1175,"style":1176},[2134,2139,2143,2147,2152],{"type":849,"tag":1173,"props":2135,"children":2136},{"style":1192},[2137],{"type":858,"value":2138},"  returns:",{"type":849,"tag":1173,"props":2140,"children":2141},{"style":1192},[2142],{"type":858,"value":2083},{"type":849,"tag":1173,"props":2144,"children":2145},{"style":1186},[2146],{"type":858,"value":935},{"type":849,"tag":1173,"props":2148,"children":2149},{"style":1371},[2150],{"type":858,"value":2151},"number",{"type":849,"tag":1173,"props":2153,"children":2154},{"style":1186},[2155],{"type":858,"value":2156},"(),",{"type":858,"value":1212},{"type":849,"tag":1173,"props":2159,"children":2160},{"class":1175,"style":1176},[2161,2166],{"type":849,"tag":1173,"props":2162,"children":2163},{"style":1192},[2164],{"type":858,"value":2165},"  tool:",{"type":849,"tag":1173,"props":2167,"children":2168},{"style":1186},[2169],{"type":858,"value":2170}," {",{"type":858,"value":1212},{"type":849,"tag":1173,"props":2173,"children":2174},{"class":1175,"style":1176},[2175,2180,2185],{"type":849,"tag":1173,"props":2176,"children":2177},{"style":1192},[2178],{"type":858,"value":2179},"    name:",{"type":849,"tag":1173,"props":2181,"children":2182},{"style":1207},[2183],{"type":858,"value":2184}," 'archive_matching'",{"type":849,"tag":1173,"props":2186,"children":2187},{"style":1186},[2188],{"type":858,"value":1752},{"type":858,"value":1212},{"type":849,"tag":1173,"props":2191,"children":2192},{"class":1175,"style":1176},[2193,2198,2203],{"type":849,"tag":1173,"props":2194,"children":2195},{"style":1192},[2196],{"type":858,"value":2197},"    description:",{"type":849,"tag":1173,"props":2199,"children":2200},{"style":1207},[2201],{"type":858,"value":2202}," 'Archive the active projects whose name starts so.'",{"type":849,"tag":1173,"props":2204,"children":2205},{"style":1186},[2206],{"type":858,"value":1752},{"type":858,"value":1212},{"type":849,"tag":1173,"props":2209,"children":2210},{"class":1175,"style":1176},[2211],{"type":849,"tag":1173,"props":2212,"children":2213},{"style":1186},[2214],{"type":858,"value":2215},"  },",{"type":858,"value":1212},{"type":849,"tag":1173,"props":2218,"children":2219},{"class":1175,"style":1176},[2220,2225,2230,2235,2240,2245,2249,2254,2258,2263,2268,2273],{"type":849,"tag":1173,"props":2221,"children":2222},{"style":1371},[2223],{"type":858,"value":2224},"  plan",{"type":849,"tag":1173,"props":2226,"children":2227},{"style":1192},[2228],{"type":858,"value":2229},":",{"type":849,"tag":1173,"props":2231,"children":2232},{"style":1286},[2233],{"type":858,"value":2234}," async",{"type":849,"tag":1173,"props":2236,"children":2237},{"style":1186},[2238],{"type":858,"value":2239}," (",{"type":849,"tag":1173,"props":2241,"children":2242},{"style":1192},[2243],{"type":858,"value":2244},"ctx",{"type":849,"tag":1173,"props":2246,"children":2247},{"style":1186},[2248],{"type":858,"value":1387},{"type":849,"tag":1173,"props":2250,"children":2251},{"style":1192},[2252],{"type":858,"value":2253},"organizationId",{"type":849,"tag":1173,"props":2255,"children":2256},{"style":1186},[2257],{"type":858,"value":1397},{"type":849,"tag":1173,"props":2259,"children":2260},{"style":1192},[2261],{"type":858,"value":2262},"prefix",{"type":849,"tag":1173,"props":2264,"children":2265},{"style":1186},[2266],{"type":858,"value":2267}," }) ",{"type":849,"tag":1173,"props":2269,"children":2270},{"style":1286},[2271],{"type":858,"value":2272},"=>",{"type":849,"tag":1173,"props":2274,"children":2275},{"style":1186},[2276],{"type":858,"value":2170},{"type":858,"value":1212},{"type":849,"tag":1173,"props":2279,"children":2280},{"class":1175,"style":1176},[2281,2286,2291,2295,2300,2305,2309],{"type":849,"tag":1173,"props":2282,"children":2283},{"style":1286},[2284],{"type":858,"value":2285},"    const",{"type":849,"tag":1173,"props":2287,"children":2288},{"style":1360},[2289],{"type":858,"value":2290}," active",{"type":849,"tag":1173,"props":2292,"children":2293},{"style":1186},[2294],{"type":858,"value":1368},{"type":849,"tag":1173,"props":2296,"children":2297},{"style":1180},[2298],{"type":858,"value":2299},"await",{"type":849,"tag":1173,"props":2301,"children":2302},{"style":1192},[2303],{"type":858,"value":2304}," ctx",{"type":849,"tag":1173,"props":2306,"children":2307},{"style":1186},[2308],{"type":858,"value":935},{"type":849,"tag":1173,"props":2310,"children":2311},{"style":1192},[2312],{"type":858,"value":2313},"db",{"type":858,"value":1212},{"type":849,"tag":1173,"props":2316,"children":2317},{"class":1175,"style":1176},[2318,2323,2328,2332,2337],{"type":849,"tag":1173,"props":2319,"children":2320},{"style":1186},[2321],{"type":858,"value":2322},"      .",{"type":849,"tag":1173,"props":2324,"children":2325},{"style":1371},[2326],{"type":858,"value":2327},"query",{"type":849,"tag":1173,"props":2329,"children":2330},{"style":1186},[2331],{"type":858,"value":1378},{"type":849,"tag":1173,"props":2333,"children":2334},{"style":1207},[2335],{"type":858,"value":2336},"'projects'",{"type":849,"tag":1173,"props":2338,"children":2339},{"style":1186},[2340],{"type":858,"value":2341},")",{"type":858,"value":1212},{"type":849,"tag":1173,"props":2344,"children":2345},{"class":1175,"style":1176},[2346,2350,2355,2359,2364,2369,2374,2379],{"type":849,"tag":1173,"props":2347,"children":2348},{"style":1186},[2349],{"type":858,"value":2322},{"type":849,"tag":1173,"props":2351,"children":2352},{"style":1371},[2353],{"type":858,"value":2354},"withIndex",{"type":849,"tag":1173,"props":2356,"children":2357},{"style":1186},[2358],{"type":858,"value":1378},{"type":849,"tag":1173,"props":2360,"children":2361},{"style":1207},[2362],{"type":858,"value":2363},"'by_org_status'",{"type":849,"tag":1173,"props":2365,"children":2366},{"style":1186},[2367],{"type":858,"value":2368},", (",{"type":849,"tag":1173,"props":2370,"children":2371},{"style":1192},[2372],{"type":858,"value":2373},"q",{"type":849,"tag":1173,"props":2375,"children":2376},{"style":1186},[2377],{"type":858,"value":2378},") ",{"type":849,"tag":1173,"props":2380,"children":2381},{"style":1286},[2382],{"type":858,"value":2272},{"type":858,"value":1212},{"type":849,"tag":1173,"props":2385,"children":2386},{"class":1175,"style":1176},[2387,2392,2396,2401,2405,2410,2414,2418,2423,2427,2431,2436,2440,2445],{"type":849,"tag":1173,"props":2388,"children":2389},{"style":1192},[2390],{"type":858,"value":2391},"        q",{"type":849,"tag":1173,"props":2393,"children":2394},{"style":1186},[2395],{"type":858,"value":935},{"type":849,"tag":1173,"props":2397,"children":2398},{"style":1371},[2399],{"type":858,"value":2400},"eq",{"type":849,"tag":1173,"props":2402,"children":2403},{"style":1186},[2404],{"type":858,"value":1378},{"type":849,"tag":1173,"props":2406,"children":2407},{"style":1207},[2408],{"type":858,"value":2409},"'organizationId'",{"type":849,"tag":1173,"props":2411,"children":2412},{"style":1186},[2413],{"type":858,"value":1397},{"type":849,"tag":1173,"props":2415,"children":2416},{"style":1192},[2417],{"type":858,"value":2253},{"type":849,"tag":1173,"props":2419,"children":2420},{"style":1186},[2421],{"type":858,"value":2422},").",{"type":849,"tag":1173,"props":2424,"children":2425},{"style":1371},[2426],{"type":858,"value":2400},{"type":849,"tag":1173,"props":2428,"children":2429},{"style":1186},[2430],{"type":858,"value":1378},{"type":849,"tag":1173,"props":2432,"children":2433},{"style":1207},[2434],{"type":858,"value":2435},"'status'",{"type":849,"tag":1173,"props":2437,"children":2438},{"style":1186},[2439],{"type":858,"value":1397},{"type":849,"tag":1173,"props":2441,"children":2442},{"style":1207},[2443],{"type":858,"value":2444},"'active'",{"type":849,"tag":1173,"props":2446,"children":2447},{"style":1186},[2448],{"type":858,"value":2449},"),",{"type":858,"value":1212},{"type":849,"tag":1173,"props":2452,"children":2453},{"class":1175,"style":1176},[2454],{"type":849,"tag":1173,"props":2455,"children":2456},{"style":1186},[2457],{"type":858,"value":2458},"      )",{"type":858,"value":1212},{"type":849,"tag":1173,"props":2461,"children":2462},{"class":1175,"style":1176},[2463,2467,2472,2476,2482],{"type":849,"tag":1173,"props":2464,"children":2465},{"style":1186},[2466],{"type":858,"value":2322},{"type":849,"tag":1173,"props":2468,"children":2469},{"style":1371},[2470],{"type":858,"value":2471},"take",{"type":849,"tag":1173,"props":2473,"children":2474},{"style":1186},[2475],{"type":858,"value":1378},{"type":849,"tag":1173,"props":2477,"children":2479},{"style":2478},"color:#098658;--shiki-dark:#B5CEA8",[2480],{"type":858,"value":2481},"50",{"type":849,"tag":1173,"props":2483,"children":2484},{"style":1186},[2485],{"type":858,"value":2341},{"type":858,"value":1212},{"type":849,"tag":1173,"props":2488,"children":2489},{"class":1175,"style":1176},[2490,2494,2499,2503,2508,2512,2517,2522,2527,2531,2535,2540,2544,2548,2552,2557,2561,2565],{"type":849,"tag":1173,"props":2491,"children":2492},{"style":1286},[2493],{"type":858,"value":2285},{"type":849,"tag":1173,"props":2495,"children":2496},{"style":1360},[2497],{"type":858,"value":2498}," found",{"type":849,"tag":1173,"props":2500,"children":2501},{"style":1186},[2502],{"type":858,"value":1368},{"type":849,"tag":1173,"props":2504,"children":2505},{"style":1192},[2506],{"type":858,"value":2507},"active",{"type":849,"tag":1173,"props":2509,"children":2510},{"style":1186},[2511],{"type":858,"value":935},{"type":849,"tag":1173,"props":2513,"children":2514},{"style":1371},[2515],{"type":858,"value":2516},"filter",{"type":849,"tag":1173,"props":2518,"children":2519},{"style":1186},[2520],{"type":858,"value":2521},"((",{"type":849,"tag":1173,"props":2523,"children":2524},{"style":1192},[2525],{"type":858,"value":2526},"project",{"type":849,"tag":1173,"props":2528,"children":2529},{"style":1186},[2530],{"type":858,"value":2378},{"type":849,"tag":1173,"props":2532,"children":2533},{"style":1286},[2534],{"type":858,"value":2272},{"type":849,"tag":1173,"props":2536,"children":2537},{"style":1192},[2538],{"type":858,"value":2539}," project",{"type":849,"tag":1173,"props":2541,"children":2542},{"style":1186},[2543],{"type":858,"value":935},{"type":849,"tag":1173,"props":2545,"children":2546},{"style":1192},[2547],{"type":858,"value":974},{"type":849,"tag":1173,"props":2549,"children":2550},{"style":1186},[2551],{"type":858,"value":935},{"type":849,"tag":1173,"props":2553,"children":2554},{"style":1371},[2555],{"type":858,"value":2556},"startsWith",{"type":849,"tag":1173,"props":2558,"children":2559},{"style":1186},[2560],{"type":858,"value":1378},{"type":849,"tag":1173,"props":2562,"children":2563},{"style":1192},[2564],{"type":858,"value":2262},{"type":849,"tag":1173,"props":2566,"children":2567},{"style":1186},[2568],{"type":858,"value":2569},"))",{"type":858,"value":1212},{"type":849,"tag":1173,"props":2572,"children":2573},{"class":1175,"style":1176},[2574,2579],{"type":849,"tag":1173,"props":2575,"children":2576},{"style":1180},[2577],{"type":858,"value":2578},"    return",{"type":849,"tag":1173,"props":2580,"children":2581},{"style":1186},[2582],{"type":858,"value":2170},{"type":858,"value":1212},{"type":849,"tag":1173,"props":2585,"children":2586},{"class":1175,"style":1176},[2587,2592,2597,2602,2607,2612,2617,2621,2626,2630,2634,2638,2643,2647,2651,2655,2659,2664,2668,2672,2676,2681,2685,2690,2694,2698,2703],{"type":849,"tag":1173,"props":2588,"children":2589},{"style":1192},[2590],{"type":858,"value":2591},"      summary:",{"type":849,"tag":1173,"props":2593,"children":2594},{"style":1207},[2595],{"type":858,"value":2596}," `Archive ",{"type":849,"tag":1173,"props":2598,"children":2599},{"style":1286},[2600],{"type":858,"value":2601},"${",{"type":849,"tag":1173,"props":2603,"children":2604},{"style":1192},[2605],{"type":858,"value":2606},"found",{"type":849,"tag":1173,"props":2608,"children":2610},{"style":2609},"color:#000000FF;--shiki-dark:#D4D4D4",[2611],{"type":858,"value":935},{"type":849,"tag":1173,"props":2613,"children":2614},{"style":1192},[2615],{"type":858,"value":2616},"length",{"type":849,"tag":1173,"props":2618,"children":2619},{"style":1286},[2620],{"type":858,"value":1843},{"type":849,"tag":1173,"props":2622,"children":2623},{"style":1207},[2624],{"type":858,"value":2625}," projects: ",{"type":849,"tag":1173,"props":2627,"children":2628},{"style":1286},[2629],{"type":858,"value":2601},{"type":849,"tag":1173,"props":2631,"children":2632},{"style":1192},[2633],{"type":858,"value":2606},{"type":849,"tag":1173,"props":2635,"children":2636},{"style":2609},[2637],{"type":858,"value":935},{"type":849,"tag":1173,"props":2639,"children":2640},{"style":1371},[2641],{"type":858,"value":2642},"map",{"type":849,"tag":1173,"props":2644,"children":2645},{"style":2609},[2646],{"type":858,"value":2521},{"type":849,"tag":1173,"props":2648,"children":2649},{"style":1192},[2650],{"type":858,"value":850},{"type":849,"tag":1173,"props":2652,"children":2653},{"style":2609},[2654],{"type":858,"value":2378},{"type":849,"tag":1173,"props":2656,"children":2657},{"style":1286},[2658],{"type":858,"value":2272},{"type":849,"tag":1173,"props":2660,"children":2661},{"style":1192},[2662],{"type":858,"value":2663}," p",{"type":849,"tag":1173,"props":2665,"children":2666},{"style":2609},[2667],{"type":858,"value":935},{"type":849,"tag":1173,"props":2669,"children":2670},{"style":1192},[2671],{"type":858,"value":974},{"type":849,"tag":1173,"props":2673,"children":2674},{"style":2609},[2675],{"type":858,"value":2422},{"type":849,"tag":1173,"props":2677,"children":2678},{"style":1371},[2679],{"type":858,"value":2680},"join",{"type":849,"tag":1173,"props":2682,"children":2683},{"style":2609},[2684],{"type":858,"value":1378},{"type":849,"tag":1173,"props":2686,"children":2687},{"style":1207},[2688],{"type":858,"value":2689},"', '",{"type":849,"tag":1173,"props":2691,"children":2692},{"style":2609},[2693],{"type":858,"value":2341},{"type":849,"tag":1173,"props":2695,"children":2696},{"style":1286},[2697],{"type":858,"value":1843},{"type":849,"tag":1173,"props":2699,"children":2700},{"style":1207},[2701],{"type":858,"value":2702},".`",{"type":849,"tag":1173,"props":2704,"children":2705},{"style":1186},[2706],{"type":858,"value":1752},{"type":858,"value":1212},{"type":849,"tag":1173,"props":2709,"children":2710},{"class":1175,"style":1176},[2711,2716,2720,2724,2728,2732,2736,2740,2744,2748,2752,2757],{"type":849,"tag":1173,"props":2712,"children":2713},{"style":1192},[2714],{"type":858,"value":2715},"      rows:",{"type":849,"tag":1173,"props":2717,"children":2718},{"style":1192},[2719],{"type":858,"value":2498},{"type":849,"tag":1173,"props":2721,"children":2722},{"style":1186},[2723],{"type":858,"value":935},{"type":849,"tag":1173,"props":2725,"children":2726},{"style":1371},[2727],{"type":858,"value":2642},{"type":849,"tag":1173,"props":2729,"children":2730},{"style":1186},[2731],{"type":858,"value":2521},{"type":849,"tag":1173,"props":2733,"children":2734},{"style":1192},[2735],{"type":858,"value":850},{"type":849,"tag":1173,"props":2737,"children":2738},{"style":1186},[2739],{"type":858,"value":2378},{"type":849,"tag":1173,"props":2741,"children":2742},{"style":1286},[2743],{"type":858,"value":2272},{"type":849,"tag":1173,"props":2745,"children":2746},{"style":1192},[2747],{"type":858,"value":2663},{"type":849,"tag":1173,"props":2749,"children":2750},{"style":1186},[2751],{"type":858,"value":935},{"type":849,"tag":1173,"props":2753,"children":2754},{"style":1192},[2755],{"type":858,"value":2756},"_id",{"type":849,"tag":1173,"props":2758,"children":2759},{"style":1186},[2760],{"type":858,"value":2449},{"type":858,"value":1212},{"type":849,"tag":1173,"props":2763,"children":2764},{"class":1175,"style":1176},[2765],{"type":849,"tag":1173,"props":2766,"children":2767},{"style":1186},[2768],{"type":858,"value":2769},"    }",{"type":858,"value":1212},{"type":849,"tag":1173,"props":2772,"children":2773},{"class":1175,"style":1176},[2774],{"type":849,"tag":1173,"props":2775,"children":2776},{"style":1186},[2777],{"type":858,"value":2215},{"type":858,"value":1212},{"type":849,"tag":1173,"props":2780,"children":2781},{"class":1175,"style":1176},[2782],{"type":849,"tag":1173,"props":2783,"children":2784},{"style":1524},[2785],{"type":858,"value":2786},"  \u002F\u002F Works on the plan, not on a new search: a project that matches later is not touched.",{"type":858,"value":1212},{"type":849,"tag":1173,"props":2789,"children":2790},{"class":1175,"style":1176},[2791,2796,2800,2804,2808,2812,2816,2821,2825,2829,2833,2837],{"type":849,"tag":1173,"props":2792,"children":2793},{"style":1371},[2794],{"type":858,"value":2795},"  handler",{"type":849,"tag":1173,"props":2797,"children":2798},{"style":1192},[2799],{"type":858,"value":2229},{"type":849,"tag":1173,"props":2801,"children":2802},{"style":1286},[2803],{"type":858,"value":2234},{"type":849,"tag":1173,"props":2805,"children":2806},{"style":1186},[2807],{"type":858,"value":2239},{"type":849,"tag":1173,"props":2809,"children":2810},{"style":1192},[2811],{"type":858,"value":2244},{"type":849,"tag":1173,"props":2813,"children":2814},{"style":1186},[2815],{"type":858,"value":1397},{"type":849,"tag":1173,"props":2817,"children":2818},{"style":1192},[2819],{"type":858,"value":2820},"_args",{"type":849,"tag":1173,"props":2822,"children":2823},{"style":1186},[2824],{"type":858,"value":1397},{"type":849,"tag":1173,"props":2826,"children":2827},{"style":1192},[2828],{"type":858,"value":1931},{"type":849,"tag":1173,"props":2830,"children":2831},{"style":1186},[2832],{"type":858,"value":2378},{"type":849,"tag":1173,"props":2834,"children":2835},{"style":1286},[2836],{"type":858,"value":2272},{"type":849,"tag":1173,"props":2838,"children":2839},{"style":1186},[2840],{"type":858,"value":2170},{"type":858,"value":1212},{"type":849,"tag":1173,"props":2843,"children":2844},{"class":1175,"style":1176},[2845,2850,2854,2859,2864,2869,2874,2878,2883],{"type":849,"tag":1173,"props":2846,"children":2847},{"style":1180},[2848],{"type":858,"value":2849},"    for",{"type":849,"tag":1173,"props":2851,"children":2852},{"style":1186},[2853],{"type":858,"value":2239},{"type":849,"tag":1173,"props":2855,"children":2856},{"style":1286},[2857],{"type":858,"value":2858},"const",{"type":849,"tag":1173,"props":2860,"children":2861},{"style":1360},[2862],{"type":858,"value":2863}," id",{"type":849,"tag":1173,"props":2865,"children":2866},{"style":1286},[2867],{"type":858,"value":2868}," of",{"type":849,"tag":1173,"props":2870,"children":2871},{"style":1192},[2872],{"type":858,"value":2873}," plan",{"type":849,"tag":1173,"props":2875,"children":2876},{"style":1186},[2877],{"type":858,"value":935},{"type":849,"tag":1173,"props":2879,"children":2880},{"style":1192},[2881],{"type":858,"value":2882},"rows",{"type":849,"tag":1173,"props":2884,"children":2885},{"style":1186},[2886],{"type":858,"value":2341},{"type":858,"value":1212},{"type":849,"tag":1173,"props":2889,"children":2890},{"class":1175,"style":1176},[2891,2896,2900,2904,2908,2912,2917,2921,2925,2929,2934,2939,2943,2948,2953,2957,2962],{"type":849,"tag":1173,"props":2892,"children":2893},{"style":1180},[2894],{"type":858,"value":2895},"      await",{"type":849,"tag":1173,"props":2897,"children":2898},{"style":1192},[2899],{"type":858,"value":2304},{"type":849,"tag":1173,"props":2901,"children":2902},{"style":1186},[2903],{"type":858,"value":935},{"type":849,"tag":1173,"props":2905,"children":2906},{"style":1192},[2907],{"type":858,"value":2313},{"type":849,"tag":1173,"props":2909,"children":2910},{"style":1186},[2911],{"type":858,"value":935},{"type":849,"tag":1173,"props":2913,"children":2914},{"style":1371},[2915],{"type":858,"value":2916},"patch",{"type":849,"tag":1173,"props":2918,"children":2919},{"style":1186},[2920],{"type":858,"value":1378},{"type":849,"tag":1173,"props":2922,"children":2923},{"style":1192},[2924],{"type":858,"value":2092},{"type":849,"tag":1173,"props":2926,"children":2927},{"style":1186},[2928],{"type":858,"value":1387},{"type":849,"tag":1173,"props":2930,"children":2931},{"style":1192},[2932],{"type":858,"value":2933},"status:",{"type":849,"tag":1173,"props":2935,"children":2936},{"style":1207},[2937],{"type":858,"value":2938}," 'archived'",{"type":849,"tag":1173,"props":2940,"children":2941},{"style":1186},[2942],{"type":858,"value":1397},{"type":849,"tag":1173,"props":2944,"children":2945},{"style":1192},[2946],{"type":858,"value":2947},"archivedAt:",{"type":849,"tag":1173,"props":2949,"children":2950},{"style":1192},[2951],{"type":858,"value":2952}," Date",{"type":849,"tag":1173,"props":2954,"children":2955},{"style":1186},[2956],{"type":858,"value":935},{"type":849,"tag":1173,"props":2958,"children":2959},{"style":1371},[2960],{"type":858,"value":2961},"now",{"type":849,"tag":1173,"props":2963,"children":2964},{"style":1186},[2965],{"type":858,"value":2966},"() })",{"type":858,"value":1212},{"type":849,"tag":1173,"props":2969,"children":2970},{"class":1175,"style":1176},[2971,2975,2979,2983,2987,2991],{"type":849,"tag":1173,"props":2972,"children":2973},{"style":1180},[2974],{"type":858,"value":2578},{"type":849,"tag":1173,"props":2976,"children":2977},{"style":1192},[2978],{"type":858,"value":2873},{"type":849,"tag":1173,"props":2980,"children":2981},{"style":1186},[2982],{"type":858,"value":935},{"type":849,"tag":1173,"props":2984,"children":2985},{"style":1192},[2986],{"type":858,"value":2882},{"type":849,"tag":1173,"props":2988,"children":2989},{"style":1186},[2990],{"type":858,"value":935},{"type":849,"tag":1173,"props":2992,"children":2993},{"style":1192},[2994],{"type":858,"value":2616},{"type":858,"value":1212},{"type":849,"tag":1173,"props":2997,"children":2998},{"class":1175,"style":1176},[2999],{"type":849,"tag":1173,"props":3000,"children":3001},{"style":1186},[3002],{"type":858,"value":2215},{"type":858,"value":1212},{"type":849,"tag":1173,"props":3005,"children":3006},{"class":1175,"style":1176},[3007],{"type":849,"tag":1173,"props":3008,"children":3009},{"style":1186},[3010],{"type":858,"value":3011},"})",{"type":849,"tag":1052,"props":3013,"children":3014},{},[3015,3030,3047,3052,3070],{"type":849,"tag":1056,"props":3016,"children":3017},{},[3018,3022,3024,3028],{"type":849,"tag":854,"props":3019,"children":3020},{},[3021],{"type":858,"value":1931},{"type":858,"value":3023}," runs when the agent asks, before the request is stored. It reads\nonly, with the call's row rules. It cannot paginate (read a fixed list with\n",{"type":849,"tag":854,"props":3025,"children":3026},{},[3027],{"type":858,"value":2471},{"type":858,"value":3029},"), and its input is frozen.",{"type":849,"tag":1056,"props":3031,"children":3032},{},[3033,3035,3039,3041,3045],{"type":858,"value":3034},"Without ",{"type":849,"tag":854,"props":3036,"children":3037},{},[3038],{"type":858,"value":2882},{"type":858,"value":3040},", the work changes the rows the input names. Without ",{"type":849,"tag":854,"props":3042,"children":3043},{},[3044],{"type":858,"value":1931},{"type":858,"value":3046},",\nthe person reads the action and the input as JSON.",{"type":849,"tag":1056,"props":3048,"children":3049},{},[3050],{"type":858,"value":3051},"Put any other value the work needs into the plan too, such as a price the\nperson sees. The handler gets the plan exactly as it was stored.",{"type":849,"tag":1056,"props":3053,"children":3054},{},[3055,3057,3062,3064,3068],{"type":858,"value":3056},"A row the plan lists or the input names that the agent may not read fails\nthe call with ",{"type":849,"tag":854,"props":3058,"children":3059},{},[3060],{"type":858,"value":3061},"NOT_FOUND",{"type":858,"value":3063},", so it never reaches a person. Fail in ",{"type":849,"tag":854,"props":3065,"children":3066},{},[3067],{"type":858,"value":1931},{"type":858,"value":3069}," for\nwork that can never run.",{"type":849,"tag":1056,"props":3071,"children":3072},{},[3073,3077],{"type":849,"tag":854,"props":3074,"children":3075},{},[3076],{"type":858,"value":1931},{"type":858,"value":3078}," also runs, right before the handler, when a person calls the\noperation in the app, so the handler always has a plan.",{"type":849,"tag":1916,"props":3080,"children":3082},{"id":3081},"hold-an-action-for-a-person-approving",[3083],{"type":858,"value":3084},"Approving",{"type":849,"tag":850,"props":3086,"children":3087},{},[3088,3092],{"type":849,"tag":854,"props":3089,"children":3090},{},[3091],{"type":858,"value":1566},{"type":858,"value":3093}," runs the operation as the agent, in the same transaction, on the\nstored plan. It does not need the agent or its chat: the person may approve\nafter the agent has gone.",{"type":849,"tag":1052,"props":3095,"children":3096},{},[3097,3102,3114,3133,3138,3143],{"type":849,"tag":1056,"props":3098,"children":3099},{},[3100],{"type":858,"value":3101},"It checks the agent's grant again. A revoked connection cannot run.",{"type":849,"tag":1056,"props":3103,"children":3104},{},[3105,3107,3112],{"type":858,"value":3106},"It fails with ",{"type":849,"tag":854,"props":3108,"children":3109},{},[3110],{"type":858,"value":3111},"STALE",{"type":858,"value":3113}," when a row the plan lists or the input names changed\nor went away. Nothing is done. The same call is asked again at once, with\na summary of the data as it is now, and waits for a person as a new request.\nAsking again never runs the work, even when the agent rule now allows it;\nan in-app run that waited on the old request waits on the new one.",{"type":849,"tag":1056,"props":3115,"children":3116},{},[3117,3119,3124,3126,3131],{"type":858,"value":3118},"The work, and every internal operation or follow-up it starts, may change\nonly the plan's rows and rows it creates itself, cancel only jobs it\nscheduled itself, and delete only the files the plan lists in ",{"type":849,"tag":854,"props":3120,"children":3121},{},[3122],{"type":858,"value":3123},"files",{"type":858,"value":3125},".\nAnything else fails with ",{"type":849,"tag":854,"props":3127,"children":3128},{},[3129],{"type":858,"value":3130},"FORBIDDEN",{"type":858,"value":3132},", and nothing the work did is kept. An\ninternal action under an approval deletes files through an internal\nmutation: it cannot read the plan itself.",{"type":849,"tag":1056,"props":3134,"children":3135},{},[3136],{"type":858,"value":3137},"The limit guards against mistakes in your own code, such as a handler that\nlooks again and finds more. It is not a sandbox against code that tries to\nget around it on purpose. Calls to components (a rate limiter, a workpool,\na file component) are outside it: what they change is up to your code.",{"type":849,"tag":1056,"props":3139,"children":3140},{},[3141],{"type":858,"value":3142},"Work that turns out to need another row, such as a follow-up that finds its\ndestination later, cannot widen the approval. List the row in the plan, or\nlet the agent ask for that change as a new request.",{"type":849,"tag":1056,"props":3144,"children":3145},{},[3146],{"type":858,"value":3147},"Other failures are stored on the request with their code.",{"type":849,"tag":850,"props":3149,"children":3150},{},[3151,3155,3157,3162,3164,3169,3171,3175,3177,3182,3184,3188,3189,3194],{"type":849,"tag":854,"props":3152,"children":3153},{},[3154],{"type":858,"value":1566},{"type":858,"value":3156}," returns ",{"type":849,"tag":854,"props":3158,"children":3159},{},[3160],{"type":858,"value":3161},"{ status: 'approved' }",{"type":858,"value":3163},", or\n",{"type":849,"tag":854,"props":3165,"children":3166},{},[3167],{"type":858,"value":3168},"{ status: 'failed', error: { code, message } }",{"type":858,"value":3170}," when nothing was done. After\n",{"type":849,"tag":854,"props":3172,"children":3173},{},[3174],{"type":858,"value":3111},{"type":858,"value":3176}," it also returns ",{"type":849,"tag":854,"props":3178,"children":3179},{},[3180],{"type":858,"value":3181},"next",{"type":858,"value":3183},", the ID of the new request, so your approval\npage can open it. ",{"type":849,"tag":854,"props":3185,"children":3186},{},[3187],{"type":858,"value":1575},{"type":858,"value":3156},{"type":849,"tag":854,"props":3190,"children":3191},{},[3192],{"type":858,"value":3193},"null",{"type":858,"value":935},{"type":849,"tag":850,"props":3196,"children":3197},{},[3198,3200,3204,3206,3210],{"type":858,"value":3199},"The agent learns the outcome with the built-in ",{"type":849,"tag":854,"props":3201,"children":3202},{},[3203],{"type":858,"value":998},{"type":858,"value":3205}," tool, or by\ncalling the same tool again with the same ",{"type":849,"tag":854,"props":3207,"children":3208},{},[3209],{"type":858,"value":1111},{"type":858,"value":3211},". A request that nobody\ndecides expires after 30 minutes.",{"type":849,"tag":1916,"props":3213,"children":3215},{"id":3214},"hold-an-action-for-a-person-who-may-decide",[3216],{"type":858,"value":3217},"Who may decide",{"type":849,"tag":850,"props":3219,"children":3220},{},[3221,3223,3228],{"type":858,"value":3222},"The person the agent acts for may always decide. With\n",{"type":849,"tag":854,"props":3224,"children":3225},{},[3226],{"type":858,"value":3227},"approvers: { 'orders.cancel': ['owner'] }",{"type":858,"value":3229},", an owner of the request's tenant\nmay decide too. The request's tenant is the call's: the deepest tenant its\ninput names.",{"type":849,"tag":850,"props":3231,"children":3232},{},[3233,3235,3240],{"type":858,"value":3234},"A row that two tenants share can give the other tenant a say too, when the\naction asks for it with ",{"type":849,"tag":854,"props":3236,"children":3237},{},[3238],{"type":858,"value":3239},"sharedRows",{"type":858,"value":2229},{"type":849,"tag":1162,"props":3242,"children":3243},{"language":1164,"class":1166},[3244],{"type":849,"tag":854,"props":3245,"children":3246},{"class":1170},[3247],{"type":849,"tag":1173,"props":3248,"children":3249},{"class":1175,"style":1176},[3250,3256,3261,3266,3270,3275,3280,3285,3290,3295,3300],{"type":849,"tag":1173,"props":3251,"children":3253},{"style":3252},"color:#000000;--shiki-dark:#C8C8C8",[3254],{"type":858,"value":3255},"approvers",{"type":849,"tag":1173,"props":3257,"children":3258},{"style":1186},[3259],{"type":858,"value":3260},": { ",{"type":849,"tag":1173,"props":3262,"children":3263},{"style":1207},[3264],{"type":858,"value":3265},"'orders.cancel'",{"type":849,"tag":1173,"props":3267,"children":3268},{"style":1186},[3269],{"type":858,"value":3260},{"type":849,"tag":1173,"props":3271,"children":3272},{"style":1192},[3273],{"type":858,"value":3274},"roles:",{"type":849,"tag":1173,"props":3276,"children":3277},{"style":1186},[3278],{"type":858,"value":3279}," [",{"type":849,"tag":1173,"props":3281,"children":3282},{"style":1207},[3283],{"type":858,"value":3284},"'owner'",{"type":849,"tag":1173,"props":3286,"children":3287},{"style":1186},[3288],{"type":858,"value":3289},"], ",{"type":849,"tag":1173,"props":3291,"children":3292},{"style":1192},[3293],{"type":858,"value":3294},"sharedRows:",{"type":849,"tag":1173,"props":3296,"children":3297},{"style":1286},[3298],{"type":858,"value":3299}," true",{"type":849,"tag":1173,"props":3301,"children":3302},{"style":1186},[3303],{"type":858,"value":3304}," } },",{"type":849,"tag":850,"props":3306,"children":3307},{},[3308],{"type":858,"value":3309},"A buyer's agent cancels an order. The order names the buyer and the seller\norganization, so an owner of the seller may decide too. Only rows that the\ncall's input names and that the agent may change count. Rows that the call\nonly reads, such as a seller's public listing in a purchase, give their\ntenant no say, and neither does the row of the call's own tenant. When one\nsuch row does not belong to the other tenant, its approvers cannot decide.",{"type":849,"tag":850,"props":3311,"children":3312},{},[3313,3314,3318],{"type":858,"value":3034},{"type":849,"tag":854,"props":3315,"children":3316},{},[3317],{"type":858,"value":3239},{"type":858,"value":3319},", only roles in the call's own tenant count. Keep it that\nway unless the other party must agree: an approver of the other tenant may\ngain from what the agent asks for.",{"type":849,"tag":1052,"props":3321,"children":3322},{},[3323,3340,3372],{"type":849,"tag":1056,"props":3324,"children":3325},{},[3326,3331,3333,3338],{"type":849,"tag":854,"props":3327,"children":3328},{},[3329],{"type":858,"value":3330},"api.agents.pending({})",{"type":858,"value":3332}," lists the requests of the signed-in person's own\nagents. With ",{"type":849,"tag":854,"props":3334,"children":3335},{},[3336],{"type":858,"value":3337},"{ tenantId }",{"type":858,"value":3339},", it adds the requests of that tenant, and of rows\nit shares, that this person may decide as an approver.",{"type":849,"tag":1056,"props":3341,"children":3342},{},[3343,3347,3348,3352,3354,3358,3359,3363,3365,3370],{"type":849,"tag":854,"props":3344,"children":3345},{},[3346],{"type":858,"value":1860},{"type":858,"value":3156},{"type":849,"tag":854,"props":3349,"children":3350},{},[3351],{"type":858,"value":3193},{"type":858,"value":3353},", and ",{"type":849,"tag":854,"props":3355,"children":3356},{},[3357],{"type":858,"value":1566},{"type":858,"value":915},{"type":849,"tag":854,"props":3360,"children":3361},{},[3362],{"type":858,"value":1575},{"type":858,"value":3364}," fail with\n",{"type":849,"tag":854,"props":3366,"children":3367},{},[3368],{"type":858,"value":3369},"APPROVAL_NOT_FOUND",{"type":858,"value":3371},", for a person who may not decide.",{"type":849,"tag":1056,"props":3373,"children":3374},{},[3375],{"type":858,"value":3376},"A role in a tenant that the rows do not name does not count.",{"type":849,"tag":1139,"props":3378,"children":3379},{},[3380,3385,3387,3392],{"type":849,"tag":870,"props":3381,"children":3382},{},[3383],{"type":858,"value":3384},"Known limit:",{"type":858,"value":3386}," a parent tenant cannot list the pending requests of the\ntenants below it. A request belongs to the deepest tenant that its call names\n(a client, not the agency above it). To show the requests of the clients of an\nagency, call ",{"type":849,"tag":854,"props":3388,"children":3389},{},[3390],{"type":858,"value":3391},"pending({ tenantId })",{"type":858,"value":3393}," for each client.",{"type":849,"tag":891,"props":3395,"children":3397},{"id":3396},"the-activity-feed",[3398],{"type":858,"value":3399},"The activity feed",{"type":849,"tag":850,"props":3401,"children":3402},{},[3403,3405,3409],{"type":858,"value":3404},"Every agent write, approval decision and job run adds one row to ",{"type":849,"tag":854,"props":3406,"children":3407},{},[3408],{"type":858,"value":1624},{"type":858,"value":935},{"type":849,"tag":1052,"props":3411,"children":3412},{},[3413,3428],{"type":849,"tag":1056,"props":3414,"children":3415},{},[3416,3421,3423,3427],{"type":849,"tag":854,"props":3417,"children":3418},{},[3419],{"type":858,"value":3420},"api.agents.activity({ tenantId })",{"type":858,"value":3422}," lists a tenant's activity. Every member\nof the tenant may read it; anyone else gets ",{"type":849,"tag":854,"props":3424,"children":3425},{},[3426],{"type":858,"value":3061},{"type":858,"value":935},{"type":849,"tag":1056,"props":3429,"children":3430},{},[3431,3436,3438,3443,3445,3450],{"type":849,"tag":854,"props":3432,"children":3433},{},[3434],{"type":858,"value":3435},"api.agents.activity({})",{"type":858,"value":3437}," lists what the signed-in person's own agents did.\nA call without a tenant of its own (",{"type":849,"tag":854,"props":3439,"children":3440},{},[3441],{"type":858,"value":3442},"crossTenant",{"type":858,"value":3444},", or only rows of ",{"type":849,"tag":854,"props":3446,"children":3447},{},[3448],{"type":858,"value":3449},"anyOf",{"type":858,"value":3451},"\ntables) is only here, in no tenant's feed.",{"type":849,"tag":850,"props":3453,"children":3454},{},[3455,3457,3461,3463,3467,3469,3474],{"type":858,"value":3456},"Each row has the actor (person, agent, or system job), the action, the tool,\nthe status, and who decided an approval. ",{"type":849,"tag":854,"props":3458,"children":3459},{},[3460],{"type":858,"value":1078},{"type":858,"value":3462}," is 1 to 200, 50 by default.\n",{"type":849,"tag":854,"props":3464,"children":3465},{},[3466],{"type":858,"value":1004},{"type":858,"value":3468}," deletes activity after one year and decided requests after 90\ndays; see ",{"type":849,"tag":878,"props":3470,"children":3472},{"href":3471},"\u002Fdocs\u002Fbuild\u002Fagents\u002Fmcp-door#run-the-housekeeping",[3473],{"type":858,"value":443},{"type":858,"value":935},{"type":849,"tag":891,"props":3476,"children":3478},{"id":3477},"what-a-tool-returns",[3479],{"type":858,"value":1100},{"type":849,"tag":850,"props":3481,"children":3482},{},[3483,3485,3490,3492,3497],{"type":858,"value":3484},"The MCP door sends each result as the tool's ",{"type":849,"tag":854,"props":3486,"children":3487},{},[3488],{"type":858,"value":3489},"structuredContent",{"type":858,"value":3491},", and as JSON\ntext for models that read only text. A tool function that a test calls\ndirectly returns the same object; it throws instead of returning ",{"type":849,"tag":854,"props":3493,"children":3494},{},[3495],{"type":858,"value":3496},"error",{"type":858,"value":935},{"type":849,"tag":937,"props":3499,"children":3500},{},[3501,3517],{"type":849,"tag":941,"props":3502,"children":3503},{},[3504],{"type":849,"tag":945,"props":3505,"children":3506},{},[3507,3512],{"type":849,"tag":949,"props":3508,"children":3509},{},[3510],{"type":858,"value":3511},"Call",{"type":849,"tag":949,"props":3513,"children":3514},{},[3515],{"type":858,"value":3516},"Result",{"type":849,"tag":960,"props":3518,"children":3519},{},[3520,3536,3555,3571,3596],{"type":849,"tag":945,"props":3521,"children":3522},{},[3523,3528],{"type":849,"tag":967,"props":3524,"children":3525},{},[3526],{"type":858,"value":3527},"A query, or a write that runs",{"type":849,"tag":967,"props":3529,"children":3530},{},[3531],{"type":849,"tag":854,"props":3532,"children":3533},{},[3534],{"type":858,"value":3535},"{ status: 'done', result }",{"type":849,"tag":945,"props":3537,"children":3538},{},[3539,3547],{"type":849,"tag":967,"props":3540,"children":3541},{},[3542,3543],{"type":858,"value":1060},{"type":849,"tag":854,"props":3544,"children":3545},{},[3546],{"type":858,"value":1065},{"type":849,"tag":967,"props":3548,"children":3549},{},[3550],{"type":849,"tag":854,"props":3551,"children":3552},{},[3553],{"type":858,"value":3554},"{ status: 'done', result: { items, next } }",{"type":849,"tag":945,"props":3556,"children":3557},{},[3558,3563],{"type":849,"tag":967,"props":3559,"children":3560},{},[3561],{"type":858,"value":3562},"A write that waits for a person",{"type":849,"tag":967,"props":3564,"children":3565},{},[3566],{"type":849,"tag":854,"props":3567,"children":3568},{},[3569],{"type":858,"value":3570},"{ status: 'needs_approval', approvalId, summary, url }",{"type":849,"tag":945,"props":3572,"children":3573},{},[3574,3588],{"type":849,"tag":967,"props":3575,"children":3576},{},[3577,3581,3583],{"type":849,"tag":854,"props":3578,"children":3579},{},[3580],{"type":858,"value":998},{"type":858,"value":3582}," with ",{"type":849,"tag":854,"props":3584,"children":3585},{},[3586],{"type":858,"value":3587},"{ approvalId }",{"type":849,"tag":967,"props":3589,"children":3590},{},[3591],{"type":849,"tag":854,"props":3592,"children":3593},{},[3594],{"type":858,"value":3595},"{ status: 'done', result: { status, summary, result, error } }",{"type":849,"tag":945,"props":3597,"children":3598},{},[3599,3604],{"type":849,"tag":967,"props":3600,"children":3601},{},[3602],{"type":858,"value":3603},"A failure",{"type":849,"tag":967,"props":3605,"children":3606},{},[3607,3612,3614],{"type":849,"tag":854,"props":3608,"children":3609},{},[3610],{"type":858,"value":3611},"{ error: { code, message } }",{"type":858,"value":3613},", with ",{"type":849,"tag":854,"props":3615,"children":3616},{},[3617],{"type":858,"value":3618},"isError: true",{"type":849,"tag":1052,"props":3620,"children":3621},{},[3622,3643,3664,3694],{"type":849,"tag":1056,"props":3623,"children":3624},{},[3625,3629,3631,3635,3637,3642],{"type":849,"tag":854,"props":3626,"children":3627},{},[3628],{"type":858,"value":1085},{"type":858,"value":3630}," is what the operation returns. A retry with the same ",{"type":849,"tag":854,"props":3632,"children":3633},{},[3634],{"type":858,"value":1111},{"type":858,"value":3636},"\nreturns the stored result; one larger than 64 KiB comes back as\n",{"type":849,"tag":854,"props":3638,"children":3639},{},[3640],{"type":858,"value":3641},"{ truncated: true, bytes }",{"type":858,"value":935},{"type":849,"tag":1056,"props":3644,"children":3645},{},[3646,3650,3652,3656,3658,3662],{"type":849,"tag":854,"props":3647,"children":3648},{},[3649],{"type":858,"value":3181},{"type":858,"value":3651}," is the ",{"type":849,"tag":854,"props":3653,"children":3654},{},[3655],{"type":858,"value":1072},{"type":858,"value":3657}," for the next page, or ",{"type":849,"tag":854,"props":3659,"children":3660},{},[3661],{"type":858,"value":3193},{"type":858,"value":3663}," on the last page.",{"type":849,"tag":1056,"props":3665,"children":3666},{},[3667,3669,3674,3676,3681,3683,3687,3688,3693],{"type":858,"value":3668},"For ",{"type":849,"tag":854,"props":3670,"children":3671},{},[3672],{"type":858,"value":3673},"needs_approval",{"type":858,"value":3675},", the text tells the model to send the person to ",{"type":849,"tag":854,"props":3677,"children":3678},{},[3679],{"type":858,"value":3680},"url",{"type":858,"value":3682},"\nand then to call ",{"type":849,"tag":854,"props":3684,"children":3685},{},[3686],{"type":858,"value":998},{"type":858,"value":3582},{"type":849,"tag":854,"props":3689,"children":3690},{},[3691],{"type":858,"value":3692},"approvalId",{"type":858,"value":935},{"type":849,"tag":1056,"props":3695,"children":3696},{},[3697,3699,3703,3704,3709,3710,3714,3715,3720,3721,3726,3727,3732,3733,3738,3739,3744,3746,3750,3752,3756,3757,3762,3764,3768],{"type":858,"value":3698},"In ",{"type":849,"tag":854,"props":3700,"children":3701},{},[3702],{"type":858,"value":998},{"type":858,"value":1397},{"type":849,"tag":854,"props":3705,"children":3706},{},[3707],{"type":858,"value":3708},"status",{"type":858,"value":1087},{"type":849,"tag":854,"props":3711,"children":3712},{},[3713],{"type":858,"value":1548},{"type":858,"value":1397},{"type":849,"tag":854,"props":3716,"children":3717},{},[3718],{"type":858,"value":3719},"approved",{"type":858,"value":1397},{"type":849,"tag":854,"props":3722,"children":3723},{},[3724],{"type":858,"value":3725},"declined",{"type":858,"value":1397},{"type":849,"tag":854,"props":3728,"children":3729},{},[3730],{"type":858,"value":3731},"failed",{"type":858,"value":1119},{"type":849,"tag":854,"props":3734,"children":3735},{},[3736],{"type":858,"value":3737},"expired",{"type":858,"value":986},{"type":849,"tag":854,"props":3740,"children":3741},{},[3742],{"type":858,"value":3743},"cancelled",{"type":858,"value":3745}," (the host was disconnected). ",{"type":849,"tag":854,"props":3747,"children":3748},{},[3749],{"type":858,"value":1085},{"type":858,"value":3751}," is the\noperation's result after approval, and ",{"type":849,"tag":854,"props":3753,"children":3754},{},[3755],{"type":858,"value":3496},{"type":858,"value":1087},{"type":849,"tag":854,"props":3758,"children":3759},{},[3760],{"type":858,"value":3761},"{ code, message }",{"type":858,"value":3763}," after a\nfailure. Both are ",{"type":849,"tag":854,"props":3765,"children":3766},{},[3767],{"type":858,"value":3193},{"type":858,"value":3769}," otherwise. Only the connection that asked can check\na request.",{"type":849,"tag":850,"props":3771,"children":3772},{},[3773,3775,3780,3782,3787,3789,3794],{"type":858,"value":3774},"Known failures keep their code and message: everything from\n",{"type":849,"tag":854,"props":3776,"children":3777},{},[3778],{"type":858,"value":3779},"fail(code, message)",{"type":858,"value":3781}," and the library's own checks. Every other error becomes\n",{"type":849,"tag":854,"props":3783,"children":3784},{},[3785],{"type":858,"value":3786},"FAILED",{"type":858,"value":3788}," with a generic message, and the detail goes to the Convex log. The\n",{"type":849,"tag":878,"props":3790,"children":3791},{"href":836},[3792],{"type":858,"value":3793},"error code reference",{"type":858,"value":3795}," lists every\ncode.",{"title":3797,"searchDepth":3798,"depth":3798,"links":3799},"",4,[3800,3802,3803,3809,3810],{"id":893,"depth":3801,"text":896},2,{"id":1146,"depth":3801,"text":1149},{"id":1689,"depth":3801,"text":1692,"children":3804},[3805,3807,3808],{"id":1918,"depth":3806,"text":1921},3,{"id":3081,"depth":3806,"text":3084},{"id":3214,"depth":3806,"text":3217},{"id":3396,"depth":3801,"text":3399},{"id":3477,"depth":3801,"text":1100},"markdown","docs",{"source":3814,"path":3815,"stem":3816,"dir":1426,"extension":3817},"content","docs\u002F3.build\u002F7.agents\u002F1.tools-and-approvals.md","docs\u002F3.build\u002F7.agents\u002F1.tools-and-approvals","md",{"requestedPath":441,"resolvedPath":441,"alternates":3819},[],{"requested":3821,"resolved":3822,"usedFallback":6},{},{"locale":8},{"previous":3824,"next":3826},{"title":425,"id":426,"canonicalKey":427,"locale":8,"draft":6,"navigation":3825,"icon":429,"path":430},{"icon":429},{"title":443,"id":444,"canonicalKey":445,"locale":8,"draft":6,"navigation":3827,"icon":447,"path":448},{"icon":447},{"left":3829,"top":3829,"width":3830,"height":3830,"rotate":3829,"vFlip":6,"hFlip":6,"body":3831},0,24,"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2a2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1m8 0h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1\"\u002F>",{"left":3829,"top":3829,"width":3833,"height":3833,"rotate":3829,"vFlip":6,"hFlip":6,"body":3834},256,"\u003Cpath fill=\"#3178c6\" d=\"M20 0h216c11.046 0 20 8.954 20 20v216c0 11.046-8.954 20-20 20H20c-11.046 0-20-8.954-20-20V20C0 8.954 8.954 0 20 0\"\u002F>\u003Cpath fill=\"#fff\" d=\"M150.518 200.475v27.62q6.738 3.453 15.938 5.179T185.849 235q9.934 0 18.874-1.899t15.678-6.257q6.738-4.359 10.669-11.394q3.93-7.033 3.93-17.391q0-7.51-2.246-13.163a30.8 30.8 0 0 0-6.479-10.055q-4.232-4.402-10.149-7.898t-13.347-6.602q-5.442-2.245-9.761-4.359t-7.342-4.316q-3.024-2.2-4.665-4.661t-1.641-5.567q0-2.848 1.468-5.135q1.469-2.288 4.147-3.927t6.565-2.547q3.887-.906 8.638-.906q3.456 0 7.299.518q3.844.517 7.732 1.597a54 54 0 0 1 7.558 2.719a41.7 41.7 0 0 1 6.781 3.797v-25.807q-6.306-2.417-13.778-3.582T198.633 107q-9.847 0-18.658 2.115q-8.811 2.114-15.506 6.602q-6.694 4.49-10.582 11.437Q150 134.102 150 143.769q0 12.342 7.127 21.06t21.638 14.759a292 292 0 0 1 10.625 4.575q4.924 2.244 8.509 4.66t5.658 5.265t2.073 6.474a9.9 9.9 0 0 1-1.296 4.963q-1.295 2.287-3.93 3.97t-6.565 2.632t-9.2.95q-8.983 0-17.794-3.151t-16.327-9.451m-46.036-68.733H140V109H41v22.742h35.345V233h28.137z\"\u002F>",{"left":3829,"top":3829,"width":3830,"height":3830,"rotate":3829,"vFlip":6,"hFlip":6,"body":3836},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Crect width=\"8\" height=\"4\" x=\"8\" y=\"2\" rx=\"1\" ry=\"1\"\u002F>\u003Cpath d=\"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2\"\u002F>\u003C\u002Fg>",1794905502070]