@exorcist-98/mcp-server 0.3.5 → 0.3.6

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/README.md CHANGED
@@ -37,7 +37,7 @@ out of results unless you ask for it, and is then marked as untrusted.
37
37
  ```json
38
38
  {
39
39
  "mcpServers": {
40
- "exorcist": { "command": "npx", "args": ["-y", "@exorcist-98/mcp-server@0.3.5"] }
40
+ "exorcist": { "command": "npx", "args": ["-y", "@exorcist-98/mcp-server@0.3.6"] }
41
41
  }
42
42
  }
43
43
  ```
package/dist/index.mjs CHANGED
@@ -22759,7 +22759,7 @@ import { homedir as homedir6 } from "node:os";
22759
22759
  import { delimiter } from "node:path";
22760
22760
 
22761
22761
  // src/tools.ts
22762
- import { existsSync as existsSync5, readFileSync as readFileSync7, realpathSync as realpathSync3, statSync as statSync6 } from "node:fs";
22762
+ import { existsSync as existsSync4, readFileSync as readFileSync7, realpathSync as realpathSync3, statSync as statSync6 } from "node:fs";
22763
22763
  import { fileURLToPath as fileURLToPath2 } from "node:url";
22764
22764
 
22765
22765
  // ../shield/src/canonical.ts
@@ -31207,7 +31207,7 @@ function checkPathSegment(name) {
31207
31207
  }
31208
31208
 
31209
31209
  // ../core/src/lifecycle-scripts.ts
31210
- import { closeSync as closeSync2, existsSync as existsSync2, lstatSync as lstatSync2, openSync as openSync2, readdirSync, readSync, realpathSync, statSync as statSync2 } from "node:fs";
31210
+ import { closeSync as closeSync2, existsSync, lstatSync as lstatSync2, openSync as openSync2, readdirSync, readSync, realpathSync, statSync as statSync2 } from "node:fs";
31211
31211
  import { isAbsolute as isAbsolute6, join as join8, posix as posix2, relative as relative5, resolve as resolve5, sep } from "node:path";
31212
31212
 
31213
31213
  // ../core/src/install-hooks.ts
@@ -32036,7 +32036,7 @@ function parseShell(command, sub = false) {
32036
32036
 
32037
32037
  // ../core/src/dev-tools.ts
32038
32038
  init_zod();
32039
- import { existsSync, readFileSync as readFileSync4, statSync } from "node:fs";
32039
+ import { readFileSync as readFileSync4, statSync } from "node:fs";
32040
32040
  import { homedir as homedir3 } from "node:os";
32041
32041
  import { isAbsolute as isAbsolute5, join as join7, normalize as normalize2, relative as relative4, resolve as resolve3 } from "node:path";
32042
32042
 
@@ -32145,27 +32145,19 @@ function unlockedValueRisk(name, value, cwd, dynamic) {
32145
32145
  const runtime = dynamic || /[$`]/.test(value);
32146
32146
  const say = `${name} is set to a path inside the project, or to a value built at run time, and a tool config can name a program to run or a daemon to reach`;
32147
32147
  if (runtime) return say;
32148
- if (PATH_VAR.test(name) && anyInside(value, cwd)) return say;
32149
- const parts = value.split(/[\s:,;=]+/u).filter((x) => x !== "");
32150
- if (PROGRAM_VAR.test(name)) {
32151
- const only = parts.length === 1 && value.trim() === parts[0] ? parts[0] : void 0;
32152
- const ok = only !== void 0 && (isAbsolute5(only) ? !insideProject(only, cwd) : !/[/\\~]/u.test(only) && cwd !== void 0 && !existsSync(resolve3(cwd, only)));
32153
- if (!ok) return `${name} names a program or arguments for the tool, and only one word is allowed: an absolute path outside the project, or a program name that is not a file in the project`;
32154
- }
32155
- for (const part of parts) {
32156
- if (/^[./~]/u.test(part) || part.includes("/")) {
32157
- if (insideProject(part, cwd)) return say;
32158
- } else {
32159
- const bare = part.replace(/^-+/u, "");
32160
- if (bare !== "" && (cwd === void 0 || existsSync(resolve3(cwd, bare)))) return say;
32161
- }
32162
- }
32163
32148
  if (ENDPOINT_VAR.test(name)) {
32164
32149
  const m = /^(?:unix|npipe|file):\/\/(.*)$/.exec(value);
32165
32150
  const target = m === null ? value : m[1];
32166
- if ((m !== null || /^[./~]/.test(target)) && insideProject(target, cwd)) return say;
32151
+ return (m !== null || /^[./~]/.test(target)) && insideProject(target, cwd) ? say : null;
32167
32152
  }
32168
- return null;
32153
+ let v = value.trim();
32154
+ if (v.startsWith("~")) v = expandTilde(v, cwd) ?? v;
32155
+ const one = `${name} takes one plain word here: an absolute path outside the project, or a name with no dot, slash or tilde (a value that could be a file in the project is refused)`;
32156
+ if (v === "") return null;
32157
+ if (/[\s:,;=]/u.test(v)) return one;
32158
+ if (isAbsolute5(v)) return insideProject(v, cwd) ? say : null;
32159
+ if (PATH_VAR.test(name) || PROGRAM_VAR.test(name)) return /^[A-Za-z0-9_-]+$/u.test(v) && !PATH_VAR.test(name) ? null : one;
32160
+ return /[./\\~]/u.test(v) ? one : null;
32169
32161
  }
32170
32162
  function envAssignRisk(name, value, cwd, dynamic = false, known, prog) {
32171
32163
  const owners = envFamilyOwners(name);
@@ -34023,7 +34015,7 @@ function readLocalText(pkgDir, rel) {
34023
34015
  const r = relative5(root, p);
34024
34016
  return r !== "" && !r.startsWith("..") && !isAbsolute6(r) && !r.split(sep).includes("..");
34025
34017
  };
34026
- if (!within(pkgDir, abs) || !existsSync2(abs)) return null;
34018
+ if (!within(pkgDir, abs) || !existsSync(abs)) return null;
34027
34019
  const real = realpathSync(abs);
34028
34020
  if (!within(realpathSync(pkgDir), real)) return null;
34029
34021
  const st = statSync2(real);
@@ -35767,7 +35759,7 @@ var LockSchema = external_exports.object({
35767
35759
 
35768
35760
  // ../shield/src/vault.ts
35769
35761
  import { createHash as createHash3, randomBytes as randomBytes4 } from "node:crypto";
35770
- import { closeSync as closeSync4, constants as constants3, copyFileSync, existsSync as existsSync3, fstatSync as fstatSync3, lstatSync as lstatSync4, mkdirSync as mkdirSync3, openSync as openSync4, readFileSync as readFileSync6, readdirSync as readdirSync3, realpathSync as realpathSync2, rmSync as rmSync2, statSync as statSync4, writeFileSync as writeFileSync2, writeSync as writeSync2 } from "node:fs";
35762
+ import { closeSync as closeSync4, constants as constants3, copyFileSync, existsSync as existsSync2, fstatSync as fstatSync3, lstatSync as lstatSync4, mkdirSync as mkdirSync3, openSync as openSync4, readFileSync as readFileSync6, readdirSync as readdirSync3, realpathSync as realpathSync2, rmSync as rmSync2, statSync as statSync4, writeFileSync as writeFileSync2, writeSync as writeSync2 } from "node:fs";
35771
35763
  import { basename as basename5, dirname as dirname3, isAbsolute as isAbsolute7, join as join12, resolve as resolve7, sep as sep2 } from "node:path";
35772
35764
  init_zod();
35773
35765
  var SafeRel = external_exports.string().min(1).max(1024).refine(
@@ -35865,12 +35857,12 @@ function writeManifest(vaultDir, e) {
35865
35857
  `);
35866
35858
  }
35867
35859
  function listEntries(vaultDir) {
35868
- if (!existsSync3(vaultDir)) return [];
35860
+ if (!existsSync2(vaultDir)) return [];
35869
35861
  const key = getUserKey();
35870
35862
  const out = [];
35871
35863
  for (const name of readdirSync3(vaultDir)) {
35872
35864
  const file = join12(vaultDir, name, "manifest.json");
35873
- if (!existsSync3(file)) continue;
35865
+ if (!existsSync2(file)) continue;
35874
35866
  try {
35875
35867
  const st = lstatSync4(file);
35876
35868
  if (!st.isFile()) continue;
@@ -36104,7 +36096,7 @@ var MAX_HASHED_BYTES = 64 * 1024 * 1024;
36104
36096
  var MAX_EVENT_BYTES2 = 16 * 1024 * 1024;
36105
36097
 
36106
36098
  // ../shield/src/locate.ts
36107
- import { existsSync as existsSync4, readdirSync as readdirSync4, statSync as statSync5 } from "node:fs";
36099
+ import { existsSync as existsSync3, readdirSync as readdirSync4, statSync as statSync5 } from "node:fs";
36108
36100
  import { dirname as dirname4, isAbsolute as isAbsolute8, join as join13, parse as parse3, resolve as resolve8 } from "node:path";
36109
36101
  import { fileURLToPath } from "node:url";
36110
36102
  function hasDefinitions(dir) {
@@ -36170,11 +36162,11 @@ function findDefinitionsDir2(cwd) {
36170
36162
  }
36171
36163
  function resolveInside(cwd, p, roots = [], primary) {
36172
36164
  const real = (d) => realpathSync3(d);
36173
- const extra = roots.filter((r) => existsSync5(r)).map(real);
36165
+ const extra = roots.filter((r) => existsSync4(r)).map(real);
36174
36166
  const first = primary !== void 0 && extra.includes(real(primary)) ? [real(primary)] : [];
36175
36167
  const bases = [.../* @__PURE__ */ new Set([...first, real(cwd), ...extra])];
36176
36168
  const tries = isAbsolute9(p) ? [p] : bases.map((b) => resolve9(b, p));
36177
- const found = tries.find((t2) => existsSync5(t2));
36169
+ const found = tries.find((t2) => existsSync4(t2));
36178
36170
  if (!found) return { ok: false, error: `Path not found: ${p}` };
36179
36171
  const target = realpathSync3(found);
36180
36172
  const base = bases.find((b) => {
@@ -36210,7 +36202,7 @@ var PROJECT_MARKERS = [
36210
36202
  "README"
36211
36203
  ];
36212
36204
  function looksLikeProject(dir) {
36213
- const has = (n) => existsSync5(join14(dir, n));
36205
+ const has = (n) => existsSync4(join14(dir, n));
36214
36206
  if (has("plugin.json") || has("POWER.md")) return false;
36215
36207
  return PROJECT_MARKERS.some(has);
36216
36208
  }
@@ -36221,7 +36213,7 @@ var isWithin = (base, p) => {
36221
36213
  return rel === "" || !rel.startsWith("..") && !isAbsolute9(rel);
36222
36214
  };
36223
36215
  function sensitiveReason(real, home = homedir5()) {
36224
- const realHome = existsSync5(home) ? realpathSync3(home) : home;
36216
+ const realHome = existsSync4(home) ? realpathSync3(home) : home;
36225
36217
  if (dirname5(real) === real) return "it is the filesystem root";
36226
36218
  if (isWithin(real, realHome)) return real === realHome ? "it is the home folder" : "it contains the home folder";
36227
36219
  for (const n of SENSITIVE_IN_HOME) {
@@ -36285,7 +36277,7 @@ function usableRoots(entries, home) {
36285
36277
  continue;
36286
36278
  }
36287
36279
  } else if (/^[a-z][a-z0-9+.-]*:/i.test(path) && !/^[a-z]:[\\/]/i.test(path)) continue;
36288
- if (!isAbsolute9(path) || !existsSync5(path)) continue;
36280
+ if (!isAbsolute9(path) || !existsSync4(path)) continue;
36289
36281
  let real;
36290
36282
  try {
36291
36283
  if (!statSync6(path).isDirectory()) continue;
@@ -36293,7 +36285,7 @@ function usableRoots(entries, home) {
36293
36285
  } catch {
36294
36286
  continue;
36295
36287
  }
36296
- const realHome = existsSync5(home) ? realpathSync3(home) : home;
36288
+ const realHome = existsSync4(home) ? realpathSync3(home) : home;
36297
36289
  if (real === resolve9("/") || real === realHome || dirname5(real) === real) continue;
36298
36290
  if (!out.includes(real)) out.push(real);
36299
36291
  }
@@ -36413,7 +36405,7 @@ Tell the user. They can undo this with: exorcist vault restore ${r.value.id}`
36413
36405
  }
36414
36406
 
36415
36407
  // src/index.ts
36416
- var VERSION = "0.3.5";
36408
+ var VERSION = "0.3.6";
36417
36409
  var ctx = {
36418
36410
  cwd: process.cwd(),
36419
36411
  approved: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exorcist-98/mcp-server",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "MCP server for Exorcist 98: scan repos and MCP configs, explain findings, quarantine servers.",