@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
11 lines • 487 B
JavaScript
import { WORKER_CREDIT_CODES } from "./session-worker-protocol.js";
/** Releases a worker blocked in Atomics.wait with the host's decision. */
export function acknowledgeGrant(signal, grant) {
const state = new Int32Array(signal);
Atomics.store(state, 0, WORKER_CREDIT_CODES[grant]);
Atomics.notify(state, 0);
}
export function acknowledge(signal, granted) {
acknowledgeGrant(signal, granted ? "granted" : "conflict");
}
//# sourceMappingURL=session-worker-signals.js.map