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

Function sh

e2e/cloud/toolkit-opencode-real.test.ts:66–74  ·  view source on GitHub ↗
(line: string, timeoutMs: number)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 2

outputAfterFunction · 0.70
waitUntilMethod · 0.65

Tested by

no test coverage detected