Files
rea/experiments/atomic-codemode/cli.mjs
T
a7e9f8843b experiment(re): expose native CFG and value identities for composition
[AUTOMATED] Preserve the opt-in pinned Kuna exporter as a reproducible source patch. Share typed graph/value reads and derived control dependence through the SDK, CLI and MCP adapters, retaining unknown runtime and memory semantics.

Validated 29 focused tests, lint, actual diagnostic/native MCP workflows and a real zlib CLI composition. C and line mappings match the prior stock capture. Full upstream corpus/workspace gates and revised real-model costs remain unverified.

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 04:28:22 +00:00

21 lines
584 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);
const result = await executeJavaScript(
session,
await readFile(script, "utf8"),
);
console.log(JSON.stringify(result));
process.exitCode = result.ok ? 0 : 1;
} finally {
session.abort();
await session.close();
}