multicorn-shield 0.1.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 +453 -0
- package/dist/index.cjs +2507 -0
- package/dist/index.d.cts +2182 -0
- package/dist/index.d.ts +2182 -0
- package/dist/index.js +2477 -0
- package/dist/multicorn-proxy.js +1153 -0
- package/dist/openclaw-hook/HOOK.md +75 -0
- package/dist/openclaw-hook/handler.js +447 -0
- package/dist/openclaw-plugin/index.js +692 -0
- package/dist/openclaw-plugin/openclaw.plugin.json +51 -0
- package/package.json +122 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "multicorn-shield",
|
|
3
|
+
"name": "Multicorn Shield",
|
|
4
|
+
"description": "AI agent governance for OpenClaw. Checks permissions, logs actions, and enforces controls via the Shield API.",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"configSchema": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"apiKey": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"baseUrl": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"agentName": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"failMode": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"enum": ["open", "closed"]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"uiHints": {
|
|
26
|
+
"apiKey": {
|
|
27
|
+
"label": "Multicorn API Key",
|
|
28
|
+
"sensitive": true,
|
|
29
|
+
"placeholder": "mcs_...",
|
|
30
|
+
"help": "Your Multicorn Shield API key (or use ${MULTICORN_API_KEY})"
|
|
31
|
+
},
|
|
32
|
+
"baseUrl": {
|
|
33
|
+
"label": "API Base URL",
|
|
34
|
+
"placeholder": "https://api.multicorn.ai",
|
|
35
|
+
"advanced": true,
|
|
36
|
+
"help": "Shield API endpoint. Defaults to https://api.multicorn.ai"
|
|
37
|
+
},
|
|
38
|
+
"agentName": {
|
|
39
|
+
"label": "Agent Name",
|
|
40
|
+
"placeholder": "openclaw",
|
|
41
|
+
"advanced": true,
|
|
42
|
+
"help": "Override the agent name in the Shield dashboard"
|
|
43
|
+
},
|
|
44
|
+
"failMode": {
|
|
45
|
+
"label": "Fail Mode",
|
|
46
|
+
"placeholder": "open",
|
|
47
|
+
"advanced": true,
|
|
48
|
+
"help": "open = allow tool calls when API is unreachable. closed = block them."
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "multicorn-shield",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "The control layer for AI agents: permissions, consent, spending limits, and audit logging.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.cjs",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"require": {
|
|
17
|
+
"types": "./dist/index.d.cts",
|
|
18
|
+
"default": "./dist/index.cjs"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"bin": {
|
|
23
|
+
"multicorn-proxy": "./dist/multicorn-proxy.js"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"LICENSE",
|
|
28
|
+
"README.md"
|
|
29
|
+
],
|
|
30
|
+
"sideEffects": false,
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=20"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsup",
|
|
36
|
+
"dev": "tsup --watch",
|
|
37
|
+
"lint": "eslint . && prettier --check .",
|
|
38
|
+
"lint:fix": "eslint --fix . && prettier --write .",
|
|
39
|
+
"test": "vitest run",
|
|
40
|
+
"test:watch": "vitest",
|
|
41
|
+
"test:coverage": "vitest run --coverage",
|
|
42
|
+
"typecheck": "tsc --noEmit",
|
|
43
|
+
"docs": "typedoc",
|
|
44
|
+
"clean": "rm -rf dist coverage docs/api",
|
|
45
|
+
"size": "size-limit",
|
|
46
|
+
"prepublishOnly": "pnpm run clean && pnpm run typecheck && pnpm run lint && pnpm run test && pnpm run build",
|
|
47
|
+
"prepare": "husky"
|
|
48
|
+
},
|
|
49
|
+
"lint-staged": {
|
|
50
|
+
"*.ts": [
|
|
51
|
+
"eslint --fix",
|
|
52
|
+
"prettier --write"
|
|
53
|
+
],
|
|
54
|
+
"*.{json,md}": [
|
|
55
|
+
"prettier --write"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"lit": "^3.2.0"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@types/node": "^22.0.0",
|
|
63
|
+
"@eslint/js": "^9.19.0",
|
|
64
|
+
"@open-wc/testing-helpers": "^3.0.1",
|
|
65
|
+
"@vitest/coverage-istanbul": "^3.0.5",
|
|
66
|
+
"eslint": "^9.19.0",
|
|
67
|
+
"eslint-config-prettier": "^10.0.1",
|
|
68
|
+
"eslint-plugin-unicorn": "^57.0.0",
|
|
69
|
+
"globals": "^15.14.0",
|
|
70
|
+
"husky": "^9.1.7",
|
|
71
|
+
"jiti": "^2.4.2",
|
|
72
|
+
"jsdom": "^25.0.1",
|
|
73
|
+
"lint-staged": "^16.2.7",
|
|
74
|
+
"prettier": "^3.4.2",
|
|
75
|
+
"@size-limit/file": "^11.1.6",
|
|
76
|
+
"size-limit": "^11.1.6",
|
|
77
|
+
"tsup": "^8.3.6",
|
|
78
|
+
"typedoc": "^0.28.17",
|
|
79
|
+
"typescript": "^5.7.3",
|
|
80
|
+
"typescript-eslint": "^8.22.0",
|
|
81
|
+
"vitest": "^3.0.5"
|
|
82
|
+
},
|
|
83
|
+
"size-limit": [
|
|
84
|
+
{
|
|
85
|
+
"path": "dist/index.js",
|
|
86
|
+
"limit": "50 kB",
|
|
87
|
+
"gzip": true
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"path": "dist/index.cjs",
|
|
91
|
+
"limit": "50 kB",
|
|
92
|
+
"gzip": true
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"keywords": [
|
|
96
|
+
"ai",
|
|
97
|
+
"agents",
|
|
98
|
+
"permissions",
|
|
99
|
+
"sdk",
|
|
100
|
+
"typescript",
|
|
101
|
+
"consent",
|
|
102
|
+
"spending-limits",
|
|
103
|
+
"audit-log",
|
|
104
|
+
"mcp",
|
|
105
|
+
"shield",
|
|
106
|
+
"multicorn"
|
|
107
|
+
],
|
|
108
|
+
"repository": {
|
|
109
|
+
"type": "git",
|
|
110
|
+
"url": "git+https://github.com/Multicorn-AI/multicorn-shield.git"
|
|
111
|
+
},
|
|
112
|
+
"bugs": {
|
|
113
|
+
"url": "https://github.com/Multicorn-AI/multicorn-shield/issues"
|
|
114
|
+
},
|
|
115
|
+
"homepage": "https://multicorn.ai",
|
|
116
|
+
"pnpm": {
|
|
117
|
+
"overrides": {
|
|
118
|
+
"minimatch": ">=10.2.3",
|
|
119
|
+
"rollup": ">=4.59.0"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|