Skip to content

Add until and settle_ms waits to bgterm, matching fastmux.bg - #3

Merged
jph00 merged 1 commit into
mainfrom
pr/add-until-and-settle-ms-waits-to-bgterm-matching
Aug 29, 2026
Merged

jph00 merged 1 commit into
mainfrom
pr/add-until-and-settle-ms-waits-to-bgterm-matching

Conversation

@jph00

@jph00 jph00 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

write_stdin and poll now take fastmux.bg's wait parameters. wait_ms bounds the wait for new output (renamed from yield_time_ms; positional callers are unaffected). until= returns as soon as the text accumulated by the call matches that regex. settle_ms keeps collecting until output has stopped for that long, running at most settle_ms past the wait_ms deadline. A prompt-shaped reply now needs one call: write_stdin(sid, '2+2\n', 5000, until=r'In \[2\]').

Two behaviors differ from fastmux by design. Waits are event-driven, with no interval_ms. Reading consumes the stream, and until never sees output an earlier call returned. The bg notebook documents both.

A new ptymini.skill pyskill registers the bg API for LLM hosts, with guidance on when to use bgterm (line-oriented programs) and when tmux (TUIs, rich terminal apps, shared terminals).

@jph00 jph00 added the enhancement New feature or request label Aug 29, 2026
@jph00
jph00 merged commit c8b85ae into main Aug 29, 2026
@jph00
jph00 deleted the pr/add-until-and-settle-ms-waits-to-bgterm-matching branch August 29, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant