feat(pty): add Unix spawn provider - #53
Open
passcod wants to merge 26 commits into
Open
Conversation
Port the low-level Unix PTY transport from e905958 behind the ordinary wrapper and provider lifecycle. Co-Authored-By: Claude <noreply@anthropic.com>
Wait for the direct child through its native owner before draining the rest of the process group, keeping cached child state synchronized. Co-Authored-By: Claude <noreply@anthropic.com>
Rewrite the frozen transport and supervision coverage around Command::wrap(Pty).spawn() and one-shot controller extraction. Co-Authored-By: Claude <noreply@anthropic.com>
Cover one-shot controller traversal, portable post-spawn state, duplicate and conflicting providers, explicit-spawner rejection, rollback after hook failures, and provider reuse. Co-Authored-By: Claude <noreply@anthropic.com>
Keep the migrated test helper distinct from the removed public PTY spawning API. Co-Authored-By: Claude <noreply@anthropic.com>
Document controller ownership, merged output, draining and supervision lifecycles, complete Unix support, and the non-default Tokio feature without reviving the rejected builder API. Co-Authored-By: Claude <noreply@anthropic.com>
Exercise the opt-in PTY feature in the frontend matrix and cross-check every supported Unix backend. Co-Authored-By: Claude <noreply@anthropic.com>
Keep the portable unsupported API warning-free while compiling Unix-only child and native command internals solely for implemented backends. Co-Authored-By: Claude <noreply@anthropic.com>
Verify platform availability wins over invalid size, native-only state, and pre-spawn hook side effects. Co-Authored-By: Claude <noreply@anthropic.com>
Verify callers can end canonical input with the terminal control character while retaining both strong master owners. Co-Authored-By: Claude <noreply@anthropic.com>
Verify native children and self-terminal custom chains terminate traversal with no PTY controller. Co-Authored-By: Claude <noreply@anthropic.com>
Keep provider-only command mutations out of post-spawn attempt state and synchronize lifecycle rollback with the terminal child through the owned Tokio process. Co-Authored-By: Claude <noreply@anthropic.com>
Wait through the direct child owner and stop using a numeric process-group ID once that child has been reaped. Retain the original PTY PID only for installing supervision around a provider child reaped by an earlier lifecycle hook. Co-Authored-By: Claude <noreply@anthropic.com>
Exercise clean post-spawn native materialization, nested controller traversal and commitment, rollback after hook-driven reaping, and live process-group cleanup. Co-Authored-By: Claude <noreply@anthropic.com>
Compile documentation examples, exercise the unsupported Unix backend, verify package contents, and keep target-specific provider internals warning-free. Co-Authored-By: Claude <noreply@anthropic.com>
Clarify that process-group and session wrappers retain group-wide signalling only while the owned child is live, and cover descendant-held PTY output without unsafe post-reap group lookup. Co-Authored-By: Claude <noreply@anthropic.com>
Update attach-to coverage for safe direct-child waiting without retaining or polling a foreign numeric process-group identity after exit. Co-Authored-By: Claude <noreply@anthropic.com>
Create PTY endpoints with close-on-exec atomically where the native APIs permit it, reject pre-10 NetBSD before hooks, and use Solarish no-ctty STREAMS pushes so session-leader parents remain detached. Co-Authored-By: Claude <noreply@anthropic.com>
Ensure the shared terminal child remains usable after its cancellation-safe wait future is dropped while pending. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Forward-integrate the provider-stack correction without rewriting the published Unix PTY history. Co-Authored-By: Claude <noreply@anthropic.com>
Forward-integrate the provider-stack lockfile correction without rewriting the published Unix PTY history. Co-Authored-By: Claude <noreply@anthropic.com>
Forward-integrate the provider-stack documentation correction without rewriting the published Unix PTY history. Co-Authored-By: Claude <noreply@anthropic.com>
Release automation owns the next package version, so the new PTY dependency example continues to name the current release. Co-Authored-By: Claude <noreply@anthropic.com>
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.
🤖 Adds the Unix half of wrapper-native PTY transport to the 11.0 command/provider stack.
Summary
Ptyspawn-provider wrapper through the ordinary.wrap(Pty::default()).spawn()lifecycleThe non-default
ptyfeature impliestokio1. This PR is stacked on #52.