oh-my-openagent 4.7.4 → 4.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -54387,7 +54387,7 @@ var init_config_manager = __esm(() => {
54387
54387
  init_backup_config();
54388
54388
  });
54389
54389
 
54390
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
54390
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
54391
54391
  import { dirname as dirname14, posix, sep as sep3 } from "path";
54392
54392
  function createModulerModifier() {
54393
54393
  const getModuleFromFileName = createGetModuleFromFilename();
@@ -54424,7 +54424,7 @@ function normalizeWindowsPath(path6) {
54424
54424
  }
54425
54425
  var init_module_node = () => {};
54426
54426
 
54427
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/featureFlagUtils.mjs
54427
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/featureFlagUtils.mjs
54428
54428
  function getFlagDetailFromFlagAndPayload(key, value, payload) {
54429
54429
  return {
54430
54430
  key,
@@ -54492,7 +54492,7 @@ var normalizeFlagsResponse = (flagsResponse) => {
54492
54492
  };
54493
54493
  var init_featureFlagUtils = () => {};
54494
54494
 
54495
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/types.mjs
54495
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/types.mjs
54496
54496
  var types_PostHogPersistedProperty;
54497
54497
  var init_types = __esm(() => {
54498
54498
  types_PostHogPersistedProperty = /* @__PURE__ */ function(PostHogPersistedProperty) {
@@ -54529,7 +54529,7 @@ var init_types = __esm(() => {
54529
54529
  }({});
54530
54530
  });
54531
54531
 
54532
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/gzip.mjs
54532
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/gzip.mjs
54533
54533
  function isGzipSupported() {
54534
54534
  return "CompressionStream" in globalThis && "TextEncoder" in globalThis && "Response" in globalThis && typeof Response.prototype.blob == "function";
54535
54535
  }
@@ -54597,7 +54597,7 @@ var init_gzip = __esm(() => {
54597
54597
  init_types();
54598
54598
  });
54599
54599
 
54600
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/utils/bot-detection.mjs
54600
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/utils/bot-detection.mjs
54601
54601
  var DEFAULT_BLOCKED_UA_STRS, isBlockedUA = function(ua, customBlockedUserAgents = []) {
54602
54602
  if (!ua)
54603
54603
  return false;
@@ -54689,10 +54689,10 @@ var init_bot_detection = __esm(() => {
54689
54689
  ];
54690
54690
  });
54691
54691
 
54692
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/utils/string-utils.mjs
54692
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/utils/string-utils.mjs
54693
54693
  var init_string_utils = () => {};
54694
54694
 
54695
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/utils/type-utils.mjs
54695
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/utils/type-utils.mjs
54696
54696
  function isPrimitive(value) {
54697
54697
  return value === null || typeof value != "object";
54698
54698
  }
@@ -54728,7 +54728,7 @@ var init_type_utils = __esm(() => {
54728
54728
  };
54729
54729
  });
54730
54730
 
54731
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/utils/number-utils.mjs
54731
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/utils/number-utils.mjs
54732
54732
  function clampToRange(value, min, max, logger2, fallbackValue) {
54733
54733
  if (min > max) {
54734
54734
  logger2.warn("min cannot be greater than max.");
@@ -54751,7 +54751,7 @@ var init_number_utils = __esm(() => {
54751
54751
  init_type_utils();
54752
54752
  });
54753
54753
 
54754
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs
54754
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs
54755
54755
  class BucketedRateLimiter {
54756
54756
  constructor(options) {
54757
54757
  this._buckets = {};
@@ -54798,7 +54798,7 @@ var init_bucketed_rate_limiter = __esm(() => {
54798
54798
  init_number_utils();
54799
54799
  });
54800
54800
 
54801
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/vendor/uuidv7.mjs
54801
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/vendor/uuidv7.mjs
54802
54802
  class UUID {
54803
54803
  constructor(bytes) {
54804
54804
  this.bytes = bytes;
@@ -54973,7 +54973,7 @@ var init_uuidv7 = __esm(() => {
54973
54973
  /*! For license information please see uuidv7.mjs.LICENSE.txt */
54974
54974
  });
54975
54975
 
54976
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/utils/promise-queue.mjs
54976
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/utils/promise-queue.mjs
54977
54977
  class PromiseQueue {
54978
54978
  add(promise) {
54979
54979
  const promiseUUID = uuidv7();
@@ -55003,7 +55003,7 @@ var init_promise_queue = __esm(() => {
55003
55003
  init_uuidv7();
55004
55004
  });
55005
55005
 
55006
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/utils/logger.mjs
55006
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/utils/logger.mjs
55007
55007
  function createConsole(consoleLike = console) {
55008
55008
  const lockedMethods = {
55009
55009
  log: consoleLike.log.bind(consoleLike),
@@ -55045,7 +55045,7 @@ var _createLogger = (prefix, maybeCall, consoleLike) => {
55045
55045
  }, passThrough = (fn) => fn();
55046
55046
  var init_logger2 = () => {};
55047
55047
 
55048
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs
55048
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs
55049
55049
  var MOBILE = "Mobile", IOS = "iOS", ANDROID = "Android", TABLET = "Tablet", ANDROID_TABLET, APPLE = "Apple", APPLE_WATCH, SAFARI = "Safari", BLACKBERRY = "BlackBerry", SAMSUNG = "Samsung", SAMSUNG_BROWSER, SAMSUNG_INTERNET, CHROME = "Chrome", CHROME_OS, CHROME_IOS, INTERNET_EXPLORER = "Internet Explorer", INTERNET_EXPLORER_MOBILE, OPERA = "Opera", OPERA_MINI, EDGE = "Edge", MICROSOFT_EDGE, FIREFOX = "Firefox", FIREFOX_IOS, NINTENDO = "Nintendo", PLAYSTATION = "PlayStation", XBOX = "Xbox", ANDROID_MOBILE, MOBILE_SAFARI, WINDOWS = "Windows", WINDOWS_PHONE, GENERIC = "Generic", GENERIC_MOBILE, GENERIC_TABLET, KONQUEROR = "Konqueror", OCULUS_BROWSER = "Oculus Browser", VIVALDI = "Vivaldi", YANDEX = "Yandex", WHALE = "Whale", DUCKDUCKGO = "DuckDuckGo", PALE_MOON = "Pale Moon", WATERFOX = "Waterfox", BRAVE = "Brave", BROWSER_VERSION_REGEX_SUFFIX = "(\\d+(\\.\\d+)?)", DEFAULT_BROWSER_VERSION_REGEX, XBOX_REGEX, PLAYSTATION_REGEX, NINTENDO_REGEX, BLACKBERRY_REGEX, windowsVersionMap, versionRegexes, osMatchers;
55050
55050
  var init_user_agent_utils = __esm(() => {
55051
55051
  init_string_utils();
@@ -55311,7 +55311,7 @@ var init_user_agent_utils = __esm(() => {
55311
55311
  ];
55312
55312
  });
55313
55313
 
55314
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/utils/index.mjs
55314
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/utils/index.mjs
55315
55315
  function removeTrailingSlash(url) {
55316
55316
  return url?.replace(/\/+$/, "");
55317
55317
  }
@@ -55360,7 +55360,7 @@ var init_utils = __esm(() => {
55360
55360
  init_user_agent_utils();
55361
55361
  });
55362
55362
 
55363
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/logs/logs-utils.mjs
55363
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/logs/logs-utils.mjs
55364
55364
  var OTLP_SEVERITY_MAP, DEFAULT_OTLP_SEVERITY;
55365
55365
  var init_logs_utils = __esm(() => {
55366
55366
  init_utils();
@@ -55393,25 +55393,25 @@ var init_logs_utils = __esm(() => {
55393
55393
  DEFAULT_OTLP_SEVERITY = OTLP_SEVERITY_MAP.info;
55394
55394
  });
55395
55395
 
55396
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/logs/index.mjs
55396
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/logs/index.mjs
55397
55397
  var init_logs = __esm(() => {
55398
55398
  init_logs_utils();
55399
55399
  init_types();
55400
55400
  init_utils();
55401
55401
  });
55402
55402
 
55403
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/surveys/validation.mjs
55403
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/surveys/validation.mjs
55404
55404
  var init_validation = __esm(() => {
55405
55405
  init_types();
55406
55406
  });
55407
55407
 
55408
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/cookie.mjs
55408
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/cookie.mjs
55409
55409
  var init_cookie = __esm(() => {
55410
55410
  init_utils();
55411
55411
  init_uuidv7();
55412
55412
  });
55413
55413
 
55414
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/eventemitter.mjs
55414
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/eventemitter.mjs
55415
55415
  class SimpleEventEmitter {
55416
55416
  constructor() {
55417
55417
  this.events = {};
@@ -55434,7 +55434,7 @@ class SimpleEventEmitter {
55434
55434
  }
55435
55435
  var init_eventemitter = () => {};
55436
55436
 
55437
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs
55437
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs
55438
55438
  function getFilenameToChunkIdMap(stackParser) {
55439
55439
  const chunkIdMap = globalThis._posthogChunkIds;
55440
55440
  if (!chunkIdMap)
@@ -55472,7 +55472,7 @@ function getFilenameToChunkIdMap(stackParser) {
55472
55472
  var parsedStackResults, lastKeysCount, cachedFilenameChunkIds;
55473
55473
  var init_chunk_ids = () => {};
55474
55474
 
55475
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs
55475
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs
55476
55476
  class ErrorPropertiesBuilder {
55477
55477
  constructor(coercers, stackParser, modifiers = []) {
55478
55478
  this.coercers = coercers;
@@ -55598,7 +55598,7 @@ var init_error_properties_builder = __esm(() => {
55598
55598
  init_chunk_ids();
55599
55599
  });
55600
55600
 
55601
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs
55601
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs
55602
55602
  function createFrame(platform, filename, func, lineno, colno) {
55603
55603
  const frame = {
55604
55604
  platform,
@@ -55617,7 +55617,7 @@ var init_base = __esm(() => {
55617
55617
  init_utils();
55618
55618
  });
55619
55619
 
55620
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs
55620
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs
55621
55621
  var extractSafariExtensionDetails = (func, filename) => {
55622
55622
  const isSafariExtension = func.indexOf("safari-extension") !== -1;
55623
55623
  const isSafariWebExtension = func.indexOf("safari-web-extension") !== -1;
@@ -55633,7 +55633,7 @@ var init_safari = __esm(() => {
55633
55633
  init_base();
55634
55634
  });
55635
55635
 
55636
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs
55636
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs
55637
55637
  var chromeRegexNoFnName, chromeRegex, chromeEvalRegex, chromeStackLineParser = (line, platform) => {
55638
55638
  const noFnParts = chromeRegexNoFnName.exec(line);
55639
55639
  if (noFnParts) {
@@ -55663,7 +55663,7 @@ var init_chrome = __esm(() => {
55663
55663
  chromeEvalRegex = /\((\S*)(?::(\d+))(?::(\d+))\)/;
55664
55664
  });
55665
55665
 
55666
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs
55666
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs
55667
55667
  var geckoREgex, geckoEvalRegex, geckoStackLineParser = (line, platform) => {
55668
55668
  const parts = geckoREgex.exec(line);
55669
55669
  if (parts) {
@@ -55690,7 +55690,7 @@ var init_gecko = __esm(() => {
55690
55690
  geckoEvalRegex = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
55691
55691
  });
55692
55692
 
55693
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs
55693
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs
55694
55694
  var winjsRegex, winjsStackLineParser = (line, platform) => {
55695
55695
  const parts = winjsRegex.exec(line);
55696
55696
  return parts ? createFrame(platform, parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined) : undefined;
@@ -55700,7 +55700,7 @@ var init_winjs = __esm(() => {
55700
55700
  winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
55701
55701
  });
55702
55702
 
55703
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs
55703
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs
55704
55704
  var opera10Regex, opera10StackLineParser = (line, platform) => {
55705
55705
  const parts = opera10Regex.exec(line);
55706
55706
  return parts ? createFrame(platform, parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;
@@ -55714,7 +55714,7 @@ var init_opera = __esm(() => {
55714
55714
  opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i;
55715
55715
  });
55716
55716
 
55717
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs
55717
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs
55718
55718
  function filenameIsInApp(filename, isNative = false) {
55719
55719
  const isInternal = isNative || filename && !filename.startsWith("/") && !filename.match(/^[A-Z]:/) && !filename.startsWith(".") && !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//);
55720
55720
  return !isInternal && filename !== undefined && !filename.includes("node_modules/");
@@ -55786,7 +55786,7 @@ var init_node = __esm(() => {
55786
55786
  FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
55787
55787
  });
55788
55788
 
55789
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs
55789
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs
55790
55790
  function reverseAndStripFrames(stack) {
55791
55791
  if (!stack.length)
55792
55792
  return [];
@@ -55840,7 +55840,7 @@ var init_parsers = __esm(() => {
55840
55840
  WEBPACK_ERROR_REGEXP = /\(error: (.*)\)/;
55841
55841
  });
55842
55842
 
55843
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs
55843
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs
55844
55844
  class DOMExceptionCoercer {
55845
55845
  match(err) {
55846
55846
  return this.isDOMException(err) || this.isDOMError(err);
@@ -55874,7 +55874,7 @@ var init_dom_exception_coercer = __esm(() => {
55874
55874
  init_utils();
55875
55875
  });
55876
55876
 
55877
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs
55877
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs
55878
55878
  class ErrorCoercer {
55879
55879
  match(err) {
55880
55880
  return isPlainError(err);
@@ -55905,7 +55905,7 @@ var init_error_coercer = __esm(() => {
55905
55905
  init_utils();
55906
55906
  });
55907
55907
 
55908
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs
55908
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs
55909
55909
  class ErrorEventCoercer {
55910
55910
  constructor() {}
55911
55911
  match(err) {
@@ -55927,7 +55927,7 @@ var init_error_event_coercer = __esm(() => {
55927
55927
  init_utils();
55928
55928
  });
55929
55929
 
55930
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs
55930
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs
55931
55931
  class StringCoercer {
55932
55932
  match(input) {
55933
55933
  return typeof input == "string";
@@ -55960,7 +55960,7 @@ var init_string_coercer = __esm(() => {
55960
55960
  ERROR_TYPES_PATTERN = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;
55961
55961
  });
55962
55962
 
55963
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/types.mjs
55963
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/types.mjs
55964
55964
  var severityLevels;
55965
55965
  var init_types2 = __esm(() => {
55966
55966
  severityLevels = [
@@ -55973,7 +55973,7 @@ var init_types2 = __esm(() => {
55973
55973
  ];
55974
55974
  });
55975
55975
 
55976
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs
55976
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs
55977
55977
  function extractExceptionKeysForMessage(err, maxLength = 40) {
55978
55978
  const keys = Object.keys(err);
55979
55979
  keys.sort();
@@ -55991,7 +55991,7 @@ function extractExceptionKeysForMessage(err, maxLength = 40) {
55991
55991
  }
55992
55992
  var init_utils2 = () => {};
55993
55993
 
55994
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs
55994
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs
55995
55995
  class ObjectCoercer {
55996
55996
  match(candidate) {
55997
55997
  return typeof candidate == "object" && candidate !== null;
@@ -56050,7 +56050,7 @@ var init_object_coercer = __esm(() => {
56050
56050
  init_utils2();
56051
56051
  });
56052
56052
 
56053
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs
56053
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs
56054
56054
  class EventCoercer {
56055
56055
  match(err) {
56056
56056
  return isEvent(err);
@@ -56070,7 +56070,7 @@ var init_event_coercer = __esm(() => {
56070
56070
  init_utils2();
56071
56071
  });
56072
56072
 
56073
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs
56073
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs
56074
56074
  class PrimitiveCoercer {
56075
56075
  match(candidate) {
56076
56076
  return isPrimitive(candidate);
@@ -56088,7 +56088,7 @@ var init_primitive_coercer = __esm(() => {
56088
56088
  init_utils();
56089
56089
  });
56090
56090
 
56091
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs
56091
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs
56092
56092
  class PromiseRejectionEventCoercer {
56093
56093
  match(err) {
56094
56094
  return isBuiltin(err, "PromiseRejectionEvent") || this.isCustomEventWrappingRejection(err);
@@ -56128,7 +56128,7 @@ var init_promise_rejection_event = __esm(() => {
56128
56128
  init_utils();
56129
56129
  });
56130
56130
 
56131
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs
56131
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs
56132
56132
  var init_coercers = __esm(() => {
56133
56133
  init_dom_exception_coercer();
56134
56134
  init_error_coercer();
@@ -56140,7 +56140,7 @@ var init_coercers = __esm(() => {
56140
56140
  init_promise_rejection_event();
56141
56141
  });
56142
56142
 
56143
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/utils.mjs
56143
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/utils.mjs
56144
56144
  class ReduceableCache {
56145
56145
  constructor(_maxSize) {
56146
56146
  this._maxSize = _maxSize;
@@ -56167,7 +56167,7 @@ class ReduceableCache {
56167
56167
  }
56168
56168
  var init_utils3 = () => {};
56169
56169
 
56170
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/exception-steps.mjs
56170
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/exception-steps.mjs
56171
56171
  function resolveExceptionStepsConfig(config) {
56172
56172
  if (!config)
56173
56173
  return {
@@ -56329,7 +56329,7 @@ var init_exception_steps = __esm(() => {
56329
56329
  };
56330
56330
  });
56331
56331
 
56332
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/error-tracking/index.mjs
56332
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/error-tracking/index.mjs
56333
56333
  var exports_error_tracking = {};
56334
56334
  __export(exports_error_tracking, {
56335
56335
  winjsStackLineParser: () => winjsStackLineParser,
@@ -56366,7 +56366,7 @@ var init_error_tracking = __esm(() => {
56366
56366
  init_exception_steps();
56367
56367
  });
56368
56368
 
56369
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/posthog-core-stateless.mjs
56369
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/posthog-core-stateless.mjs
56370
56370
  async function logFlushError(err) {
56371
56371
  if (err instanceof PostHogFetchHttpError) {
56372
56372
  let text = "";
@@ -57167,7 +57167,7 @@ var init_posthog_core_stateless = __esm(() => {
57167
57167
  };
57168
57168
  });
57169
57169
 
57170
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/posthog-core.mjs
57170
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/posthog-core.mjs
57171
57171
  var init_posthog_core = __esm(() => {
57172
57172
  init_featureFlagUtils();
57173
57173
  init_types();
@@ -57176,12 +57176,12 @@ var init_posthog_core = __esm(() => {
57176
57176
  init_utils();
57177
57177
  });
57178
57178
 
57179
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/tracing-headers.mjs
57179
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/tracing-headers.mjs
57180
57180
  var init_tracing_headers = __esm(() => {
57181
57181
  init_type_utils();
57182
57182
  });
57183
57183
 
57184
- // node_modules/.bun/@posthog+core@1.30.2/node_modules/@posthog/core/dist/index.mjs
57184
+ // node_modules/.bun/@posthog+core@1.30.3/node_modules/@posthog/core/dist/index.mjs
57185
57185
  var init_dist = __esm(() => {
57186
57186
  init_featureFlagUtils();
57187
57187
  init_gzip();
@@ -57198,7 +57198,7 @@ var init_dist = __esm(() => {
57198
57198
  init_types();
57199
57199
  });
57200
57200
 
57201
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs
57201
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs
57202
57202
  import { createReadStream } from "fs";
57203
57203
  import { createInterface } from "readline";
57204
57204
  async function addSourceContext(frames) {
@@ -57417,7 +57417,7 @@ var init_context_lines_node = __esm(() => {
57417
57417
  LRU_FILE_CONTENTS_FS_READ_FAILED = new exports_error_tracking.ReduceableCache(20);
57418
57418
  });
57419
57419
 
57420
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/relative-path.node.mjs
57420
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/relative-path.node.mjs
57421
57421
  import { isAbsolute as isAbsolute5, relative as relative4, sep as sep4 } from "path";
57422
57422
  function createRelativePathModifier(basePath = process.cwd()) {
57423
57423
  const isWindows = sep4 === "\\";
@@ -57434,11 +57434,11 @@ function createRelativePathModifier(basePath = process.cwd()) {
57434
57434
  }
57435
57435
  var init_relative_path_node = () => {};
57436
57436
 
57437
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/version.mjs
57438
- var version = "5.35.11";
57437
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/version.mjs
57438
+ var version = "5.35.12";
57439
57439
  var init_version = () => {};
57440
57440
 
57441
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/types.mjs
57441
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/types.mjs
57442
57442
  var FeatureFlagError2;
57443
57443
  var init_types3 = __esm(() => {
57444
57444
  FeatureFlagError2 = {
@@ -57449,7 +57449,7 @@ var init_types3 = __esm(() => {
57449
57449
  };
57450
57450
  });
57451
57451
 
57452
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/feature-flag-evaluations.mjs
57452
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/feature-flag-evaluations.mjs
57453
57453
  class FeatureFlagEvaluations {
57454
57454
  constructor(init) {
57455
57455
  this._host = init.host;
@@ -57583,7 +57583,7 @@ var init_feature_flag_evaluations = __esm(() => {
57583
57583
  init_types3();
57584
57584
  });
57585
57585
 
57586
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs
57586
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs
57587
57587
  async function hashSHA1(text) {
57588
57588
  const subtle = globalThis.crypto?.subtle;
57589
57589
  if (!subtle)
@@ -57594,7 +57594,7 @@ async function hashSHA1(text) {
57594
57594
  }
57595
57595
  var init_crypto = () => {};
57596
57596
 
57597
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs
57597
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs
57598
57598
  class FeatureFlagsPoller {
57599
57599
  constructor({ pollingInterval, personalApiKey, projectApiKey, timeout, host, customHeaders, ...options }) {
57600
57600
  this.debugMode = false;
@@ -58495,7 +58495,7 @@ var init_feature_flags = __esm(() => {
58495
58495
  };
58496
58496
  });
58497
58497
 
58498
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs
58498
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs
58499
58499
  function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
58500
58500
  let calledFatalError = false;
58501
58501
  return Object.assign((error) => {
@@ -58528,7 +58528,7 @@ function addUnhandledRejectionListener(captureFn) {
58528
58528
  }
58529
58529
  var init_autocapture = () => {};
58530
58530
 
58531
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs
58531
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs
58532
58532
  class ErrorTracking {
58533
58533
  constructor(client, options, _logger) {
58534
58534
  this.client = client;
@@ -58600,7 +58600,7 @@ var init_error_tracking2 = __esm(() => {
58600
58600
  init_dist();
58601
58601
  });
58602
58602
 
58603
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/storage-memory.mjs
58603
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/storage-memory.mjs
58604
58604
  class PostHogMemoryStorage {
58605
58605
  getProperty(key) {
58606
58606
  return this._memoryStorage[key];
@@ -58614,7 +58614,7 @@ class PostHogMemoryStorage {
58614
58614
  }
58615
58615
  var init_storage_memory = () => {};
58616
58616
 
58617
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/client.mjs
58617
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/client.mjs
58618
58618
  function emitDeprecationWarningOnce(id, message) {
58619
58619
  if (_emittedDeprecations.has(id))
58620
58620
  return;
@@ -59607,7 +59607,7 @@ var init_client = __esm(() => {
59607
59607
  };
59608
59608
  });
59609
59609
 
59610
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/extensions/context/context.mjs
59610
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/context/context.mjs
59611
59611
  import { AsyncLocalStorage } from "async_hooks";
59612
59612
 
59613
59613
  class PostHogContext {
@@ -59639,7 +59639,7 @@ class PostHogContext {
59639
59639
  }
59640
59640
  var init_context = () => {};
59641
59641
 
59642
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/extensions/sentry-integration.mjs
59642
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/sentry-integration.mjs
59643
59643
  function createEventProcessor(_posthog, { organization, projectId, prefix, severityAllowList = [
59644
59644
  "error"
59645
59645
  ], sendExceptionsToPostHog = true } = {}) {
@@ -59710,16 +59710,16 @@ var init_sentry_integration = __esm(() => {
59710
59710
  };
59711
59711
  });
59712
59712
 
59713
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/extensions/tracing-headers.mjs
59713
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/tracing-headers.mjs
59714
59714
  var init_tracing_headers2 = () => {};
59715
59715
 
59716
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/extensions/express.mjs
59716
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/express.mjs
59717
59717
  var init_express = __esm(() => {
59718
59718
  init_error_tracking2();
59719
59719
  init_tracing_headers2();
59720
59720
  });
59721
59721
 
59722
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/exports.mjs
59722
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/exports.mjs
59723
59723
  var init_exports = __esm(() => {
59724
59724
  init_feature_flag_evaluations();
59725
59725
  init_dist();
@@ -59728,7 +59728,7 @@ var init_exports = __esm(() => {
59728
59728
  init_types3();
59729
59729
  });
59730
59730
 
59731
- // node_modules/.bun/posthog-node@5.35.11/node_modules/posthog-node/dist/entrypoints/index.node.mjs
59731
+ // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/entrypoints/index.node.mjs
59732
59732
  var PostHog;
59733
59733
  var init_index_node = __esm(() => {
59734
59734
  init_module_node();
@@ -61669,7 +61669,7 @@ var {
61669
61669
  // package.json
61670
61670
  var package_default = {
61671
61671
  name: "oh-my-openagent",
61672
- version: "4.7.4",
61672
+ version: "4.7.5",
61673
61673
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
61674
61674
  main: "./dist/index.js",
61675
61675
  types: "dist/index.d.ts",
@@ -61704,6 +61704,7 @@ var package_default = {
61704
61704
  ".opencode/skills",
61705
61705
  ".agents/command",
61706
61706
  ".agents/skills",
61707
+ "packages/lsp-tools-mcp/package.json",
61707
61708
  "packages/lsp-tools-mcp/dist",
61708
61709
  "packages/ast-grep-mcp/dist",
61709
61710
  "packages/git-bash-mcp/dist",
@@ -61804,17 +61805,17 @@ var package_default = {
61804
61805
  zod: "^4.4.3"
61805
61806
  },
61806
61807
  optionalDependencies: {
61807
- "oh-my-openagent-darwin-arm64": "4.7.4",
61808
- "oh-my-openagent-darwin-x64": "4.7.4",
61809
- "oh-my-openagent-darwin-x64-baseline": "4.7.4",
61810
- "oh-my-openagent-linux-arm64": "4.7.4",
61811
- "oh-my-openagent-linux-arm64-musl": "4.7.4",
61812
- "oh-my-openagent-linux-x64": "4.7.4",
61813
- "oh-my-openagent-linux-x64-baseline": "4.7.4",
61814
- "oh-my-openagent-linux-x64-musl": "4.7.4",
61815
- "oh-my-openagent-linux-x64-musl-baseline": "4.7.4",
61816
- "oh-my-openagent-windows-x64": "4.7.4",
61817
- "oh-my-openagent-windows-x64-baseline": "4.7.4"
61808
+ "oh-my-openagent-darwin-arm64": "4.7.5",
61809
+ "oh-my-openagent-darwin-x64": "4.7.5",
61810
+ "oh-my-openagent-darwin-x64-baseline": "4.7.5",
61811
+ "oh-my-openagent-linux-arm64": "4.7.5",
61812
+ "oh-my-openagent-linux-arm64-musl": "4.7.5",
61813
+ "oh-my-openagent-linux-x64": "4.7.5",
61814
+ "oh-my-openagent-linux-x64-baseline": "4.7.5",
61815
+ "oh-my-openagent-linux-x64-musl": "4.7.5",
61816
+ "oh-my-openagent-linux-x64-musl-baseline": "4.7.5",
61817
+ "oh-my-openagent-windows-x64": "4.7.5",
61818
+ "oh-my-openagent-windows-x64-baseline": "4.7.5"
61818
61819
  },
61819
61820
  overrides: {
61820
61821
  hono: "^4.12.18",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-openagent",
3
- "version": "4.7.4",
3
+ "version": "4.7.5",
4
4
  "description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
5
5
  "main": "./dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -35,6 +35,7 @@
35
35
  ".opencode/skills",
36
36
  ".agents/command",
37
37
  ".agents/skills",
38
+ "packages/lsp-tools-mcp/package.json",
38
39
  "packages/lsp-tools-mcp/dist",
39
40
  "packages/ast-grep-mcp/dist",
40
41
  "packages/git-bash-mcp/dist",
@@ -135,17 +136,17 @@
135
136
  "zod": "^4.4.3"
136
137
  },
137
138
  "optionalDependencies": {
138
- "oh-my-openagent-darwin-arm64": "4.7.4",
139
- "oh-my-openagent-darwin-x64": "4.7.4",
140
- "oh-my-openagent-darwin-x64-baseline": "4.7.4",
141
- "oh-my-openagent-linux-arm64": "4.7.4",
142
- "oh-my-openagent-linux-arm64-musl": "4.7.4",
143
- "oh-my-openagent-linux-x64": "4.7.4",
144
- "oh-my-openagent-linux-x64-baseline": "4.7.4",
145
- "oh-my-openagent-linux-x64-musl": "4.7.4",
146
- "oh-my-openagent-linux-x64-musl-baseline": "4.7.4",
147
- "oh-my-openagent-windows-x64": "4.7.4",
148
- "oh-my-openagent-windows-x64-baseline": "4.7.4"
139
+ "oh-my-openagent-darwin-arm64": "4.7.5",
140
+ "oh-my-openagent-darwin-x64": "4.7.5",
141
+ "oh-my-openagent-darwin-x64-baseline": "4.7.5",
142
+ "oh-my-openagent-linux-arm64": "4.7.5",
143
+ "oh-my-openagent-linux-arm64-musl": "4.7.5",
144
+ "oh-my-openagent-linux-x64": "4.7.5",
145
+ "oh-my-openagent-linux-x64-baseline": "4.7.5",
146
+ "oh-my-openagent-linux-x64-musl": "4.7.5",
147
+ "oh-my-openagent-linux-x64-musl-baseline": "4.7.5",
148
+ "oh-my-openagent-windows-x64": "4.7.5",
149
+ "oh-my-openagent-windows-x64-baseline": "4.7.5"
149
150
  },
150
151
  "overrides": {
151
152
  "hono": "^4.12.18",
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@code-yeongyu/lsp-tools-mcp",
3
+ "version": "0.1.0",
4
+ "description": "Standalone Language Server Protocol tools exposed as a stdio MCP server.",
5
+ "type": "module",
6
+ "packageManager": "npm@11.12.1",
7
+ "license": "MIT",
8
+ "homepage": "https://github.com/code-yeongyu/lsp-tools-mcp",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/code-yeongyu/lsp-tools-mcp.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/code-yeongyu/lsp-tools-mcp/issues"
15
+ },
16
+ "keywords": [
17
+ "mcp",
18
+ "lsp",
19
+ "language-server-protocol",
20
+ "model-context-protocol",
21
+ "typescript",
22
+ "nodejs"
23
+ ],
24
+ "bin": {
25
+ "omo-lsp": "./dist/cli.js"
26
+ },
27
+ "files": [
28
+ "dist",
29
+ "LICENSE",
30
+ "NOTICE",
31
+ "README.md",
32
+ "CHANGELOG.md"
33
+ ],
34
+ "scripts": {
35
+ "build": "tsc -p tsconfig.build.json",
36
+ "test": "vitest --run",
37
+ "test:watch": "vitest",
38
+ "typecheck": "tsc --noEmit",
39
+ "lint": "biome check .",
40
+ "lint:fix": "biome check --write .",
41
+ "check": "tsc --noEmit && biome check . && npm run build"
42
+ },
43
+ "devDependencies": {
44
+ "@biomejs/biome": "2.4.15",
45
+ "@types/node": "^25.7.0",
46
+ "typescript": "^6.0.3",
47
+ "vitest": "^4.1.5"
48
+ },
49
+ "engines": {
50
+ "node": ">=20.0.0"
51
+ }
52
+ }
@@ -9,5 +9,28 @@ Internally each component remains isolated under `components/`:
9
9
  - `components/lsp`
10
10
  - `components/ultrawork`
11
11
  - `components/ulw-loop`
12
+ - `components/telemetry`
12
13
 
13
14
  The root plugin manifest exports one Codex plugin named `omo`, with aggregate hooks, skills, and the LSP MCP server.
15
+
16
+ ## Telemetry
17
+
18
+ The bundled telemetry component emits the anonymous `omo_codex_daily_active` event at most once per UTC day per machine when the Codex `SessionStart` hook runs. It uses `sha256("omo-codex:" + hostname)` as the distinct ID, disables PostHog person profiles, and stores daily deduplication state in `$XDG_DATA_HOME/omo-codex/posthog-activity.json` or `~/.local/share/omo-codex/posthog-activity.json`.
19
+
20
+ Captured properties are limited to product/runtime metadata, operating-system metadata, coarse machine shape, locale/timezone, shell/terminal hints, `source`, `reason`, and `day_utc`. It does not send prompt contents, chat transcripts, source files, repository contents, file paths, access tokens, API keys, raw hostnames, Git remotes, usernames, email addresses, or runtime error diagnostics.
21
+
22
+ Opt out before launching Codex:
23
+
24
+ ```bash
25
+ export OMO_CODEX_DISABLE_POSTHOG=1
26
+ export OMO_CODEX_SEND_ANONYMOUS_TELEMETRY=0
27
+ ```
28
+
29
+ Global opt-out flags also disable this telemetry:
30
+
31
+ ```bash
32
+ export OMO_DISABLE_POSTHOG=1
33
+ export OMO_SEND_ANONYMOUS_TELEMETRY=0
34
+ ```
35
+
36
+ Detailed implementation notes live in `components/telemetry/README.md`; the root product disclosure lives in `docs/reference/codex-telemetry.md` in the source repository.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { spawn, spawnSync } from "node:child_process";
4
- import { mkdir, open, readFile, rm, stat, writeFile } from "node:fs/promises";
4
+ import { appendFile, mkdir, open, readFile, rm, stat, writeFile } from "node:fs/promises";
5
5
  import { homedir } from "node:os";
6
6
  import { dirname, join } from "node:path";
7
7
  import { pathToFileURL } from "node:url";
@@ -40,14 +40,19 @@ export async function runAutoUpdateCheck({ env = process.env, now = Date.now() }
40
40
  if (!plan.shouldRun) return { started: false, reason: plan.reason };
41
41
 
42
42
  const lock = await acquireLock(resolveLockPath(env, statePath), now, env);
43
- if (lock === null) return { started: false, reason: "locked" };
43
+ if (lock === null) {
44
+ await appendUpdateLog(env, now, "locked");
45
+ return { started: false, reason: "locked" };
46
+ }
44
47
  try {
45
48
  await writeState(statePath, { lastCheckedAt: now });
49
+ await appendUpdateLog(env, now, "started", { command: plan.command, args: plan.args });
46
50
  if (env.LAZYCODEX_AUTO_UPDATE_WAIT === "1") {
47
51
  const result = spawnSync(plan.command, plan.args, {
48
52
  env: plan.env,
49
53
  stdio: "ignore",
50
54
  });
55
+ await appendUpdateLog(env, now, "finished", { status: result.status ?? 0 });
51
56
  return { started: true, status: result.status ?? 0 };
52
57
  }
53
58
 
@@ -94,6 +99,12 @@ function resolveStatePath(env) {
94
99
  return join(dataRoot, "auto-update.json");
95
100
  }
96
101
 
102
+ function resolveLogPath(env) {
103
+ if (env.LAZYCODEX_AUTO_UPDATE_LOG_PATH?.trim()) return env.LAZYCODEX_AUTO_UPDATE_LOG_PATH;
104
+ const dataRoot = env.PLUGIN_DATA?.trim() || join(homedir(), ".local", "share", "lazycodex");
105
+ return join(dataRoot, "auto-update.log");
106
+ }
107
+
97
108
  function resolveLockPath(env, statePath) {
98
109
  if (env.LAZYCODEX_AUTO_UPDATE_LOCK_PATH?.trim()) return env.LAZYCODEX_AUTO_UPDATE_LOCK_PATH;
99
110
  return `${statePath}.lock`;
@@ -145,6 +156,17 @@ async function writeState(statePath, state) {
145
156
  await writeFile(statePath, `${JSON.stringify(state, null, 2)}\n`);
146
157
  }
147
158
 
159
+ async function appendUpdateLog(env, now, event, details = {}) {
160
+ const logPath = resolveLogPath(env);
161
+ await mkdir(dirname(logPath), { recursive: true });
162
+ const entry = {
163
+ timestamp: new Date(now).toISOString(),
164
+ event,
165
+ ...details,
166
+ };
167
+ await appendFile(logPath, `${JSON.stringify(entry)}\n`);
168
+ }
169
+
148
170
  function parsePositiveInteger(value, fallback) {
149
171
  if (value === undefined || value === "") return fallback;
150
172
  const parsed = Number.parseInt(value, 10);
@@ -43,6 +43,7 @@ test("#given recent state #when resolving plan #then update is throttled", () =>
43
43
  test("#given test command override #when running check #then records state and launches command", async () => {
44
44
  const root = await mkdtemp(join(tmpdir(), "lazycodex-auto-update-"));
45
45
  const logPath = join(root, "spawn.log");
46
+ const updateLogPath = join(root, "auto-update.log");
46
47
  const statePath = join(root, "state.json");
47
48
  const codexHome = join(root, "codex-home");
48
49
 
@@ -51,6 +52,7 @@ test("#given test command override #when running check #then records state and l
51
52
  CODEX_HOME: codexHome,
52
53
  LAZYCODEX_MODEL_CATALOG_STATE_PATH: join(root, "model-state.json"),
53
54
  LAZYCODEX_AUTO_UPDATE_STATE_PATH: statePath,
55
+ LAZYCODEX_AUTO_UPDATE_LOG_PATH: updateLogPath,
54
56
  LAZYCODEX_AUTO_UPDATE_INTERVAL_MS: "0",
55
57
  LAZYCODEX_AUTO_UPDATE_COMMAND: process.execPath,
56
58
  LAZYCODEX_AUTO_UPDATE_ARGS_JSON: JSON.stringify(["-e", `require("node:fs").writeFileSync(${JSON.stringify(logPath)}, "ok")`]),
@@ -62,6 +64,20 @@ test("#given test command override #when running check #then records state and l
62
64
  assert.equal(result.started, true);
63
65
  assert.equal(JSON.parse(await readFile(statePath, "utf8")).lastCheckedAt, 123_456);
64
66
  assert.equal(await readFile(logPath, "utf8"), "ok");
67
+ const updateLog = (await readFile(updateLogPath, "utf8")).trim().split("\n").map((line) => JSON.parse(line));
68
+ assert.deepEqual(updateLog, [
69
+ {
70
+ timestamp: "1970-01-01T00:02:03.456Z",
71
+ event: "started",
72
+ command: process.execPath,
73
+ args: ["-e", `require("node:fs").writeFileSync(${JSON.stringify(logPath)}, "ok")`],
74
+ },
75
+ {
76
+ timestamp: "1970-01-01T00:02:03.456Z",
77
+ event: "finished",
78
+ status: 0,
79
+ },
80
+ ]);
65
81
  assert.match(await readFile(join(codexHome, "config.toml"), "utf8"), /model = "gpt-5\.5"/);
66
82
  });
67
83