@jefuriiij/synthra 0.1.8 → 0.1.10
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/README.md +209 -179
- package/dist/cli/index.js +1020 -991
- package/dist/cli/index.js.map +1 -1
- package/dist/dashboard/index.js +840 -840
- package/dist/dashboard/index.js.map +1 -1
- package/dist/server/index.js +39 -10
- package/dist/server/index.js.map +1 -1
- package/package.json +65 -65
package/dist/server/index.js
CHANGED
|
@@ -613,7 +613,7 @@ async function buildGraph(root, parsed) {
|
|
|
613
613
|
};
|
|
614
614
|
}
|
|
615
615
|
function buildSymbolIndex(graph) {
|
|
616
|
-
const out =
|
|
616
|
+
const out = /* @__PURE__ */ Object.create(null);
|
|
617
617
|
for (const node of graph.nodes) {
|
|
618
618
|
if (node.kind !== "symbol") continue;
|
|
619
619
|
const list = out[node.name] ?? (out[node.name] = []);
|
|
@@ -1308,7 +1308,29 @@ var DEFAULT_IGNORE = [
|
|
|
1308
1308
|
".turbo/",
|
|
1309
1309
|
".cache/",
|
|
1310
1310
|
".vscode/",
|
|
1311
|
-
".idea/"
|
|
1311
|
+
".idea/",
|
|
1312
|
+
".vs/",
|
|
1313
|
+
// Flutter / Dart build caches — IDE-rehydrated, contain third-party
|
|
1314
|
+
// type stubs (typescript.d.ts, babylon.js etc.) that contaminate the graph.
|
|
1315
|
+
".dart_tool/",
|
|
1316
|
+
".flutter-plugins",
|
|
1317
|
+
".flutter-plugins-dependencies",
|
|
1318
|
+
// Android / Java / Kotlin / Rust
|
|
1319
|
+
".gradle/",
|
|
1320
|
+
"target/",
|
|
1321
|
+
// iOS / Xcode
|
|
1322
|
+
"Pods/",
|
|
1323
|
+
"DerivedData/",
|
|
1324
|
+
// Python
|
|
1325
|
+
"__pycache__/",
|
|
1326
|
+
".venv/",
|
|
1327
|
+
"venv/",
|
|
1328
|
+
".tox/",
|
|
1329
|
+
".pytest_cache/",
|
|
1330
|
+
".mypy_cache/",
|
|
1331
|
+
".ruff_cache/",
|
|
1332
|
+
// .NET
|
|
1333
|
+
"obj/"
|
|
1312
1334
|
];
|
|
1313
1335
|
var BINARY_EXTS = /* @__PURE__ */ new Set([
|
|
1314
1336
|
".png",
|
|
@@ -1424,7 +1446,8 @@ async function writeSymbolIndex(path, index) {
|
|
|
1424
1446
|
await writeJson(path, index, true);
|
|
1425
1447
|
}
|
|
1426
1448
|
async function readSymbolIndex(path) {
|
|
1427
|
-
|
|
1449
|
+
const parsed = await readJson(path);
|
|
1450
|
+
return Object.assign(/* @__PURE__ */ Object.create(null), parsed);
|
|
1428
1451
|
}
|
|
1429
1452
|
|
|
1430
1453
|
// src/shared/paths.ts
|
|
@@ -1462,7 +1485,7 @@ import { mkdir as mkdir3, readFile as readFile7, stat as stat2, writeFile as wri
|
|
|
1462
1485
|
|
|
1463
1486
|
// src/hooks/claude-md.ts
|
|
1464
1487
|
import { readFile as readFile6, writeFile as writeFile2 } from "fs/promises";
|
|
1465
|
-
var POLICY_VERSION =
|
|
1488
|
+
var POLICY_VERSION = 3;
|
|
1466
1489
|
var POLICY_BEGIN = `<!-- synthra-policy v${POLICY_VERSION} BEGIN -->`;
|
|
1467
1490
|
var POLICY_END = `<!-- synthra-policy v${POLICY_VERSION} END -->`;
|
|
1468
1491
|
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;
|
|
@@ -1541,14 +1564,20 @@ function policyBlock() {
|
|
|
1541
1564
|
"### Session-end resume note",
|
|
1542
1565
|
"",
|
|
1543
1566
|
`When the user signals they're done (e.g. "bye", "wrap up", "done"),`,
|
|
1544
|
-
"
|
|
1567
|
+
"persist the resume state by calling `context_remember` once per bullet.",
|
|
1568
|
+
"Synthra re-renders `.synthra/CONTEXT.md` from those entries at session",
|
|
1569
|
+
"end \u2014 do **NOT** write to `CONTEXT.md` directly, it is a derived view",
|
|
1570
|
+
"and direct edits are overwritten by the Stop hook.",
|
|
1571
|
+
"",
|
|
1572
|
+
"Use these `kind` values:",
|
|
1545
1573
|
"",
|
|
1546
|
-
|
|
1547
|
-
"-
|
|
1548
|
-
|
|
1574
|
+
'- **`kind: "task"`** \u2014 what is being worked on right now (1 entry)',
|
|
1575
|
+
'- **`kind: "decision"`** \u2014 non-obvious choices made this session (max 3)',
|
|
1576
|
+
'- **`kind: "next"`** \u2014 concrete next steps (max 3)',
|
|
1549
1577
|
"",
|
|
1550
|
-
|
|
1551
|
-
|
|
1578
|
+
'Tag entries with the relevant area (`tags: ["auth"]`) and the files',
|
|
1579
|
+
'they touch (`files: ["src/auth.ts"]`) so later `context_recall` queries',
|
|
1580
|
+
"can filter. Keep each `text` to 1\u20132 sentences.",
|
|
1552
1581
|
"",
|
|
1553
1582
|
"_This block is managed by Synthra. Edits inside the BEGIN/END markers",
|
|
1554
1583
|
"are overwritten on every `syn .` run._",
|