Repository navigation
feat(client): send X-MakesPDF-Client: cli/<version> on every API request - #2
Merged
lecstor merged 3 commits intoSep 30, 2026
Merged
Conversation
The session working this task ended without committing - killed by a usage limit, a crash, or a stream that could not be read. The driver committed its worktree verbatim so the work is recoverable from another machine instead of being redone from nothing. Nothing here has been reviewed, built or tested, and no human or agent chose this as a stopping point. Read it before building on it, and discard it if it is a half-applied change. Task: 740a1014-3573-47cd-8039-4c6a170e30e4 Worktree: /Users/jason/dev/pdf/makespdf-cli/.worktrees/740a1014 Salvaged: 2026-09-30T15:59:48+10:00
The driver's WIP-salvage commit (6a9e3ef) swept up this local pnpm 11 build-approval file, which the MAK-148 implementation hand-off explicitly left untracked: `pnpm approve-builds --all` generated it for this working copy only, CI pins pnpm 10, and main's CI passes without it. Dropping it so the PR diff holds only the X-MakesPDF-Client change.
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.
What
Every makesPDF API request the CLI makes now carries
X-MakesPDF-Client: cli/<package version>(currentlycli/0.2.0), from one shared helper:src/client-info.ts— single source:CLIENT_KIND,CLIENT_VERSION(inlined from package.json at build time),CLIENT_NAME,clientHeaders()ApiClient.postspreadsclientHeaders()— coversmd,preview,render,validatesrc/commands/login.tsuse itPer operator decision 2f382669, official clients send plain
<kind>/<version>and the server matches kinds exactly;cliis already in the server's known-client list, so CLI traffic can be classified without guessing from the User-Agent.Tests
src/client-info.test.ts— kind/version/value and the shared headerssrc/client.test.ts— header present onApiClientrequestssrc/commands/login.test.ts— drivesloginthrough citty against a stubbed fetch and asserts the header on both device-flow requestspnpm typecheckclean,pnpm test22/22 across 4 files,pnpm buildsucceeds, and a mock-API E2E against the built binary sawX-MakesPDF-Client: cli/0.2.0on all 3 requests (md+login).Notes
.changeset/cli-client-header.md(patch). Nothing published to npm — tagging/release remains the operator's step.WIP salvagecommit (6a9e3ef) that swept uppnpm-workspace.yaml; it is dropped by 6931829, a local-only pnpm 11 build-approval workaround (CI pins pnpm 10). The final diff contains only the client-header change.