Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
6 changes: 3 additions & 3 deletions site/scripts/check-dev-sample.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ export async function checkDevSample(browser, base) {
assert.equal(await page.locator('main h1').count(), 1, `${path}: one main heading`)
const rootPath = new URL(base).pathname.replace(/\/$/, '')
const inventoryLinks = await page.locator('footer a[href$=".inv"]').evaluateAll((links) => links.map((link) => link.getAttribute('href')))
assert.deepEqual(inventoryLinks, path === 'api-example-probe/'
? [`${rootPath}/ts/latest/objects.inv`, `${rootPath}/objects-full.inv`]
: [...(path.startsWith('tmux/') ? [`${rootPath}/tmux/objects.inv`] : []), `${rootPath}/objects-full.inv`], `${path}: inventory links follow page scope`)
// The probe renders a TypeScript reference page outside /ts/latest/, so it names no port inventory.
assert.deepEqual(inventoryLinks, [...(path.startsWith('tmux/') ? [`${rootPath}/tmux/objects.inv`] : []), `${rootPath}/objects-full.inv`],
`${path}: inventory links follow page scope`)
assert.equal(await page.getByRole('link', { name: 'About Sphinx inventories', exact: true }).getAttribute('href'), `${rootPath}/meta/intersphinx/`)
for (const width of [1440, 768, 390]) {
await page.setViewportSize({ width, height: 1000 })
Expand Down
3 changes: 2 additions & 1 deletion site/src/components/SiteFooter.astro
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ const inventories = inventoryLinks(port, version, pagePath)
.inventory-tooltip { position: fixed; bottom: 3.5rem; right: 1rem; width: 15rem; max-width: calc(100vw - 2rem); padding: .5rem .75rem; border: 1px solid var(--color-edge); border-radius: .25rem; background: var(--color-surface); color: var(--color-fg); font-size: .75rem; opacity: 0; visibility: hidden; z-index: 10; transition: opacity .1s, visibility .1s; transition-delay: .1s; }
.inventory-tooltip::after { content: ''; position: absolute; inset: 100% 0 auto; height: .5rem; }
.inventory-tooltip[data-below]::after { inset: auto 0 100%; }
.inventory-help:hover .inventory-tooltip, .inventory-help:focus-within .inventory-tooltip { opacity: 1; visibility: visible; transition-delay: 0s; }
/* Showing flips visibility at once, so the link inside is tabbable as soon as the help link has focus; only the opacity fades. */
.inventory-help:hover .inventory-tooltip, .inventory-help:focus-within .inventory-tooltip { opacity: 1; visibility: visible; transition: opacity .1s 0s, visibility 0s 0s; }
.inventory-help[data-dismissed] .inventory-tooltip { opacity: 0; visibility: hidden; pointer-events: none; transition: none; }
</style>

Expand Down
2 changes: 1 addition & 1 deletion site/src/components/api/ApiReference.astro
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ const bases = owner && 'extends' in owner ? owner.extends ?? [] : []
{owner.doc?.since && <span>Since {owner.doc.since}</span>}
<span class="api-badge api-badge--mod api-reference-version"><span class="api-badge__label">{version}</span></span>
</div>}
<h1 class="scroll-mt-24 font-mono text-2xl font-semibold tracking-tight">
<h1 class="scroll-mt-24 text-2xl font-semibold tracking-tight">
<SymbolName name={displayName} />
</h1>
{owner && <>
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/mcp/ProtocolReference.astro
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const summaries = new Map(await Promise.all(entries.map(async (entry) => [entry.
<PageToolbar breadcrumbs={breadcrumbs} />
<header id={object ? 'api-overview' : section} class:list={[object && 'api-reference-heading']}>
{object && <div class="api-reference-eyebrow"><ApiBadge label={object.kind.replace('-', ' ')} variant="kind" value={object.kind} /><span>MCP</span><span class="api-badge api-badge--mod api-reference-version"><span class="api-badge__label">{version}</span></span></div>}
<h1 class="scroll-mt-24 font-mono text-2xl font-semibold tracking-tight">{object ? <code><SymbolName name={title} /></code> : title}</h1>
<h1 class="scroll-mt-24 text-2xl font-semibold tracking-tight">{object ? <code><SymbolName name={title} /></code> : title}</h1>
{!object && <p class="mt-3">{introductions[section]}</p>}
</header>
<ProductNotice port={port} product="mcp" />
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/tmux/Catalog.astro
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const entryCards = (items: ReturnType<typeof tmuxCatalogEntries>) => items.map((
<ApiBadge label={info!.singular} variant="kind" value={entry.kind} />
<span>tmux</span><span class="api-badge api-badge--mod api-reference-version"><span class="api-badge__label">{model.version}</span></span>
</div>}
<h1 class="scroll-mt-24 font-mono text-2xl font-semibold tracking-tight">
<h1 class="scroll-mt-24 text-2xl font-semibold tracking-tight">
{entry ? <code><SymbolName name={entry.name} /></code> : title}
</h1>
{entry?.summary && <p class="api-reference-summary">{entry.summary}</p>}
Expand Down
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).
Loading
Loading