Repository navigation
Miwarang Senpi Delegate v0.9.1
Miwarang Senpi Delegate v0.9.1
Hardening release that closes the four technical gaps the v0.9.0 research run
identified as prerequisites for broader adoption. No new backends; the
delegation contract from v0.9.0 is unchanged.
Streaming events (axis a)
Command backends now forward stdout chunks to the host through the tool's
onUpdate callback as they arrive, instead of only returning the full text
after the child exits. Emission is bounded: a slow or broken consumer cannot
stall the backend or abort the run. Koma keeps its state-driven turn protocol
and still delivers the final assistant message.
Structured result envelope (axis b)
miwarang_delegate now returns a versioned envelope (version: 1) as the
tool details, with a stable shape across backends: state, backend,
resolvedVia, mode, and optional runId/sessionId, exitCode,
signal, agent, and fallback fields. Callers can branch on terminal state
without re-parsing backend-specific payloads.
Terminal cancellation (axis c)
miwarang_cancel no longer returns cancelling and hopes for the best.
Command backends wait for the child to close (bounded grace, then SIGKILL
escalation for a process group that ignores SIGTERM), and both command and
Koma backends record the terminal exitCode and signal in the run record
so miwarang_wait and miwarang_cancel return a terminal state.
Cross-backend secret redaction (axis f)
One shared redaction policy now covers captured stdout, captured stderr,
stored resultText/errorText, returned assistant text, and error
messages in both command and Koma backends. Previously only stderr and error
text were redacted, so a harness that echoed a credential to stdout leaked it
into the tool result.
Verification
bunx tsc --noEmit: exit 0.bun test: 77 pass / 0 fail across 12 files (168 assertions).- Real-surface probe through Senpi: a stub command backend echoing
RESULT_WITH_Bearer_abc123_secretreturned the redacted text
RESULT_WITH_[REDACTED] hito the calling agent.