UNPKG

@code-yeongyu/senpi

Version:

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

46 lines • 2.31 kB
/** * The one launch-environment builder every engine trust writer uses (omo's trust exec, senpi's * daemon and handover spawns, the desktop boundary and browser-skill host), the arrival reading a * launch decides adopt / import / refuse from, and the restore an adopting engine applies to its * JS `process.env` before any Worker, child or agent shell exists (omo#10762). */ import { type EnvironmentEntries } from "./environment-names.ts"; import { type EngineTrustMarker, type EngineTrustRestore } from "./marker.ts"; export type TrustMarkerArrival = { readonly kind: "none"; } | { readonly kind: "addressed"; readonly marker: EngineTrustMarker; } | { readonly kind: "foreign"; readonly reason: "unparseable" | "file-mismatch" | "ambiguous"; }; export type TrustArrival = { readonly hop: boolean; readonly marker: TrustMarkerArrival; }; /** * A marker is addressed only when its `file` is exactly the native `NODE_EXTRA_CA_CERTS`, which * every writer sets from the same string. Two different values under Windows case forms are never * resolved here: which one the child's CRT returns is not ours to guess, so the marker is foreign. */ export declare function classifyTrustArrival(env: EnvironmentEntries, platform: NodeJS.Platform): TrustArrival; export type TrustLaunchOptions = { readonly marker: EngineTrustMarker; /** True only for the launcher's own trust exec. */ readonly hop: boolean; readonly platform: NodeJS.Platform; }; /** * `base` with the trust launch environment applied last. It removes every case form of each name * it writes or must not pass, so the child holds exactly one entry per trust name; nothing may be * merged after it. */ export declare function buildTrustLaunchEnvironment(base: EnvironmentEntries, options: TrustLaunchOptions): Record<string, string>; /** * Applied by an adopting engine to its JS `process.env`: the recorded arrival values come back for * children, each name the restore omits or maps to null is deleted, and the marker and the hop go, * so an agent shell or nested `omo` never holds either. */ export declare function applyEngineTrustRestore(env: Record<string, string | undefined>, restore: EngineTrustRestore, platform: NodeJS.Platform): void; //# sourceMappingURL=launch-environment.d.ts.map