speclock 1.7.0 → 2.0.0
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 +28 -13
- package/package.json +2 -2
- package/src/cli/index.js +1 -1
- package/src/core/engine.js +37 -68
- package/src/core/llm-checker.js +239 -0
- package/src/core/semantics.js +1096 -0
- package/src/mcp/http-server.js +3 -2
- package/src/mcp/server.js +3 -2
package/src/mcp/http-server.js
CHANGED
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
updateDeployFacts,
|
|
20
20
|
logChange,
|
|
21
21
|
checkConflict,
|
|
22
|
+
checkConflictAsync,
|
|
22
23
|
getSessionBriefing,
|
|
23
24
|
endSession,
|
|
24
25
|
suggestLocks,
|
|
@@ -45,7 +46,7 @@ import {
|
|
|
45
46
|
} from "../core/git.js";
|
|
46
47
|
|
|
47
48
|
const PROJECT_ROOT = process.env.SPECLOCK_PROJECT_ROOT || process.cwd();
|
|
48
|
-
const VERSION = "
|
|
49
|
+
const VERSION = "2.0.0";
|
|
49
50
|
const AUTHOR = "Sandeep Roy";
|
|
50
51
|
|
|
51
52
|
function createSpecLockServer() {
|
|
@@ -176,7 +177,7 @@ function createSpecLockServer() {
|
|
|
176
177
|
// Tool 12: speclock_check_conflict
|
|
177
178
|
server.tool("speclock_check_conflict", "Check if a proposed action conflicts with any active SpecLock.", { proposedAction: z.string().min(1).describe("Description of the action") }, async ({ proposedAction }) => {
|
|
178
179
|
ensureInit(PROJECT_ROOT);
|
|
179
|
-
const result =
|
|
180
|
+
const result = await checkConflictAsync(PROJECT_ROOT, proposedAction);
|
|
180
181
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
181
182
|
});
|
|
182
183
|
|
package/src/mcp/server.js
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
updateDeployFacts,
|
|
13
13
|
logChange,
|
|
14
14
|
checkConflict,
|
|
15
|
+
checkConflictAsync,
|
|
15
16
|
getSessionBriefing,
|
|
16
17
|
endSession,
|
|
17
18
|
suggestLocks,
|
|
@@ -56,7 +57,7 @@ const PROJECT_ROOT =
|
|
|
56
57
|
args.project || process.env.SPECLOCK_PROJECT_ROOT || process.cwd();
|
|
57
58
|
|
|
58
59
|
// --- MCP Server ---
|
|
59
|
-
const VERSION = "
|
|
60
|
+
const VERSION = "2.0.0";
|
|
60
61
|
const AUTHOR = "Sandeep Roy";
|
|
61
62
|
|
|
62
63
|
const server = new McpServer(
|
|
@@ -427,7 +428,7 @@ server.tool(
|
|
|
427
428
|
.describe("Description of the action you plan to take"),
|
|
428
429
|
},
|
|
429
430
|
async ({ proposedAction }) => {
|
|
430
|
-
const result =
|
|
431
|
+
const result = await checkConflictAsync(PROJECT_ROOT, proposedAction);
|
|
431
432
|
return {
|
|
432
433
|
content: [{ type: "text", text: result.analysis }],
|
|
433
434
|
};
|