@jefuriiij/synthra 0.1.18 → 0.1.19
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 +17 -0
- package/dist/cli/index.js +13 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard/index.js.map +1 -1
- package/dist/server/index.js +12 -1
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,23 @@ For older versions, see [GitHub Releases](https://github.com/jefuriiij/synthra/r
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [0.1.19] — 2026-06-01
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **Policy block v4: targeted Read-before-Edit for graph-discovered files.**
|
|
15
|
+
Claude Code's `Edit` tool requires a file to have been opened with its own
|
|
16
|
+
`Read` tool; a `graph_read` slice does not satisfy that gate. Previously,
|
|
17
|
+
editing a file known only through `graph_read` would fail with *"File has
|
|
18
|
+
not been read yet"* and force a whole-file `Read` — eroding token savings on
|
|
19
|
+
edit-heavy sessions. The v4 policy now instructs: take the line range already
|
|
20
|
+
reported in the `graph_read` header (e.g. `…::handler (L120-168)`), do a
|
|
21
|
+
targeted `Read` with matching `offset`/`limit`, then `Edit`. This satisfies
|
|
22
|
+
the gate while keeping the read small. Existing v3 blocks auto-upgrade on the
|
|
23
|
+
next `syn .` run.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
10
27
|
## [0.1.18] — 2026-06-01
|
|
11
28
|
|
|
12
29
|
### Fixed
|
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.1.
|
|
21
|
+
version: "0.1.19",
|
|
22
22
|
publishConfig: {
|
|
23
23
|
access: "public"
|
|
24
24
|
},
|
|
@@ -3213,7 +3213,7 @@ import { basename as basename4 } from "path";
|
|
|
3213
3213
|
// src/hooks/claude-md.ts
|
|
3214
3214
|
import { readFile as readFile9, writeFile as writeFile4 } from "fs/promises";
|
|
3215
3215
|
import { basename as basename3, dirname as dirname6 } from "path";
|
|
3216
|
-
var POLICY_VERSION =
|
|
3216
|
+
var POLICY_VERSION = 4;
|
|
3217
3217
|
var POLICY_BEGIN = `<!-- synthra-policy v${POLICY_VERSION} BEGIN -->`;
|
|
3218
3218
|
var POLICY_END = `<!-- synthra-policy v${POLICY_VERSION} END -->`;
|
|
3219
3219
|
var ANY_BLOCK_RE = /<!--\s*synthra-policy\s+v\d+\s+BEGIN\s*-->[\s\S]*?<!--\s*synthra-policy\s+v\d+\s+END\s*-->\s*/g;
|
|
@@ -3282,6 +3282,17 @@ function policyBlock() {
|
|
|
3282
3282
|
"- If `graph_continue`'s `Files` list contains a `::` entry, pass it",
|
|
3283
3283
|
" verbatim to `graph_read`.",
|
|
3284
3284
|
"",
|
|
3285
|
+
"### Editing a file",
|
|
3286
|
+
"",
|
|
3287
|
+
"Claude Code's `Edit` tool (and `Write` when overwriting) only accepts a",
|
|
3288
|
+
"file that was opened with the **`Read` tool** \u2014 a `graph_read` slice does",
|
|
3289
|
+
'not count, and editing such a file fails with *"File has not been read',
|
|
3290
|
+
'yet."* So before editing a file you only know through `graph_read`: take',
|
|
3291
|
+
"the line range from its header (e.g. `\u2026::handler (L120-168)`), `Read` that",
|
|
3292
|
+
"file with a matching `offset`/`limit`, then `Edit`. That satisfies the",
|
|
3293
|
+
"gate while keeping the read small \u2014 don't whole-file `Read` unless the",
|
|
3294
|
+
"edit spans most of the file.",
|
|
3295
|
+
"",
|
|
3285
3296
|
"### Don'ts",
|
|
3286
3297
|
"",
|
|
3287
3298
|
"- Don't Grep / Glob before calling `graph_continue` when required \u2014 the",
|