@rohan-protocol/webmcp 0.6.0 → 0.7.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/LICENSE +21 -0
- package/README.md +14 -40
- package/package.json +16 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rohan Protocol
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,51 +1,25 @@
|
|
|
1
|
-
@rohan-protocol/webmcp
|
|
1
|
+
# @rohan-protocol/webmcp (v0.7.0)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-

|
|
3
|
+
Browser-native WebMCP Shield with Zero-Width Unicode Sanitization (V-07) and in-memory cryptographic commitment generation.
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
Protects front-end copilots and React applications from zero-width Unicode injection attacks and leaks.
|
|
8
|
-
Features
|
|
5
|
+
---
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
In-Memory Witness Zeroization (V-02): Scrubs private web form fields and prompt inputs from browser memory.
|
|
13
|
-
|
|
14
|
-
React Hooks & Provider: 3-line drop-in integration for Next.js, React, and browser extensions.
|
|
15
|
-
|
|
16
|
-
Installation
|
|
17
|
-
code Bash
|
|
7
|
+
## 📦 Installation
|
|
18
8
|
|
|
9
|
+
```bash
|
|
19
10
|
npm install @rohan-protocol/webmcp
|
|
11
|
+
```
|
|
20
12
|
|
|
21
|
-
|
|
22
|
-
code Tsx
|
|
23
|
-
|
|
24
|
-
import { RohanWebMcpProvider, useRohanWebMcp } from '@rohan-protocol/webmcp';
|
|
25
|
-
|
|
26
|
-
export default function App() {
|
|
27
|
-
return (
|
|
28
|
-
<RohanWebMcpProvider apiKey={process.env.NEXT_PUBLIC_ROHAN_API_KEY}>
|
|
29
|
-
<YourAgentInterface />
|
|
30
|
-
</RohanWebMcpProvider>
|
|
31
|
-
);
|
|
32
|
-
}
|
|
13
|
+
---
|
|
33
14
|
|
|
34
|
-
|
|
35
|
-
const { shieldAndSubmit, isProving } = useRohanWebMcp();
|
|
15
|
+
## 🌟 Browser-Native Features
|
|
36
16
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
intent: "submit_confidential_web_intent",
|
|
41
|
-
formData: { email: "partner@example.com", termsAccepted: true }
|
|
42
|
-
});
|
|
43
|
-
console.log("Confirmed on Midnight:", receipt.txHash);
|
|
44
|
-
};
|
|
17
|
+
* **Zero-Width Character Sanitizer (V-07):** Strips invisible Unicode steganography and prompt-injection vectors from DOM inputs before processing.
|
|
18
|
+
* **SubtleCrypto Native Hashing:** Derives 32-byte SHA-256 intent commitments directly via `window.crypto.subtle` in client RAM.
|
|
19
|
+
* **Safe In-Memory Zeroize:** Clears sensitive witness buffers on client execution completion.
|
|
45
20
|
|
|
46
|
-
|
|
47
|
-
}
|
|
21
|
+
---
|
|
48
22
|
|
|
49
|
-
License
|
|
23
|
+
## 📜 License
|
|
50
24
|
|
|
51
|
-
|
|
25
|
+
Apache-2.0
|
package/package.json
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rohan-protocol/webmcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Browser-Native Zero-Knowledge Shield for WebMCP and AI Web Agents",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"webmcp",
|
|
8
|
+
"mcp",
|
|
9
|
+
"model-context-protocol",
|
|
10
|
+
"browser-mcp",
|
|
11
|
+
"zero-knowledge",
|
|
12
|
+
"midnight-network",
|
|
13
|
+
"zk-handshake",
|
|
14
|
+
"semantic-firewall",
|
|
15
|
+
"chrome-ai"
|
|
16
|
+
],
|
|
6
17
|
"main": "./dist/index.js",
|
|
7
18
|
"types": "./dist/index.d.ts",
|
|
8
19
|
"exports": {
|
|
@@ -17,14 +28,15 @@
|
|
|
17
28
|
],
|
|
18
29
|
"scripts": {
|
|
19
30
|
"build": "tsc",
|
|
20
|
-
"clean": "rm -rf dist"
|
|
31
|
+
"clean": "rm -rf dist",
|
|
32
|
+
"test": "node --test tests/*.test.js"
|
|
21
33
|
},
|
|
22
34
|
"peerDependencies": {
|
|
23
35
|
"react": ">=18.0.0",
|
|
24
36
|
"react-dom": ">=18.0.0"
|
|
25
37
|
},
|
|
26
38
|
"dependencies": {
|
|
27
|
-
"@rohan-protocol/sdk": "^0.
|
|
39
|
+
"@rohan-protocol/sdk": "^0.7.0"
|
|
28
40
|
},
|
|
29
41
|
"devDependencies": {
|
|
30
42
|
"@types/react": "^18.3.0",
|
|
@@ -33,4 +45,4 @@
|
|
|
33
45
|
"react-dom": "^18.3.0",
|
|
34
46
|
"typescript": "^5.5.0"
|
|
35
47
|
}
|
|
36
|
-
}
|
|
48
|
+
}
|