Skip to content

server(feat): Discover bound daemon features - #114

Draft
tony wants to merge 9 commits into
masterfrom
feat/public-capabilities-20261115
Draft

tony wants to merge 9 commits into
masterfrom
feat/public-capabilities-20261115

Conversation

@tony

@tony tony commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Lua and Neovim callers can inspect named feature requirements and support decisions on their connected tmux daemon before choosing an operation.

Summary

  • Add Request-returning Server:capabilities() over the shared feature registry.
  • Expose copied feature metadata, release decisions and active workarounds.
  • Add an owned-server example, public annotations and editor completion checks.

Discovery reads one bounded native list-commands -F row from the pinned daemon. Reserve native, unaliased list-commands throughout binding and discovery; an administrator who replaces that bootstrap command can run server code. The read invokes no user hooks under this prerequisite and preserves literal socket bytes through the existing metadata codec. Changed identities refuse instead of renewing mutation authority. Saved reports remain historical after a daemon change or handle close. Editing their nested metadata cannot change command guards or another report.

Both runtime adapters use the same core Request operation. Release ordering and command admission continue to use the existing registry and parser. The core gains no runtime dependency.

Test plan

  • Release, patch and candidate boundaries; copied metadata; cancelled probes and closed handles.
  • Public discovery and socket replacement through luv and Neovim on tmux 3.3a and 3.8.
  • A newer client connected to the older daemon, with hook and pre-effect refusal checks.
  • Ordinary command-alias negative controls through both adapters; literal socket bytes on released floor/current daemons.
  • Deliberate socket-normalization and malformed-frame breaks rejected without changing production source.
  • Deliberate shared-metadata, cached-evidence and wrong-release breaks rejected by the checks.
  • Refreshed floor/current outer gates, isolated development/source rocks and complete API examples.
  • Refreshed generated metadata, README links, native API export and actual LuaLS completion.
  • All fifteen exact-head CI/docs checks, including preview publication.
  • Fresh independent review of the corrected source and qualification.

This delivers the public discovery prerequisite in #104. Managed Program ownership, completion, final drain and crash recovery remain under #107. Existing lifecycle draft #27 stays separate.

Closes #104. Refs #107.

@tony
tony deployed to docs-preview November 16, 2026 04:30 — with GitHub Actions Active
@tony
tony force-pushed the feat/public-capabilities-20261115 branch from 0e55e83 to 43b4d84 Compare November 16, 2026 08:39
@tony
tony deployed to docs-preview November 16, 2026 08:52 — with GitHub Actions Active
tony added 9 commits November 16, 2026 02:54
why: Callers need feature requirements and support decisions from the
daemon they connected to before choosing an optional operation.

what:
- Return copied registry metadata through a native Server Request.
- Recheck pinned daemon evidence without renewing mutation authority.
- Cover release boundaries, cancellation, hooks and replacement.
why: Users need a runnable discovery example and typed feature reports
in the guide, package documentation and editor.

what:
- Add an owned-server example to the installed-program manifest.
- Document copied reports and bound daemon observations.
- Export report types and check completion through both adapters.
why: Users need the new discovery operation recorded for the next release.

what:
- Describe the Request and its detached metadata ownership.
why: Shell-command aliases can execute effects during discovery, and
parser round trips can change literal socket bytes.

what:
- Read one native list-commands record through the existing bounded codec
- Preserve malformed-reply diagnostics and reject nonzero or noisy replies
- Exercise alias effects, exact bytes and generation refusal
why: Existing servers need an explicit native command prerequisite for
binding and capability discovery.

what:
- Describe the reserved unaliased bootstrap and configuration boundary
- Explain row decoding and old-client versus old-daemon refusals
why: Callers need the native bootstrap requirement when upgrading.

what:
- Note literal socket bytes and strict daemon evidence replies
why: The native witness now uses the format argument.
what:
- Remove the obsolete final-argument local from the endpoint fixture
why: Discovery no longer uses a run-shell usage diagnostic.
what:
- Model the native old-client -N refusal in the complete program
- Match its documented task and expected packaged output
why: New publication helpers fail the current PR merge's lint gate.
what:
- Wrap the long CLI comment
- Rename two local argv values that shadow the command helper
@tony
tony force-pushed the feat/public-capabilities-20261115 branch from 43b4d84 to 96ff603 Compare November 16, 2026 08:56
@tony
tony deployed to docs-preview November 16, 2026 09:03 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
docs-preview — 96ff603c Deployed Nov 16, 2026 by tony via publish (pr-114, pr, false, docs-preview, true) / publish #390
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.

Expose the capability map through the public API

1 participant