@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 CHANGED
@@ -211,6 +211,7 @@ var init_hashing = __esm({
211
211
  });
212
212
  var require2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.cjs', document.baseURI).href)));
213
213
  var { version: PKG_VERSION } = require2("../package.json");
214
+ var SANCTUARY_VERSION = PKG_VERSION;
214
215
  function defaultConfig() {
215
216
  return {
216
217
  version: PKG_VERSION,
@@ -3641,7 +3642,12 @@ var DEFAULT_POLICY = {
3641
3642
  "context_gate_filter",
3642
3643
  "context_gate_list_policies",
3643
3644
  "l2_hardening_status",
3644
- "l2_verify_isolation"
3645
+ "l2_verify_isolation",
3646
+ "sovereignty_audit",
3647
+ "shr_gateway_export",
3648
+ "bridge_commit",
3649
+ "bridge_verify",
3650
+ "bridge_attest"
3645
3651
  ],
3646
3652
  approval_channel: DEFAULT_CHANNEL
3647
3653
  };
@@ -3708,6 +3714,10 @@ function parseScalar(value) {
3708
3714
  return value.replace(/^["']|["']$/g, "");
3709
3715
  }
3710
3716
  function validatePolicy(raw) {
3717
+ const userTier3 = raw.tier3_always_allow ?? [];
3718
+ const mergedTier3 = [
3719
+ .../* @__PURE__ */ new Set([...userTier3, ...DEFAULT_POLICY.tier3_always_allow])
3720
+ ];
3711
3721
  return {
3712
3722
  version: raw.version ?? 1,
3713
3723
  tier1_always_approve: raw.tier1_always_approve ?? DEFAULT_POLICY.tier1_always_approve,
@@ -3715,7 +3725,7 @@ function validatePolicy(raw) {
3715
3725
  ...DEFAULT_TIER2,
3716
3726
  ...raw.tier2_anomaly ?? {}
3717
3727
  },
3718
- tier3_always_allow: raw.tier3_always_allow ?? DEFAULT_POLICY.tier3_always_allow,
3728
+ tier3_always_allow: mergedTier3,
3719
3729
  approval_channel: (() => {
3720
3730
  const merged = {
3721
3731
  ...DEFAULT_CHANNEL,
@@ -3800,6 +3810,11 @@ tier3_always_allow:
3800
3810
  - context_gate_recommend
3801
3811
  - context_gate_filter
3802
3812
  - context_gate_list_policies
3813
+ - sovereignty_audit
3814
+ - shr_gateway_export
3815
+ - bridge_commit
3816
+ - bridge_verify
3817
+ - bridge_attest
3803
3818
 
3804
3819
  # \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
3805
3820
  # How Sanctuary reaches you when approval is needed.
@@ -4576,8 +4591,6 @@ function generateDashboardHTML(options) {
4576
4591
  }
4577
4592
 
4578
4593
  // src/principal-policy/dashboard.ts
4579
- var require4 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.cjs', document.baseURI).href)));
4580
- var { version: PKG_VERSION3 } = require4("../../package.json");
4581
4594
  var SESSION_TTL_MS = 5 * 60 * 1e3;
4582
4595
  var MAX_SESSIONS = 1e3;
4583
4596
  var RATE_LIMIT_WINDOW_MS = 6e4;
@@ -4606,7 +4619,7 @@ var DashboardApprovalChannel = class {
4606
4619
  this.useTLS = !!(config.tls?.cert_path && config.tls?.key_path);
4607
4620
  this.dashboardHTML = generateDashboardHTML({
4608
4621
  timeoutSeconds: config.timeout_seconds,
4609
- serverVersion: PKG_VERSION3,
4622
+ serverVersion: SANCTUARY_VERSION,
4610
4623
  authToken: this.authToken
4611
4624
  });
4612
4625
  this.sessionCleanupTimer = setInterval(() => this.cleanupSessions(), 6e4);
@@ -5669,6 +5682,11 @@ function generateSHR(identityId, opts) {
5669
5682
  }
5670
5683
  const body = {
5671
5684
  shr_version: "1.0",
5685
+ implementation: {
5686
+ sanctuary_version: config.version,
5687
+ node_version: process.versions.node,
5688
+ generated_by: "sanctuary-mcp-server"
5689
+ },
5672
5690
  instance_id: identity.identity_id,
5673
5691
  generated_at: now.toISOString(),
5674
5692
  expires_at: expiresAt.toISOString(),
@@ -9994,8 +10012,8 @@ async function checkForUpdate(currentVersion) {
9994
10012
  } catch {
9995
10013
  }
9996
10014
  }
9997
- var require5 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.cjs', document.baseURI).href)));
9998
- var { version: PKG_VERSION4 } = require5("../package.json");
10015
+ var require4 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.cjs', document.baseURI).href)));
10016
+ var { version: PKG_VERSION3 } = require4("../package.json");
9999
10017
  async function main() {
10000
10018
  const args = process.argv.slice(2);
10001
10019
  let passphrase = process.env.SANCTUARY_PASSPHRASE;
@@ -10008,7 +10026,7 @@ async function main() {
10008
10026
  printHelp();
10009
10027
  process.exit(0);
10010
10028
  } else if (args[i] === "--version" || args[i] === "-v") {
10011
- console.log(`@sanctuary-framework/mcp-server ${PKG_VERSION4}`);
10029
+ console.log(`@sanctuary-framework/mcp-server ${PKG_VERSION3}`);
10012
10030
  process.exit(0);
10013
10031
  }
10014
10032
  }
@@ -10019,7 +10037,7 @@ async function main() {
10019
10037
  console.error(`Sanctuary MCP Server v${config.version} running (stdio)`);
10020
10038
  console.error(`Storage: ${config.storage_path}`);
10021
10039
  console.error("Tools: all registered");
10022
- checkForUpdate(PKG_VERSION4);
10040
+ checkForUpdate(PKG_VERSION3);
10023
10041
  } else {
10024
10042
  console.error("HTTP transport not yet implemented. Use stdio.");
10025
10043
  process.exit(1);
@@ -10027,7 +10045,7 @@ async function main() {
10027
10045
  }
10028
10046
  function printHelp() {
10029
10047
  console.log(`
10030
- @sanctuary-framework/mcp-server v${PKG_VERSION4}
10048
+ @sanctuary-framework/mcp-server v${PKG_VERSION3}
10031
10049
 
10032
10050
  Sovereignty infrastructure for agents in the agentic economy.
10033
10051