speclore 0.1.8 → 0.1.9
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/index.js +29 -29
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +29 -29
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.js +8 -8
- package/dist/mcp/server.js.map +1 -1
- package/package.json +1 -1
package/dist/mcp/server.js
CHANGED
|
@@ -148,7 +148,7 @@ var init_cost_tracker = __esm({
|
|
|
148
148
|
totalTokens: promptTokens + completionTokens,
|
|
149
149
|
estimatedCostUsd: cost
|
|
150
150
|
});
|
|
151
|
-
logger.debug(`AI usage: ${model}
|
|
151
|
+
logger.debug(`AI usage: ${model} - ${promptTokens}+${completionTokens} tokens, ~$${cost.toFixed(4)}`);
|
|
152
152
|
return cost;
|
|
153
153
|
}
|
|
154
154
|
/**
|
|
@@ -818,7 +818,7 @@ function acquireLock(specLoreDir) {
|
|
|
818
818
|
try {
|
|
819
819
|
writeFileSync(lockPath, JSON.stringify(lockInfo), { flag: "wx", encoding: "utf-8" });
|
|
820
820
|
} catch {
|
|
821
|
-
logger.debug("Lock write failed
|
|
821
|
+
logger.debug("Lock write failed - another process may have acquired it");
|
|
822
822
|
return false;
|
|
823
823
|
}
|
|
824
824
|
logger.debug(`Lock acquired by PID ${process.pid}`);
|
|
@@ -2518,7 +2518,7 @@ init_logger();
|
|
|
2518
2518
|
function readModuleConfig(config) {
|
|
2519
2519
|
const boundaries = [];
|
|
2520
2520
|
for (const [name, mod] of Object.entries(config.project.modules)) {
|
|
2521
|
-
logger.debug(`Reading module config: ${name}
|
|
2521
|
+
logger.debug(`Reading module config: ${name} -> ${mod.path}`);
|
|
2522
2522
|
boundaries.push({
|
|
2523
2523
|
name,
|
|
2524
2524
|
responsibility: mod.responsibility,
|
|
@@ -2579,7 +2579,7 @@ async function generateConstraints(projectRoot2, features, _context, config) {
|
|
|
2579
2579
|
try {
|
|
2580
2580
|
await writer.write(content);
|
|
2581
2581
|
writtenFiles.push(writer.configFile);
|
|
2582
|
-
logger.info(`Constraint written via plugin: ${writer.toolName}
|
|
2582
|
+
logger.info(`Constraint written via plugin: ${writer.toolName} -> ${writer.configFile}`);
|
|
2583
2583
|
} catch (err) {
|
|
2584
2584
|
logger.warn(`Writer plugin '${tool}' failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
2585
2585
|
}
|
|
@@ -2631,7 +2631,7 @@ function resolveFromMappingFile(projectRoot2, _feature, scenario) {
|
|
|
2631
2631
|
if (mapping.scenarios && scenario.name in mapping.scenarios) {
|
|
2632
2632
|
const entry = mapping.scenarios[scenario.name];
|
|
2633
2633
|
if (entry) {
|
|
2634
|
-
logger.debug(`Mapping file hit: ${scenario.name}
|
|
2634
|
+
logger.debug(`Mapping file hit: ${scenario.name} -> ${entry.testMethod}`);
|
|
2635
2635
|
return {
|
|
2636
2636
|
name: scenario.name,
|
|
2637
2637
|
status: "passed",
|
|
@@ -2662,7 +2662,7 @@ function resolveFromTag(projectRoot2, _feature, scenario) {
|
|
|
2662
2662
|
while ((match = tagRegex.exec(content)) !== null) {
|
|
2663
2663
|
if (match[1].trim() === scenario.name) {
|
|
2664
2664
|
const methodMatch = findTestMethodNearby(content, match.index);
|
|
2665
|
-
logger.debug(`Tag hit: ${scenario.name}
|
|
2665
|
+
logger.debug(`Tag hit: ${scenario.name} -> ${methodMatch}`);
|
|
2666
2666
|
return {
|
|
2667
2667
|
name: scenario.name,
|
|
2668
2668
|
status: "passed",
|
|
@@ -4461,10 +4461,10 @@ async function startMcpServer() {
|
|
|
4461
4461
|
mkdirSync12(specLoreDir, { recursive: true });
|
|
4462
4462
|
const locked = acquireLock(specLoreDir);
|
|
4463
4463
|
if (!locked) {
|
|
4464
|
-
logger.warn("Could not acquire lock
|
|
4464
|
+
logger.warn("Could not acquire lock - another SpecLore instance may be running.");
|
|
4465
4465
|
}
|
|
4466
4466
|
} catch {
|
|
4467
|
-
logger.warn("Could not acquire lock
|
|
4467
|
+
logger.warn("Could not acquire lock - .speclore/ directory may not exist.");
|
|
4468
4468
|
}
|
|
4469
4469
|
const transport = new StdioServerTransport();
|
|
4470
4470
|
await server.connect(transport);
|