@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
3 lines (2 loc) • 2.1 kB
JavaScript
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{writeHealthUnlessStoreBusy}from"./chunk-ZQDL3PAQ.js";import{CredentialSlotRepository}from"./chunk-PQGNLQCI.js";import"./chunk-ZZU4J6QP.js";import"./chunk-GZVCRV7I.js";import"./chunk-236TAYFX.js";import"./chunk-36BLGKRO.js";import"./chunk-FKX6EWFV.js";import"./chunk-U3VOXCGP.js";import"./chunk-7X72IACK.js";import"./chunk-WHTAR5IS.js";import"./chunk-62OVOJPI.js";import"./chunk-G7U4BOJP.js";import"./chunk-OBXBNBXE.js";import"./chunk-XDEZA6U6.js";import"./chunk-COH5F7QV.js";import"./chunk-RFB5CBW7.js";import"./chunk-Y7QPP7BG.js";import"./chunk-7K42R46I.js";import"./chunk-GVSBCJFI.js";import"./chunk-Z6TEQEZO.js";import"./chunk-ZG3MNTNX.js";import"./chunk-WHPDEDCC.js";import"./chunk-HK46JMSC.js";import"./chunk-5ROMKDLK.js";import"./chunk-3W47LTXQ.js";import"./chunk-QD45L5SP.js";import"./chunk-WDTJ6JKE.js";import{listSlots}from"./chunk-AFDUWYAX.js";import"./chunk-NDNQ23SK.js";import"./chunk-JGKH3D6W.js";import"./chunk-3SASTB6Y.js";import"./chunk-PJ34QVL5.js";import"./chunk-QJTWAOBX.js";import"./chunk-ATQFN5HI.js";import"./chunk-MIKPY3E7.js";import"./chunk-IKOFCODM.js";function slotsStartedByLogin(before,after){let previous=new Map(listSlots(before).map(slot=>[slot.name,slot]));return listSlots(after).filter(slot=>{let old=previous.get(slot.name);return old===void 0||!sameMaterial(old,slot)}).map(slot=>slot.name)}function sameMaterial(a,b){return a.access===b.access&&a.refresh===b.refresh&&a.key===b.key}async function retireLoginSlotHealth(statePath,providerId,before,after){let started=slotsStartedByLogin(before,after);if(started.length===0)return;let repository=new CredentialSlotRepository(statePath);for(let name of started)await writeHealthUnlessStoreBusy(`login of ${name}`,()=>repository.mutateSlotState(providerId,"stored",name,()=>{}))}export{retireLoginSlotHealth};