MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / install

Method install

src/installer/targets/opencode.ts:175–189  ·  view source on GitHub ↗
(loc: Location, _opts: InstallOptions)

Source from the content-addressed store, hash-verified

173 }
174
175 install(loc: Location, _opts: InstallOptions): WriteResult {
176 const files: WriteResult['files'] = [];
177 files.push(writeMcpEntry(loc));
178
179 // AGENTS.md gets the short marker-fenced CodeGraph block (#704):
180 // subagents and non-MCP harnesses read AGENTS.md but never the MCP
181 // initialize instructions. Upsert self-heals a stale pre-#529 block.
182 files.push(upsertInstructionsEntry(instructionsPath(loc)));
183
184 // Self-heal a pre-#535 install that wrote to %APPDATA%/opencode —
185 // opencode never reads it, so anything of ours there is stale.
186 if (loc === 'global') files.push(...cleanupLegacyWindowsState());
187
188 return { files };
189 }
190
191 uninstall(loc: Location): WriteResult {
192 const files: WriteResult['files'] = [];

Callers

nothing calls this directly

Calls 5

upsertInstructionsEntryFunction · 0.90
pushMethod · 0.80
writeMcpEntryFunction · 0.70
instructionsPathFunction · 0.70

Tested by

no test coverage detected