@suveren/gateway 0.28.0 → 0.28.1
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.
|
@@ -340,7 +340,8 @@
|
|
|
340
340
|
"action_type": "setup"
|
|
341
341
|
},
|
|
342
342
|
"actionLabel": "Test data loaded",
|
|
343
|
-
"hideUnlessAuthorized": true
|
|
343
|
+
"hideUnlessAuthorized": true,
|
|
344
|
+
"simulationOnly": true
|
|
344
345
|
},
|
|
345
346
|
"clear_simulation": {
|
|
346
347
|
"executionMapping": {},
|
|
@@ -349,7 +350,8 @@
|
|
|
349
350
|
"action_type": "setup"
|
|
350
351
|
},
|
|
351
352
|
"actionLabel": "Test data cleared",
|
|
352
|
-
"hideUnlessAuthorized": true
|
|
353
|
+
"hideUnlessAuthorized": true,
|
|
354
|
+
"simulationOnly": true
|
|
353
355
|
}
|
|
354
356
|
}
|
|
355
357
|
},
|
|
@@ -186,7 +186,8 @@
|
|
|
186
186
|
"action_type": "setup"
|
|
187
187
|
},
|
|
188
188
|
"actionLabel": "Test data loaded",
|
|
189
|
-
"hideUnlessAuthorized": true
|
|
189
|
+
"hideUnlessAuthorized": true,
|
|
190
|
+
"simulationOnly": true
|
|
190
191
|
},
|
|
191
192
|
"clear_simulation": {
|
|
192
193
|
"executionMapping": {},
|
|
@@ -194,7 +195,8 @@
|
|
|
194
195
|
"action_type": "setup"
|
|
195
196
|
},
|
|
196
197
|
"actionLabel": "Test data cleared",
|
|
197
|
-
"hideUnlessAuthorized": true
|
|
198
|
+
"hideUnlessAuthorized": true,
|
|
199
|
+
"simulationOnly": true
|
|
198
200
|
}
|
|
199
201
|
}
|
|
200
202
|
},
|
|
@@ -83,7 +83,8 @@
|
|
|
83
83
|
"action_type": "setup"
|
|
84
84
|
},
|
|
85
85
|
"actionLabel": "Test data loaded",
|
|
86
|
-
"hideUnlessAuthorized": true
|
|
86
|
+
"hideUnlessAuthorized": true,
|
|
87
|
+
"simulationOnly": true
|
|
87
88
|
},
|
|
88
89
|
"clear_simulation": {
|
|
89
90
|
"executionMapping": {},
|
|
@@ -91,7 +92,8 @@
|
|
|
91
92
|
"action_type": "setup"
|
|
92
93
|
},
|
|
93
94
|
"actionLabel": "Test data cleared",
|
|
94
|
-
"hideUnlessAuthorized": true
|
|
95
|
+
"hideUnlessAuthorized": true,
|
|
96
|
+
"simulationOnly": true
|
|
95
97
|
}
|
|
96
98
|
}
|
|
97
99
|
},
|
package/dist/mcp-server/http.mjs
CHANGED
|
@@ -4409,8 +4409,10 @@ function zeroCappedBound(profileId, bounds, actionType) {
|
|
|
4409
4409
|
}
|
|
4410
4410
|
function toolAlwaysListed(tool, isBuiltin) {
|
|
4411
4411
|
if (tool.internal || !tool.gating?.profile) return false;
|
|
4412
|
-
if (tool.gating.
|
|
4413
|
-
|
|
4412
|
+
if (tool.gating.category === "disabled") return false;
|
|
4413
|
+
if (isBuiltin(tool.integrationId)) return false;
|
|
4414
|
+
if (!tool.gating.hideUnlessAuthorized) return true;
|
|
4415
|
+
return Boolean(tool.gating.simulationOnly) && isSimulationMode();
|
|
4414
4416
|
}
|
|
4415
4417
|
function toolIsAuthorizedForDisplay(tool, matchingAuths) {
|
|
4416
4418
|
if (!tool.gating?.hideUnlessAuthorized) return true;
|
|
@@ -4826,6 +4828,18 @@ function createGatedToolHandlerInner(tool, integrationManager2, state2) {
|
|
|
4826
4828
|
}
|
|
4827
4829
|
}
|
|
4828
4830
|
const { matching: matchingAuths, refusals } = eligibleMandates();
|
|
4831
|
+
if (tool.gating?.simulationOnly && isSimulationMode() && !toolIsAuthorizedForDisplay(tool, matchingAuths)) {
|
|
4832
|
+
const actionType = staticExecution?.action_type;
|
|
4833
|
+
const mandateLabel = typeof actionType === "string" ? actionType : profile;
|
|
4834
|
+
recordBlocked(state2, tool, {
|
|
4835
|
+
kind: "not_authorized",
|
|
4836
|
+
detail: `No active authorization grants "${mandateLabel}" under profile "${profile}".`,
|
|
4837
|
+
field: mandateLabel,
|
|
4838
|
+
who: "gateway",
|
|
4839
|
+
code: "NO_MATCHING_MANDATE"
|
|
4840
|
+
});
|
|
4841
|
+
return { content: [{ type: "text", text: noMandateRefusal(tool.namespacedName, mandateLabel) }], isError: true };
|
|
4842
|
+
}
|
|
4829
4843
|
if (matchingAuths.length === 0) return noEligibleMandate(refusals);
|
|
4830
4844
|
const errors = [];
|
|
4831
4845
|
const passers = [];
|
|
@@ -7493,6 +7507,7 @@ var IntegrationManager = class {
|
|
|
7493
7507
|
readGovernanceReason: ext.readGovernanceReason,
|
|
7494
7508
|
blockedArgs: ext.blockedArgs,
|
|
7495
7509
|
hideUnlessAuthorized: ext.hideUnlessAuthorized,
|
|
7510
|
+
simulationOnly: ext.simulationOnly,
|
|
7496
7511
|
approvalView: ext.approvalView
|
|
7497
7512
|
};
|
|
7498
7513
|
}
|
|
@@ -7509,6 +7524,7 @@ var IntegrationManager = class {
|
|
|
7509
7524
|
argEncoding: ext.argEncoding,
|
|
7510
7525
|
argNormalization: ext.argNormalization,
|
|
7511
7526
|
hideUnlessAuthorized: ext.hideUnlessAuthorized,
|
|
7527
|
+
simulationOnly: ext.simulationOnly,
|
|
7512
7528
|
approvalView: ext.approvalView
|
|
7513
7529
|
};
|
|
7514
7530
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suveren/gateway",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.1",
|
|
4
4
|
"description": "Suveren gateway — local agent gateway built in compliance with the Human Agency Protocol (HAP). Runs the UI, control plane, and MCP server in one Node process.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "server.js",
|