UNPKG

@code-yeongyu/senpi

Version:

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

44 lines • 2.27 kB
/** * First publication of the public socket secret through the Windows bridge (`crates/senpi-socket-secret`, * sisyphuslabs/omo-desktop-app#4199). The bridge result crosses a native boundary, so it is parsed here, never trusted. */ /** A staging file whose delete disposition failed; it is still at `path` and the caller removes it. */ export interface NativeLeftBehindStaging { readonly path: string; readonly windowsError: number; } /** `publishNoReplace` result. napi-rs leaves an absent optional field `undefined`. */ export interface NativePublishResult { readonly outcome: "published" | "collision" | "failed"; readonly failure?: { readonly step: string; readonly code: number; } | null; readonly stagingLeftBehind?: NativeLeftBehindStaging | null; } export interface LeftBehindStaging extends NativeLeftBehindStaging { /** What the caller must do; names the path, never the secret. */ readonly action: string; } export interface SocketSecretPublication { readonly outcome: "published" | "collision"; readonly stagingLeftBehind: LeftBehindStaging | null; } /** The bridge could not publish; `stagingLeftBehind` is set when its staging file also survived. */ export declare class SocketSecretPublishError extends Error { readonly code = "socket-secret-publish-failed"; readonly step: string; readonly windowsError: number | null; readonly stagingLeftBehind: LeftBehindStaging | null; constructor(step: string, windowsError: number | null, stagingLeftBehind: LeftBehindStaging | null, options?: ErrorOptions); } /** * First publication through the bridge (design 4.3): resolves `published` or `collision` (read the winner), throws * `SocketSecretPublishError` otherwise, including when the binding call itself throws (an unsupported platform, an * argument conversion) or returns a result of the wrong shape. Either way a staging file the bridge could not delete * is returned typed. */ export declare function publishSocketSecretNoReplace(binding: { publishNoReplace(stagingPath: string, finalPath: string, bytes: Buffer): NativePublishResult; }, stagingPath: string, finalPath: string, bytes: Buffer): SocketSecretPublication; //# sourceMappingURL=socket-secret-publish.d.ts.map