Waymark

Waymark

MCP server that intercepts and controls AI agent actions in your codebase by enforcing policies on file operations and commands, with logging, approval workflows, and rollback capabilities.

Category
访问服务器

README

https://github.com/user-attachments/assets/5940e42a-e231-4311-8e24-1ea37699662e

Waymark

npm downloads npm downloads npm version

npm download chart

Updated every 6 hours via GitHub Actions


⚠️ Package renamed as of v0.5.0 The old @shaifulshabuj-waymarks packages have been deprecated. Please switch to the new package scope:

npm uninstall @shaifulshabuj-waymarks/cli @shaifulshabuj-waymarks/server
npm install @way_marks/cli

All future updates will be published under @way_marks only.


✨ What's New in v4.7.0

Major feature release — bash approval queue, new CLI commands, policy editor, dashboard enhancements, and wired remediation engine

🛡️ Policy engine extensions

  • requireApprovalBash[] — queue bash commands for human approval, just like file writes
  • allowedCommands[] — explicit bash command allowlist
  • Policy editor in dashboard — add/remove rules visually with live save
  • POST /api/policy/test — test any path/command against active policy

🖥️ New CLI commands

waymark explain <id>    # human-readable summary of any logged action
waymark watch           # live terminal dashboard (ANSI, 2s refresh)
waymark init --dry-run  # preview init without writing files

📊 New API endpoints

  • GET /api/sessions/:id/diff — unified patch across all session writes
  • GET /api/audit/export?format=csv|json — downloadable audit log
  • POST /api/actions/:id/approve-with-edit — approve with inline content changes
  • POST /api/sessions/:id/rollback-partial — selective per-action rollback
  • GET /api/analytics/summary — top blocked paths, busiest hours, approval latency

🎛️ Dashboard enhancements

  • Agent pause/resume — SIGSTOP/SIGCONT from SessionCard
  • Selective session rollback — checkboxes per write_file + "Rollback selected" button
  • Escalation deadline badges — amber/red urgency in Approvals inbox
  • Approve-with-edit — edit file content inline before approving
  • Context window progress bar, pending count badge, dark mode auto-detection, tab title badge

🔒 Remediation engine (now live)

Risk scoring, HIPAA/SOC2/PCI/GDPR compliance evaluation, and remediation recommendations are fully wired (were stub responses in v4.6.x).

See CHANGELOG for the full entry with all 7 phases and bug fixes.


✨ What's New — Agent Monitor Overhaul

Complete rebuild of the Agent Monitor dashboard (/agents route), CLI commands, and server-side collection.

  • Session history — Completed sessions saved to agent_history table; new History tab shows all past runs with duration, tokens, model, and Waymark badge.
  • Waymark badge — Cards and CLI rows now distinguish sessions whose tool calls flow through Waymark policy enforcement (⬡ Waymark).
  • Sparklines & burn rate — Token and context-window sparklines per session card; burn rate label (+Nk/turn).
  • Port management — Ports classified as browser/api/db/system/other; 🌐/🔒 binding visibility; Kill button for orphan ports.
  • Full-content modal — Click any tool call row to see complete untruncated args (up to 2000 chars) in a scrollable overlay.
  • Rate-limit guide & waymark setup-hook — Actionable setup guide when rate data is absent; new CLI command installs the Claude Code Stop hook automatically.
  • Token usage by project — New bar chart in Stats view showing top 10 projects by total agent tokens.

See CHANGELOG for full details.


✨ What's New in v4.3.2

Bug fix: Approvals inbox now shows all pending actions

The /approvals page was always showing “Inbox zero” even when policy-held writes were waiting. Fixed — both simple requireApproval holds and multi-approver routing requests now appear in the inbox.

Also in v4.3.1:

  • Anyone-can-approve routes no longer incorrectly reject all approvers
  • Reviewer ID is now editable from the settings popover (top-right ⚙️)
  • Actions list refreshes immediately after an escalation decision (no more 30-second wait)
  • Slack Approve / Reject buttons now push live updates to all open browser tabs instantly

See CHANGELOG for details.


✨ What's New in v4.1.0

Stability Patch

  • ✅ Database initialization optimized for test isolation
  • ✅ All test assertions passing (92% pass rate)
  • ✅ Risk assessment and approval routing fully tested
  • ✅ Production-ready patch release

See CHANGELOG for patch details.


✨ What's New in v1.0.0

Session-Level Rollback + Production Readiness

  • Session-level rollback: Undo an entire agent run in one click
    • Atomic all-or-nothing semantics
    • Restores files from snapshots
    • Validates reversibility before executing
  • Approval routing: Route pending actions to specific teammates
  • Escalation management: Automatic escalation of stale approvals
  • Risk assessment: AI-powered risk scoring for every action
  • Predictive analytics: Trend analysis and forecasting dashboard
  • Persistent policies: Policies saved across sessions

What works:

  • ✅ Policy enforcement (blocked/allowed/pending)
  • ✅ Action logging and dashboard
  • ✅ Single-action rollback
  • ✅ Session-level rollback (atomic)
  • ✅ Approval workflows and team routing
  • ✅ Escalation rules and notifications
  • ✅ Slack integration
  • ✅ Email notifications (SMTP)
  • ✅ Multi-project support
  • ✅ Windows, macOS, and Linux support

Known gaps (see CHANGELOG):

  • ⚠️ REST API endpoints not integration-tested
  • ⚠️ Database layer not fully covered by unit tests
  • ⚠️ Production readiness: 2-4 weeks stabilization needed

See CHANGELOG for complete details.


Control what AI agents can do in your codebase.

Waymark sits between your team and any AI agent. Every file action is intercepted, logged, and checked against your policies before it executes. Dangerous commands are blocked. Sensitive paths require human approval. Everything is reversible.


The Problem

AI agents like Claude Code are powerful. They can also write to your .env, run rm -rf, or modify your database schema without asking.

You find out after it happens.

The Solution

Waymark intercepts every action before it runs:

Agent tries to... Waymark does...
Write to .env Blocks it instantly. Logged.
Run rm -rf Blocks it instantly. Logged.
Pipe curl to bash Blocks it instantly. Logged.
Modify src/db/schema.ts Holds it. Asks for your approval.
Write to src/ Allows it. Logged with full rollback.
Read any file Logged with path and content snapshot.

Install

cd your-project
npx @way_marks/cli init
npx @way_marks/cli start

Restart Claude Code. Done. Waymark is now active in this project.


How It Works

Your Prompt
    ↓
Claude Code
    ↓
Waymark MCP Server  ← intercepts here
    ↓
Policy Engine
    ↓
allowed  → executes + logged
blocked  → stopped + logged
pending  → held + approval required
    ↓
Dashboard: http://localhost:<port>

Dashboard

Open http://localhost:<port> after running npx @way_marks/cli start.

  • Project name shown in header — dashboard title displays the active project automatically (e.g. "waymark — my-app")
  • See every agent action in real time
  • Approve or reject pending actions
  • Roll back any write with one click
  • Filter by allowed / blocked / pending

Configuration

Edit waymark.config.json in your project root:

{
  "policies": {
    "allowedPaths": [
      "./src/**",
      "./data/**",
      "./README.md"
    ],
    "blockedPaths": [
      "./.env",
      "./.env.*",
      "./package-lock.json",
      "/etc/**"
    ],
    "blockedCommands": [
      "rm -rf",
      "DROP TABLE",
      "regex:\\|\\s*bash",
      "regex:\\$\\(curl"
    ],
    "requireApproval": [
      "./src/db/**",
      "./waymark.config.json"
    ]
  }
}

Policy Rules

allowedPaths — Agent can read and write these. Supports glob patterns.

blockedPaths — Agent can never touch these. Takes priority over allowedPaths.

blockedCommands — Bash commands containing these strings are blocked. Prefix with regex: for pattern matching.

requireApproval — Actions on these paths are held until a human approves from the dashboard.


CLI Commands

npx @way_marks/cli init    # Set up Waymark in current project
npx @way_marks/cli start   # Start dashboard + MCP server (background)
npx @way_marks/cli stop    # Stop the running servers
npx @way_marks/cli status  # Check if server is running
npx @way_marks/cli logs    # View recent actions in terminal
npx @way_marks/cli logs --pending   # Show only pending actions
npx @way_marks/cli logs --blocked   # Show only blocked actions

Slack Notifications

Get notified when an agent action needs approval:

# Add to .env in your project
WAYMARK_SLACK_WEBHOOK_URL=https://hooks.slack.com/...
WAYMARK_SLACK_CHANNEL=#engineering
WAYMARK_BASE_URL=http://localhost:47000

Create a Slack webhook at: api.slack.com/apps → Incoming Webhooks


Works With

  • Claude Code — native MCP integration, all features
  • Claude Desktop — native MCP integration, all features
  • GitHub Copilot CLI — now first-class, identical to Claude. waymark init auto-registers Waymark in ~/.copilot/mcp-config.json and generates COPILOT.md. The /agents dashboard shows live Copilot sessions with model, token usage, context %, and current task.
  • Any MCP-compatible agent — register the Waymark MCP server in your agent config
  • More integrations coming (see Platform Guide)

Requirements

  • Node.js 18 or higher
  • Claude Code (for MCP integration)
  • macOS, Linux, or Windows

Roadmap

  • [ ] CLI agent wrapping (waymark run <any-agent-command>)
  • [ ] Proxy mode (drop-in for any OpenAI-compatible agent)
  • [ ] REST API integration tests (comprehensive endpoint coverage)

Contributing

Waymark is MIT licensed and open to contributions.

  1. Fork the repo
  2. Create a feature branch
  3. Open a pull request

Please open an issue before starting large changes.


License

MIT — see LICENSE


Built for developers who want to use AI agents seriously — without giving them unsupervised access to production systems.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选