@papyruslabsai/seshat-mcp 0.10.0 → 0.11.0

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/index.js CHANGED
@@ -542,7 +542,7 @@ const TOOLS = [
542
542
  },
543
543
  {
544
544
  name: 'conflict_matrix',
545
- description: 'Given multiple tasks, classify every task pair into conflict tiers to determine parallelization safety. Tier 1 (different files, safe), Tier 2 (same file, different symbols, safe), Tier 3 (same symbol, orthogonal changes like imports vs logic, risky but parallelizable), Tier 4 (same symbol, overlapping changes, MUST sequence). Passing "scopes" per task enables Tier 3 downgrades.',
545
+ description: 'Given multiple tasks, classify every task pair into conflict tiers to determine parallelization safety. Tier 1 (different files, safe), Tier 2 (same file, different symbols, safe via surgical splicing), Tier 3 (same symbol, MUST sequence to maintain splice integrity). Returns a pairwise matrix and a suggested execution plan.',
546
546
  inputSchema: {
547
547
  type: 'object',
548
548
  properties: {
@@ -564,7 +564,7 @@ const TOOLS = [
564
564
  dimensions: {
565
565
  type: 'array',
566
566
  items: { type: 'string' },
567
- description: 'Optional: Code scopes this task will modify (e.g., "edges", "struct", "semantics", "constraints"). Used to downgrade conflicts via spatial separation.',
567
+ description: 'Optional: Code scopes this task will modify. (Legacy support, no longer required for Tier 2 safety).',
568
568
  },
569
569
  expand_blast_radius: {
570
570
  type: 'boolean',
@@ -261,25 +261,8 @@ export async function diffBundle(args) {
261
261
  }
262
262
  return result;
263
263
  }
264
- // ─── Conflict Tier Classification ─────────────────────────────────
265
- const ZONE_1 = new Set(['edges', 'imports']); // Header / Dependencies
266
- const ZONE_2 = new Set(['struct', 'constraints', 'traits', 'ownership']); // Signature / Modifiers
267
- const ZONE_3 = new Set(['semantics', 'data', 'runtime']); // Logic / Implementation
268
- function getZones(scopes) {
269
- const zones = new Set();
270
- for (const s of scopes) {
271
- const lower = s.toLowerCase();
272
- if (ZONE_1.has(lower))
273
- zones.add(1);
274
- if (ZONE_2.has(lower))
275
- zones.add(2);
276
- if (ZONE_3.has(lower))
277
- zones.add(3);
278
- }
279
- return zones;
280
- }
281
264
  function classifyConflictTier(taskA, taskB) {
282
- // Check symbol overlap
265
+ // Check symbol overlap → Tier 3 (MUST sequence)
283
266
  const sharedEntities = [];
284
267
  for (const id of taskA.entityIds) {
285
268
  if (taskB.entityIds.has(id)) {
@@ -287,27 +270,9 @@ function classifyConflictTier(taskA, taskB) {
287
270
  }
288
271
  }
289
272
  if (sharedEntities.length > 0) {
290
- // Both touch same symbol. Check scopes to see if we can downgrade from Tier 4 (Sequential) to Tier 3 (Parallelizable Orthogonal)
291
- if (taskA.dimensions.size > 0 && taskB.dimensions.size > 0) {
292
- const zonesA = getZones(taskA.dimensions);
293
- const zonesB = getZones(taskB.dimensions);
294
- let spatialCollision = false;
295
- for (const z of zonesA) {
296
- if (zonesB.has(z))
297
- spatialCollision = true;
298
- }
299
- if (!spatialCollision) {
300
- return {
301
- tier: 3,
302
- reason: `${sharedEntities.length} shared symbols, but orthogonal change scopes (Tier 3) — safe to parallelize`,
303
- sharedFiles: [],
304
- sharedEntities,
305
- };
306
- }
307
- }
308
273
  return {
309
- tier: 4,
310
- reason: `${sharedEntities.length} shared symbols in same/unknown change scope (Tier 4) — MUST sequence to prevent merge conflict`,
274
+ tier: 3,
275
+ reason: `${sharedEntities.length} shared symbols — MUST sequence to maintain surgical splice integrity`,
311
276
  sharedFiles: [],
312
277
  sharedEntities,
313
278
  };
@@ -327,26 +292,27 @@ function classifyConflictTier(taskA, taskB) {
327
292
  sharedEntities: [],
328
293
  };
329
294
  }
295
+ // Same file, different symbols → Tier 2 (Safe via Surgical Splicer)
330
296
  return {
331
297
  tier: 2,
332
- reason: `${sharedFiles.length} shared files but different symbols — safe to parallelize`,
298
+ reason: `${sharedFiles.length} shared files but different symbols — safe to parallelize via surgical splicing`,
333
299
  sharedFiles,
334
300
  sharedEntities: [],
335
301
  };
336
302
  }
337
303
  // ─── Execution Plan Builder ───────────────────────────────────────
338
304
  /**
339
- * Build execution plan from tier-4 conflict graph using connected components.
340
- * Tasks with no tier-4 edges to each other run in parallel.
341
- * Tasks in the same tier-4 component run sequentially.
305
+ * Build execution plan from tier-3 conflict graph using connected components.
306
+ * Tasks with no tier-3 edges to each other run in parallel.
307
+ * Tasks in the same tier-3 component run sequentially.
342
308
  */
343
- function buildExecutionPlan(taskIds, tier4Edges) {
344
- // Build adjacency list for tier-4 conflicts
309
+ function buildExecutionPlan(taskIds, tier3Edges) {
310
+ // Build adjacency list for tier-3 conflicts
345
311
  const adj = new Map();
346
312
  for (const id of taskIds) {
347
313
  adj.set(id, new Set());
348
314
  }
349
- for (const [a, b] of tier4Edges) {
315
+ for (const [a, b] of tier3Edges) {
350
316
  adj.get(a)?.add(b);
351
317
  adj.get(b)?.add(a);
352
318
  }
@@ -454,7 +420,7 @@ export function conflictMatrix(args) {
454
420
  }
455
421
  // Pairwise comparison
456
422
  const matrix = [];
457
- const tier4Edges = [];
423
+ const tier3Edges = [];
458
424
  for (let i = 0; i < resolvedTasks.length; i++) {
459
425
  for (let j = i + 1; j < resolvedTasks.length; j++) {
460
426
  const taskA = resolvedTasks[i];
@@ -471,14 +437,14 @@ export function conflictMatrix(args) {
471
437
  if (result.sharedEntities.length > 0)
472
438
  entry.sharedEntities = result.sharedEntities;
473
439
  matrix.push(entry);
474
- if (result.tier === 4) {
475
- tier4Edges.push([taskA.id, taskB.id]);
440
+ if (result.tier === 3) {
441
+ tier3Edges.push([taskA.id, taskB.id]);
476
442
  }
477
443
  }
478
444
  }
479
445
  // Build execution plan
480
446
  const taskIds = resolvedTasks.map(t => t.id);
481
- const executionPlan = buildExecutionPlan(taskIds, tier4Edges);
447
+ const executionPlan = buildExecutionPlan(taskIds, tier3Edges);
482
448
  const result = {
483
449
  taskCount: tasks.length,
484
450
  matrix,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@papyruslabsai/seshat-mcp",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Semantic MCP server — exposes a codebase's structure, dependencies, and constraints as queryable tools",
5
5
  "type": "module",
6
6
  "bin": {