Skip to content

feat: add flatmachines-cli library with async backend/frontend pipeline#10

Open
memgrafter wants to merge 1 commit into
mainfrom
claude/flatmachines-cli-library-cODHn
Open

feat: add flatmachines-cli library with async backend/frontend pipeline#10
memgrafter wants to merge 1 commit into
mainfrom
claude/flatmachines-cli-library-cODHn

Conversation

@memgrafter

Copy link
Copy Markdown
Owner

Third Python library providing a branded CLI for flatmachines with clean
backend/frontend separation designed for future Rust frontend replacement.

Architecture:

  • DataBus: UDP-like latest-value slots (writers overwrite, readers get latest)
  • Processors: independent async tasks with Hz-capped output (status, tokens,
    tools, content, error) — one slow processor never blocks another
  • CLIHooks: thin bridge from flatmachines MachineHooks to event pipeline
  • CLIBackend: orchestrates processors, bus, and frontend lifecycle
  • Frontend protocol: abstract interface (the Rust replacement boundary)
  • TerminalFrontend: simple line-based output (temporary, replaceable)

Key async guarantees:

  • flatmachines never blocks on CLI rendering
  • Data preparation never blocks on frontend render
  • Frontend render never blocks on data preparation

https://claude.ai/code/session_012whtfLuLxRyyCnWd5dSh1T

Third Python library providing a branded CLI for flatmachines with clean
backend/frontend separation designed for future Rust frontend replacement.

Architecture:
- DataBus: UDP-like latest-value slots (writers overwrite, readers get latest)
- Processors: independent async tasks with Hz-capped output (status, tokens,
  tools, content, error) — one slow processor never blocks another
- CLIHooks: thin bridge from flatmachines MachineHooks to event pipeline
- CLIBackend: orchestrates processors, bus, and frontend lifecycle
- Frontend protocol: abstract interface (the Rust replacement boundary)
- TerminalFrontend: simple line-based output (temporary, replaceable)

Key async guarantees:
- flatmachines never blocks on CLI rendering
- Data preparation never blocks on frontend render
- Frontend render never blocks on data preparation

https://claude.ai/code/session_012whtfLuLxRyyCnWd5dSh1T
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants