UNPKG

@code-yeongyu/senpi

Version:

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

27 lines • 2.3 kB
import type { HostDaemonPaths } from "./host-daemon-paths.ts"; /** A name one session or one host generation owns; a caller may never pass it to a child either (senpi#4381). */ export declare function isTransientDaemonEnvName(name: string): boolean; export declare function daemonEnvIsAllowed(name: string, platform?: NodeJS.Platform): boolean; /** * The `env` an ensure hands the daemon: every name it may NOT inherit mapped to `null` (which * removes it), then the launch spec's daemon-safe entries. Values are never inspected - a variable * is kept or dropped by its name alone - and an allowed spec entry wins because it was intentional. */ export declare function daemonEnvOverrides(processEnv: Readonly<Record<string, string | undefined>>, specEnv?: Readonly<Record<string, string>>, platform?: NodeJS.Platform): Record<string, string | null>; /** * The complete environment passed to a daemon spawn. It starts from the allowlisted process/system * scope, applies explicit launch overrides only when those names are daemon-safe, then applies the * generation's forced identity last. Building from an empty object means a transient value cannot * survive merely because a direct lifecycle caller bypassed `host-runner`. */ export declare function daemonEnvironment(processEnv: Readonly<Record<string, string | undefined>>, overrides?: Readonly<Record<string, string | null>>, forced?: Readonly<Record<string, string>>, platform?: NodeJS.Platform): NodeJS.ProcessEnv; /** The names the daemon ends up with, sorted. Names only: a value never leaves this process. */ export declare function daemonEnvKeys(processEnv: Readonly<Record<string, string | undefined>>, specEnv?: Readonly<Record<string, string>>, platform?: NodeJS.Platform): string[]; /** * Records the granted NAMES beside the daemon's other state, so `senpi host status` can report the * scope a running daemon was started with. Written by whichever client spawned the generation; * absent for a daemon started by a client that predates this file, which reads as "unknown scope". */ export declare function writeDaemonEnvKeys(paths: HostDaemonPaths, keys: readonly string[]): Promise<void>; export declare function readDaemonEnvKeys(paths: HostDaemonPaths): Promise<string[]>; //# sourceMappingURL=host-daemon-env.d.ts.map