@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
14 lines • 703 B
JavaScript
import { rpcKeyRoot } from "./rpc-auth-client.js";
/**
* Where a host request proves endpoint keys from (senpi#3815): the caller's explicit `--rpc-key-root`, then a gc's
* explicit target directory (it dials that directory's endpoints, whose hosts published their records there), then
* an enclosing key root, `SENPI_RPC_KEY_ROOT`, and finally the target's agent dir.
*/
export function hostRequestKeyRoot(request, explicit) {
if (explicit !== undefined)
return explicit;
if (request.action === "gc")
return request.agentDir;
return rpcKeyRoot({}, request.action === "shard_path" ? undefined : request.target.agentDir);
}
//# sourceMappingURL=host-request-key-root.js.map