MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / sh

Function sh

e2e/scenarios/mcp-opencode-real.test.ts:63–71  ·  view source on GitHub ↗
(line: string, timeoutMs: number)

Source from the content-addressed store, hash-verified

61 return after.trimEnd().endsWith("\n$") ? after : null;
62 };
63 const sh = async (line: string, timeoutMs: number) => {
64 await term.keyboard.type(line);
65 await term.keyboard.press("Enter");
66 const snapshot = await term.screen.waitUntil(
67 (current) => outputAfter(current.text, line) !== null,
68 { timeoutMs },
69 );
70 return outputAfter(snapshot.text, line) ?? "";
71 };
72
73 // OpenCode completes MCP OAuth for real: discovery, DCR, PKCE,
74 // its own scope request, its own token store.

Callers 1

Calls 2

outputAfterFunction · 0.70
waitUntilMethod · 0.65

Tested by

no test coverage detected