Files
rea/experiments/atomic-codemode/cli.mjs
T
5aa1c5c64f experiment(re): expose shared atomic facts through isolated Code Mode
Add a compact rea-codemode MCP server, bounded QuickJS execution and shared SDK/direct adapters. Reuse native target and process owners; retain evidence and lease-scoped snapshots. Extend the real-model trial runner with an isolated experimental MCP registration. Capability and evaluation work remains in progress.

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
2026-10-16 03:17:05 +00:00

20 lines
528 B
JavaScript

import { readFile } from "node:fs/promises";
import { AtomicSession } from "./api.mjs";
import { executeJavaScript } from "./executor.mjs";
const [binary, script] = process.argv.slice(2);
if (!binary || !script)
throw new Error("Usage: node cli.mjs BINARY JAVASCRIPT_FILE");
const session = new AtomicSession();
try {
await session.open(binary);
console.log(
JSON.stringify(
await executeJavaScript(session, await readFile(script, "utf8")),
),
);
} finally {
session.abort();
await session.close();
}