micro-models-agent 0.56.3 → 0.56.5
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/CHANGELOG.md +11 -0
- package/dist/main.js +28 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,17 @@ All notable changes to Micro Models Agent (MMA) will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [0.56.5] - 2026-08-27
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- **Hallucination**: `FactualCheck` now receives deleted files from `ConsistencyCheck` — no longer false-positives on files that were intentionally deleted in the same session
|
|
11
|
+
|
|
12
|
+
## [0.56.4] - 2026-08-27
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- **Tools**: `list_dir` now filters `.mma/`, `node_modules/`, `.git/`, `dist/`, `build/`, `coverage/` from directory listings (consistent with indexer)
|
|
16
|
+
- **Hallucination**: `dotfileVariants` now tries dot-prefixing each directory component, not just basename (fixes false positive on `.mma/index-cache.json` → `mma/index-cache.json`)
|
|
17
|
+
|
|
7
18
|
## [0.56.1] - 2026-08-27
|
|
8
19
|
|
|
9
20
|
### Added
|
package/dist/main.js
CHANGED
|
@@ -8425,11 +8425,12 @@ var init_grep_tool = __esm(() => {
|
|
|
8425
8425
|
// src/tools/list-dir.ts
|
|
8426
8426
|
import { readdirSync as readdirSync5, statSync as statSync3, existsSync as existsSync16 } from "fs";
|
|
8427
8427
|
import { resolve as resolve8 } from "path";
|
|
8428
|
-
var listDirTool;
|
|
8428
|
+
var IGNORED_DIRS, listDirTool;
|
|
8429
8429
|
var init_list_dir = __esm(() => {
|
|
8430
8430
|
init_i18n();
|
|
8431
8431
|
init_path_validator();
|
|
8432
8432
|
init_path_utils();
|
|
8433
|
+
IGNORED_DIRS = new Set(["node_modules", ".git", "dist", "build", "coverage", ".mma"]);
|
|
8433
8434
|
listDirTool = {
|
|
8434
8435
|
name: "list_dir",
|
|
8435
8436
|
icon: "\uD83D\uDCC2",
|
|
@@ -8458,7 +8459,7 @@ var init_list_dir = __esm(() => {
|
|
|
8458
8459
|
if (!existsSync16(resolved)) {
|
|
8459
8460
|
return { success: false, output: t("file.dir_notfound", { path }) };
|
|
8460
8461
|
}
|
|
8461
|
-
const entries = readdirSync5(resolved);
|
|
8462
|
+
const entries = readdirSync5(resolved).filter((e) => !IGNORED_DIRS.has(e));
|
|
8462
8463
|
const lines = entries.map((e) => {
|
|
8463
8464
|
const full = resolve8(resolved, e);
|
|
8464
8465
|
return statSync3(full).isDirectory() ? `${e}/` : e;
|
|
@@ -15049,12 +15050,15 @@ class FactualCheck {
|
|
|
15049
15050
|
for (const f of files)
|
|
15050
15051
|
this.knownFiles.add(f);
|
|
15051
15052
|
}
|
|
15052
|
-
validate(response) {
|
|
15053
|
+
validate(response, deletedFiles) {
|
|
15053
15054
|
const filePaths = this.extractFilePaths(response);
|
|
15054
15055
|
if (filePaths.length === 0)
|
|
15055
15056
|
return { status: "pass" };
|
|
15057
|
+
const deletedBasenames = deletedFiles ? new Set([...deletedFiles].map((p) => p.split(/[/\\]/).pop() ?? p)) : undefined;
|
|
15056
15058
|
const nonExistent = [];
|
|
15057
15059
|
for (const fp of filePaths) {
|
|
15060
|
+
if (deletedBasenames?.has(fp))
|
|
15061
|
+
continue;
|
|
15058
15062
|
if (!this.pathExists(fp)) {
|
|
15059
15063
|
nonExistent.push(fp);
|
|
15060
15064
|
}
|
|
@@ -15086,11 +15090,22 @@ class FactualCheck {
|
|
|
15086
15090
|
return false;
|
|
15087
15091
|
}
|
|
15088
15092
|
dotfileVariants(fp) {
|
|
15089
|
-
const
|
|
15090
|
-
const
|
|
15091
|
-
|
|
15092
|
-
|
|
15093
|
-
|
|
15093
|
+
const variants = [fp];
|
|
15094
|
+
const sep2 = fp.includes("\\") ? "\\" : "/";
|
|
15095
|
+
const parts = fp.split(sep2);
|
|
15096
|
+
const base = parts[parts.length - 1];
|
|
15097
|
+
if (!base.startsWith(".")) {
|
|
15098
|
+
const withDotBase = [...parts.slice(0, -1), `.${base}`].join(sep2);
|
|
15099
|
+
variants.push(withDotBase);
|
|
15100
|
+
}
|
|
15101
|
+
for (let i = 0;i < parts.length - 1; i++) {
|
|
15102
|
+
if (!parts[i].startsWith(".")) {
|
|
15103
|
+
const dotted = [...parts.slice(0, i), `.${parts[i]}`, ...parts.slice(i + 1)].join(sep2);
|
|
15104
|
+
if (!variants.includes(dotted))
|
|
15105
|
+
variants.push(dotted);
|
|
15106
|
+
}
|
|
15107
|
+
}
|
|
15108
|
+
return variants;
|
|
15094
15109
|
}
|
|
15095
15110
|
bareNameExists(name) {
|
|
15096
15111
|
for (const cand of this.dotfileVariants(name)) {
|
|
@@ -15142,7 +15157,7 @@ class FactualCheck {
|
|
|
15142
15157
|
break;
|
|
15143
15158
|
const full = join17(dir, entry.name);
|
|
15144
15159
|
if (entry.isDirectory()) {
|
|
15145
|
-
if (!
|
|
15160
|
+
if (!IGNORED_DIRS2.has(entry.name)) {
|
|
15146
15161
|
count = this.scanDir(full, index, count);
|
|
15147
15162
|
}
|
|
15148
15163
|
} else if (entry.isFile()) {
|
|
@@ -15160,11 +15175,11 @@ class FactualCheck {
|
|
|
15160
15175
|
return extractFileLikeTokens(stripUrls(text));
|
|
15161
15176
|
}
|
|
15162
15177
|
}
|
|
15163
|
-
var
|
|
15178
|
+
var IGNORED_DIRS2;
|
|
15164
15179
|
var init_factual = __esm(() => {
|
|
15165
15180
|
init_i18n();
|
|
15166
15181
|
init_js_identifiers();
|
|
15167
|
-
|
|
15182
|
+
IGNORED_DIRS2 = new Set([
|
|
15168
15183
|
"node_modules",
|
|
15169
15184
|
".git",
|
|
15170
15185
|
"dist",
|
|
@@ -15291,7 +15306,8 @@ class HallucinationDetector {
|
|
|
15291
15306
|
if (confidenceResult.status === "retry" || confidenceResult.status === "block") {
|
|
15292
15307
|
return confidenceResult;
|
|
15293
15308
|
}
|
|
15294
|
-
const
|
|
15309
|
+
const deletedFiles = new Set(this.consistency.getDeletedFiles());
|
|
15310
|
+
const factualResult = this.factual?.validate(response, deletedFiles);
|
|
15295
15311
|
if (factualResult && factualResult.status !== "pass") {
|
|
15296
15312
|
return factualResult;
|
|
15297
15313
|
}
|