agentleFS
GeiserXGeiserX/vpn-bypass-mcp/AGENTS.md

vpn-bypass-mcp

AGENTS.md1 starsChanged 5 days agoMITView on GitHub

MCP server (Go, stdio only, macOS only) for VPN Bypass. Each tool sends one request to the app's control socket and returns the app's result object unchanged. The app owns the contract. Its source of truth is in the VPN-Bypass repo: Sources/VPNBypassCore/CommandRouter.swift (Custom-mode verbs: status, mode, default, route.*, rule.*), ClassicControl.swift (the 4.9.0 domain.*, service.*, routes.*, refresh, dns.refresh and logs verbs; both hold their arguments and error codes), ControlSocketServer.swift (framing: one JSON line each way, 64 KiB per request line, 30…

  • Commits and pushes
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,843 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

17 rules. About 0 are common, 4 are distinctive, and 13 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 13

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every args value is a string.

    line 9
  2. Very specific:

    Read verbs are listed in client.IsMutating.

    line 12
  3. Very specific:

    Keep them apart in every description and doc.

    line 20
  4. Very specific:

    Every tool has a row in cases in internal/tools/tools_test.go pinning the exact request line it sends.

    line 25
  5. Very specific:

    Use bd for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists

    line 49
  6. Very specific:

    Run bd prime for detailed command reference and session close protocol

    line 50
  7. Very specific:

    Use bd remember for persistent knowledge — do NOT use MEMORY.md files

    line 51
  8. Very specific:

    Conservative (default): Use bd for task tracking. Do not run git commits, git pushes, or Dolt remote sync unless explicitly asked.

    line 59
  9. Very specific:

    Minimal: Keep tool instruction files as pointers to bd prime.

    line 60
  10. Distinctive:

    Team-maintainer: Only when the repository explicitly opts in, agents may close beads, run quality gates, commit, and push as part of …

    line 61
  11. Distinctive:

    File issues for remaining work: - Create beads for anything that needs follow-up

    line 67
  12. Distinctive:

    Do not commit or push without clear authority from the active profile or the current user request.

    line 85
  13. Distinctive:

    If a required sync or push is blocked, stop and report the exact command and error.

    line 86
  14. Very specific:

    Use Beads (bd) for durable task tracking in repositories that include it.

    line 96
  15. Very specific:

    Use bd for all task tracking.

    line 110
  16. Very specific:

    Run bd prime when Beads context is missing or stale.

    line 111
  17. Very specific:

    Keep persistent project memory in Beads via bd remember.

    line 112

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

vpn-bypass-mcp

MCP server (Go, stdio only, macOS only) for VPN Bypass. Each tool sends one request to the app's control socket and returns the app's result object unchanged.

The wire contract

The app owns the contract. Its source of truth is in the VPN-Bypass repo: Sources/VPNBypassCore/CommandRouter.swift (Custom-mode verbs: status, mode, default, route.*, rule.*), ClassicControl.swift (the 4.9.0 domain.*, service.*, routes.*, refresh, dns.refresh and logs verbs; both hold their arguments and error codes), ControlSocketServer.swift (framing: one JSON line each way, 64 KiB per request line, 30 s server timeout on reads, no timeout on mutations) and ControlSurface.swift. Read them before adding or changing a tool.

  • Every args value is a string. Tools convert numbers and booleans in internal/tools/args.go.
  • A proxy password travels in secrets.pass only. It never appears in a result, an error message or a log line.
  • The result stays raw JSON (json.RawMessage), so a field the app adds later reaches the agent with no change here.
  • Read verbs are listed in client.IsMutating; every other verb counts as mutating, the same default the app uses. A new read verb goes into that list and into the tool's ReadOnly flag, or read-only mode hides it.
  • set_mode sends status first and sends mode only when the app is in another mode (sameMode in internal/tools/status.go), matching what the app itself does from 4.9.0.
  • A tool that changes where traffic goes is destructiveHint: true, adds included; only refresh_dns is a non-destructive write. TestDestructiveTools pins the list. A tool whose arguments name an outside host (a proxy) is also openWorldHint: true.
  • Tool results are the app's JSON as text and as structuredContent. An argument a tool does not declare is refused before anything is sent.
  • The domain, service, routes.active, routes.clear, refresh, dns.refresh and logs verbs exist from VPN Bypass 4.9.0. Older apps answer unknown_command, which internal/tools/tools.go turns into the 4.9.0 message.

Two meanings of "route"

Keep them apart in every description and doc. A kernel route is an entry the app installed in the macOS routing table (routes.active, routes.clear, refresh). A Custom-mode route is a named egress that rules point at (route.*, the custom_* tools).

Tests

  • go test -race ./... runs everything against internal/fakeapp, an in-process fake socket that records each request line.
  • Every tool has a row in cases in internal/tools/tools_test.go pinning the exact request line it sends. TestEveryToolSendsTheContractRequest fails for a tool without a row.
  • TestLiveReadOnly runs against the real app when its socket exists on this Mac. It sends read verbs only. A test that talks to the real socket stays read-only: a mutating verb changes the live routing of the machine.
  • A new test earns trust by going red once: break the line it covers, watch it fail, restore the line by hand.

Releases

A v*.*.* tag runs .github/workflows/release.yml: GoReleaser builds darwin amd64 and arm64 binaries, signs them with a Developer ID certificate and notarizes them with Apple (secrets MACOS_SIGN_P12, MACOS_SIGN_PASSWORD, MACOS_NOTARY_ISSUER_ID, MACOS_NOTARY_KEY_ID, MACOS_NOTARY_KEY; a tag build missing any of them stops before GoReleaser), archives them, then npm publishes the wrapper (run.js, postinstall.js) with trusted publishing. postinstall.js downloads vpn-bypass-mcp_<version>_darwin_<arch>.tar.gz, so the archive name in .goreleaser.yaml and that script change together. package.json and server.json carry the version too, and the check-version job refuses a tag they disagree with. The MCP Registry job (.github/workflows/mcp-registry.yml) waits for npm to serve the new version before it publishes, through .github/scripts/wait-for-npm.sh; CI runs .github/scripts/wait-for-npm_test.sh against a fake curl.

<!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:970c3bf2 -->

Beads Issue Tracker

This project uses bd (beads) for issue tracking. Run bd prime to see full workflow context and commands.

Quick Reference

bd ready              # Find available work
bd show <id>          # View issue details
bd update <id> --claim  # Claim work
bd close <id>         # Complete work

Rules

  • Use bd for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists
  • Run bd prime for detailed command reference and session close protocol
  • Use bd remember for persistent knowledge — do NOT use MEMORY.md files

Architecture in one line: issues live in a local Dolt DB; sync uses refs/dolt/data on your git remote; .beads/issues.jsonl is a passive export. See https://github.com/gastownhall/beads/blob/main/docs/SYNC_CONCEPTS.md for details and anti-patterns.

Agent Context Profiles

The managed Beads block is task-tracking guidance, not permission to override repository, user, or orchestrator instructions.

  • Conservative (default): Use bd for task tracking. Do not run git commits, git pushes, or Dolt remote sync unless explicitly asked. At handoff, report changed files, validation, and suggested next commands.
  • Minimal: Keep tool instruction files as pointers to bd prime; use the same conservative git policy unless active instructions say otherwise.
  • Team-maintainer: Only when the repository explicitly opts in, agents may close beads, run quality gates, commit, and push as part of session close. A current "do not commit" or "do not push" instruction still wins.

Session Completion

This protocol applies when ending a Beads implementation workflow. It is subordinate to explicit user, repository, and orchestrator instructions.

  1. File issues for remaining work - Create beads for anything that needs follow-up
  2. Run quality gates (if code changed) - Tests, linters, builds
  3. Update issue status - Close finished work, update in-progress items
  4. Handle git/sync by active profile:
    # Conservative/minimal/default: report status and proposed commands; wait for approval.
    git status
    
    # Team-maintainer opt-in only, unless current instructions forbid it:
    git pull --rebase
    bd dolt push
    git push
    git status
  5. Hand off - Summarize changes, validation, issue status, and any blocked sync/commit/push step

Critical rules:

  • Explicit user or orchestrator instructions override this Beads block.
  • Do not commit or push without clear authority from the active profile or the current user request.
  • If a required sync or push is blocked, stop and report the exact command and error.
<!-- END BEADS INTEGRATION -->

Where the tracker syncs

This repo is public, so its tracker syncs only to the private remote named by sync.remote in .beads/config.yaml. The block above says sync uses "your git remote". Here that never means this GitHub repo. Don't add it as a Dolt remote and don't push refs/dolt/* to it.

<!-- BEGIN BEADS CODEX SETUP: generated by bd setup codex -->

Beads Issue Tracker

Use Beads (bd) for durable task tracking in repositories that include it. Use the beads skill at .agents/skills/beads/SKILL.md (project install) or ~/.agents/skills/beads/SKILL.md (global install) for Beads workflow guidance, then use the bd CLI for issue operations.

Quick Reference

bd ready                # Find available work
bd show <id>            # View issue details
bd update <id> --claim  # Claim work
bd close <id>           # Complete work
bd prime                # Refresh Beads context

Rules

  • Use bd for all task tracking; do not create markdown TODO lists.
  • Run bd prime when Beads context is missing or stale. Codex 0.129.0+ can load Beads context automatically through native hooks; use /hooks to inspect or toggle them.
  • Keep persistent project memory in Beads via bd remember; do not create ad hoc memory files.

Architecture in one line: issues live in a local Dolt DB; sync uses refs/dolt/data on your git remote; .beads/issues.jsonl is a passive export. See https://github.com/gastownhall/beads/blob/main/docs/SYNC_CONCEPTS.md for details and anti-patterns.

<!-- END BEADS CODEX SETUP -->

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.