@jefuriiij/synthra 0.4.1 → 0.5.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/CHANGELOG.md CHANGED
@@ -7,6 +7,29 @@ For older versions, see [GitHub Releases](https://github.com/jefuriiij/synthra/r
7
7
 
8
8
  ---
9
9
 
10
+ ## [0.5.0] — 2026-06-13
11
+
12
+ ### Added
13
+
14
+ - **`graph_read` hands you the cheap edit recipe.** Reading a symbol slice now
15
+ ends with the exact targeted `Read(path, offset, limit)` (covering the symbol
16
+ plus a little headroom) that satisfies Claude Code's Edit read-gate, plus a
17
+ "do not re-read the whole file" nudge. A `graph_read` slice doesn't satisfy
18
+ the gate on its own, so editing a symbol used to force a whole-file Read —
19
+ and the same large file would get re-read many times across a session.
20
+ Delivering the recipe at the point of use (not just once in the session
21
+ primer) keeps edits cheap.
22
+
23
+ ### Changed
24
+
25
+ - **The Moat stops wasting blocks on styling searches.** Grep/Glob patterns for
26
+ CSS custom properties (`var(--brand)`, `--sidebar`), hex color literals
27
+ (`#fff`), and all-kebab class names (`cw-code-chip`) now pass through instead
28
+ of being blocked and redirected to a graph the symbol index can't answer.
29
+ Mixed queries that also name a real symbol still block.
30
+
31
+ ---
32
+
10
33
  ## [0.4.1] — 2026-06-10
11
34
 
12
35
  ### Added
package/dist/cli/index.js CHANGED
@@ -18,7 +18,7 @@ var init_package = __esm({
18
18
  "package.json"() {
19
19
  package_default = {
20
20
  name: "@jefuriiij/synthra",
21
- version: "0.4.1",
21
+ version: "0.5.0",
22
22
  publishConfig: {
23
23
  access: "public"
24
24
  },
@@ -5097,10 +5097,16 @@ ${fileNode.content}`);
5097
5097
  }
5098
5098
  const lines = fileNode.content.split(/\r?\n/);
5099
5099
  const body = lines.slice(symbol.start_line - 1, symbol.end_line).join("\n");
5100
+ const offset = Math.max(1, symbol.start_line - 2);
5101
+ const limit = symbol.end_line - symbol.start_line + 1 + 4;
5102
+ const editHint = `
5103
+
5104
+ ---
5105
+ \u270E To edit this symbol: Read("${fileNode.path}", offset=${offset}, limit=${limit}) then Edit \u2014 that satisfies Claude Code's read-gate at ~${limit} lines; do NOT re-read the whole file.`;
5100
5106
  return textContent(
5101
5107
  `# ${fileNode.path}::${symbol.name} (L${symbol.start_line}-${symbol.end_line})
5102
5108
 
5103
- ${body}`
5109
+ ${body}${editHint}`
5104
5110
  );
5105
5111
  }
5106
5112
  var editedFiles = /* @__PURE__ */ new Set();
@@ -5395,6 +5401,11 @@ function looksLikeNonSymbolQuery(pattern) {
5395
5401
  if (/:\s*\d/.test(pattern) || /\d(?:px|rem|em|vh|vw)\b/.test(pattern) || /\d%/.test(pattern)) {
5396
5402
  return true;
5397
5403
  }
5404
+ if (/--[a-zA-Z]/.test(pattern)) return true;
5405
+ if (/#[0-9a-fA-F]{3,8}\b/.test(pattern)) return true;
5406
+ const branches = pattern.replace(/\[[^\]]*\]/g, "").split("|").map((b) => b.trim()).filter(Boolean);
5407
+ const isKebab = (b) => /^[a-z][a-z0-9]*(?:-[a-z0-9]+)+$/i.test(b);
5408
+ if (branches.length > 0 && branches.every(isKebab)) return true;
5398
5409
  return false;
5399
5410
  }
5400
5411
  function recentlyTouchedMatchesQuery(recentPaths, queryTokens, graph) {