MCPcopy Create free account
hub / github.com/TestSprite/testsprite-cli / toAgentDeps

Function toAgentDeps

src/commands/init.ts:139–148  ·  view source on GitHub ↗

* Build AgentDeps from InitDeps. `stdout` is suppressed for the same reason — * runInit owns output. The result is parsed from the captured JSON in the * caller, not forwarded to user stdout.

(deps: InitDeps, captureStdout?: (line: string) => void)

Source from the content-addressed store, hash-verified

137 * caller, not forwarded to user stdout.
138 */
139function toAgentDeps(deps: InitDeps, captureStdout?: (line: string) => void): AgentDeps {
140 return {
141 cwd: deps.cwd,
142 fs: deps.fs,
143 stdout: captureStdout ?? _suppressedStdout,
144 stderr: deps.stderr,
145 isTTY: deps.isTTY,
146 prompt: deps.agentPrompt,
147 };
148}
149
150// Discards stdout lines from sub-commands so runInit owns the output surface.
151function _suppressedStdout(_line: string): void {

Callers 1

runInitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected