UNPKG

@code-yeongyu/senpi

Version:

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

17 lines • 801 B
/** * The calls a loopless runtime runs for the brain, while they run, with what the brain sent with each. Every call its * `execute` runs was issued by the brain's model: the brain's remote tool host is its agent loop's toolHost, and nested * calls, pi.executeTool() and Cursor exec frames run on the brain's own hosts (senpi#6919). */ export function createBrainCalls() { const running = new Map(); return { isModelIssuedToolCall: (toolCallId) => running.has(toolCallId), promptSurfaceOf: (toolCallId) => running.get(toolCallId)?.promptSurface, run(toolCallId, facts, call) { running.set(toolCallId, facts ?? {}); return call().finally(() => running.delete(toolCallId)); }, }; } //# sourceMappingURL=loopless-brain-calls.js.map