spec(x5u.5): library API surface — §26, §11.1, §15.1, §23.1, MANIFEST §3.2/§26.1#60
Merged
Merged
Conversation
Applied findings from .prompts/audit/spec-q17/ (ticket tmux-audit-x5u.5): - SPEC.md F1: add §26 Library API Surface (exports, TmuxClient methods, CommandResponse, event names) - SPEC.md F3: add §11.1 mapping setSize() to refresh-client -C form 1; forms 2+3 via execute() - SPEC.md F5: add §15.1 documenting requestReport() 3.5+ version floor (REQUEST_REPORT_MIN_VERSION) - SPEC.md F9: add §23.1 Synthetic Events table (connection-state / reconnected) - SPEC.md F10: annotate §9 wait-exit row with detach() as the LF unblocker - MANIFEST F4: add §3.2 library detach note distinguishing detach() from close() - MANIFEST F9: add §26.1 library typed operations (execute, listWindows, listPanes, sendKeys, splitWindow)
Updates audit reports with post-remediation status for all 7 findings applied in the preceding commit. Includes the TRIAGE.md artifact from ticket x5u.5 triage.
There was a problem hiding this comment.
Pull request overview
This PR updates the specification and audit artifacts to document the library API surface and close the x5u.5 audit findings for public exports, typed client operations, compatibility notes, lifecycle events, and detach semantics.
Changes:
- Adds SPEC.md sections for library API exports,
TmuxClientmethods,CommandResponse, event names, synthetic lifecycle events, andrequestReport()/setSize()notes. - Adds SPEC_MANIFEST.md notes for
detach()and typed operations beyondrefresh-client. - Commits triage/remediation status updates for the spec-q17 audit cluster.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
SPEC.md |
Adds consumer-facing library API and protocol mapping documentation. |
SPEC_MANIFEST.md |
Mirrors library detach and typed operation notes in the manifest. |
.prompts/audit/spec-q17/TRIAGE.md |
Adds historical disposition for accepted x5u.5 audit findings. |
.prompts/audit/spec-q17/2-spec.md |
Updates spec audit remediation status. |
.prompts/audit/spec-q17/1-spec-manifest.md |
Updates manifest audit remediation status. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- SPEC.md §26.2: sendKeys uses send-keys -H with UTF-8 hex encoding, not raw send-keys -t. The -H flag is what makes control bytes pass through literally. Verified against src/protocol/encoder.ts:87-91. - TRIAGE.md F3: forms 2+3 are the per-window -C @<id>:<w>x<h> and -C @<id>: forms, not "-C default" / "-C none" (those are flag names, not -C subcommands). Addresses Copilot review thread PRRT_kwDOSGhD7c6FFxWQ. - TRIAGE.md F5: REQUEST_REPORT_MIN_VERSION is in src/tmux-compat.ts, not client.ts. Addresses Copilot review thread PRRT_kwDOSGhD7c6FFxWC.
- §23.1 reconnected semantics: fires on every ready transition after the
first (not only from reconnecting). Manual close→connect cycles count.
Matches src/connectors/websocket/client.ts:890-897 comment and logic.
- §26.1 tmuxSocketDir: no trailing separator in returned path. Matches
src/transport/sockets.ts:37 return value `/tmp/tmux-${uid}`.
…ad fields TmuxCommandError carries CommandResponse on .response, not as direct properties on the error object. src/errors.ts:43 is the authority. Addresses Copilot review thread PRRT_kwDOSGhD7c6FGGTP.
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.
Summary
Closes ticket
tmux-audit-x5u.5. Remediates the library-API-surface cluster (7 accepted findings from the spec-q17 audit).§26 Library API Surfacecovering allsrc/index.tsexports,TmuxClientpublic methods,CommandResponseshape, and subscribable event names§11.1 Library mapping:setSize()wraps form 1 ofrefresh-client -C; forms 2+3 requireexecute()§15.1 Library note:requestReport()requires tmux 3.5+ (REQUEST_REPORT_MIN_VERSION)§23.1 Synthetic Events: table forconnection-state/reconnectedwith fullConnectionStateunionwait-exitrow annotated withdetach()as the LF unblocker§3.2 Library detach note:detach()vsclose()distinction§26.1 Library typed operations:execute,listWindows,listPanes,sendKeys,splitWindowAudit reports updated with remediation status.
TRIAGE.mdcommitted as the historical triage artifact.Test plan
src/index.ts,src/client.ts,src/tmux-compat.ts,src/connection-state.ts,src/emitter.ts)src/index.tsexportsoutput/extended-outputabsent from §26.4's subscribable event list (they route viaattachBytesSink)