@papyruslabsai/seshat-mcp 0.16.3 → 0.16.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.
Files changed (2) hide show
  1. package/dist/index.js +16 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -99,6 +99,12 @@ Metrics:
99
99
 
100
100
  All tools are read-only and safe to call speculatively — there is no cost to trying them.
101
101
 
102
+ TEMPORAL ANALYSIS — Any tool accepts an optional temporal parameter: { temporal: { last_n: N } }. This runs the tool across the N most recent snapshots and returns a trend — timeseries of scalar metrics plus entity-level diffs (what appeared/disappeared). Requires at least 2 snapshots (call sync_project after commits to build history). Example:
103
+ get_coupling_metrics({ project: "myapp", temporal: { last_n: 5 } })
104
+ → shows coupling trend over last 5 syncs
105
+ find_dead_code({ project: "myapp", temporal: { last_n: 3 } })
106
+ → shows whether dead code is accumulating or being cleaned up
107
+
102
108
  get_blast_radius and get_optimal_context are designed to be called iteratively. Start with any entity, then feed discovered entities back in to expand your understanding. Each round reveals new structure that informs where to look next. When answering "what does this system do?" questions, a few rounds of blast_radius → get_entity → blast_radius on the newly discovered symbols will build a complete picture faster than reading files.`;
103
109
  // ─── Private Tools (Ptah IP — never exposed publicly) ────────────
104
110
  // These tools are reserved for the Ptah write layer. They exist in
@@ -110,6 +116,7 @@ const PRIVATE_TOOLS = new Set([
110
116
  'diff_bundle',
111
117
  'conflict_matrix',
112
118
  'query_data_targets',
119
+ 'trace_boundaries', // Hidden until response shaping is refined
113
120
  ]);
114
121
  // ─── Shared Definitions ──────────────────────────────────────────
115
122
  const projectParam = {
@@ -566,7 +573,7 @@ function getCloudUrl(path) {
566
573
  async function main() {
567
574
  const server = new Server({
568
575
  name: 'seshat',
569
- version: '0.16.3',
576
+ version: '0.16.6',
570
577
  }, {
571
578
  capabilities: { tools: {} },
572
579
  instructions: SERVER_INSTRUCTIONS,
@@ -634,6 +641,7 @@ async function main() {
634
641
  if (name === 'sync_project') {
635
642
  let repoUrl = args?.repo_url;
636
643
  // If no URL provided, try to detect git remote
644
+ let headSha;
637
645
  if (!repoUrl) {
638
646
  try {
639
647
  const { execSync } = await import('child_process');
@@ -641,6 +649,11 @@ async function main() {
641
649
  // Normalize SSH URLs to HTTPS
642
650
  const sshMatch = remote.match(/^git@github\.com:(.+)\.git$/);
643
651
  repoUrl = sshMatch ? `https://github.com/${sshMatch[1]}` : remote.replace(/\.git$/, '');
652
+ // Capture current HEAD SHA for cache comparison
653
+ try {
654
+ headSha = execSync('git rev-parse HEAD', { timeout: 5000 }).toString().trim().slice(0, 12);
655
+ }
656
+ catch { /* shallow clone or no commits */ }
644
657
  }
645
658
  catch {
646
659
  return {
@@ -659,7 +672,7 @@ async function main() {
659
672
  'Content-Type': 'application/json',
660
673
  'x-api-key': apiKey,
661
674
  },
662
- body: JSON.stringify({ repo_url: repoUrl, force: args?.force === true }),
675
+ body: JSON.stringify({ repo_url: repoUrl, force: args?.force === true, head_sha: headSha }),
663
676
  });
664
677
  if (!res.ok) {
665
678
  const errorText = await res.text();
@@ -831,7 +844,7 @@ async function main() {
831
844
  });
832
845
  const transport = new StdioServerTransport();
833
846
  await server.connect(transport);
834
- process.stderr.write(`Seshat MCP v0.16.3 connected. Structural intelligence ready.\n`);
847
+ process.stderr.write(`Seshat MCP v0.16.6 connected. Structural intelligence ready.\n`);
835
848
  }
836
849
  main().catch((err) => {
837
850
  process.stderr.write(`Fatal: ${err.message}\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@papyruslabsai/seshat-mcp",
3
- "version": "0.16.3",
3
+ "version": "0.16.6",
4
4
  "description": "Semantic MCP server — exposes a codebase's structure, dependencies, and constraints as queryable tools",
5
5
  "type": "module",
6
6
  "bin": {