UNPKG

@code-yeongyu/senpi

Version:

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

44 lines • 2.47 kB
/** Snapshot of host facts rendered into the workstation block. */ export interface WorkstationFacts { /** `os.platform()`, e.g. `darwin`. */ readonly osLine: string; /** Kernel identity: `<uname -s> <uname -r>`, e.g. `Darwin 25.3.0`. */ readonly kernel: string; /** `os.arch()`, e.g. `arm64`. */ readonly arch: string; /** CPU model plus logical core count, e.g. `Apple M5 Max (18 cores)`. */ readonly cpu?: string; /** GPU model when cheaply derivable (Apple Silicon shares the SoC name). */ readonly gpu?: string; /** Terminal emulator name/version from TERM_PROGRAM/TERM. */ readonly terminal?: string; } /** * Wording dialect for the execution-context instruction under the facts. * Families follow the prompt-preset conventions: Claude/GLM take direct * imperatives in a tagged block, GPT (codex) takes terse bounded rules, Kimi * takes positive operational constraints (all-caps directives make K2.x * overthink), the `gemini` dialect takes one plain sentence pair (the * provider's guidance: direct instructions, no persuasive emphasis), and `default` is * the maximum-emphasis fallback for unmatched models. */ export type WorkstationDialect = "default" | "claude" | "codex" | "kimi" | "gemini"; /** * `filePath` as the prompt should show it: under the test-only `repoRoot` pin, a path inside the pinned checkout * (`from`) is shown under `to`. Every other path, and every path when the pin is unset, is returned unchanged. * Only for rendering: reads and writes keep using the real path. */ export declare function pinnedDisplayPath(filePath: string, env?: NodeJS.ProcessEnv): string; /** Read host facts from `node:os` and `env`, honoring the test-only `SENPI_TEST_WORKSTATION` pin. Not cached. */ export declare function readWorkstationFacts(env?: NodeJS.ProcessEnv): WorkstationFacts; /** Collect host facts once per process; every call after the first is free. */ export declare function collectWorkstationFacts(): WorkstationFacts; export interface BuildWorkstationSectionOptions { readonly selectedTools: readonly string[]; readonly dialect?: WorkstationDialect; /** Override collected facts (tests). */ readonly facts?: WorkstationFacts; } /** Render the `<workstation>` facts block plus the dialect-tuned execution-context instruction. */ export declare function buildWorkstationSection(options: BuildWorkstationSectionOptions): string; //# sourceMappingURL=workstation.d.ts.map