UNPKG

@code-yeongyu/senpi

Version:

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

19 lines • 756 B
const STATES = ["not_started", "ready", "unavailable"]; export function pathIdentityResolverStatus(resolver) { const detail = resolver.unavailable; if (detail !== undefined) return { state: "unavailable", detail }; return { state: resolver.snapshot === undefined ? "not_started" : "ready", detail: null }; } function isState(value) { return STATES.some((state) => state === value); } export function parsePathIdentityResolverStatus(value) { if (typeof value !== "object" || value === null) return undefined; const { state, detail } = value; if (!isState(state)) return undefined; return { state, detail: typeof detail === "string" ? detail : null }; } //# sourceMappingURL=path-identity-status.js.map