feat: Go-first opentmux runtime with TS compatibility shims#6
Open
AnganSamadder wants to merge 2 commits intomainfrom
Open
feat: Go-first opentmux runtime with TS compatibility shims#6AnganSamadder wants to merge 2 commits intomainfrom
AnganSamadder wants to merge 2 commits intomainfrom
Conversation
- add Go module, Buf config, protobuf control-plane contract, and generated stubs - implement Go daemon/CLI/control binaries and core packages (session manager, queue, tmux, process, reaper, metrics, config, logging) - replace TS plugin/bin entrypoints with thin Go runtime shims and preserve legacy TS fallback paths - add Bun-driven Go build pipeline, benchmark harness, and CI Go setup for publish workflow - add Go parity tests for queue/config/control and fix in-flight duplicate coalescing behavior - update docs for local development and rewrite architecture
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
This PR introduces a Go-first runtime architecture for
opentmuxwhile preserving plugin/CLI compatibility through thin TypeScript shims and legacy fallbacks.The objective is to move high-throughput and process-heavy behavior out of Node/TS and into Go, while keeping user-facing behavior stable and preserving the existing package entrypoints.
What Changed
1. Go platform foundation
go.mod,go.sumbuf.yaml,buf.gen.yaml,buf.lockproto/opentmux/v1/opentmux.protogen/go/...gen/ts/...2. Go runtime binaries
cmd/opentmux/main.gocmd/opentmuxd/main.gocmd/opentmuxctl/main.go3. Core Go runtime packages
internal/config/config.gointernal/logging/logger.gointernal/metrics/metrics.gointernal/process/process.gointernal/tmux/tmux.gointernal/spawnqueue/queue.gointernal/reaper/reaper.gointernal/sessionmanager/manager.gointernal/control/service.go4. TypeScript compatibility shim
src/index.tssrc/bin/opentmux.tssrc/utils/go-runtime.tssrc/legacy-plugin.tssrc/bin/opentmux-legacy.ts5. Build/CI and benchmarking
scripts/build-go-runtime.tsscripts/bench/run-burst.tsinternal/spawnqueue/queue_bench_test.gobuild,build:go,proto:generate,bench:burst.github/workflows/publish.yml6. Documentation updates
README.mddocs/LOCAL_DEVELOPMENT.mdBehavior/Parity Notes
Tests and Validation
Automated checks run
go test ./...go test -race ./internal/spawnqueue ./internal/control ./internal/configgo vet ./...bun run proto:generatebun run typecheckbun testbun run buildbun run scripts/bench/run-burst.tsManual smoke checks run
opentmuxdopentmuxctl initopentmuxctl statsopentmuxctl shutdownKnown Constraints
edition = "2024"was not fully compatible with the current stable generation path used here; proto currently usessyntax = "proto3"for reliable generation.test-plugin.shandtest-multiport.share environment/path-sensitive:test-plugin.shrequires an active tmux sessiontest-multiport.shreferences a legacy path outside this repoImpact
This PR establishes a production-ready migration scaffold: Go-first runtime, compatibility shims, build pipeline integration, and parity-focused tests, without removing legacy fallback paths yet.