[{"data":1,"prerenderedAt":569},["ShallowReactive",2],{"footer-links":3,"content-\u002Fdevelopment":12},[4,9],{"path":5,"title":6,"type":7,"isExternal":8},"https:\u002F\u002Fgithub.com\u002Fahumandev\u002Fautocode","GitHub","link",true,{"path":10,"title":11,"type":7,"isExternal":8},"https:\u002F\u002Fwww.npmjs.com\u002F@ahumandev\u002Fautocode","NPM",{"id":13,"title":14,"body":15,"description":563,"extension":564,"meta":565,"navigation":8,"path":566,"seo":567,"stem":21,"__hash__":568},"content\u002Fdevelopment.md","Development",{"type":16,"value":17,"toc":555},"minimark",[18,22,35,88,123,140,145,155,159,173,215,221,225,228,335,339,433,442,446,452,464,467,470,484,487,491,494,515,543,551],[19,20,14],"h1",{"id":21},"development",[23,24,25,26,34],"p",{},"AutoCode is a TypeScript OpenCode plugin\u002Flibrary. The plugin entry point is ",[27,28,30],"a",{"href":29},"..\u002Fsrc\u002Fplugin.ts",[31,32,33],"code",{},"src\u002Fplugin.ts",", which injects generated skills, loads configuration, derives external-directory permission rules, merges tier-specific agent model settings, registers managed agents, registers managed commands, and exposes runtime tools.",[36,37,42],"pre",{"className":38,"code":39,"language":40,"meta":41,"style":41},"language-mermaid shiki shiki-themes github-light github-dark","flowchart LR\n  Plugin[src\u002Fplugin.ts] --> Config[src\u002Fconfig.ts]\n  Plugin --> Agents[src\u002Fagents]\n  Plugin --> Commands[src\u002Fcommands]\n  Plugin --> Skills[src\u002Fskills]\n  Plugin --> Tools[src\u002Ftools]\n  Tools --> Utils[src\u002Futils]\n","mermaid","",[31,43,44,52,58,64,70,76,82],{"__ignoreMap":41},[45,46,49],"span",{"class":47,"line":48},"line",1,[45,50,51],{},"flowchart LR\n",[45,53,55],{"class":47,"line":54},2,[45,56,57],{},"  Plugin[src\u002Fplugin.ts] --> Config[src\u002Fconfig.ts]\n",[45,59,61],{"class":47,"line":60},3,[45,62,63],{},"  Plugin --> Agents[src\u002Fagents]\n",[45,65,67],{"class":47,"line":66},4,[45,68,69],{},"  Plugin --> Commands[src\u002Fcommands]\n",[45,71,73],{"class":47,"line":72},5,[45,74,75],{},"  Plugin --> Skills[src\u002Fskills]\n",[45,77,79],{"class":47,"line":78},6,[45,80,81],{},"  Plugin --> Tools[src\u002Ftools]\n",[45,83,85],{"class":47,"line":84},7,[45,86,87],{},"  Tools --> Utils[src\u002Futils]\n",[23,89,90,91,97,98,104,105,111,112,118,119,122],{},"The managed agent catalogue lives in ",[27,92,94],{"href":93},"..\u002Fsrc\u002Fagents\u002Findex.ts",[31,95,96],{},"src\u002Fagents\u002Findex.ts",", and prompt templates live under ",[27,99,101],{"href":100},"..\u002Fsrc\u002Fagents\u002Fprompts\u002F",[31,102,103],{},"src\u002Fagents\u002Fprompts\u002F",". Commands are registered in ",[27,106,108],{"href":107},"..\u002Fsrc\u002Fcommands\u002Findex.ts",[31,109,110],{},"src\u002Fcommands\u002Findex.ts",", so the published package does not need separate command Markdown files. Generated skills are bundled from source during builds, and ",[27,113,115],{"href":114},"..\u002Fscripts\u002Fcopy-skill-sources.ts",[31,116,117],{},"scripts\u002Fcopy-skill-sources.ts"," copies them into ",[31,120,121],{},"dist\u002Fskills",".",[23,124,125,126,132,133,139],{},"Runtime tools live in ",[27,127,129],{"href":128},"..\u002Fsrc\u002Ftools\u002F",[31,130,131],{},"src\u002Ftools\u002F",". They cover concept and plan management, job lifecycle updates, criteria tracking, read-only database discovery and table reads, REST requests and cached response lookup, sandbox lifecycle operations, cross-project task execution, and session resume support. Shared tool error handling should stay aligned with ",[27,134,136],{"href":135},"..\u002Fsrc\u002Futils\u002Ftools.ts",[31,137,138],{},"src\u002Futils\u002Ftools.ts"," and the agent error rules.",[141,142,144],"h3",{"id":143},"generated-skills","Generated skills",[23,146,147,148,150,151,154],{},"Builds copy bundled skills into ",[31,149,121],{},", and the plugin can install the generated output for OpenCode under ",[31,152,153],{},"~\u002F.agents\u002Fskills\u002Fautocode\u002F"," or the equivalent XDG configuration location. Skills are knowledge files that OpenCode loads into AI context so agents and workflows can follow project-specific instructions; users do not need to invoke these files directly.",[141,156,158],{"id":157},"sandbox-execution","Sandbox execution",[23,160,161,162,168,169,172],{},"Linux sandbox execution requires usable ",[27,163,167],{"href":164,"rel":165},"https:\u002F\u002Fgithub.com\u002Fcontainers\u002Fbubblewrap",[166],"nofollow","Bubblewrap"," (",[31,170,171],{},"bwrap",").",[23,174,175,176,179,180,179,183,179,186,179,189,179,192,179,195,198,199,202,203,206,207,210,211,214],{},"Sandbox tools include ",[31,177,178],{},"autocode_sandbox_create",", ",[31,181,182],{},"autocode_sandbox_cli",[31,184,185],{},"autocode_sandbox_delete",[31,187,188],{},"autocode_sandbox_read",[31,190,191],{},"autocode_sandbox_glob",[31,193,194],{},"autocode_sandbox_grep",[31,196,197],{},"autocode_sandbox_edit",", and ",[31,200,201],{},"autocode_sandbox_copy",". Sandboxes expose ",[31,204,205],{},"\u002Fsandbox"," for writable work, ",[31,208,209],{},"\u002Fhome"," for the sandbox home, and ",[31,212,213],{},"\u002Fworkspace"," as a read-only project mount.",[23,216,217,218,220],{},"Unsupported hosts include macOS, Windows, Android or Termux, non-Linux systems, and Linux systems without usable ",[31,219,171],{}," or user namespace support. When sandboxing is unsupported, AutoCode disables the sandbox execution agent and force-denies sandbox create, CLI, delete, read, glob, grep, edit, and copy tools.",[141,222,224],{"id":223},"local-setup","Local setup",[23,226,227],{},"Local setup is for repository development only. It is not the public npm installation flow.",[229,230,231,262,296,319],"ol",{},[232,233,234,235,252,255,256,122],"li",{},"Install dependencies from the repository root.",[36,236,240],{"className":237,"code":238,"language":239,"meta":41,"style":41},"language-bash shiki shiki-themes github-light github-dark","bun install\n","bash",[31,241,242],{"__ignoreMap":41},[45,243,244,248],{"class":47,"line":48},[45,245,247],{"class":246},"sScJk","bun",[45,249,251],{"class":250},"sZZnC"," install\n",[253,254],"br",{},"Bun installs the dependencies declared in ",[27,257,259],{"href":258},"..\u002Fpackage.json",[31,260,261],{},"package.json",[232,263,264,265,280,282,283,286,287,291,292,295],{},"Build the plugin.",[36,266,268],{"className":237,"code":267,"language":239,"meta":41,"style":41},"bun run build\n",[31,269,270],{"__ignoreMap":41},[45,271,272,274,277],{"class":47,"line":48},[45,273,247],{"class":246},[45,275,276],{"class":250}," run",[45,278,279],{"class":250}," build\n",[253,281],{},"The build removes ",[31,284,285],{},"dist",", bundles ",[27,288,289],{"href":29},[31,290,33],{},", emits TypeScript declarations, and copies generated skill sources into ",[31,293,294],{},"dist\u002F",". It does not install the local shim.",[232,297,298,299,313,315,316,122],{},"Install the local shim when you want OpenCode to load the repository build.",[36,300,302],{"className":237,"code":301,"language":239,"meta":41,"style":41},"bun run install:shim\n",[31,303,304],{"__ignoreMap":41},[45,305,306,308,310],{"class":47,"line":48},[45,307,247],{"class":246},[45,309,276],{"class":250},[45,311,312],{"class":250}," install:shim\n",[253,314],{},"This writes the local development shim to ",[31,317,318],{},"~\u002F.config\u002Fopencode\u002Fplugins\u002Fautocode.js",[232,320,321,322,324,325,331,332,122],{},"Load the plugin in OpenCode.",[253,323],{},"For local development in this repository, ",[27,326,328],{"href":327},"..\u002F.opencode\u002Fplugin\u002Fautocode.ts",[31,329,330],{},".opencode\u002Fplugin\u002Fautocode.ts"," re-exports the built plugin from ",[31,333,334],{},"dist\u002Fplugin.js",[141,336,338],{"id":337},"development-commands","Development commands",[340,341,342,355],"table",{},[343,344,345],"thead",{},[346,347,348,352],"tr",{},[349,350,351],"th",{},"Command",[349,353,354],{},"Purpose",[356,357,358,378,390,400,413,423],"tbody",{},[346,359,360,366],{},[361,362,363],"td",{},[31,364,365],{},"bun run build",[361,367,368,369,371,372,374,375,377],{},"Removes ",[31,370,285],{},", builds ",[31,373,33],{},", emits declarations, and copies generated skills into ",[31,376,294],{},". Does not install the shim.",[346,379,380,385],{},[361,381,382],{},[31,383,384],{},"bun run install:shim",[361,386,387,388,122],{},"Installs the local development shim at ",[31,389,318],{},[346,391,392,397],{},[361,393,394],{},[31,395,396],{},"bun run watch",[361,398,399],{},"Copies generated skills once, then watches the Bun bundle and declarations as source files change.",[346,401,402,407],{},[361,403,404],{},[31,405,406],{},"bun test",[361,408,409,410,122],{},"Runs the Bun test suite under ",[31,411,412],{},"src",[346,414,415,420],{},[361,416,417],{},[31,418,419],{},"bun run typecheck",[361,421,422],{},"Runs TypeScript type checking without emitting files.",[346,424,425,430],{},[361,426,427],{},[31,428,429],{},"bun run verify:sandbox-online",[361,431,432],{},"Runs the sandbox verification script.",[23,434,435,436,439,440,122],{},"There is no ",[31,437,438],{},"lint"," script in the current ",[31,441,261],{},[141,443,445],{"id":444},"testing","Testing",[23,447,448,449,122],{},"The repository includes Bun tests for tools and generated skills under ",[31,450,451],{},"src\u002F**\u002F*.test.ts",[36,453,455],{"className":237,"code":454,"language":239,"meta":41,"style":41},"bun test\n",[31,456,457],{"__ignoreMap":41},[45,458,459,461],{"class":47,"line":48},[45,460,247],{"class":246},[45,462,463],{"class":250}," test\n",[23,465,466],{},"Review the Bun test summary in your terminal to confirm whether the suite passed.",[23,468,469],{},"Run TypeScript type checking separately.",[36,471,473],{"className":237,"code":472,"language":239,"meta":41,"style":41},"bun run typecheck\n",[31,474,475],{"__ignoreMap":41},[45,476,477,479,481],{"class":47,"line":48},[45,478,247],{"class":246},[45,480,276],{"class":250},[45,482,483],{"class":250}," typecheck\n",[23,485,486],{},"TypeScript reports diagnostics if type checking fails, and exits successfully when no diagnostics are emitted.",[141,488,490],{"id":489},"local-plugin-deployment","Local Plugin Deployment",[23,492,493],{},"Build the distributable plugin only for the local source workflow in this repository, when you are building AutoCode yourself and deploying or testing it locally through the local shim. This is not the npm publish or npm install workflow.",[36,495,497],{"className":237,"code":496,"language":239,"meta":41,"style":41},"bun run build\nbun run install:shim\n",[31,498,499,507],{"__ignoreMap":41},[45,500,501,503,505],{"class":47,"line":48},[45,502,247],{"class":246},[45,504,276],{"class":250},[45,506,279],{"class":250},[45,508,509,511,513],{"class":47,"line":54},[45,510,247],{"class":246},[45,512,276],{"class":250},[45,514,312],{"class":250},[23,516,517,518,520,521,523,524,526,527,179,530,198,533,536,537,539,540,542],{},"The build output is written to ",[31,519,294],{},", including ",[31,522,334],{},", declarations, and copied generated skills under ",[31,525,121],{},", matching the ",[31,528,529],{},"main",[31,531,532],{},"types",[31,534,535],{},"exports"," fields in ",[31,538,261],{},". Run ",[31,541,384],{}," separately when you need the local OpenCode shim.",[23,544,545,546,550],{},"See ",[27,547,549],{"href":548},"distribution","Distribution Guide"," for more information about distributing AutoCode on public registries.",[552,553,554],"style",{},"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 .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":41,"searchDepth":54,"depth":54,"links":556},[557,558,559,560,561,562],{"id":143,"depth":60,"text":144},{"id":157,"depth":60,"text":158},{"id":223,"depth":60,"text":224},{"id":337,"depth":60,"text":338},{"id":444,"depth":60,"text":445},{"id":489,"depth":60,"text":490},"AutoCode is a TypeScript OpenCode plugin\u002Flibrary. The plugin entry point is src\u002Fplugin.ts, which injects generated skills, loads configuration, derives external-directory permission rules, merges tier-specific agent model settings, registers managed agents, registers managed commands, and exposes runtime tools.","md",{},"\u002Fdevelopment",{"title":14,"description":563},"j0hentiD3N44Nzg0AWR2yAWfmyIwr2jaqFp3SftZpCI",1784015220745]