MCPcopy Create free account
hub / github.com/ShipSecAI/studio / loadPtySpawn

Function loadPtySpawn

packages/component-sdk/src/runner.ts:63–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61}
62
63async function loadPtySpawn(): Promise<PtySpawn | null> {
64 if (cachedPtySpawn) {
65 return cachedPtySpawn;
66 }
67 try {
68 const mod = await import('node-pty');
69 cachedPtySpawn = mod.spawn;
70 return cachedPtySpawn;
71 } catch (error) {
72 console.warn('[Docker][PTY] node-pty module not available:', error instanceof Error ? error.message : error);
73 return null;
74 }
75}
76
77export async function runComponentInline<I, O>(
78 execute: (params: I, context: ExecutionContext) => Promise<O>,

Callers 1

runDockerWithPtyFunction · 0.85

Calls 1

warnMethod · 0.80

Tested by

no test coverage detected