@quolu/lattice 0.52.0 → 0.52.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.
Files changed (182) hide show
  1. package/LICENSE +147 -147
  2. package/README.ja.md +355 -355
  3. package/README.md +258 -258
  4. package/bin/lattice-mcp.mjs +0 -0
  5. package/bin/lattice-scripted-adapter.mjs +0 -0
  6. package/bin/lattice-scripted-worker.mjs +0 -0
  7. package/bin/lattice-work-order-adapter.mjs +0 -0
  8. package/bin/lattice.mjs +0 -0
  9. package/docs/bridge-setup.md +132 -132
  10. package/docs/schemas/lattice.executor_packet.v1.schema.json +57 -57
  11. package/docs/schemas/lattice.executor_receipt.v1.schema.json +66 -66
  12. package/docs/schemas/lattice.phase_todo_revision.v3.schema.json +360 -360
  13. package/docs/schemas/lattice.plan_create_input.v1.schema.json +56 -56
  14. package/docs/schemas/lattice.plan_create_input.v2.schema.json +72 -72
  15. package/docs/schemas/lattice.plan_create_input.v3.schema.json +81 -81
  16. package/docs/schemas/lattice.plan_create_input.v4.schema.json +85 -85
  17. package/docs/schemas/lattice.run_request.v1.schema.json +238 -238
  18. package/docs/schemas/lattice.runtime_adapter_capabilities.v2.schema.json +55 -55
  19. package/docs/schemas/lattice.runtime_adapter_registration_input.v1.schema.json +78 -78
  20. package/docs/schemas/lattice.runtime_adapter_registration_input.v2.schema.json +86 -86
  21. package/docs/schemas/lattice.todo_extraction.v2.schema.json +298 -298
  22. package/docs/schemas/lattice.todo_extraction.v3.schema.json +146 -146
  23. package/docs/schemas/lattice.todo_revision.v2.schema.json +260 -260
  24. package/docs/schemas/lattice.todo_revision_set.v3.schema.json +363 -363
  25. package/package.json +103 -103
  26. package/sensor/LICENSE +21 -21
  27. package/sensor/NOTICE +19 -19
  28. package/sensor/dist/bin/lattice-sensor.js +9 -9
  29. package/sensor/dist/db/index.js +24 -24
  30. package/sensor/dist/db/migrations.js +41 -41
  31. package/sensor/dist/db/queries.js +164 -164
  32. package/sensor/dist/db/schema.sql +205 -205
  33. package/sensor/dist/directory.js +5 -5
  34. package/sensor/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
  35. package/sensor/dist/extraction/wasm/tree-sitter-cfml.wasm +0 -0
  36. package/sensor/dist/extraction/wasm/tree-sitter-cfquery.wasm +0 -0
  37. package/sensor/dist/extraction/wasm/tree-sitter-cfscript.wasm +0 -0
  38. package/sensor/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
  39. package/sensor/dist/extraction/wasm/tree-sitter-erlang.wasm +0 -0
  40. package/sensor/dist/extraction/wasm/tree-sitter-go.wasm +0 -0
  41. package/sensor/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
  42. package/sensor/dist/extraction/wasm/tree-sitter-javascript.wasm +0 -0
  43. package/sensor/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
  44. package/sensor/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
  45. package/sensor/dist/extraction/wasm/tree-sitter-python.wasm +0 -0
  46. package/sensor/dist/extraction/wasm/tree-sitter-tsx.wasm +0 -0
  47. package/sensor/dist/extraction/wasm/tree-sitter-typescript.wasm +0 -0
  48. package/sensor/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
  49. package/sensor/dist/mcp/liveness-watchdog.js +53 -53
  50. package/sensor/dist/mcp/server-instructions.js +95 -95
  51. package/sensor/package.json +56 -56
  52. package/src/artifact-contracts-v2.mjs +325 -325
  53. package/src/artifact-contracts.mjs +895 -895
  54. package/src/boundary-compiler.mjs +712 -712
  55. package/src/boundary-observation-compiler-v2.mjs +344 -344
  56. package/src/bounded-seam.mjs +230 -230
  57. package/src/bridge-address.mjs +107 -107
  58. package/src/bridge-cli.mjs +297 -297
  59. package/src/bridge-config.mjs +346 -346
  60. package/src/bridge-daemon.mjs +378 -378
  61. package/src/bridge-launch-agent.mjs +323 -323
  62. package/src/bridge-registrar.mjs +102 -102
  63. package/src/bridge-server.mjs +376 -376
  64. package/src/cli-help.mjs +308 -308
  65. package/src/cli-stdio.mjs +40 -40
  66. package/src/control-compiler.mjs +532 -532
  67. package/src/dag-chain.mjs +261 -261
  68. package/src/factory-diagnostics.mjs +188 -188
  69. package/src/hash-chain.mjs +76 -76
  70. package/src/hooks-cli.mjs +1057 -1053
  71. package/src/isolation-runner.mjs +409 -409
  72. package/src/node-version-guard.mjs +44 -44
  73. package/src/project-cli.mjs +697 -697
  74. package/src/project-identity.mjs +130 -130
  75. package/src/rc1-black-box-oracle.mjs +906 -906
  76. package/src/rc1-comparison.mjs +154 -154
  77. package/src/rc1-evidence-bundle.mjs +456 -456
  78. package/src/rc1-v4-campaign.mjs +708 -708
  79. package/src/rc1-v4-transform.mjs +467 -467
  80. package/src/rc1-v5-artifact-set.mjs +855 -855
  81. package/src/rc1-v5-behavior-evidence.mjs +594 -594
  82. package/src/rc1-v5-campaign.mjs +797 -797
  83. package/src/rc1-v5-transform.mjs +421 -421
  84. package/src/rc1-v6-artifact-set.mjs +807 -807
  85. package/src/rc1-v6-behavior-evidence.mjs +273 -273
  86. package/src/rc1-v6-campaign.mjs +623 -623
  87. package/src/rc1-v6-causal-binding.mjs +473 -473
  88. package/src/rc1-v6-measurement.mjs +313 -313
  89. package/src/rc2-artifact-set.mjs +1584 -1584
  90. package/src/rc2-campaign.mjs +1506 -1502
  91. package/src/rc2-delivery-policy-front-end.mjs +1079 -1079
  92. package/src/rc2-delivery-policy-oracle.mjs +134 -134
  93. package/src/rc2-delivery-policy-transform.mjs +1127 -1127
  94. package/src/rc2-rc1-transfer-front-end.mjs +511 -511
  95. package/src/rc3-actual-dogfood.mjs +652 -652
  96. package/src/rc3-dogfood-scaffold.mjs +315 -315
  97. package/src/rc3-scripted-campaign.mjs +1383 -1383
  98. package/src/rc4-stage1-dogfood.mjs +673 -673
  99. package/src/runtime-adapter-registry.mjs +524 -520
  100. package/src/runtime-cli.mjs +4588 -4584
  101. package/src/runtime-contracts.mjs +824 -824
  102. package/src/runtime-control-store.mjs +604 -600
  103. package/src/runtime-controller-protocol.mjs +587 -587
  104. package/src/runtime-decision-verifier.mjs +701 -701
  105. package/src/runtime-diff-observer.mjs +361 -361
  106. package/src/runtime-direct-os-observer.mjs +301 -301
  107. package/src/runtime-driver-state.mjs +166 -162
  108. package/src/runtime-engine.mjs +779 -779
  109. package/src/runtime-errors.mjs +356 -356
  110. package/src/runtime-event-store.mjs +189 -189
  111. package/src/runtime-front-end.mjs +925 -925
  112. package/src/runtime-gate-store.mjs +481 -477
  113. package/src/runtime-hold-recompile.mjs +916 -916
  114. package/src/runtime-io-sentinel.mjs +391 -391
  115. package/src/runtime-lifecycle-lock.mjs +294 -290
  116. package/src/runtime-managed-supervisor.mjs +1490 -1490
  117. package/src/runtime-multi-epoch-store.mjs +838 -834
  118. package/src/runtime-projection.mjs +269 -269
  119. package/src/runtime-pull-intake.mjs +1192 -1188
  120. package/src/runtime-scripted-adapter-controller.mjs +1160 -1156
  121. package/src/runtime-scripted-executor.mjs +163 -163
  122. package/src/runtime-scripted-worktree.mjs +104 -104
  123. package/src/runtime-seam-resolve.mjs +428 -428
  124. package/src/runtime-seam-treatment.mjs +173 -173
  125. package/src/runtime-socket-owner.mjs +125 -125
  126. package/src/runtime-work-order-contracts.mjs +91 -91
  127. package/src/runtime-work-order-controller.mjs +1171 -1167
  128. package/src/runtime-worktree-executor.mjs +199 -199
  129. package/src/schedulability-compiler-v2.mjs +303 -303
  130. package/src/schedulability-verifier-v2.mjs +317 -317
  131. package/src/seam-apply.mjs +549 -549
  132. package/src/seam-commit-shared.mjs +22 -22
  133. package/src/seam-commit-transform.mjs +81 -81
  134. package/src/seam-commit.mjs +18 -18
  135. package/src/seam-cost.mjs +322 -322
  136. package/src/seam-derivation.mjs +188 -188
  137. package/src/seam-gate.mjs +146 -146
  138. package/src/seam-proposal-contracts.mjs +446 -446
  139. package/src/seam-proposal-queries.mjs +521 -521
  140. package/src/seam-proposal.mjs +2011 -2011
  141. package/src/seam-ref.mjs +33 -33
  142. package/src/seam-rewrite.mjs +286 -286
  143. package/src/seam-transform.mjs +554 -554
  144. package/src/seam-verification.mjs +260 -260
  145. package/src/sensor-adapter.mjs +432 -432
  146. package/src/sensor-cli.mjs +139 -139
  147. package/src/sensor-diff.mjs +661 -661
  148. package/src/sensor-node-runtime.mjs +53 -53
  149. package/src/sensor-runtime.mjs +52 -52
  150. package/src/timestamp-contract.mjs +8 -8
  151. package/src/todo-audit-pending.mjs +91 -91
  152. package/src/todo-chain.mjs +178 -178
  153. package/src/todo-cli.mjs +3141 -3126
  154. package/src/todo-contracts.mjs +728 -728
  155. package/src/todo-dashboard-registry.mjs +573 -573
  156. package/src/todo-dispatch-shape.mjs +190 -190
  157. package/src/todo-gantt-html-independence.mjs +239 -239
  158. package/src/todo-gantt-html-shared.mjs +226 -226
  159. package/src/todo-gantt-html-style.mjs +131 -131
  160. package/src/todo-gantt-html.mjs +248 -248
  161. package/src/todo-gantt-layout.mjs +974 -974
  162. package/src/todo-gantt-live.mjs +361 -361
  163. package/src/todo-gantt-nested.mjs +263 -263
  164. package/src/todo-gantt-presentation.mjs +217 -217
  165. package/src/todo-gantt-scope.mjs +123 -123
  166. package/src/todo-gantt-svg.mjs +353 -353
  167. package/src/todo-independence-contracts.mjs +595 -595
  168. package/src/todo-independence-guidance.mjs +322 -322
  169. package/src/todo-independence.mjs +640 -640
  170. package/src/todo-markdown-renderer.mjs +260 -260
  171. package/src/todo-migration.mjs +448 -448
  172. package/src/todo-narrative-anchor.mjs +130 -130
  173. package/src/todo-note-store.mjs +629 -625
  174. package/src/todo-parallel-candidates.mjs +114 -114
  175. package/src/todo-revision.mjs +995 -995
  176. package/src/todo-split.mjs +472 -472
  177. package/src/todo-status.mjs +690 -690
  178. package/src/todo-store-git-transaction.mjs +418 -418
  179. package/src/todo-store.mjs +4322 -4314
  180. package/src/treatment-compiler.mjs +728 -728
  181. package/src/treatment-runner.mjs +656 -656
  182. package/src/witness-scaffold.mjs +180 -180
package/package.json CHANGED
@@ -1,103 +1,103 @@
1
- {
2
- "name": "@quolu/lattice",
3
- "version": "0.52.0",
4
- "description": "Schedulability compiler for multi-agent development: observe real code boundaries, refactor the conflicting seam, recompile the plan for parallel execution",
5
- "author": {
6
- "name": "Quo / クオ at kitepon.dev",
7
- "url": "https://kitepon.dev/"
8
- },
9
- "type": "module",
10
- "license": "PolyForm-Noncommercial-1.0.0",
11
- "repository": {
12
- "type": "git",
13
- "url": "git+https://github.com/kitepon-rgb/Lattice.git"
14
- },
15
- "engines": {
16
- "node": ">=22.13 <25 || >=26"
17
- },
18
- "bin": {
19
- "lattice": "bin/lattice.mjs",
20
- "lattice-mcp": "bin/lattice-mcp.mjs",
21
- "lattice-scripted-adapter": "bin/lattice-scripted-adapter.mjs",
22
- "lattice-work-order-adapter": "bin/lattice-work-order-adapter.mjs"
23
- },
24
- "files": [
25
- "bin",
26
- "bin/lattice-scripted-adapter.mjs",
27
- "src",
28
- "docs/schemas/lattice.plan_create_input.v1.schema.json",
29
- "docs/schemas/lattice.plan_create_input.v2.schema.json",
30
- "docs/schemas/lattice.plan_create_input.v3.schema.json",
31
- "docs/schemas/lattice.plan_create_input.v4.schema.json",
32
- "docs/schemas/lattice.todo_revision.v2.schema.json",
33
- "docs/schemas/lattice.todo_revision_set.v3.schema.json",
34
- "docs/schemas/lattice.phase_todo_revision.v3.schema.json",
35
- "docs/schemas/lattice.todo_extraction.v2.schema.json",
36
- "docs/schemas/lattice.todo_extraction.v3.schema.json",
37
- "docs/schemas/lattice.run_request.v1.schema.json",
38
- "docs/schemas/lattice.executor_packet.v1.schema.json",
39
- "docs/schemas/lattice.executor_receipt.v1.schema.json",
40
- "docs/schemas/lattice.runtime_adapter_registration_input.v1.schema.json",
41
- "docs/schemas/lattice.runtime_adapter_registration_input.v2.schema.json",
42
- "docs/schemas/lattice.runtime_adapter_capabilities.v2.schema.json",
43
- "docs/bridge-setup.md",
44
- "sensor/dist",
45
- "!sensor/dist/bin/lattice-sensor.*",
46
- "sensor/dist/bin/lattice-sensor.js",
47
- "sensor/package.json",
48
- "sensor/LICENSE",
49
- "sensor/NOTICE"
50
- ],
51
- "publishConfig": {
52
- "access": "public"
53
- },
54
- "dependencies": {
55
- "@clack/prompts": "^1.3.0",
56
- "commander": "^14.0.2",
57
- "fast-string-width": "^3.0.2",
58
- "fast-wrap-ansi": "^0.2.0",
59
- "ignore": "^7.0.5",
60
- "jsonc-parser": "^3.3.1",
61
- "picomatch": "^4.0.3",
62
- "remark-gfm": "^4.0.1",
63
- "remark-parse": "^11.0.0",
64
- "sisteransi": "^1.0.5",
65
- "tree-sitter-wasms": "^0.1.11",
66
- "unified": "^11.0.5",
67
- "web-tree-sitter": "^0.25.3"
68
- },
69
- "scripts": {
70
- "prepack": "npm --prefix sensor run build",
71
- "verify:release-commit": "node scripts/verify-release-commit.mjs",
72
- "prepublishOnly": "npm run verify:release-commit",
73
- "test": "node scripts/run-product-tests.mjs",
74
- "test:sensor": "npm --prefix sensor test",
75
- "check": "node scripts/check-syntax.mjs",
76
- "ci": "npm run test && npm run test:sensor && npm run check && npm run check:cli-surface && npm run check:open-questions && npm run check:reachability && npm run verify:todo-store",
77
- "verify:todo-store": "node bin/lattice.mjs todo verify --json",
78
- "check:cli-surface": "node scripts/verify-cli-surface.mjs",
79
- "check:open-questions": "node scripts/verify-open-questions.mjs",
80
- "check:reachability": "node scripts/verify-product-reachability.mjs",
81
- "upstream:check": "node scripts/upstream-check.mjs",
82
- "upstream:sync": "node scripts/upstream-sync.mjs"
83
- },
84
- "homepage": "https://github.com/kitepon-rgb/Lattice#readme",
85
- "bugs": {
86
- "url": "https://github.com/kitepon-rgb/Lattice/issues"
87
- },
88
- "keywords": [
89
- "ai",
90
- "agent",
91
- "multi-agent",
92
- "claude",
93
- "codex",
94
- "orchestration",
95
- "parallel",
96
- "refactoring",
97
- "code-analysis",
98
- "dependency-graph",
99
- "scheduling",
100
- "cli",
101
- "mcp"
102
- ]
103
- }
1
+ {
2
+ "name": "@quolu/lattice",
3
+ "version": "0.52.2",
4
+ "description": "Schedulability compiler for multi-agent development: observe real code boundaries, refactor the conflicting seam, recompile the plan for parallel execution",
5
+ "author": {
6
+ "name": "Quo / クオ at kitepon.dev",
7
+ "url": "https://kitepon.dev/"
8
+ },
9
+ "type": "module",
10
+ "license": "PolyForm-Noncommercial-1.0.0",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/kitepon-rgb/Lattice.git"
14
+ },
15
+ "engines": {
16
+ "node": ">=22.13 <25 || >=26"
17
+ },
18
+ "bin": {
19
+ "lattice": "bin/lattice.mjs",
20
+ "lattice-mcp": "bin/lattice-mcp.mjs",
21
+ "lattice-scripted-adapter": "bin/lattice-scripted-adapter.mjs",
22
+ "lattice-work-order-adapter": "bin/lattice-work-order-adapter.mjs"
23
+ },
24
+ "files": [
25
+ "bin",
26
+ "bin/lattice-scripted-adapter.mjs",
27
+ "src",
28
+ "docs/schemas/lattice.plan_create_input.v1.schema.json",
29
+ "docs/schemas/lattice.plan_create_input.v2.schema.json",
30
+ "docs/schemas/lattice.plan_create_input.v3.schema.json",
31
+ "docs/schemas/lattice.plan_create_input.v4.schema.json",
32
+ "docs/schemas/lattice.todo_revision.v2.schema.json",
33
+ "docs/schemas/lattice.todo_revision_set.v3.schema.json",
34
+ "docs/schemas/lattice.phase_todo_revision.v3.schema.json",
35
+ "docs/schemas/lattice.todo_extraction.v2.schema.json",
36
+ "docs/schemas/lattice.todo_extraction.v3.schema.json",
37
+ "docs/schemas/lattice.run_request.v1.schema.json",
38
+ "docs/schemas/lattice.executor_packet.v1.schema.json",
39
+ "docs/schemas/lattice.executor_receipt.v1.schema.json",
40
+ "docs/schemas/lattice.runtime_adapter_registration_input.v1.schema.json",
41
+ "docs/schemas/lattice.runtime_adapter_registration_input.v2.schema.json",
42
+ "docs/schemas/lattice.runtime_adapter_capabilities.v2.schema.json",
43
+ "docs/bridge-setup.md",
44
+ "sensor/dist",
45
+ "!sensor/dist/bin/lattice-sensor.*",
46
+ "sensor/dist/bin/lattice-sensor.js",
47
+ "sensor/package.json",
48
+ "sensor/LICENSE",
49
+ "sensor/NOTICE"
50
+ ],
51
+ "publishConfig": {
52
+ "access": "public"
53
+ },
54
+ "dependencies": {
55
+ "@clack/prompts": "^1.3.0",
56
+ "commander": "^14.0.2",
57
+ "fast-string-width": "^3.0.2",
58
+ "fast-wrap-ansi": "^0.2.0",
59
+ "ignore": "^7.0.5",
60
+ "jsonc-parser": "^3.3.1",
61
+ "picomatch": "^4.0.3",
62
+ "remark-gfm": "^4.0.1",
63
+ "remark-parse": "^11.0.0",
64
+ "sisteransi": "^1.0.5",
65
+ "tree-sitter-wasms": "^0.1.11",
66
+ "unified": "^11.0.5",
67
+ "web-tree-sitter": "^0.25.3"
68
+ },
69
+ "scripts": {
70
+ "prepack": "npm --prefix sensor run build",
71
+ "verify:release-commit": "node scripts/verify-release-commit.mjs",
72
+ "prepublishOnly": "npm run verify:release-commit",
73
+ "test": "node scripts/run-product-tests.mjs",
74
+ "test:sensor": "npm --prefix sensor test",
75
+ "check": "node scripts/check-syntax.mjs",
76
+ "ci": "npm run test && npm run test:sensor && npm run check && npm run check:cli-surface && npm run check:open-questions && npm run check:reachability && npm run verify:todo-store",
77
+ "verify:todo-store": "node bin/lattice.mjs todo verify --json",
78
+ "check:cli-surface": "node scripts/verify-cli-surface.mjs",
79
+ "check:open-questions": "node scripts/verify-open-questions.mjs",
80
+ "check:reachability": "node scripts/verify-product-reachability.mjs",
81
+ "upstream:check": "node scripts/upstream-check.mjs",
82
+ "upstream:sync": "node scripts/upstream-sync.mjs"
83
+ },
84
+ "homepage": "https://github.com/kitepon-rgb/Lattice#readme",
85
+ "bugs": {
86
+ "url": "https://github.com/kitepon-rgb/Lattice/issues"
87
+ },
88
+ "keywords": [
89
+ "ai",
90
+ "agent",
91
+ "multi-agent",
92
+ "claude",
93
+ "codex",
94
+ "orchestration",
95
+ "parallel",
96
+ "refactoring",
97
+ "code-analysis",
98
+ "dependency-graph",
99
+ "scheduling",
100
+ "cli",
101
+ "mcp"
102
+ ]
103
+ }
package/sensor/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Colby Mchenry
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Colby Mchenry
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/sensor/NOTICE CHANGED
@@ -1,19 +1,19 @@
1
- # NOTICE — sensor/ の出自
2
-
3
- このディレクトリは CodeGraph (https://github.com/colbymchenry/codegraph) を
4
- Lattice の構造 sensor として吸収したものである(Lattice ADR 0047 / 0048)。
5
-
6
- - upstream: @colbymchenry/codegraph(MIT License — 同梱の LICENSE を保持)
7
- - 吸収時点: upstream commit 04ab45c91fff97263d2d305ecb2908bce80bd159 (2026-07-17)
8
- - 取り込み方法: `git archive`(pristine tree。改変は吸収後の履歴が持つ)
9
- - 取り込み時の唯一の改変: upstream `CLAUDE.md` → `docs/UPSTREAM-CLAUDE.md` へ移動
10
- (Lattice 内での AI セッションへ upstream 正典が自動注入されるのを防ぐ。内容は不変)
11
- ## upstream 追従方針(ADR 0155・オーナー裁定 2026-08-03)
12
-
13
- - 既定は**全量 3-way merge**。貰えるものは全部取り込む。旧方針(選択的 cherry-pick・
14
- 必要駆動の監視)は54コミット溜めた実績をもって廃止した(経緯は ADR 0155)。
15
- - 正本は `sensor/UPSTREAM.json`(同期点 synced_at・path 写像・skip・衝突方針・削除承認)。
16
- - 追従は `npm run upstream:sync`(衝突後は解決 → commit → `--mark-synced`)、
17
- 検知は週次の `.github/workflows/upstream-check.yml` と `npm run upstream:check`。
18
- - 取り込み履歴は UPSTREAM.json の synced_at と git 履歴が持つ(本 NOTICE には重複記録しない)。
19
- 現在の同期点: 49c11fc(2026-08-03、54コミット消化・kernel 20言語化)。
1
+ # NOTICE — sensor/ の出自
2
+
3
+ このディレクトリは CodeGraph (https://github.com/colbymchenry/codegraph) を
4
+ Lattice の構造 sensor として吸収したものである(Lattice ADR 0047 / 0048)。
5
+
6
+ - upstream: @colbymchenry/codegraph(MIT License — 同梱の LICENSE を保持)
7
+ - 吸収時点: upstream commit 04ab45c91fff97263d2d305ecb2908bce80bd159 (2026-07-17)
8
+ - 取り込み方法: `git archive`(pristine tree。改変は吸収後の履歴が持つ)
9
+ - 取り込み時の唯一の改変: upstream `CLAUDE.md` → `docs/UPSTREAM-CLAUDE.md` へ移動
10
+ (Lattice 内での AI セッションへ upstream 正典が自動注入されるのを防ぐ。内容は不変)
11
+ ## upstream 追従方針(ADR 0155・オーナー裁定 2026-08-03)
12
+
13
+ - 既定は**全量 3-way merge**。貰えるものは全部取り込む。旧方針(選択的 cherry-pick・
14
+ 必要駆動の監視)は54コミット溜めた実績をもって廃止した(経緯は ADR 0155)。
15
+ - 正本は `sensor/UPSTREAM.json`(同期点 synced_at・path 写像・skip・衝突方針・削除承認)。
16
+ - 追従は `npm run upstream:sync`(衝突後は解決 → commit → `--mark-synced`)、
17
+ 検知は週次の `.github/workflows/upstream-check.yml` と `npm run upstream:check`。
18
+ - 取り込み履歴は UPSTREAM.json の synced_at と git 履歴が持つ(本 NOTICE には重複記録しない)。
19
+ 現在の同期点: 49c11fc(2026-08-03、54コミット消化・kernel 20言語化)。
@@ -1741,15 +1741,15 @@ function main() {
1741
1741
  console.error(chalk.bold('\nLatticeSensor MCP Server\n'));
1742
1742
  console.error(chalk.blue((0, glyphs_1.getGlyphs)().info) + ' Use --mcp flag to start the MCP server');
1743
1743
  console.error('\nTo use with Claude Code, add to your MCP configuration:');
1744
- console.error(chalk.dim(`
1745
- {
1746
- "mcpServers": {
1747
- "lattice-sensor": {
1748
- "command": "lattice-sensor",
1749
- "args": ["serve", "--mcp"]
1750
- }
1751
- }
1752
- }
1744
+ console.error(chalk.dim(`
1745
+ {
1746
+ "mcpServers": {
1747
+ "lattice-sensor": {
1748
+ "command": "lattice-sensor",
1749
+ "args": ["serve", "--mcp"]
1750
+ }
1751
+ }
1752
+ }
1753
1753
  `));
1754
1754
  console.error('Available tools:');
1755
1755
  console.error(chalk.cyan(' lattice_sensor_explore') + ' - Primary: source of the relevant symbols for any question');
@@ -584,21 +584,21 @@ class DatabaseConnection {
584
584
  }
585
585
  try {
586
586
  const { Worker } = await Promise.resolve().then(() => __importStar(require('node:worker_threads')));
587
- const workerSource = `
588
- const { workerData, parentPort } = require('node:worker_threads');
589
- let row = null;
590
- let err = null;
591
- try {
592
- const { DatabaseSync } = require('node:sqlite');
593
- const db = new DatabaseSync(workerData.dbPath);
594
- const mode = workerData.mode === 'TRUNCATE' ? 'TRUNCATE' : 'PASSIVE';
595
- try {
596
- if (mode === 'TRUNCATE') db.exec('PRAGMA busy_timeout = 2000');
597
- row = db.prepare('PRAGMA wal_checkpoint(' + mode + ')').get();
598
- } catch (e) { err = String(e && e.message || e); }
599
- try { db.close(); } catch {}
600
- } catch (e) { err = err || String(e && e.message || e); }
601
- parentPort.postMessage({ row, err });
587
+ const workerSource = `
588
+ const { workerData, parentPort } = require('node:worker_threads');
589
+ let row = null;
590
+ let err = null;
591
+ try {
592
+ const { DatabaseSync } = require('node:sqlite');
593
+ const db = new DatabaseSync(workerData.dbPath);
594
+ const mode = workerData.mode === 'TRUNCATE' ? 'TRUNCATE' : 'PASSIVE';
595
+ try {
596
+ if (mode === 'TRUNCATE') db.exec('PRAGMA busy_timeout = 2000');
597
+ row = db.prepare('PRAGMA wal_checkpoint(' + mode + ')').get();
598
+ } catch (e) { err = String(e && e.message || e); }
599
+ try { db.close(); } catch {}
600
+ } catch (e) { err = err || String(e && e.message || e); }
601
+ parentPort.postMessage({ row, err });
602
602
  `;
603
603
  return await new Promise((resolve) => {
604
604
  let settled = false;
@@ -693,15 +693,15 @@ class DatabaseConnection {
693
693
  async runPragmasOffThread(pragmas, inlineFallback = []) {
694
694
  try {
695
695
  const { Worker } = await Promise.resolve().then(() => __importStar(require('node:worker_threads')));
696
- const workerSource = `
697
- const { workerData, parentPort } = require('node:worker_threads');
698
- try {
699
- const { DatabaseSync } = require('node:sqlite');
700
- const db = new DatabaseSync(workerData.dbPath);
701
- for (const p of workerData.pragmas) { try { db.exec(p); } catch {} }
702
- try { db.close(); } catch {}
703
- } catch {}
704
- parentPort.postMessage('done');
696
+ const workerSource = `
697
+ const { workerData, parentPort } = require('node:worker_threads');
698
+ try {
699
+ const { DatabaseSync } = require('node:sqlite');
700
+ const db = new DatabaseSync(workerData.dbPath);
701
+ for (const p of workerData.pragmas) { try { db.exec(p); } catch {} }
702
+ try { db.close(); } catch {}
703
+ } catch {}
704
+ parentPort.postMessage('done');
705
705
  `;
706
706
  await new Promise((resolve) => {
707
707
  let settled = false;
@@ -26,17 +26,17 @@ const migrations = [
26
26
  version: 2,
27
27
  description: 'Add project metadata, provenance tracking, and unresolved ref context',
28
28
  up: (db) => {
29
- db.exec(`
30
- CREATE TABLE IF NOT EXISTS project_metadata (
31
- key TEXT PRIMARY KEY,
32
- value TEXT NOT NULL,
33
- updated_at INTEGER NOT NULL
34
- );
35
- ALTER TABLE unresolved_refs ADD COLUMN file_path TEXT NOT NULL DEFAULT '';
36
- ALTER TABLE unresolved_refs ADD COLUMN language TEXT NOT NULL DEFAULT 'unknown';
37
- ALTER TABLE edges ADD COLUMN provenance TEXT DEFAULT NULL;
38
- CREATE INDEX IF NOT EXISTS idx_unresolved_file_path ON unresolved_refs(file_path);
39
- CREATE INDEX IF NOT EXISTS idx_edges_provenance ON edges(provenance);
29
+ db.exec(`
30
+ CREATE TABLE IF NOT EXISTS project_metadata (
31
+ key TEXT PRIMARY KEY,
32
+ value TEXT NOT NULL,
33
+ updated_at INTEGER NOT NULL
34
+ );
35
+ ALTER TABLE unresolved_refs ADD COLUMN file_path TEXT NOT NULL DEFAULT '';
36
+ ALTER TABLE unresolved_refs ADD COLUMN language TEXT NOT NULL DEFAULT 'unknown';
37
+ ALTER TABLE edges ADD COLUMN provenance TEXT DEFAULT NULL;
38
+ CREATE INDEX IF NOT EXISTS idx_unresolved_file_path ON unresolved_refs(file_path);
39
+ CREATE INDEX IF NOT EXISTS idx_edges_provenance ON edges(provenance);
40
40
  `);
41
41
  },
42
42
  },
@@ -44,8 +44,8 @@ const migrations = [
44
44
  version: 3,
45
45
  description: 'Add lower(name) expression index for memory-efficient case-insensitive lookups',
46
46
  up: (db) => {
47
- db.exec(`
48
- CREATE INDEX IF NOT EXISTS idx_nodes_lower_name ON nodes(lower(name));
47
+ db.exec(`
48
+ CREATE INDEX IF NOT EXISTS idx_nodes_lower_name ON nodes(lower(name));
49
49
  `);
50
50
  },
51
51
  },
@@ -53,9 +53,9 @@ const migrations = [
53
53
  version: 4,
54
54
  description: 'Drop redundant idx_edges_source / idx_edges_target (covered by source_kind / target_kind composites)',
55
55
  up: (db) => {
56
- db.exec(`
57
- DROP INDEX IF EXISTS idx_edges_source;
58
- DROP INDEX IF EXISTS idx_edges_target;
56
+ db.exec(`
57
+ DROP INDEX IF EXISTS idx_edges_source;
58
+ DROP INDEX IF EXISTS idx_edges_target;
59
59
  `);
60
60
  },
61
61
  },
@@ -63,8 +63,8 @@ const migrations = [
63
63
  version: 5,
64
64
  description: 'Add nodes.return_type — normalized return/result type for receiver-type inference (C++ singletons/factories, #645)',
65
65
  up: (db) => {
66
- db.exec(`
67
- ALTER TABLE nodes ADD COLUMN return_type TEXT;
66
+ db.exec(`
67
+ ALTER TABLE nodes ADD COLUMN return_type TEXT;
68
68
  `);
69
69
  },
70
70
  },
@@ -81,14 +81,14 @@ const migrations = [
81
81
  // and it MUST match the GROUP BY exactly, or the index creation would
82
82
  // fail on a pair the DELETE left behind. Idempotent: the index is
83
83
  // `IF NOT EXISTS` and the DELETE is a no-op once the table is unique.
84
- db.exec(`
85
- DELETE FROM edges
86
- WHERE id NOT IN (
87
- SELECT MIN(id) FROM edges
88
- GROUP BY source, target, kind, IFNULL(line, -1), IFNULL(col, -1)
89
- );
90
- CREATE UNIQUE INDEX IF NOT EXISTS idx_edges_identity
91
- ON edges(source, target, kind, IFNULL(line, -1), IFNULL(col, -1));
84
+ db.exec(`
85
+ DELETE FROM edges
86
+ WHERE id NOT IN (
87
+ SELECT MIN(id) FROM edges
88
+ GROUP BY source, target, kind, IFNULL(line, -1), IFNULL(col, -1)
89
+ );
90
+ CREATE UNIQUE INDEX IF NOT EXISTS idx_edges_identity
91
+ ON edges(source, target, kind, IFNULL(line, -1), IFNULL(col, -1));
92
92
  `);
93
93
  },
94
94
  },
@@ -101,12 +101,12 @@ const migrations = [
101
101
  // detects that over a populated graph and backfills batched+yielding
102
102
  // (LatticeSensor.rebuildNameSegmentVocab), and any full index rebuilds it
103
103
  // from scratch. Keep the definition in lockstep with schema.sql.
104
- db.exec(`
105
- CREATE TABLE IF NOT EXISTS name_segment_vocab (
106
- segment TEXT NOT NULL,
107
- name TEXT NOT NULL,
108
- PRIMARY KEY (segment, name)
109
- ) WITHOUT ROWID;
104
+ db.exec(`
105
+ CREATE TABLE IF NOT EXISTS name_segment_vocab (
106
+ segment TEXT NOT NULL,
107
+ name TEXT NOT NULL,
108
+ PRIMARY KEY (segment, name)
109
+ ) WITHOUT ROWID;
110
110
  `);
111
111
  },
112
112
  },
@@ -134,9 +134,9 @@ const migrations = [
134
134
  if (!hasColumn('name_tail')) {
135
135
  db.exec("ALTER TABLE unresolved_refs ADD COLUMN name_tail TEXT NOT NULL DEFAULT ''");
136
136
  }
137
- db.exec(`
138
- CREATE INDEX IF NOT EXISTS idx_unresolved_status ON unresolved_refs(status);
139
- CREATE INDEX IF NOT EXISTS idx_unresolved_failed_tail ON unresolved_refs(name_tail) WHERE status = 'failed';
137
+ db.exec(`
138
+ CREATE INDEX IF NOT EXISTS idx_unresolved_status ON unresolved_refs(status);
139
+ CREATE INDEX IF NOT EXISTS idx_unresolved_failed_tail ON unresolved_refs(name_tail) WHERE status = 'failed';
140
140
  `);
141
141
  },
142
142
  },
@@ -193,13 +193,13 @@ const migrations = [
193
193
  // Backfill from the JSON metadata every resolved edge already carries —
194
194
  // only new/re-resolved edges will populate the columns directly going
195
195
  // forward, so existing rows would otherwise read NULL forever.
196
- db.exec(`
197
- UPDATE edges SET confidence = json_extract(metadata, '$.confidence')
198
- WHERE metadata IS NOT NULL AND confidence IS NULL
196
+ db.exec(`
197
+ UPDATE edges SET confidence = json_extract(metadata, '$.confidence')
198
+ WHERE metadata IS NOT NULL AND confidence IS NULL
199
199
  `);
200
- db.exec(`
201
- UPDATE edges SET resolved_by = json_extract(metadata, '$.resolvedBy')
202
- WHERE metadata IS NOT NULL AND resolved_by IS NULL
200
+ db.exec(`
201
+ UPDATE edges SET resolved_by = json_extract(metadata, '$.resolvedBy')
202
+ WHERE metadata IS NOT NULL AND resolved_by IS NULL
203
203
  `);
204
204
  },
205
205
  },