[{"data":1,"prerenderedAt":509},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fv2\u002Fmodules\u002Fsrc":3},{"id":4,"title":5,"body":6,"description":502,"extension":503,"meta":504,"navigation":253,"path":505,"seo":506,"stem":507,"__hash__":508},"docs\u002Fdocs\u002Fv2\u002Fmodules\u002Fsrc.md","src\u002F",{"type":7,"value":8,"toc":497},"minimark",[9,13,21,26,45,300,307,383,386,390,400,448,455,459,465,487,493],[10,11,5],"h1",{"id":12},"src",[14,15,16,17,20],"p",{},"Tools and prompts contributed by the module. Everything in ",[18,19,5],"code",{}," is merged into the\ninstalling agent automatically — no wiring required.",[22,23,25],"h2",{"id":24},"srctools","src\u002Ftools\u002F",[14,27,28,29,32,33,36,37,40,41,44],{},"Each ",[18,30,31],{},".ts"," file becomes a namespace on ",[18,34,35],{},"axon.tools",", named after the file. A file\nnamed ",[18,38,39],{},"email.ts"," contributes ",[18,42,43],{},"axon.tools.email.*",":",[46,47,52],"pre",{"className":48,"code":49,"language":50,"meta":51,"style":51},"language-ts shiki shiki-themes dark-plus","\u002F\u002F src\u002Ftools\u002Femail.ts\nexport async function send(to: string, subject: string, body: string): Promise\u003Cvoid> {\n    const sgMail = (await import(\"@sendgrid\u002Fmail\")).default\n    sgMail.setApiKey(process.env.SENDGRID_API_KEY!)\n    await sgMail.send({ to, from: process.env.EMAIL_FROM!, subject, text: body })\n}\n\nexport async function list(since: Date): Promise\u003CEmail[]> {\n    \u002F\u002F ...\n}\n","ts","",[18,53,54,63,130,161,191,242,248,255,289,295],{"__ignoreMap":51},[55,56,59],"span",{"class":57,"line":58},"line",1,[55,60,62],{"class":61},"sOLPB","\u002F\u002F src\u002Ftools\u002Femail.ts\n",[55,64,66,70,74,77,81,85,89,92,96,99,102,104,106,108,111,113,115,118,121,124,127],{"class":57,"line":65},2,[55,67,69],{"class":68},"sYbnZ","export",[55,71,73],{"class":72},"scz_3"," async",[55,75,76],{"class":72}," function",[55,78,80],{"class":79},"sCudf"," send",[55,82,84],{"class":83},"sTNBD","(",[55,86,88],{"class":87},"s3F5K","to",[55,90,91],{"class":83},": ",[55,93,95],{"class":94},"sNl3T","string",[55,97,98],{"class":83},", ",[55,100,101],{"class":87},"subject",[55,103,91],{"class":83},[55,105,95],{"class":94},[55,107,98],{"class":83},[55,109,110],{"class":87},"body",[55,112,91],{"class":83},[55,114,95],{"class":94},[55,116,117],{"class":83},"): ",[55,119,120],{"class":94},"Promise",[55,122,123],{"class":83},"\u003C",[55,125,126],{"class":94},"void",[55,128,129],{"class":83},"> {\n",[55,131,133,136,140,143,146,149,151,155,158],{"class":57,"line":132},3,[55,134,135],{"class":72},"    const",[55,137,139],{"class":138},"s9McN"," sgMail",[55,141,142],{"class":83}," = (",[55,144,145],{"class":68},"await",[55,147,148],{"class":72}," import",[55,150,84],{"class":83},[55,152,154],{"class":153},"sKc5r","\"@sendgrid\u002Fmail\"",[55,156,157],{"class":83},")).",[55,159,160],{"class":87},"default\n",[55,162,164,167,170,173,175,178,180,183,185,188],{"class":57,"line":163},4,[55,165,166],{"class":87},"    sgMail",[55,168,169],{"class":83},".",[55,171,172],{"class":79},"setApiKey",[55,174,84],{"class":83},[55,176,177],{"class":87},"process",[55,179,169],{"class":83},[55,181,182],{"class":87},"env",[55,184,169],{"class":83},[55,186,187],{"class":138},"SENDGRID_API_KEY",[55,189,190],{"class":83},"!)\n",[55,192,194,197,199,201,204,207,209,211,214,217,219,221,223,226,229,231,233,236,239],{"class":57,"line":193},5,[55,195,196],{"class":68},"    await",[55,198,139],{"class":87},[55,200,169],{"class":83},[55,202,203],{"class":79},"send",[55,205,206],{"class":83},"({ ",[55,208,88],{"class":87},[55,210,98],{"class":83},[55,212,213],{"class":87},"from:",[55,215,216],{"class":87}," process",[55,218,169],{"class":83},[55,220,182],{"class":87},[55,222,169],{"class":83},[55,224,225],{"class":138},"EMAIL_FROM",[55,227,228],{"class":83},"!, ",[55,230,101],{"class":87},[55,232,98],{"class":83},[55,234,235],{"class":87},"text:",[55,237,238],{"class":87}," body",[55,240,241],{"class":83}," })\n",[55,243,245],{"class":57,"line":244},6,[55,246,247],{"class":83},"}\n",[55,249,251],{"class":57,"line":250},7,[55,252,254],{"emptyLinePlaceholder":253},true,"\n",[55,256,258,260,262,264,267,269,272,274,277,279,281,283,286],{"class":57,"line":257},8,[55,259,69],{"class":68},[55,261,73],{"class":72},[55,263,76],{"class":72},[55,265,266],{"class":79}," list",[55,268,84],{"class":83},[55,270,271],{"class":87},"since",[55,273,91],{"class":83},[55,275,276],{"class":94},"Date",[55,278,117],{"class":83},[55,280,120],{"class":94},[55,282,123],{"class":83},[55,284,285],{"class":94},"Email",[55,287,288],{"class":83},"[]> {\n",[55,290,292],{"class":57,"line":291},9,[55,293,294],{"class":61},"    \u002F\u002F ...\n",[55,296,298],{"class":57,"line":297},10,[55,299,247],{"class":83},[14,301,302,303,306],{},"After ",[18,304,305],{},"axon prepare",", the installing agent gets full autocomplete:",[46,308,310],{"className":48,"code":309,"language":50,"meta":51,"style":51},"await axon.tools.email.send(to, subject, body)\nawait axon.tools.email.list(new Date(\"2024-01-01\"))\n",[18,311,312,348],{"__ignoreMap":51},[55,313,314,316,319,321,324,326,329,331,333,335,337,339,341,343,345],{"class":57,"line":58},[55,315,145],{"class":68},[55,317,318],{"class":87}," axon",[55,320,169],{"class":83},[55,322,323],{"class":87},"tools",[55,325,169],{"class":83},[55,327,328],{"class":87},"email",[55,330,169],{"class":83},[55,332,203],{"class":79},[55,334,84],{"class":83},[55,336,88],{"class":87},[55,338,98],{"class":83},[55,340,101],{"class":87},[55,342,98],{"class":83},[55,344,110],{"class":87},[55,346,347],{"class":83},")\n",[55,349,350,352,354,356,358,360,362,364,367,369,372,375,377,380],{"class":57,"line":65},[55,351,145],{"class":68},[55,353,318],{"class":87},[55,355,169],{"class":83},[55,357,323],{"class":87},[55,359,169],{"class":83},[55,361,328],{"class":87},[55,363,169],{"class":83},[55,365,366],{"class":79},"list",[55,368,84],{"class":83},[55,370,371],{"class":72},"new",[55,373,374],{"class":79}," Date",[55,376,84],{"class":83},[55,378,379],{"class":153},"\"2024-01-01\"",[55,381,382],{"class":83},"))\n",[14,384,385],{},"Keep tool functions focused — one action per export. The agent calls them by name;\nshort, clear names are better than long descriptive ones.",[22,387,389],{"id":388},"srcprompts","src\u002Fprompts\u002F",[14,391,392,393,396,397,169],{},"Prompt files in ",[18,394,395],{},".vue"," format. Contributed prompts are available to the installing\nagent via ",[18,398,399],{},"axon.prompt(\"module-name\u002Fprompt-name\")",[46,401,403],{"className":48,"code":402,"language":50,"meta":51,"style":51},"\u002F\u002F agent's plugin — load the module's contributed prompt\nconst prompt = await axon.prompt(\"discord\u002Fdiscord\", { content, username })\n",[18,404,405,410],{"__ignoreMap":51},[55,406,407],{"class":57,"line":58},[55,408,409],{"class":61},"\u002F\u002F agent's plugin — load the module's contributed prompt\n",[55,411,412,415,418,421,423,425,427,430,432,435,438,441,443,446],{"class":57,"line":65},[55,413,414],{"class":72},"const",[55,416,417],{"class":138}," prompt",[55,419,420],{"class":83}," = ",[55,422,145],{"class":68},[55,424,318],{"class":87},[55,426,169],{"class":83},[55,428,429],{"class":79},"prompt",[55,431,84],{"class":83},[55,433,434],{"class":153},"\"discord\u002Fdiscord\"",[55,436,437],{"class":83},", { ",[55,439,440],{"class":87},"content",[55,442,98],{"class":83},[55,444,445],{"class":87},"username",[55,447,241],{"class":83},[14,449,450,451,454],{},"The namespace prefix (",[18,452,453],{},"discord\u002F",") is the module name. Contribute a prompt alongside\nevery hook your module emits — give the agent author something to start with rather\nthan making them write context from scratch.",[22,456,458],{"id":457},"auto-merge","Auto-merge",[14,460,461,462,464],{},"When a module is installed, Axon merges its ",[18,463,5],{}," contributions into the agent\nenvironment automatically:",[466,467,468,475,481],"ul",{},[469,470,471,472],"li",{},"Tool functions become available on ",[18,473,474],{},"axon.tools.\u003Cmodule-name>.*",[469,476,477,478],{},"Prompts become available via ",[18,479,480],{},"axon.prompt(\"\u003Cmodule-name>\u002F\u003Cprompt-name>\")",[469,482,483,484],{},"Type declarations are merged into the agent's ",[18,485,486],{},"axon.d.ts",[14,488,489,490,492],{},"Run ",[18,491,305],{}," after installing or updating a module to regenerate declarations.",[494,495,496],"style",{},"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 .scz_3, html code.shiki .scz_3{--shiki-default:#569CD6}html pre.shiki code .sCudf, html code.shiki .sCudf{--shiki-default:#DCDCAA}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 .sNl3T, html code.shiki .sNl3T{--shiki-default:#4EC9B0}html pre.shiki code .s9McN, html code.shiki .s9McN{--shiki-default:#4FC1FF}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);}",{"title":51,"searchDepth":65,"depth":65,"links":498},[499,500,501],{"id":24,"depth":65,"text":25},{"id":388,"depth":65,"text":389},{"id":457,"depth":65,"text":458},"Tools and prompts contributed by the module. Everything in src\u002F is merged into the\ninstalling agent automatically — no wiring required.","md",{},"\u002Fdocs\u002Fv2\u002Fmodules\u002Fsrc",{"title":5,"description":502},"docs\u002Fv2\u002Fmodules\u002Fsrc","y8bg1Jz_wAJsu_xoxYNtVTUxRPeCGdJaaikH8Xw-MoI",1785671806653]