@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
50 lines • 2.38 kB
TypeScript
import type { InstallMethod } from "../../config.ts";
import type { BrandProfile } from "../../core/brand.ts";
import type { NoticeSpec } from "../../core/extensions/notice/index.ts";
export declare const SKIP_RUNTIME_NOTICE_ENV_SUFFIX = "SKIP_RUNTIME_NOTICE";
export type RuntimeNoticeSkip = "bun-runtime" | "node-pinned" | "inspector" | "skip-requested" | "already-shown";
export interface RuntimeNoticeGate {
readonly versions: Readonly<Record<string, string | undefined>>;
readonly env: NodeJS.ProcessEnv;
readonly hasInheritedInspectorOption: boolean;
readonly skipRequested: boolean;
readonly engineVersion: string;
readonly shownVersion: string | undefined;
}
/**
* The variable that pins the runtime from the user's side. The OmO Native launcher always
* forwards its own runtime as `SENPI_RUNTIME`, so under OmO Native only `OMO_RUNTIME` is the
* user's choice; a forwarded `SENPI_RUNTIME=node` just means the launcher could not use Bun.
*/
export declare function runtimePinEnvName(env: NodeJS.ProcessEnv): string;
export declare function runtimeNoticeSkipReason(gate: RuntimeNoticeGate): RuntimeNoticeSkip | undefined;
export type BunAvailability = {
readonly kind: "missing";
} | {
readonly kind: "outdated";
readonly version: string | undefined;
} | {
readonly kind: "ready";
readonly version: string;
};
export interface ReinstallTarget {
readonly packageName: string;
readonly installSpec: string;
readonly ignoreScripts: boolean;
}
export declare function reinstallTarget(brand: BrandProfile | undefined, packageName: string): ReinstallTarget | undefined;
/** Clean reinstall: remove the Node-managed copy so PATH cannot keep resolving it, then add it with Bun. */
export declare function bunReinstallCommand(method: InstallMethod, target: ReinstallTarget): string;
export declare function installBunCommand(platform: NodeJS.Platform): string;
export interface RuntimeNoticeInput {
readonly appName: string;
readonly appCommand: string;
readonly nodeVersion: string;
readonly platform: NodeJS.Platform;
readonly installMethod: InstallMethod;
readonly target: ReinstallTarget | undefined;
readonly bun: BunAvailability;
readonly pinEnvName: string;
}
export declare function buildRuntimeNotice(input: RuntimeNoticeInput): NoticeSpec;
//# sourceMappingURL=runtime-notice.d.ts.map