@kl-c/matrixos 0.2.10 → 0.2.12

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 CHANGED
@@ -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.2.10",
2166
+ version: "0.2.12",
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",
@@ -67691,10 +67691,12 @@ import {
67691
67691
  symlinkSync,
67692
67692
  readlinkSync,
67693
67693
  readdirSync as readdirSync4,
67694
- unlinkSync as unlinkSync5
67694
+ unlinkSync as unlinkSync5,
67695
+ readFileSync as readFileSync15
67695
67696
  } from "fs";
67696
67697
  import { dirname as dirname9, join as join25 } from "path";
67697
67698
  import { homedir as homedir6 } from "os";
67699
+ import { spawnSync as spawnSync3 } from "child_process";
67698
67700
  function findSlashCommandSource() {
67699
67701
  const candidates = [
67700
67702
  join25(import.meta.dir, "slash-commands"),
@@ -67738,6 +67740,48 @@ function resolveMatrixosBin() {
67738
67740
  }
67739
67741
  return null;
67740
67742
  }
67743
+ function npmGlobalInstallMatrixos(version) {
67744
+ try {
67745
+ const result = spawnSync3("npm", ["install", "-g", `@kl-c/matrixos@${version}`], {
67746
+ stdio: ["ignore", "pipe", "pipe"],
67747
+ shell: false,
67748
+ timeout: 120000
67749
+ });
67750
+ if (result.status !== 0)
67751
+ return null;
67752
+ const found = spawnSync3("command", ["-v", "matrixos"], {
67753
+ stdio: ["ignore", "pipe", "ignore"],
67754
+ shell: false
67755
+ });
67756
+ const bin = found.stdout?.toString().trim();
67757
+ if (bin && existsSync26(bin))
67758
+ return bin;
67759
+ for (const dir of ["/usr/local/bin", "/usr/bin"]) {
67760
+ const p = join25(dir, "matrixos");
67761
+ if (existsSync26(p))
67762
+ return p;
67763
+ }
67764
+ return null;
67765
+ } catch {
67766
+ return null;
67767
+ }
67768
+ }
67769
+ function getPackageVersion() {
67770
+ const candidates = [
67771
+ join25(import.meta.dir, "..", "..", "package.json"),
67772
+ join25(import.meta.dir, "..", "package.json")
67773
+ ];
67774
+ for (const c of candidates) {
67775
+ try {
67776
+ if (!existsSync26(c))
67777
+ continue;
67778
+ const pkg = JSON.parse(readFileSync15(c, "utf-8"));
67779
+ if (pkg.version)
67780
+ return pkg.version;
67781
+ } catch {}
67782
+ }
67783
+ return null;
67784
+ }
67741
67785
  function copyRecursive(from, to) {
67742
67786
  if (!existsSync26(to))
67743
67787
  mkdirSync9(to, { recursive: true });
@@ -67775,6 +67819,11 @@ function installSlashCommandsAndPath() {
67775
67819
  const liveBin = resolveMatrixosBin();
67776
67820
  const linkPath = "/usr/local/bin/matrixos";
67777
67821
  const persistentDir = "/usr/local/lib/matrixos";
67822
+ const version = getPackageVersion();
67823
+ const globalBin = version ? npmGlobalInstallMatrixos(version) : null;
67824
+ if (globalBin) {
67825
+ return { commands: total, pathLinked: true };
67826
+ }
67778
67827
  if (liveBin) {
67779
67828
  try {
67780
67829
  const target = installPackageTo(persistentDir, liveBin) ?? liveBin;
@@ -69649,7 +69698,7 @@ var init_dist5 = __esm(() => {
69649
69698
 
69650
69699
  // packages/omo-opencode/src/cli/config-manager/write-gateway-env.ts
69651
69700
  import { homedir as homedir8 } from "os";
69652
- import { existsSync as existsSync27, mkdirSync as mkdirSync10, readFileSync as readFileSync15, writeFileSync as writeFileSync6, chmodSync as chmodSync3 } from "fs";
69701
+ import { existsSync as existsSync27, mkdirSync as mkdirSync10, readFileSync as readFileSync16, writeFileSync as writeFileSync6, chmodSync as chmodSync3 } from "fs";
69653
69702
  import { join as join27 } from "path";
69654
69703
  function writeGatewayEnvToken(key, token) {
69655
69704
  const configDir = homedir8();
@@ -69658,7 +69707,7 @@ function writeGatewayEnvToken(key, token) {
69658
69707
  const envPath = join27(configDir, GATEWAY_ENV_FILENAME);
69659
69708
  const entries = new Map;
69660
69709
  if (existsSync27(envPath)) {
69661
- const existing = readFileSync15(envPath, "utf-8");
69710
+ const existing = readFileSync16(envPath, "utf-8");
69662
69711
  for (const rawLine of existing.split(`
69663
69712
  `)) {
69664
69713
  const line = rawLine.trim();
@@ -102686,7 +102735,7 @@ var require_Util = __commonJS((exports, module2) => {
102686
102735
  await client3.rest.patch(route, { body: updatedItems, reason });
102687
102736
  return updatedItems;
102688
102737
  }
102689
- function basename6(path7, ext) {
102738
+ function basename5(path7, ext) {
102690
102739
  const res = parse7(path7);
102691
102740
  return ext && res.ext.startsWith(ext) ? res.name : res.base.split("?")[0];
102692
102741
  }
@@ -102809,7 +102858,7 @@ var require_Util = __commonJS((exports, module2) => {
102809
102858
  resolveColor,
102810
102859
  discordSort,
102811
102860
  setPosition,
102812
- basename: basename6,
102861
+ basename: basename5,
102813
102862
  cleanContent,
102814
102863
  cleanCodeBlockContent,
102815
102864
  parseWebhookURL,
@@ -115630,7 +115679,7 @@ var require_MessagePayload = __commonJS((exports, module2) => {
115630
115679
  var { DiscordjsError, DiscordjsRangeError, ErrorCodes } = require_errors();
115631
115680
  var { resolveFile } = require_DataResolver();
115632
115681
  var MessageFlagsBitField = require_MessageFlagsBitField();
115633
- var { basename: basename6, verifyString, resolvePartialEmoji } = require_Util();
115682
+ var { basename: basename5, verifyString, resolvePartialEmoji } = require_Util();
115634
115683
  var getBaseInteraction = lazy2(() => require_BaseInteraction());
115635
115684
 
115636
115685
  class MessagePayload {
@@ -115815,10 +115864,10 @@ var require_MessagePayload = __commonJS((exports, module2) => {
115815
115864
  let name2;
115816
115865
  const findName = (thing) => {
115817
115866
  if (typeof thing === "string") {
115818
- return basename6(thing);
115867
+ return basename5(thing);
115819
115868
  }
115820
115869
  if (thing.path) {
115821
- return basename6(thing.path);
115870
+ return basename5(thing.path);
115822
115871
  }
115823
115872
  return "file.jpg";
115824
115873
  };
@@ -121243,14 +121292,9 @@ var require_ClientVoiceManager = __commonJS((exports, module2) => {
121243
121292
  module2.exports = ClientVoiceManager;
121244
121293
  });
121245
121294
 
121246
- // node_modules/.bun/zlib-sync@0.1.10/node_modules/zlib-sync/build/Release/zlib_sync.node.js
121247
- var require_zlib_sync_node = __commonJS((exports, module2) => {
121248
- module2.exports = { deflateSync: (d) => d, inflateSync: (d) => d };
121249
- });
121250
-
121251
121295
  // node_modules/.bun/@discordjs+ws@1.2.3/node_modules/@discordjs/ws/dist/index.js
121252
121296
  var require_dist9 = __commonJS((exports, module2) => {
121253
- var __dirname = "/home/shiro/MaTrixOS/node_modules/.bun/@discordjs+ws@1.2.3/node_modules/@discordjs/ws/dist";
121297
+ var __dirname = "/root/Projets/MaTrixOS/node_modules/.bun/@discordjs+ws@1.2.3/node_modules/@discordjs/ws/dist";
121254
121298
  var __create2 = Object.create;
121255
121299
  var __defProp2 = Object.defineProperty;
121256
121300
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -121763,7 +121807,7 @@ var require_dist9 = __commonJS((exports, module2) => {
121763
121807
  }
121764
121808
  __name(getInitialSendRateLimitState, "getInitialSendRateLimitState");
121765
121809
  var KnownNetworkErrorCodes = /* @__PURE__ */ new Set(["ECONNRESET", "ECONNREFUSED", "ETIMEDOUT", "EAI_AGAIN"]);
121766
- var getZlibSync = (0, import_util22.lazy)(async () => Promise.resolve().then(() => __toESM(require_zlib_sync_node())).then((mod2) => mod2.default).catch(() => null));
121810
+ var getZlibSync = (0, import_util22.lazy)(async () => import("zlib-sync").then((mod2) => mod2.default).catch(() => null));
121767
121811
  var WebSocketShardEvents = /* @__PURE__ */ ((WebSocketShardEvents2) => {
121768
121812
  WebSocketShardEvents2["Closed"] = "closed";
121769
121813
  WebSocketShardEvents2["Debug"] = "debug";
@@ -123534,7 +123578,7 @@ var require_WebSocketManager = __commonJS((exports, module2) => {
123534
123578
  var zlib;
123535
123579
  var deprecationEmitted = false;
123536
123580
  try {
123537
- zlib = require_zlib_sync_node();
123581
+ zlib = (()=>{throw new Error("Cannot require module "+"zlib-sync");})();
123538
123582
  } catch {}
123539
123583
  var BeforeReadyWhitelist = [
123540
123584
  GatewayDispatchEvents.Ready,
@@ -128196,7 +128240,7 @@ var require_EmbedBuilder = __commonJS((exports, module2) => {
128196
128240
 
128197
128241
  // node_modules/.bun/discord.js@14.27.0/node_modules/discord.js/src/structures/AttachmentBuilder.js
128198
128242
  var require_AttachmentBuilder = __commonJS((exports, module2) => {
128199
- var { basename: basename6, flatten } = require_Util();
128243
+ var { basename: basename5, flatten } = require_Util();
128200
128244
 
128201
128245
  class AttachmentBuilder {
128202
128246
  constructor(attachment, data = {}) {
@@ -128244,7 +128288,7 @@ var require_AttachmentBuilder = __commonJS((exports, module2) => {
128244
128288
  return this;
128245
128289
  }
128246
128290
  get spoiler() {
128247
- return basename6(this.name).startsWith("SPOILER_");
128291
+ return basename5(this.name).startsWith("SPOILER_");
128248
128292
  }
128249
128293
  toJSON() {
128250
128294
  return flatten(this);
@@ -130952,7 +130996,7 @@ var require_dist10 = __commonJS((exports2) => {
130952
130996
 
130953
130997
  // node_modules/.bun/onnxruntime-web@1.14.0/node_modules/onnxruntime-web/dist/ort-web.node.js
130954
130998
  var require_ort_web_node = __commonJS((exports2, module2) => {
130955
- var __dirname = "/home/shiro/MaTrixOS/node_modules/.bun/onnxruntime-web@1.14.0/node_modules/onnxruntime-web/dist", __filename = "/home/shiro/MaTrixOS/node_modules/.bun/onnxruntime-web@1.14.0/node_modules/onnxruntime-web/dist/ort-web.node.js";
130999
+ var __dirname = "/root/Projets/MaTrixOS/node_modules/.bun/onnxruntime-web@1.14.0/node_modules/onnxruntime-web/dist", __filename = "/root/Projets/MaTrixOS/node_modules/.bun/onnxruntime-web@1.14.0/node_modules/onnxruntime-web/dist/ort-web.node.js";
130956
131000
  /*!
130957
131001
  * ONNX Runtime Web v1.14.0
130958
131002
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -154516,7 +154560,7 @@ var require_filesystem = __commonJS((exports2, module2) => {
154516
154560
  var LDD_PATH = "/usr/bin/ldd";
154517
154561
  var SELF_PATH = "/proc/self/exe";
154518
154562
  var MAX_LENGTH = 2048;
154519
- var readFileSync46 = (path18) => {
154563
+ var readFileSync47 = (path18) => {
154520
154564
  const fd = fs18.openSync(path18, "r");
154521
154565
  const buffer = Buffer.alloc(MAX_LENGTH);
154522
154566
  const bytesRead = fs18.readSync(fd, buffer, 0, MAX_LENGTH, 0);
@@ -154539,7 +154583,7 @@ var require_filesystem = __commonJS((exports2, module2) => {
154539
154583
  module2.exports = {
154540
154584
  LDD_PATH,
154541
154585
  SELF_PATH,
154542
- readFileSync: readFileSync46,
154586
+ readFileSync: readFileSync47,
154543
154587
  readFile
154544
154588
  };
154545
154589
  });
@@ -154582,7 +154626,7 @@ var require_elf = __commonJS((exports2, module2) => {
154582
154626
  var require_detect_libc = __commonJS((exports2, module2) => {
154583
154627
  var childProcess = __require("child_process");
154584
154628
  var { isLinux, getReport } = require_process();
154585
- var { LDD_PATH, SELF_PATH, readFile, readFileSync: readFileSync46 } = require_filesystem();
154629
+ var { LDD_PATH, SELF_PATH, readFile, readFileSync: readFileSync47 } = require_filesystem();
154586
154630
  var { interpreterPath } = require_elf();
154587
154631
  var cachedFamilyInterpreter;
154588
154632
  var cachedFamilyFilesystem;
@@ -154673,7 +154717,7 @@ var require_detect_libc = __commonJS((exports2, module2) => {
154673
154717
  }
154674
154718
  cachedFamilyFilesystem = null;
154675
154719
  try {
154676
- const lddContent = readFileSync46(LDD_PATH);
154720
+ const lddContent = readFileSync47(LDD_PATH);
154677
154721
  cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
154678
154722
  } catch (e) {}
154679
154723
  return cachedFamilyFilesystem;
@@ -154696,7 +154740,7 @@ var require_detect_libc = __commonJS((exports2, module2) => {
154696
154740
  }
154697
154741
  cachedFamilyInterpreter = null;
154698
154742
  try {
154699
- const selfContent = readFileSync46(SELF_PATH);
154743
+ const selfContent = readFileSync47(SELF_PATH);
154700
154744
  const path18 = interpreterPath(selfContent);
154701
154745
  cachedFamilyInterpreter = familyFromInterpreterPath(path18);
154702
154746
  } catch (e) {}
@@ -154758,7 +154802,7 @@ var require_detect_libc = __commonJS((exports2, module2) => {
154758
154802
  }
154759
154803
  cachedVersionFilesystem = null;
154760
154804
  try {
154761
- const lddContent = readFileSync46(LDD_PATH);
154805
+ const lddContent = readFileSync47(LDD_PATH);
154762
154806
  const versionMatch = lddContent.match(RE_GLIBC_VERSION);
154763
154807
  if (versionMatch) {
154764
154808
  cachedVersionFilesystem = versionMatch[1];
@@ -155056,11 +155100,11 @@ var require_package2 = __commonJS((exports2, module2) => {
155056
155100
 
155057
155101
  // node_modules/.bun/sharp@0.32.6/node_modules/sharp/lib/libvips.js
155058
155102
  var require_libvips = __commonJS((exports2, module2) => {
155059
- var __dirname = "/home/shiro/MaTrixOS/node_modules/.bun/sharp@0.32.6/node_modules/sharp/lib";
155103
+ var __dirname = "/root/Projets/MaTrixOS/node_modules/.bun/sharp@0.32.6/node_modules/sharp/lib";
155060
155104
  var fs18 = __require("fs");
155061
155105
  var os7 = __require("os");
155062
155106
  var path18 = __require("path");
155063
- var spawnSync3 = __require("child_process").spawnSync;
155107
+ var spawnSync4 = __require("child_process").spawnSync;
155064
155108
  var semverCoerce = require_coerce();
155065
155109
  var semverGreaterThanOrEqualTo = require_gte();
155066
155110
  var platform = require_platform();
@@ -155101,14 +155145,14 @@ var require_libvips = __commonJS((exports2, module2) => {
155101
155145
  };
155102
155146
  var isRosetta = function() {
155103
155147
  if (process.platform === "darwin" && process.arch === "x64") {
155104
- const translated = spawnSync3("sysctl sysctl.proc_translated", spawnSyncOptions).stdout;
155148
+ const translated = spawnSync4("sysctl sysctl.proc_translated", spawnSyncOptions).stdout;
155105
155149
  return (translated || "").trim() === "sysctl.proc_translated: 1";
155106
155150
  }
155107
155151
  return false;
155108
155152
  };
155109
155153
  var globalLibvipsVersion = function() {
155110
155154
  if (process.platform !== "win32") {
155111
- const globalLibvipsVersion2 = spawnSync3("pkg-config --modversion vips-cpp", {
155155
+ const globalLibvipsVersion2 = spawnSync4("pkg-config --modversion vips-cpp", {
155112
155156
  ...spawnSyncOptions,
155113
155157
  env: {
155114
155158
  ...env4,
@@ -155128,7 +155172,7 @@ var require_libvips = __commonJS((exports2, module2) => {
155128
155172
  };
155129
155173
  var pkgConfigPath = function() {
155130
155174
  if (process.platform !== "win32") {
155131
- const brewPkgConfigPath = spawnSync3('which brew >/dev/null 2>&1 && brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2', spawnSyncOptions).stdout || "";
155175
+ const brewPkgConfigPath = spawnSync4('which brew >/dev/null 2>&1 && brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2', spawnSyncOptions).stdout || "";
155132
155176
  return [
155133
155177
  brewPkgConfigPath.trim(),
155134
155178
  env4.PKG_CONFIG_PATH,
@@ -159060,7 +159104,7 @@ var require_output = __commonJS((exports2, module2) => {
159060
159104
 
159061
159105
  // node_modules/.bun/sharp@0.32.6/node_modules/sharp/lib/utility.js
159062
159106
  var require_utility = __commonJS((exports2, module2) => {
159063
- var __dirname = "/home/shiro/MaTrixOS/node_modules/.bun/sharp@0.32.6/node_modules/sharp/lib";
159107
+ var __dirname = "/root/Projets/MaTrixOS/node_modules/.bun/sharp@0.32.6/node_modules/sharp/lib";
159064
159108
  var fs18 = __require("fs");
159065
159109
  var path18 = __require("path");
159066
159110
  var events = __require("events");
@@ -164919,7 +164963,7 @@ __export(exports_generate, {
164919
164963
  executeGenerateCommand: () => executeGenerateCommand,
164920
164964
  ProfileNotFoundError: () => ProfileNotFoundError
164921
164965
  });
164922
- import { existsSync as existsSync72, readFileSync as readFileSync57, realpathSync as realpathSync10 } from "fs";
164966
+ import { existsSync as existsSync72, readFileSync as readFileSync58, realpathSync as realpathSync10 } from "fs";
164923
164967
  import { dirname as dirname29, isAbsolute as isAbsolute6, join as join77, resolve as resolve16 } from "path";
164924
164968
  function profilesDirFor(opts) {
164925
164969
  if (opts.profilesDir)
@@ -165017,7 +165061,7 @@ var init_generate = __esm(() => {
165017
165061
  init_src5();
165018
165062
  init_src5();
165019
165063
  REPO_ROOT = resolve16(dirname29(new URL(import.meta.url).pathname), "..", "..", "..", "..", "..");
165020
- defaultFS2 = { existsSync: existsSync72, readFileSync: readFileSync57, realpathSync: realpathSync10 };
165064
+ defaultFS2 = { existsSync: existsSync72, readFileSync: readFileSync58, realpathSync: realpathSync10 };
165021
165065
  ProfileNotFoundError = class ProfileNotFoundError extends Error {
165022
165066
  profileName;
165023
165067
  constructor(profileName) {
@@ -165271,7 +165315,7 @@ var exports_profile_resolve = {};
165271
165315
  __export(exports_profile_resolve, {
165272
165316
  executeProfileResolveCommand: () => executeProfileResolveCommand
165273
165317
  });
165274
- import { existsSync as existsSync74, readdirSync as readdirSync16, readFileSync as readFileSync58 } from "fs";
165318
+ import { existsSync as existsSync74, readdirSync as readdirSync16, readFileSync as readFileSync59 } from "fs";
165275
165319
  import { join as join80, resolve as resolve17, dirname as dirname30 } from "path";
165276
165320
  function executeProfileResolveCommand(args) {
165277
165321
  if (args.options.help) {
@@ -165318,7 +165362,7 @@ function executeProfileResolveCommand(args) {
165318
165362
  for (const file3 of profileFiles) {
165319
165363
  try {
165320
165364
  const filePath = join80(profilesDir, file3);
165321
- const raw = JSON.parse(readFileSync58(filePath, "utf-8"));
165365
+ const raw = JSON.parse(readFileSync59(filePath, "utf-8"));
165322
165366
  const profile2 = ProfileSchema.parse(raw);
165323
165367
  registry2[profile2.name] = profile2;
165324
165368
  } catch {}
@@ -165380,9 +165424,9 @@ __export(exports_export, {
165380
165424
  getShell: () => getShell,
165381
165425
  executeExportCommand: () => executeExportCommand
165382
165426
  });
165383
- import { existsSync as existsSync75, readFileSync as readFileSync59, writeFileSync as writeFileSync26, copyFileSync as copyFileSync8, realpathSync as realpathSync11, mkdirSync as mkdirSync27 } from "fs";
165427
+ import { existsSync as existsSync75, readFileSync as readFileSync60, writeFileSync as writeFileSync26, copyFileSync as copyFileSync8, realpathSync as realpathSync11, mkdirSync as mkdirSync27 } from "fs";
165384
165428
  import { isAbsolute as isAbsolute7, join as join81, resolve as resolve18, dirname as dirname31 } from "path";
165385
- import { spawnSync as spawnSync3 } from "child_process";
165429
+ import { spawnSync as spawnSync4 } from "child_process";
165386
165430
  function setShell(shell) {
165387
165431
  activeShell = shell;
165388
165432
  }
@@ -165494,7 +165538,7 @@ var init_export = __esm(() => {
165494
165538
  defaultShell = {
165495
165539
  run(cmd, cwd) {
165496
165540
  const parts = cmd.split(/\s+/);
165497
- const result = spawnSync3(parts[0], parts.slice(1), { cwd, encoding: "utf-8", windowsHide: process.platform === "win32" });
165541
+ const result = spawnSync4(parts[0], parts.slice(1), { cwd, encoding: "utf-8", windowsHide: process.platform === "win32" });
165498
165542
  return {
165499
165543
  code: result.status ?? 1,
165500
165544
  stdout: (result.stdout ?? result.stderr ?? "").toString().trim()
@@ -165504,7 +165548,7 @@ var init_export = __esm(() => {
165504
165548
  activeShell = defaultShell;
165505
165549
  defaultExportFS = {
165506
165550
  existsSync: existsSync75,
165507
- readFileSync: readFileSync59,
165551
+ readFileSync: readFileSync60,
165508
165552
  writeFileSync: writeFileSync26,
165509
165553
  copyFileSync: copyFileSync8,
165510
165554
  realpathSync: realpathSync11,
@@ -165532,7 +165576,7 @@ __export(exports_project_context, {
165532
165576
  createProject: () => createProject,
165533
165577
  archiveProject: () => archiveProject
165534
165578
  });
165535
- import { existsSync as existsSync76, mkdirSync as mkdirSync28, readFileSync as readFileSync60, writeFileSync as writeFileSync27, rmSync as rmSync8 } from "fs";
165579
+ import { existsSync as existsSync76, mkdirSync as mkdirSync28, readFileSync as readFileSync61, writeFileSync as writeFileSync27, rmSync as rmSync8 } from "fs";
165536
165580
  import { join as join82 } from "path";
165537
165581
  function getMatrixOsDir(cwd = process.cwd()) {
165538
165582
  return join82(cwd, ".matrixos");
@@ -165551,7 +165595,7 @@ function loadState(cwd) {
165551
165595
  if (!existsSync76(path29))
165552
165596
  return {};
165553
165597
  try {
165554
- return JSON.parse(readFileSync60(path29, "utf-8"));
165598
+ return JSON.parse(readFileSync61(path29, "utf-8"));
165555
165599
  } catch {
165556
165600
  return {};
165557
165601
  }
@@ -165567,7 +165611,7 @@ function loadProjectMeta(slug, cwd) {
165567
165611
  if (!existsSync76(path29))
165568
165612
  return null;
165569
165613
  try {
165570
- return JSON.parse(readFileSync60(path29, "utf-8"));
165614
+ return JSON.parse(readFileSync61(path29, "utf-8"));
165571
165615
  } catch {
165572
165616
  return null;
165573
165617
  }
@@ -165693,7 +165737,7 @@ __export(exports_project_memory, {
165693
165737
  isProjectEpisode: () => isProjectEpisode,
165694
165738
  addKbDocument: () => addKbDocument
165695
165739
  });
165696
- import { existsSync as existsSync77, mkdirSync as mkdirSync29, readFileSync as readFileSync61, readdirSync as readdirSync17, writeFileSync as writeFileSync28 } from "fs";
165740
+ import { existsSync as existsSync77, mkdirSync as mkdirSync29, readFileSync as readFileSync62, readdirSync as readdirSync17, writeFileSync as writeFileSync28 } from "fs";
165697
165741
  import { join as join83 } from "path";
165698
165742
  function tagWithProject(metadata = {}, projectSlug, cwd) {
165699
165743
  const active = projectSlug ?? getActiveProject(cwd)?.slug;
@@ -165717,7 +165761,7 @@ function listKbDocuments(projectSlug, cwd) {
165717
165761
  continue;
165718
165762
  const path29 = join83(kbDir, entry.name);
165719
165763
  try {
165720
- docs.push({ path: path29, content: readFileSync61(path29, "utf-8") });
165764
+ docs.push({ path: path29, content: readFileSync62(path29, "utf-8") });
165721
165765
  } catch {}
165722
165766
  }
165723
165767
  return docs;
@@ -166139,12 +166183,12 @@ __export(exports_gateway_start, {
166139
166183
  buildTelegramConfig: () => buildTelegramConfig,
166140
166184
  buildGatewayConfig: () => buildGatewayConfig
166141
166185
  });
166142
- import { readFileSync as readFileSync62, existsSync as existsSync78 } from "fs";
166186
+ import { readFileSync as readFileSync63, existsSync as existsSync78 } from "fs";
166143
166187
  import { resolve as resolve19 } from "path";
166144
166188
  function loadGatewayEnv(path29 = ENV_PATH) {
166145
166189
  if (!existsSync78(path29))
166146
166190
  return {};
166147
- const text = readFileSync62(path29, "utf8");
166191
+ const text = readFileSync63(path29, "utf8");
166148
166192
  const out = {};
166149
166193
  for (const raw of text.split(/\r?\n/)) {
166150
166194
  const line = raw.trim();
@@ -166614,7 +166658,7 @@ var init_deployment = __esm(() => {
166614
166658
  });
166615
166659
 
166616
166660
  // packages/omo-opencode/src/audit/self-audit.ts
166617
- import { existsSync as existsSync80, mkdirSync as mkdirSync30, readdirSync as readdirSync18, readFileSync as readFileSync63, writeFileSync as writeFileSync29 } from "fs";
166661
+ import { existsSync as existsSync80, mkdirSync as mkdirSync30, readdirSync as readdirSync18, readFileSync as readFileSync64, writeFileSync as writeFileSync29 } from "fs";
166618
166662
  import { join as join84 } from "path";
166619
166663
  function getAuditDir(cwd = process.cwd()) {
166620
166664
  return join84(cwd, ".matrixos", "audits");
@@ -169268,7 +169312,7 @@ var BOULDER_STATE_PATH = `${BOULDER_DIR}/${BOULDER_FILE}`;
169268
169312
  var NOTEPAD_DIR = "notepads";
169269
169313
  var NOTEPAD_BASE_PATH = `${BOULDER_DIR}/${NOTEPAD_DIR}`;
169270
169314
  // packages/boulder-state/src/top-level-task.ts
169271
- import { existsSync as existsSync32, readFileSync as readFileSync18 } from "fs";
169315
+ import { existsSync as existsSync32, readFileSync as readFileSync19 } from "fs";
169272
169316
  var TODO_HEADING_PATTERN = /^##\s+TODOs\b/i;
169273
169317
  var FINAL_VERIFICATION_HEADING_PATTERN = /^##\s+Final Verification Wave\b/i;
169274
169318
  var SECOND_LEVEL_HEADING_PATTERN = /^##\s+/;
@@ -169295,7 +169339,7 @@ function readCurrentTopLevelTask(planPath) {
169295
169339
  return null;
169296
169340
  }
169297
169341
  try {
169298
- const content = readFileSync18(planPath, "utf-8");
169342
+ const content = readFileSync19(planPath, "utf-8");
169299
169343
  const lines = content.split(/\r?\n/);
169300
169344
  let section = "other";
169301
169345
  for (const line of lines) {
@@ -169347,7 +169391,7 @@ function resolveBoulderPlanPathForWork(directory, work) {
169347
169391
  return resolveBoulderPlanPath(directory, work);
169348
169392
  }
169349
169393
  // packages/boulder-state/src/storage/plan-progress.ts
169350
- import { existsSync as existsSync34, readFileSync as readFileSync19, readdirSync as readdirSync5, statSync as statSync5 } from "fs";
169394
+ import { existsSync as existsSync34, readFileSync as readFileSync20, readdirSync as readdirSync5, statSync as statSync5 } from "fs";
169351
169395
  var TODO_HEADING_PATTERN2 = /^##\s+TODOs\b/i;
169352
169396
  var FINAL_VERIFICATION_HEADING_PATTERN2 = /^##\s+Final Verification Wave\b/i;
169353
169397
  var SECOND_LEVEL_HEADING_PATTERN2 = /^##\s+/;
@@ -169360,7 +169404,7 @@ function getPlanProgress(planPath) {
169360
169404
  return { total: 0, completed: 0, isComplete: false };
169361
169405
  }
169362
169406
  try {
169363
- const content = readFileSync19(planPath, "utf-8");
169407
+ const content = readFileSync20(planPath, "utf-8");
169364
169408
  const lines = content.split(/\r?\n/);
169365
169409
  const hasStructuredSections = lines.some((line) => TODO_HEADING_PATTERN2.test(line) || FINAL_VERIFICATION_HEADING_PATTERN2.test(line));
169366
169410
  if (hasStructuredSections) {
@@ -169476,14 +169520,14 @@ function selectMirrorWork(state) {
169476
169520
  return sorted[0] ?? null;
169477
169521
  }
169478
169522
  // packages/boulder-state/src/storage/read-state.ts
169479
- import { existsSync as existsSync35, readFileSync as readFileSync20 } from "fs";
169523
+ import { existsSync as existsSync35, readFileSync as readFileSync21 } from "fs";
169480
169524
  function readBoulderState(directory) {
169481
169525
  const filePath = getBoulderFilePath(directory);
169482
169526
  if (!existsSync35(filePath)) {
169483
169527
  return null;
169484
169528
  }
169485
169529
  try {
169486
- const content = readFileSync20(filePath, "utf-8");
169530
+ const content = readFileSync21(filePath, "utf-8");
169487
169531
  const parsed = JSON.parse(content);
169488
169532
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
169489
169533
  return null;
@@ -169549,7 +169593,7 @@ init_state();
169549
169593
  // packages/omo-opencode/src/features/run-continuation-state/constants.ts
169550
169594
  var CONTINUATION_MARKER_DIR = ".omo/run-continuation";
169551
169595
  // packages/omo-opencode/src/features/run-continuation-state/storage.ts
169552
- import { existsSync as existsSync36, mkdirSync as mkdirSync12, readFileSync as readFileSync21, rmSync as rmSync2, writeFileSync as writeFileSync9 } from "fs";
169596
+ import { existsSync as existsSync36, mkdirSync as mkdirSync12, readFileSync as readFileSync22, rmSync as rmSync2, writeFileSync as writeFileSync9 } from "fs";
169553
169597
  import { join as join31 } from "path";
169554
169598
  function getMarkerPath(directory, sessionID) {
169555
169599
  return join31(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
@@ -169559,7 +169603,7 @@ function readContinuationMarker(directory, sessionID) {
169559
169603
  if (!existsSync36(markerPath))
169560
169604
  return null;
169561
169605
  try {
169562
- const raw = readFileSync21(markerPath, "utf-8");
169606
+ const raw = readFileSync22(markerPath, "utf-8");
169563
169607
  const parsed = JSON.parse(raw);
169564
169608
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
169565
169609
  return null;
@@ -169624,7 +169668,7 @@ async function isSessionInBoulderLineage(input) {
169624
169668
  // packages/omo-opencode/src/hooks/the-operator/session-last-agent.ts
169625
169669
  init_shared();
169626
169670
  init_compaction_marker();
169627
- import { readFileSync as readFileSync22, readdirSync as readdirSync6 } from "fs";
169671
+ import { readFileSync as readFileSync23, readdirSync as readdirSync6 } from "fs";
169628
169672
  import { join as join32 } from "path";
169629
169673
  var defaultSessionLastAgentDeps = {
169630
169674
  getMessageDir,
@@ -169685,7 +169729,7 @@ async function getLastAgentFromSession(sessionID, client3, deps = {}) {
169685
169729
  try {
169686
169730
  const messages = readdirSync6(messageDir).filter((fileName) => fileName.endsWith(".json")).map((fileName) => {
169687
169731
  try {
169688
- const content = readFileSync22(join32(messageDir, fileName), "utf-8");
169732
+ const content = readFileSync23(join32(messageDir, fileName), "utf-8");
169689
169733
  const parsed = JSON.parse(content);
169690
169734
  return {
169691
169735
  fileName,
@@ -169728,7 +169772,7 @@ init_agent_display_names();
169728
169772
 
169729
169773
  // packages/omo-opencode/src/hooks/ralph-loop/storage.ts
169730
169774
  init_frontmatter2();
169731
- import { existsSync as existsSync37, readFileSync as readFileSync23, writeFileSync as writeFileSync10, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "fs";
169775
+ import { existsSync as existsSync37, readFileSync as readFileSync24, writeFileSync as writeFileSync10, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "fs";
169732
169776
  import { dirname as dirname13, join as join33 } from "path";
169733
169777
 
169734
169778
  // packages/omo-opencode/src/hooks/ralph-loop/constants.ts
@@ -169746,7 +169790,7 @@ function readState(directory, customPath) {
169746
169790
  return null;
169747
169791
  }
169748
169792
  try {
169749
- const content = readFileSync23(filePath, "utf-8");
169793
+ const content = readFileSync24(filePath, "utf-8");
169750
169794
  const { data, body } = parseFrontmatter(content);
169751
169795
  const active = data.active;
169752
169796
  const iteration = data.iteration;
@@ -170321,8 +170365,8 @@ function createTimestampedStdoutController(stdout2 = process.stdout) {
170321
170365
  // packages/telemetry-core/src/activity-state.ts
170322
170366
  init_atomic_write();
170323
170367
  init_xdg_data_dir();
170324
- import { existsSync as existsSync38, mkdirSync as mkdirSync14, readFileSync as readFileSync24 } from "fs";
170325
- import { basename as basename7, join as join34 } from "path";
170368
+ import { existsSync as existsSync38, mkdirSync as mkdirSync14, readFileSync as readFileSync25 } from "fs";
170369
+ import { basename as basename6, join as join34 } from "path";
170326
170370
  var POSTHOG_ACTIVITY_STATE_FILE = "posthog-activity.json";
170327
170371
  function resolveTelemetryStateDir(product, options = {}) {
170328
170372
  const dataDir = resolveXdgDataDir(product.cacheDirName, {
@@ -170330,7 +170374,7 @@ function resolveTelemetryStateDir(product, options = {}) {
170330
170374
  osProvider: options.osProvider
170331
170375
  });
170332
170376
  const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined : join34(options.env.XDG_DATA_HOME, product.cacheDirName);
170333
- if (dataDir === xdgStateDir || xdgStateDir === undefined && basename7(dataDir) === product.cacheDirName) {
170377
+ if (dataDir === xdgStateDir || xdgStateDir === undefined && basename6(dataDir) === product.cacheDirName) {
170334
170378
  return dataDir;
170335
170379
  }
170336
170380
  return join34(dataDir, product.cacheDirName);
@@ -170365,7 +170409,7 @@ function readPostHogActivityState(stateDir, diagnostics) {
170365
170409
  return {};
170366
170410
  }
170367
170411
  try {
170368
- const stateContent = readFileSync24(stateFilePath, "utf-8");
170412
+ const stateContent = readFileSync25(stateFilePath, "utf-8");
170369
170413
  const stateJson = JSON.parse(stateContent);
170370
170414
  if (!isPostHogActivityState(stateJson)) {
170371
170415
  return {};
@@ -177488,7 +177532,7 @@ init_constants5();
177488
177532
 
177489
177533
  // packages/omo-opencode/src/cli/doctor/checks/system.ts
177490
177534
  init_constants5();
177491
- import { existsSync as existsSync49, readFileSync as readFileSync34 } from "fs";
177535
+ import { existsSync as existsSync49, readFileSync as readFileSync35 } from "fs";
177492
177536
 
177493
177537
  // packages/omo-opencode/src/cli/doctor/checks/system-binary.ts
177494
177538
  init_extract_semver();
@@ -177685,7 +177729,7 @@ function compareVersions3(current, minimum) {
177685
177729
 
177686
177730
  // packages/omo-opencode/src/cli/doctor/checks/system-plugin.ts
177687
177731
  init_shared();
177688
- import { existsSync as existsSync47, readFileSync as readFileSync32 } from "fs";
177732
+ import { existsSync as existsSync47, readFileSync as readFileSync33 } from "fs";
177689
177733
  function detectConfigPath() {
177690
177734
  const paths2 = getOpenCodeConfigPaths({ binary: "opencode", version: null });
177691
177735
  if (existsSync47(paths2.configJsonc))
@@ -177736,7 +177780,7 @@ function getPluginInfo() {
177736
177780
  };
177737
177781
  }
177738
177782
  try {
177739
- const content = readFileSync32(configPath, "utf-8");
177783
+ const content = readFileSync33(configPath, "utf-8");
177740
177784
  const parsedConfig = parseJsonc(content);
177741
177785
  const pluginEntry = findPluginEntry2(parsedConfig.plugin ?? []);
177742
177786
  if (!pluginEntry) {
@@ -177780,7 +177824,7 @@ init_auto_update_checker();
177780
177824
  init_package_json_locator();
177781
177825
  init_constants5();
177782
177826
  init_shared();
177783
- import { existsSync as existsSync48, readFileSync as readFileSync33, readdirSync as readdirSync8 } from "fs";
177827
+ import { existsSync as existsSync48, readFileSync as readFileSync34, readdirSync as readdirSync8 } from "fs";
177784
177828
  import { createRequire as createRequire2 } from "module";
177785
177829
  import { homedir as homedir13 } from "os";
177786
177830
  import { join as join42 } from "path";
@@ -177811,7 +177855,7 @@ function readPackageJson(filePath) {
177811
177855
  if (!existsSync48(filePath))
177812
177856
  return null;
177813
177857
  try {
177814
- const content = readFileSync33(filePath, "utf-8");
177858
+ const content = readFileSync34(filePath, "utf-8");
177815
177859
  return parseJsonc(content);
177816
177860
  } catch (error51) {
177817
177861
  if (!(error51 instanceof Error)) {
@@ -177945,7 +177989,7 @@ var defaultDeps6 = {
177945
177989
  getLatestPluginVersion,
177946
177990
  getSuggestedInstallTag,
177947
177991
  configExists: existsSync49,
177948
- readConfigFile: (path14) => readFileSync34(path14, "utf-8"),
177992
+ readConfigFile: (path14) => readFileSync35(path14, "utf-8"),
177949
177993
  parseConfigContent: (content) => parseJsonc(content)
177950
177994
  };
177951
177995
  var BUN_POSTINSTALL_HELPER_PACKAGE_NAME = "@code-yeongyu/comment-checker";
@@ -178090,7 +178134,7 @@ async function checkSystem(deps = defaultDeps6) {
178090
178134
 
178091
178135
  // packages/omo-opencode/src/config/validate.ts
178092
178136
  init_src();
178093
- import { readFileSync as readFileSync35 } from "fs";
178137
+ import { readFileSync as readFileSync36 } from "fs";
178094
178138
  import { homedir as homedir14 } from "os";
178095
178139
  import { dirname as dirname19, relative as relative5 } from "path";
178096
178140
  init_shared();
@@ -178135,7 +178179,7 @@ function schemaMessages(configPath, rawConfig) {
178135
178179
  }
178136
178180
  function parseLayerConfig(configPath) {
178137
178181
  try {
178138
- const content = readFileSync35(configPath, "utf-8");
178182
+ const content = readFileSync36(configPath, "utf-8");
178139
178183
  const rawConfig = parseJsonc(content);
178140
178184
  if (!isPlainRecord(rawConfig)) {
178141
178185
  return {
@@ -178207,7 +178251,7 @@ init_constants5();
178207
178251
 
178208
178252
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-cache.ts
178209
178253
  init_shared();
178210
- import { existsSync as existsSync50, readFileSync as readFileSync36 } from "fs";
178254
+ import { existsSync as existsSync50, readFileSync as readFileSync37 } from "fs";
178211
178255
  import { homedir as homedir15 } from "os";
178212
178256
  import { join as join43 } from "path";
178213
178257
  function getUserConfigDir2() {
@@ -178226,7 +178270,7 @@ function loadCustomProviderNames() {
178226
178270
  if (!existsSync50(configPath))
178227
178271
  continue;
178228
178272
  try {
178229
- const content = readFileSync36(configPath, "utf-8");
178273
+ const content = readFileSync37(configPath, "utf-8");
178230
178274
  const data = parseJsonc(content);
178231
178275
  if (data?.provider && typeof data.provider === "object") {
178232
178276
  return Object.keys(data.provider);
@@ -178250,7 +178294,7 @@ function loadAvailableModelsFromCache() {
178250
178294
  return { providers: [], modelCount: 0, cacheExists: false };
178251
178295
  }
178252
178296
  try {
178253
- const content = readFileSync36(cacheFile, "utf-8");
178297
+ const content = readFileSync37(cacheFile, "utf-8");
178254
178298
  const data = parseJsonc(content);
178255
178299
  const cacheProviders = Object.keys(data);
178256
178300
  let modelCount = 0;
@@ -178278,7 +178322,7 @@ init_constants5();
178278
178322
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-config.ts
178279
178323
  init_shared();
178280
178324
  init_plugin_identity();
178281
- import { readFileSync as readFileSync37 } from "fs";
178325
+ import { readFileSync as readFileSync38 } from "fs";
178282
178326
  import { join as join44 } from "path";
178283
178327
  var PROJECT_CONFIG_DIR = join44(process.cwd(), ".opencode");
178284
178328
  function loadOmoConfig() {
@@ -178288,7 +178332,7 @@ function loadOmoConfig() {
178288
178332
  });
178289
178333
  if (projectDetected.format !== "none") {
178290
178334
  try {
178291
- const content = readFileSync37(projectDetected.path, "utf-8");
178335
+ const content = readFileSync38(projectDetected.path, "utf-8");
178292
178336
  return parseJsonc(content);
178293
178337
  } catch (error51) {
178294
178338
  if (error51 instanceof Error) {
@@ -178304,7 +178348,7 @@ function loadOmoConfig() {
178304
178348
  });
178305
178349
  if (userDetected.format !== "none") {
178306
178350
  try {
178307
- const content = readFileSync37(userDetected.path, "utf-8");
178351
+ const content = readFileSync38(userDetected.path, "utf-8");
178308
178352
  return parseJsonc(content);
178309
178353
  } catch (error51) {
178310
178354
  if (error51 instanceof Error) {
@@ -178885,13 +178929,13 @@ async function getGhCliInfo(dependencies = {}) {
178885
178929
  }
178886
178930
 
178887
178931
  // packages/omo-opencode/src/cli/doctor/checks/tools-lsp.ts
178888
- import { readFileSync as readFileSync39 } from "fs";
178932
+ import { readFileSync as readFileSync40 } from "fs";
178889
178933
  import { join as join48 } from "path";
178890
178934
 
178891
178935
  // packages/omo-opencode/src/mcp/lsp.ts
178892
178936
  init_zod();
178893
178937
  init_opencode_config_dir();
178894
- import { existsSync as existsSync52, readFileSync as readFileSync38 } from "fs";
178938
+ import { existsSync as existsSync52, readFileSync as readFileSync39 } from "fs";
178895
178939
  import { delimiter as delimiter3, dirname as dirname21, resolve as resolve10 } from "path";
178896
178940
  import { fileURLToPath as fileURLToPath6 } from "url";
178897
178941
 
@@ -178905,7 +178949,7 @@ function hasCliSuffix(candidatePath, suffix) {
178905
178949
 
178906
178950
  // packages/omo-opencode/src/mcp/runtime-executable.ts
178907
178951
  init_bun_which_shim();
178908
- import { basename as basename8 } from "path";
178952
+ import { basename as basename7 } from "path";
178909
178953
  var NODE_EXECUTABLE_NAMES = new Set(["node", "node.exe"]);
178910
178954
  function isUnsafeCommandName2(commandName) {
178911
178955
  if (commandName.length === 0)
@@ -178921,7 +178965,7 @@ function isUnsafeCommandName2(commandName) {
178921
178965
  return false;
178922
178966
  }
178923
178967
  function isNodeExecPath(execPath) {
178924
- return NODE_EXECUTABLE_NAMES.has(basename8(execPath).toLowerCase());
178968
+ return NODE_EXECUTABLE_NAMES.has(basename7(execPath).toLowerCase());
178925
178969
  }
178926
178970
  function resolveRuntimeExecutable(commandName, options = {}) {
178927
178971
  if (isUnsafeCommandName2(commandName)) {
@@ -179035,7 +179079,7 @@ function findBootstrapRoot(candidates, pathExists) {
179035
179079
  }
179036
179080
  function readDaemonPackageVersion(root) {
179037
179081
  try {
179038
- const packageJson = JSON.parse(readFileSync38(resolve10(root, PACKAGE_REL, "package.json"), "utf-8"));
179082
+ const packageJson = JSON.parse(readFileSync39(resolve10(root, PACKAGE_REL, "package.json"), "utf-8"));
179039
179083
  return DaemonPackageSchema.parse(packageJson).version;
179040
179084
  } catch (error51) {
179041
179085
  if (!(error51 instanceof Error))
@@ -179112,7 +179156,7 @@ function readOmoConfig(configDirectory) {
179112
179156
  return null;
179113
179157
  }
179114
179158
  try {
179115
- const content = readFileSync39(detected.path, "utf-8");
179159
+ const content = readFileSync40(detected.path, "utf-8");
179116
179160
  return parseJsonc(content);
179117
179161
  } catch (error51) {
179118
179162
  if (!(error51 instanceof Error)) {
@@ -179142,7 +179186,7 @@ function getInstalledLspServers(options = {}) {
179142
179186
 
179143
179187
  // packages/omo-opencode/src/cli/doctor/checks/tools-mcp.ts
179144
179188
  init_shared();
179145
- import { existsSync as existsSync53, readFileSync as readFileSync40 } from "fs";
179189
+ import { existsSync as existsSync53, readFileSync as readFileSync41 } from "fs";
179146
179190
  import { homedir as homedir18 } from "os";
179147
179191
  import { join as join49 } from "path";
179148
179192
  var BUILTIN_MCP_SERVERS = ["websearch", "context7", "grep_app", "lsp"];
@@ -179159,7 +179203,7 @@ function loadUserMcpConfig() {
179159
179203
  if (!existsSync53(configPath))
179160
179204
  continue;
179161
179205
  try {
179162
- const content = readFileSync40(configPath, "utf-8");
179206
+ const content = readFileSync41(configPath, "utf-8");
179163
179207
  const config5 = parseJsonc(content);
179164
179208
  if (config5.mcpServers) {
179165
179209
  Object.assign(servers, config5.mcpServers);
@@ -179294,7 +179338,7 @@ async function checkTools() {
179294
179338
  }
179295
179339
 
179296
179340
  // packages/omo-opencode/src/cli/doctor/checks/telemetry.ts
179297
- import { existsSync as existsSync54, readFileSync as readFileSync41 } from "fs";
179341
+ import { existsSync as existsSync54, readFileSync as readFileSync42 } from "fs";
179298
179342
  init_constants5();
179299
179343
  function isTelemetryState(value) {
179300
179344
  return value !== null && typeof value === "object" && !Array.isArray(value);
@@ -179305,7 +179349,7 @@ function readLastActiveDay(stateFilePath) {
179305
179349
  }
179306
179350
  let parsed;
179307
179351
  try {
179308
- parsed = JSON.parse(readFileSync41(stateFilePath, "utf-8"));
179352
+ parsed = JSON.parse(readFileSync42(stateFilePath, "utf-8"));
179309
179353
  } catch (error51) {
179310
179354
  if (error51 instanceof Error) {
179311
179355
  return "unreadable";
@@ -179381,7 +179425,7 @@ function expandHomeDirectory(directoryPath) {
179381
179425
  init_constants5();
179382
179426
  init_shared();
179383
179427
  init_plugin_identity();
179384
- import { readFileSync as readFileSync42, promises as fs15 } from "fs";
179428
+ import { readFileSync as readFileSync43, promises as fs15 } from "fs";
179385
179429
  import path15 from "path";
179386
179430
  async function checkTeamMode() {
179387
179431
  const config5 = loadTeamModeConfig();
@@ -179418,7 +179462,7 @@ function loadTeamModeConfig() {
179418
179462
  if (!configPath)
179419
179463
  return { team_mode: undefined };
179420
179464
  try {
179421
- return parseJsonc(readFileSync42(configPath, "utf-8"));
179465
+ return parseJsonc(readFileSync43(configPath, "utf-8"));
179422
179466
  } catch (error51) {
179423
179467
  if (error51 instanceof Error) {
179424
179468
  return { team_mode: undefined };
@@ -179859,12 +179903,12 @@ import {
179859
179903
  existsSync as existsSync57,
179860
179904
  mkdirSync as mkdirSync16,
179861
179905
  readdirSync as readdirSync9,
179862
- readFileSync as readFileSync44,
179906
+ readFileSync as readFileSync45,
179863
179907
  renameSync as renameSync7,
179864
179908
  unlinkSync as unlinkSync9,
179865
179909
  writeFileSync as writeFileSync14
179866
179910
  } from "fs";
179867
- import { basename as basename9, dirname as dirname22, join as join52 } from "path";
179911
+ import { basename as basename8, dirname as dirname22, join as join52 } from "path";
179868
179912
 
179869
179913
  // packages/mcp-client-core/src/config-dir.ts
179870
179914
  import { existsSync as existsSync55, realpathSync as realpathSync7 } from "fs";
@@ -179892,7 +179936,7 @@ function getOpenCodeCliConfigDir(env2 = process.env) {
179892
179936
  }
179893
179937
 
179894
179938
  // packages/mcp-client-core/src/mcp-oauth/storage-index.ts
179895
- import { chmodSync as chmodSync5, existsSync as existsSync56, readFileSync as readFileSync43, renameSync as renameSync6, writeFileSync as writeFileSync13 } from "fs";
179939
+ import { chmodSync as chmodSync5, existsSync as existsSync56, readFileSync as readFileSync44, renameSync as renameSync6, writeFileSync as writeFileSync13 } from "fs";
179896
179940
  import { join as join51 } from "path";
179897
179941
  var INDEX_FILE_NAME = "index.json";
179898
179942
  function isTokenIndex(value) {
@@ -179908,7 +179952,7 @@ function readTokenIndex(storageDir) {
179908
179952
  if (!existsSync56(indexPath))
179909
179953
  return {};
179910
179954
  try {
179911
- const parsed = JSON.parse(readFileSync43(indexPath, "utf-8"));
179955
+ const parsed = JSON.parse(readFileSync44(indexPath, "utf-8"));
179912
179956
  return isTokenIndex(parsed) ? parsed : {};
179913
179957
  } catch (readError) {
179914
179958
  if (!(readError instanceof Error))
@@ -180018,7 +180062,7 @@ function readTokenFile(filePath) {
180018
180062
  if (!existsSync57(filePath))
180019
180063
  return null;
180020
180064
  try {
180021
- const parsed = JSON.parse(readFileSync44(filePath, "utf-8"));
180065
+ const parsed = JSON.parse(readFileSync45(filePath, "utf-8"));
180022
180066
  return isOAuthTokenData(parsed) ? parsed : null;
180023
180067
  } catch (readError) {
180024
180068
  if (!(readError instanceof Error))
@@ -180031,7 +180075,7 @@ function readLegacyStore() {
180031
180075
  if (!existsSync57(filePath))
180032
180076
  return null;
180033
180077
  try {
180034
- const parsed = JSON.parse(readFileSync44(filePath, "utf-8"));
180078
+ const parsed = JSON.parse(readFileSync45(filePath, "utf-8"));
180035
180079
  if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed))
180036
180080
  return null;
180037
180081
  const result = {};
@@ -180149,7 +180193,7 @@ function listAllTokens() {
180149
180193
  if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "index.json")
180150
180194
  continue;
180151
180195
  const token = readTokenFile(join52(dir, entry.name));
180152
- const hash2 = basename9(entry.name, ".json");
180196
+ const hash2 = basename8(entry.name, ".json");
180153
180197
  if (token)
180154
180198
  result[index[hash2] ?? hash2] = token;
180155
180199
  }
@@ -180844,7 +180888,7 @@ function createEmbeddingPort() {
180844
180888
  // packages/learning-loop/src/codebase-scanner.ts
180845
180889
  var import_picomatch = __toESM(require_picomatch2(), 1);
180846
180890
  import { createHash as createHash5 } from "crypto";
180847
- import { readdirSync as readdirSync10, readFileSync as readFileSync46, statSync as statSync7, existsSync as existsSync59 } from "fs";
180891
+ import { readdirSync as readdirSync10, readFileSync as readFileSync47, statSync as statSync7, existsSync as existsSync59 } from "fs";
180848
180892
  import { join as join53, relative as relative6, extname as extname3 } from "path";
180849
180893
  var EXT_TO_LANG = {
180850
180894
  ts: "typescript",
@@ -180912,7 +180956,7 @@ function defaultFs() {
180912
180956
  return readdirSync10(path18);
180913
180957
  },
180914
180958
  readFile(path18) {
180915
- return readFileSync46(path18, "utf-8");
180959
+ return readFileSync47(path18, "utf-8");
180916
180960
  },
180917
180961
  stat(path18) {
180918
180962
  const s = statSync7(path18);
@@ -181265,8 +181309,8 @@ function formatSearchResults(result) {
181265
181309
  }
181266
181310
 
181267
181311
  // packages/learning-loop/src/improvement.ts
181268
- import { existsSync as existsSync60, mkdirSync as mkdirSync18, readFileSync as readFileSync47, writeFileSync as writeFileSync16 } from "fs";
181269
- import { join as join54, basename as basename11 } from "path";
181312
+ import { existsSync as existsSync60, mkdirSync as mkdirSync18, readFileSync as readFileSync48, writeFileSync as writeFileSync16 } from "fs";
181313
+ import { join as join54, basename as basename10 } from "path";
181270
181314
  function createImprovementStore(improvementsDir) {
181271
181315
  if (!existsSync60(improvementsDir)) {
181272
181316
  mkdirSync18(improvementsDir, { recursive: true });
@@ -181287,12 +181331,12 @@ function createImprovementStore(improvementsDir) {
181287
181331
  return [];
181288
181332
  }
181289
181333
  files.sort().reverse();
181290
- return files.map((f2) => get(basename11(f2, ".json"))).filter((i3) => i3 !== null);
181334
+ return files.map((f2) => get(basename10(f2, ".json"))).filter((i3) => i3 !== null);
181291
181335
  }
181292
181336
  function get(id) {
181293
181337
  const filePath = join54(improvementsDir, `${id}.json`);
181294
181338
  try {
181295
- const raw = readFileSync47(filePath, "utf-8");
181339
+ const raw = readFileSync48(filePath, "utf-8");
181296
181340
  return JSON.parse(raw);
181297
181341
  } catch {
181298
181342
  return null;
@@ -182111,7 +182155,7 @@ function getClaudeConfigDir() {
182111
182155
  return join57(getHomeDirectory(), ".claude");
182112
182156
  }
182113
182157
  // packages/skills-loader-core/src/shared/opencode-command-dirs.ts
182114
- import { basename as basename12, dirname as dirname23, join as join59 } from "path";
182158
+ import { basename as basename11, dirname as dirname23, join as join59 } from "path";
182115
182159
 
182116
182160
  // packages/skills-loader-core/src/shared/opencode-config-dir.ts
182117
182161
  import { existsSync as existsSync64, realpathSync as realpathSync8 } from "fs";
@@ -182246,7 +182290,7 @@ function getOpenCodeConfigDir2(options) {
182246
182290
  // packages/skills-loader-core/src/shared/opencode-command-dirs.ts
182247
182291
  function getParentOpencodeConfigDir(configDir) {
182248
182292
  const parentDir = dirname23(configDir);
182249
- if (basename12(parentDir) !== "profiles") {
182293
+ if (basename11(parentDir) !== "profiles") {
182250
182294
  return null;
182251
182295
  }
182252
182296
  return dirname23(parentDir);
@@ -182391,7 +182435,7 @@ import { join as join62 } from "path";
182391
182435
  init_src();
182392
182436
  init_src2();
182393
182437
  import * as fs19 from "fs/promises";
182394
- import { basename as basename13 } from "path";
182438
+ import { basename as basename12 } from "path";
182395
182439
 
182396
182440
  // packages/skills-loader-core/src/features/opencode-skill-loader/allowed-tools-parser.ts
182397
182441
  function parseAllowedTools(allowedTools) {
@@ -182507,7 +182551,7 @@ $ARGUMENTS
182507
182551
  }
182508
182552
  }
182509
182553
  function inferSkillNameFromFileName(filePath) {
182510
- return basename13(filePath, ".md");
182554
+ return basename12(filePath, ".md");
182511
182555
  }
182512
182556
 
182513
182557
  // packages/skills-loader-core/src/features/opencode-skill-loader/skill-directory-loader.ts
@@ -183419,9 +183463,9 @@ playwright-cli close
183419
183463
  // packages/skills-loader-core/src/features/builtin-skills/skill-file-loader.ts
183420
183464
  init_shared_skills();
183421
183465
  init_src();
183422
- import { readFileSync as readFileSync50 } from "fs";
183466
+ import { readFileSync as readFileSync51 } from "fs";
183423
183467
  import { join as join64 } from "path";
183424
- function createSharedSkillTemplateLoader(readFile3 = readFileSync50, skillsRootPath = sharedSkillsRootPath()) {
183468
+ function createSharedSkillTemplateLoader(readFile3 = readFileSync51, skillsRootPath = sharedSkillsRootPath()) {
183425
183469
  const cache = new Map;
183426
183470
  return (skillName) => {
183427
183471
  const cached2 = cache.get(skillName);
@@ -185781,7 +185825,7 @@ import {
185781
185825
  existsSync as existsSync67,
185782
185826
  mkdirSync as mkdirSync21,
185783
185827
  copyFileSync as copyFileSync4,
185784
- readFileSync as readFileSync51,
185828
+ readFileSync as readFileSync52,
185785
185829
  writeFileSync as writeFileSync19,
185786
185830
  readdirSync as readdirSync11,
185787
185831
  statSync as statSync8,
@@ -185798,7 +185842,7 @@ async function snapshotCli(options = {}) {
185798
185842
  const realFs = {
185799
185843
  existsSync: existsSync67,
185800
185844
  mkdirSync: mkdirSync21,
185801
- readFileSync: readFileSync51,
185845
+ readFileSync: readFileSync52,
185802
185846
  writeFileSync: writeFileSync19,
185803
185847
  copyFileSync: copyFileSync4,
185804
185848
  readdirSync: readdirSync11,
@@ -185864,7 +185908,7 @@ import {
185864
185908
  existsSync as existsSync68,
185865
185909
  mkdirSync as mkdirSync22,
185866
185910
  copyFileSync as copyFileSync5,
185867
- readFileSync as readFileSync52,
185911
+ readFileSync as readFileSync53,
185868
185912
  writeFileSync as writeFileSync20,
185869
185913
  readdirSync as readdirSync12,
185870
185914
  statSync as statSync9,
@@ -185877,7 +185921,7 @@ async function restoreCli(options) {
185877
185921
  const realFs = {
185878
185922
  existsSync: existsSync68,
185879
185923
  mkdirSync: mkdirSync22,
185880
- readFileSync: readFileSync52,
185924
+ readFileSync: readFileSync53,
185881
185925
  writeFileSync: writeFileSync20,
185882
185926
  copyFileSync: copyFileSync5,
185883
185927
  readdirSync: readdirSync12,
@@ -185892,7 +185936,7 @@ async function restoreCli(options) {
185892
185936
  try {
185893
185937
  restoreSnapshot(options.state, { snapshotDir, fs: realFs });
185894
185938
  const manifestPath = path19.join(snapshotDir, options.state, "manifest.json");
185895
- const raw = readFileSync52(manifestPath).toString("utf-8");
185939
+ const raw = readFileSync53(manifestPath).toString("utf-8");
185896
185940
  const parsed = JSON.parse(raw);
185897
185941
  const fileCount = typeof parsed === "object" && parsed !== null && "files" in parsed && Array.isArray(parsed.files) ? parsed.files.length : 0;
185898
185942
  if (options.json) {
@@ -185916,7 +185960,7 @@ import {
185916
185960
  existsSync as existsSync69,
185917
185961
  mkdirSync as mkdirSync23,
185918
185962
  copyFileSync as copyFileSync6,
185919
- readFileSync as readFileSync53,
185963
+ readFileSync as readFileSync54,
185920
185964
  writeFileSync as writeFileSync21,
185921
185965
  readdirSync as readdirSync13,
185922
185966
  statSync as statSync10,
@@ -185939,7 +185983,7 @@ async function snapshotListCli(options) {
185939
185983
  const realFs = {
185940
185984
  existsSync: existsSync69,
185941
185985
  mkdirSync: mkdirSync23,
185942
- readFileSync: readFileSync53,
185986
+ readFileSync: readFileSync54,
185943
185987
  writeFileSync: writeFileSync21,
185944
185988
  copyFileSync: copyFileSync6,
185945
185989
  readdirSync: readdirSync13,
@@ -185970,7 +186014,7 @@ import {
185970
186014
  existsSync as existsSync70,
185971
186015
  mkdirSync as mkdirSync24,
185972
186016
  copyFileSync as copyFileSync7,
185973
- readFileSync as readFileSync54,
186017
+ readFileSync as readFileSync55,
185974
186018
  writeFileSync as writeFileSync22,
185975
186019
  readdirSync as readdirSync14,
185976
186020
  statSync as statSync11,
@@ -185983,7 +186027,7 @@ async function snapshotPruneCli(options = {}) {
185983
186027
  const realFs = {
185984
186028
  existsSync: existsSync70,
185985
186029
  mkdirSync: mkdirSync24,
185986
- readFileSync: readFileSync54,
186030
+ readFileSync: readFileSync55,
185987
186031
  writeFileSync: writeFileSync22,
185988
186032
  copyFileSync: copyFileSync7,
185989
186033
  readdirSync: readdirSync14,
@@ -186504,7 +186548,7 @@ async function traceCli(sessionId, options = {}) {
186504
186548
 
186505
186549
  // packages/omo-opencode/src/cli/dashboard.ts
186506
186550
  import * as path25 from "path";
186507
- import { readFileSync as readFileSync56 } from "fs";
186551
+ import { readFileSync as readFileSync57 } from "fs";
186508
186552
 
186509
186553
  // packages/omo-opencode/src/features/dashboard/data-provider.ts
186510
186554
  import * as os12 from "os";
@@ -187239,7 +187283,7 @@ function loadGatewayPassphrase() {
187239
187283
  try {
187240
187284
  const configDir = getConfigDir();
187241
187285
  const configPath = path25.join(configDir, "matrixos.jsonc");
187242
- const raw = readFileSync56(configPath, "utf-8");
187286
+ const raw = readFileSync57(configPath, "utf-8");
187243
187287
  const config5 = parseJsonc(raw);
187244
187288
  const dashboard2 = config5.dashboard;
187245
187289
  return typeof dashboard2?.gatewayPassphrase === "string" ? dashboard2.gatewayPassphrase : undefined;
@@ -187835,8 +187879,8 @@ project.command("search <query>").description("Search the active project KB and
187835
187879
  });
187836
187880
  project.command("add-doc <slug> <file>").description("Copy a document into the project KB").action(async (slug, filePath) => {
187837
187881
  const { addKbDocument: addKbDocument2 } = await Promise.resolve().then(() => (init_project_memory(), exports_project_memory));
187838
- const { readFileSync: readFileSync64 } = await import("fs");
187839
- const content = readFileSync64(filePath, "utf-8");
187882
+ const { readFileSync: readFileSync65 } = await import("fs");
187883
+ const content = readFileSync65(filePath, "utf-8");
187840
187884
  const dest = addKbDocument2(slug, filePath, content);
187841
187885
  process.stdout.write(JSON.stringify({ ok: true, dest }, null, 2) + `
187842
187886
  `);