[{"data":1,"prerenderedAt":660},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fv2\u002Fecosystem\u002Finstalling":3},{"id":4,"title":5,"body":6,"description":19,"extension":653,"meta":654,"navigation":655,"path":656,"seo":657,"stem":658,"__hash__":659},"docs\u002Fdocs\u002Fv2\u002Fecosystem\u002Finstalling.md","Installing",{"type":7,"value":8,"toc":645},"minimark",[9,13,54,58,73,80,85,99,113,128,139,154,158,165,183,186,189,193,209,282,288,292,295,478,485,489,498,574,579,583,614,617,620,641],[10,11,5],"h1",{"id":12},"installing",[14,15,20],"pre",{"className":16,"code":17,"language":18,"meta":19,"style":19},"language-bash shiki shiki-themes dark-plus","axon install @axon\u002Fdiscord\naxon i @axon\u002Fdiscord        # same thing, shorter\n","bash","",[21,22,23,39],"code",{"__ignoreMap":19},[24,25,28,32,36],"span",{"class":26,"line":27},"line",1,[24,29,31],{"class":30},"sCudf","axon",[24,33,35],{"class":34},"sKc5r"," install",[24,37,38],{"class":34}," @axon\u002Fdiscord\n",[24,40,42,44,47,50],{"class":26,"line":41},2,[24,43,31],{"class":30},[24,45,46],{"class":34}," i",[24,48,49],{"class":34}," @axon\u002Fdiscord",[24,51,53],{"class":52},"sOLPB","        # same thing, shorter\n",[55,56,57],"p",{},"Run from your agent directory. One command for every kind — the name resolves\nto exactly one artifact, so nothing tells the CLI whether it is fetching a\nmodule or a prompt.",[55,59,60,61,64,65,68,69,72],{},"What lands depends on what it is. A module's source goes to\n",[21,62,63],{},"node_modules\u002F@axon\u002Fdiscord\u002F",", its npm dependencies merge into your agent's\n",[21,66,67],{},"package.json",", and the CLI lists any env keys it needs. A prompt package is\ndeclared in ",[21,70,71],{},"prompts:"," and its prompts become invokable by name.",[55,74,75,76,79],{},"Run ",[21,77,78],{},"axon prepare"," after installing anything, to regenerate type declarations.",[81,82,84],"h2",{"id":83},"installing-a-prompt","Installing a prompt",[14,86,88],{"className":16,"code":87,"language":18,"meta":19,"style":19},"axon install @cody\u002Feslint-scout\n",[21,89,90],{"__ignoreMap":19},[24,91,92,94,96],{"class":26,"line":27},[24,93,31],{"class":30},[24,95,35],{"class":34},[24,97,98],{"class":34}," @cody\u002Feslint-scout\n",[55,100,101,102,104,105,108,109,112],{},"The package is added to ",[21,103,71],{}," in your agent config, and every top-level\n",[21,106,107],{},".vue","\u002F",[21,110,111],{},".md"," it ships becomes an invokable prompt namespaced by the package:",[14,114,116],{"className":16,"code":115,"language":18,"meta":19,"style":19},"axon run @cody\u002Feslint-scout:scout\n",[21,117,118],{"__ignoreMap":19},[24,119,120,122,125],{"class":26,"line":27},[24,121,31],{"class":30},[24,123,124],{"class":34}," run",[24,126,127],{"class":34}," @cody\u002Feslint-scout:scout\n",[55,129,130,131,134,135,138],{},"A package shipping exactly one prompt named after itself also answers to the\nbare name, so ",[21,132,133],{},"@cody\u002Fscout"," need not be written ",[21,136,137],{},"@cody\u002Fscout:scout",".",[55,140,141,142,145,146,149,150,153],{},"The namespace is what stops an installed prompt shadowing one you wrote. Your\nown ",[21,143,144],{},"src\u002Fprompts\u002Fscout.vue"," stays ",[21,147,148],{},"scout","; the installed one is\n",[21,151,152],{},"@cody\u002Feslint-scout:scout",". They occupy different namespaces by construction,\nnot by a precedence rule you have to remember.",[81,155,157],{"id":156},"configuring-env-keys","Configuring env keys",[55,159,160,161,164],{},"Modules declare the env keys they require. After install, add them to your\nagent's ",[21,162,163],{},".env",":",[14,166,168],{"className":16,"code":167,"language":18,"meta":19,"style":19},"DISCORD_BOT_TOKEN=your-bot-token-here\n",[21,169,170],{"__ignoreMap":19},[24,171,172,176,180],{"class":26,"line":27},[24,173,175],{"class":174},"s3F5K","DISCORD_BOT_TOKEN",[24,177,179],{"class":178},"sTNBD","=",[24,181,182],{"class":34},"your-bot-token-here\n",[55,184,185],{},"The CLI prints exactly what's needed and why. Nothing is set automatically —\nyou provide the values.",[55,187,188],{},"Prompt packages never need this. They are text, so there is nothing to\nauthenticate.",[81,190,192],{"id":191},"configuring-options","Configuring options",[55,194,195,196,199,200,204,205,208],{},"Modules can expose options that control their behaviour. ",[21,197,198],{},"modules"," is an\n",[201,202,203],"strong",{},"array","; pass options with a ",[21,206,207],{},"[module, options]"," tuple:",[14,210,214],{"className":211,"code":212,"language":213,"meta":19,"style":19},"language-ts shiki shiki-themes dark-plus","export default defineAgent({\n    modules: [\n        [\"@axon\u002Fdiscord\", { mentionOnly: true, channelIds: \"1234567890,0987654321\" }],\n    ],\n})\n","ts",[21,215,216,231,239,270,276],{"__ignoreMap":19},[24,217,218,222,225,228],{"class":26,"line":27},[24,219,221],{"class":220},"sYbnZ","export",[24,223,224],{"class":220}," default",[24,226,227],{"class":30}," defineAgent",[24,229,230],{"class":178},"({\n",[24,232,233,236],{"class":26,"line":41},[24,234,235],{"class":174},"    modules:",[24,237,238],{"class":178}," [\n",[24,240,242,245,248,251,254,258,261,264,267],{"class":26,"line":241},3,[24,243,244],{"class":178},"        [",[24,246,247],{"class":34},"\"@axon\u002Fdiscord\"",[24,249,250],{"class":178},", { ",[24,252,253],{"class":174},"mentionOnly:",[24,255,257],{"class":256},"scz_3"," true",[24,259,260],{"class":178},", ",[24,262,263],{"class":174},"channelIds:",[24,265,266],{"class":34}," \"1234567890,0987654321\"",[24,268,269],{"class":178}," }],\n",[24,271,273],{"class":26,"line":272},4,[24,274,275],{"class":178},"    ],\n",[24,277,279],{"class":26,"line":278},5,[24,280,281],{"class":178},"})\n",[55,283,284,285,287],{},"Options are declared by the module with types and defaults. Run ",[21,286,78],{},"\nafter installing to get type declarations — your editor will tell you exactly\nwhat's available.",[81,289,291],{"id":290},"subscribing-to-hooks","Subscribing to hooks",[55,293,294],{},"Most integration modules emit hooks when external events arrive. You subscribe\nin a server plugin:",[14,296,298],{"className":211,"code":297,"language":213,"meta":19,"style":19},"\u002F\u002F server\u002Fplugins\u002Fdiscord.ts\nexport default defineAxonPlugin(async (axon) => {\n    axon.hooks.hook(\"discord:message.received\", async ({ content, username, reply }) => {\n        const prompt = await axon.prompt(\"discord\u002Fdiscord\", { content, username })\n        const result = await axon.request({ prompt })\n        await reply(result.text)\n    })\n})\n",[21,299,300,305,334,381,420,445,467,473],{"__ignoreMap":19},[24,301,302],{"class":26,"line":27},[24,303,304],{"class":52},"\u002F\u002F server\u002Fplugins\u002Fdiscord.ts\n",[24,306,307,309,311,314,317,320,323,325,328,331],{"class":26,"line":41},[24,308,221],{"class":220},[24,310,224],{"class":220},[24,312,313],{"class":30}," defineAxonPlugin",[24,315,316],{"class":178},"(",[24,318,319],{"class":256},"async",[24,321,322],{"class":178}," (",[24,324,31],{"class":174},[24,326,327],{"class":178},") ",[24,329,330],{"class":256},"=>",[24,332,333],{"class":178}," {\n",[24,335,336,339,341,344,346,349,351,354,356,358,361,364,366,369,371,374,377,379],{"class":26,"line":241},[24,337,338],{"class":174},"    axon",[24,340,138],{"class":178},[24,342,343],{"class":174},"hooks",[24,345,138],{"class":178},[24,347,348],{"class":30},"hook",[24,350,316],{"class":178},[24,352,353],{"class":34},"\"discord:message.received\"",[24,355,260],{"class":178},[24,357,319],{"class":256},[24,359,360],{"class":178}," ({ ",[24,362,363],{"class":174},"content",[24,365,260],{"class":178},[24,367,368],{"class":174},"username",[24,370,260],{"class":178},[24,372,373],{"class":174},"reply",[24,375,376],{"class":178}," }) ",[24,378,330],{"class":256},[24,380,333],{"class":178},[24,382,383,386,390,393,396,399,401,404,406,409,411,413,415,417],{"class":26,"line":272},[24,384,385],{"class":256},"        const",[24,387,389],{"class":388},"s9McN"," prompt",[24,391,392],{"class":178}," = ",[24,394,395],{"class":220},"await",[24,397,398],{"class":174}," axon",[24,400,138],{"class":178},[24,402,403],{"class":30},"prompt",[24,405,316],{"class":178},[24,407,408],{"class":34},"\"discord\u002Fdiscord\"",[24,410,250],{"class":178},[24,412,363],{"class":174},[24,414,260],{"class":178},[24,416,368],{"class":174},[24,418,419],{"class":178}," })\n",[24,421,422,424,427,429,431,433,435,438,441,443],{"class":26,"line":278},[24,423,385],{"class":256},[24,425,426],{"class":388}," result",[24,428,392],{"class":178},[24,430,395],{"class":220},[24,432,398],{"class":174},[24,434,138],{"class":178},[24,436,437],{"class":30},"request",[24,439,440],{"class":178},"({ ",[24,442,403],{"class":174},[24,444,419],{"class":178},[24,446,448,451,454,456,459,461,464],{"class":26,"line":447},6,[24,449,450],{"class":220},"        await",[24,452,453],{"class":30}," reply",[24,455,316],{"class":178},[24,457,458],{"class":174},"result",[24,460,138],{"class":178},[24,462,463],{"class":174},"text",[24,465,466],{"class":178},")\n",[24,468,470],{"class":26,"line":469},7,[24,471,472],{"class":178},"    })\n",[24,474,476],{"class":26,"line":475},8,[24,477,281],{"class":178},[55,479,480,481,484],{},"The hook payload is typed from the module's ",[21,482,483],{},"emits"," declaration. Your editor\nknows what fields are available.",[81,486,488],{"id":487},"using-contributed-tools","Using contributed tools",[55,490,491,492,494,495,164],{},"Modules contribute tools under their namespace. After ",[21,493,78],{},", they are\nfully typed on ",[21,496,497],{},"axon.tools",[14,499,501],{"className":211,"code":500,"language":213,"meta":19,"style":19},"\u002F\u002F In a script or route handler\nconst pr = await github.openPr(\"fix: auth\", body, \"feat\u002Fauth\")\nconst issues = await kanban.list({ status: \"open\" })\n",[21,502,503,508,545],{"__ignoreMap":19},[24,504,505],{"class":26,"line":27},[24,506,507],{"class":52},"\u002F\u002F In a script or route handler\n",[24,509,510,513,516,518,520,523,525,528,530,533,535,538,540,543],{"class":26,"line":41},[24,511,512],{"class":256},"const",[24,514,515],{"class":388}," pr",[24,517,392],{"class":178},[24,519,395],{"class":220},[24,521,522],{"class":174}," github",[24,524,138],{"class":178},[24,526,527],{"class":30},"openPr",[24,529,316],{"class":178},[24,531,532],{"class":34},"\"fix: auth\"",[24,534,260],{"class":178},[24,536,537],{"class":174},"body",[24,539,260],{"class":178},[24,541,542],{"class":34},"\"feat\u002Fauth\"",[24,544,466],{"class":178},[24,546,547,549,552,554,556,559,561,564,566,569,572],{"class":26,"line":241},[24,548,512],{"class":256},[24,550,551],{"class":388}," issues",[24,553,392],{"class":178},[24,555,395],{"class":220},[24,557,558],{"class":174}," kanban",[24,560,138],{"class":178},[24,562,563],{"class":30},"list",[24,565,440],{"class":178},[24,567,568],{"class":174},"status:",[24,570,571],{"class":34}," \"open\"",[24,573,419],{"class":178},[55,575,75,576,578],{},[21,577,78],{}," any time you install or update a module to regenerate type\ndeclarations.",[81,580,582],{"id":581},"the-full-install-flow","The full install flow",[14,584,586],{"className":16,"code":585,"language":18,"meta":19,"style":19},"axon install @axon\u002Fdiscord   # fetch source, add deps, print env requirements\n# add DISCORD_BOT_TOKEN to .env\naxon prepare                 # regenerate types\n",[21,587,588,599,604],{"__ignoreMap":19},[24,589,590,592,594,596],{"class":26,"line":27},[24,591,31],{"class":30},[24,593,35],{"class":34},[24,595,49],{"class":34},[24,597,598],{"class":52},"   # fetch source, add deps, print env requirements\n",[24,600,601],{"class":26,"line":41},[24,602,603],{"class":52},"# add DISCORD_BOT_TOKEN to .env\n",[24,605,606,608,611],{"class":26,"line":241},[24,607,31],{"class":30},[24,609,610],{"class":34}," prepare",[24,612,613],{"class":52},"                 # regenerate types\n",[55,615,616],{},"Then add a plugin to subscribe to hooks, and the agent is live.",[55,618,619],{},"For a prompt, there is no second half:",[14,621,623],{"className":16,"code":622,"language":18,"meta":19,"style":19},"axon install @cody\u002Feslint-scout\naxon run @cody\u002Feslint-scout:scout\n",[21,624,625,633],{"__ignoreMap":19},[24,626,627,629,631],{"class":26,"line":27},[24,628,31],{"class":30},[24,630,35],{"class":34},[24,632,98],{"class":34},[24,634,635,637,639],{"class":26,"line":41},[24,636,31],{"class":30},[24,638,124],{"class":34},[24,640,127],{"class":34},[642,643,644],"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 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 .s3F5K, html code.shiki .s3F5K{--shiki-default:#9CDCFE}html pre.shiki code .sTNBD, html code.shiki .sTNBD{--shiki-default:#D4D4D4}html pre.shiki code .sYbnZ, html code.shiki .sYbnZ{--shiki-default:#C586C0}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}",{"title":19,"searchDepth":41,"depth":41,"links":646},[647,648,649,650,651,652],{"id":83,"depth":41,"text":84},{"id":156,"depth":41,"text":157},{"id":191,"depth":41,"text":192},{"id":290,"depth":41,"text":291},{"id":487,"depth":41,"text":488},{"id":581,"depth":41,"text":582},"md",{},true,"\u002Fdocs\u002Fv2\u002Fecosystem\u002Finstalling",{"title":5,"description":19},"docs\u002Fv2\u002Fecosystem\u002Finstalling","JSNpXVXeo1HBIgMXjALCQUPP14txiUTLNFxlJnGaXNY",1785368680013]