micro-models-agent 0.34.0 → 0.35.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.
Files changed (2) hide show
  1. package/dist/main.js +172 -50
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -2372,9 +2372,12 @@ var init_en = __esm(() => {
2372
2372
  "tool.friendly.web_search": "Web search",
2373
2373
  "tool.friendly.web_fetch": "Fetching page",
2374
2374
  "tool.friendly.web_browse": "Browsing page",
2375
+ "tool.friendly.download_file": "Downloading file",
2375
2376
  "tool.web_fetch_result": "Fetched page: {url} — {chars} chars, {lines} lines{truncated}",
2376
2377
  "tool.web_browse_result": "Browsed page: {url} — {chars} chars, {lines} lines{truncated}",
2377
2378
  "tool.web_search_result": 'Search results for "{query}" — {count} results',
2379
+ "tool.downloaded": "Downloaded {url} → {path} ({size} bytes, {type})",
2380
+ "tool.download_too_large": "Download blocked: file exceeds the {max} bytes limit",
2378
2381
  "tool.friendly.browser": "Browser",
2379
2382
  "tool.friendly.subagent": "Sub-agent task",
2380
2383
  "tool.friendly.question": "Question to user",
@@ -2957,9 +2960,12 @@ var init_ru = __esm(() => {
2957
2960
  "tool.friendly.web_search": "Поиск в интернете",
2958
2961
  "tool.friendly.web_fetch": "Загрузка страницы",
2959
2962
  "tool.friendly.web_browse": "Просмотр страницы",
2963
+ "tool.friendly.download_file": "Скачивание файла",
2960
2964
  "tool.web_fetch_result": "Загружена страница: {url} — {chars} симв., {lines} строк{truncated}",
2961
2965
  "tool.web_browse_result": "Просмотрена страница: {url} — {chars} симв., {lines} строк{truncated}",
2962
2966
  "tool.web_search_result": 'Результаты поиска "{query}" — {count} результатов',
2967
+ "tool.downloaded": "Скачано {url} → {path} ({size} байт, {type})",
2968
+ "tool.download_too_large": "Скачивание заблокировано: файл превышает лимит {max} байт",
2963
2969
  "tool.friendly.browser": "Браузер",
2964
2970
  "tool.friendly.subagent": "Задача подагенту",
2965
2971
  "tool.friendly.question": "Вопрос пользователю",
@@ -12825,6 +12831,120 @@ var init_web_browse = __esm(() => {
12825
12831
  };
12826
12832
  });
12827
12833
 
12834
+ // src/tools/download-file.ts
12835
+ import { writeFileSync as writeFileSync9, mkdirSync as mkdirSync13 } from "fs";
12836
+ import { dirname as dirname6 } from "path";
12837
+ var MAX_DOWNLOAD_BYTES, downloadFileTool;
12838
+ var init_download_file = __esm(() => {
12839
+ init_i18n();
12840
+ init_network_validator();
12841
+ init_path_validator();
12842
+ init_audit_log();
12843
+ init_session_isolation();
12844
+ init_security();
12845
+ init_path_utils();
12846
+ MAX_DOWNLOAD_BYTES = 100 * 1024 * 1024;
12847
+ downloadFileTool = {
12848
+ name: "download_file",
12849
+ description: "Download a file (image, archive, binary, font, etc.) from a URL and save it to disk. Returns only the path, size and content type — read the saved file with read_file/attach_image afterwards. Use this for binary files; web_fetch/web_browse return text only and cannot save bytes.",
12850
+ tags: ["file", "research"],
12851
+ parameters: {
12852
+ type: "object",
12853
+ properties: {
12854
+ url: { type: "string", description: "URL to download" },
12855
+ path: {
12856
+ type: "string",
12857
+ description: "Destination path (relative to the working directory)"
12858
+ },
12859
+ max_bytes: {
12860
+ type: "number",
12861
+ description: "Optional size cap in bytes (default 100 MB)"
12862
+ }
12863
+ },
12864
+ required: ["url", "path"]
12865
+ },
12866
+ handler: async (ctx, args) => {
12867
+ const url = String(args.url || "").trim();
12868
+ const path = String(args.path || "").trim();
12869
+ if (!url || !path) {
12870
+ return { success: false, output: t("tool.invalid_params") };
12871
+ }
12872
+ const securityConfig = ctx.sessionContext ? getSessionSecurityConfig(ctx.config, ctx.sessionContext).network : ctx.config.security?.network || DEFAULT_SECURITY_CONFIG.network;
12873
+ const validation = isUrlAllowed(url, securityConfig);
12874
+ if (!validation.allowed) {
12875
+ logSecurityBlock(ctx.sessionId, "network_request", validation.reason || "URL blocked by security policy", sanitizeUrl(url));
12876
+ return {
12877
+ success: false,
12878
+ output: `[SECURITY BLOCKED] URL is not allowed: ${validation.reason}`
12879
+ };
12880
+ }
12881
+ const resolved = safeResolvePath(ctx.baseDir, path);
12882
+ const scopeCheck = isPathWritable(ctx.baseDir, resolved, ctx.scope, ctx.config.security?.paths);
12883
+ if (!scopeCheck.allowed) {
12884
+ logSecurityBlock(ctx.sessionId, "file_write", scopeCheck.reason || "Path not allowed", path);
12885
+ return {
12886
+ success: false,
12887
+ output: t("file.path_not_allowed", {
12888
+ path: `${path} — ${scopeCheck.reason}`
12889
+ })
12890
+ };
12891
+ }
12892
+ const maxBytes = Number(args.max_bytes) > 0 ? Number(args.max_bytes) : MAX_DOWNLOAD_BYTES;
12893
+ try {
12894
+ const response = await fetch(url, {
12895
+ signal: AbortSignal.timeout(securityConfig?.requestTimeout || 15000)
12896
+ });
12897
+ if (!response.ok) {
12898
+ logNetworkRequest(ctx.sessionId, sanitizeUrl(url), false, `Status: ${response.status}`);
12899
+ return {
12900
+ success: false,
12901
+ output: t("error.http", {
12902
+ status: response.status,
12903
+ statusText: response.statusText
12904
+ })
12905
+ };
12906
+ }
12907
+ const contentLength = Number(response.headers.get("content-length") || "0");
12908
+ if (contentLength > maxBytes) {
12909
+ logNetworkRequest(ctx.sessionId, sanitizeUrl(url), false, `Too large: ${contentLength}`);
12910
+ return {
12911
+ success: false,
12912
+ output: t("tool.download_too_large", { max: String(maxBytes) })
12913
+ };
12914
+ }
12915
+ const buffer = Buffer.from(await response.arrayBuffer());
12916
+ if (buffer.byteLength > maxBytes) {
12917
+ logNetworkRequest(ctx.sessionId, sanitizeUrl(url), false, `Too large: ${buffer.byteLength}`);
12918
+ return {
12919
+ success: false,
12920
+ output: t("tool.download_too_large", { max: String(maxBytes) })
12921
+ };
12922
+ }
12923
+ mkdirSync13(dirname6(resolved), { recursive: true });
12924
+ writeFileSync9(resolved, buffer);
12925
+ const contentType = response.headers.get("content-type")?.split(";")[0]?.trim() || "unknown";
12926
+ logNetworkRequest(ctx.sessionId, sanitizeUrl(url), true, `Status: ${response.status}`);
12927
+ logFileWrite(ctx.sessionId, resolved, true, `Downloaded ${buffer.byteLength} bytes`);
12928
+ return {
12929
+ success: true,
12930
+ output: t("tool.downloaded", {
12931
+ url: sanitizeUrl(url),
12932
+ path: resolved,
12933
+ size: String(buffer.byteLength),
12934
+ type: contentType
12935
+ })
12936
+ };
12937
+ } catch (e) {
12938
+ logNetworkRequest(ctx.sessionId, sanitizeUrl(url), false, `Error: ${e.message}`);
12939
+ return {
12940
+ success: false,
12941
+ output: t("error.fetch_failed", { message: e.message })
12942
+ };
12943
+ }
12944
+ }
12945
+ };
12946
+ });
12947
+
12828
12948
  // src/tools/load-skill.ts
12829
12949
  function createLoadSkillTool(skillsModule) {
12830
12950
  return {
@@ -13915,10 +14035,10 @@ __export(exports_bridge_client, {
13915
14035
  });
13916
14036
  import { spawn as spawn4 } from "child_process";
13917
14037
  import { createInterface } from "readline";
13918
- import { dirname as dirname6, join as join17 } from "path";
14038
+ import { dirname as dirname7, join as join17 } from "path";
13919
14039
  import { fileURLToPath } from "url";
13920
14040
  function bridgeScriptPath() {
13921
- return join17(dirname6(fileURLToPath(import.meta.url)), "bridge-server.mjs");
14041
+ return join17(dirname7(fileURLToPath(import.meta.url)), "bridge-server.mjs");
13922
14042
  }
13923
14043
 
13924
14044
  class BridgeDriver {
@@ -15145,6 +15265,7 @@ function registerAllTools(registry2, skillsModule) {
15145
15265
  webSearchTool,
15146
15266
  webFetchTool,
15147
15267
  webBrowseTool,
15268
+ downloadFileTool,
15148
15269
  pipelineRunTool,
15149
15270
  mcpCallTool,
15150
15271
  searchHistoryTool,
@@ -15178,6 +15299,7 @@ var init_tools = __esm(() => {
15178
15299
  init_web_search();
15179
15300
  init_web_fetch();
15180
15301
  init_web_browse();
15302
+ init_download_file();
15181
15303
  init_load_skill();
15182
15304
  init_pipeline_run();
15183
15305
  init_mcp_call();
@@ -15841,7 +15963,7 @@ var init_auditor = __esm(() => {
15841
15963
  });
15842
15964
 
15843
15965
  // src/modules/execution/plan-store.ts
15844
- import { readFileSync as readFileSync16, writeFileSync as writeFileSync9, mkdirSync as mkdirSync13, existsSync as existsSync28, readdirSync as readdirSync9, rmSync } from "fs";
15966
+ import { readFileSync as readFileSync16, writeFileSync as writeFileSync10, mkdirSync as mkdirSync14, existsSync as existsSync28, readdirSync as readdirSync9, rmSync } from "fs";
15845
15967
  import { join as join23 } from "path";
15846
15968
  function readPlanFile(path, fallbackBaseDir) {
15847
15969
  try {
@@ -15864,7 +15986,7 @@ function readPlanFile(path, fallbackBaseDir) {
15864
15986
  }
15865
15987
  }
15866
15988
  function writePlanFile(path, plan) {
15867
- writeFileSync9(path, JSON.stringify(plan, null, 2), "utf-8");
15989
+ writeFileSync10(path, JSON.stringify(plan, null, 2), "utf-8");
15868
15990
  }
15869
15991
  function listDir(dir, baseDir) {
15870
15992
  if (!existsSync28(dir))
@@ -15893,7 +16015,7 @@ class PlanStore {
15893
16015
  constructor(baseDir) {
15894
16016
  const mmaDir = join23(baseDir, ".mma");
15895
16017
  if (!existsSync28(mmaDir))
15896
- mkdirSync13(mmaDir, { recursive: true });
16018
+ mkdirSync14(mmaDir, { recursive: true });
15897
16019
  this.baseDir = baseDir;
15898
16020
  this.plansDir = join23(mmaDir, "plans");
15899
16021
  this.draftsDir = join23(this.plansDir, "drafts");
@@ -15901,7 +16023,7 @@ class PlanStore {
15901
16023
  this.legacyPath = join23(mmaDir, LEGACY_FILE);
15902
16024
  for (const dir of [this.plansDir, this.draftsDir, this.archiveDir]) {
15903
16025
  if (!existsSync28(dir))
15904
- mkdirSync13(dir, { recursive: true });
16026
+ mkdirSync14(dir, { recursive: true });
15905
16027
  }
15906
16028
  }
15907
16029
  activePath() {
@@ -16876,7 +16998,7 @@ var init_module = __esm(() => {
16876
16998
  // src/modules/security/session-encryption.ts
16877
16999
  import {
16878
17000
  readFileSync as readFileSync18,
16879
- writeFileSync as writeFileSync10,
17001
+ writeFileSync as writeFileSync11,
16880
17002
  existsSync as existsSync30,
16881
17003
  readdirSync as readdirSync10,
16882
17004
  unlinkSync as unlinkSync4
@@ -16940,7 +17062,7 @@ class SessionFileEncryptor {
16940
17062
  }
16941
17063
  writeSessionFile(filePath, content) {
16942
17064
  const encrypted = this.encryptFileContent(content);
16943
- writeFileSync10(filePath, encrypted, "utf8");
17065
+ writeFileSync11(filePath, encrypted, "utf8");
16944
17066
  }
16945
17067
  readSessionJSON(filePath) {
16946
17068
  const content = readFileSync18(filePath, "utf8");
@@ -16948,7 +17070,7 @@ class SessionFileEncryptor {
16948
17070
  }
16949
17071
  writeSessionJSON(filePath, obj) {
16950
17072
  const content = this.encryptJSON(obj);
16951
- writeFileSync10(filePath, content, "utf8");
17073
+ writeFileSync11(filePath, content, "utf8");
16952
17074
  }
16953
17075
  readSessionJSONL(filePath) {
16954
17076
  const content = readFileSync18(filePath, "utf8");
@@ -16965,7 +17087,7 @@ class SessionFileEncryptor {
16965
17087
  }
16966
17088
  appendToSessionJSONL(filePath, obj) {
16967
17089
  const encryptedLine = this.encryptFileContent(JSON.stringify(obj));
16968
- writeFileSync10(filePath, encryptedLine + `
17090
+ writeFileSync11(filePath, encryptedLine + `
16969
17091
  `, {
16970
17092
  flag: "a",
16971
17093
  encoding: "utf8"
@@ -16981,7 +17103,7 @@ class SessionFileEncryptor {
16981
17103
  try {
16982
17104
  const content = readFileSync18(filePath, "utf8");
16983
17105
  const encrypted = this.encryptFileContent(content);
16984
- writeFileSync10(filePath + ".enc", encrypted, "utf8");
17106
+ writeFileSync11(filePath + ".enc", encrypted, "utf8");
16985
17107
  unlinkSync4(filePath);
16986
17108
  } catch {}
16987
17109
  }
@@ -16998,7 +17120,7 @@ class SessionFileEncryptor {
16998
17120
  try {
16999
17121
  const content = readFileSync18(encFilePath, "utf8");
17000
17122
  const decrypted = this.decryptFileContent(content);
17001
- writeFileSync10(decFilePath, decrypted, "utf8");
17123
+ writeFileSync11(decFilePath, decrypted, "utf8");
17002
17124
  unlinkSync4(encFilePath);
17003
17125
  } catch {}
17004
17126
  }
@@ -17019,11 +17141,11 @@ var init_session_encryption = __esm(() => {
17019
17141
  // src/modules/session/store.ts
17020
17142
  import {
17021
17143
  existsSync as existsSync31,
17022
- mkdirSync as mkdirSync14,
17144
+ mkdirSync as mkdirSync15,
17023
17145
  readdirSync as readdirSync11,
17024
17146
  readFileSync as readFileSync19,
17025
17147
  rmSync as rmSync2,
17026
- writeFileSync as writeFileSync11,
17148
+ writeFileSync as writeFileSync12,
17027
17149
  appendFileSync as appendFileSync6
17028
17150
  } from "fs";
17029
17151
  import { join as join25 } from "path";
@@ -17053,7 +17175,7 @@ class SessionStore {
17053
17175
  return this.encryptor?.isEnabled() ?? false;
17054
17176
  }
17055
17177
  init() {
17056
- mkdirSync14(this.baseDir, { recursive: true });
17178
+ mkdirSync15(this.baseDir, { recursive: true });
17057
17179
  }
17058
17180
  sessionDir(id) {
17059
17181
  return join25(this.baseDir, id);
@@ -17073,12 +17195,12 @@ class SessionStore {
17073
17195
  saveMeta(id, meta) {
17074
17196
  this._metaCache.set(id, meta);
17075
17197
  const dir = this.sessionDir(id);
17076
- mkdirSync14(dir, { recursive: true });
17198
+ mkdirSync15(dir, { recursive: true });
17077
17199
  const content = JSON.stringify(meta, null, 2);
17078
17200
  if (this.encryptor) {
17079
- writeFileSync11(this.metaPath(id), this.encryptor.encryptFileContent(content), "utf-8");
17201
+ writeFileSync12(this.metaPath(id), this.encryptor.encryptFileContent(content), "utf-8");
17080
17202
  } else {
17081
- writeFileSync11(this.metaPath(id), content, "utf-8");
17203
+ writeFileSync12(this.metaPath(id), content, "utf-8");
17082
17204
  }
17083
17205
  }
17084
17206
  loadMeta(id) {
@@ -17100,7 +17222,7 @@ class SessionStore {
17100
17222
  }
17101
17223
  appendMessage(id, msg) {
17102
17224
  const dir = this.sessionDir(id);
17103
- mkdirSync14(dir, { recursive: true });
17225
+ mkdirSync15(dir, { recursive: true });
17104
17226
  const line = JSON.stringify(msg);
17105
17227
  if (this.encryptor?.isEnabled()) {
17106
17228
  appendFileSync6(this.historyPath(id), this.encryptor.encryptFileContent(line) + `
@@ -17147,7 +17269,7 @@ class SessionStore {
17147
17269
  }
17148
17270
  appendSessionLog(id, entry) {
17149
17271
  const dir = this.sessionDir(id);
17150
- mkdirSync14(dir, { recursive: true });
17272
+ mkdirSync15(dir, { recursive: true });
17151
17273
  const line = JSON.stringify(entry);
17152
17274
  if (this.encryptor?.isEnabled()) {
17153
17275
  appendFileSync6(this.sessionLogPath(id), this.encryptor.encryptFileContent(line) + `
@@ -17220,7 +17342,7 @@ class SessionStore {
17220
17342
  const content = readFileSync19(historyPath, "utf-8");
17221
17343
  const compressed = gzipSync(content);
17222
17344
  const gzPath = join25(this.baseDir, `${session2.id}.jsonl.gz`);
17223
- writeFileSync11(gzPath, compressed);
17345
+ writeFileSync12(gzPath, compressed);
17224
17346
  rmSync2(historyPath);
17225
17347
  }
17226
17348
  }
@@ -17429,7 +17551,7 @@ class ProfileCompressor {
17429
17551
  }
17430
17552
 
17431
17553
  // src/modules/user-profile/profile.ts
17432
- import { readFileSync as readFileSync20, writeFileSync as writeFileSync12, existsSync as existsSync32, mkdirSync as mkdirSync15 } from "fs";
17554
+ import { readFileSync as readFileSync20, writeFileSync as writeFileSync13, existsSync as existsSync32, mkdirSync as mkdirSync16 } from "fs";
17433
17555
  import { join as join26 } from "path";
17434
17556
  import { homedir as homedir9, hostname, platform as platform4, type } from "os";
17435
17557
  import { env } from "process";
@@ -17455,9 +17577,9 @@ class UserProfile {
17455
17577
  }
17456
17578
  save() {
17457
17579
  if (!existsSync32(this.profileDir)) {
17458
- mkdirSync15(this.profileDir, { recursive: true });
17580
+ mkdirSync16(this.profileDir, { recursive: true });
17459
17581
  }
17460
- writeFileSync12(join26(this.profileDir, "profile.json"), JSON.stringify({ ...this.info, preferences: this.preferences }, null, 2), "utf-8");
17582
+ writeFileSync13(join26(this.profileDir, "profile.json"), JSON.stringify({ ...this.info, preferences: this.preferences }, null, 2), "utf-8");
17461
17583
  }
17462
17584
  load() {
17463
17585
  const path = join26(this.profileDir, "profile.json");
@@ -18210,7 +18332,7 @@ var init_walker = __esm(() => {
18210
18332
  });
18211
18333
 
18212
18334
  // src/modules/indexer/cache.ts
18213
- import { readFileSync as readFileSync23, writeFileSync as writeFileSync13, existsSync as existsSync37, mkdirSync as mkdirSync16, rmSync as rmSync3 } from "fs";
18335
+ import { readFileSync as readFileSync23, writeFileSync as writeFileSync14, existsSync as existsSync37, mkdirSync as mkdirSync17, rmSync as rmSync3 } from "fs";
18214
18336
  import { join as join30 } from "path";
18215
18337
 
18216
18338
  class IndexCache {
@@ -18235,8 +18357,8 @@ class IndexCache {
18235
18357
  this.cache = result;
18236
18358
  const dir = join30(this.cachePath, "..");
18237
18359
  if (!existsSync37(dir))
18238
- mkdirSync16(dir, { recursive: true });
18239
- writeFileSync13(this.cachePath, JSON.stringify(result), "utf-8");
18360
+ mkdirSync17(dir, { recursive: true });
18361
+ writeFileSync14(this.cachePath, JSON.stringify(result), "utf-8");
18240
18362
  }
18241
18363
  invalidate() {
18242
18364
  this.cache = null;
@@ -18418,7 +18540,7 @@ var init_project_profile = __esm(() => {
18418
18540
  });
18419
18541
 
18420
18542
  // src/modules/indexer/module.ts
18421
- import { dirname as dirname8 } from "path";
18543
+ import { dirname as dirname9 } from "path";
18422
18544
 
18423
18545
  class IndexerModule {
18424
18546
  name = "indexer";
@@ -18537,7 +18659,7 @@ ${t("indexer.and_more", { count: result.files.length - 100 })}` : "";
18537
18659
  const counts = {};
18538
18660
  for (const f of result.files) {
18539
18661
  const normalized = f.path.replace(/\\/g, "/");
18540
- const dir = dirname8(normalized);
18662
+ const dir = dirname9(normalized);
18541
18663
  const key = dir === "." ? "(root)" : dir;
18542
18664
  counts[key] = (counts[key] || 0) + 1;
18543
18665
  }
@@ -18830,7 +18952,7 @@ __export(exports_bootstrap, {
18830
18952
  });
18831
18953
  import { homedir as homedir11 } from "os";
18832
18954
  import { join as join33, resolve as resolve21 } from "path";
18833
- import { existsSync as existsSync39, readFileSync as readFileSync25, writeFileSync as writeFileSync14 } from "fs";
18955
+ import { existsSync as existsSync39, readFileSync as readFileSync25, writeFileSync as writeFileSync15 } from "fs";
18834
18956
  function buildSystemInfo(config, baseDir, profileCompressed) {
18835
18957
  const now = new Date().toISOString().replace("T", " ").slice(0, 19);
18836
18958
  const isWin = profileCompressed.toLowerCase().includes("win32");
@@ -18929,7 +19051,7 @@ async function bootstrap(configDir, projectDir, noAgentsMd, exitOnComplete) {
18929
19051
  };
18930
19052
  const agentsMdGlobal = join33(dir, "AGENTS.md");
18931
19053
  if (!existsSync39(agentsMdGlobal)) {
18932
- writeFileSync14(agentsMdGlobal, "", "utf-8");
19054
+ writeFileSync15(agentsMdGlobal, "", "utf-8");
18933
19055
  }
18934
19056
  const sessionDir = join33(dir, "sessions");
18935
19057
  const sessionStore = new SessionStore(sessionDir);
@@ -19925,7 +20047,7 @@ __export(exports_manifest, {
19925
20047
  getCertMark: () => getCertMark,
19926
20048
  MANIFEST_PATH: () => MANIFEST_PATH
19927
20049
  });
19928
- import { existsSync as existsSync40, readFileSync as readFileSync26, mkdirSync as mkdirSync17, writeFileSync as writeFileSync15 } from "fs";
20050
+ import { existsSync as existsSync40, readFileSync as readFileSync26, mkdirSync as mkdirSync18, writeFileSync as writeFileSync16 } from "fs";
19929
20051
  import { homedir as homedir13 } from "os";
19930
20052
  import { join as join35 } from "path";
19931
20053
  function readManifest(path = MANIFEST_PATH) {
@@ -19938,8 +20060,8 @@ function readManifest(path = MANIFEST_PATH) {
19938
20060
  return { version: 1, certifications: [] };
19939
20061
  }
19940
20062
  function saveManifest(m, path = MANIFEST_PATH) {
19941
- mkdirSync17(join35(homedir13(), ".mma"), { recursive: true });
19942
- writeFileSync15(path, JSON.stringify(m, null, 2), "utf-8");
20063
+ mkdirSync18(join35(homedir13(), ".mma"), { recursive: true });
20064
+ writeFileSync16(path, JSON.stringify(m, null, 2), "utf-8");
19943
20065
  }
19944
20066
  function upsertCertification(entry, path = MANIFEST_PATH) {
19945
20067
  const m = readManifest(path);
@@ -27288,9 +27410,9 @@ var init_fact_checker = () => {};
27288
27410
 
27289
27411
  // src/modules/certification/runner.ts
27290
27412
  import { spawn as spawn7 } from "child_process";
27291
- import { existsSync as existsSync43, mkdirSync as mkdirSync18, rmSync as rmSync4, cpSync as cpSync2 } from "fs";
27413
+ import { existsSync as existsSync43, mkdirSync as mkdirSync19, rmSync as rmSync4, cpSync as cpSync2 } from "fs";
27292
27414
  import { platform as platform6 } from "os";
27293
- import { join as join38, resolve as resolve22, dirname as dirname9 } from "path";
27415
+ import { join as join38, resolve as resolve22, dirname as dirname10 } from "path";
27294
27416
  async function runScenario(scenario, opts) {
27295
27417
  if (scenario.mode === "skip") {
27296
27418
  return {
@@ -27368,14 +27490,14 @@ ${res.stderr}`;
27368
27490
  }
27369
27491
  function prepareSandbox(sandbox, scenario, mmaRoot) {
27370
27492
  rmSync4(sandbox, { recursive: true, force: true });
27371
- mkdirSync18(sandbox, { recursive: true });
27493
+ mkdirSync19(sandbox, { recursive: true });
27372
27494
  for (const f of scenario.fixtures ?? []) {
27373
27495
  const src = join38(mmaRoot, f.source);
27374
27496
  if (!existsSync43(src)) {
27375
27497
  throw new Error(`fixture missing: ${f.source}`);
27376
27498
  }
27377
27499
  const dest = join38(sandbox, f.dest);
27378
- mkdirSync18(dirname9(dest), { recursive: true });
27500
+ mkdirSync19(dirname10(dest), { recursive: true });
27379
27501
  cpSync2(src, dest);
27380
27502
  }
27381
27503
  }
@@ -27459,7 +27581,7 @@ __export(exports_cli, {
27459
27581
  });
27460
27582
  import { rmSync as rmSync5 } from "fs";
27461
27583
  import { homedir as homedir14 } from "os";
27462
- import { join as join39, dirname as dirname10 } from "path";
27584
+ import { join as join39, dirname as dirname11 } from "path";
27463
27585
  import { fileURLToPath as fileURLToPath2 } from "url";
27464
27586
  import { existsSync as existsSync44, readFileSync as readFileSync29 } from "fs";
27465
27587
  function readVersion() {
@@ -27615,7 +27737,7 @@ var init_cli = __esm(() => {
27615
27737
  init_loader3();
27616
27738
  init_runner2();
27617
27739
  init_manifest();
27618
- HERE = dirname10(fileURLToPath2(import.meta.url));
27740
+ HERE = dirname11(fileURLToPath2(import.meta.url));
27619
27741
  MMA_ROOT = findMmaRoot(HERE);
27620
27742
  USER_SCENARIO_DIR = join39(homedir14(), ".mma", "certification", "scenarios");
27621
27743
  });
@@ -27626,12 +27748,12 @@ __export(exports_repl_commands, {
27626
27748
  registerAllCommands: () => registerAllCommands,
27627
27749
  COMMAND_GROUPS: () => COMMAND_GROUPS
27628
27750
  });
27629
- import { join as join41, dirname as dirname12 } from "path";
27751
+ import { join as join41, dirname as dirname13 } from "path";
27630
27752
  import { homedir as homedir16 } from "os";
27631
27753
  import { existsSync as existsSync46, readFileSync as readFileSync31 } from "fs";
27632
27754
  import { fileURLToPath as fileURLToPath4 } from "url";
27633
27755
  function readVersion3() {
27634
- const here = dirname12(fileURLToPath4(import.meta.url));
27756
+ const here = dirname13(fileURLToPath4(import.meta.url));
27635
27757
  const candidates = [
27636
27758
  join41(here, "..", "..", "package.json"),
27637
27759
  join41(here, "..", "package.json")
@@ -28259,7 +28381,7 @@ init_bootstrap();
28259
28381
  init_config2();
28260
28382
  init_setup();
28261
28383
  init_i18n();
28262
- import { join as join40, dirname as dirname11 } from "path";
28384
+ import { join as join40, dirname as dirname12 } from "path";
28263
28385
  import { homedir as homedir15 } from "os";
28264
28386
  import { existsSync as existsSync45, readFileSync as readFileSync30 } from "fs";
28265
28387
 
@@ -28883,7 +29005,7 @@ function createSecurityCommand(program2) {
28883
29005
  // src/cli/commands.ts
28884
29006
  import { fileURLToPath as fileURLToPath3 } from "url";
28885
29007
  function readVersion2() {
28886
- const here = dirname11(fileURLToPath3(import.meta.url));
29008
+ const here = dirname12(fileURLToPath3(import.meta.url));
28887
29009
  const candidates = [
28888
29010
  join40(here, "..", "..", "package.json"),
28889
29011
  join40(here, "..", "package.json")
@@ -29836,8 +29958,8 @@ class LineEditor {
29836
29958
  }
29837
29959
 
29838
29960
  // src/cli/repl.ts
29839
- import { existsSync as existsSync47, readFileSync as readFileSync32, writeFileSync as writeFileSync16 } from "fs";
29840
- import { join as join42, dirname as dirname13 } from "path";
29961
+ import { existsSync as existsSync47, readFileSync as readFileSync32, writeFileSync as writeFileSync17 } from "fs";
29962
+ import { join as join42, dirname as dirname14 } from "path";
29841
29963
  import { homedir as homedir17 } from "os";
29842
29964
  import { fileURLToPath as fileURLToPath5 } from "url";
29843
29965
 
@@ -30341,7 +30463,7 @@ init_box();
30341
30463
  init_i18n();
30342
30464
  init_repl_commands();
30343
30465
  function readVersion4() {
30344
- const here = dirname13(fileURLToPath5(import.meta.url));
30466
+ const here = dirname14(fileURLToPath5(import.meta.url));
30345
30467
  const candidates = [
30346
30468
  join42(here, "..", "..", "package.json"),
30347
30469
  join42(here, "..", "package.json")
@@ -30453,7 +30575,7 @@ class Repl {
30453
30575
  }
30454
30576
  saveHistory() {
30455
30577
  const allHistory = this.history.slice(-this.maxHistory);
30456
- writeFileSync16(this.historyPath, allHistory.join(`
30578
+ writeFileSync17(this.historyPath, allHistory.join(`
30457
30579
  `), "utf-8");
30458
30580
  }
30459
30581
  setupCompleter() {
@@ -30857,7 +30979,7 @@ init_config2();
30857
30979
  init_i18n();
30858
30980
  init_colors();
30859
30981
  import { existsSync as existsSync48, readFileSync as readFileSync33 } from "fs";
30860
- import { join as join43, dirname as dirname14 } from "path";
30982
+ import { join as join43, dirname as dirname15 } from "path";
30861
30983
  import { homedir as homedir18 } from "os";
30862
30984
  import { fileURLToPath as fileURLToPath6 } from "url";
30863
30985
 
@@ -31019,7 +31141,7 @@ class UpdaterModule {
31019
31141
  }
31020
31142
  // src/cli/main.ts
31021
31143
  function readVersion5() {
31022
- const here = dirname14(fileURLToPath6(import.meta.url));
31144
+ const here = dirname15(fileURLToPath6(import.meta.url));
31023
31145
  const candidates = [
31024
31146
  join43(here, "..", "..", "package.json"),
31025
31147
  join43(here, "..", "package.json")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "micro-models-agent",
3
- "version": "0.34.0",
3
+ "version": "0.35.0",
4
4
  "description": "Micro Models Agent (MMA) — LLM agent harness for small models (Qwen3.5-9B, 32K-64K context)",
5
5
  "type": "module",
6
6
  "bin": {