Skip to content

Docs(examples): Add complete API programs - #13

Merged
tony merged 1 commit into
masterfrom
docs-complete-api-examples
Oct 2, 2026
Merged

tony merged 1 commit into
masterfrom
docs-complete-api-examples

Conversation

@tony

@tony tony commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

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:

  • An independent source review found no correctness blockers in the exact committed patch.
  • A fresh HTTPS clone at 0395620d362ef75c74cd488f9577afda68922586 installed 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.
  • The isolated source-rock package check passed on tmux 3.7c in 16.07 seconds, including the new examples and failure controls.
  • Ten focused tooling tests passed in 0.10 seconds. Formatting passed in 0.91 seconds, lint in 3.84 seconds with no warnings, and documentation checks in 0.03 seconds. LuaLS 3.19.1 exported 114 declarations and 659 fields, resolving all eleven manifest targets and all eight complete file payloads.
  • Required local mid and outer attempts both stopped at the existing five-second tooling-test subprocess deadline under host load, without reported assertion failures. Those gates remain incomplete; their budgets are unchanged. Local tooling used Python 3.12.3, which meets the documented minimum; the pinned 3.14.6 executable was unavailable.

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.
@tony
tony deployed to docs-preview October 2, 2026 21:44 — with GitHub Actions Active
@tony
tony merged commit 4694b07 into master Oct 2, 2026
24 checks passed
@tony
tony deployed to docs-preview-cleanup October 2, 2026 21:50 — with GitHub Actions Active

This branch was successfully deployed

2 active deployments
docs-preview-cleanup — 0395620d Deployed Oct 2, 2026 by tony via cleanup #9
docs-preview — 0395620d Deployed Oct 2, 2026 by tony via publish (pr-13, pr, false, docs-preview, true) / publish #25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant