MCPcopy Index your code
hub / github.com/TanStack/ai / projectOpencodeWorkspace

Function projectOpencodeWorkspace

packages/ai-opencode/src/adapters/projection.ts:204–220  ·  view source on GitHub ↗
(
  handle: SandboxHandle,
  projection: WorkspaceProjection,
)

Source from the content-addressed store, hash-verified

202 * @param projection - The portable workspace inputs from `withSandbox`.
203 */
204export async function projectOpencodeWorkspace(
205 handle: SandboxHandle,
206 projection: WorkspaceProjection,
207): Promise<void> {
208 // Always re-resolve and rewrite the secret-bearing MCP config so rotated
209 // secrets re-apply and snapshots can't serve stale values.
210 await projectMcpServers(handle, projection)
211
212 // Gate only the safe, idempotent, non-secret operations on the marker.
213 if (await handle.fs.exists(projection.markerPath)) return
214
215 projectGitSkills(projection)
216 projectAgentSkills(projection)
217 projectPlugins(projection)
218
219 await handle.fs.write(projection.markerPath, '')
220}

Callers 2

chatStreamMethod · 0.90
projection.test.tsFile · 0.90

Calls 5

writeMethod · 0.80
projectMcpServersFunction · 0.70
projectGitSkillsFunction · 0.70
projectAgentSkillsFunction · 0.70
projectPluginsFunction · 0.70

Tested by

no test coverage detected