UNPKG

grix-connector

Version:

Connect local AI coding agents (Claude, Codex, Gemini, Qwen, DeepSeek, Cursor, OpenCode, Pi, OpenHuman, Reasonix) to the Grix scheduling platform. Also serves as an OpenClaw plugin for Grix channel transport.

2 lines (1 loc) 423 B
async function i(e){return new Promise(r=>{let n="";const t=e?setTimeout(()=>{process.stdin.destroy(),r({})},e):null;process.stdin.setEncoding("utf8"),process.stdin.on("data",s=>{if(n+=s,t)try{const c=JSON.parse(n);clearTimeout(t),r(c);return}catch{}}),process.stdin.on("end",()=>{t&&clearTimeout(t);try{r(JSON.parse(n))}catch{r({})}}),process.stdin.on("error",()=>{t&&clearTimeout(t),r({})})})}export{i as readStdinJSON};