mvp-ai's picture
download
raw
833 Bytes
const { spawnSync } = require("node:child_process");
const readline = require("node:readline");
const [crew, transcript, cwd, sid] = process.argv.slice(2);
function hook(event) {
return spawnSync(process.execPath, [crew, "--hook"], {
env: process.env,
input: JSON.stringify({
session_id: sid,
hook_event_name: event,
transcript_path: transcript,
cwd,
model: "gpt-test",
}),
encoding: "utf8",
});
}
const started = hook("SessionStart");
if (started.status !== 0) {
process.stderr.write(started.stderr);
process.exit(started.status ?? 1);
}
process.stdout.write("ready\n");
readline.createInterface({ input: process.stdin }).on("line", (line) => {
if (line === "stop") {
const stopped = hook("Stop");
process.stdout.write(`hook:${stopped.stdout.trim()}\n`);
}
});

Xet Storage Details

Size:
833 Bytes
·
Xet hash:
3b1000cad8b9189f184a3d477aad433afe2c9045b7faa02ea7cf34124101b1e6

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.