@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
18 lines • 846 B
JavaScript
import { seatDigest } from "./seat-digest.js";
import { logContinuityEvent } from "./session-observability.js";
const MAX_DETAIL_CHARS = 200;
/**
* Writes one `account_blocked` line to session.log for every block that is saved, so a pool that later
* refuses a request locally has a recorded cause (senpi#4671). The account is named by its seat digest,
* never its name (Desktop#4753); an unknown end time is left out rather than guessed.
*/
export function logAccountBlocked(record) {
logContinuityEvent("account_blocked", {
seat: seatDigest(record.account),
reason: record.reason,
...(record.until === undefined ? {} : { until: new Date(record.until).toISOString() }),
shared: record.shared,
error: record.detail.slice(0, MAX_DETAIL_CHARS),
});
}
//# sourceMappingURL=account-block-log.js.map