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

Method install

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

Source from the content-addressed store, hash-verified

149 }
150
151 install(loc: Location, _opts: InstallOptions): WriteResult {
152 const files: WriteResult['files'] = [];
153 files.push(writeMcpEntry(loc));
154
155 // AGENTS.md gets the short marker-fenced CodeGraph block (#704):
156 // subagents and non-MCP harnesses read AGENTS.md but never the MCP
157 // initialize instructions. Upsert self-heals a stale pre-#529 block.
158 files.push(upsertInstructionsEntry(instructionsPath(loc)));
159
160 // Self-heal a pre-#535 install that wrote to %APPDATA%/opencode —
161 // opencode never reads it, so anything of ours there is stale.
162 if (loc === 'global') files.push(...cleanupLegacyWindowsState());
163
164 return { files };
165 }
166
167 uninstall(loc: Location): WriteResult {
168 const files: WriteResult['files'] = [];

Callers

nothing calls this directly

Calls 4

upsertInstructionsEntryFunction · 0.90
writeMcpEntryFunction · 0.70
instructionsPathFunction · 0.70

Tested by

no test coverage detected