UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

39 lines • 2.35 kB
#!/usr/bin/env node import "./valid-cwd.js"; // Then report a coordinated host or supervisor start and release its filler pipes before the private // descriptor table is adopted, so no filler release can close an adopted channel (senpi#4602). import "./modes/rpc/host-startup-beacon.js"; // Then: capture the private descriptor table before anything can spawn (senpi#4749). import "./private-fds.js"; // Third, and before anything that can touch process.stdin: the guards above only change directory and read env. import "./modes/rpc/internal-bootstrap.js"; import "./windows-power-throttling-startup.js"; import "./internal-role.js"; import { enableStartupCompileCache } from "./compile-cache.js"; import { APP_NAME } from "./config.js"; import { scrubBrandFromEnvironment } from "./core/brand.js"; import { configureHttpDispatcher } from "./core/http-dispatcher.js"; import { installStaleExtensionContainment } from "./core/stale-extension-containment.js"; import { installEarlyInspectorVmImportRecovery } from "./inspector-policy.js"; import { dispatchAgentDirectoryCommand } from "./cli/agent-dir-command.js"; import { dispatchSessionOfPidCommand } from "./cli/session-of-pid-command.js"; await dispatchAgentDirectoryCommand(process.argv.slice(2)); await dispatchSessionOfPidCommand(process.argv.slice(2)); // A direct `cli-main` invocation (the bun binary, `--inspect` runs, tests) has no launcher parent to // inherit the cache from. Enabling it here is a no-op when cli.ts already published the directory. await enableStartupCompileCache(); // Must precede the asynchronous bootstrap: with --inspect-brk, the recoverable Inspector // import rejection can fire before interactive mode registers its own crash handler. installEarlyInspectorVmImportRecovery(); // A retired extension ctx must never end a print, RPC or host process either (oh-my-openagent#7114). installStaleExtensionContainment(); process.title = APP_NAME; // The brand has been resolved for this process; nested engine runs must not inherit it. scrubBrandFromEnvironment(); process.env.PI_CODING_AGENT = "true"; process.emitWarning = (() => { }); configureHttpDispatcher(); // Metadata commands exit above without importing the agent graph or opening any state. const { main } = await import("./main.js"); await main(process.argv.slice(2)); //# sourceMappingURL=cli-main.js.map