latticesql 4.2.1 → 4.2.2

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/cli.js CHANGED
@@ -1015,7 +1015,7 @@ var init_manifest = __esm({
1015
1015
  "src/lifecycle/manifest.ts"() {
1016
1016
  "use strict";
1017
1017
  init_writer();
1018
- TEMPLATE_VERSION = 1;
1018
+ TEMPLATE_VERSION = 2;
1019
1019
  }
1020
1020
  });
1021
1021
 
@@ -76617,7 +76617,7 @@ function printHelp() {
76617
76617
  );
76618
76618
  }
76619
76619
  function getVersion() {
76620
- if (true) return "4.2.1";
76620
+ if (true) return "4.2.2";
76621
76621
  try {
76622
76622
  const pkgPath = new URL("../package.json", import.meta.url).pathname;
76623
76623
  const pkg = JSON.parse(readFileSync25(pkgPath, "utf-8"));
package/dist/index.cjs CHANGED
@@ -249,7 +249,7 @@ var init_manifest = __esm({
249
249
  import_node_path2 = require("path");
250
250
  import_node_fs2 = require("fs");
251
251
  init_writer();
252
- TEMPLATE_VERSION = 1;
252
+ TEMPLATE_VERSION = 2;
253
253
  }
254
254
  });
255
255
 
package/dist/index.js CHANGED
@@ -240,7 +240,7 @@ var init_manifest = __esm({
240
240
  "src/lifecycle/manifest.ts"() {
241
241
  "use strict";
242
242
  init_writer();
243
- TEMPLATE_VERSION = 1;
243
+ TEMPLATE_VERSION = 2;
244
244
  }
245
245
  });
246
246
 
@@ -92,6 +92,16 @@ A bare `new Lattice(path)` does **not** auto-render (`_scheduleAutoRender`
92
92
  early-returns when no output dir is set) — call `render(dir)` / `reconcile(dir)`
93
93
  manually, or opt in with `enableAutoRender(dir)`.
94
94
 
95
+ On open, a staleness gate decides whether the existing tree can be reused or must
96
+ be re-rendered. Alongside the data cursor (has anything the tree depends on
97
+ changed?), the manifest records a **render-output format version**. When a
98
+ release changes how the tree is derived or templated — i.e. the bytes a clean
99
+ render produces for unchanged data — that version is bumped, and the gate treats
100
+ any workspace whose manifest records an older version as stale. The result is a
101
+ **one-time full re-render on the first open after upgrading**, so a render-logic
102
+ fix reaches workspaces rendered by an older version automatically; once the
103
+ manifest is re-stamped, subsequent opens skip again when nothing has changed.
104
+
95
105
  ## File loopback (3.4)
96
106
 
97
107
  When the GUI is serving a workspace, editing a rendered `.md` file on disk is automatically captured back into the database through the normal write path — so the change lands in the changelog (versioned/undoable) and appears live in the GUI, exactly as if the edit had been made there. Structured frontmatter and body `key: value` fields round-trip automatically; edits that can't be safely parsed (free-form or custom renders) are surfaced as a notice rather than guessed at, so a lossy render can't corrupt a row. Render echoes are suppressed via the manifest, so there is no write loop.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "latticesql",
3
- "version": "4.2.1",
3
+ "version": "4.2.2",
4
4
  "description": "Persistent structured memory for AI agent systems — pluggable SQLite or Postgres backend, LLM context bridge",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",