@quolu/lattice 0.63.8 → 0.63.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/LICENSE +147 -147
- package/README.ja.md +378 -378
- package/README.md +303 -303
- package/bin/lattice-mcp.mjs +0 -0
- package/bin/lattice-scripted-adapter.mjs +0 -0
- package/bin/lattice-scripted-worker.mjs +0 -0
- package/bin/lattice-work-order-adapter.mjs +0 -0
- package/bin/lattice.mjs +0 -0
- package/docs/bridge-setup.md +248 -248
- package/docs/schemas/lattice.executor_packet.v1.schema.json +57 -57
- package/docs/schemas/lattice.executor_receipt.v1.schema.json +66 -66
- package/docs/schemas/lattice.phase_todo_revision.v3.schema.json +360 -360
- package/docs/schemas/lattice.plan_create_input.v1.schema.json +56 -56
- package/docs/schemas/lattice.plan_create_input.v2.schema.json +72 -72
- package/docs/schemas/lattice.plan_create_input.v3.schema.json +81 -81
- package/docs/schemas/lattice.plan_create_input.v4.schema.json +357 -357
- package/docs/schemas/lattice.plan_scope_review.v1.schema.json +55 -55
- package/docs/schemas/lattice.run_request.v1.schema.json +238 -238
- package/docs/schemas/lattice.runtime_adapter_capabilities.v2.schema.json +55 -55
- package/docs/schemas/lattice.runtime_adapter_registration_input.v1.schema.json +78 -78
- package/docs/schemas/lattice.runtime_adapter_registration_input.v2.schema.json +86 -86
- package/docs/schemas/lattice.todo_extraction.v2.schema.json +298 -298
- package/docs/schemas/lattice.todo_extraction.v3.schema.json +150 -150
- package/docs/schemas/lattice.todo_extraction.v4.schema.json +161 -161
- package/docs/schemas/lattice.todo_revision.v2.schema.json +260 -260
- package/docs/schemas/lattice.todo_revision_set.v3.schema.json +363 -363
- package/docs/schemas/lattice.todo_structure_binding.v1.schema.json +47 -47
- package/docs/schemas/lattice.todo_structure_realization.v1.schema.json +55 -55
- package/docs/schemas/lattice.todo_structure_set.v1.schema.json +264 -264
- package/package.json +109 -109
- package/sensor/LICENSE +21 -21
- package/sensor/NOTICE +19 -19
- package/sensor/dist/bin/lattice-sensor.js +9 -9
- package/sensor/dist/db/index.js +24 -24
- package/sensor/dist/db/migrations.js +41 -41
- package/sensor/dist/db/queries.js +164 -164
- package/sensor/dist/db/schema.sql +205 -205
- package/sensor/dist/directory.js +5 -5
- package/sensor/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-cfml.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-cfquery.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-cfscript.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-erlang.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-go.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-javascript.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-python.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-tsx.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-typescript.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/sensor/dist/mcp/liveness-watchdog.js +53 -53
- package/sensor/dist/mcp/server-instructions.js +95 -95
- package/sensor/package.json +56 -56
- package/src/fs-dir-sync.mjs +14 -0
- package/src/hooks-cli.mjs +1 -8
- package/src/rc2-campaign.mjs +1 -12
- package/src/runtime-adapter-registry.mjs +2 -10
- package/src/runtime-cli.mjs +2 -6
- package/src/runtime-control-store.mjs +1 -8
- package/src/runtime-driver-state.mjs +1 -12
- package/src/runtime-gate-store.mjs +1 -8
- package/src/runtime-lifecycle-lock.mjs +1 -8
- package/src/runtime-multi-epoch-store.mjs +1 -12
- package/src/runtime-pull-intake.mjs +1 -8
- package/src/runtime-scripted-adapter-controller.mjs +2 -10
- package/src/runtime-work-order-controller.mjs +2 -10
- package/src/todo-migration.mjs +1 -1
- package/src/todo-note-store.mjs +2 -6
- package/src/todo-store.mjs +2 -14
package/src/todo-note-store.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createHash, randomBytes } from 'node:crypto';
|
|
2
|
+
import { fsyncDirectory } from './fs-dir-sync.mjs';
|
|
2
3
|
import {
|
|
3
4
|
mkdir, open, readFile, readdir, rename, rm, stat,
|
|
4
5
|
} from 'node:fs/promises';
|
|
@@ -193,12 +194,7 @@ async function atomicWrite(ref, bytes) {
|
|
|
193
194
|
await handle.close();
|
|
194
195
|
handle = null;
|
|
195
196
|
await rename(temporary, ref);
|
|
196
|
-
|
|
197
|
-
// Windowsはdirectory handleのfsyncを許さず常にEPERM/EINVALを返す(Node仕様)。
|
|
198
|
-
// win32のこの2値だけ許容し、他OS・他エラーは従来どおり失敗させる。
|
|
199
|
-
try { await directory.sync(); } catch (error) {
|
|
200
|
-
if (process.platform !== 'win32' || !['EPERM', 'EINVAL'].includes(error?.code)) throw error;
|
|
201
|
-
} finally { await directory.close(); }
|
|
197
|
+
await fsyncDirectory(path.dirname(ref));
|
|
202
198
|
} finally {
|
|
203
199
|
if (handle) await handle.close();
|
|
204
200
|
await rm(temporary, { force: true });
|
package/src/todo-store.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { randomBytes } from 'node:crypto';
|
|
2
|
+
import { fsyncDirectory } from './fs-dir-sync.mjs';
|
|
2
3
|
import {
|
|
3
4
|
lstat, mkdir, open, readFile, readdir, realpath, rename, rm, rmdir,
|
|
4
5
|
} from 'node:fs/promises';
|
|
@@ -1654,12 +1655,7 @@ async function atomicWrite(absolute, bytes) {
|
|
|
1654
1655
|
}
|
|
1655
1656
|
await handle.close(); handle = null;
|
|
1656
1657
|
await rename(temporary, absolute);
|
|
1657
|
-
|
|
1658
|
-
// Windowsはdirectory handleのfsyncを許さず常にEPERM/EINVALを返す(Node仕様)。
|
|
1659
|
-
// win32のこの2値だけ許容し、他OS・他エラーは従来どおり失敗させる。
|
|
1660
|
-
try { await directory.sync(); } catch (error) {
|
|
1661
|
-
if (process.platform !== 'win32' || !['EPERM', 'EINVAL'].includes(error?.code)) throw error;
|
|
1662
|
-
} finally { await directory.close(); }
|
|
1658
|
+
await fsyncDirectory(path.dirname(absolute));
|
|
1663
1659
|
} finally {
|
|
1664
1660
|
if (handle) await handle.close();
|
|
1665
1661
|
await rm(temporary, { force: true });
|
|
@@ -1687,14 +1683,6 @@ async function atomicWriteMode(absolute, bytes, mode) {
|
|
|
1687
1683
|
}
|
|
1688
1684
|
}
|
|
1689
1685
|
|
|
1690
|
-
async function fsyncDirectory(absolute) {
|
|
1691
|
-
const directory = await open(absolute, 'r');
|
|
1692
|
-
// Windowsはdirectory handleのfsyncを許さず常にEPERM/EINVALを返す(Node仕様)。
|
|
1693
|
-
// win32のこの2値だけ許容し、他OS・他エラーは従来どおり失敗させる。
|
|
1694
|
-
try { await directory.sync(); } catch (error) {
|
|
1695
|
-
if (process.platform !== 'win32' || !['EPERM', 'EINVAL'].includes(error?.code)) throw error;
|
|
1696
|
-
} finally { await directory.close(); }
|
|
1697
|
-
}
|
|
1698
1686
|
|
|
1699
1687
|
async function createWriteLock(lockRef, { recordOwner = false } = {}) {
|
|
1700
1688
|
const handle = await open(lockRef, 'wx', 0o600);
|