Docs(examples): Add complete API programs - #13
Merged
Merged
Conversation
why: Core API reference pages need runnable examples with explicit tmux ownership, dependencies, and cleanup. what: - Add seven standalone Lua programs and a complete private-daemon launcher. - Bind eleven native API identities through a validated source manifest. - Export whole files and run them from isolated installed source rocks, including import and runtime failure cleanup checks. The installed-package check and focused validation pass. Required mid and outer attempts hit the existing five-second tooling-test timeout under host load; those gates remain incomplete and their budgets are unchanged.
This branch was successfully 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.
Seven standalone Lua programs demonstrate connecting to a server, listing sessions/windows/panes, creating sessions/windows, querying sessions, sending input, and capturing output. Each includes imports and awaited error handling. The displayed shell launcher starts a private daemon, verifies that closing the connection leaves its bootstrap session alive, and cleans up after success or failure.
A source-owned manifest maps these complete files to eleven existing Lua API identities. The native exporter validates the targets against LuaLS declarations and includes the exact program and launcher contents. Installed source-rock checks execute the same files outside the checkout and verify their expected output and failure cleanup. Runtime APIs are unchanged; site-model integration follows separately.
Validation:
0395620d362ef75c74cd488f9577afda68922586installed the documented LuaRocks dependencies with no Git URL rewrite. All seven programs passed on tmux 3.2a and 3.7c using Lua 5.5.1 and luv 1.52.1-0: fourteen positive runs and four import/runtime failure controls. All eight source file hashes matched, expected output matched, and no owned socket directories remained. Dependency setup took 68.47 seconds; positive executions totaled 10.11 seconds.