UNPKG

@code-yeongyu/senpi

Version:

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

3 lines (2 loc) • 823 B
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url); { const __piWorkerThreads = require("node:worker_threads"); if (typeof __piWorkerThreads.markAsUncloneable !== "function") { __piWorkerThreads.markAsUncloneable = () => {}; } } import{CredentialStoreBusyError}from"./chunk-7X72IACK.js";import{appendDebugLogEntry}from"./chunk-WHTAR5IS.js";async function writeHealthUnlessStoreBusy(what,write){try{return await write()}catch(error){if(!(error instanceof CredentialStoreBusyError))throw error;return appendDebugLogEntry("credential pool: skipped a health write, state file busy",`${what}: lock ${error.path} still held after ${error.waitedMs}ms`),STORE_BUSY}}var STORE_BUSY=Symbol("credential-pool-store-busy");export{writeHealthUnlessStoreBusy,STORE_BUSY};