[{"data":1,"prerenderedAt":377},["ShallowReactive",2],{"navigation_docs":3,"-guide-api-protect-endpoints":168,"-guide-api-protect-endpoints-surround":373},[4,146],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":36},"Guide","i-lucide-book-open","\u002Fguide","1.guide",[10,14,37,55,59,63,67,71,75,79,83,87,109,134,138,142],{"title":11,"path":12,"stem":13},"What is Agent Zero?","\u002Fguide\u002Fintroduction","1.guide\u002F1.introduction",{"title":15,"icon":16,"path":17,"stem":18,"children":19,"page":36},"API","i-lucide-plug","\u002Fguide\u002Fapi","1.guide\u002F10.api",[20,24,28,32],{"title":21,"path":22,"stem":23},"API overview","\u002Fguide\u002Fapi\u002Foverview","1.guide\u002F10.api\u002F1.overview",{"title":25,"path":26,"stem":27},"Define endpoints","\u002Fguide\u002Fapi\u002Fdefine-endpoints","1.guide\u002F10.api\u002F2.define-endpoints",{"title":29,"path":30,"stem":31},"Use the API from a client","\u002Fguide\u002Fapi\u002Fuse-from-client","1.guide\u002F10.api\u002F3.use-from-client",{"title":33,"path":34,"stem":35},"Protect endpoints","\u002Fguide\u002Fapi\u002Fprotect-endpoints","1.guide\u002F10.api\u002F4.protect-endpoints",false,{"title":38,"icon":39,"path":40,"stem":41,"children":42,"page":36},"Authentication","i-lucide-lock","\u002Fguide\u002Fauthentication","1.guide\u002F11.authentication",[43,47,51],{"title":44,"path":45,"stem":46},"Authentication overview","\u002Fguide\u002Fauthentication\u002Foverview","1.guide\u002F11.authentication\u002F1.overview",{"title":48,"path":49,"stem":50},"GitHub OAuth","\u002Fguide\u002Fauthentication\u002Foauth","1.guide\u002F11.authentication\u002F2.oauth",{"title":52,"path":53,"stem":54},"Permissions","\u002Fguide\u002Fauthentication\u002Fpermissions","1.guide\u002F11.authentication\u002F3.permissions",{"title":56,"path":57,"stem":58},"Organizations","\u002Fguide\u002Forganizations","1.guide\u002F12.organizations",{"title":60,"path":61,"stem":62},"Frontend","\u002Fguide\u002Ffrontend","1.guide\u002F13.frontend",{"title":64,"path":65,"stem":66},"Mails","\u002Fguide\u002Fmails","1.guide\u002F14.mails",{"title":68,"path":69,"stem":70},"Internationalization","\u002Fguide\u002Finternationalization","1.guide\u002F15.internationalization",{"title":72,"path":73,"stem":74},"Deployment","\u002Fguide\u002Fdeployment","1.guide\u002F16.deployment",{"title":76,"path":77,"stem":78},"Tech stack","\u002Fguide\u002Ftech-stack","1.guide\u002F2.tech-stack",{"title":80,"path":81,"stem":82},"Installation","\u002Fguide\u002Finstallation","1.guide\u002F3.installation",{"title":84,"path":85,"stem":86},"Environment variables","\u002Fguide\u002Fenvironment-variables","1.guide\u002F4.environment-variables",{"title":88,"icon":89,"path":90,"stem":91,"children":92,"page":36},"Codebase","i-lucide-folder-tree","\u002Fguide\u002Fcodebase","1.guide\u002F5.codebase",[93,97,101,105],{"title":94,"path":95,"stem":96},"Codebase structure","\u002Fguide\u002Fcodebase\u002Fstructure","1.guide\u002F5.codebase\u002F1.structure",{"title":98,"path":99,"stem":100},"Dependencies","\u002Fguide\u002Fcodebase\u002Fdependencies","1.guide\u002F5.codebase\u002F2.dependencies",{"title":102,"path":103,"stem":104},"Formatting and linting","\u002Fguide\u002Fcodebase\u002Fformatting-linting","1.guide\u002F5.codebase\u002F3.formatting-linting",{"title":106,"path":107,"stem":108},"Agent Skills","\u002Fguide\u002Fcodebase\u002Fagent-skills","1.guide\u002F5.codebase\u002F4.agent-skills",{"title":110,"icon":111,"path":112,"stem":113,"children":114,"page":36},"Architecture","i-lucide-layers","\u002Fguide\u002Farchitecture","1.guide\u002F6.architecture",[115,118,122,126,130],{"title":110,"path":116,"stem":117},"\u002Fguide\u002Farchitecture\u002Foverview","1.guide\u002F6.architecture\u002F1.overview",{"title":119,"path":120,"stem":121},"State machine","\u002Fguide\u002Farchitecture\u002Fstate-machine","1.guide\u002F6.architecture\u002F2.state-machine",{"title":123,"path":124,"stem":125},"Execution boundary","\u002Fguide\u002Farchitecture\u002Fexecution-boundary","1.guide\u002F6.architecture\u002F3.execution-boundary",{"title":127,"path":128,"stem":129},"Issue-to-PR workflow","\u002Fguide\u002Farchitecture\u002Fissue-to-pr","1.guide\u002F6.architecture\u002F4.issue-to-pr",{"title":131,"path":132,"stem":133},"Adding a capability","\u002Fguide\u002Farchitecture\u002Fadding-a-capability","1.guide\u002F6.architecture\u002F5.adding-a-capability",{"title":135,"path":136,"stem":137},"Repository policy","\u002Fguide\u002Fconfiguration","1.guide\u002F7.configuration",{"title":139,"path":140,"stem":141},"Safety model","\u002Fguide\u002Fsafety","1.guide\u002F8.safety",{"title":143,"path":144,"stem":145},"Database","\u002Fguide\u002Fdatabase","1.guide\u002F9.database",{"title":147,"icon":148,"path":149,"stem":150,"children":151,"page":36},"Reference","i-lucide-book-marked","\u002Freference","2.reference",[152,156,160,164],{"title":153,"path":154,"stem":155},"CLI","\u002Freference\u002Fcli","2.reference\u002F1.cli",{"title":157,"path":158,"stem":159},"Model providers","\u002Freference\u002Fmodel-providers","2.reference\u002F2.model-providers",{"title":161,"path":162,"stem":163},"Source-control providers","\u002Freference\u002Fsource-control-providers","2.reference\u002F3.source-control-providers",{"title":165,"path":166,"stem":167},"Sandbox providers","\u002Freference\u002Fsandbox-providers","2.reference\u002F4.sandbox-providers",{"id":169,"title":33,"body":170,"description":366,"extension":367,"links":368,"meta":369,"navigation":370,"path":34,"seo":371,"stem":35,"__hash__":372},"docs\u002F1.guide\u002F10.api\u002F4.protect-endpoints.md",{"type":171,"value":172,"toc":358},"minimark",[173,189,194,204,229,241,245,255,269,273,282,303,321,325,343,347,354],[174,175,176,177,181,182,181,185,188],"p",{},"The control plane fails closed. Reads (",[178,179,180],"code",{},"tasks.list",", ",[178,183,184],{},"tasks.get",[178,186,187],{},"health",") stay open for the dashboard; every mutation requires an operator-issued bearer credential, and without configuration every mutation is rejected.",[190,191,193],"h2",{"id":192},"bearer-credentials","Bearer credentials",[174,195,196,199,200,203],{},[178,197,198],{},"AGENT_ZERO_CONTROL_PLANE_TOKENS"," holds comma-separated ",[178,201,202],{},"name:token"," pairs:",[205,206,211],"pre",{"className":207,"code":208,"language":209,"meta":210,"style":210},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","AGENT_ZERO_CONTROL_PLANE_TOKENS=ci:s3cret-token,ops:another-token\n","bash","",[178,212,213],{"__ignoreMap":210},[214,215,218,221,225],"span",{"class":216,"line":217},"line",1,[214,219,198],{"class":220},"sTEyZ",[214,222,224],{"class":223},"sMK4o","=",[214,226,228],{"class":227},"sfazB","ci:s3cret-token,ops:another-token\n",[174,230,231,232,236,237,240],{},"The authenticated principal's ",[233,234,235],"strong",{},"name"," (not the token) is what the system records — for example, the approval actor on ",[178,238,239],{},"approvals.decide"," is always the principal's name, never a wire-supplied value.",[190,242,244],{"id":243},"repository-allow-list","Repository allow-list",[174,246,247,250,251,254],{},[178,248,249],{},"tasks.create"," additionally requires the target repository path to appear in ",[178,252,253],{},"AGENT_ZERO_CONTROL_PLANE_REPOSITORIES",", so an HTTP caller cannot point a run at an arbitrary server-local path:",[205,256,258],{"className":207,"code":257,"language":209,"meta":210,"style":210},"AGENT_ZERO_CONTROL_PLANE_REPOSITORIES=\u002Fsrv\u002Fcheckouts\u002Fapp,\u002Fsrv\u002Fcheckouts\u002Flib\n",[178,259,260],{"__ignoreMap":210},[214,261,262,264,266],{"class":216,"line":217},[214,263,253],{"class":220},[214,265,224],{"class":223},[214,267,268],{"class":227},"\u002Fsrv\u002Fcheckouts\u002Fapp,\u002Fsrv\u002Fcheckouts\u002Flib\n",[190,270,272],{"id":271},"execution-mode-grants","Execution-mode grants",[174,274,275,199,278,281],{},[178,276,277],{},"AGENT_ZERO_CONTROL_PLANE_MODES",[178,279,280],{},"name:mode|mode"," grants for the execution modes each principal may request:",[205,283,285],{"className":207,"code":284,"language":209,"meta":210,"style":210},"AGENT_ZERO_CONTROL_PLANE_MODES=ci:observe|suggest,ops:fix\n",[178,286,287],{"__ignoreMap":210},[214,288,289,291,293,296,299],{"class":216,"line":217},[214,290,277],{"class":220},[214,292,224],{"class":223},[214,294,295],{"class":227},"ci:observe",[214,297,298],{"class":223},"|",[214,300,302],{"class":301},"sBMFI","suggest,ops:fix\n",[174,304,305,306,309,310,313,314,309,317,320],{},"Without a grant, a principal may only request the non-writable ",[178,307,308],{},"observe"," and ",[178,311,312],{},"suggest"," modes — ",[178,315,316],{},"fix",[178,318,319],{},"autonomous"," require an explicit operator grant.",[190,322,324],{"id":323},"cors","CORS",[174,326,327,330,331,334,335,181,337,339,340,342],{},[178,328,329],{},"AGENT_ZERO_CONTROL_PLANE_ORIGINS"," lists origins allowed to read ",[178,332,333],{},"\u002Fapi\u002Fv1\u002F**"," cross-origin. It is empty by default: ",[178,336,180],{},[178,338,184],{},", and ",[178,341,187],{}," are unauthenticated by design, so letting a browser read their responses from another origin is an explicit opt-in, not the default.",[190,344,346],{"id":345},"two-independent-schemes","Two independent schemes",[174,348,349,350,353],{},"The bearer-token scheme authorizes the control-plane API and is independent of the Better Auth session that protects the dashboard UI. A signed-in dashboard user does not hold control-plane authority, and a control-plane token grants no dashboard session. See ",[351,352,38],"a",{"href":45},".",[355,356,357],"style",{},"html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"title":210,"searchDepth":359,"depth":359,"links":360},2,[361,362,363,364,365],{"id":192,"depth":359,"text":193},{"id":243,"depth":359,"text":244},{"id":271,"depth":359,"text":272},{"id":323,"depth":359,"text":324},{"id":345,"depth":359,"text":346},"The control plane fails closed. Reads (tasks.list, tasks.get, health) stay open for the dashboard; every mutation requires an operator-issued bearer credential, and without configuration every mutation is rejected.","md",null,{},true,{"title":33,"description":366},"PAAsqNS9Fr_JH54STAuRDbLlcPqzlZz0OIkSzqr_nn0",[374,375],{"title":29,"path":30,"stem":31,"description":210,"children":-1},{"title":44,"path":45,"stem":46,"description":376,"children":-1},"The dashboard UI is protected by Better Auth, mounted in-process at \u002Fapi\u002Fauth\u002F** by @onmax\u002Fnuxt-better-auth from apps\u002Fdashboard\u002Fserver\u002Fauth.config.ts.",1787482153541]