speclock 4.5.3 → 4.5.4
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 +460 -460
- package/package.json +1 -1
- package/src/cli/index.js +1113 -1113
- package/src/core/compliance.js +1 -1
- package/src/core/conflict.js +9 -8
- package/src/core/telemetry.js +1 -1
- package/src/dashboard/index.html +2 -2
- package/src/mcp/http-server.js +1 -1
- package/src/mcp/server.js +1355 -1355
package/src/core/compliance.js
CHANGED
package/src/core/conflict.js
CHANGED
|
@@ -342,16 +342,15 @@ export async function checkConflictAsync(rootOrAction, proposedActionOrLock) {
|
|
|
342
342
|
|
|
343
343
|
/**
|
|
344
344
|
* Merge heuristic result with LLM/proxy result.
|
|
345
|
-
*
|
|
345
|
+
* Takes MAX(heuristic, LLM) confidence per lock — neither engine can override the other.
|
|
346
|
+
* The heuristic catches domain-specific patterns; the LLM catches cross-domain vocabulary.
|
|
346
347
|
*/
|
|
347
348
|
function mergeLLMResult(heuristicResult, llmResult) {
|
|
348
|
-
const
|
|
349
|
-
(c) => c.confidence > 70
|
|
350
|
-
);
|
|
349
|
+
const allHeuristic = heuristicResult.conflictingLocks || [];
|
|
351
350
|
const llmConflicts = llmResult.conflictingLocks || [];
|
|
352
|
-
const merged = [...
|
|
351
|
+
const merged = [...allHeuristic, ...llmConflicts];
|
|
353
352
|
|
|
354
|
-
// Deduplicate by lock text, keeping the higher-confidence entry
|
|
353
|
+
// Deduplicate by lock text, keeping the higher-confidence entry (MAX per lock)
|
|
355
354
|
const byText = new Map();
|
|
356
355
|
for (const c of merged) {
|
|
357
356
|
const existing = byText.get(c.text);
|
|
@@ -365,15 +364,17 @@ function mergeLLMResult(heuristicResult, llmResult) {
|
|
|
365
364
|
return {
|
|
366
365
|
hasConflict: false,
|
|
367
366
|
conflictingLocks: [],
|
|
368
|
-
analysis: `
|
|
367
|
+
analysis: `Both heuristic and LLM agree: no conflicts detected.`,
|
|
369
368
|
};
|
|
370
369
|
}
|
|
371
370
|
|
|
372
371
|
unique.sort((a, b) => b.confidence - a.confidence);
|
|
372
|
+
const heuristicCount = allHeuristic.filter(c => !llmConflicts.some(l => l.text === c.text)).length;
|
|
373
|
+
const llmOnlyCount = llmConflicts.filter(l => !allHeuristic.some(h => h.text === l.text)).length;
|
|
373
374
|
return {
|
|
374
375
|
hasConflict: true,
|
|
375
376
|
conflictingLocks: unique,
|
|
376
|
-
analysis: `${unique.length} conflict(s)
|
|
377
|
+
analysis: `${unique.length} conflict(s) detected (${heuristicCount} heuristic-only, ${llmOnlyCount} LLM-only, ${unique.length - heuristicCount - llmOnlyCount} both).`,
|
|
377
378
|
};
|
|
378
379
|
}
|
|
379
380
|
|
package/src/core/telemetry.js
CHANGED
|
@@ -257,7 +257,7 @@ export async function flushToRemote(root) {
|
|
|
257
257
|
// Build anonymized payload
|
|
258
258
|
const payload = {
|
|
259
259
|
instanceId: summary.instanceId,
|
|
260
|
-
version: "4.5.
|
|
260
|
+
version: "4.5.4",
|
|
261
261
|
totalCalls: summary.totalCalls,
|
|
262
262
|
avgResponseMs: summary.avgResponseMs,
|
|
263
263
|
conflicts: summary.conflicts,
|
package/src/dashboard/index.html
CHANGED
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
<div class="header">
|
|
90
90
|
<div>
|
|
91
91
|
<h1><span>SpecLock</span> Dashboard</h1>
|
|
92
|
-
<div class="meta">v4.5.
|
|
92
|
+
<div class="meta">v4.5.4 — AI Constraint Engine</div>
|
|
93
93
|
</div>
|
|
94
94
|
<div style="display:flex;align-items:center;gap:12px;">
|
|
95
95
|
<span id="health-badge" class="status-badge healthy">Loading...</span>
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
</div>
|
|
183
183
|
|
|
184
184
|
<div style="text-align:center;padding:24px;color:var(--muted);font-size:12px;">
|
|
185
|
-
SpecLock v4.5.
|
|
185
|
+
SpecLock v4.5.4 — Developed by Sandeep Roy — <a href="https://github.com/sgroy10/speclock" style="color:var(--accent)">GitHub</a>
|
|
186
186
|
</div>
|
|
187
187
|
|
|
188
188
|
<script>
|
package/src/mcp/http-server.js
CHANGED
|
@@ -91,7 +91,7 @@ import { fileURLToPath } from "url";
|
|
|
91
91
|
import _path from "path";
|
|
92
92
|
|
|
93
93
|
const PROJECT_ROOT = process.env.SPECLOCK_PROJECT_ROOT || process.cwd();
|
|
94
|
-
const VERSION = "4.5.
|
|
94
|
+
const VERSION = "4.5.4";
|
|
95
95
|
const AUTHOR = "Sandeep Roy";
|
|
96
96
|
const START_TIME = Date.now();
|
|
97
97
|
|