@maskera/mcp 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -22,14 +22,20 @@ Point any harness at it:
22
22
  # Claude Code / Anthropic SDK
23
23
  ANTHROPIC_BASE_URL=http://127.0.0.1:8787 claude
24
24
 
25
- # Codex / OpenAI SDK / Cursor custom OpenAI base URL
25
+ # Codex (API key) / OpenAI SDK / Cursor custom OpenAI base URL
26
+ # Note: Codex logged in with a ChatGPT subscription requires HTTPS on chatgpt_base_url;
27
+ # use the MCP stdio server below (`codex mcp add maskera -- npx -y @maskera/mcp`) instead.
26
28
  OPENAI_BASE_URL=http://127.0.0.1:8787/v1 codex
27
29
 
28
- # Inspect local redaction counts (never raw PII)
29
- curl http://127.0.0.1:8787/_maskera/status
30
+ # Inspect live redactions in your browser (local RAM only, screen-share safe by default)
31
+ open http://127.0.0.1:8787/_maskera
32
+
33
+ # Optional: write local metadata-only audit logs (counts only, never raw text)
34
+ npx -y @maskera/mcp proxy --audit-log ./maskera-audit.jsonl
30
35
  ```
31
36
 
32
- - Routes Anthropic (`/v1/messages`, `/anthropic/*`) and OpenAI (`/v1/chat/completions`, `/v1/responses`, `/openai/*`) automatically, or use `--upstream <url>` for any OpenAI/Anthropic-compatible gateway (Azure, OpenRouter, LiteLLM).
37
+ - Routes Anthropic (`/v1/messages`, `/anthropic/*`) and OpenAI (`/v1/chat/completions`, `/v1/responses`, `/openai/*`) automatically, or use `--upstream <url>` for any OpenAI/Anthropic-compatible endpoint (Azure, OpenRouter, LiteLLM).
38
+ - Built-in local live inspector at `http://127.0.0.1:8787/_maskera`: see every proxied request, entity counts, and the exact masked text sent upstream in real time (originals hidden by default until you toggle reveal).
33
39
  - Restores placeholders even when split across SSE stream chunks, including JSON `tool_use` / `tool_calls` arguments.
34
40
  - Fails closed (`502`) if local redaction fails: raw PII is never forwarded upstream.
35
41
 
@@ -63,6 +69,34 @@ echo '{"prompt":"Ring 070-174 06 58"}' | npx -y @maskera/mcp guard
63
69
  cat klient.txt | npx -y @maskera/mcp guard --redact
64
70
  ```
65
71
 
72
+ ## 4. Agent skill (`SKILL.md`)
73
+
74
+ Install the workflow skill (`skills/maskera/SKILL.md`) in Claude Code, Codex, Cursor, or OpenCode:
75
+
76
+ ```bash
77
+ npx skills add joelhagvall/maskera
78
+ ```
79
+
80
+ ## 5. Verification scripts (Claude Code, Codex, OpenCode)
81
+
82
+ Run the built-in reusable E2E and benchmark suites locally (zero paid API calls):
83
+
84
+ ```bash
85
+ # Protocol, security, streaming, and local ONNX E2E (also runs in CI)
86
+ pnpm test:mcp:e2e
87
+
88
+ # Real installed agent harnesses (claude, codex, opencode) with MCP + proxy + hooks
89
+ pnpm test:mcp:harnesses
90
+ pnpm test:mcp:harnesses -- --only claude,codex --mode rules
91
+ pnpm test:mcp:harnesses -- --live # opt-in live subscription proof
92
+
93
+ # Clean npm tarball pack + binary smoke (--cold-hf tests a fresh HF model download)
94
+ pnpm test:mcp:pack
95
+
96
+ # Latency & throughput benchmark (CLI startup, multi-turn ONNX cache, SSE restorer)
97
+ pnpm bench:mcp
98
+ ```
99
+
66
100
  ## Options and environment
67
101
 
68
102
  - `--rules-only` or `MASKERA_MCP_MODE=rules`: Deterministic rules only without loading the ONNX model.