Skip to content

Commit c5e2a90

Browse files
authored
docs: mobile hero fix + guardrails messaging (#62)
* docs: fix mobile hero font size, update firewall→guardrails messaging * fix: read/write path display — handle file_path param (Claude Code) in Path() and dashboard extractCmd Claude Code's Read/Write/Edit tools send 'file_path' in tool_input, not 'path'. Path() now checks file_path first; extractCmd checks request.file_path. Approval path in hook.go uses call.Path() for consistency. Fallback in extractCmd changed from event ID to '—' (cleaner for unknown paths). * docs: refine subtitle copy — guardrails + policy firewall, no em dash
1 parent 3853639 commit c5e2a90

File tree

6 files changed

+21
-5
lines changed

6 files changed

+21
-5
lines changed

cmd/rampart/cli/hook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ Cline setup: Use "rampart setup cline" to install hooks automatically.`,
363363
autoDiscovered: serveAutoDiscovered,
364364
}
365365
command, _ := call.Params["command"].(string)
366-
path, _ := call.Params["path"].(string)
366+
path := call.Path() // handles both "file_path" (Claude Code) and "path"
367367
result := approvalClient.requestApprovalCtx(cmd.Context(), call.Tool, command, call.Agent, path, decision.Message, 5*time.Minute)
368368
return outputHookResult(cmd, format, result, false, decision.Message, cmdStr)
369369
}

docs-site/assets/extra.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@
5050
margin-bottom: 2rem;
5151
}
5252

53+
@media screen and (max-width: 600px) {
54+
.md-typeset .hero-title {
55+
font-size: 1.75rem;
56+
letter-spacing: -0.02em;
57+
}
58+
.md-typeset .hero-subtitle {
59+
font-size: 1rem;
60+
}
61+
}
62+
5363
/* Navigation */
5464
.md-nav__link {
5565
font-size: 0.82rem;

docs-site/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ hide:
1010

1111
</div>
1212

13-
<p class="hero-subtitle">Open-source firewall for AI agents. See everything your AI does. Block the dangerous stuff.</p>
13+
<p class="hero-subtitle">Open-source guardrails for AI agents. A policy firewall for shell commands, file access, and MCP tools.</p>
1414

1515
---
1616

internal/dashboard/static/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,13 +600,15 @@
600600
function extractCmd(a){
601601
// approval objects: top-level command
602602
if(a.command)return a.command;
603-
// write/read tool calls: path field
603+
// write/read tool calls: path field (Claude Code uses file_path, others use path)
604+
if(a.file_path)return a.file_path;
604605
if(a.path)return a.path;
605606
// audit events: nested under request
606607
if(a.request&&a.request.command)return Array.isArray(a.request.command)?a.request.command.join(' '):a.request.command;
608+
if(a.request&&a.request.file_path)return a.request.file_path;
607609
if(a.request&&a.request.path)return a.request.path;
608610
if(a.description)return a.description;
609-
return a.id||'unknown';
611+
return '—';
610612
}
611613
function extractAction(ev){
612614
// audit events: nested under decision

internal/engine/decision.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,12 @@ func (tc ToolCall) Command() string {
111111
}
112112

113113
// Path extracts the file path from a read/write tool call's params.
114+
// Claude Code uses "file_path" for Read/Write/Edit; other agents may use "path".
114115
// Returns empty string if not present or not a string.
115116
func (tc ToolCall) Path() string {
117+
if p, _ := tc.Params["file_path"].(string); p != "" {
118+
return p
119+
}
116120
p, _ := tc.Params["path"].(string)
117121
return p
118122
}

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
site_name: Rampart
22
site_url: https://docs.rampart.sh
3-
site_description: Open-source firewall for AI agents. Policy engine that controls what AI tools can do on your machine.
3+
site_description: Open-source guardrails for AI agents. A policy firewall for shell commands, file access, and MCP tools.
44
site_author: peg
55
repo_url: https://github.com/peg/rampart
66
repo_name: peg/rampart

0 commit comments

Comments
 (0)