@kl-c/matrixos 0.3.4 → 0.3.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.
@@ -2163,7 +2163,7 @@ var package_default;
2163
2163
  var init_package = __esm(() => {
2164
2164
  package_default = {
2165
2165
  name: "@kl-c/matrixos",
2166
- version: "0.3.4",
2166
+ version: "0.3.5",
2167
2167
  description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
2168
2168
  main: "./dist/index.js",
2169
2169
  types: "dist/index.d.ts",
@@ -66431,8 +66431,18 @@ var init_model_fallback = __esm(() => {
66431
66431
  });
66432
66432
 
66433
66433
  // packages/omo-opencode/src/cli/config-manager/generate-omo-config.ts
66434
+ function randomPassphrase() {
66435
+ const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
66436
+ let out = "";
66437
+ for (let i2 = 0;i2 < 32; i2++)
66438
+ out += chars.charAt(Math.floor(Math.random() * chars.length));
66439
+ return out;
66440
+ }
66434
66441
  function generateOmoConfig(installConfig) {
66435
66442
  const config = generateModelConfig(installConfig);
66443
+ config.dashboard = {
66444
+ gatewayPassphrase: randomPassphrase()
66445
+ };
66436
66446
  if (installConfig.gatewayTelegram) {
66437
66447
  config.gateway = {
66438
66448
  enabled: true,
@@ -70050,6 +70060,7 @@ var init_tui_install_prompts = __esm(() => {
70050
70060
  });
70051
70061
 
70052
70062
  // packages/omo-opencode/src/cli/tui-installer.ts
70063
+ import { readFileSync as readFileSync17 } from "fs";
70053
70064
  async function runTuiInstaller(args, version) {
70054
70065
  if (!process.stdin.isTTY || !process.stdout.isTTY) {
70055
70066
  console.error("Error: Interactive installer requires a TTY. Use --non-interactive or set environment variables directly.");
@@ -70130,6 +70141,14 @@ async function runTuiInstaller(args, version) {
70130
70141
  return 1;
70131
70142
  }
70132
70143
  spinner2.stop(`Config written to ${import_picocolors4.default.cyan(omoResult.configPath)}`);
70144
+ try {
70145
+ const written = parseJsonc(readFileSync17(omoResult.configPath, "utf-8"));
70146
+ const dash = written.dashboard;
70147
+ if (typeof dash?.gatewayPassphrase === "string") {
70148
+ log4.success(`Dashboard gateway passphrase: ${import_picocolors4.default.bold(dash.gatewayPassphrase)}`);
70149
+ log4.info(`Save it \u2014 needed to set Telegram/Discord tokens in the dashboard at http://127.0.0.1:9123`);
70150
+ }
70151
+ } catch {}
70133
70152
  if (config.gatewayTelegram && config.gatewayTelegramToken) {
70134
70153
  try {
70135
70154
  const envPath = writeGatewayEnv(config.gatewayTelegramToken);
@@ -154615,7 +154634,7 @@ var require_filesystem = __commonJS((exports2, module2) => {
154615
154634
  var LDD_PATH = "/usr/bin/ldd";
154616
154635
  var SELF_PATH = "/proc/self/exe";
154617
154636
  var MAX_LENGTH = 2048;
154618
- var readFileSync47 = (path18) => {
154637
+ var readFileSync48 = (path18) => {
154619
154638
  const fd = fs18.openSync(path18, "r");
154620
154639
  const buffer = Buffer.alloc(MAX_LENGTH);
154621
154640
  const bytesRead = fs18.readSync(fd, buffer, 0, MAX_LENGTH, 0);
@@ -154638,7 +154657,7 @@ var require_filesystem = __commonJS((exports2, module2) => {
154638
154657
  module2.exports = {
154639
154658
  LDD_PATH,
154640
154659
  SELF_PATH,
154641
- readFileSync: readFileSync47,
154660
+ readFileSync: readFileSync48,
154642
154661
  readFile
154643
154662
  };
154644
154663
  });
@@ -154681,7 +154700,7 @@ var require_elf = __commonJS((exports2, module2) => {
154681
154700
  var require_detect_libc = __commonJS((exports2, module2) => {
154682
154701
  var childProcess = __require("child_process");
154683
154702
  var { isLinux, getReport } = require_process();
154684
- var { LDD_PATH, SELF_PATH, readFile, readFileSync: readFileSync47 } = require_filesystem();
154703
+ var { LDD_PATH, SELF_PATH, readFile, readFileSync: readFileSync48 } = require_filesystem();
154685
154704
  var { interpreterPath } = require_elf();
154686
154705
  var cachedFamilyInterpreter;
154687
154706
  var cachedFamilyFilesystem;
@@ -154772,7 +154791,7 @@ var require_detect_libc = __commonJS((exports2, module2) => {
154772
154791
  }
154773
154792
  cachedFamilyFilesystem = null;
154774
154793
  try {
154775
- const lddContent = readFileSync47(LDD_PATH);
154794
+ const lddContent = readFileSync48(LDD_PATH);
154776
154795
  cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
154777
154796
  } catch (e) {}
154778
154797
  return cachedFamilyFilesystem;
@@ -154795,7 +154814,7 @@ var require_detect_libc = __commonJS((exports2, module2) => {
154795
154814
  }
154796
154815
  cachedFamilyInterpreter = null;
154797
154816
  try {
154798
- const selfContent = readFileSync47(SELF_PATH);
154817
+ const selfContent = readFileSync48(SELF_PATH);
154799
154818
  const path18 = interpreterPath(selfContent);
154800
154819
  cachedFamilyInterpreter = familyFromInterpreterPath(path18);
154801
154820
  } catch (e) {}
@@ -154857,7 +154876,7 @@ var require_detect_libc = __commonJS((exports2, module2) => {
154857
154876
  }
154858
154877
  cachedVersionFilesystem = null;
154859
154878
  try {
154860
- const lddContent = readFileSync47(LDD_PATH);
154879
+ const lddContent = readFileSync48(LDD_PATH);
154861
154880
  const versionMatch = lddContent.match(RE_GLIBC_VERSION);
154862
154881
  if (versionMatch) {
154863
154882
  cachedVersionFilesystem = versionMatch[1];
@@ -165018,7 +165037,7 @@ __export(exports_generate, {
165018
165037
  executeGenerateCommand: () => executeGenerateCommand,
165019
165038
  ProfileNotFoundError: () => ProfileNotFoundError
165020
165039
  });
165021
- import { existsSync as existsSync72, readFileSync as readFileSync58, realpathSync as realpathSync10 } from "fs";
165040
+ import { existsSync as existsSync72, readFileSync as readFileSync59, realpathSync as realpathSync10 } from "fs";
165022
165041
  import { dirname as dirname29, isAbsolute as isAbsolute6, join as join77, resolve as resolve16 } from "path";
165023
165042
  function profilesDirFor(opts) {
165024
165043
  if (opts.profilesDir)
@@ -165116,7 +165135,7 @@ var init_generate = __esm(() => {
165116
165135
  init_src5();
165117
165136
  init_src5();
165118
165137
  REPO_ROOT = resolve16(dirname29(new URL(import.meta.url).pathname), "..", "..", "..", "..", "..");
165119
- defaultFS2 = { existsSync: existsSync72, readFileSync: readFileSync58, realpathSync: realpathSync10 };
165138
+ defaultFS2 = { existsSync: existsSync72, readFileSync: readFileSync59, realpathSync: realpathSync10 };
165120
165139
  ProfileNotFoundError = class ProfileNotFoundError extends Error {
165121
165140
  profileName;
165122
165141
  constructor(profileName) {
@@ -165370,7 +165389,7 @@ var exports_profile_resolve = {};
165370
165389
  __export(exports_profile_resolve, {
165371
165390
  executeProfileResolveCommand: () => executeProfileResolveCommand
165372
165391
  });
165373
- import { existsSync as existsSync74, readdirSync as readdirSync16, readFileSync as readFileSync59 } from "fs";
165392
+ import { existsSync as existsSync74, readdirSync as readdirSync16, readFileSync as readFileSync60 } from "fs";
165374
165393
  import { join as join80, resolve as resolve17, dirname as dirname30 } from "path";
165375
165394
  function executeProfileResolveCommand(args) {
165376
165395
  if (args.options.help) {
@@ -165417,7 +165436,7 @@ function executeProfileResolveCommand(args) {
165417
165436
  for (const file3 of profileFiles) {
165418
165437
  try {
165419
165438
  const filePath = join80(profilesDir, file3);
165420
- const raw = JSON.parse(readFileSync59(filePath, "utf-8"));
165439
+ const raw = JSON.parse(readFileSync60(filePath, "utf-8"));
165421
165440
  const profile2 = ProfileSchema.parse(raw);
165422
165441
  registry2[profile2.name] = profile2;
165423
165442
  } catch {}
@@ -165479,7 +165498,7 @@ __export(exports_export, {
165479
165498
  getShell: () => getShell,
165480
165499
  executeExportCommand: () => executeExportCommand
165481
165500
  });
165482
- import { existsSync as existsSync75, readFileSync as readFileSync60, writeFileSync as writeFileSync26, copyFileSync as copyFileSync8, realpathSync as realpathSync11, mkdirSync as mkdirSync27 } from "fs";
165501
+ import { existsSync as existsSync75, readFileSync as readFileSync61, writeFileSync as writeFileSync26, copyFileSync as copyFileSync8, realpathSync as realpathSync11, mkdirSync as mkdirSync27 } from "fs";
165483
165502
  import { isAbsolute as isAbsolute7, join as join81, resolve as resolve18, dirname as dirname31 } from "path";
165484
165503
  import { spawnSync as spawnSync4 } from "child_process";
165485
165504
  function setShell(shell) {
@@ -165603,7 +165622,7 @@ var init_export = __esm(() => {
165603
165622
  activeShell = defaultShell;
165604
165623
  defaultExportFS = {
165605
165624
  existsSync: existsSync75,
165606
- readFileSync: readFileSync60,
165625
+ readFileSync: readFileSync61,
165607
165626
  writeFileSync: writeFileSync26,
165608
165627
  copyFileSync: copyFileSync8,
165609
165628
  realpathSync: realpathSync11,
@@ -165631,7 +165650,7 @@ __export(exports_project_context, {
165631
165650
  createProject: () => createProject,
165632
165651
  archiveProject: () => archiveProject
165633
165652
  });
165634
- import { existsSync as existsSync76, mkdirSync as mkdirSync28, readFileSync as readFileSync61, writeFileSync as writeFileSync27, rmSync as rmSync8 } from "fs";
165653
+ import { existsSync as existsSync76, mkdirSync as mkdirSync28, readFileSync as readFileSync62, writeFileSync as writeFileSync27, rmSync as rmSync8 } from "fs";
165635
165654
  import { join as join82 } from "path";
165636
165655
  function getMatrixOsDir(cwd = process.cwd()) {
165637
165656
  return join82(cwd, ".matrixos");
@@ -165650,7 +165669,7 @@ function loadState(cwd) {
165650
165669
  if (!existsSync76(path29))
165651
165670
  return {};
165652
165671
  try {
165653
- return JSON.parse(readFileSync61(path29, "utf-8"));
165672
+ return JSON.parse(readFileSync62(path29, "utf-8"));
165654
165673
  } catch {
165655
165674
  return {};
165656
165675
  }
@@ -165666,7 +165685,7 @@ function loadProjectMeta(slug, cwd) {
165666
165685
  if (!existsSync76(path29))
165667
165686
  return null;
165668
165687
  try {
165669
- return JSON.parse(readFileSync61(path29, "utf-8"));
165688
+ return JSON.parse(readFileSync62(path29, "utf-8"));
165670
165689
  } catch {
165671
165690
  return null;
165672
165691
  }
@@ -165792,7 +165811,7 @@ __export(exports_project_memory, {
165792
165811
  isProjectEpisode: () => isProjectEpisode,
165793
165812
  addKbDocument: () => addKbDocument
165794
165813
  });
165795
- import { existsSync as existsSync77, mkdirSync as mkdirSync29, readFileSync as readFileSync62, readdirSync as readdirSync17, writeFileSync as writeFileSync28 } from "fs";
165814
+ import { existsSync as existsSync77, mkdirSync as mkdirSync29, readFileSync as readFileSync63, readdirSync as readdirSync17, writeFileSync as writeFileSync28 } from "fs";
165796
165815
  import { join as join83 } from "path";
165797
165816
  function tagWithProject(metadata = {}, projectSlug, cwd) {
165798
165817
  const active = projectSlug ?? getActiveProject(cwd)?.slug;
@@ -165816,7 +165835,7 @@ function listKbDocuments(projectSlug, cwd) {
165816
165835
  continue;
165817
165836
  const path29 = join83(kbDir, entry.name);
165818
165837
  try {
165819
- docs.push({ path: path29, content: readFileSync62(path29, "utf-8") });
165838
+ docs.push({ path: path29, content: readFileSync63(path29, "utf-8") });
165820
165839
  } catch {}
165821
165840
  }
165822
165841
  return docs;
@@ -166238,12 +166257,12 @@ __export(exports_gateway_start, {
166238
166257
  buildTelegramConfig: () => buildTelegramConfig,
166239
166258
  buildGatewayConfig: () => buildGatewayConfig
166240
166259
  });
166241
- import { readFileSync as readFileSync63, existsSync as existsSync78 } from "fs";
166260
+ import { readFileSync as readFileSync64, existsSync as existsSync78 } from "fs";
166242
166261
  import { resolve as resolve19 } from "path";
166243
166262
  function loadGatewayEnv(path29 = ENV_PATH) {
166244
166263
  if (!existsSync78(path29))
166245
166264
  return {};
166246
- const text = readFileSync63(path29, "utf8");
166265
+ const text = readFileSync64(path29, "utf8");
166247
166266
  const out = {};
166248
166267
  for (const raw of text.split(/\r?\n/)) {
166249
166268
  const line = raw.trim();
@@ -166713,7 +166732,7 @@ var init_deployment = __esm(() => {
166713
166732
  });
166714
166733
 
166715
166734
  // packages/omo-opencode/src/audit/self-audit.ts
166716
- import { existsSync as existsSync80, mkdirSync as mkdirSync30, readdirSync as readdirSync18, readFileSync as readFileSync64, writeFileSync as writeFileSync29 } from "fs";
166735
+ import { existsSync as existsSync80, mkdirSync as mkdirSync30, readdirSync as readdirSync18, readFileSync as readFileSync65, writeFileSync as writeFileSync29 } from "fs";
166717
166736
  import { join as join84 } from "path";
166718
166737
  function getAuditDir(cwd = process.cwd()) {
166719
166738
  return join84(cwd, ".matrixos", "audits");
@@ -169367,7 +169386,7 @@ var BOULDER_STATE_PATH = `${BOULDER_DIR}/${BOULDER_FILE}`;
169367
169386
  var NOTEPAD_DIR = "notepads";
169368
169387
  var NOTEPAD_BASE_PATH = `${BOULDER_DIR}/${NOTEPAD_DIR}`;
169369
169388
  // packages/boulder-state/src/top-level-task.ts
169370
- import { existsSync as existsSync32, readFileSync as readFileSync19 } from "fs";
169389
+ import { existsSync as existsSync32, readFileSync as readFileSync20 } from "fs";
169371
169390
  var TODO_HEADING_PATTERN = /^##\s+TODOs\b/i;
169372
169391
  var FINAL_VERIFICATION_HEADING_PATTERN = /^##\s+Final Verification Wave\b/i;
169373
169392
  var SECOND_LEVEL_HEADING_PATTERN = /^##\s+/;
@@ -169394,7 +169413,7 @@ function readCurrentTopLevelTask(planPath) {
169394
169413
  return null;
169395
169414
  }
169396
169415
  try {
169397
- const content = readFileSync19(planPath, "utf-8");
169416
+ const content = readFileSync20(planPath, "utf-8");
169398
169417
  const lines = content.split(/\r?\n/);
169399
169418
  let section = "other";
169400
169419
  for (const line of lines) {
@@ -169446,7 +169465,7 @@ function resolveBoulderPlanPathForWork(directory, work) {
169446
169465
  return resolveBoulderPlanPath(directory, work);
169447
169466
  }
169448
169467
  // packages/boulder-state/src/storage/plan-progress.ts
169449
- import { existsSync as existsSync34, readFileSync as readFileSync20, readdirSync as readdirSync5, statSync as statSync5 } from "fs";
169468
+ import { existsSync as existsSync34, readFileSync as readFileSync21, readdirSync as readdirSync5, statSync as statSync5 } from "fs";
169450
169469
  var TODO_HEADING_PATTERN2 = /^##\s+TODOs\b/i;
169451
169470
  var FINAL_VERIFICATION_HEADING_PATTERN2 = /^##\s+Final Verification Wave\b/i;
169452
169471
  var SECOND_LEVEL_HEADING_PATTERN2 = /^##\s+/;
@@ -169459,7 +169478,7 @@ function getPlanProgress(planPath) {
169459
169478
  return { total: 0, completed: 0, isComplete: false };
169460
169479
  }
169461
169480
  try {
169462
- const content = readFileSync20(planPath, "utf-8");
169481
+ const content = readFileSync21(planPath, "utf-8");
169463
169482
  const lines = content.split(/\r?\n/);
169464
169483
  const hasStructuredSections = lines.some((line) => TODO_HEADING_PATTERN2.test(line) || FINAL_VERIFICATION_HEADING_PATTERN2.test(line));
169465
169484
  if (hasStructuredSections) {
@@ -169575,14 +169594,14 @@ function selectMirrorWork(state) {
169575
169594
  return sorted[0] ?? null;
169576
169595
  }
169577
169596
  // packages/boulder-state/src/storage/read-state.ts
169578
- import { existsSync as existsSync35, readFileSync as readFileSync21 } from "fs";
169597
+ import { existsSync as existsSync35, readFileSync as readFileSync22 } from "fs";
169579
169598
  function readBoulderState(directory) {
169580
169599
  const filePath = getBoulderFilePath(directory);
169581
169600
  if (!existsSync35(filePath)) {
169582
169601
  return null;
169583
169602
  }
169584
169603
  try {
169585
- const content = readFileSync21(filePath, "utf-8");
169604
+ const content = readFileSync22(filePath, "utf-8");
169586
169605
  const parsed = JSON.parse(content);
169587
169606
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
169588
169607
  return null;
@@ -169648,7 +169667,7 @@ init_state();
169648
169667
  // packages/omo-opencode/src/features/run-continuation-state/constants.ts
169649
169668
  var CONTINUATION_MARKER_DIR = ".omo/run-continuation";
169650
169669
  // packages/omo-opencode/src/features/run-continuation-state/storage.ts
169651
- import { existsSync as existsSync36, mkdirSync as mkdirSync12, readFileSync as readFileSync22, rmSync as rmSync2, writeFileSync as writeFileSync9 } from "fs";
169670
+ import { existsSync as existsSync36, mkdirSync as mkdirSync12, readFileSync as readFileSync23, rmSync as rmSync2, writeFileSync as writeFileSync9 } from "fs";
169652
169671
  import { join as join31 } from "path";
169653
169672
  function getMarkerPath(directory, sessionID) {
169654
169673
  return join31(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
@@ -169658,7 +169677,7 @@ function readContinuationMarker(directory, sessionID) {
169658
169677
  if (!existsSync36(markerPath))
169659
169678
  return null;
169660
169679
  try {
169661
- const raw = readFileSync22(markerPath, "utf-8");
169680
+ const raw = readFileSync23(markerPath, "utf-8");
169662
169681
  const parsed = JSON.parse(raw);
169663
169682
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
169664
169683
  return null;
@@ -169723,7 +169742,7 @@ async function isSessionInBoulderLineage(input) {
169723
169742
  // packages/omo-opencode/src/hooks/the-operator/session-last-agent.ts
169724
169743
  init_shared();
169725
169744
  init_compaction_marker();
169726
- import { readFileSync as readFileSync23, readdirSync as readdirSync6 } from "fs";
169745
+ import { readFileSync as readFileSync24, readdirSync as readdirSync6 } from "fs";
169727
169746
  import { join as join32 } from "path";
169728
169747
  var defaultSessionLastAgentDeps = {
169729
169748
  getMessageDir,
@@ -169784,7 +169803,7 @@ async function getLastAgentFromSession(sessionID, client3, deps = {}) {
169784
169803
  try {
169785
169804
  const messages = readdirSync6(messageDir).filter((fileName) => fileName.endsWith(".json")).map((fileName) => {
169786
169805
  try {
169787
- const content = readFileSync23(join32(messageDir, fileName), "utf-8");
169806
+ const content = readFileSync24(join32(messageDir, fileName), "utf-8");
169788
169807
  const parsed = JSON.parse(content);
169789
169808
  return {
169790
169809
  fileName,
@@ -169827,7 +169846,7 @@ init_agent_display_names();
169827
169846
 
169828
169847
  // packages/omo-opencode/src/hooks/ralph-loop/storage.ts
169829
169848
  init_frontmatter2();
169830
- import { existsSync as existsSync37, readFileSync as readFileSync24, writeFileSync as writeFileSync10, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "fs";
169849
+ import { existsSync as existsSync37, readFileSync as readFileSync25, writeFileSync as writeFileSync10, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "fs";
169831
169850
  import { dirname as dirname13, join as join33 } from "path";
169832
169851
 
169833
169852
  // packages/omo-opencode/src/hooks/ralph-loop/constants.ts
@@ -169845,7 +169864,7 @@ function readState(directory, customPath) {
169845
169864
  return null;
169846
169865
  }
169847
169866
  try {
169848
- const content = readFileSync24(filePath, "utf-8");
169867
+ const content = readFileSync25(filePath, "utf-8");
169849
169868
  const { data, body } = parseFrontmatter(content);
169850
169869
  const active = data.active;
169851
169870
  const iteration = data.iteration;
@@ -170420,7 +170439,7 @@ function createTimestampedStdoutController(stdout2 = process.stdout) {
170420
170439
  // packages/telemetry-core/src/activity-state.ts
170421
170440
  init_atomic_write();
170422
170441
  init_xdg_data_dir();
170423
- import { existsSync as existsSync38, mkdirSync as mkdirSync14, readFileSync as readFileSync25 } from "fs";
170442
+ import { existsSync as existsSync38, mkdirSync as mkdirSync14, readFileSync as readFileSync26 } from "fs";
170424
170443
  import { basename as basename6, join as join34 } from "path";
170425
170444
  var POSTHOG_ACTIVITY_STATE_FILE = "posthog-activity.json";
170426
170445
  function resolveTelemetryStateDir(product, options = {}) {
@@ -170464,7 +170483,7 @@ function readPostHogActivityState(stateDir, diagnostics) {
170464
170483
  return {};
170465
170484
  }
170466
170485
  try {
170467
- const stateContent = readFileSync25(stateFilePath, "utf-8");
170486
+ const stateContent = readFileSync26(stateFilePath, "utf-8");
170468
170487
  const stateJson = JSON.parse(stateContent);
170469
170488
  if (!isPostHogActivityState(stateJson)) {
170470
170489
  return {};
@@ -177587,7 +177606,7 @@ init_constants5();
177587
177606
 
177588
177607
  // packages/omo-opencode/src/cli/doctor/checks/system.ts
177589
177608
  init_constants5();
177590
- import { existsSync as existsSync49, readFileSync as readFileSync35 } from "fs";
177609
+ import { existsSync as existsSync49, readFileSync as readFileSync36 } from "fs";
177591
177610
 
177592
177611
  // packages/omo-opencode/src/cli/doctor/checks/system-binary.ts
177593
177612
  init_extract_semver();
@@ -177784,7 +177803,7 @@ function compareVersions3(current, minimum) {
177784
177803
 
177785
177804
  // packages/omo-opencode/src/cli/doctor/checks/system-plugin.ts
177786
177805
  init_shared();
177787
- import { existsSync as existsSync47, readFileSync as readFileSync33 } from "fs";
177806
+ import { existsSync as existsSync47, readFileSync as readFileSync34 } from "fs";
177788
177807
  function detectConfigPath() {
177789
177808
  const paths2 = getOpenCodeConfigPaths({ binary: "opencode", version: null });
177790
177809
  if (existsSync47(paths2.configJsonc))
@@ -177835,7 +177854,7 @@ function getPluginInfo() {
177835
177854
  };
177836
177855
  }
177837
177856
  try {
177838
- const content = readFileSync33(configPath, "utf-8");
177857
+ const content = readFileSync34(configPath, "utf-8");
177839
177858
  const parsedConfig = parseJsonc(content);
177840
177859
  const pluginEntry = findPluginEntry2(parsedConfig.plugin ?? []);
177841
177860
  if (!pluginEntry) {
@@ -177879,7 +177898,7 @@ init_auto_update_checker();
177879
177898
  init_package_json_locator();
177880
177899
  init_constants5();
177881
177900
  init_shared();
177882
- import { existsSync as existsSync48, readFileSync as readFileSync34, readdirSync as readdirSync8 } from "fs";
177901
+ import { existsSync as existsSync48, readFileSync as readFileSync35, readdirSync as readdirSync8 } from "fs";
177883
177902
  import { createRequire as createRequire2 } from "module";
177884
177903
  import { homedir as homedir13 } from "os";
177885
177904
  import { join as join42 } from "path";
@@ -177910,7 +177929,7 @@ function readPackageJson(filePath) {
177910
177929
  if (!existsSync48(filePath))
177911
177930
  return null;
177912
177931
  try {
177913
- const content = readFileSync34(filePath, "utf-8");
177932
+ const content = readFileSync35(filePath, "utf-8");
177914
177933
  return parseJsonc(content);
177915
177934
  } catch (error51) {
177916
177935
  if (!(error51 instanceof Error)) {
@@ -178044,7 +178063,7 @@ var defaultDeps6 = {
178044
178063
  getLatestPluginVersion,
178045
178064
  getSuggestedInstallTag,
178046
178065
  configExists: existsSync49,
178047
- readConfigFile: (path14) => readFileSync35(path14, "utf-8"),
178066
+ readConfigFile: (path14) => readFileSync36(path14, "utf-8"),
178048
178067
  parseConfigContent: (content) => parseJsonc(content)
178049
178068
  };
178050
178069
  var BUN_POSTINSTALL_HELPER_PACKAGE_NAME = "@code-yeongyu/comment-checker";
@@ -178189,7 +178208,7 @@ async function checkSystem(deps = defaultDeps6) {
178189
178208
 
178190
178209
  // packages/omo-opencode/src/config/validate.ts
178191
178210
  init_src();
178192
- import { readFileSync as readFileSync36 } from "fs";
178211
+ import { readFileSync as readFileSync37 } from "fs";
178193
178212
  import { homedir as homedir14 } from "os";
178194
178213
  import { dirname as dirname19, relative as relative5 } from "path";
178195
178214
  init_shared();
@@ -178234,7 +178253,7 @@ function schemaMessages(configPath, rawConfig) {
178234
178253
  }
178235
178254
  function parseLayerConfig(configPath) {
178236
178255
  try {
178237
- const content = readFileSync36(configPath, "utf-8");
178256
+ const content = readFileSync37(configPath, "utf-8");
178238
178257
  const rawConfig = parseJsonc(content);
178239
178258
  if (!isPlainRecord(rawConfig)) {
178240
178259
  return {
@@ -178306,7 +178325,7 @@ init_constants5();
178306
178325
 
178307
178326
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-cache.ts
178308
178327
  init_shared();
178309
- import { existsSync as existsSync50, readFileSync as readFileSync37 } from "fs";
178328
+ import { existsSync as existsSync50, readFileSync as readFileSync38 } from "fs";
178310
178329
  import { homedir as homedir15 } from "os";
178311
178330
  import { join as join43 } from "path";
178312
178331
  function getUserConfigDir2() {
@@ -178325,7 +178344,7 @@ function loadCustomProviderNames() {
178325
178344
  if (!existsSync50(configPath))
178326
178345
  continue;
178327
178346
  try {
178328
- const content = readFileSync37(configPath, "utf-8");
178347
+ const content = readFileSync38(configPath, "utf-8");
178329
178348
  const data = parseJsonc(content);
178330
178349
  if (data?.provider && typeof data.provider === "object") {
178331
178350
  return Object.keys(data.provider);
@@ -178349,7 +178368,7 @@ function loadAvailableModelsFromCache() {
178349
178368
  return { providers: [], modelCount: 0, cacheExists: false };
178350
178369
  }
178351
178370
  try {
178352
- const content = readFileSync37(cacheFile, "utf-8");
178371
+ const content = readFileSync38(cacheFile, "utf-8");
178353
178372
  const data = parseJsonc(content);
178354
178373
  const cacheProviders = Object.keys(data);
178355
178374
  let modelCount = 0;
@@ -178377,7 +178396,7 @@ init_constants5();
178377
178396
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-config.ts
178378
178397
  init_shared();
178379
178398
  init_plugin_identity();
178380
- import { readFileSync as readFileSync38 } from "fs";
178399
+ import { readFileSync as readFileSync39 } from "fs";
178381
178400
  import { join as join44 } from "path";
178382
178401
  var PROJECT_CONFIG_DIR = join44(process.cwd(), ".opencode");
178383
178402
  function loadOmoConfig() {
@@ -178387,7 +178406,7 @@ function loadOmoConfig() {
178387
178406
  });
178388
178407
  if (projectDetected.format !== "none") {
178389
178408
  try {
178390
- const content = readFileSync38(projectDetected.path, "utf-8");
178409
+ const content = readFileSync39(projectDetected.path, "utf-8");
178391
178410
  return parseJsonc(content);
178392
178411
  } catch (error51) {
178393
178412
  if (error51 instanceof Error) {
@@ -178403,7 +178422,7 @@ function loadOmoConfig() {
178403
178422
  });
178404
178423
  if (userDetected.format !== "none") {
178405
178424
  try {
178406
- const content = readFileSync38(userDetected.path, "utf-8");
178425
+ const content = readFileSync39(userDetected.path, "utf-8");
178407
178426
  return parseJsonc(content);
178408
178427
  } catch (error51) {
178409
178428
  if (error51 instanceof Error) {
@@ -178984,13 +179003,13 @@ async function getGhCliInfo(dependencies = {}) {
178984
179003
  }
178985
179004
 
178986
179005
  // packages/omo-opencode/src/cli/doctor/checks/tools-lsp.ts
178987
- import { readFileSync as readFileSync40 } from "fs";
179006
+ import { readFileSync as readFileSync41 } from "fs";
178988
179007
  import { join as join48 } from "path";
178989
179008
 
178990
179009
  // packages/omo-opencode/src/mcp/lsp.ts
178991
179010
  init_zod();
178992
179011
  init_opencode_config_dir();
178993
- import { existsSync as existsSync52, readFileSync as readFileSync39 } from "fs";
179012
+ import { existsSync as existsSync52, readFileSync as readFileSync40 } from "fs";
178994
179013
  import { delimiter as delimiter3, dirname as dirname21, resolve as resolve10 } from "path";
178995
179014
  import { fileURLToPath as fileURLToPath6 } from "url";
178996
179015
 
@@ -179134,7 +179153,7 @@ function findBootstrapRoot(candidates, pathExists) {
179134
179153
  }
179135
179154
  function readDaemonPackageVersion(root) {
179136
179155
  try {
179137
- const packageJson = JSON.parse(readFileSync39(resolve10(root, PACKAGE_REL, "package.json"), "utf-8"));
179156
+ const packageJson = JSON.parse(readFileSync40(resolve10(root, PACKAGE_REL, "package.json"), "utf-8"));
179138
179157
  return DaemonPackageSchema.parse(packageJson).version;
179139
179158
  } catch (error51) {
179140
179159
  if (!(error51 instanceof Error))
@@ -179211,7 +179230,7 @@ function readOmoConfig(configDirectory) {
179211
179230
  return null;
179212
179231
  }
179213
179232
  try {
179214
- const content = readFileSync40(detected.path, "utf-8");
179233
+ const content = readFileSync41(detected.path, "utf-8");
179215
179234
  return parseJsonc(content);
179216
179235
  } catch (error51) {
179217
179236
  if (!(error51 instanceof Error)) {
@@ -179241,7 +179260,7 @@ function getInstalledLspServers(options = {}) {
179241
179260
 
179242
179261
  // packages/omo-opencode/src/cli/doctor/checks/tools-mcp.ts
179243
179262
  init_shared();
179244
- import { existsSync as existsSync53, readFileSync as readFileSync41 } from "fs";
179263
+ import { existsSync as existsSync53, readFileSync as readFileSync42 } from "fs";
179245
179264
  import { homedir as homedir18 } from "os";
179246
179265
  import { join as join49 } from "path";
179247
179266
  var BUILTIN_MCP_SERVERS = ["websearch", "context7", "grep_app", "lsp"];
@@ -179258,7 +179277,7 @@ function loadUserMcpConfig() {
179258
179277
  if (!existsSync53(configPath))
179259
179278
  continue;
179260
179279
  try {
179261
- const content = readFileSync41(configPath, "utf-8");
179280
+ const content = readFileSync42(configPath, "utf-8");
179262
179281
  const config5 = parseJsonc(content);
179263
179282
  if (config5.mcpServers) {
179264
179283
  Object.assign(servers, config5.mcpServers);
@@ -179393,7 +179412,7 @@ async function checkTools() {
179393
179412
  }
179394
179413
 
179395
179414
  // packages/omo-opencode/src/cli/doctor/checks/telemetry.ts
179396
- import { existsSync as existsSync54, readFileSync as readFileSync42 } from "fs";
179415
+ import { existsSync as existsSync54, readFileSync as readFileSync43 } from "fs";
179397
179416
  init_constants5();
179398
179417
  function isTelemetryState(value) {
179399
179418
  return value !== null && typeof value === "object" && !Array.isArray(value);
@@ -179404,7 +179423,7 @@ function readLastActiveDay(stateFilePath) {
179404
179423
  }
179405
179424
  let parsed;
179406
179425
  try {
179407
- parsed = JSON.parse(readFileSync42(stateFilePath, "utf-8"));
179426
+ parsed = JSON.parse(readFileSync43(stateFilePath, "utf-8"));
179408
179427
  } catch (error51) {
179409
179428
  if (error51 instanceof Error) {
179410
179429
  return "unreadable";
@@ -179480,7 +179499,7 @@ function expandHomeDirectory(directoryPath) {
179480
179499
  init_constants5();
179481
179500
  init_shared();
179482
179501
  init_plugin_identity();
179483
- import { readFileSync as readFileSync43, promises as fs15 } from "fs";
179502
+ import { readFileSync as readFileSync44, promises as fs15 } from "fs";
179484
179503
  import path15 from "path";
179485
179504
  async function checkTeamMode() {
179486
179505
  const config5 = loadTeamModeConfig();
@@ -179517,7 +179536,7 @@ function loadTeamModeConfig() {
179517
179536
  if (!configPath)
179518
179537
  return { team_mode: undefined };
179519
179538
  try {
179520
- return parseJsonc(readFileSync43(configPath, "utf-8"));
179539
+ return parseJsonc(readFileSync44(configPath, "utf-8"));
179521
179540
  } catch (error51) {
179522
179541
  if (error51 instanceof Error) {
179523
179542
  return { team_mode: undefined };
@@ -179958,7 +179977,7 @@ import {
179958
179977
  existsSync as existsSync57,
179959
179978
  mkdirSync as mkdirSync16,
179960
179979
  readdirSync as readdirSync9,
179961
- readFileSync as readFileSync45,
179980
+ readFileSync as readFileSync46,
179962
179981
  renameSync as renameSync7,
179963
179982
  unlinkSync as unlinkSync9,
179964
179983
  writeFileSync as writeFileSync14
@@ -179991,7 +180010,7 @@ function getOpenCodeCliConfigDir(env2 = process.env) {
179991
180010
  }
179992
180011
 
179993
180012
  // packages/mcp-client-core/src/mcp-oauth/storage-index.ts
179994
- import { chmodSync as chmodSync5, existsSync as existsSync56, readFileSync as readFileSync44, renameSync as renameSync6, writeFileSync as writeFileSync13 } from "fs";
180013
+ import { chmodSync as chmodSync5, existsSync as existsSync56, readFileSync as readFileSync45, renameSync as renameSync6, writeFileSync as writeFileSync13 } from "fs";
179995
180014
  import { join as join51 } from "path";
179996
180015
  var INDEX_FILE_NAME = "index.json";
179997
180016
  function isTokenIndex(value) {
@@ -180007,7 +180026,7 @@ function readTokenIndex(storageDir) {
180007
180026
  if (!existsSync56(indexPath))
180008
180027
  return {};
180009
180028
  try {
180010
- const parsed = JSON.parse(readFileSync44(indexPath, "utf-8"));
180029
+ const parsed = JSON.parse(readFileSync45(indexPath, "utf-8"));
180011
180030
  return isTokenIndex(parsed) ? parsed : {};
180012
180031
  } catch (readError) {
180013
180032
  if (!(readError instanceof Error))
@@ -180117,7 +180136,7 @@ function readTokenFile(filePath) {
180117
180136
  if (!existsSync57(filePath))
180118
180137
  return null;
180119
180138
  try {
180120
- const parsed = JSON.parse(readFileSync45(filePath, "utf-8"));
180139
+ const parsed = JSON.parse(readFileSync46(filePath, "utf-8"));
180121
180140
  return isOAuthTokenData(parsed) ? parsed : null;
180122
180141
  } catch (readError) {
180123
180142
  if (!(readError instanceof Error))
@@ -180130,7 +180149,7 @@ function readLegacyStore() {
180130
180149
  if (!existsSync57(filePath))
180131
180150
  return null;
180132
180151
  try {
180133
- const parsed = JSON.parse(readFileSync45(filePath, "utf-8"));
180152
+ const parsed = JSON.parse(readFileSync46(filePath, "utf-8"));
180134
180153
  if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed))
180135
180154
  return null;
180136
180155
  const result = {};
@@ -180943,7 +180962,7 @@ function createEmbeddingPort() {
180943
180962
  // packages/learning-loop/src/codebase-scanner.ts
180944
180963
  var import_picomatch = __toESM(require_picomatch2(), 1);
180945
180964
  import { createHash as createHash5 } from "crypto";
180946
- import { readdirSync as readdirSync10, readFileSync as readFileSync47, statSync as statSync7, existsSync as existsSync59 } from "fs";
180965
+ import { readdirSync as readdirSync10, readFileSync as readFileSync48, statSync as statSync7, existsSync as existsSync59 } from "fs";
180947
180966
  import { join as join53, relative as relative6, extname as extname3 } from "path";
180948
180967
  var EXT_TO_LANG = {
180949
180968
  ts: "typescript",
@@ -181011,7 +181030,7 @@ function defaultFs() {
181011
181030
  return readdirSync10(path18);
181012
181031
  },
181013
181032
  readFile(path18) {
181014
- return readFileSync47(path18, "utf-8");
181033
+ return readFileSync48(path18, "utf-8");
181015
181034
  },
181016
181035
  stat(path18) {
181017
181036
  const s = statSync7(path18);
@@ -181364,7 +181383,7 @@ function formatSearchResults(result) {
181364
181383
  }
181365
181384
 
181366
181385
  // packages/learning-loop/src/improvement.ts
181367
- import { existsSync as existsSync60, mkdirSync as mkdirSync18, readFileSync as readFileSync48, writeFileSync as writeFileSync16 } from "fs";
181386
+ import { existsSync as existsSync60, mkdirSync as mkdirSync18, readFileSync as readFileSync49, writeFileSync as writeFileSync16 } from "fs";
181368
181387
  import { join as join54, basename as basename10 } from "path";
181369
181388
  function createImprovementStore(improvementsDir) {
181370
181389
  if (!existsSync60(improvementsDir)) {
@@ -181391,7 +181410,7 @@ function createImprovementStore(improvementsDir) {
181391
181410
  function get(id) {
181392
181411
  const filePath = join54(improvementsDir, `${id}.json`);
181393
181412
  try {
181394
- const raw = readFileSync48(filePath, "utf-8");
181413
+ const raw = readFileSync49(filePath, "utf-8");
181395
181414
  return JSON.parse(raw);
181396
181415
  } catch {
181397
181416
  return null;
@@ -183518,9 +183537,9 @@ playwright-cli close
183518
183537
  // packages/skills-loader-core/src/features/builtin-skills/skill-file-loader.ts
183519
183538
  init_shared_skills();
183520
183539
  init_src();
183521
- import { readFileSync as readFileSync51 } from "fs";
183540
+ import { readFileSync as readFileSync52 } from "fs";
183522
183541
  import { join as join64 } from "path";
183523
- function createSharedSkillTemplateLoader(readFile3 = readFileSync51, skillsRootPath = sharedSkillsRootPath()) {
183542
+ function createSharedSkillTemplateLoader(readFile3 = readFileSync52, skillsRootPath = sharedSkillsRootPath()) {
183524
183543
  const cache = new Map;
183525
183544
  return (skillName) => {
183526
183545
  const cached2 = cache.get(skillName);
@@ -185880,7 +185899,7 @@ import {
185880
185899
  existsSync as existsSync67,
185881
185900
  mkdirSync as mkdirSync21,
185882
185901
  copyFileSync as copyFileSync4,
185883
- readFileSync as readFileSync52,
185902
+ readFileSync as readFileSync53,
185884
185903
  writeFileSync as writeFileSync19,
185885
185904
  readdirSync as readdirSync11,
185886
185905
  statSync as statSync8,
@@ -185897,7 +185916,7 @@ async function snapshotCli(options = {}) {
185897
185916
  const realFs = {
185898
185917
  existsSync: existsSync67,
185899
185918
  mkdirSync: mkdirSync21,
185900
- readFileSync: readFileSync52,
185919
+ readFileSync: readFileSync53,
185901
185920
  writeFileSync: writeFileSync19,
185902
185921
  copyFileSync: copyFileSync4,
185903
185922
  readdirSync: readdirSync11,
@@ -185963,7 +185982,7 @@ import {
185963
185982
  existsSync as existsSync68,
185964
185983
  mkdirSync as mkdirSync22,
185965
185984
  copyFileSync as copyFileSync5,
185966
- readFileSync as readFileSync53,
185985
+ readFileSync as readFileSync54,
185967
185986
  writeFileSync as writeFileSync20,
185968
185987
  readdirSync as readdirSync12,
185969
185988
  statSync as statSync9,
@@ -185976,7 +185995,7 @@ async function restoreCli(options) {
185976
185995
  const realFs = {
185977
185996
  existsSync: existsSync68,
185978
185997
  mkdirSync: mkdirSync22,
185979
- readFileSync: readFileSync53,
185998
+ readFileSync: readFileSync54,
185980
185999
  writeFileSync: writeFileSync20,
185981
186000
  copyFileSync: copyFileSync5,
185982
186001
  readdirSync: readdirSync12,
@@ -185991,7 +186010,7 @@ async function restoreCli(options) {
185991
186010
  try {
185992
186011
  restoreSnapshot(options.state, { snapshotDir, fs: realFs });
185993
186012
  const manifestPath = path19.join(snapshotDir, options.state, "manifest.json");
185994
- const raw = readFileSync53(manifestPath).toString("utf-8");
186013
+ const raw = readFileSync54(manifestPath).toString("utf-8");
185995
186014
  const parsed = JSON.parse(raw);
185996
186015
  const fileCount = typeof parsed === "object" && parsed !== null && "files" in parsed && Array.isArray(parsed.files) ? parsed.files.length : 0;
185997
186016
  if (options.json) {
@@ -186015,7 +186034,7 @@ import {
186015
186034
  existsSync as existsSync69,
186016
186035
  mkdirSync as mkdirSync23,
186017
186036
  copyFileSync as copyFileSync6,
186018
- readFileSync as readFileSync54,
186037
+ readFileSync as readFileSync55,
186019
186038
  writeFileSync as writeFileSync21,
186020
186039
  readdirSync as readdirSync13,
186021
186040
  statSync as statSync10,
@@ -186038,7 +186057,7 @@ async function snapshotListCli(options) {
186038
186057
  const realFs = {
186039
186058
  existsSync: existsSync69,
186040
186059
  mkdirSync: mkdirSync23,
186041
- readFileSync: readFileSync54,
186060
+ readFileSync: readFileSync55,
186042
186061
  writeFileSync: writeFileSync21,
186043
186062
  copyFileSync: copyFileSync6,
186044
186063
  readdirSync: readdirSync13,
@@ -186069,7 +186088,7 @@ import {
186069
186088
  existsSync as existsSync70,
186070
186089
  mkdirSync as mkdirSync24,
186071
186090
  copyFileSync as copyFileSync7,
186072
- readFileSync as readFileSync55,
186091
+ readFileSync as readFileSync56,
186073
186092
  writeFileSync as writeFileSync22,
186074
186093
  readdirSync as readdirSync14,
186075
186094
  statSync as statSync11,
@@ -186082,7 +186101,7 @@ async function snapshotPruneCli(options = {}) {
186082
186101
  const realFs = {
186083
186102
  existsSync: existsSync70,
186084
186103
  mkdirSync: mkdirSync24,
186085
- readFileSync: readFileSync55,
186104
+ readFileSync: readFileSync56,
186086
186105
  writeFileSync: writeFileSync22,
186087
186106
  copyFileSync: copyFileSync7,
186088
186107
  readdirSync: readdirSync14,
@@ -186603,7 +186622,7 @@ async function traceCli(sessionId, options = {}) {
186603
186622
 
186604
186623
  // packages/omo-opencode/src/cli/dashboard.ts
186605
186624
  import * as path25 from "path";
186606
- import { readFileSync as readFileSync57 } from "fs";
186625
+ import { readFileSync as readFileSync58 } from "fs";
186607
186626
 
186608
186627
  // packages/omo-opencode/src/features/dashboard/data-provider.ts
186609
186628
  import * as os12 from "os";
@@ -187387,7 +187406,7 @@ function loadGatewayPassphrase() {
187387
187406
  try {
187388
187407
  const configDir = getConfigDir();
187389
187408
  const configPath = path25.join(configDir, "matrixos.jsonc");
187390
- const raw = readFileSync57(configPath, "utf-8");
187409
+ const raw = readFileSync58(configPath, "utf-8");
187391
187410
  const config5 = parseJsonc(raw);
187392
187411
  const dashboard2 = config5.dashboard;
187393
187412
  return typeof dashboard2?.gatewayPassphrase === "string" ? dashboard2.gatewayPassphrase : undefined;
@@ -187720,7 +187739,7 @@ function configureRuntimeCommands(program2) {
187720
187739
  const exitCode = await architectRollback({ ...options, id });
187721
187740
  process.exit(exitCode);
187722
187741
  });
187723
- program2.command("dashboard").description("Start the MaTrixOS web dashboard (port 9123)").option("-p, --port <number>", "HTTP port", "9123").option("--host <addr>", "Bind address", "0.0.0.0").option("--daemon", "Run in background (no Ctrl+C)").action(async (options) => {
187742
+ program2.command("dashboard").description("Start the MaTrixOS web dashboard (port 9123)").option("-p, --port <number>", "HTTP port", "9123").option("--host <addr>", "Bind address", "127.0.0.1").option("--daemon", "Run in background (no Ctrl+C)").action(async (options) => {
187724
187743
  const exitCode = await dashboardCli({
187725
187744
  port: parseInt(options.port ?? "9123", 10),
187726
187745
  host: options.host,
@@ -187983,8 +188002,8 @@ project.command("search <query>").description("Search the active project KB and
187983
188002
  });
187984
188003
  project.command("add-doc <slug> <file>").description("Copy a document into the project KB").action(async (slug, filePath) => {
187985
188004
  const { addKbDocument: addKbDocument2 } = await Promise.resolve().then(() => (init_project_memory(), exports_project_memory));
187986
- const { readFileSync: readFileSync65 } = await import("fs");
187987
- const content = readFileSync65(filePath, "utf-8");
188005
+ const { readFileSync: readFileSync66 } = await import("fs");
188006
+ const content = readFileSync66(filePath, "utf-8");
187988
188007
  const dest = addKbDocument2(slug, filePath, content);
187989
188008
  process.stdout.write(JSON.stringify({ ok: true, dest }, null, 2) + `
187990
188009
  `);