Skip to content

spec(x5u.5): library API surface — §26, §11.1, §15.1, §23.1, MANIFEST §3.2/§26.1#60

Merged
brandon-fryslie merged 5 commits into
masterfrom
spec-audit-x5u5-library-api
May 27, 2026
Merged

spec(x5u.5): library API surface — §26, §11.1, §15.1, §23.1, MANIFEST §3.2/§26.1#60
brandon-fryslie merged 5 commits into
masterfrom
spec-audit-x5u5-library-api

Conversation

@brandon-fryslie

Copy link
Copy Markdown
Contributor

Summary

Closes ticket tmux-audit-x5u.5. Remediates the library-API-surface cluster (7 accepted findings from the spec-q17 audit).

  • SPEC.md F1 — new §26 Library API Surface covering all src/index.ts exports, TmuxClient public methods, CommandResponse shape, and subscribable event names
  • SPEC.md F3§11.1 Library mapping: setSize() wraps form 1 of refresh-client -C; forms 2+3 require execute()
  • SPEC.md F5§15.1 Library note: requestReport() requires tmux 3.5+ (REQUEST_REPORT_MIN_VERSION)
  • SPEC.md F9§23.1 Synthetic Events: table for connection-state / reconnected with full ConnectionState union
  • SPEC.md F10 — §9 wait-exit row annotated with detach() as the LF unblocker
  • MANIFEST F4§3.2 Library detach note: detach() vs close() distinction
  • MANIFEST F9§26.1 Library typed operations: execute, listWindows, listPanes, sendKeys, splitWindow

Audit reports updated with remediation status. TRIAGE.md committed as the historical triage artifact.

Test plan

  • Verify all seven spec sections are present and accurately describe the source (src/index.ts, src/client.ts, src/tmux-compat.ts, src/connection-state.ts, src/emitter.ts)
  • Confirm cross-references point to existing sections (§4.3.1, §7.1, §11.1, §12.1, §15.1, §23.1, §26.2)
  • Confirm no claims in §26 contradict src/index.ts exports
  • output / extended-output absent from §26.4's subscribable event list (they route via attachBytesSink)

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.
Copilot AI review requested due to automatic review settings May 27, 2026 11:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, TmuxClient methods, CommandResponse, event names, synthetic lifecycle events, and requestReport()/setSize() notes.
  • Adds SPEC_MANIFEST.md notes for detach() and typed operations beyond refresh-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.

Comment thread SPEC.md Outdated
Comment thread .prompts/audit/spec-q17/TRIAGE.md Outdated
Comment thread .prompts/audit/spec-q17/TRIAGE.md Outdated
- 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}`.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread SPEC.md Outdated
…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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@brandon-fryslie brandon-fryslie merged commit c06a5e0 into master May 27, 2026
1 of 2 checks passed
@brandon-fryslie brandon-fryslie deleted the spec-audit-x5u5-library-api branch May 27, 2026 12:35
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.

2 participants