MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / ptySpawnParams

Function ptySpawnParams

projects/runtime-node/src/pty.ts:93–102  ·  view source on GitHub ↗
(params: unknown)

Source from the content-addressed store, hash-verified

91}
92
93function ptySpawnParams(params: unknown): RuntimeNodePtySpawnParams {
94 const record = asRecord(params)
95 return {
96 ptyId: typeof record.ptyId === "string" && record.ptyId.length > 0 ? record.ptyId : `pty-${randomUUID()}`,
97 cwd: requiredString(record, "cwd"),
98 env: optionalStringRecord(record.env),
99 cols: optionalNumber(record.cols) ?? 100,
100 rows: optionalNumber(record.rows) ?? 30,
101 }
102}
103
104export function registerRuntimeNodePtyModule(server: RuntimeServer, adapter: RuntimeNodePtyAdapter): () => void {
105 server.registerNotification("pty/started")

Callers 1

Calls 4

requiredStringFunction · 0.90
optionalStringRecordFunction · 0.90
asRecordFunction · 0.70
optionalNumberFunction · 0.70

Tested by

no test coverage detected