Skip to content

Add send_keys_batch and clarify terminal workflow primitives#78

Open
tony wants to merge 8 commits into
mainfrom
feat/greenfield-terminal-ops
Open

Add send_keys_batch and clarify terminal workflow primitives#78
tony wants to merge 8 commits into
mainfrom
feat/greenfield-terminal-ops

Conversation

@tony

@tony tony commented Jun 13, 2026

Copy link
Copy Markdown
Member

Summary

  • Add send_keys_batch for ordered raw-input operations with per-operation results and stop/continue error handling.
  • Redact nested batch key payloads in audit summaries and reject unsupported batch operation fields before pane resolution.
  • Redact malformed and nonschema batch operation payloads before audit logging can persist raw values from invalid requests.
  • Reframe prompts/docs so authored shell commands use run_command, repeated observation uses capture_since, and raw input batching stays separate from workflow chaining.

Commit layout

  • src/: runtime models, tool implementation, registration, middleware redaction, prompt recipe source, and server instructions.
  • tests/: behavior, annotation, redaction, prompt, and server instruction coverage.
  • docs/: tool pages, prompt docs, quickstart, recipes, gotchas, and topic guidance.
  • README.md: top-level workflow overview.
  • CHANGES: unreleased changelog entry.

Test Plan

  • rm -rf docs/_build; uv run ruff check . --fix --show-fixes; uv run ruff format .; uv run mypy .; uv run py.test --reruns 0 -vvv; just build-docs; (591 passed)

Closes #49.
Closes #61.
Refs #50.

@codecov-commenter

codecov-commenter commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.89744% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.01%. Comparing base (cc6e755) to head (5871abf).

Files with missing lines Patch % Lines
src/libtmux_mcp/tools/pane_tools/io.py 71.05% 8 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
- Coverage   85.07%   85.01%   -0.07%     
==========================================
  Files          42       42              
  Lines        2881     2956      +75     
  Branches      385      396      +11     
==========================================
+ Hits         2451     2513      +62     
- Misses        322      331       +9     
- Partials      108      112       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

tony added 5 commits June 13, 2026 16:28
why: Agents need ordered raw terminal input without turning command completion into a heterogeneous workflow DSL.
what:
- Add typed send_keys_batch operation and result models
- Register the tool as mutating open-world shell input
- Return per-operation success and failure metadata with stop/continue behavior
- Redact nested batch key payloads in audit summaries
- Route runtime prompt guidance toward run_command and capture_since boundaries
why: send_keys_batch needs explicit regression coverage for sequencing, errors, and client-facing metadata.
what:
- Add functional tests for ordered batch sends and stop/continue failures
- Cover nested audit redaction for batch operation payloads
- Update prompt and server instruction tests for run_command-first guidance
- Pin open-world registration and safety visibility for send_keys_batch
why: Agents and operators need clear boundaries between authored commands, raw input, and repeated observation.
what:
- Add the send_keys_batch tool page and navigation entries
- Reframe prompts, quickstart, recipes, gotchas, and tool docs around run_command and capture_since
- Keep wait_for_channel documented as the low-level custom-completion escape hatch
- Include new batch/result models in generated API documentation config
why: The project overview should match the command/observation architecture exposed by the tools.
what:
- List send_keys_batch in the pane tool catalog
- Add running and driving workflow summaries
- Clarify that raw input batching is separate from command completion and observation
why: The changelog should announce the user-visible raw input batching feature and updated workflow guidance.
what:
- Add an unreleased entry for send_keys_batch
- Explain the split between run_command, capture_since, and raw input batching
- Reference issues #49 and #61
@tony tony force-pushed the feat/greenfield-terminal-ops branch from 3c633b1 to df3e19c Compare June 13, 2026 21:30
tony added 3 commits June 13, 2026 16:56
why: Unknown keys in nested send_keys_batch operations were ignored by
Pydantic, so misspelled targets could fall back to the default pane.
what:
- Forbid extra fields on SendKeysOperation
- Add parametrized validation coverage for unsupported operation fields
why: Audit summaries are built before schema validation reports malformed
send_keys_batch payloads, so non-dict operation entries must not be
logged verbatim.
what:
- Replace malformed nested operation entries with type metadata
- Add parametrized audit redaction coverage for malformed entries
why: Audit summaries are built before schema validation rejects malformed
send_keys_batch inputs, so invalid operation shapes must not preserve raw
payload text.
what:
- Redact non-list operations payloads by shape
- Redact unknown or wrong-typed nested operation fields
- Cover malformed operation payloads with parametrized regression tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants