Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ client. The program stops its owned server when the request succeeds or fails.
## Run the example

Use the .NET 10 SDK and tmux 3.3a or newer on Linux, macOS, or WSL. The project
pins the library and tool to the same published alpha release. The package
source is [libtmux-dotnet at the documented release](https://github.com/libtmux/libtmux-dotnet/tree/ec8b6ab2a4f65e23664f43fba538ba200d4ae8bc).
pins the library and tool to the same published release, 0.1.0. The package
source is [libtmux-dotnet at the documented release](https://github.com/libtmux/libtmux-dotnet/tree/472c2bcfbda6735139849324cc109ad70300001e).

Create an empty directory:

Expand All @@ -34,7 +34,7 @@ Install the MCP executable into that directory:
```console
$ dotnet tool install \
--tool-path .tools \
--version 0.0.0-alpha.20 \
--version 0.1.0 \
LibTmux.Mcp
```

Expand All @@ -49,7 +49,7 @@ Save the project file:
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LibTmux" Version="0.0.0-alpha.20" />
<PackageReference Include="LibTmux" Version="0.1.0" />
<PackageReference Include="ModelContextProtocol" Version="2.2.0" />
</ItemGroup>
</Project>
Expand Down Expand Up @@ -248,5 +248,5 @@ it prints the retained directory for inspection.

The [connection guide](../../guides/) covers connecting to an existing server.
The [tool reference](../../tools/list_sessions/) describes the session fields,
and the [owned-server implementation](https://github.com/libtmux/libtmux-dotnet/blob/ec8b6ab2a4f65e23664f43fba538ba200d4ae8bc/src/LibTmux/Server.Lifecycle.cs)
and the [owned-server implementation](https://github.com/libtmux/libtmux-dotnet/blob/472c2bcfbda6735139849324cc109ad70300001e/src/LibTmux/Server.Lifecycle.cs)
defines daemon ownership and cleanup.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ sessions.
## Run the example

Use the .NET 10 SDK and tmux 3.3a or newer on Linux, macOS, or WSL. The library
and tool use the same [published source revision](https://github.com/libtmux/libtmux-dotnet/tree/ec8b6ab2a4f65e23664f43fba538ba200d4ae8bc).
and tool use the same [published source revision](https://github.com/libtmux/libtmux-dotnet/tree/472c2bcfbda6735139849324cc109ad70300001e).
`run_shell_command` stages its command in a named tmux buffer, so this example
needs a server at version 3.4 or later; on 3.3a the tool refuses the request.

Create an empty directory:

Expand All @@ -37,7 +39,7 @@ Install the MCP executable into that directory:
```console
$ dotnet tool install \
--tool-path .tools \
--version 0.0.0-alpha.20 \
--version 0.1.0 \
LibTmux.Mcp
```

Expand All @@ -52,7 +54,7 @@ Save the project file:
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LibTmux" Version="0.0.0-alpha.20" />
<PackageReference Include="LibTmux" Version="0.1.0" />
<PackageReference Include="ModelContextProtocol" Version="2.2.0" />
</ItemGroup>
</Project>
Expand Down
12 changes: 6 additions & 6 deletions site/src/content/docs/ports/csharp/mcp/guides/connect-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ Configure your MCP client to launch `libtmux-mcp`. The executable selects one
tmux socket and its tools at startup, then serves MCP over stdin and stdout.
Use Linux, macOS, or WSL with tmux 3.3a or newer and a compatible .NET runtime.

The examples here use the [published package](https://www.nuget.org/packages/LibTmux.Mcp/0.0.0-alpha.20)
and its [source contract](https://github.com/libtmux/libtmux-dotnet/blob/ec8b6ab2a4f65e23664f43fba538ba200d4ae8bc/src/LibTmux.Mcp/README.md).
The examples here use the [published package](https://www.nuget.org/packages/LibTmux.Mcp/0.1.0)
and its [source contract](https://github.com/libtmux/libtmux-dotnet/blob/472c2bcfbda6735139849324cc109ad70300001e/src/LibTmux.Mcp/README.md).

## Install the tool

Install the pinned alpha release with the .NET SDK:
Install the pinned release with the .NET SDK:

```console
$ dotnet tool install \
--global \
--version 0.0.0-alpha.20 \
--version 0.1.0 \
LibTmux.Mcp
```

Expand Down Expand Up @@ -114,7 +114,7 @@ Restart the MCP connection after changing its environment. Changing a
terminal's environment does not reconfigure a server process already running
inside another client.

The [startup implementation](https://github.com/libtmux/libtmux-dotnet/blob/ec8b6ab2a4f65e23664f43fba538ba200d4ae8bc/src/LibTmux.Mcp/Policy/McpStartup.cs)
The [startup implementation](https://github.com/libtmux/libtmux-dotnet/blob/472c2bcfbda6735139849324cc109ad70300001e/src/LibTmux.Mcp/Policy/McpStartup.cs)
defines socket selection and ownership. The
[tool-selection implementation](https://github.com/libtmux/libtmux-dotnet/blob/ec8b6ab2a4f65e23664f43fba538ba200d4ae8bc/src/LibTmux.Mcp/Policy/CapabilitySelection.cs)
[tool-selection implementation](https://github.com/libtmux/libtmux-dotnet/blob/472c2bcfbda6735139849324cc109ad70300001e/src/LibTmux.Mcp/Policy/CapabilitySelection.cs)
defines registration and filter precedence.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ covers interactive attachment and detaching.
Save the complete program as `connect.exs`. The environment variable
`LIBTMUX_SOCKET_PATH` selects the existing server. The launcher below sets it
to a private socket for trying the example. The first line installs the
published alpha from Hex.
released 0.1 series from Hex.

```elixir title="connect.exs"
Mix.install([{:libtmux, "== 0.0.1-alpha.1"}])
Mix.install([{:libtmux, "~> 0.1"}])

alias LibTmux.{Selection, Server, Snapshot}

Expand Down Expand Up @@ -106,5 +106,5 @@ between those operations. Handle the creation error as well as the lookup.
[Capture a pane and read it](../../examples/capture-and-read/) is a complete
program that runs against an isolated server.

The [library source revision](https://github.com/libtmux/libtmux-elixir/tree/b72452c198917433229bdc266a68c163541b6127)
The [library source revision](https://github.com/libtmux/libtmux-elixir/tree/cac4252bfc52069980d47db2b7803dc9b33f36f1)
records the implementation used by this example.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ ID against the session it created, then closes the client and stops its server.
## Run the example

Use Go 1.26 or newer and tmux 3.3a or newer on Linux, macOS, or WSL.
The project pins the [core library](https://github.com/libtmux/libtmux-go/tree/3f6f99dd41f077aaac2fa18acf7c82d99f58c7cd)
and [MCP executable](https://github.com/libtmux/libtmux-go/tree/6e7420927f4cb717fe089a710328e44e8d551025/mcp)
The project pins the [core library](https://github.com/libtmux/libtmux-go/tree/c21afc69867e989410e15b3616a8c0f0b1073c33)
and [MCP executable](https://github.com/libtmux/libtmux-go/tree/59aed98c06984e2f8613fd1df6ec8943f5f1eed3/mcp)
to their published releases. The client uses the official Go MCP SDK.

Create an empty directory:
Expand All @@ -36,7 +36,7 @@ Install the MCP executable inside the project:

```console
$ GOBIN="$PWD/.tools" go install \
github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@v0.0.1-alpha.12
github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@v0.1.0
```

Save the module file:
Expand All @@ -47,7 +47,7 @@ module example.com/session-inspector
go 1.26.0

require (
github.com/libtmux/libtmux-go v0.0.1-alpha.9
github.com/libtmux/libtmux-go v0.1.0
github.com/modelcontextprotocol/go-sdk v1.6.1
)

Expand Down
8 changes: 4 additions & 4 deletions site/src/content/docs/ports/go/mcp/examples/run-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ The client checks completion and output before reporting the result.
## Run the example

Use Go 1.26 or newer and tmux 3.3a or newer on Linux, macOS, or WSL.
The project pins the [core library](https://github.com/libtmux/libtmux-go/tree/3f6f99dd41f077aaac2fa18acf7c82d99f58c7cd)
and [MCP executable](https://github.com/libtmux/libtmux-go/tree/6e7420927f4cb717fe089a710328e44e8d551025/mcp)
The project pins the [core library](https://github.com/libtmux/libtmux-go/tree/c21afc69867e989410e15b3616a8c0f0b1073c33)
and [MCP executable](https://github.com/libtmux/libtmux-go/tree/59aed98c06984e2f8613fd1df6ec8943f5f1eed3/mcp)
to their published releases. The client uses the official Go MCP SDK.

Create an empty directory:
Expand All @@ -36,7 +36,7 @@ Install the MCP executable inside the project:

```console
$ GOBIN="$PWD/.tools" go install \
github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@v0.0.1-alpha.12
github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@v0.1.0
```

Save the module file:
Expand All @@ -47,7 +47,7 @@ module example.com/command-runner
go 1.26.0

require (
github.com/libtmux/libtmux-go v0.0.1-alpha.9
github.com/libtmux/libtmux-go v0.1.0
github.com/modelcontextprotocol/go-sdk v1.6.1
)

Expand Down
6 changes: 3 additions & 3 deletions site/src/content/docs/ports/go/mcp/guides/connect-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ go to stderr, which the client should retain in its server log.
## Install the command

Use Go 1.26 or newer and tmux 3.3a or newer on Linux, macOS, or WSL. Install the
[published MCP module](https://github.com/libtmux/libtmux-go/tree/6e7420927f4cb717fe089a710328e44e8d551025/mcp):
[published MCP module](https://github.com/libtmux/libtmux-go/tree/59aed98c06984e2f8613fd1df6ec8943f5f1eed3/mcp):

```console
$ go install \
github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@v0.0.1-alpha.12
github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@v0.1.0
```

Make the Go installation directory available in the MCP client's `PATH`, or
Expand All @@ -32,7 +32,7 @@ Check the executable the client will launch:
$ libtmux-mcp -version
```

The installed release reports `libtmux-mcp v0.0.1-alpha.12`. The
The installed release reports `libtmux-mcp v0.1.0`. The
[complete SDK example](../../examples/inspect-sessions/) installs this same
release into a local `.tools` directory and supplies the client code.

Expand Down
26 changes: 7 additions & 19 deletions site/src/content/docs/ports/go/workspace/internals/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,26 @@ application or log file.

## Prepare the project

Use Go 1.26, Git, and tmux 3.3a or newer on Unix. Create an empty project and
fetch the source revision used by this example:
Use Go 1.26 and tmux 3.3a or newer on Unix. Create an empty project:

```console
$ mkdir go-workspace-example && cd go-workspace-example
```

```console
$ git init libtmux-source && \
git -C libtmux-source remote add origin https://github.com/libtmux/libtmux-go.git && \
git -C libtmux-source fetch --depth=1 origin bb06e26e116e941813ca40bf45e7e3a47d38f52a && \
git -C libtmux-source checkout --detach FETCH_HEAD
```

Create the module file. Both replacements select that checkout, so the core
and workspace libraries use the same source revision:
Create the module file. It requires the published core and workspace
modules at `v0.1.0`; the indirect YAML dependency is what `go mod tidy` resolves:

```go title="go.mod"
module example.com/workspace

go 1.26.0

require (
github.com/libtmux/libtmux-go v0.0.1-alpha.9
github.com/libtmux/libtmux-go/workspace v0.0.0
github.com/libtmux/libtmux-go v0.1.0
github.com/libtmux/libtmux-go/workspace v0.1.0
)

require go.yaml.in/yaml/v3 v3.0.5 // indirect

replace github.com/libtmux/libtmux-go => ./libtmux-source

replace github.com/libtmux/libtmux-go/workspace => ./libtmux-source/workspace
```

Create the workspace file in the same directory:
Expand Down Expand Up @@ -189,5 +177,5 @@ selected server and choose when to stop it.
<a id="where-this-comes-from"></a>
<a id="source-inclusion"></a>

[Builder source](https://github.com/libtmux/libtmux-go/blob/bb06e26e116e941813ca40bf45e7e3a47d38f52a/workspace/builder.go);
[configuration source](https://github.com/libtmux/libtmux-go/blob/bb06e26e116e941813ca40bf45e7e3a47d38f52a/workspace/workspace.go).
[Builder source](https://github.com/libtmux/libtmux-go/blob/59aed98c06984e2f8613fd1df6ec8943f5f1eed3/workspace/builder.go);
[configuration source](https://github.com/libtmux/libtmux-go/blob/59aed98c06984e2f8613fd1df6ec8943f5f1eed3/workspace/workspace.go).
17 changes: 7 additions & 10 deletions site/src/content/docs/ports/java/mcp/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,24 @@ For a client configured to launch the server itself, use the
## Create the project

Use JDK 25, Git, tmux 3.3a or newer, and a Unix host with `env -u`. Create an
empty project and fetch the source revision used by this example:
empty project and fetch the 0.1.0 release, which supplies the Gradle wrapper:

```console
$ mkdir java-mcp-example && cd java-mcp-example && \
git init libtmux-source && \
git -C libtmux-source remote add origin https://github.com/libtmux/libtmux-java.git && \
git -C libtmux-source fetch --depth=1 origin 842228310449e879ebcaa3f910597757c9dbffd6 && \
git -C libtmux-source fetch --depth=1 origin 5c181887918351119bfdb3a046719fa792048e59 && \
git -C libtmux-source checkout --detach FETCH_HEAD && \
mkdir -p src/main/java
```

Save the settings file. The included build supplies the MCP and core libraries
from the same selected source. Its toolchain resolver downloads the Temurin 21
compiler for those libraries when needed.
Save the settings file:

```kotlin title="settings.gradle.kts"
rootProject.name = "mcp-example"
includeBuild("libtmux-source")
```

Save the build file. Its SDK and JSON dependencies match the selected library:
Save the build file. Gradle resolves the MCP library from Maven Central. Its SDK and JSON dependencies match that release:

```kotlin title="build.gradle.kts"
plugins {
Expand All @@ -52,7 +49,7 @@ repositories {
}

dependencies {
implementation("io.github.libtmux:libtmux-mcp:0.0.1-alpha.12-SNAPSHOT")
implementation("io.github.libtmux:libtmux-mcp:0.1.0")
implementation("io.modelcontextprotocol.sdk:mcp-json-jackson2:2.0.1")
implementation("com.fasterxml.jackson.core:jackson-databind:2.21.5")
runtimeOnly("org.slf4j:slf4j-nop:2.0.17")
Expand Down Expand Up @@ -184,5 +181,5 @@ to discover a pane and call `run_shell_command`. Read the typed exit status
and output. Use `capture_since` for subsequent screen changes; a prompt redraw
can arrive after command completion.

[Server entry points](https://github.com/libtmux/libtmux-java/blob/842228310449e879ebcaa3f910597757c9dbffd6/libtmux-mcp/src/main/java/io/github/libtmux/mcp/TmuxMcpServer.java);
[upstream MCP tests](https://github.com/libtmux/libtmux-java/tree/842228310449e879ebcaa3f910597757c9dbffd6/libtmux-mcp/src/test).
[Server entry points](https://github.com/libtmux/libtmux-java/blob/5c181887918351119bfdb3a046719fa792048e59/libtmux-mcp/src/main/java/io/github/libtmux/mcp/TmuxMcpServer.java);
[upstream MCP tests](https://github.com/libtmux/libtmux-java/tree/5c181887918351119bfdb3a046719fa792048e59/libtmux-mcp/src/test).
15 changes: 6 additions & 9 deletions site/src/content/docs/ports/java/workspace/internals/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,25 @@ server. Use a POSIX host with tmux on `PATH` and JDK 25.

## Create the project

In a new directory, fetch the source revision used by this documentation:
In a new directory, fetch the 0.1.0 release, which supplies the Gradle wrapper:

```console
$ mkdir java-workspace-example
$ cd java-workspace-example
$ git init -q libtmux-source
$ git -C libtmux-source remote add origin https://github.com/libtmux/libtmux-java.git
$ git -C libtmux-source fetch --depth=1 origin 842228310449e879ebcaa3f910597757c9dbffd6
$ git -C libtmux-source fetch --depth=1 origin 5c181887918351119bfdb3a046719fa792048e59
$ git -C libtmux-source checkout --detach FETCH_HEAD
$ mkdir -p src/main/java
```

Save the following settings file. The included build supplies the workspace
module and its core dependency from the selected source. Its toolchain resolver
downloads the Temurin 21 compiler for those libraries when needed.
Save the following settings file:

```kotlin title="settings.gradle.kts"
rootProject.name = "workspace-example"
includeBuild("libtmux-source")
```

Save the following build file:
Save the following build file. Gradle resolves the workspace module and its core dependency from Maven Central:

```kotlin title="build.gradle.kts"
plugins {
Expand All @@ -49,7 +46,7 @@ repositories {
}

dependencies {
implementation("io.github.libtmux:libtmux-workspace:0.0.1-alpha.12-SNAPSHOT")
implementation("io.github.libtmux:libtmux-workspace:0.1.0")
}

java {
Expand Down Expand Up @@ -128,4 +125,4 @@ those programs to finish. Keep the session running instead of calling
<a id="where-this-comes-from"></a>
<a id="source-inclusion"></a>

[Workspace API source](https://github.com/libtmux/libtmux-java/tree/842228310449e879ebcaa3f910597757c9dbffd6/libtmux-workspace/src/main/java/io/github/libtmux/workspace)
[Workspace API source](https://github.com/libtmux/libtmux-java/tree/5c181887918351119bfdb3a046719fa792048e59/libtmux-workspace/src/main/java/io/github/libtmux/workspace)
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ libtmux modules:

```kotlin title="build.gradle.kts"
dependencies {
implementation(platform("io.github.libtmux:libtmux-bom:0.0.1-alpha.10"))
implementation(platform("io.github.libtmux:libtmux-bom:0.1.0"))
implementation("io.github.libtmux:libtmux-workspace")
}
```
Expand Down
9 changes: 4 additions & 5 deletions site/src/content/docs/ports/kotlin/concepts/queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ Filter captured objects in Kotlin, handle result counts explicitly, and match se

Use an empty directory on Linux with Git, tmux 3.3a or newer, and JDK 25. Save the project files and launcher below, then save any complete program on this page. Each program has its own imports and entry point.

The pinned source checkout supplies the Gradle wrapper and the library dependency.
The pinned source checkout supplies the Gradle wrapper. Gradle resolves the library from Maven Central.

```kotlin title="settings.gradle.kts"
rootProject.name = "connect"
includeBuild("libtmux-source")
```

```kotlin title="build.gradle.kts"
Expand All @@ -35,7 +34,7 @@ plugins {

repositories { mavenCentral() }
dependencies {
implementation("io.github.libtmux:libtmux-kotlin:0.0.1-alpha.17-SNAPSHOT")
implementation("io.github.libtmux:libtmux-kotlin:0.1.0")
}
kotlin {
jvmToolchain(25)
Expand Down Expand Up @@ -82,11 +81,11 @@ export LIBTMUX_SOCKET_PATH="$socket" TMUX_BIN="$binary"
"$binary" -S "$socket" has-session -t '=work-one'
```

Fetch the library revision used by these examples:
Fetch the Gradle wrapper from the 0.1.0 release:

```console
$ git clone https://github.com/libtmux/libtmux-java libtmux-source &&
git -C libtmux-source checkout be1d62fbaa1aa634c687e1c50bceeb09ef0b8a15
git -C libtmux-source checkout 5c181887918351119bfdb3a046719fa792048e59
```

Each run starts from the same two-session fixture. Programs do not depend on another example having run first. Their assertions fail if the observed result differs.
Expand Down
Loading
Loading