UNPKG

naisys

Version:

NAISYS - Autonomous AI agent runner with built-in context management and cost tracking

18 lines 571 B
// Subscribers fire on rotate so shellWrapper can push the new key into // the running shell's stdin; other consumers sample lazily via getKey(). export function createNaisysApiService(initialKey) { let current = initialKey; const subscribers = []; return { getKey: () => current, rotateKey: (newKey) => { current = newKey; for (const cb of subscribers) cb(newKey); }, onChange: (cb) => { subscribers.push(cb); }, }; } //# sourceMappingURL=naisysApiService.js.map