skalpel 4.0.37 → 4.0.38

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.
Files changed (2) hide show
  1. package/autopsy.mjs +16 -3
  2. package/package.json +1 -1
package/autopsy.mjs CHANGED
@@ -737,6 +737,19 @@ function redact(s) {
737
737
  return t;
738
738
  }
739
739
 
740
+ // Redact a raw source pointer for the shareable receipt. srcPointer() returns absolute store paths that
741
+ // bake in the OS home dir twice: the literal "/Users/<you>" prefix AND the dash-encoded "-Users-<you>"
742
+ // copy that ~/.claude/projects flattens into each session's directory name (revealing the full project
743
+ // path — e.g. confidential client dir names — on a receipt marketed shareable). Collapse both home forms
744
+ // to "~", then run the same span redaction used for quoted text. --raw reveals the untouched path locally.
745
+ function redactPointer(p) {
746
+ if (RAW || !p) return p;
747
+ const encHome = HOME.replace(/\//g, "-"); // "/Users/you" -> "-Users-you"
748
+ let t = p.split(HOME).join("~"); // literal home prefix -> ~
749
+ t = t.split(encHome).join("~"); // dash-encoded home inside the projects dir name -> ~
750
+ return redact(t);
751
+ }
752
+
740
753
  // ---------- autopsy self-echo filter ----------
741
754
  const AUTOPSY_ECHO = [
742
755
  "skalpel autopsy",
@@ -1456,7 +1469,7 @@ async function main() {
1456
1469
  );
1457
1470
  for (const w of leg.witnesses.slice(0, 2)) {
1458
1471
  const p = srcPointer(w);
1459
- if (p) P(` ${p}`);
1472
+ if (p) P(` ${redactPointer(p)}`);
1460
1473
  }
1461
1474
  }
1462
1475
  P();
@@ -1500,7 +1513,7 @@ async function main() {
1500
1513
  );
1501
1514
  for (const w of shown) {
1502
1515
  const p = srcPointer(w);
1503
- if (p) P(` ${p}`);
1516
+ if (p) P(` ${redactPointer(p)}`);
1504
1517
  }
1505
1518
  } else {
1506
1519
  const proj = projTail(r.root);
@@ -1531,7 +1544,7 @@ async function main() {
1531
1544
  ` occurrences); the ${r.duration_min}min span = last.ts − first.ts, both quoted. Source:`,
1532
1545
  );
1533
1546
  const p = srcPointer(r.witnesses[0]);
1534
- if (p) P(` ${p}`);
1547
+ if (p) P(` ${redactPointer(p)}`);
1535
1548
  }
1536
1549
  P();
1537
1550
  P(" " + RULE);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skalpel",
3
- "version": "4.0.37",
3
+ "version": "4.0.38",
4
4
  "description": "Behavioral graph for AI-assisted coding — learns how you work and steers Claude Code + Codex in real time.",
5
5
  "type": "module",
6
6
  "bin": {