@jefuriiij/synthra 0.1.5 → 0.1.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.
@@ -1457,6 +1457,12 @@ function policyBlock() {
1457
1457
  "Grep / Glob / Read** \u2014 they are faster, cheaper, and already filtered",
1458
1458
  "to relevant files.",
1459
1459
  "",
1460
+ "> **Tool namespace.** Synthra's MCP tools are exposed as",
1461
+ "> `mcp__synthra__graph_continue`, `mcp__synthra__graph_read`, and",
1462
+ "> `mcp__synthra__graph_register_edit`. Below they are referred to by",
1463
+ "> their short names (`graph_continue` etc.) for readability \u2014 use the",
1464
+ "> full namespaced form when actually invoking them.",
1465
+ "",
1460
1466
  "### Tools",
1461
1467
  "",
1462
1468
  "- **`graph_continue(query)`** \u2014 returns a `Confidence` label, the list",
@@ -1493,8 +1499,11 @@ function policyBlock() {
1493
1499
  "",
1494
1500
  "- **`Confidence: high`** \u2192 Stop. Do NOT Grep, Glob, or further explore",
1495
1501
  " for this query. The graph already has it.",
1496
- "- **`Confidence: medium`** or **`low`** \u2192 You may use Grep / Glob",
1497
- " sparingly, but the PreToolUse hook may still block redundant calls.",
1502
+ "- **`Confidence: medium`** \u2192 Read the listed `Files` directly via",
1503
+ ' `graph_read("file::symbol")` *before* trying Grep. The graph has',
1504
+ " narrowed the search space \u2014 use it, don't bypass it.",
1505
+ "- **`Confidence: low`** \u2192 You may use Grep / Glob, but the PreToolUse",
1506
+ " hook may still block redundant calls.",
1498
1507
  "",
1499
1508
  "### Reading code",
1500
1509
  "",
@@ -1551,8 +1560,16 @@ async function patchClaudeMd(path) {
1551
1560
  }
1552
1561
 
1553
1562
  // src/cli/bootstrap.ts
1554
- var GITIGNORE_MARKER = "# added by synthra";
1555
- var GITIGNORE_ENTRY = ".synthra-graph/";
1563
+ var GITIGNORE_ENTRIES = [
1564
+ {
1565
+ comment: "added by synthra (heavy generated state \u2014 gitignored by design)",
1566
+ entry: ".synthra-graph/"
1567
+ },
1568
+ {
1569
+ comment: "added by synthra \u2014 MCP registration. Remove this line if you want to share the synthra MCP entry with teammates via committed .mcp.json",
1570
+ entry: ".mcp.json"
1571
+ }
1572
+ ];
1556
1573
  async function exists(path) {
1557
1574
  try {
1558
1575
  await stat2(path);
@@ -1572,11 +1589,12 @@ async function patchGitignore(path) {
1572
1589
  existing = await readFile7(path, "utf8");
1573
1590
  } catch {
1574
1591
  }
1575
- const lines = existing.split(/\r?\n/);
1576
- if (lines.some((l) => l.trim() === GITIGNORE_ENTRY)) return false;
1577
- const appendix = (existing.length === 0 || existing.endsWith("\n") ? "" : "\n") + (existing.length ? "\n" : "") + `${GITIGNORE_MARKER}
1578
- ${GITIGNORE_ENTRY}
1579
- `;
1592
+ const trimmed = new Set(existing.split(/\r?\n/).map((l) => l.trim()));
1593
+ const missing = GITIGNORE_ENTRIES.filter((e) => !trimmed.has(e.entry));
1594
+ if (missing.length === 0) return false;
1595
+ const block = missing.map((m) => `# ${m.comment}
1596
+ ${m.entry}`).join("\n") + "\n";
1597
+ const appendix = (existing.length === 0 || existing.endsWith("\n") ? "" : "\n") + (existing.length ? "\n" : "") + block;
1580
1598
  await writeFile3(path, existing + appendix, "utf8");
1581
1599
  return true;
1582
1600
  }