UNPKG

@code-yeongyu/senpi

Version:

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

16 lines • 987 B
/** * Input from a connection that never declared `interactive_user` is automatic (senpi#3811 design 4.4): while the * user's Stop or a parent's run hold is live it is kept as a notice and does not release the pause. An `unattended` * hold alone keeps #3860's behavior, so clients that predate the role still resume an unattended open. */ export function holdAutomaticInput(session, command, interactiveUser) { // A notice is delivered in a later turn, which a steer that names its turn must never reach: the session refuses it. if (interactiveUser || command.expectedTurnId !== undefined) return false; return session.noteAutomaticInput(command.message); } /** Whether `holdAutomaticInput` would keep this connection's input as a notice right now, without storing anything. */ export function automaticInputWouldBeHeld(session, interactiveUser) { return !interactiveUser && session.automaticInputHoldLive(); } //# sourceMappingURL=automatic-input-gate.js.map