Repository navigation
PowerShell(feat): Add native tmux modules - #1
Merged
Merged
Conversation
why: Provide a typed PowerShell interface over the shared tmux core. what: - Add read, capture, refresh and raw-command cmdlets. - Package core and workspace modules with identity checks. - Add cancellation handling, native help and owned-tmux verification.
why: Native creation needs typed owners, mutation previews and captured results without exposing request construction to PowerShell callers. what: - Add session/window creation and pane splitting with validated inputs. - Preserve cancellation, per-owner errors and zero-output previews. - Add generated help and installed real-tmux examples. - Verify detached daemon cleanup, including an injected preview failure.
why: PowerShell 7.6 bundles PSResourceGet 1.2.0, so the installation suite failed before loading packages when it required baseline 1.1.1. what: - Select a pinned package manager for the running PowerShell version. - Pass the selected version into the native installation worker. - Allow an explicit supported pin without implicit downloads.
why: Add-Type treats the expected baseline-to-host assembly version warning as an error before the runtime compatibility probe can execute. what: - Suppress only CS1701 for the test probe compilation. - Retain real cancellation, disposal and native-client cleanup checks. - Keep production compiler diagnostics and other probe warnings active.
why: Newly discovered help examples could pass generic type checks without proving their documented outcome. what: - Register each packaged example by module, command and ordinal. - Reject missing and extra registrations before fixture setup. - Execute a wrong-outcome control and verify owned resource cleanup.
why: Scripts need typed deletion with clear shared-window effects, mutation confirmation and cancellation without success output. what: - Add session, window and pane removal through native core owners. - Share callback-thread operation lifetime for value and void tasks. - Preserve errors, daemon generation checks and endpoint identity. - Add native help with executed zero-output state-change assertions. - Verify linked windows, cascades, stale targets and cleanup.
why: The floor-version checks assumed automatic window sizing and joined capture output behaved identically across tmux versions. what: - Use manual sizing in the owned creation fixture. - Ignore trailing terminal-cell padding in joined captures. - Document that requested dimensions follow tmux's sizing policy.
why: Placement-relative mutations must reject a moved source before another window at its former index can receive the mutation. what: - Pin the core and workspace to immutable local ps.5 packages. - Refresh locked dependency hashes for the verified source build.
why: Guide snippets need the same executable behavior and cleanup checks as native help examples. what: - Match documented snippets to registered executable sources. - Check native outcomes, assigned results and owned cleanup. - Reject missing registrations, source drift and unsupported fences. - Include guide verification in the packaged suite and analysis.
why: Pane automation needs explicit literal text and ordered key input with native owners, confirmation and observable failure semantics. what: - Add Send-TmuxText and Send-TmuxKey without success output. - Freeze key arrays and reject invalid content before dispatch. - Pin core fixes for input boundaries and captured membership. - Verify exact received bytes and execute native help examples.
why: Snapshot navigation must retain captured parents and provenance. Contradictory acquisition must fail without publishing a partial graph. what: - Pin the local core snapshot fixes and matching dependency locks. - Preserve InvalidData categorization and verify installed graph behavior. - Document observation limits and execute the native help example. Focused installed snapshot cells pass; the full consumer matrix for this new dependency remains open. Core source delivery remains a draft gate.
why: Restore the dependency from NuGet without a patched local build. what: - Bump LibTmux and LibTmux.Workspace from alpha.12.ps.7 to alpha.15. - Migrate connection and request construction to object initializers. - Read active children through CapturedValue.Value in snapshot checks. - Document published restore and captured-child access. https://github.com/libtmux/libtmux-dotnet/releases/tag/v0.0.0-alpha.15 https://github.com/libtmux/libtmux-dotnet/blob/v0.0.0-alpha.15/CHANGELOG.md
why: Scripts need completion signals that survive timeout and cancellation without abandoned tmux waiters consuming later signals. what: - Add Wait-TmuxChannel with numeric timeouts and native errors. - Withdraw owned waits without capturing the caller context. - Exercise installed help, cancellation and borrowed-server preservation.
why: The introduction should demonstrate useful operations and their observable results. what: - Show session creation, local filtering and signalled input completion. - Execute the documented examples with owned cleanup and outcome checks.
why: Scripts need typed option, hook and environment operations with normal PowerShell pipelines, confirmation and error handling. what: - Bind native owners and preserve scope, indexed entries and readback. - Distinguish empty, unset, removed and hidden environment values. - Add native help, task guides and installed real-tmux checks.
why: Native pipelines need layout control and explicit client reads. what: - Add layout, window and pane sizing with endpoint-aware previews - Expose captured clients, refresh and attachment reads - Execute native help and guides with owned-resource cleanup
why: PowerShell callers need ordered command composition and reusable control connections with explicit ownership. what: - Add typed command construction and bounded chain admission - Add control attachment, correlated sends and explicit disconnection - Execute help and guides against owned tmux fixtures
why: Event consumers need explicit ownership and bounded delivery that keeps PowerShell output on the active pipeline callback. what: - Deliver native events through one acknowledged handoff slot - Preserve borrowed clients and cancel readers per importing runspace - Bound unattended job output by event count and decoded text bytes - Verify lifecycle failures, early exit, reentry and executed job guides - Qualify hash commands to avoid external command discovery on import
why: The shared review candidate supplies bounded upstream events and verified graph, identity and protocol fixes needed by the port. what: - Pin both shared packages and lock their inspected archive content - Validate local-feed provenance before restoring into a selected cache - Require restore when selecting a feed and reject accidental repacking - Verify byte-limit loss without blocking control replies - Document original-archive restore and fresh-version source rebuilds
why: Readers should see a working PowerShell workflow before setup and find the right execution mode without reading implementation details. what: - Identify the shared .NET engine, organization and main author - Lead with creation, snapshot filtering and explicit cleanup - Group execution modes, companion products and task guides - Move the complete input handshake into the linked input guide - Keep the shortened quick start synchronized with executed source
why: The output-bound check also imposed a one-second deadline on PowerShell's cold runspace startup. what: - Wait for job completion without receiving retained output - Keep output, client cleanup and cancellation checks intact
why: Reusable filters need field discovery, local matching and explicit source execution while preserving native tmux objects. what: - Bind PowerShell criteria to the shared schema-v2 query model. - Add local selectors, exact cardinality and source plan execution. - Inspect daemon identity and version without starting a server. - Adopt inspected ps.11 packages with locked dependency identities. - Add installed regressions, native help and executable query guides.
why: Workspace users need to review resolved effects before applying the same native plan through PowerShell. what: - Discover and import bounded YAML or JSON files. - Resolve paths with explicit variables and validate declarations. - Preview and apply native plans with ShouldProcess and journals. - Convert declarations to YAML or JSON for native file pipelines. - Add installed regressions, native help and executable guides.
why: Native PowerShell callers need a foreground attachment and a way to turn an observed session into an editable workspace declaration. what: Add session-bound terminal attachment and snapshot conversion cmdlets. Execute their packaged help and guide examples against owned tmux fixtures. Compare raw command text with native tmux on versions that escape dollars, and restrict manual sizing to the version that requires it.
why: The shared checker read only fenced code in Markdown, so an indented code block or a <pre> block could hold a wide line unseen, and a fence tagged text skipped even a shell command. Its summary also linked the width rule when only the config was wrong. Every libtmux port carries the same checker. what: - Update eng/check_example_width.py to the shared checker that reads indented code blocks outside lists and <pre> blocks in Markdown, reads a text fence that opens with a $ or PS> prompt as a console session, prints the width-rule link only when a line is too wide, and tells a reader with a stale digest which command records it, with doctests for each - Record the new checker_digest in .github/example-width.toml
why: The shared-core history rewrite removes the pinned revision from fresh clones. Keep source builds on the equivalent reviewed code. what: - Update bootstrap, CI and documentation references to the mapped commit - Preserve dependency versions and historical artifact receipts
why: TOML files every key written below a [[...]] header into that entry. In libtmux-go a doc_comments key sat under [[exclude]], so the shared checker never read Go doc comments and nothing said so; it validated keys only at the top level. An entry missing a key the check reads, such as an [[allow]] written with file = for path =, crashed it with a KeyError. Its search for the WRITING.md heading also took a `# comment` inside a shell fence for a heading, every problem was labelled with the config path even when AGENTS.md or WRITING.md was at fault, and a clean run printed nothing. Every libtmux port carries the same checker. what: - Update eng/check_example_width.py to the shared checker that rejects an unknown or missing key inside an [[exclude]], [[allow]] or [[formatter_copies]] entry, skips fenced lines when it looks for headings and the port block, prefixes each problem with the file to fix, names [[allow]] in the wide-line summary, prints how many files it read when nothing is wide, and gives the --digest hint without assuming every port keeps the checker at this path; the self-test plants a nested key, misnamed keys and a fenced comment, each with a clean control - Record the new checker_digest in .github/example-width.toml
why: The shared-examples workflow comment said libtmux/docs merges after the ports. The plan is the reverse: libtmux/docs#101 merges first, because the shared rule's promise that 80 columns fit a libtmux.org code block holds only once its font rule deploys. The reason the job skips pull requests does not depend on merge order: a change to the shared rules lands here and in docs as separate pull requests, and either one alone fails the comparison. what: - Reword the comment in .github/workflows/shared-examples.yml
why: Build from NuGet.org without rebuilding the shared library under a private review version. what: - Pin core, query and workspace packages to alpha.20 and update locks. - Run CI and MCP examples against the published packages. - Preserve global and post-launch workspace options and resolved literal dollar values in YAML/JSON. - Keep optional source review builds on the release revision.
why: Adding code examples to the routing line also moved its link from WRITING.md to the #examples anchor, so documentation, comment and commit-message work landed in the Examples section instead of the top of the guide. The other libtmux ports link the whole file and then the section. what: - Link .github/WRITING.md for the listed kinds of work, and its Examples section for code a reader sees
why: The shared checker accepted any AGENTS.md text that contained WRITING.md#examples, so a link to a file that does not exist, or the anchor written as plain text, passed. A config without checker_digest or shared_digest skipped the drift comparison silently. Every libtmux port carries the same checker. what: - Update eng/check_example_width.py to the shared checker that requires a Markdown link in AGENTS.md resolving to this WRITING.md and the heading above the shared section, and requires both digest keys; the self-test plants a bare anchor, a link to a missing file, a missing digest and a port block without a label, each with a clean control - Record the new checker_digest in .github/example-width.toml
why: The shared checker read config values without checking their type. `width = "80"` failed with "width is 80; the shared rule is 80", and a glob written as a string instead of a list was read one character at a time. A misspelled key inside an [[allow]] or [[exclude]] entry got the hint about top-level keys, which points at the wrong cause. Every libtmux port carries the same checker. what: - Update eng/check_example_width.py to the shared checker that names a value of the wrong type and stops before the check runs, and lists the keys an entry takes when it holds one it does not; the self-test plants a string width and a string glob list - Record the new checker_digest in .github/example-width.toml
why: The paragraph that opens the Examples section is shared by every libtmux port, and it listed doctests, which several ports, this one included, do not have. Code in a doc comment or docstring covers a doctest and a comment-based help example alike. what: - Define an example as a program under examples/, code in a doc comment or docstring, or a fenced block in a README or docs page, in the wording every libtmux port carries
why: The routing line named doctests among the examples it sends to WRITING.md, and this port has none; an agent looking for one would search in vain. what: - Name example scripts, help examples and Markdown code blocks in the routing line, worded as in the other libtmux ports
why: The shared checker type-checked top-level config values but not the values inside an [[exclude]], [[allow]] or [[formatter_copies]] entry, so `glob = 5` or a path written as a list ended in a Python traceback instead of a message. A formatter copy whose file is missing did the same, and so did a config that is not valid TOML. Every libtmux port carries the same checker. what: - Update eng/check_example_width.py to the shared checker that names a wrong-typed entry value, a missing formatter copy file, and a config it cannot parse, each as a one-line problem; the self-test plants a list where a string belongs and a missing copy - Record the new checker_digest in .github/example-width.toml
why: An unknown top-level key such as `reason` printed only "unknown key: reason", though the usual cause is an entry key written above its [[...]] header. The summary also read "1 setup problems". Every libtmux port carries the same checker. what: - Update eng/check_example_width.py to the shared checker that says an entry key belongs inside its [[...]] entry, lists the keys the config takes for any other unknown key, and matches each summary count to its noun - Record the new checker_digest in .github/example-width.toml
why: Writing an [[allow]] entry by hand means quoting the exact line, and a tab or a quote in it is easy to get wrong. A misspelled glob key also made every allow entry look stale, and the summary then said to delete entries that were fine. Every libtmux port carries the same checker. what: - Update eng/check_example_width.py to the shared checker that prints the first wide line as a ready-to-paste [[allow]] entry, skips the width pass while the config itself has problems, and words the allow_ceiling messages by count; the self-test round-trips the entry through tomllib - Record the new checker_digest in .github/example-width.toml
why: The paragraph that defines an example sat above the shared markers, so the drift check that keeps every libtmux port's rules equal did not cover it, though every port carries the same text. what: - Move the paragraph inside the shared markers, in the wording every libtmux port carries - Record the new shared_digest in .github/example-width.toml
why: The width check reads only the files git tracks, and it measures the whole source line, so code in a doc comment counts its indent and comment marker. The shared text said neither: a new, unstaged example looked clean, and a doc-comment line that fits 80 columns on its own failed once indented. Every libtmux port carries the same shared text. what: - Say in the width-check rule that it reads tracked files and measures the whole source line - Record the new shared_digest in .github/example-width.toml
why: The port block said the examples are held to the `width` in .github/example-width.toml, which sends a reader to the config for a number the shared rule fixes at 80. what: - Say the example files and pages are held to 80 columns by the width check, and name its command in the same sentence
why: Every libtmux port carries the same checker, and the version here let several mistakes through or pointed at the wrong fix: - An [[allow]] entry pasted from the printed suggestion passed with its placeholder reason. - A misspelled glob key buried its own message under a line for every file under examples/ and every exclusion. - A stale allow entry, a drifted formatter copy and a digest mismatch were each reported against the wrong file. - A `console` block with no prompt was skipped whole, so a wide command in it passed. - A new example file went unmeasured, without a word, until git tracked it. what: - Update eng/check_example_width.py to the shared checker - Fail an allow entry that keeps the placeholder reason, and report an [[exclude]] entry written as a string as not a table - Hold back the examples/ and exclusion lines while a top-level key is unknown - Report a stale entry against the config with the allow_ceiling to set, a drifted copy against the copy, and a digest mismatch against the changed file, with how to restore it first and the keys to set - Measure a `console` block that has no prompt as code, and read a `python` fence that opens with `>>> ` as a session - Name untracked files the config would read, and their wide lines - Name the link to add when AGENTS.md lacks one, and say how many wide lines the printed allow entry stands for - Doctests pin the placeholder, table, unknown-key, prompt and untracked cases - Record the new checker_digest in .github/example-width.toml
why: A reviewed workspace can change defaults inherited by other sessions. The plan display and confirmation must expose that scope before dispatch. what: - Show option scope and global effects while keeping values redacted. - Explain option ordering with an executable native planning example. - Verify literal round trips and actual main-pane layout geometry.
why: Disposing a failed fixture discarded daemon diagnostics, and cleanup errors could replace the failure that triggered teardown. what: - Retain and emit bounded daemon and client state before disposal. - Redact paths without starting a diagnostic client or capturing panes. - Preserve the original exception when diagnostics or cleanup fail.
why: Callers need to distinguish command liveness probes from event-based text observation and know which output is discarded under queue pressure. what: - Describe the cooperative completion channel and bounded probe backoff. - Explain event-count and payload-byte eviction in the shared core.
why: Repository metadata still described an unimplemented private scaffold. Readers should see the current native modules and dependency relationship. what: - Record public organization visibility and a capability description. - Clarify the separate private repository in contributor instructions.
why: Repeated metadata validation delays executable documentation checks. what: - Bind metadata admission to exact source and installed module bytes - Run independent example groups with two workers - Reject missing groups and worker failures before reporting success - Preserve live assertions and full validation for direct test calls
why: Permit the complete installed suite to use the reviewed outer-loop allowance. what: - Set the Product suite budget to 70 seconds. - Keep Documentation and child-process deadlines unchanged.
why: An unresolved tmux daemon crash blocks the Linux PowerShell 7.4.20 and tmux 3.3a guide check; issue #5 retains the evidence and restoration criteria. what: - Skip only watch.parallel for that exact combination. - Preserve guide registration and report skipped operations separately. - Upload skip receipts and document the affected combination.
why: User guides should explain product tasks rather than temporary test exclusions. what: - Keep the skipped case and follow-up issue in the test runner and CI evidence. - Remove test-maintenance paragraphs from compatibility and watching guides.
why: Give users one product summary for the initial module suite. what: - Describe native tmux pipelines, queries and command execution - Cover workspace planning, guides, benchmarks and build checks - Link each unreleased entry to the initial pull request
This was referenced Oct 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Provide native PowerShell automation over libtmux for .NET, maintained by the same organization and main author. The
LibTmuxandLibTmux.Workspacemodules share an exact .NET dependency identity.cmdlist entries and session-relative window indexes.-WhatIflists every ordered action and conditional cleanup step, discloses option scope and global effects, and hides request values.Example
After building from a clean checkout, run the standalone QuickStart from the checkout root:
The script uses a private socket and returns a captured native
LibTmux.Session; its windows and panes remain readable after owned cleanup. The README shows the same task as copyable steps. Each query below runs the owned script independently. Ordinary PowerShell selects the split window:Structured criteria can require exactly one native result:
The README's owned command example runs
exit 7in a shell pane and receives a native result withExitStatus = 7andTimedOut = False. It also waits for an HTTP service’s readiness line and verifies HTTP status 200, reuses and disconnects an owned control client, and imports, reviews, applies and cleans up a two-pane workspace. Its marked blocks run in the installed README workflow test. The query, execution-mode, watcher, MCP and benchmark guides give runnable extensions. The workspace guide shows an action-by-action-WhatIfpreview and tmuxp-style command entries; the pinned upstream fixture exercises their import. Additional pinned fixtures check live window and pane graphs, start directories, environment overrides, a standard window option, and explicit window indexes. The window-index fixture checks declared orderzero:0, five:5, one:1and native index orderzero:0, one:1, five:5.The workspace failure-recovery example deliberately appends a window with an invalid pane option. After creating the guide's
developmentsession, run this workflow to retain the native failure and inspect fresh server state:Failure.Journalrecords dispatch and the failed action;Failure.CompensationJournalrecords attempted cleanup. The freshCurrent.Sessionsgraph proves that the new window is gone and the borrowed session andeditorwindow remain. Unknown dispatch or failed cleanup requires inspection before another plan.The MCP guide lists a session's panes, captures a discovered pane and waits for a program's ready line. Its official SDK client reads the guide's marked JSON requests directly and replaces only discovered target IDs. For a pane whose application prints
Service ready, the testedtools/callparameters are:{ "name": "wait_for_text", "arguments": { "paneId": "%0", "patterns": ["^Service ready$"], "timeoutSeconds": 1, "ignoreCase": false } }An existing line returns
PresentAtEntrywith the matched pattern and bounded rendered tail. The guide explains list versus object response shapes, event-drop and truncation checks, finite waits, cancellation limits and borrowed daemon ownership.Both modules pin published LibTmux alpha.20 dependencies. Ordinary source installation and CI restore the committed locks from NuGet.org. The source bootstrap remains optional for shared-library development and produces unique inspected review archives. No PowerShell Gallery release is claimed.
Validation
watch.parallelon Linux with exact PowerShell 7.4.20 / tmux 3.3a, tracked in issue #5. Neighboring PowerShell/tmux cells execute that guide. Original assertions remain registered; CI uploads separate skip receipts.Remaining work
Documentation
Task guides and native help link to executed source examples. The shared example-width checker enforces 80 columns; registration and drift checks reject unregistered or changed snippets. The initial changelog summarizes module capabilities, documentation and build checks.
This PR does not publish PowerShell Gallery packages or establish a 9.5/10 product rating.