multicorn-shield 1.4.1 → 1.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/CHANGELOG.md +37 -0
- package/dist/multicorn-proxy.js +504 -90
- package/dist/multicorn-shield.js +323 -90
- package/dist/proxy.cjs +6 -2
- package/dist/proxy.d.cts +1 -1
- package/dist/proxy.d.ts +1 -1
- package/dist/proxy.js +6 -2
- package/dist/shield-extension.js +9 -4
- package/package.json +2 -1
package/dist/proxy.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ interface ToolCallParams {
|
|
|
31
31
|
}
|
|
32
32
|
declare function parseJsonRpcLine(line: string): JsonRpcRequest | null;
|
|
33
33
|
declare function extractToolCallParams(request: JsonRpcRequest): ToolCallParams | null;
|
|
34
|
-
declare function buildBlockedResponse(id: string | number | null, service: string,
|
|
34
|
+
declare function buildBlockedResponse(id: string | number | null, service: string, _permissionLevel: string, dashboardUrl: string): JsonRpcResponse;
|
|
35
35
|
declare function buildSpendingBlockedResponse(id: string | number | null, reason: string, dashboardUrl: string): JsonRpcResponse;
|
|
36
36
|
/**
|
|
37
37
|
* Internal error: Shield could not verify permissions due to an exception.
|
package/dist/proxy.js
CHANGED
|
@@ -28,9 +28,13 @@ function extractToolCallParams(request) {
|
|
|
28
28
|
if (typeof args !== "object" || args === null) return null;
|
|
29
29
|
return { name, arguments: args };
|
|
30
30
|
}
|
|
31
|
-
function buildBlockedResponse(id, service,
|
|
31
|
+
function buildBlockedResponse(id, service, _permissionLevel, dashboardUrl) {
|
|
32
32
|
const displayService = capitalize(service);
|
|
33
|
-
const message = `Action blocked by
|
|
33
|
+
const message = `Action blocked by Shield
|
|
34
|
+
|
|
35
|
+
This agent cannot use ${displayService}.
|
|
36
|
+
|
|
37
|
+
Configure permissions: ${dashboardUrl}`;
|
|
34
38
|
return {
|
|
35
39
|
jsonrpc: "2.0",
|
|
36
40
|
id,
|
package/dist/shield-extension.js
CHANGED
|
@@ -10,6 +10,7 @@ import { createHash } from 'crypto';
|
|
|
10
10
|
import 'url';
|
|
11
11
|
import 'module';
|
|
12
12
|
import 'readline';
|
|
13
|
+
import 'yaml';
|
|
13
14
|
|
|
14
15
|
// Multicorn Shield Claude Desktop Extension - https://multicorn.ai
|
|
15
16
|
var __create = Object.create;
|
|
@@ -22504,7 +22505,7 @@ async function writeExtensionBackup(claudeDesktopConfigPath, mcpServers) {
|
|
|
22504
22505
|
|
|
22505
22506
|
// package.json
|
|
22506
22507
|
var package_default = {
|
|
22507
|
-
version: "1.
|
|
22508
|
+
version: "1.7.0"};
|
|
22508
22509
|
|
|
22509
22510
|
// src/package-meta.ts
|
|
22510
22511
|
var PACKAGE_VERSION = package_default.version;
|
|
@@ -23067,7 +23068,7 @@ function resultSuggestsConsentNeeded(result) {
|
|
|
23067
23068
|
return false;
|
|
23068
23069
|
}
|
|
23069
23070
|
const t = first.text;
|
|
23070
|
-
return t.includes("Action blocked by
|
|
23071
|
+
return t.includes("Action blocked by Shield") || t.includes("Permission required") || t.includes("This agent cannot use") || t.includes("does not have") && t.includes("access to") || t.includes("Configure permissions:");
|
|
23071
23072
|
}
|
|
23072
23073
|
|
|
23073
23074
|
// src/types/index.ts
|
|
@@ -23290,9 +23291,13 @@ function sleep2(ms) {
|
|
|
23290
23291
|
var BLOCKED_ERROR_CODE = -32e3;
|
|
23291
23292
|
var INTERNAL_ERROR_CODE = -32002;
|
|
23292
23293
|
var SERVICE_UNREACHABLE_ERROR_CODE = -32003;
|
|
23293
|
-
function buildBlockedResponse(id, service,
|
|
23294
|
+
function buildBlockedResponse(id, service, _permissionLevel, dashboardUrl) {
|
|
23294
23295
|
const displayService = capitalize(service);
|
|
23295
|
-
const message = `Action blocked by
|
|
23296
|
+
const message = `Action blocked by Shield
|
|
23297
|
+
|
|
23298
|
+
This agent cannot use ${displayService}.
|
|
23299
|
+
|
|
23300
|
+
Configure permissions: ${dashboardUrl}`;
|
|
23296
23301
|
return {
|
|
23297
23302
|
jsonrpc: "2.0",
|
|
23298
23303
|
id,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "multicorn-shield",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "The control layer for AI agents: permissions, consent, spending limits, and audit logging.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Multicorn AI Pty Ltd",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
71
71
|
"lit": "^3.2.0",
|
|
72
|
+
"yaml": "^2.8.2",
|
|
72
73
|
"zod": "^4.3.6"
|
|
73
74
|
},
|
|
74
75
|
"devDependencies": {
|