@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
33 lines • 1.42 kB
TypeScript
export interface SessionCwdIssue {
sessionFile?: string;
sessionCwd: string;
fallbackCwd: string;
}
interface SessionCwdSource {
getCwd(): string;
getSessionFile(): string | undefined;
}
export declare function getMissingSessionCwdIssue(sessionManager: SessionCwdSource, fallbackCwd: string): SessionCwdIssue | undefined;
export declare function formatMissingSessionCwdError(issue: SessionCwdIssue): string;
export declare function formatMissingSessionCwdPrompt(issue: SessionCwdIssue): string;
export declare class MissingSessionCwdError extends Error {
readonly issue: SessionCwdIssue;
constructor(issue: SessionCwdIssue);
}
/** A session cwd that exists but is not a folder (a file, a socket): its tools could not run there. */
export interface SessionCwdNotDirectoryIssue {
sessionFile?: string;
sessionCwd: string;
}
export declare class SessionCwdNotDirectoryError extends Error {
readonly issue: SessionCwdNotDirectoryIssue;
constructor(issue: SessionCwdNotDirectoryIssue);
}
/**
* Async on purpose: the RPC session path may not reach a synchronous filesystem call
* (test/suite/no-sync-in-session-path.test.ts), so the directory probe is awaited here rather
* than taken with statSync.
*/
export declare function assertSessionCwdExists(sessionManager: SessionCwdSource, fallbackCwd: string): Promise<void>;
export {};
//# sourceMappingURL=session-cwd.d.ts.map