@sanctuary-framework/mcp-server 0.4.0 → 0.4.2
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/dist/cli.cjs +28 -10
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +28 -10
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +23 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +23 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -209,6 +209,7 @@ var init_hashing = __esm({
|
|
|
209
209
|
});
|
|
210
210
|
var require2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
|
|
211
211
|
var { version: PKG_VERSION } = require2("../package.json");
|
|
212
|
+
var SANCTUARY_VERSION = PKG_VERSION;
|
|
212
213
|
function defaultConfig() {
|
|
213
214
|
return {
|
|
214
215
|
version: PKG_VERSION,
|
|
@@ -3639,7 +3640,12 @@ var DEFAULT_POLICY = {
|
|
|
3639
3640
|
"context_gate_filter",
|
|
3640
3641
|
"context_gate_list_policies",
|
|
3641
3642
|
"l2_hardening_status",
|
|
3642
|
-
"l2_verify_isolation"
|
|
3643
|
+
"l2_verify_isolation",
|
|
3644
|
+
"sovereignty_audit",
|
|
3645
|
+
"shr_gateway_export",
|
|
3646
|
+
"bridge_commit",
|
|
3647
|
+
"bridge_verify",
|
|
3648
|
+
"bridge_attest"
|
|
3643
3649
|
],
|
|
3644
3650
|
approval_channel: DEFAULT_CHANNEL
|
|
3645
3651
|
};
|
|
@@ -3706,6 +3712,10 @@ function parseScalar(value) {
|
|
|
3706
3712
|
return value.replace(/^["']|["']$/g, "");
|
|
3707
3713
|
}
|
|
3708
3714
|
function validatePolicy(raw) {
|
|
3715
|
+
const userTier3 = raw.tier3_always_allow ?? [];
|
|
3716
|
+
const mergedTier3 = [
|
|
3717
|
+
.../* @__PURE__ */ new Set([...userTier3, ...DEFAULT_POLICY.tier3_always_allow])
|
|
3718
|
+
];
|
|
3709
3719
|
return {
|
|
3710
3720
|
version: raw.version ?? 1,
|
|
3711
3721
|
tier1_always_approve: raw.tier1_always_approve ?? DEFAULT_POLICY.tier1_always_approve,
|
|
@@ -3713,7 +3723,7 @@ function validatePolicy(raw) {
|
|
|
3713
3723
|
...DEFAULT_TIER2,
|
|
3714
3724
|
...raw.tier2_anomaly ?? {}
|
|
3715
3725
|
},
|
|
3716
|
-
tier3_always_allow:
|
|
3726
|
+
tier3_always_allow: mergedTier3,
|
|
3717
3727
|
approval_channel: (() => {
|
|
3718
3728
|
const merged = {
|
|
3719
3729
|
...DEFAULT_CHANNEL,
|
|
@@ -3798,6 +3808,11 @@ tier3_always_allow:
|
|
|
3798
3808
|
- context_gate_recommend
|
|
3799
3809
|
- context_gate_filter
|
|
3800
3810
|
- context_gate_list_policies
|
|
3811
|
+
- sovereignty_audit
|
|
3812
|
+
- shr_gateway_export
|
|
3813
|
+
- bridge_commit
|
|
3814
|
+
- bridge_verify
|
|
3815
|
+
- bridge_attest
|
|
3801
3816
|
|
|
3802
3817
|
# \u2500\u2500\u2500 Approval Channel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
3803
3818
|
# How Sanctuary reaches you when approval is needed.
|
|
@@ -4592,8 +4607,6 @@ function generateDashboardHTML(options) {
|
|
|
4592
4607
|
}
|
|
4593
4608
|
|
|
4594
4609
|
// src/principal-policy/dashboard.ts
|
|
4595
|
-
var require4 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
|
|
4596
|
-
var { version: PKG_VERSION3 } = require4("../../package.json");
|
|
4597
4610
|
var SESSION_TTL_MS = 5 * 60 * 1e3;
|
|
4598
4611
|
var MAX_SESSIONS = 1e3;
|
|
4599
4612
|
var RATE_LIMIT_WINDOW_MS = 6e4;
|
|
@@ -4622,7 +4635,7 @@ var DashboardApprovalChannel = class {
|
|
|
4622
4635
|
this.useTLS = !!(config.tls?.cert_path && config.tls?.key_path);
|
|
4623
4636
|
this.dashboardHTML = generateDashboardHTML({
|
|
4624
4637
|
timeoutSeconds: config.timeout_seconds,
|
|
4625
|
-
serverVersion:
|
|
4638
|
+
serverVersion: SANCTUARY_VERSION,
|
|
4626
4639
|
authToken: this.authToken
|
|
4627
4640
|
});
|
|
4628
4641
|
this.sessionCleanupTimer = setInterval(() => this.cleanupSessions(), 6e4);
|
|
@@ -5685,6 +5698,11 @@ function generateSHR(identityId, opts) {
|
|
|
5685
5698
|
}
|
|
5686
5699
|
const body = {
|
|
5687
5700
|
shr_version: "1.0",
|
|
5701
|
+
implementation: {
|
|
5702
|
+
sanctuary_version: config.version,
|
|
5703
|
+
node_version: process.versions.node,
|
|
5704
|
+
generated_by: "sanctuary-mcp-server"
|
|
5705
|
+
},
|
|
5688
5706
|
instance_id: identity.identity_id,
|
|
5689
5707
|
generated_at: now.toISOString(),
|
|
5690
5708
|
expires_at: expiresAt.toISOString(),
|