[{"data":1,"prerenderedAt":365},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fv2\u002Fapi\u002Fconfig\u002Fpolicy\u002Fprocess":3},{"id":4,"title":5,"body":6,"description":357,"extension":358,"meta":359,"navigation":360,"path":361,"seo":362,"stem":363,"__hash__":364},"docs\u002Fdocs\u002Fv2\u002Fapi\u002Fconfig\u002Fpolicy\u002Fprocess.md","process",{"type":7,"value":8,"toc":353},"minimark",[9,12,21,105,115,227,236,241,259,270,273,279,339,349],[10,11,5],"h1",{"id":5},[13,14,15,16,20],"p",{},"Controls which shell commands the agent can spawn via ",[17,18,19],"code",{},"axon.proc.spawn()",". Patterns match\nagainst the full command string passed to spawn.",[22,23,28],"pre",{"className":24,"code":25,"language":26,"meta":27,"style":27},"language-ts shiki shiki-themes dark-plus","type ProcessPolicy = {\n    allow?:    string[]   \u002F\u002F permitted command patterns\n    deny?:     string[]   \u002F\u002F blocked command patterns\n    escalate?: string[]   \u002F\u002F pause and prompt before allowing\n}\n","ts","",[17,29,30,47,67,83,99],{"__ignoreMap":27},[31,32,35,39,43],"span",{"class":33,"line":34},"line",1,[31,36,38],{"class":37},"scz_3","type",[31,40,42],{"class":41},"sNl3T"," ProcessPolicy",[31,44,46],{"class":45},"sTNBD"," = {\n",[31,48,50,54,57,60,63],{"class":33,"line":49},2,[31,51,53],{"class":52},"s3F5K","    allow",[31,55,56],{"class":45},"?:    ",[31,58,59],{"class":41},"string",[31,61,62],{"class":45},"[]   ",[31,64,66],{"class":65},"sOLPB","\u002F\u002F permitted command patterns\n",[31,68,70,73,76,78,80],{"class":33,"line":69},3,[31,71,72],{"class":52},"    deny",[31,74,75],{"class":45},"?:     ",[31,77,59],{"class":41},[31,79,62],{"class":45},[31,81,82],{"class":65},"\u002F\u002F blocked command patterns\n",[31,84,86,89,92,94,96],{"class":33,"line":85},4,[31,87,88],{"class":52},"    escalate",[31,90,91],{"class":45},"?: ",[31,93,59],{"class":41},[31,95,62],{"class":45},[31,97,98],{"class":65},"\u002F\u002F pause and prompt before allowing\n",[31,100,102],{"class":33,"line":101},5,[31,103,104],{"class":45},"}\n",[13,106,107,110,111,114],{},[17,108,109],{},"deny"," is checked before ",[17,112,113],{},"allow",". Patterns use glob-style wildcards against the complete\ncommand string.",[22,116,118],{"className":24,"code":117,"language":26,"meta":27,"style":27},"export default defineAgent({\n    policy: {\n        process: {\n            allow:    [\"git *\", \"bun *\", \"npm *\"],\n            deny:     [\"git push --force*\", \"rm -rf *\"],\n            escalate: [\"docker *\"],\n        },\n    },\n})\n",[17,119,120,136,144,151,177,195,209,215,221],{"__ignoreMap":27},[31,121,122,126,129,133],{"class":33,"line":34},[31,123,125],{"class":124},"sYbnZ","export",[31,127,128],{"class":124}," default",[31,130,132],{"class":131},"sCudf"," defineAgent",[31,134,135],{"class":45},"({\n",[31,137,138,141],{"class":33,"line":49},[31,139,140],{"class":52},"    policy:",[31,142,143],{"class":45}," {\n",[31,145,146,149],{"class":33,"line":69},[31,147,148],{"class":52},"        process:",[31,150,143],{"class":45},[31,152,153,156,159,163,166,169,171,174],{"class":33,"line":85},[31,154,155],{"class":52},"            allow:",[31,157,158],{"class":45},"    [",[31,160,162],{"class":161},"sKc5r","\"git *\"",[31,164,165],{"class":45},", ",[31,167,168],{"class":161},"\"bun *\"",[31,170,165],{"class":45},[31,172,173],{"class":161},"\"npm *\"",[31,175,176],{"class":45},"],\n",[31,178,179,182,185,188,190,193],{"class":33,"line":101},[31,180,181],{"class":52},"            deny:",[31,183,184],{"class":45},"     [",[31,186,187],{"class":161},"\"git push --force*\"",[31,189,165],{"class":45},[31,191,192],{"class":161},"\"rm -rf *\"",[31,194,176],{"class":45},[31,196,198,201,204,207],{"class":33,"line":197},6,[31,199,200],{"class":52},"            escalate:",[31,202,203],{"class":45}," [",[31,205,206],{"class":161},"\"docker *\"",[31,208,176],{"class":45},[31,210,212],{"class":33,"line":211},7,[31,213,214],{"class":45},"        },\n",[31,216,218],{"class":33,"line":217},8,[31,219,220],{"class":45},"    },\n",[31,222,224],{"class":33,"line":223},9,[31,225,226],{"class":45},"})\n",[13,228,229,230,232,233,235],{},"No ",[17,231,5],{}," block means unrestricted command spawning. For production agents, always\ndeclare a ",[17,234,5],{}," policy.",[237,238,240],"h2",{"id":239},"pattern-matching","Pattern matching",[13,242,243,244,247,248,251,252,255,256,258],{},"Patterns match the full command string including arguments. ",[17,245,246],{},"git *"," matches any git\nsubcommand. ",[17,249,250],{},"git push"," matches only that exact command with no arguments. ",[17,253,254],{},"git push *","\nmatches ",[17,257,250],{}," followed by anything.",[13,260,261,263,264,266,267,269],{},[17,262,109],{}," takes precedence — a command matching both ",[17,265,113],{}," and ",[17,268,109],{}," is blocked.",[237,271,272],{"id":272},"escalate",[13,274,275,276,278],{},"Commands matching ",[17,277,272],{}," pause execution and surface the call for human approval.\nUseful for commands that are sometimes safe and sometimes destructive depending on\narguments.",[22,280,282],{"className":24,"code":281,"language":26,"meta":27,"style":27},"export default defineAgent({\n    policy: {\n        process: {\n            allow:    [\"git *\"],\n            escalate: [\"git push*\"],\n        },\n    },\n})\n",[17,283,284,294,300,306,316,327,331,335],{"__ignoreMap":27},[31,285,286,288,290,292],{"class":33,"line":34},[31,287,125],{"class":124},[31,289,128],{"class":124},[31,291,132],{"class":131},[31,293,135],{"class":45},[31,295,296,298],{"class":33,"line":49},[31,297,140],{"class":52},[31,299,143],{"class":45},[31,301,302,304],{"class":33,"line":69},[31,303,148],{"class":52},[31,305,143],{"class":45},[31,307,308,310,312,314],{"class":33,"line":85},[31,309,155],{"class":52},[31,311,158],{"class":45},[31,313,162],{"class":161},[31,315,176],{"class":45},[31,317,318,320,322,325],{"class":33,"line":101},[31,319,200],{"class":52},[31,321,203],{"class":45},[31,323,324],{"class":161},"\"git push*\"",[31,326,176],{"class":45},[31,328,329],{"class":33,"line":197},[31,330,214],{"class":45},[31,332,333],{"class":33,"line":211},[31,334,220],{"class":45},[31,336,337],{"class":33,"line":217},[31,338,226],{"class":45},[13,340,341,342,348],{},"See ",[343,344,346],"a",{"href":345},"\u002Fdocs\u002Fv2\u002Fapi\u002Fconfig\u002Fpolicy\u002Fescalate",[17,347,272],{}," for the programmatic escalation\nfunction.",[350,351,352],"style",{},"html pre.shiki code .scz_3, html code.shiki .scz_3{--shiki-default:#569CD6}html pre.shiki code .sNl3T, html code.shiki .sNl3T{--shiki-default:#4EC9B0}html pre.shiki code .sTNBD, html code.shiki .sTNBD{--shiki-default:#D4D4D4}html pre.shiki code .s3F5K, html code.shiki .s3F5K{--shiki-default:#9CDCFE}html pre.shiki code .sOLPB, html code.shiki .sOLPB{--shiki-default:#6A9955}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 pre.shiki code .sYbnZ, html code.shiki .sYbnZ{--shiki-default:#C586C0}html pre.shiki code .sCudf, html code.shiki .sCudf{--shiki-default:#DCDCAA}html pre.shiki code .sKc5r, html code.shiki .sKc5r{--shiki-default:#CE9178}",{"title":27,"searchDepth":49,"depth":49,"links":354},[355,356],{"id":239,"depth":49,"text":240},{"id":272,"depth":49,"text":272},"Controls which shell commands the agent can spawn via axon.proc.spawn(). Patterns match\nagainst the full command string passed to spawn.","md",{},true,"\u002Fdocs\u002Fv2\u002Fapi\u002Fconfig\u002Fpolicy\u002Fprocess",{"title":5,"description":357},"docs\u002Fv2\u002Fapi\u002Fconfig\u002Fpolicy\u002Fprocess","FgBD1cOvB64rPd628u6MRgylBizV893zL6AOlo91nSA",1786529563308]