[{"data":1,"prerenderedAt":325},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fv2\u002Fmodules\u002Fpublishing":3},{"id":4,"title":5,"body":6,"description":19,"extension":319,"meta":320,"navigation":283,"path":321,"seo":322,"stem":323,"__hash__":324},"docs\u002Fdocs\u002Fv2\u002Fmodules\u002Fpublishing.md","Publishing",{"type":7,"value":8,"toc":312},"minimark",[9,13,36,48,53,56,72,79,83,93,182,186,204,207,211,214,218,225,301,308],[10,11,5],"h1",{"id":12},"publishing",[14,15,20],"pre",{"className":16,"code":17,"language":18,"meta":19,"style":19},"language-bash shiki shiki-themes dark-plus","axon publish\n","bash","",[21,22,23],"code",{"__ignoreMap":19},[24,25,28,32],"span",{"class":26,"line":27},"line",1,[24,29,31],{"class":30},"sCudf","axon",[24,33,35],{"class":34},"sKc5r"," publish\n",[37,38,39,40,43,44,47],"p",{},"Run from the module folder. Publishing inspects your ",[21,41,42],{},"src\u002F"," exports, writes\n",[21,45,46],{},"module.d.ts",", packages the source, and uploads it to the registry. Published versions\nare immutable.",[49,50,52],"h2",{"id":51},"registry-identity","Registry identity",[37,54,55],{},"Your module is published under your account scope:",[14,57,59],{"className":16,"code":58,"language":18,"meta":19,"style":19},"axon publish   # → @you\u002Fdiscord on the registry\n",[21,60,61],{"__ignoreMap":19},[24,62,63,65,68],{"class":26,"line":27},[24,64,31],{"class":30},[24,66,67],{"class":34}," publish",[24,69,71],{"class":70},"sOLPB","   # → @you\u002Fdiscord on the registry\n",[37,73,74,75,78],{},"The name and version come from ",[21,76,77],{},"package.json",". The scope comes from your Axon account.",[49,80,82],{"id":81},"whats-included","What's included",[37,84,85,88,89,92],{},[21,86,87],{},"node_modules\u002F"," is never included — it is reconstructed by ",[21,90,91],{},"bun install"," on the\ninstalling agent. The registry stores source only.",[14,94,96],{"className":16,"code":95,"language":18,"meta":19,"style":19},"my-module\u002F\n├── node_modules\u002F       # ✗ excluded\n├── server\u002F             # ✓ included\n├── src\u002F                # ✓ included\n├── .env                # ✗ excluded\n├── module.config.ts    # ✓ included\n├── module.d.ts         # ✓ included (generated by prepare)\n└── package.json        # ✓ included\n",[21,97,98,103,115,126,137,148,159,170],{"__ignoreMap":19},[24,99,100],{"class":26,"line":27},[24,101,102],{"class":30},"my-module\u002F\n",[24,104,106,109,112],{"class":26,"line":105},2,[24,107,108],{"class":30},"├──",[24,110,111],{"class":34}," node_modules\u002F",[24,113,114],{"class":70},"       # ✗ excluded\n",[24,116,118,120,123],{"class":26,"line":117},3,[24,119,108],{"class":30},[24,121,122],{"class":34}," server\u002F",[24,124,125],{"class":70},"             # ✓ included\n",[24,127,129,131,134],{"class":26,"line":128},4,[24,130,108],{"class":30},[24,132,133],{"class":34}," src\u002F",[24,135,136],{"class":70},"                # ✓ included\n",[24,138,140,142,145],{"class":26,"line":139},5,[24,141,108],{"class":30},[24,143,144],{"class":34}," .env",[24,146,147],{"class":70},"                # ✗ excluded\n",[24,149,151,153,156],{"class":26,"line":150},6,[24,152,108],{"class":30},[24,154,155],{"class":34}," module.config.ts",[24,157,158],{"class":70},"    # ✓ included\n",[24,160,162,164,167],{"class":26,"line":161},7,[24,163,108],{"class":30},[24,165,166],{"class":34}," module.d.ts",[24,168,169],{"class":70},"         # ✓ included (generated by prepare)\n",[24,171,173,176,179],{"class":26,"line":172},8,[24,174,175],{"class":30},"└──",[24,177,178],{"class":34}," package.json",[24,180,181],{"class":70},"        # ✓ included\n",[49,183,185],{"id":184},"what-happens-on-install","What happens on install",[37,187,188,189,192,193,196,197,199,200,203],{},"When someone runs ",[21,190,191],{},"axon install @you\u002Fmy-module",", Axon exposes the source as\n",[21,194,195],{},"node_modules\u002F@you\u002Fmy-module",", incorporates ",[21,198,77],{}," dependencies, resolves nested\nmodule dependencies, scans and plugs its tools into the agent, merges type declarations\ninto the agent's ",[21,201,202],{},"axon.d.ts",", and prints the env keys the module needs.",[37,205,206],{},"The agent author installs one thing. Everything composes automatically.",[49,208,210],{"id":209},"versioning","Versioning",[37,212,213],{},"The registry uses semver, and published versions are immutable — once a version is on\nthe registry it cannot be overwritten. Bump the version before each publish.",[49,215,217],{"id":216},"declaring-env-requirements","Declaring env requirements",[37,219,220,221,224],{},"Env keys declared in ",[21,222,223],{},"module.config.ts"," are printed at install time:",[14,226,228],{"className":16,"code":227,"language":18,"meta":19,"style":19},"discord needs these environment keys:\n  • DISCORD_BOT_TOKEN — Bot token from the Discord developer portal.\n\nAdd these to your agent's .env after install.\n",[21,229,230,247,279,285],{"__ignoreMap":19},[24,231,232,235,238,241,244],{"class":26,"line":27},[24,233,234],{"class":30},"discord",[24,236,237],{"class":34}," needs",[24,239,240],{"class":34}," these",[24,242,243],{"class":34}," environment",[24,245,246],{"class":34}," keys:\n",[24,248,249,252,255,258,261,264,267,270,273,276],{"class":26,"line":105},[24,250,251],{"class":30},"  •",[24,253,254],{"class":34}," DISCORD_BOT_TOKEN",[24,256,257],{"class":34}," —",[24,259,260],{"class":34}," Bot",[24,262,263],{"class":34}," token",[24,265,266],{"class":34}," from",[24,268,269],{"class":34}," the",[24,271,272],{"class":34}," Discord",[24,274,275],{"class":34}," developer",[24,277,278],{"class":34}," portal.\n",[24,280,281],{"class":26,"line":117},[24,282,284],{"emptyLinePlaceholder":283},true,"\n",[24,286,287,290,292,295,298],{"class":26,"line":128},[24,288,289],{"class":30},"Add",[24,291,240],{"class":34},[24,293,294],{"class":34}," to",[24,296,297],{"class":34}," your",[24,299,300],{"class":34}," agent's .env after install.\n",[37,302,303,304,307],{},"The declaration drives the install prompt. The module validates at runtime with\n",[21,305,306],{},"axon.env.require()",".",[309,310,311],"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}",{"title":19,"searchDepth":105,"depth":105,"links":313},[314,315,316,317,318],{"id":51,"depth":105,"text":52},{"id":81,"depth":105,"text":82},{"id":184,"depth":105,"text":185},{"id":209,"depth":105,"text":210},{"id":216,"depth":105,"text":217},"md",{},"\u002Fdocs\u002Fv2\u002Fmodules\u002Fpublishing",{"title":5,"description":19},"docs\u002Fv2\u002Fmodules\u002Fpublishing","o-V6w6qk5ob3y00VBly-bTW9ah_0AG8fsS9rh4h6d40",1785671806632]