[{"data":1,"prerenderedAt":435},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fv2\u002Fagent\u002Fnode-modules":3},{"id":4,"title":5,"body":6,"description":16,"extension":429,"meta":430,"navigation":156,"path":431,"seo":432,"stem":433,"__hash__":434},"docs\u002Fdocs\u002Fv2\u002Fagent\u002Fnode-modules.md","node_modules\u002F",{"type":7,"value":8,"toc":420},"minimark",[9,13,17,22,25,30,56,74,78,94,108,114,305,319,328,332,343,346,350,364,378,382,389,413,416],[10,11,5],"h1",{"id":12},"node_modules",[14,15,16],"p",{},"The agent's installed dependency tree. Two different things end up here, and they behave differently.",[18,19,21],"h2",{"id":20},"axon-modules-vs-npm-packages","Axon modules vs npm packages",[14,23,24],{},"There are two kinds of things you install into an agent:",[26,27,29],"h3",{"id":28},"axon-modules-tools-auto-register","Axon modules — tools auto-register",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-bash shiki shiki-themes dark-plus","axon install @author\u002Fdev-workflow\n","bash","",[38,39,40],"code",{"__ignoreMap":36},[41,42,45,49,53],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sCudf","axon",[41,50,52],{"class":51},"sKc5r"," install",[41,54,55],{"class":51}," @author\u002Fdev-workflow\n",[14,57,58,59,62,63,66,67,70,71,73],{},"Axon detects these as first-class modules. Their tools are auto-registered into the capsule — the agent can call them without you writing any wiring code. Installing an Axon module also merges its ",[38,60,61],{},"src\u002F",", ",[38,64,65],{},"prompts\u002F",", and ",[38,68,69],{},"scripts\u002F"," files into your agent folder, and its npm deps land in ",[38,72,5],{},".",[26,75,77],{"id":76},"npm-packages-private-by-default","npm packages — private by default",[31,79,81],{"className":33,"code":80,"language":35,"meta":36,"style":36},"bun add @octokit\u002Frest\n",[38,82,83],{"__ignoreMap":36},[41,84,85,88,91],{"class":43,"line":44},[41,86,87],{"class":47},"bun",[41,89,90],{"class":51}," add",[41,92,93],{"class":51}," @octokit\u002Frest\n",[14,95,96,97,99,100,104,105,107],{},"A plain npm package installed into ",[38,98,5],{},". It is ",[101,102,103],"strong",{},"not"," automatically available to the agent as a tool. It is a private implementation dependency — available to your ",[38,106,61],{}," code to import, but invisible to the agent until you explicitly export it.",[14,109,110,111,113],{},"To surface it as an agent tool, export it from ",[38,112,61],{},":",[31,115,119],{"className":116,"code":117,"language":118,"meta":36,"style":36},"language-ts shiki shiki-themes dark-plus","\u002F\u002F src\u002Fgithub.ts\nimport { Octokit } from \"@octokit\u002Frest\"\n\nconst octokit = new Octokit({ auth: process.env.GITHUB_TOKEN })\n\nexport async function createPr(title: string, body: string) {\n    const { data } = await octokit.pulls.create({ ... })\n    return { url: data.html_url }\n}\n","ts",[38,120,121,127,151,158,200,205,245,277,299],{"__ignoreMap":36},[41,122,123],{"class":43,"line":44},[41,124,126],{"class":125},"sOLPB","\u002F\u002F src\u002Fgithub.ts\n",[41,128,130,134,138,142,145,148],{"class":43,"line":129},2,[41,131,133],{"class":132},"sYbnZ","import",[41,135,137],{"class":136},"sTNBD"," { ",[41,139,141],{"class":140},"s3F5K","Octokit",[41,143,144],{"class":136}," } ",[41,146,147],{"class":132},"from",[41,149,150],{"class":51}," \"@octokit\u002Frest\"\n",[41,152,154],{"class":43,"line":153},3,[41,155,157],{"emptyLinePlaceholder":156},true,"\n",[41,159,161,165,169,172,175,178,181,184,187,189,192,194,197],{"class":43,"line":160},4,[41,162,164],{"class":163},"scz_3","const",[41,166,168],{"class":167},"s9McN"," octokit",[41,170,171],{"class":136}," = ",[41,173,174],{"class":163},"new",[41,176,177],{"class":47}," Octokit",[41,179,180],{"class":136},"({ ",[41,182,183],{"class":140},"auth:",[41,185,186],{"class":140}," process",[41,188,73],{"class":136},[41,190,191],{"class":140},"env",[41,193,73],{"class":136},[41,195,196],{"class":167},"GITHUB_TOKEN",[41,198,199],{"class":136}," })\n",[41,201,203],{"class":43,"line":202},5,[41,204,157],{"emptyLinePlaceholder":156},[41,206,208,211,214,217,220,223,226,229,233,235,238,240,242],{"class":43,"line":207},6,[41,209,210],{"class":132},"export",[41,212,213],{"class":163}," async",[41,215,216],{"class":163}," function",[41,218,219],{"class":47}," createPr",[41,221,222],{"class":136},"(",[41,224,225],{"class":140},"title",[41,227,228],{"class":136},": ",[41,230,232],{"class":231},"sNl3T","string",[41,234,62],{"class":136},[41,236,237],{"class":140},"body",[41,239,228],{"class":136},[41,241,232],{"class":231},[41,243,244],{"class":136},") {\n",[41,246,248,251,253,256,259,262,264,266,269,271,274],{"class":43,"line":247},7,[41,249,250],{"class":163},"    const",[41,252,137],{"class":136},[41,254,255],{"class":167},"data",[41,257,258],{"class":136}," } = ",[41,260,261],{"class":132},"await",[41,263,168],{"class":140},[41,265,73],{"class":136},[41,267,268],{"class":140},"pulls",[41,270,73],{"class":136},[41,272,273],{"class":47},"create",[41,275,276],{"class":136},"({ ... })\n",[41,278,280,283,285,288,291,293,296],{"class":43,"line":279},8,[41,281,282],{"class":132},"    return",[41,284,137],{"class":136},[41,286,287],{"class":140},"url:",[41,289,290],{"class":140}," data",[41,292,73],{"class":136},[41,294,295],{"class":140},"html_url",[41,297,298],{"class":136}," }\n",[41,300,302],{"class":43,"line":301},9,[41,303,304],{"class":136},"}\n",[14,306,307,308,311,312,315,316,318],{},"Now the agent has a ",[38,309,310],{},"github.createPr"," tool. ",[38,313,314],{},"@octokit\u002Frest"," is still private — the agent sees only what ",[38,317,61],{}," explicitly exposes.",[14,320,321,322,324,325,327],{},"This is the same public\u002Fprivate distinction as any TypeScript project. ",[38,323,5],{}," is your private dependency tree. ",[38,326,61],{}," is your public API.",[18,329,331],{"id":330},"whats-in-here-at-any-given-time","What's in here at any given time",[14,333,334,335,338,339,342],{},"Everything ",[38,336,337],{},"bun install"," resolved from your ",[38,340,341],{},"package.json"," — tool packages from Axon modules, npm packages you added directly, and their transitive deps.",[14,344,345],{},"You don't manage this folder manually. It is a build artifact.",[18,347,349],{"id":348},"never-commit-it","Never commit it",[14,351,352,354,355,357,358,360,361,363],{},[38,353,5],{}," is reproduced by ",[38,356,337],{}," from ",[38,359,341],{},". Commit ",[38,362,341],{},", not this folder.",[31,365,367],{"className":33,"code":366,"language":35,"meta":36,"style":36},"bun install   # restores node_modules\u002F from package.json\n",[38,368,369],{"__ignoreMap":36},[41,370,371,373,375],{"class":43,"line":44},[41,372,87],{"class":47},[41,374,52],{"class":51},[41,376,377],{"class":125},"   # restores node_modules\u002F from package.json\n",[18,379,381],{"id":380},"removing-a-module","Removing a module",[14,383,384,385,388],{},"There is no ",[38,386,387],{},"axon uninstall",". Because installed Axon modules merge their files directly into your agent folder, removing one means:",[390,391,392,403,408],"ol",{},[393,394,395,396,62,398,66,400,402],"li",{},"Deleting the ",[38,397,61],{},[38,399,65],{},[38,401,69],{}," files the module added",[393,404,405,406],{},"Removing the module's deps from ",[38,407,341],{},[393,409,410,411],{},"Running ",[38,412,337],{},[14,414,415],{},"Your agent folder is yours — there's no hidden module layer to unpick. You see every file, you decide what stays.",[417,418,419],"style",{},"html pre.shiki code .sCudf, html code.shiki .sCudf{--shiki-default:#DCDCAA}html pre.shiki code .sKc5r, html code.shiki .sKc5r{--shiki-default:#CE9178}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 .sOLPB, html code.shiki .sOLPB{--shiki-default:#6A9955}html pre.shiki code .sYbnZ, html code.shiki .sYbnZ{--shiki-default:#C586C0}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 .scz_3, html code.shiki .scz_3{--shiki-default:#569CD6}html pre.shiki code .s9McN, html code.shiki .s9McN{--shiki-default:#4FC1FF}html pre.shiki code .sNl3T, html code.shiki .sNl3T{--shiki-default:#4EC9B0}",{"title":36,"searchDepth":129,"depth":129,"links":421},[422,426,427,428],{"id":20,"depth":129,"text":21,"children":423},[424,425],{"id":28,"depth":153,"text":29},{"id":76,"depth":153,"text":77},{"id":330,"depth":129,"text":331},{"id":348,"depth":129,"text":349},{"id":380,"depth":129,"text":381},"md",{},"\u002Fdocs\u002Fv2\u002Fagent\u002Fnode-modules",{"title":5,"description":16},"docs\u002Fv2\u002Fagent\u002Fnode-modules","mgXTY0gVxxE_JokZxbD3wmgJZG01J0pXX7nsdcif9K8",1785671805694]