Repository navigation
Conversation
why: A recording counts only against the server its snapshot describes, and recording Julia needs the snapshot to be at the revision the recorder runs. The committed snapshot described libtmux-julia 0.1.0-alpha.1; master reports 0.1.1, with new tool descriptions and annotations, an `output` field in the error schemas, and a larger list_panes input. what: - Regenerate mcp-protocol/julia.json with gen-mcp-protocol.mjs --port julia at libtmux-julia c19e4a164 (master) - Regenerate Julia's entry of mcp-tools.json with gen-mcp-tools.mjs --port julia, because mcp-reference.test.ts binds the catalog to the snapshot; no other port's entry changes
why: Julia's worked example showed "Requests only" because the recorder had no entry for it. Its server also differs from the recorded ports: it borrows a running tmux, and a pane target carries a `generation` (the tmux server's process id and start time) that list_panes returns and capture_pane must send back. The example's stand-in is refused as `stale_target`, and a real value differs on every run, so the call could be neither recorded as written nor kept stable. what: - Add a julia entry that installs both packages from the checkout into an environment, writes the launcher `install_cli` documents, and borrows a tmux whose first pane shows checks.log - Let a call's arguments be a function of the earlier steps, with `listedValue` and `withListed` to send the listed value in place of the example's stand-in; the step records what was sent - Store the stand-in in the transcript and in `rewritten.generation`, and refuse a recording that still holds the real value - Require Julia's last answer to state the log's last line - Test that a call is sent the listed value, that the stand-in is refused by a server that checks it, and that a call with nothing listed fails instead of going out with the stand-in
why: The Julia page showed "Requests only" because its MCP worked example had never been recorded. The recording alone would still have drawn an empty tmux, since Julia's list_panes names the session and window through `contexts` and the pane through `target`, which the replay did not read, and a capture's screen went unshown. what: - Add mcp-transcripts/julia.json, recorded at libtmux-julia c19e4a164 (master) by gen-mcp-transcript.mjs --port julia; its `contracts` equal the committed snapshot's, its steps equal EXAMPLES.julia, and re-recording produced the same bytes - Draw a pane from a listing that carries `contexts` and `target`, and show what capture_pane read as the pane's screen - Say on the page that the server's generation, which differs on every run, is shown as the stand-in the example uses - Add Julia to the recorded-results, earlier-revision and replay tests, so a changed schema or argument for list_panes or capture_pane hides the recording; cover the page note, the drawn pane and the linked listing
Merged
1 of 3 tasks
This branch was previously deployed
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.
Why
The MCP worked example on the Julia page (https://libtmux.org/en/julia/latest/) shows "Requests only" because
scripts/gen-mcp-transcript.mjshad no Julia entry andsite/src/data/mcp-transcripts/julia.jsondid not exist. Two properties of the Julia server stopped the example from being recorded as written:targetof{ paneId, generation }. The generation is the tmux server's process id and start time (for example<pid>:<start time>),list_panesreturns it, andcapture_panerefuses any other value. The example'sgeneration: '3f9a1c'was invented; the server answers it withstale_target. A real value differs on every run, so a recording that kept it could not be stable or equal toEXAMPLES.julia.list_panesnames the session and window throughcontextsand the pane throughtarget. The replay read neither, so even a good recording drew an empty tmux.What
site/src/data/mcp-protocol/julia.jsonis refreshed to libtmux-julia master (c19e4a164; it described0.1.0-alpha.1, master reports0.1.1), and Julia's entry ofmcp-tools.jsonfollows it becausemcp-reference.test.tsbinds the two. No other port's entry changes.scripts/gen-mcp-transcript.mjsgains ajuliaentry. It installsLibTmuxandLibTmuxMCPfrom the checkout into an environment, writes the launcher thatinstall_clidocuments, and borrows a tmux whose first pane runscat checks.log -, so "what the first pane is displaying" is the log the other ports use. The server runs with the default tool catalog, which holds both tools the example calls.scripts/lib/mcp-session.mjs: a call'sargumentsmay be a function of the earlier steps (withListed,listedValue). The recorder sendscapture_panethe generationlist_panesreturned and stores the example's stand-in everywhere in the recording, so the steps equalEXAMPLES.julia. The leak check also refuses a recording that still holds the real value, andsandbox.rewritten.generationnames the stand-in.3f9a1c."site/src/lib/mcp-replay.tsdraws a pane from a listing that carriescontextsandtarget, and shows whatcapture_paneread as the pane's screen. The preview now shows[docs], window0:cat, pane%0 catand the two log lines; every drawn word is still checked against the recording.EXAMPLES.juliais unchanged.The stand-in is a rewrite of recorded data, disclosed on the page and in the data file. The alternative is to drop the generation from the example by configuring a caller pane, which would hide the target flow that is the point of Julia's design. I kept the flow and disclosed the rewrite; say if you prefer the other.
Rebase note
#247 (
fix/ruby-core-showcase-refresh-20261103) is changingscripts/gen-mcp-transcript.mjs,scripts/lib/mcp-transcript-checks.mjsandsite/src/data/mcp-tools.json. This PR touches the first and third (theSERVERSmap, thePRESENTline, thecalls/marks/leaksexpressions, and Julia's region ofmcp-tools.json) and leavesmcp-transcript-checks.mjsalone. Whichever PR merges second must rebase. Ifmcp-tools.jsonconflicts, regenerate rather than merge by hand:LIBTMUX_DOCS_CHECKOUT_JULIA=<clone at c19e4a164> node scripts/gen-mcp-tools.mjs --port julia.Verification
Recording, made at libtmux-julia
c19e4a164with tmux 3.8a on a private socket under/home/d/tmp-wave/heavy.sh:--checkpasses. The pane's command iscatin every recording because the pane startscat checks.log -directly, solist_panescannot catch a shell on its way toexec, the kind of start-up race rs's split pane had. The log is printed long before the first call, which comes after the Julia server has loaded.checks finished, and the recording holds no host path, user name, host name or real generation.contractsequal the committed snapshot's forlist_panesandcapture_pane; the recording holds only while those schemas hold.Tests (vitest, workers capped, through
heavy.sh):mcp-showcase,mcp-transcript-checks,mcp-replay,port-landing-page, the newmcp-session, and every other non-outermcp-*suite andport-landing: 14 files, 525 tests passed.mcp-protocol.outer,mcp-descriptions.outer,mcp-showcase.outer,mcp-source-bound.outer: 4 files, 57 tests passed.astro check: 0 errors, 0 warnings (needed--max-old-space-size=5120).oxlintreports nothing in the touched files.list_panesorcapture_panehides the recording. A mutated recording (a changed capture text, norewritten.generation) fails four tests, and the newmcp-sessiontests include a control showing the server refuses the stand-in.Not run: a site build, the publication audit,
gen-mcp-tools.mjs --checkagainst the standard sibling checkouts (whose heads differ from the recorded revision), the assembled-tree suites (skipped: nothing assembled) and the fullpnpm testouter loop. The preview was checked through the component tests, not in a browser.