@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/cli.js
CHANGED
|
@@ -208,6 +208,7 @@ var init_hashing = __esm({
|
|
|
208
208
|
});
|
|
209
209
|
var require2 = createRequire(import.meta.url);
|
|
210
210
|
var { version: PKG_VERSION } = require2("../package.json");
|
|
211
|
+
var SANCTUARY_VERSION = PKG_VERSION;
|
|
211
212
|
function defaultConfig() {
|
|
212
213
|
return {
|
|
213
214
|
version: PKG_VERSION,
|
|
@@ -3638,7 +3639,12 @@ var DEFAULT_POLICY = {
|
|
|
3638
3639
|
"context_gate_filter",
|
|
3639
3640
|
"context_gate_list_policies",
|
|
3640
3641
|
"l2_hardening_status",
|
|
3641
|
-
"l2_verify_isolation"
|
|
3642
|
+
"l2_verify_isolation",
|
|
3643
|
+
"sovereignty_audit",
|
|
3644
|
+
"shr_gateway_export",
|
|
3645
|
+
"bridge_commit",
|
|
3646
|
+
"bridge_verify",
|
|
3647
|
+
"bridge_attest"
|
|
3642
3648
|
],
|
|
3643
3649
|
approval_channel: DEFAULT_CHANNEL
|
|
3644
3650
|
};
|
|
@@ -3705,6 +3711,10 @@ function parseScalar(value) {
|
|
|
3705
3711
|
return value.replace(/^["']|["']$/g, "");
|
|
3706
3712
|
}
|
|
3707
3713
|
function validatePolicy(raw) {
|
|
3714
|
+
const userTier3 = raw.tier3_always_allow ?? [];
|
|
3715
|
+
const mergedTier3 = [
|
|
3716
|
+
.../* @__PURE__ */ new Set([...userTier3, ...DEFAULT_POLICY.tier3_always_allow])
|
|
3717
|
+
];
|
|
3708
3718
|
return {
|
|
3709
3719
|
version: raw.version ?? 1,
|
|
3710
3720
|
tier1_always_approve: raw.tier1_always_approve ?? DEFAULT_POLICY.tier1_always_approve,
|
|
@@ -3712,7 +3722,7 @@ function validatePolicy(raw) {
|
|
|
3712
3722
|
...DEFAULT_TIER2,
|
|
3713
3723
|
...raw.tier2_anomaly ?? {}
|
|
3714
3724
|
},
|
|
3715
|
-
tier3_always_allow:
|
|
3725
|
+
tier3_always_allow: mergedTier3,
|
|
3716
3726
|
approval_channel: (() => {
|
|
3717
3727
|
const merged = {
|
|
3718
3728
|
...DEFAULT_CHANNEL,
|
|
@@ -3797,6 +3807,11 @@ tier3_always_allow:
|
|
|
3797
3807
|
- context_gate_recommend
|
|
3798
3808
|
- context_gate_filter
|
|
3799
3809
|
- context_gate_list_policies
|
|
3810
|
+
- sovereignty_audit
|
|
3811
|
+
- shr_gateway_export
|
|
3812
|
+
- bridge_commit
|
|
3813
|
+
- bridge_verify
|
|
3814
|
+
- bridge_attest
|
|
3800
3815
|
|
|
3801
3816
|
# \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
|
|
3802
3817
|
# How Sanctuary reaches you when approval is needed.
|
|
@@ -4573,8 +4588,6 @@ function generateDashboardHTML(options) {
|
|
|
4573
4588
|
}
|
|
4574
4589
|
|
|
4575
4590
|
// src/principal-policy/dashboard.ts
|
|
4576
|
-
var require4 = createRequire(import.meta.url);
|
|
4577
|
-
var { version: PKG_VERSION3 } = require4("../../package.json");
|
|
4578
4591
|
var SESSION_TTL_MS = 5 * 60 * 1e3;
|
|
4579
4592
|
var MAX_SESSIONS = 1e3;
|
|
4580
4593
|
var RATE_LIMIT_WINDOW_MS = 6e4;
|
|
@@ -4603,7 +4616,7 @@ var DashboardApprovalChannel = class {
|
|
|
4603
4616
|
this.useTLS = !!(config.tls?.cert_path && config.tls?.key_path);
|
|
4604
4617
|
this.dashboardHTML = generateDashboardHTML({
|
|
4605
4618
|
timeoutSeconds: config.timeout_seconds,
|
|
4606
|
-
serverVersion:
|
|
4619
|
+
serverVersion: SANCTUARY_VERSION,
|
|
4607
4620
|
authToken: this.authToken
|
|
4608
4621
|
});
|
|
4609
4622
|
this.sessionCleanupTimer = setInterval(() => this.cleanupSessions(), 6e4);
|
|
@@ -5666,6 +5679,11 @@ function generateSHR(identityId, opts) {
|
|
|
5666
5679
|
}
|
|
5667
5680
|
const body = {
|
|
5668
5681
|
shr_version: "1.0",
|
|
5682
|
+
implementation: {
|
|
5683
|
+
sanctuary_version: config.version,
|
|
5684
|
+
node_version: process.versions.node,
|
|
5685
|
+
generated_by: "sanctuary-mcp-server"
|
|
5686
|
+
},
|
|
5669
5687
|
instance_id: identity.identity_id,
|
|
5670
5688
|
generated_at: now.toISOString(),
|
|
5671
5689
|
expires_at: expiresAt.toISOString(),
|
|
@@ -9991,8 +10009,8 @@ async function checkForUpdate(currentVersion) {
|
|
|
9991
10009
|
} catch {
|
|
9992
10010
|
}
|
|
9993
10011
|
}
|
|
9994
|
-
var
|
|
9995
|
-
var { version:
|
|
10012
|
+
var require4 = createRequire(import.meta.url);
|
|
10013
|
+
var { version: PKG_VERSION3 } = require4("../package.json");
|
|
9996
10014
|
async function main() {
|
|
9997
10015
|
const args = process.argv.slice(2);
|
|
9998
10016
|
let passphrase = process.env.SANCTUARY_PASSPHRASE;
|
|
@@ -10005,7 +10023,7 @@ async function main() {
|
|
|
10005
10023
|
printHelp();
|
|
10006
10024
|
process.exit(0);
|
|
10007
10025
|
} else if (args[i] === "--version" || args[i] === "-v") {
|
|
10008
|
-
console.log(`@sanctuary-framework/mcp-server ${
|
|
10026
|
+
console.log(`@sanctuary-framework/mcp-server ${PKG_VERSION3}`);
|
|
10009
10027
|
process.exit(0);
|
|
10010
10028
|
}
|
|
10011
10029
|
}
|
|
@@ -10016,7 +10034,7 @@ async function main() {
|
|
|
10016
10034
|
console.error(`Sanctuary MCP Server v${config.version} running (stdio)`);
|
|
10017
10035
|
console.error(`Storage: ${config.storage_path}`);
|
|
10018
10036
|
console.error("Tools: all registered");
|
|
10019
|
-
checkForUpdate(
|
|
10037
|
+
checkForUpdate(PKG_VERSION3);
|
|
10020
10038
|
} else {
|
|
10021
10039
|
console.error("HTTP transport not yet implemented. Use stdio.");
|
|
10022
10040
|
process.exit(1);
|
|
@@ -10024,7 +10042,7 @@ async function main() {
|
|
|
10024
10042
|
}
|
|
10025
10043
|
function printHelp() {
|
|
10026
10044
|
console.log(`
|
|
10027
|
-
@sanctuary-framework/mcp-server v${
|
|
10045
|
+
@sanctuary-framework/mcp-server v${PKG_VERSION3}
|
|
10028
10046
|
|
|
10029
10047
|
Sovereignty infrastructure for agents in the agentic economy.
|
|
10030
10048
|
|