Repository navigation
fix: ssh-config safety, macOS CLI resolution, share paths, test typecheck (0.1.4) - #60
Merged
Merged
Conversation
Adds tsconfig.test.json so npm run typecheck covers src/**/__tests__, fixes the 12 latent TS2345 errors by sharing a payload() helper that accepts the SDK's callTool union, and adds a typecheck step to the CI workflow. Closes #35 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…writes - Markers are matched as whole lines; orphaned, reversed, or duplicated markers raise SSH_CONFIG_MARKERS_CORRUPT and leave the file untouched, so a repeat run can no longer delete user content. CRLF is preserved. - Host aliases come from the first MagicDNS label (sanitized OS hostname fallback), are always a single [a-z0-9-] token, and collisions get a numeric suffix reported under renamed. Mullvad exit nodes and sharee nodes are skipped and reported (includeShared opts back in). - Writes go through a temp file + rename, keep the previous config as config.tailscale-mcp.bak, create files 0600 / ~/.ssh 0700, keep existing modes, write through symlinks, and skip no-op rewrites. Only ENOENT is treated as a missing config; other read errors return SSH_CONFIG_UNREADABLE. Closes #31 Closes #32 Closes #42 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…enied - Try /Applications/Tailscale.app/Contents/MacOS/Tailscale and the Homebrew prefixes after a PATH miss on macOS (generalizing the Windows fallback), with a macOS-specific BINARY_NOT_FOUND remedy. - TAILSCALE_MCP_BIN overrides binary resolution on every platform; a missing explicit path reports the configured path and skips fallbacks. - Access/permission denied output from serve, funnel, and reset maps to a new PERMISSION_DENIED code with the Linux operator remedy (sudo tailscale set --operator=$USER). Closes #53 Closes #54 Co-Authored-By: Claude Opus 5.5 <[email protected]>
stop_share takes an optional path (default "/") mapped to serve --https=<port> --set-path=<path> off, so a share created at a path can be stopped without serve reset wiping every share. share_port and stop_share validate paths at the schema (leading slash, URL-safe characters, no dot segments) and drop trailing slashes so both tools name the same mount. Closes #55 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
5 of 6 tasks
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
This PR fixes a batch of correctness and safety issues and releases them as 0.1.4. There's one commit per issue cluster.
~/.ssh/configare now matched as whole lines. Orphaned, reversed, or duplicated markers returnSSH_CONFIG_MARKERS_CORRUPTand nothing is written, so a repeat run can no longer delete user content.Hostaliases come from the first MagicDNS label, with a sanitized hostname as fallback. Each alias is a single[a-z0-9-]token, and collisions get a numeric suffix and are reported underrenamed. Mullvad exit nodes and sharee nodes are skipped and reported underskipped.config.tailscale-mcp.bakbackup. New files are created0600and~/.ssh0700, existing modes are kept, symlinked configs are written through, and no-op rewrites are skipped. OnlyENOENTcounts as "no config"; other read errors returnSSH_CONFIG_UNREADABLE./Applications/Tailscale.app/Contents/MacOS/Tailscaleand the Homebrew prefixes.TAILSCALE_MCP_BINenv var overrides binary resolution.PERMISSION_DENIEDcode, with the Linux operator remedy.stop_sharetakes apath, so a path-mounted share can be removed withoutserve reset.tsconfig.test.json, which fixed 12 latent TS errors.npm run typecheck.README,
mcp-tools.json, and CHANGELOG are updated to match.Output change: with
httpsPort/path,stop_sharenow reportsstoppedas{httpsPort, path}instead of a bare port number.Test plan
npm run typecheck(src + tests)npm test: 60/60 on Linux (WSL, Node 22); 59 + 1 POSIX-only skip on Windowsdist/index.jsexercised over stdio against the real Tailscale 1.102.3 CLI:TAILSCALE_MCP_BINoverride,BINARY_NOT_FOUND/DAEMON_NOT_RUNNINGpayloads, path validation errorsserve --https=443 --set-path=<p> offalso clears Funnel for that mount (tracked with the contract tests in Weekly contract tests against the real tailscale CLI to catch output-format drift #47)Closes #31
Closes #32
Closes #35
Closes #42
Closes #53
Closes #54
Closes #55
🤖 Generated with Claude Code