mirror of
https://github.com/agentclientprotocol/claude-agent-acp.git
synced 2026-11-12 20:31:15 +00:00
A child process can't run a file inside $bunfs, so the embedded CLI had to be copied to the temp directory on first run (~300 MB, a second copy on disk). Shipping it in the archive next to claude-agent-acp needs no extraction, and the entry no longer has to be generated per target.
13 lines
646 B
TypeScript
13 lines
646 B
TypeScript
// Entry of the release executable (`scripts/build-binary.mjs`). It registers the
|
|
// Claude CLI shipped next to the executable before importing the agent:
|
|
// index.ts starts serving (or, with --cli, spawns the CLI) while it evaluates,
|
|
// and a static import would evaluate it before this module's body runs.
|
|
import { realpathSync } from "node:fs";
|
|
import { dirname } from "node:path";
|
|
import { useBundledClaudeCli } from "./claude-cli.js";
|
|
|
|
// realpath, so a symlink to the executable (e.g. in /usr/local/bin) still finds
|
|
// the CLI next to the real file.
|
|
useBundledClaudeCli(dirname(realpathSync(process.execPath)));
|
|
await import("./index.js");
|