(loc: Location, _opts: InstallOptions)
| 174 | } |
| 175 | |
| 176 | install(loc: Location, _opts: InstallOptions): WriteResult { |
| 177 | const files: WriteResult['files'] = []; |
| 178 | files.push(writeMcpEntry(loc)); |
| 179 | |
| 180 | // AGENTS.md gets the short marker-fenced CodeGraph block (#704): |
| 181 | // subagents and non-MCP harnesses read AGENTS.md but never the MCP |
| 182 | // initialize instructions. Upsert self-heals a stale pre-#529 block, and |
| 183 | // the plain block an earlier install wrote. OpenCode's block names the |
| 184 | // tool as OpenCode lists it, `codegraph_codegraph_explore` (#1267). |
| 185 | files.push(upsertInstructionsEntry(instructionsPath(loc), OPENCODE_INSTRUCTIONS_BLOCK)); |
| 186 | |
| 187 | // Self-heal a pre-#535 install that wrote to %APPDATA%/opencode — |
| 188 | // opencode never reads it, so anything of ours there is stale. |
| 189 | if (loc === 'global') files.push(...cleanupLegacyWindowsState()); |
| 190 | |
| 191 | return { files }; |
| 192 | } |
| 193 | |
| 194 | uninstall(loc: Location): WriteResult { |
| 195 | const files: WriteResult['files'] = []; |
nothing calls this directly
no test coverage detected