/**
 * remote/inbox — the InstructionInbox port.
 *
 * The inbound half of remote-control: a remote client (phone, Telegram, web)
 * enqueues instructions; the running agent loop drains them at step
 * boundaries and injects them as steering messages. This is what makes
 * interrupt-and-redirect mid-run possible — the founder's core requirement.
 *
 * Two instruction kinds:
 *   - normal — becomes a visible `user` message in the conversation log.
 *   - whisper — the agent sees it but it is NOT shown as a user turn (an
 *     out-of-band hint that does not pollute the transcript / attestation).
 *
 * @public @since 2.11.0 — preste remote-control T1
 */
/**
 * Process-local in-memory inbox. Suitable for a single-process agent +
 * its remote-control server. Modeled on `InMemoryApprovalStore`.
 */
export class InMemoryInstructionInbox {
    queue = [];
    enqueue(text, source, whisper = false) {
        const trimmed = text.trim();
        if (trimmed === "")
            return; // ignore empty injections
        this.queue.push({
            text: trimmed,
            source,
            whisper,
            at: new Date().toISOString(),
        });
    }
    drain() {
        return this.queue.splice(0, this.queue.length);
    }
    size() {
        return this.queue.length;
    }
}
//# sourceMappingURL=inbox.js.map