multicorn-shield 1.11.0 → 1.12.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/CHANGELOG.md +31 -0
- package/README.md +10 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/multicorn-proxy.js +349 -212
- package/dist/multicorn-shield.js +340 -209
- package/dist/openclaw-hook/HOOK.md +5 -3
- package/dist/openclaw-hook/handler.js +1 -1
- package/dist/openclaw-plugin/multicorn-shield.js +28 -7
- package/dist/openclaw-plugin/openclaw.plugin.json +1 -1
- package/dist/server.js +3499 -0
- package/dist/shield-extension.js +3 -12
- package/package.json +5 -3
- package/plugins/windsurf/hooks/scripts/pre-action.cjs +126 -17
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
- Bump `version` in `package.json` before publishing to npm.
|
|
11
11
|
|
|
12
|
+
## [Unreleased]
|
|
13
|
+
|
|
14
|
+
## [1.12.0] - 2026-07-06
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Local proxy no longer crashes on startup with "pathRegexp is not a function": pinned express 4's nested path-to-regexp to the patched 0.1.x line so the supergateway filesystem gateway starts cleanly.
|
|
19
|
+
- `files` now threads the resolved base URL (--base-url > MULTICORN_BASE_URL > config baseUrl > default) into the spawned proxy's SHIELD_API_BASE_URL, so a local-minted API key is validated against the correct service instead of defaulting to production.
|
|
20
|
+
- `files restart` now respawns the shared proxy instead of reusing a stale one, so a changed base URL takes effect.
|
|
21
|
+
- `files` now reaps a stale pid file when its process is no longer running, instead of refusing to start with "already running" when the port is free.
|
|
22
|
+
- `init` base-URL precedence now matches `files` (--base-url > MULTICORN_BASE_URL > config baseUrl > default), so MULTICORN_BASE_URL overrides a stale stored base URL.
|
|
23
|
+
- `init` "Use this key? (Y/n)" prompt now accepts a pasted `mcs_` key as a replacement key rather than silently keeping the existing one.
|
|
24
|
+
- OpenClaw plugin config is now written in the shape OpenClaw's schema accepts (apiKey/baseUrl/agentName/failMode as direct properties, no env wrapper), fixing "Unrecognized keys: env, agentName" on load.
|
|
25
|
+
- Corrected the OpenClaw auth-error message to point at the valid config path.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- The interactive platform picker is now native-only; MCP/hosted agents are directed to the dashboard. Selecting a native platform proceeds straight to native setup with no redundant native-vs-hosted prompt. Explicit `--client` still configures any supported platform.
|
|
30
|
+
|
|
31
|
+
### Security
|
|
32
|
+
|
|
33
|
+
- Native governance hooks and the OpenClaw plugin now fail closed: when the Shield API cannot be reached or authentication fails, tool calls are blocked (with an actionable message) instead of being silently allowed. `failMode` is honoured from configuration and defaults to closed.
|
|
34
|
+
- The OpenClaw plugin config now prefers a `${MULTICORN_API_KEY}` reference over embedding the raw API key in `openclaw.json`.
|
|
35
|
+
|
|
36
|
+
## [1.11.1] - 2026-06-22
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- The local proxy server entry is now resolved by locating the multicorn-shield package root rather than a fixed relative climb, so `files` works from source, bundled dist, and npm installs.
|
|
41
|
+
|
|
12
42
|
## [1.11.0] - 2026-06-18
|
|
13
43
|
|
|
14
44
|
### Added
|
|
@@ -25,6 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
25
55
|
|
|
26
56
|
### Fixed
|
|
27
57
|
|
|
58
|
+
- `files` now starts the local proxy by spawning the bundled `dist/server.js` entry directly (with `PORT`, `SHIELD_API_BASE_URL`, and `ALLOW_PRIVATE_TARGETS`), instead of invoking the deprecated `multicorn-proxy` CLI alias. First-run setup works when no proxy is already listening on the port.
|
|
28
59
|
- Pinned transitive dependencies (`path-to-regexp`, `ws`, `hono`) via `pnpm.overrides` to clear high-severity audit advisories pulled in by `supergateway` and the MCP SDK.
|
|
29
60
|
|
|
30
61
|
## [1.10.0] - 2026-06-09
|
package/README.md
CHANGED
|
@@ -22,7 +22,15 @@ Most AI coding agents inherit direct access to MCP tools, terminals, mail, and s
|
|
|
22
22
|
|
|
23
23
|
## Supported agents
|
|
24
24
|
|
|
25
|
-
`npx multicorn-shield init`
|
|
25
|
+
`npx multicorn-shield init` walks you through **native plugins** only: OpenClaw, Claude Code, Windsurf, Cline, Gemini CLI, OpenCode, and Codex CLI. Native plugins govern files, terminal, and browser tools exposed by the host.
|
|
26
|
+
|
|
27
|
+
**MCP-only clients** (Cursor, Claude Desktop, GitHub Copilot, Kilo Code, Continue, Goose, and other hosted MCP setups) are configured in the [Multicorn dashboard](https://app.multicorn.ai/agents/new). The init menu includes a link there if you do not see your agent.
|
|
28
|
+
|
|
29
|
+
The full platform registry in [`INIT_WIZARD_PLATFORM_REGISTRY`](https://github.com/Multicorn-AI/multicorn-shield/blob/main/src/proxy/config.ts) still lists every supported slug. Integration mode follows the [**Shield threat model**](https://multicorn.ai/shield/threat-model): **native plugins** inspect the whole tool surface exposed by the host; **hosted MCP proxy** governs MCP-shaped traffic routed through Shield.
|
|
30
|
+
|
|
31
|
+
Use `npx multicorn-shield files --client <name>` to write MCP config for any supported coding client (including Cursor and Copilot). Valid `--client` names: cursor, cline, windsurf, claude, copilot, goose, gemini, codex, continue, kilo, opencode.
|
|
32
|
+
|
|
33
|
+
For hybrid platforms (Windsurf, Cline, Gemini CLI, OpenCode, Codex CLI), the init wizard defaults to the native plugin. Use `npx multicorn-shield init --integration hosted` when you want the hosted MCP proxy path instead.
|
|
26
34
|
|
|
27
35
|
| Agent | Mode | Setup on multicorn.ai |
|
|
28
36
|
| ------------------------------- | ------------------------------------------------ | --------------------------------------------------------------------- |
|
|
@@ -40,7 +48,7 @@ Most AI coding agents inherit direct access to MCP tools, terminals, mail, and s
|
|
|
40
48
|
| Continue | Hosted MCP proxy | [Setup guide](https://multicorn.ai/docs/mcp-proxy#generic-mcp-client) |
|
|
41
49
|
| Goose | Hosted MCP proxy | [Setup guide](https://multicorn.ai/docs/mcp-proxy#generic-mcp-client) |
|
|
42
50
|
|
|
43
|
-
For any other MCP client on stdio,
|
|
51
|
+
For any other MCP client on stdio, use `npx multicorn-shield --wrap` or set up a hosted agent in the [dashboard](https://app.multicorn.ai/agents/new).
|
|
44
52
|
|
|
45
53
|
## Quick start
|
|
46
54
|
|
package/dist/index.cjs
CHANGED
|
@@ -2118,7 +2118,7 @@ function handleHttpError(status, logger, retryDelaySeconds) {
|
|
|
2118
2118
|
if (status === 401 || status === 403) {
|
|
2119
2119
|
if (!authErrorLogged) {
|
|
2120
2120
|
authErrorLogged = true;
|
|
2121
|
-
const errorMsg = "[multicorn-shield] ERROR: Authentication failed. Your MULTICORN_API_KEY is invalid or expired. Check the key in
|
|
2121
|
+
const errorMsg = "[multicorn-shield] ERROR: Authentication failed. Your MULTICORN_API_KEY is invalid or expired. Check the key in ~/.multicorn/config.json (from npx multicorn-shield init) or ~/.openclaw/openclaw.json \u2192 plugins.entries.multicorn-shield.config.apiKey. Get a valid key from your Multicorn dashboard (Settings \u2192 API Keys).";
|
|
2122
2122
|
logger?.error(errorMsg);
|
|
2123
2123
|
process.stderr.write(`${errorMsg}
|
|
2124
2124
|
`);
|
package/dist/index.js
CHANGED
|
@@ -2116,7 +2116,7 @@ function handleHttpError(status, logger, retryDelaySeconds) {
|
|
|
2116
2116
|
if (status === 401 || status === 403) {
|
|
2117
2117
|
if (!authErrorLogged) {
|
|
2118
2118
|
authErrorLogged = true;
|
|
2119
|
-
const errorMsg = "[multicorn-shield] ERROR: Authentication failed. Your MULTICORN_API_KEY is invalid or expired. Check the key in
|
|
2119
|
+
const errorMsg = "[multicorn-shield] ERROR: Authentication failed. Your MULTICORN_API_KEY is invalid or expired. Check the key in ~/.multicorn/config.json (from npx multicorn-shield init) or ~/.openclaw/openclaw.json \u2192 plugins.entries.multicorn-shield.config.apiKey. Get a valid key from your Multicorn dashboard (Settings \u2192 API Keys).";
|
|
2120
2120
|
logger?.error(errorMsg);
|
|
2121
2121
|
process.stderr.write(`${errorMsg}
|
|
2122
2122
|
`);
|