osagent 0.2.81 → 0.2.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/cli.js +696 -310
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -134858,7 +134858,7 @@ var init_geminiContentGenerator = __esm({
134858
134858
  }
134859
134859
  models;
134860
134860
  constructor(contentGeneratorConfig, config2) {
134861
- const version3 = "0.2.81";
134861
+ const version3 = "0.2.82";
134862
134862
  const userAgent2 = `OSAgent/${version3} (${process.platform}; ${process.arch})`;
134863
134863
  let headers = {
134864
134864
  "User-Agent": userAgent2
@@ -135368,24 +135368,24 @@ var init_detect_platform = __esm({
135368
135368
  return `other:${arch3}`;
135369
135369
  return "unknown";
135370
135370
  }, "normalizeArch");
135371
- normalizePlatform = /* @__PURE__ */ __name((platform16) => {
135372
- platform16 = platform16.toLowerCase();
135373
- if (platform16.includes("ios"))
135371
+ normalizePlatform = /* @__PURE__ */ __name((platform17) => {
135372
+ platform17 = platform17.toLowerCase();
135373
+ if (platform17.includes("ios"))
135374
135374
  return "iOS";
135375
- if (platform16 === "android")
135375
+ if (platform17 === "android")
135376
135376
  return "Android";
135377
- if (platform16 === "darwin")
135377
+ if (platform17 === "darwin")
135378
135378
  return "MacOS";
135379
- if (platform16 === "win32")
135379
+ if (platform17 === "win32")
135380
135380
  return "Windows";
135381
- if (platform16 === "freebsd")
135381
+ if (platform17 === "freebsd")
135382
135382
  return "FreeBSD";
135383
- if (platform16 === "openbsd")
135383
+ if (platform17 === "openbsd")
135384
135384
  return "OpenBSD";
135385
- if (platform16 === "linux")
135385
+ if (platform17 === "linux")
135386
135386
  return "Linux";
135387
- if (platform16)
135388
- return `Other:${platform16}`;
135387
+ if (platform17)
135388
+ return `Other:${platform17}`;
135389
135389
  return "Unknown";
135390
135390
  }, "normalizePlatform");
135391
135391
  getPlatformHeaders = /* @__PURE__ */ __name(() => {
@@ -150113,24 +150113,24 @@ var init_detect_platform2 = __esm({
150113
150113
  return `other:${arch3}`;
150114
150114
  return "unknown";
150115
150115
  }, "normalizeArch");
150116
- normalizePlatform2 = /* @__PURE__ */ __name((platform16) => {
150117
- platform16 = platform16.toLowerCase();
150118
- if (platform16.includes("ios"))
150116
+ normalizePlatform2 = /* @__PURE__ */ __name((platform17) => {
150117
+ platform17 = platform17.toLowerCase();
150118
+ if (platform17.includes("ios"))
150119
150119
  return "iOS";
150120
- if (platform16 === "android")
150120
+ if (platform17 === "android")
150121
150121
  return "Android";
150122
- if (platform16 === "darwin")
150122
+ if (platform17 === "darwin")
150123
150123
  return "MacOS";
150124
- if (platform16 === "win32")
150124
+ if (platform17 === "win32")
150125
150125
  return "Windows";
150126
- if (platform16 === "freebsd")
150126
+ if (platform17 === "freebsd")
150127
150127
  return "FreeBSD";
150128
- if (platform16 === "openbsd")
150128
+ if (platform17 === "openbsd")
150129
150129
  return "OpenBSD";
150130
- if (platform16 === "linux")
150130
+ if (platform17 === "linux")
150131
150131
  return "Linux";
150132
- if (platform16)
150133
- return `Other:${platform16}`;
150132
+ if (platform17)
150133
+ return `Other:${platform17}`;
150134
150134
  return "Unknown";
150135
150135
  }, "normalizePlatform");
150136
150136
  getPlatformHeaders2 = /* @__PURE__ */ __name(() => {
@@ -155058,7 +155058,7 @@ function createContentGeneratorConfig(config2, authType, generationConfig) {
155058
155058
  };
155059
155059
  }
155060
155060
  async function createContentGenerator(config2, gcConfig, sessionId2, isInitialAuth) {
155061
- const version3 = "0.2.81";
155061
+ const version3 = "0.2.82";
155062
155062
  const userAgent2 = `OSAgent/${version3} (${process.platform}; ${process.arch})`;
155063
155063
  const baseHeaders = {
155064
155064
  "User-Agent": userAgent2
@@ -161210,7 +161210,7 @@ var require_xterm_headless = __commonJS({
161210
161210
  };
161211
161211
  };
161212
161212
  Object.defineProperty(t4, "__esModule", { value: true }), t4.InputHandler = t4.WindowsOptionsReportType = void 0;
161213
- const n3 = i2(584), a = i2(116), o2 = i2(15), h = i2(844), c3 = i2(482), l2 = i2(437), _ = i2(460), d = i2(643), f = i2(511), u = i2(734), p = i2(585), g = i2(480), v = i2(242), b = i2(351), S = i2(941), m = { "(": 0, ")": 1, "*": 2, "+": 3, "-": 1, ".": 2 }, C = 131072;
161213
+ const n3 = i2(584), a = i2(116), o2 = i2(15), h = i2(844), c3 = i2(482), l2 = i2(437), _ = i2(460), d = i2(643), f = i2(511), u = i2(734), p = i2(585), g = i2(480), v = i2(242), b = i2(351), S = i2(941), m = { "(": 0, ")": 1, "*": 2, "+": 3, "-": 1, ".": 2 }, C2 = 131072;
161214
161214
  function y(e4, t5) {
161215
161215
  if (e4 > 24) return t5.setWinLines || false;
161216
161216
  switch (e4) {
@@ -161306,10 +161306,10 @@ var require_xterm_headless = __commonJS({
161306
161306
  const a2 = this._parseStack.paused;
161307
161307
  if (a2) {
161308
161308
  if (i3 = this._parser.parse(this._parseBuffer, this._parseStack.decodedLength, t5)) return this._logSlowResolvingAsync(i3), i3;
161309
- s4 = this._parseStack.cursorStartX, r5 = this._parseStack.cursorStartY, this._parseStack.paused = false, e4.length > C && (n4 = this._parseStack.position + C);
161309
+ s4 = this._parseStack.cursorStartX, r5 = this._parseStack.cursorStartY, this._parseStack.paused = false, e4.length > C2 && (n4 = this._parseStack.position + C2);
161310
161310
  }
161311
- if (this._logService.logLevel <= p.LogLevelEnum.DEBUG && this._logService.debug("parsing data" + ("string" == typeof e4 ? ` "${e4}"` : ` "${Array.prototype.map.call(e4, (e5) => String.fromCharCode(e5)).join("")}"`), "string" == typeof e4 ? e4.split("").map((e5) => e5.charCodeAt(0)) : e4), this._parseBuffer.length < e4.length && this._parseBuffer.length < C && (this._parseBuffer = new Uint32Array(Math.min(e4.length, C))), a2 || this._dirtyRowTracker.clearRange(), e4.length > C) for (let t6 = n4; t6 < e4.length; t6 += C) {
161312
- const n5 = t6 + C < e4.length ? t6 + C : e4.length, a3 = "string" == typeof e4 ? this._stringDecoder.decode(e4.substring(t6, n5), this._parseBuffer) : this._utf8Decoder.decode(e4.subarray(t6, n5), this._parseBuffer);
161311
+ if (this._logService.logLevel <= p.LogLevelEnum.DEBUG && this._logService.debug("parsing data" + ("string" == typeof e4 ? ` "${e4}"` : ` "${Array.prototype.map.call(e4, (e5) => String.fromCharCode(e5)).join("")}"`), "string" == typeof e4 ? e4.split("").map((e5) => e5.charCodeAt(0)) : e4), this._parseBuffer.length < e4.length && this._parseBuffer.length < C2 && (this._parseBuffer = new Uint32Array(Math.min(e4.length, C2))), a2 || this._dirtyRowTracker.clearRange(), e4.length > C2) for (let t6 = n4; t6 < e4.length; t6 += C2) {
161312
+ const n5 = t6 + C2 < e4.length ? t6 + C2 : e4.length, a3 = "string" == typeof e4 ? this._stringDecoder.decode(e4.substring(t6, n5), this._parseBuffer) : this._utf8Decoder.decode(e4.subarray(t6, n5), this._parseBuffer);
161313
161313
  if (i3 = this._parser.parse(this._parseBuffer, a3)) return this._preserveStack(s4, r5, a3, t6), this._logSlowResolvingAsync(i3), i3;
161314
161314
  }
161315
161315
  else if (!a2) {
@@ -171817,8 +171817,8 @@ var require_path_key = __commonJS({
171817
171817
  init_esbuild_shims();
171818
171818
  var pathKey = /* @__PURE__ */ __name((options2 = {}) => {
171819
171819
  const environment = options2.env || process.env;
171820
- const platform16 = options2.platform || process.platform;
171821
- if (platform16 !== "win32") {
171820
+ const platform17 = options2.platform || process.platform;
171821
+ if (platform17 !== "win32") {
171822
171822
  return "PATH";
171823
171823
  }
171824
171824
  return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
@@ -172441,8 +172441,8 @@ var require_utils14 = __commonJS({
172441
172441
  exports2.toPosixSlashes = (str2) => str2.replace(REGEX_BACKSLASH, "/");
172442
172442
  exports2.isWindows = () => {
172443
172443
  if (typeof navigator !== "undefined" && navigator.platform) {
172444
- const platform16 = navigator.platform.toLowerCase();
172445
- return platform16 === "win32" || platform16 === "windows";
172444
+ const platform17 = navigator.platform.toLowerCase();
172445
+ return platform17 === "win32" || platform17 === "windows";
172446
172446
  }
172447
172447
  if (typeof process !== "undefined" && process.platform) {
172448
172448
  return process.platform === "win32";
@@ -203658,12 +203658,12 @@ var require_backend = __commonJS({
203658
203658
  }
203659
203659
  __name(z, "z");
203660
203660
  var B = null;
203661
- function C() {
203661
+ function C2() {
203662
203662
  var a = B;
203663
203663
  null !== a && (B = a.next);
203664
203664
  return a;
203665
203665
  }
203666
- __name(C, "C");
203666
+ __name(C2, "C");
203667
203667
  var A = {
203668
203668
  use: /* @__PURE__ */ __name(function use2() {
203669
203669
  throw Error("Support for `use` not yet implemented in react-debug-tools.");
@@ -203672,7 +203672,7 @@ var require_backend = __commonJS({
203672
203672
  return a._currentValue;
203673
203673
  }, "readContext"),
203674
203674
  useCacheRefresh: /* @__PURE__ */ __name(function useCacheRefresh() {
203675
- var a = C();
203675
+ var a = C2();
203676
203676
  x.push({
203677
203677
  primitive: "CacheRefresh",
203678
203678
  stackError: Error(),
@@ -203683,7 +203683,7 @@ var require_backend = __commonJS({
203683
203683
  };
203684
203684
  }, "useCacheRefresh"),
203685
203685
  useCallback: /* @__PURE__ */ __name(function useCallback62(a) {
203686
- var b = C();
203686
+ var b = C2();
203687
203687
  x.push({
203688
203688
  primitive: "Callback",
203689
203689
  stackError: Error(),
@@ -203700,7 +203700,7 @@ var require_backend = __commonJS({
203700
203700
  return a._currentValue;
203701
203701
  }, "useContext"),
203702
203702
  useEffect: /* @__PURE__ */ __name(function useEffect66(a) {
203703
- C();
203703
+ C2();
203704
203704
  x.push({
203705
203705
  primitive: "Effect",
203706
203706
  stackError: Error(),
@@ -203708,7 +203708,7 @@ var require_backend = __commonJS({
203708
203708
  });
203709
203709
  }, "useEffect"),
203710
203710
  useImperativeHandle: /* @__PURE__ */ __name(function useImperativeHandle(a) {
203711
- C();
203711
+ C2();
203712
203712
  var b = void 0;
203713
203713
  null !== a && "object" === _typeof2(a) && (b = a.current);
203714
203714
  x.push({
@@ -203725,7 +203725,7 @@ var require_backend = __commonJS({
203725
203725
  });
203726
203726
  }, "useDebugValue"),
203727
203727
  useLayoutEffect: /* @__PURE__ */ __name(function useLayoutEffect4(a) {
203728
- C();
203728
+ C2();
203729
203729
  x.push({
203730
203730
  primitive: "LayoutEffect",
203731
203731
  stackError: Error(),
@@ -203733,7 +203733,7 @@ var require_backend = __commonJS({
203733
203733
  });
203734
203734
  }, "useLayoutEffect"),
203735
203735
  useInsertionEffect: /* @__PURE__ */ __name(function useInsertionEffect(a) {
203736
- C();
203736
+ C2();
203737
203737
  x.push({
203738
203738
  primitive: "InsertionEffect",
203739
203739
  stackError: Error(),
@@ -203741,7 +203741,7 @@ var require_backend = __commonJS({
203741
203741
  });
203742
203742
  }, "useInsertionEffect"),
203743
203743
  useMemo: /* @__PURE__ */ __name(function useMemo38(a) {
203744
- var b = C();
203744
+ var b = C2();
203745
203745
  a = null !== b ? b.memoizedState[0] : a();
203746
203746
  x.push({
203747
203747
  primitive: "Memo",
@@ -203754,7 +203754,7 @@ var require_backend = __commonJS({
203754
203754
  return [];
203755
203755
  }, "useMemoCache"),
203756
203756
  useReducer: /* @__PURE__ */ __name(function useReducer8(a, b, e2) {
203757
- a = C();
203757
+ a = C2();
203758
203758
  b = null !== a ? a.memoizedState : void 0 !== e2 ? e2(b) : b;
203759
203759
  x.push({
203760
203760
  primitive: "Reducer",
@@ -203765,7 +203765,7 @@ var require_backend = __commonJS({
203765
203765
  }];
203766
203766
  }, "useReducer"),
203767
203767
  useRef: /* @__PURE__ */ __name(function useRef37(a) {
203768
- var b = C();
203768
+ var b = C2();
203769
203769
  a = null !== b ? b.memoizedState : {
203770
203770
  current: a
203771
203771
  };
@@ -203777,7 +203777,7 @@ var require_backend = __commonJS({
203777
203777
  return a;
203778
203778
  }, "useRef"),
203779
203779
  useState: /* @__PURE__ */ __name(function useState75(a) {
203780
- var b = C();
203780
+ var b = C2();
203781
203781
  a = null !== b ? b.memoizedState : "function" === typeof a ? a() : a;
203782
203782
  x.push({
203783
203783
  primitive: "State",
@@ -203788,8 +203788,8 @@ var require_backend = __commonJS({
203788
203788
  }];
203789
203789
  }, "useState"),
203790
203790
  useTransition: /* @__PURE__ */ __name(function useTransition2() {
203791
- C();
203792
- C();
203791
+ C2();
203792
+ C2();
203793
203793
  x.push({
203794
203794
  primitive: "Transition",
203795
203795
  stackError: Error(),
@@ -203799,8 +203799,8 @@ var require_backend = __commonJS({
203799
203799
  }];
203800
203800
  }, "useTransition"),
203801
203801
  useSyncExternalStore: /* @__PURE__ */ __name(function useSyncExternalStore2(a, b) {
203802
- C();
203803
- C();
203802
+ C2();
203803
+ C2();
203804
203804
  a = b();
203805
203805
  x.push({
203806
203806
  primitive: "SyncExternalStore",
@@ -203810,7 +203810,7 @@ var require_backend = __commonJS({
203810
203810
  return a;
203811
203811
  }, "useSyncExternalStore"),
203812
203812
  useDeferredValue: /* @__PURE__ */ __name(function useDeferredValue(a) {
203813
- var b = C();
203813
+ var b = C2();
203814
203814
  x.push({
203815
203815
  primitive: "DeferredValue",
203816
203816
  stackError: Error(),
@@ -203819,7 +203819,7 @@ var require_backend = __commonJS({
203819
203819
  return a;
203820
203820
  }, "useDeferredValue"),
203821
203821
  useId: /* @__PURE__ */ __name(function useId2() {
203822
- var a = C();
203822
+ var a = C2();
203823
203823
  a = null !== a ? a.memoizedState : "";
203824
203824
  x.push({
203825
203825
  primitive: "Id",
@@ -204183,10 +204183,10 @@ var require_backend = __commonJS({
204183
204183
  return _typeof2(obj);
204184
204184
  }
204185
204185
  __name(_typeof2, "_typeof");
204186
- var l2 = Symbol.for("react.element"), n2 = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), q = Symbol.for("react.strict_mode"), r3 = Symbol.for("react.profiler"), t3 = Symbol.for("react.provider"), u = Symbol.for("react.context"), v = Symbol.for("react.server_context"), w = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), z = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), aa = Symbol.for("react.debug_trace_mode"), ba = Symbol.for("react.offscreen"), ca = Symbol.for("react.cache"), B = Symbol.for("react.default_value"), da = Symbol.for("react.postpone"), C = Symbol.iterator;
204186
+ var l2 = Symbol.for("react.element"), n2 = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), q = Symbol.for("react.strict_mode"), r3 = Symbol.for("react.profiler"), t3 = Symbol.for("react.provider"), u = Symbol.for("react.context"), v = Symbol.for("react.server_context"), w = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), z = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), aa = Symbol.for("react.debug_trace_mode"), ba = Symbol.for("react.offscreen"), ca = Symbol.for("react.cache"), B = Symbol.for("react.default_value"), da = Symbol.for("react.postpone"), C2 = Symbol.iterator;
204187
204187
  function ea(a) {
204188
204188
  if (null === a || "object" !== _typeof2(a)) return null;
204189
- a = C && a[C] || a["@@iterator"];
204189
+ a = C2 && a[C2] || a["@@iterator"];
204190
204190
  return "function" === typeof a ? a : null;
204191
204191
  }
204192
204192
  __name(ea, "ea");
@@ -228881,8 +228881,8 @@ var require_semver2 = __commonJS({
228881
228881
  }
228882
228882
  // preminor will bump the version up to the next minor release, and immediately
228883
228883
  // down to pre-release. premajor and prepatch work the same way.
228884
- inc(release4, identifier2, identifierBase) {
228885
- if (release4.startsWith("pre")) {
228884
+ inc(release5, identifier2, identifierBase) {
228885
+ if (release5.startsWith("pre")) {
228886
228886
  if (!identifier2 && identifierBase === false) {
228887
228887
  throw new Error("invalid increment argument: identifier is empty");
228888
228888
  }
@@ -228893,7 +228893,7 @@ var require_semver2 = __commonJS({
228893
228893
  }
228894
228894
  }
228895
228895
  }
228896
- switch (release4) {
228896
+ switch (release5) {
228897
228897
  case "premajor":
228898
228898
  this.prerelease.length = 0;
228899
228899
  this.patch = 0;
@@ -228984,7 +228984,7 @@ var require_semver2 = __commonJS({
228984
228984
  break;
228985
228985
  }
228986
228986
  default:
228987
- throw new Error(`invalid increment argument: ${release4}`);
228987
+ throw new Error(`invalid increment argument: ${release5}`);
228988
228988
  }
228989
228989
  this.raw = this.format();
228990
228990
  if (this.build.length) {
@@ -244170,7 +244170,7 @@ var require_polyfills = __commonJS({
244170
244170
  var constants4 = __require("constants");
244171
244171
  var origCwd = process.cwd;
244172
244172
  var cwd7 = null;
244173
- var platform16 = process.env.GRACEFUL_FS_PLATFORM || process.platform;
244173
+ var platform17 = process.env.GRACEFUL_FS_PLATFORM || process.platform;
244174
244174
  process.cwd = function() {
244175
244175
  if (!cwd7)
244176
244176
  cwd7 = origCwd.call(process);
@@ -244229,7 +244229,7 @@ var require_polyfills = __commonJS({
244229
244229
  fs105.lchownSync = function() {
244230
244230
  };
244231
244231
  }
244232
- if (platform16 === "win32") {
244232
+ if (platform17 === "win32") {
244233
244233
  fs105.rename = typeof fs105.rename !== "function" ? fs105.rename : function(fs$rename) {
244234
244234
  function rename(from, to, cb) {
244235
244235
  var start = Date.now();
@@ -245746,7 +245746,7 @@ var require_polyfills2 = __commonJS({
245746
245746
  var constants4 = __require("constants");
245747
245747
  var origCwd = process.cwd;
245748
245748
  var cwd7 = null;
245749
- var platform16 = process.env.GRACEFUL_FS_PLATFORM || process.platform;
245749
+ var platform17 = process.env.GRACEFUL_FS_PLATFORM || process.platform;
245750
245750
  process.cwd = function() {
245751
245751
  if (!cwd7)
245752
245752
  cwd7 = origCwd.call(process);
@@ -245805,7 +245805,7 @@ var require_polyfills2 = __commonJS({
245805
245805
  fs105.lchownSync = function() {
245806
245806
  };
245807
245807
  }
245808
- if (platform16 === "win32") {
245808
+ if (platform17 === "win32") {
245809
245809
  fs105.rename = typeof fs105.rename !== "function" ? fs105.rename : function(fs$rename) {
245810
245810
  function rename(from, to, cb) {
245811
245811
  var start = Date.now();
@@ -247987,7 +247987,7 @@ var require_inc = __commonJS({
247987
247987
  "use strict";
247988
247988
  init_esbuild_shims();
247989
247989
  var SemVer = require_semver2();
247990
- var inc = /* @__PURE__ */ __name((version3, release4, options2, identifier2, identifierBase) => {
247990
+ var inc = /* @__PURE__ */ __name((version3, release5, options2, identifier2, identifierBase) => {
247991
247991
  if (typeof options2 === "string") {
247992
247992
  identifierBase = identifier2;
247993
247993
  identifier2 = options2;
@@ -247997,7 +247997,7 @@ var require_inc = __commonJS({
247997
247997
  return new SemVer(
247998
247998
  version3 instanceof SemVer ? version3.version : version3,
247999
247999
  options2
248000
- ).inc(release4, identifier2, identifierBase).version;
248000
+ ).inc(release5, identifier2, identifierBase).version;
248001
248001
  } catch (er) {
248002
248002
  return null;
248003
248003
  }
@@ -256889,12 +256889,12 @@ async function getEnvironmentContext(config2) {
256889
256889
  month: "long",
256890
256890
  day: "numeric"
256891
256891
  });
256892
- const platform16 = process.platform;
256892
+ const platform17 = process.platform;
256893
256893
  const directoryContext = await getDirectoryContextString(config2);
256894
256894
  const context2 = `
256895
256895
  This is osagent. Initializing system context for autonomous coding operations.
256896
256896
  Today's date is ${today} (formatted according to the user's locale).
256897
- My operating system is: ${platform16}
256897
+ My operating system is: ${platform17}
256898
256898
  ${directoryContext}
256899
256899
  `.trim();
256900
256900
  const initialParts = [{ text: context2 }];
@@ -269157,7 +269157,7 @@ var Pattern = class _Pattern {
269157
269157
  #isUNC;
269158
269158
  #isAbsolute;
269159
269159
  #followGlobstar = true;
269160
- constructor(patternList, globList, index, platform16) {
269160
+ constructor(patternList, globList, index, platform17) {
269161
269161
  if (!isPatternList(patternList)) {
269162
269162
  throw new TypeError("empty pattern list");
269163
269163
  }
@@ -269174,7 +269174,7 @@ var Pattern = class _Pattern {
269174
269174
  this.#patternList = patternList;
269175
269175
  this.#globList = globList;
269176
269176
  this.#index = index;
269177
- this.#platform = platform16;
269177
+ this.#platform = platform17;
269178
269178
  if (this.#index === 0) {
269179
269179
  if (this.isUNC()) {
269180
269180
  const [p0, p1, p2, p3, ...prest] = this.#patternList;
@@ -269323,12 +269323,12 @@ var Ignore = class {
269323
269323
  absoluteChildren;
269324
269324
  platform;
269325
269325
  mmopts;
269326
- constructor(ignored, { nobrace, nocase, noext, noglobstar, platform: platform16 = defaultPlatform2 }) {
269326
+ constructor(ignored, { nobrace, nocase, noext, noglobstar, platform: platform17 = defaultPlatform2 }) {
269327
269327
  this.relative = [];
269328
269328
  this.absolute = [];
269329
269329
  this.relativeChildren = [];
269330
269330
  this.absoluteChildren = [];
269331
- this.platform = platform16;
269331
+ this.platform = platform17;
269332
269332
  this.mmopts = {
269333
269333
  dot: true,
269334
269334
  nobrace,
@@ -269336,7 +269336,7 @@ var Ignore = class {
269336
269336
  noext,
269337
269337
  noglobstar,
269338
269338
  optimizationLevel: 2,
269339
- platform: platform16,
269339
+ platform: platform17,
269340
269340
  nocomment: true,
269341
269341
  nonegate: true
269342
269342
  };
@@ -276443,8 +276443,8 @@ var logger = {
276443
276443
  };
276444
276444
  async function getProcessInfo(pid) {
276445
276445
  try {
276446
- const platform16 = os15.platform();
276447
- if (platform16 === "win32") {
276446
+ const platform17 = os15.platform();
276447
+ if (platform17 === "win32") {
276448
276448
  const powershellCommand = [
276449
276449
  "$p = Get-CimInstance Win32_Process",
276450
276450
  `-Filter 'ProcessId=${pid}'`,
@@ -276552,8 +276552,8 @@ async function getIdeProcessInfoForWindows() {
276552
276552
  }
276553
276553
  __name(getIdeProcessInfoForWindows, "getIdeProcessInfoForWindows");
276554
276554
  async function getIdeProcessInfo() {
276555
- const platform16 = os15.platform();
276556
- if (platform16 === "win32") {
276555
+ const platform17 = os15.platform();
276556
+ if (platform17 === "win32") {
276557
276557
  return getIdeProcessInfoForWindows();
276558
276558
  }
276559
276559
  return getIdeProcessInfoForUnix();
@@ -285996,7 +285996,7 @@ var IdeClient = class _IdeClient {
285996
285996
  * content if accepted.
285997
285997
  */
285998
285998
  async openDiff(filePath, newContent) {
285999
- const release4 = await this.acquireMutex();
285999
+ const release5 = await this.acquireMutex();
286000
286000
  const promise = new Promise((resolve25, reject) => {
286001
286001
  if (!this.client) {
286002
286002
  return reject(new Error("IDE client is not connected."));
@@ -286025,7 +286025,7 @@ var IdeClient = class _IdeClient {
286025
286025
  reject(err);
286026
286026
  });
286027
286027
  });
286028
- promise.finally(release4);
286028
+ promise.finally(release5);
286029
286029
  return promise;
286030
286030
  }
286031
286031
  /**
@@ -286046,13 +286046,13 @@ var IdeClient = class _IdeClient {
286046
286046
  * release the lock.
286047
286047
  */
286048
286048
  acquireMutex() {
286049
- let release4;
286049
+ let release5;
286050
286050
  const newMutex = new Promise((resolve25) => {
286051
- release4 = resolve25;
286051
+ release5 = resolve25;
286052
286052
  });
286053
286053
  const oldMutex = this.diffMutex;
286054
286054
  this.diffMutex = newMutex;
286055
- return oldMutex.then(() => release4);
286055
+ return oldMutex.then(() => release5);
286056
286056
  }
286057
286057
  async closeDiff(filePath, options2) {
286058
286058
  try {
@@ -289000,12 +289000,12 @@ function wslTimeout() {
289000
289000
  __name(wslTimeout, "wslTimeout");
289001
289001
  var __filename2 = fileURLToPath5(import.meta.url);
289002
289002
  var __dirname3 = path39.dirname(__filename2);
289003
- function getPlatformString(platform16) {
289004
- switch (platform16) {
289003
+ function getPlatformString(platform17) {
289004
+ switch (platform17) {
289005
289005
  case "darwin":
289006
289006
  case "linux":
289007
289007
  case "win32":
289008
- return platform16;
289008
+ return platform17;
289009
289009
  default:
289010
289010
  return void 0;
289011
289011
  }
@@ -289022,12 +289022,12 @@ function getArchitectureString(arch3) {
289022
289022
  }
289023
289023
  __name(getArchitectureString, "getArchitectureString");
289024
289024
  async function getRipgrepFromPackage() {
289025
- const platform16 = getPlatformString(process.platform);
289025
+ const platform17 = getPlatformString(process.platform);
289026
289026
  const arch3 = getArchitectureString(process.arch);
289027
- if (!platform16 || !arch3) {
289027
+ if (!platform17 || !arch3) {
289028
289028
  return null;
289029
289029
  }
289030
- const packageName = `@osagent/ripgrep-${platform16}-${arch3}`;
289030
+ const packageName = `@osagent/ripgrep-${platform17}-${arch3}`;
289031
289031
  try {
289032
289032
  const pkg2 = await import(packageName);
289033
289033
  if (pkg2 && typeof pkg2.getBinaryPath === "function") {
@@ -289043,14 +289043,14 @@ async function getBuiltinRipgrep() {
289043
289043
  if (packagePath) {
289044
289044
  return packagePath;
289045
289045
  }
289046
- const platform16 = getPlatformString(process.platform);
289046
+ const platform17 = getPlatformString(process.platform);
289047
289047
  const arch3 = getArchitectureString(process.arch);
289048
- if (!platform16 || !arch3) {
289048
+ if (!platform17 || !arch3) {
289049
289049
  return null;
289050
289050
  }
289051
- const binaryName = platform16 === "win32" ? "rg.exe" : "rg";
289051
+ const binaryName = platform17 === "win32" ? "rg.exe" : "rg";
289052
289052
  const isBundled = !__filename2.includes(path39.join("src", "utils"));
289053
- const vendorPath = isBundled ? path39.join(__dirname3, "vendor", "ripgrep", `${arch3}-${platform16}`, binaryName) : path39.join(__dirname3, "..", "..", "..", "vendor", "ripgrep", `${arch3}-${platform16}`, binaryName);
289053
+ const vendorPath = isBundled ? path39.join(__dirname3, "vendor", "ripgrep", `${arch3}-${platform17}`, binaryName) : path39.join(__dirname3, "..", "..", "..", "vendor", "ripgrep", `${arch3}-${platform17}`, binaryName);
289054
289054
  return vendorPath;
289055
289055
  }
289056
289056
  __name(getBuiltinRipgrep, "getBuiltinRipgrep");
@@ -305574,18 +305574,18 @@ var fuzzyMatchV2 = /* @__PURE__ */ __name((caseSensitive, normalize10, forward,
305574
305574
  H[i] = v;
305575
305575
  }
305576
305576
  }
305577
- let [, C] = alloc16(offset16, slab2, width * M);
305577
+ let [, C2] = alloc16(offset16, slab2, width * M);
305578
305578
  {
305579
305579
  const toCopy = C0.subarray(f0, lastIdx + 1);
305580
305580
  for (const [i, v] of toCopy.entries()) {
305581
- C[i] = v;
305581
+ C2[i] = v;
305582
305582
  }
305583
305583
  }
305584
305584
  const Fsub = F.subarray(1);
305585
305585
  const Psub = pattern.slice(1).slice(0, Fsub.length);
305586
305586
  for (const [off, f] of Fsub.entries()) {
305587
305587
  let inGap2 = false;
305588
- const pchar2 = Psub[off], pidx2 = off + 1, row = pidx2 * width, Tsub2 = T.subarray(f, lastIdx + 1), Bsub2 = B.subarray(f).subarray(0, Tsub2.length), Csub = C.subarray(row + f - f0).subarray(0, Tsub2.length), Cdiag = C.subarray(row + f - f0 - 1 - width).subarray(0, Tsub2.length), Hsub = H.subarray(row + f - f0).subarray(0, Tsub2.length), Hdiag = H.subarray(row + f - f0 - 1 - width).subarray(0, Tsub2.length), Hleft = H.subarray(row + f - f0 - 1).subarray(0, Tsub2.length);
305588
+ const pchar2 = Psub[off], pidx2 = off + 1, row = pidx2 * width, Tsub2 = T.subarray(f, lastIdx + 1), Bsub2 = B.subarray(f).subarray(0, Tsub2.length), Csub = C2.subarray(row + f - f0).subarray(0, Tsub2.length), Cdiag = C2.subarray(row + f - f0 - 1 - width).subarray(0, Tsub2.length), Hsub = H.subarray(row + f - f0).subarray(0, Tsub2.length), Hdiag = H.subarray(row + f - f0 - 1 - width).subarray(0, Tsub2.length), Hleft = H.subarray(row + f - f0 - 1).subarray(0, Tsub2.length);
305589
305589
  Hleft[0] = 0;
305590
305590
  for (const [off2, char] of Tsub2.entries()) {
305591
305591
  const col = off2 + f;
@@ -305643,7 +305643,7 @@ var fuzzyMatchV2 = /* @__PURE__ */ __name((caseSensitive, normalize10, forward,
305643
305643
  }
305644
305644
  i--;
305645
305645
  }
305646
- preferMatch = C[I2 + j0] > 1 || I2 + width + j0 + 1 < C.length && C[I2 + width + j0 + 1] > 0;
305646
+ preferMatch = C2[I2 + j0] > 1 || I2 + width + j0 + 1 < C2.length && C2[I2 + width + j0 + 1] > 0;
305647
305647
  j--;
305648
305648
  }
305649
305649
  }
@@ -312745,14 +312745,14 @@ import * as process13 from "node:process";
312745
312745
  import * as path58 from "node:path";
312746
312746
  import * as fs49 from "node:fs";
312747
312747
  import * as os19 from "node:os";
312748
- function getVsCodeCommand(platform16 = process13.platform) {
312749
- return platform16 === "win32" ? "code.cmd" : "code";
312748
+ function getVsCodeCommand(platform17 = process13.platform) {
312749
+ return platform17 === "win32" ? "code.cmd" : "code";
312750
312750
  }
312751
312751
  __name(getVsCodeCommand, "getVsCodeCommand");
312752
- async function findVsCodeCommand(platform16 = process13.platform) {
312753
- const vscodeCommand = getVsCodeCommand(platform16);
312752
+ async function findVsCodeCommand(platform17 = process13.platform) {
312753
+ const vscodeCommand = getVsCodeCommand(platform17);
312754
312754
  try {
312755
- if (platform16 === "win32") {
312755
+ if (platform17 === "win32") {
312756
312756
  const result = child_process.execSync(`where.exe ${vscodeCommand}`).toString().trim();
312757
312757
  const firstPath = result.split(/\r?\n/)[0];
312758
312758
  if (firstPath) {
@@ -312769,11 +312769,11 @@ async function findVsCodeCommand(platform16 = process13.platform) {
312769
312769
  }
312770
312770
  const locations = [];
312771
312771
  const homeDir = os19.homedir();
312772
- if (platform16 === "darwin") {
312772
+ if (platform17 === "darwin") {
312773
312773
  locations.push("/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code", path58.join(homeDir, "Library/Application Support/Code/bin/code"));
312774
- } else if (platform16 === "linux") {
312774
+ } else if (platform17 === "linux") {
312775
312775
  locations.push("/usr/share/code/bin/code", "/snap/bin/code", path58.join(homeDir, ".local/share/code/bin/code"));
312776
- } else if (platform16 === "win32") {
312776
+ } else if (platform17 === "win32") {
312777
312777
  locations.push(path58.join(process13.env["ProgramFiles"] || "C:\\Program Files", "Microsoft VS Code", "bin", "code.cmd"), path58.join(homeDir, "AppData", "Local", "Programs", "Microsoft VS Code", "bin", "code.cmd"));
312778
312778
  }
312779
312779
  for (const location of locations) {
@@ -312791,10 +312791,10 @@ var VsCodeInstaller = class {
312791
312791
  ideInfo;
312792
312792
  platform;
312793
312793
  vsCodeCommand;
312794
- constructor(ideInfo, platform16 = process13.platform) {
312794
+ constructor(ideInfo, platform17 = process13.platform) {
312795
312795
  this.ideInfo = ideInfo;
312796
- this.platform = platform16;
312797
- this.vsCodeCommand = findVsCodeCommand(platform16);
312796
+ this.platform = platform17;
312797
+ this.vsCodeCommand = findVsCodeCommand(platform17);
312798
312798
  }
312799
312799
  async install() {
312800
312800
  const commandPath = await this.vsCodeCommand;
@@ -312826,11 +312826,11 @@ var VsCodeInstaller = class {
312826
312826
  }
312827
312827
  }
312828
312828
  };
312829
- function getIdeInstaller(ide, platform16 = process13.platform) {
312829
+ function getIdeInstaller(ide, platform17 = process13.platform) {
312830
312830
  switch (ide.name) {
312831
312831
  case IDE_DEFINITIONS.vscode.name:
312832
312832
  case IDE_DEFINITIONS.firebasestudio.name:
312833
- return new VsCodeInstaller(ide, platform16);
312833
+ return new VsCodeInstaller(ide, platform17);
312834
312834
  default:
312835
312835
  return null;
312836
312836
  }
@@ -318959,12 +318959,12 @@ var loadYoga = (() => {
318959
318959
  return d;
318960
318960
  }
318961
318961
  __name(z, "z");
318962
- var ia, ja, A, C, ka, D, E, la, ma;
318962
+ var ia, ja, A, C2, ka, D, E, la, ma;
318963
318963
  function na() {
318964
318964
  var a = fa.buffer;
318965
318965
  ia = a;
318966
318966
  h.HEAP8 = ja = new Int8Array(a);
318967
- h.HEAP16 = C = new Int16Array(a);
318967
+ h.HEAP16 = C2 = new Int16Array(a);
318968
318968
  h.HEAP32 = D = new Int32Array(a);
318969
318969
  h.HEAPU8 = A = new Uint8Array(a);
318970
318970
  h.HEAPU16 = ka = new Uint16Array(a);
@@ -319444,7 +319444,7 @@ var loadYoga = (() => {
319444
319444
  };
319445
319445
  case 1:
319446
319446
  return c3 ? function(d) {
319447
- return C[d >> 1];
319447
+ return C2[d >> 1];
319448
319448
  } : function(d) {
319449
319449
  return ka[d >> 1];
319450
319450
  };
@@ -319461,7 +319461,7 @@ var loadYoga = (() => {
319461
319461
  __name(sb, "sb");
319462
319462
  function tb(a, b) {
319463
319463
  for (var c3 = "", d = 0; !(d >= b / 2); ++d) {
319464
- var e2 = C[a + 2 * d >> 1];
319464
+ var e2 = C2[a + 2 * d >> 1];
319465
319465
  if (0 == e2) break;
319466
319466
  c3 += String.fromCharCode(e2);
319467
319467
  }
@@ -319474,8 +319474,8 @@ var loadYoga = (() => {
319474
319474
  c3 -= 2;
319475
319475
  var d = b;
319476
319476
  c3 = c3 < 2 * a.length ? c3 / 2 : a.length;
319477
- for (var e2 = 0; e2 < c3; ++e2) C[b >> 1] = a.charCodeAt(e2), b += 2;
319478
- C[b >> 1] = 0;
319477
+ for (var e2 = 0; e2 < c3; ++e2) C2[b >> 1] = a.charCodeAt(e2), b += 2;
319478
+ C2[b >> 1] = 0;
319479
319479
  return b - d;
319480
319480
  }
319481
319481
  __name(ub, "ub");
@@ -319738,7 +319738,7 @@ var loadYoga = (() => {
319738
319738
  argPackAdvance: 8,
319739
319739
  readValueFromPointer: /* @__PURE__ */ __name(function(g) {
319740
319740
  if (1 === c3) var k = ja;
319741
- else if (2 === c3) k = C;
319741
+ else if (2 === c3) k = C2;
319742
319742
  else if (4 === c3) k = D;
319743
319743
  else throw new TypeError("Unknown boolean type size: " + b);
319744
319744
  return this.fromWireType(k[g >> f]);
@@ -332910,10 +332910,10 @@ async function downloadFromGitHubRelease(installMetadata, destination) {
332910
332910
  }
332911
332911
  __name(downloadFromGitHubRelease, "downloadFromGitHubRelease");
332912
332912
  function findReleaseAsset(assets) {
332913
- const platform16 = os21.platform();
332913
+ const platform17 = os21.platform();
332914
332914
  const arch3 = os21.arch();
332915
- const platformArchPrefix = `${platform16}.${arch3}.`;
332916
- const platformPrefix = `${platform16}.`;
332915
+ const platformArchPrefix = `${platform17}.${arch3}.`;
332916
+ const platformPrefix = `${platform17}.`;
332917
332917
  const platformArchAsset = assets.find((asset) => asset.name.toLowerCase().startsWith(platformArchPrefix));
332918
332918
  if (platformArchAsset) {
332919
332919
  return platformArchAsset;
@@ -340551,7 +340551,7 @@ __name(getPackageJson, "getPackageJson");
340551
340551
  // packages/cli/src/utils/version.js
340552
340552
  async function getCliVersion() {
340553
340553
  const pkgJson = await getPackageJson();
340554
- return "0.2.81";
340554
+ return "0.2.82";
340555
340555
  }
340556
340556
  __name(getCliVersion, "getCliVersion");
340557
340557
 
@@ -340926,38 +340926,91 @@ var mcpCommand = {
340926
340926
  }, "handler")
340927
340927
  };
340928
340928
 
340929
- // packages/cli/src/commands/doctor.js
340929
+ // packages/cli/src/commands/doctor.ts
340930
340930
  init_esbuild_shims();
340931
340931
  import { execSync as execSync4 } from "node:child_process";
340932
340932
  import * as fs70 from "node:fs";
340933
340933
  import * as path78 from "node:path";
340934
- import { homedir as homedir13 } from "node:os";
340935
- var OSA_DIR2 = ".OSA";
340934
+ import { homedir as homedir13, platform as platform14, release as release3, cpus, totalmem, freemem } from "node:os";
340935
+
340936
+ // packages/cli/src/generated/git-commit.ts
340937
+ init_esbuild_shims();
340938
+ var GIT_COMMIT_INFO2 = "7871312";
340939
+ var CLI_VERSION2 = "0.2.82";
340940
+
340941
+ // packages/cli/src/commands/doctor.ts
340942
+ var C = {
340943
+ reset: "\x1B[0m",
340944
+ bold: "\x1B[1m",
340945
+ dim: "\x1B[2m",
340946
+ green: "\x1B[32m",
340947
+ yellow: "\x1B[33m",
340948
+ red: "\x1B[31m",
340949
+ cyan: "\x1B[36m",
340950
+ gray: "\x1B[90m",
340951
+ white: "\x1B[37m"
340952
+ };
340953
+ function icon(status) {
340954
+ if (status === "ok") return `${C.green}\u2713${C.reset}`;
340955
+ if (status === "warning") return `${C.yellow}!${C.reset}`;
340956
+ return `${C.red}\u2717${C.reset}`;
340957
+ }
340958
+ __name(icon, "icon");
340959
+ function formatBytes(bytes) {
340960
+ if (bytes === 0) return "0 B";
340961
+ const k = 1024;
340962
+ const sizes = ["B", "KB", "MB", "GB", "TB"];
340963
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
340964
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(1)) + " " + sizes[i];
340965
+ }
340966
+ __name(formatBytes, "formatBytes");
340936
340967
  function checkNodeVersion() {
340937
340968
  const version3 = process.version;
340938
340969
  const major2 = parseInt(version3.slice(1).split(".")[0], 10);
340939
- if (major2 >= 18) {
340940
- return { name: "Node.js", status: "ok", message: `${version3} (supported)` };
340941
- } else if (major2 >= 16) {
340970
+ if (major2 >= 20) {
340971
+ return { name: "Node.js", status: "ok", message: `${version3}` };
340972
+ } else if (major2 >= 18) {
340942
340973
  return {
340943
340974
  name: "Node.js",
340944
340975
  status: "warning",
340945
- message: `${version3} (upgrade recommended)`,
340946
- action: "Consider upgrading to Node.js 18 or higher"
340976
+ message: `${version3} (upgrade to 20+ recommended)`,
340977
+ action: "Install Node.js 20+ for best performance"
340947
340978
  };
340948
340979
  }
340949
340980
  return {
340950
340981
  name: "Node.js",
340951
340982
  status: "error",
340952
340983
  message: `${version3} (unsupported)`,
340953
- action: "Please upgrade to Node.js 18 or higher"
340984
+ action: "Install Node.js 20+ from https://nodejs.org"
340954
340985
  };
340955
340986
  }
340956
340987
  __name(checkNodeVersion, "checkNodeVersion");
340988
+ function checkGitInstalled() {
340989
+ try {
340990
+ const result = execSync4("git --version 2>&1", {
340991
+ encoding: "utf-8",
340992
+ timeout: 5e3
340993
+ });
340994
+ const version3 = result.match(/git version ([\d.]+)/)?.[1] || "installed";
340995
+ return { name: "Git", status: "ok", message: `v${version3}` };
340996
+ } catch {
340997
+ return {
340998
+ name: "Git",
340999
+ status: "warning",
341000
+ message: "not installed",
341001
+ action: "Install Git for version control features"
341002
+ };
341003
+ }
341004
+ }
341005
+ __name(checkGitInstalled, "checkGitInstalled");
340957
341006
  function checkOllamaInstalled() {
340958
341007
  try {
340959
- const result = execSync4("ollama --version 2>&1", { encoding: "utf-8", timeout: 5e3 });
340960
- return { name: "Ollama CLI", status: "ok", message: result.trim() || "installed" };
341008
+ const result = execSync4("ollama --version 2>&1", {
341009
+ encoding: "utf-8",
341010
+ timeout: 5e3
341011
+ });
341012
+ const version3 = result.match(/ollama version ([\d.]+)/)?.[1] || result.trim();
341013
+ return { name: "Ollama CLI", status: "ok", message: `v${version3}` };
340961
341014
  } catch {
340962
341015
  return {
340963
341016
  name: "Ollama CLI",
@@ -340976,7 +341029,10 @@ function getOllamaEndpoint() {
340976
341029
  }
340977
341030
  const ollamaBaseUrl = process.env["OLLAMA_BASE_URL"];
340978
341031
  if (ollamaBaseUrl) {
340979
- return { url: ollamaBaseUrl.replace(/\/v1\/?$/, "").replace(/\/$/, ""), source: "OLLAMA_BASE_URL" };
341032
+ return {
341033
+ url: ollamaBaseUrl.replace(/\/v1\/?$/, "").replace(/\/$/, ""),
341034
+ source: "OLLAMA_BASE_URL"
341035
+ };
340980
341036
  }
340981
341037
  return { url: "http://localhost:11434", source: "default" };
340982
341038
  }
@@ -340986,11 +341042,18 @@ function checkOllamaRunning() {
340986
341042
  const displayUrl = url3.replace("http://", "");
340987
341043
  const sourceNote = source2 !== "default" ? ` (from ${source2})` : "";
340988
341044
  try {
340989
- execSync4(`curl -s ${url3}/api/tags`, { encoding: "utf-8", timeout: 5e3 });
340990
- return { name: "Ollama Server", status: "ok", message: `running on ${displayUrl}${sourceNote}` };
341045
+ execSync4(`curl -s --max-time 3 ${url3}/api/tags`, {
341046
+ encoding: "utf-8",
341047
+ timeout: 5e3
341048
+ });
341049
+ return {
341050
+ name: "Ollama Server",
341051
+ status: "ok",
341052
+ message: `running on ${displayUrl}${sourceNote}`
341053
+ };
340991
341054
  } catch {
340992
- const isWSL = process.platform === "linux" && __require("os").release().toLowerCase().includes("microsoft");
340993
- const action = isWSL ? "WSL detected. Set OLLAMA_HOST=host.docker.internal:11434 or your Windows IP" : 'Run "ollama serve" to start the local server';
341055
+ const isWSL = platform14() === "linux" && release3().toLowerCase().includes("microsoft");
341056
+ const action = isWSL ? "WSL detected. Set OLLAMA_HOST=host.docker.internal:11434" : 'Run "ollama serve" to start the local server';
340994
341057
  return {
340995
341058
  name: "Ollama Server",
340996
341059
  status: "warning",
@@ -341000,114 +341063,245 @@ function checkOllamaRunning() {
341000
341063
  }
341001
341064
  }
341002
341065
  __name(checkOllamaRunning, "checkOllamaRunning");
341066
+ function checkAPIKeys() {
341067
+ const keys = {
341068
+ OLLAMA_API_KEY: !!process.env["OLLAMA_API_KEY"],
341069
+ ANTHROPIC_API_KEY: !!process.env["ANTHROPIC_API_KEY"],
341070
+ GROQ_API_KEY: !!process.env["GROQ_API_KEY"],
341071
+ OPENAI_API_KEY: !!process.env["OPENAI_API_KEY"]
341072
+ };
341073
+ const found = Object.entries(keys).filter(([_, v]) => v).map(([k]) => k.replace("_API_KEY", ""));
341074
+ if (found.length > 0) {
341075
+ return { name: "API Keys", status: "ok", message: found.join(", ") };
341076
+ }
341077
+ return {
341078
+ name: "API Keys",
341079
+ status: "warning",
341080
+ message: "none configured",
341081
+ action: "Set OLLAMA_API_KEY, ANTHROPIC_API_KEY, or GROQ_API_KEY"
341082
+ };
341083
+ }
341084
+ __name(checkAPIKeys, "checkAPIKeys");
341003
341085
  function checkGlobalSettings() {
341004
- const settingsPath = path78.join(homedir13(), OSA_DIR2, "settings.json");
341086
+ const settingsPath = path78.join(homedir13(), ".osagent", "settings.json");
341005
341087
  if (fs70.existsSync(settingsPath)) {
341006
341088
  try {
341007
341089
  const content = fs70.readFileSync(settingsPath, "utf-8");
341008
- JSON.parse(content);
341009
- return { name: "Global Settings", status: "ok", message: settingsPath };
341090
+ const settings = JSON.parse(content);
341091
+ const count = Object.keys(settings).length;
341092
+ return {
341093
+ name: "Settings",
341094
+ status: "ok",
341095
+ message: `${count} settings configured`
341096
+ };
341010
341097
  } catch {
341011
341098
  return {
341012
- name: "Global Settings",
341099
+ name: "Settings",
341013
341100
  status: "error",
341014
341101
  message: "invalid JSON",
341015
341102
  action: `Fix JSON syntax in ${settingsPath}`
341016
341103
  };
341017
341104
  }
341018
341105
  }
341106
+ return { name: "Settings", status: "ok", message: "using defaults" };
341107
+ }
341108
+ __name(checkGlobalSettings, "checkGlobalSettings");
341109
+ function checkDiskSpace() {
341110
+ try {
341111
+ if (platform14() === "darwin" || platform14() === "linux") {
341112
+ const result = execSync4("df -h ~ | tail -1", { encoding: "utf-8" });
341113
+ const parts = result.trim().split(/\s+/);
341114
+ const available = parts[3];
341115
+ const usePercent = parseInt(parts[4], 10);
341116
+ if (usePercent > 90) {
341117
+ return {
341118
+ name: "Disk Space",
341119
+ status: "warning",
341120
+ message: `${available} free (${usePercent}% used)`,
341121
+ action: "Free up disk space"
341122
+ };
341123
+ }
341124
+ return { name: "Disk Space", status: "ok", message: `${available} free` };
341125
+ }
341126
+ } catch {
341127
+ }
341128
+ return { name: "Disk Space", status: "ok", message: "unknown" };
341129
+ }
341130
+ __name(checkDiskSpace, "checkDiskSpace");
341131
+ function checkProjectMemory() {
341132
+ const cwd7 = process.cwd();
341133
+ const osagentMd = path78.join(cwd7, "OSAGENT.md");
341134
+ if (fs70.existsSync(osagentMd)) {
341135
+ try {
341136
+ const content = fs70.readFileSync(osagentMd, "utf-8");
341137
+ const lines = content.split("\n").length;
341138
+ return {
341139
+ name: "Project Memory",
341140
+ status: "ok",
341141
+ message: `OSAGENT.md (${lines} lines)`
341142
+ };
341143
+ } catch {
341144
+ return {
341145
+ name: "Project Memory",
341146
+ status: "warning",
341147
+ message: "OSAGENT.md unreadable"
341148
+ };
341149
+ }
341150
+ }
341019
341151
  return {
341020
- name: "Global Settings",
341021
- status: "warning",
341022
- message: "not found",
341023
- action: "Run osagent to create default settings"
341152
+ name: "Project Memory",
341153
+ status: "ok",
341154
+ message: "none (run /init to create)"
341024
341155
  };
341025
341156
  }
341026
- __name(checkGlobalSettings, "checkGlobalSettings");
341027
- async function checkVersion() {
341028
- const currentVersion = await getCliVersion();
341029
- return { name: "OSAgent Version", status: "ok", message: `v${currentVersion}` };
341157
+ __name(checkProjectMemory, "checkProjectMemory");
341158
+ function checkCustomAgents() {
341159
+ const agentsDir = path78.join(homedir13(), ".osagent", "agents");
341160
+ if (fs70.existsSync(agentsDir)) {
341161
+ try {
341162
+ const agents = fs70.readdirSync(agentsDir).filter(
341163
+ (f) => f.endsWith(".json") || f.endsWith(".yaml") || f.endsWith(".yml") || f.endsWith(".md")
341164
+ );
341165
+ if (agents.length > 0) {
341166
+ return {
341167
+ name: "Custom Agents",
341168
+ status: "ok",
341169
+ message: `${agents.length} agents`
341170
+ };
341171
+ }
341172
+ } catch {
341173
+ }
341174
+ }
341175
+ return { name: "Custom Agents", status: "ok", message: "none" };
341030
341176
  }
341031
- __name(checkVersion, "checkVersion");
341032
- async function checkLatestVersion() {
341177
+ __name(checkCustomAgents, "checkCustomAgents");
341178
+ function checkMCPServers() {
341179
+ const mcpPath = path78.join(homedir13(), ".osagent", "mcp.json");
341180
+ if (fs70.existsSync(mcpPath)) {
341181
+ try {
341182
+ const content = fs70.readFileSync(mcpPath, "utf-8");
341183
+ const mcp = JSON.parse(content);
341184
+ const servers = Object.keys(mcp.mcpServers || {});
341185
+ if (servers.length > 0) {
341186
+ return {
341187
+ name: "MCP Servers",
341188
+ status: "ok",
341189
+ message: `${servers.length} configured`
341190
+ };
341191
+ }
341192
+ } catch {
341193
+ return {
341194
+ name: "MCP Servers",
341195
+ status: "warning",
341196
+ message: "invalid config",
341197
+ action: "Fix ~/.osagent/mcp.json syntax"
341198
+ };
341199
+ }
341200
+ }
341201
+ return { name: "MCP Servers", status: "ok", message: "none" };
341202
+ }
341203
+ __name(checkMCPServers, "checkMCPServers");
341204
+ function checkLatestVersion() {
341033
341205
  try {
341034
- const result = execSync4("npm view osagent version 2>/dev/null", { encoding: "utf-8", timeout: 1e4 });
341206
+ const result = execSync4("npm view osagent version 2>/dev/null", {
341207
+ encoding: "utf-8",
341208
+ timeout: 1e4
341209
+ });
341035
341210
  const latestVersion2 = result.trim();
341036
- const currentVersion = await getCliVersion();
341037
- if (currentVersion === latestVersion2) {
341211
+ if (CLI_VERSION2 === latestVersion2) {
341038
341212
  return { name: "Update Status", status: "ok", message: "up to date" };
341039
341213
  }
341040
341214
  return {
341041
341215
  name: "Update Status",
341042
341216
  status: "warning",
341043
- message: `update available (${latestVersion2})`,
341044
- action: "Run: sudo npm install -g osagent@latest"
341217
+ message: `v${latestVersion2} available`,
341218
+ action: "Run: npm install -g osagent@latest"
341045
341219
  };
341046
341220
  } catch {
341047
- return { name: "Update Status", status: "warning", message: "could not check for updates" };
341221
+ return { name: "Update Status", status: "ok", message: "could not check" };
341048
341222
  }
341049
341223
  }
341050
341224
  __name(checkLatestVersion, "checkLatestVersion");
341051
- function checkEnvVars() {
341052
- const vars = ["OLLAMA_API_KEY", "OPENAI_API_KEY"];
341053
- const found = vars.filter((v) => process.env[v]);
341054
- if (found.length > 0) {
341055
- return { name: "API Keys", status: "ok", message: found.join(", ") + " set" };
341056
- }
341057
- return {
341058
- name: "API Keys",
341059
- status: "warning",
341060
- message: "no API keys in environment",
341061
- action: "Set OLLAMA_API_KEY or configure in settings"
341062
- };
341063
- }
341064
- __name(checkEnvVars, "checkEnvVars");
341065
341225
  var doctorCommand = {
341066
341226
  command: "doctor",
341067
341227
  describe: "Check system health and configuration",
341068
341228
  handler: /* @__PURE__ */ __name(async () => {
341069
- console.log("\n\u{1FA7A} OSAgent Doctor - System Diagnostics\n");
341070
- console.log("\u2501".repeat(50));
341229
+ const line = "\u2501".repeat(55);
341230
+ console.log("");
341231
+ console.log(`${C.bold} \u{1FA7A} OSAgent Doctor - System Diagnostics${C.reset}`);
341232
+ console.log(`${C.dim}${line}${C.reset}`);
341233
+ const cpuInfo = cpus();
341234
+ console.log(
341235
+ `${C.gray} Version: ${C.white}v${CLI_VERSION2}${C.reset} ${C.gray}(${GIT_COMMIT_INFO2})${C.reset}`
341236
+ );
341237
+ console.log(
341238
+ `${C.gray} System: ${C.white}${platform14()} ${process.arch}${C.reset} ${C.gray}| Node ${process.version}${C.reset}`
341239
+ );
341240
+ console.log(
341241
+ `${C.gray} Memory: ${C.white}${formatBytes(freemem())} free${C.reset} ${C.gray}/ ${formatBytes(totalmem())} total${C.reset}`
341242
+ );
341243
+ console.log(
341244
+ `${C.gray} CPU: ${C.white}${cpuInfo[0]?.model || "unknown"}${C.reset} ${C.gray}(${cpuInfo.length} cores)${C.reset}`
341245
+ );
341246
+ console.log(`${C.dim}${line}${C.reset}`);
341247
+ console.log("");
341071
341248
  const checks = [
341072
- await checkVersion(),
341073
- await checkLatestVersion(),
341074
341249
  checkNodeVersion(),
341250
+ checkGitInstalled(),
341075
341251
  checkOllamaInstalled(),
341076
341252
  checkOllamaRunning(),
341253
+ checkDiskSpace(),
341254
+ checkAPIKeys(),
341077
341255
  checkGlobalSettings(),
341078
- checkEnvVars()
341256
+ checkProjectMemory(),
341257
+ checkCustomAgents(),
341258
+ checkMCPServers(),
341259
+ checkLatestVersion()
341079
341260
  ];
341080
- let hasErrors = false;
341081
- let hasWarnings = false;
341261
+ let errorCount = 0;
341262
+ let warningCount = 0;
341082
341263
  const actions = [];
341083
341264
  for (const check2 of checks) {
341084
- const icon = check2.status === "ok" ? "\u2713" : check2.status === "warning" ? "!" : "\u2717";
341085
- const color = check2.status === "ok" ? "\x1B[32m" : check2.status === "warning" ? "\x1B[33m" : "\x1B[31m";
341086
- const reset = "\x1B[0m";
341087
- console.log(`${color}${icon}${reset} ${check2.name.padEnd(20)} ${check2.message}`);
341088
- if (check2.status === "error")
341089
- hasErrors = true;
341090
- if (check2.status === "warning")
341091
- hasWarnings = true;
341092
- if (check2.action)
341093
- actions.push(check2.action);
341094
- }
341095
- console.log("\u2501".repeat(50));
341265
+ console.log(
341266
+ ` ${icon(check2.status)} ${check2.name.padEnd(22)} ${check2.message}`
341267
+ );
341268
+ if (check2.status === "error") errorCount++;
341269
+ if (check2.status === "warning") warningCount++;
341270
+ if (check2.action) actions.push(check2.action);
341271
+ }
341272
+ console.log("");
341273
+ console.log(`${C.dim}${line}${C.reset}`);
341274
+ const total = checks.length;
341275
+ const passed = total - errorCount - warningCount;
341276
+ if (errorCount === 0 && warningCount === 0) {
341277
+ console.log(
341278
+ `
341279
+ ${C.green}\u2714 All ${passed} checks passed. OSAgent is ready.${C.reset}`
341280
+ );
341281
+ } else if (errorCount === 0) {
341282
+ console.log(
341283
+ `
341284
+ ${C.green}\u2714 ${passed} passed${C.reset}, ${C.yellow}${warningCount} warnings${C.reset}`
341285
+ );
341286
+ } else {
341287
+ console.log(
341288
+ `
341289
+ ${C.green}\u2714 ${passed} passed${C.reset}, ${C.yellow}${warningCount} warnings${C.reset}, ${C.red}${errorCount} errors${C.reset}`
341290
+ );
341291
+ }
341096
341292
  if (actions.length > 0) {
341097
- console.log("\n\u{1F4CB} Recommended Actions:\n");
341293
+ console.log(`
341294
+ ${C.bold}Recommended:${C.reset}`);
341098
341295
  actions.forEach((action, i) => {
341099
- console.log(` ${i + 1}. ${action}`);
341296
+ console.log(` ${C.gray}${i + 1}.${C.reset} ${action}`);
341100
341297
  });
341101
341298
  }
341102
- if (hasErrors) {
341103
- console.log("\n\x1B[31m\u274C Some checks failed. Please fix the errors above.\x1B[0m\n");
341104
- process.exit(1);
341105
- } else if (hasWarnings) {
341106
- console.log("\n\x1B[33m\u26A0\uFE0F Some warnings found. OSAgent should work but consider the recommendations.\x1B[0m\n");
341107
- } else {
341108
- console.log("\n\x1B[32m\u2705 All checks passed! OSAgent is ready to use.\x1B[0m\n");
341109
- }
341110
- console.log("Run \x1B[36mosagent\x1B[0m to start the interactive assistant.\n");
341299
+ console.log(
341300
+ `
341301
+ Run ${C.cyan}osagent${C.reset} to start, or ${C.cyan}/doctor${C.reset} inside for full diagnostics.
341302
+ `
341303
+ );
341304
+ if (errorCount > 0) process.exit(1);
341111
341305
  }, "handler")
341112
341306
  };
341113
341307
 
@@ -344562,11 +344756,6 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
344562
344756
  return parts.join(" ");
344563
344757
  }, "formatDuration");
344564
344758
 
344565
- // packages/cli/src/generated/git-commit.js
344566
- init_esbuild_shims();
344567
- var GIT_COMMIT_INFO2 = "7e20a8e";
344568
- var CLI_VERSION2 = "0.2.80";
344569
-
344570
344759
  // packages/cli/src/utils/systemInfo.js
344571
344760
  async function getNpmVersion() {
344572
344761
  try {
@@ -344665,7 +344854,7 @@ var aboutCommand = {
344665
344854
 
344666
344855
  // packages/cli/src/ui/commands/agentsCommand.js
344667
344856
  init_esbuild_shims();
344668
- import { existsSync as existsSync21, readdirSync as readdirSync4, readFileSync as readFileSync15 } from "fs";
344857
+ import { existsSync as existsSync21, readdirSync as readdirSync5, readFileSync as readFileSync15 } from "fs";
344669
344858
  import { join as join37 } from "path";
344670
344859
  import { homedir as homedir18 } from "os";
344671
344860
 
@@ -344816,12 +345005,12 @@ function createTree(items) {
344816
345005
  return lines;
344817
345006
  }
344818
345007
  __name(createTree, "createTree");
344819
- function sectionHeader(title, icon) {
344820
- const prefix = icon ? `${icon} ` : "";
345008
+ function sectionHeader(title, icon2) {
345009
+ const prefix = icon2 ? `${icon2} ` : "";
344821
345010
  return colorize2(`${prefix}${title}`, colors.bold, colors.white);
344822
345011
  }
344823
345012
  __name(sectionHeader, "sectionHeader");
344824
- function formatBytes(bytes) {
345013
+ function formatBytes2(bytes) {
344825
345014
  if (bytes === 0)
344826
345015
  return "0 B";
344827
345016
  const k = 1024;
@@ -344829,7 +345018,7 @@ function formatBytes(bytes) {
344829
345018
  const i = Math.floor(Math.log(bytes) / Math.log(k));
344830
345019
  return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
344831
345020
  }
344832
- __name(formatBytes, "formatBytes");
345021
+ __name(formatBytes2, "formatBytes");
344833
345022
 
344834
345023
  // packages/cli/src/ui/commands/delegateCommand.js
344835
345024
  init_esbuild_shims();
@@ -344988,7 +345177,7 @@ function loadCustomAgents() {
344988
345177
  const agents = [];
344989
345178
  if (existsSync21(agentsDir)) {
344990
345179
  try {
344991
- const files = readdirSync4(agentsDir).filter((f) => f.endsWith(".json") || f.endsWith(".yaml") || f.endsWith(".yml"));
345180
+ const files = readdirSync5(agentsDir).filter((f) => f.endsWith(".json") || f.endsWith(".yaml") || f.endsWith(".yml"));
344992
345181
  for (const file of files) {
344993
345182
  try {
344994
345183
  const content = readFileSync15(join37(agentsDir, file), "utf-8");
@@ -346434,12 +346623,18 @@ var yoloCommand = {
346434
346623
  subCommands: dangerouslyCommand.subCommands
346435
346624
  };
346436
346625
 
346437
- // packages/cli/src/ui/commands/doctorCommand.js
346626
+ // packages/cli/src/ui/commands/doctorCommand.ts
346438
346627
  init_esbuild_shims();
346439
346628
  var import_react28 = __toESM(require_react(), 1);
346440
346629
  import { execSync as execSync6 } from "child_process";
346441
- import { existsSync as existsSync22, readdirSync as readdirSync5, mkdirSync as mkdirSync9, writeFileSync as writeFileSync5, readFileSync as readFileSync16 } from "fs";
346442
- import { homedir as homedir19, platform as platform14, release as release3, cpus, totalmem, freemem } from "os";
346630
+ import {
346631
+ existsSync as existsSync22,
346632
+ readdirSync as readdirSync6,
346633
+ mkdirSync as mkdirSync9,
346634
+ writeFileSync as writeFileSync5,
346635
+ readFileSync as readFileSync16
346636
+ } from "fs";
346637
+ import { homedir as homedir19, platform as platform15, release as release4, cpus as cpus2, totalmem as totalmem2, freemem as freemem2 } from "os";
346443
346638
  import { join as join38 } from "path";
346444
346639
  var plainStatusIcon = /* @__PURE__ */ __name((status) => {
346445
346640
  switch (status) {
@@ -346458,24 +346653,26 @@ var plainStatusIcon = /* @__PURE__ */ __name((status) => {
346458
346653
  }, "plainStatusIcon");
346459
346654
  var plainDivider = /* @__PURE__ */ __name((width = 50) => "\u2500".repeat(width), "plainDivider");
346460
346655
  var plainKeyValue = /* @__PURE__ */ __name((key, value, keyWidth = 20) => `${key.padEnd(keyWidth)}${value}`, "plainKeyValue");
346461
- var plainSectionHeader = /* @__PURE__ */ __name((title, icon) => {
346462
- const prefix = icon ? `${icon} ` : "";
346656
+ var plainSectionHeader = /* @__PURE__ */ __name((title, icon2) => {
346657
+ const prefix = icon2 ? `${icon2} ` : "";
346463
346658
  return `\u2550\u2550\u2550 ${prefix}${title} \u2550\u2550\u2550`;
346464
346659
  }, "plainSectionHeader");
346465
346660
  function getSystemInfo2() {
346466
346661
  let npmVersion = "unknown";
346467
346662
  try {
346468
- npmVersion = execSync6("npm --version 2>/dev/null", { encoding: "utf-8" }).trim();
346663
+ npmVersion = execSync6("npm --version 2>/dev/null", {
346664
+ encoding: "utf-8"
346665
+ }).trim();
346469
346666
  } catch {
346470
346667
  }
346471
- const cpuInfo = cpus();
346668
+ const cpuInfo = cpus2();
346472
346669
  const cpuModel = cpuInfo.length > 0 ? cpuInfo[0].model : "unknown";
346473
346670
  return {
346474
- os: `${platform14()} ${release3()}`,
346671
+ os: `${platform15()} ${release4()}`,
346475
346672
  arch: process.arch,
346476
346673
  nodeVersion: process.version,
346477
346674
  npmVersion,
346478
- memory: `${formatBytes(freemem())} free / ${formatBytes(totalmem())} total`,
346675
+ memory: `${formatBytes2(freemem2())} free / ${formatBytes2(totalmem2())} total`,
346479
346676
  cpu: `${cpuModel} (${cpuInfo.length} cores)`
346480
346677
  };
346481
346678
  }
@@ -346521,16 +346718,26 @@ function getInstallationInfo() {
346521
346718
  searchStatus = "OK (system)";
346522
346719
  }
346523
346720
  } catch {
346524
- const rgPaths = ["/usr/local/bin/rg", "/opt/homebrew/bin/rg", "/usr/bin/rg"];
346721
+ const rgPaths = [
346722
+ "/usr/local/bin/rg",
346723
+ "/opt/homebrew/bin/rg",
346724
+ "/usr/bin/rg"
346725
+ ];
346525
346726
  if (rgPaths.some((p) => existsSync22(p))) {
346526
346727
  searchStatus = "OK (system)";
346527
346728
  }
346528
346729
  }
346529
346730
  const multipleInstalls = [];
346530
346731
  const possiblePaths = [
346531
- { path: join38(homedir19(), ".osagent", "local"), method: "npm-local" },
346732
+ {
346733
+ path: join38(homedir19(), ".osagent", "local"),
346734
+ method: "npm-local"
346735
+ },
346532
346736
  { path: "/usr/local/bin/osagent", method: "npm-global" },
346533
- { path: join38(homedir19(), ".local", "bin", "osagent"), method: "native" },
346737
+ {
346738
+ path: join38(homedir19(), ".local", "bin", "osagent"),
346739
+ method: "native"
346740
+ },
346534
346741
  { path: "/opt/homebrew/bin/osagent", method: "homebrew" }
346535
346742
  ];
346536
346743
  for (const { path: checkPath, method: checkMethod } of possiblePaths) {
@@ -346551,13 +346758,20 @@ function getInstallationInfo() {
346551
346758
  }
346552
346759
  __name(getInstallationInfo, "getInstallationInfo");
346553
346760
  function getCurrentVersion() {
346761
+ if (CLI_VERSION2 && CLI_VERSION2 !== "UNKNOWN") {
346762
+ return CLI_VERSION2;
346763
+ }
346554
346764
  try {
346555
- const pkg2 = execSync6("npm list -g osagent --json 2>/dev/null", { encoding: "utf-8" });
346765
+ const pkg2 = execSync6("npm list -g osagent --json 2>/dev/null", {
346766
+ encoding: "utf-8"
346767
+ });
346556
346768
  const parsed = JSON.parse(pkg2);
346557
346769
  return parsed.dependencies?.osagent?.version || "unknown";
346558
346770
  } catch {
346559
346771
  try {
346560
- return execSync6("npm view osagent version 2>/dev/null", { encoding: "utf-8" }).trim();
346772
+ return execSync6("npm view osagent version 2>/dev/null", {
346773
+ encoding: "utf-8"
346774
+ }).trim();
346561
346775
  } catch {
346562
346776
  return "unknown";
346563
346777
  }
@@ -346566,7 +346780,9 @@ function getCurrentVersion() {
346566
346780
  __name(getCurrentVersion, "getCurrentVersion");
346567
346781
  function getLatestVersion() {
346568
346782
  try {
346569
- const result = execSync6("npm view osagent version 2>/dev/null", { encoding: "utf-8" });
346783
+ const result = execSync6("npm view osagent version 2>/dev/null", {
346784
+ encoding: "utf-8"
346785
+ });
346570
346786
  return result.trim();
346571
346787
  } catch {
346572
346788
  return "unknown";
@@ -346575,7 +346791,9 @@ function getLatestVersion() {
346575
346791
  __name(getLatestVersion, "getLatestVersion");
346576
346792
  function fetchReleaseNotes(currentVersion, latestVersion2) {
346577
346793
  try {
346578
- const result = execSync6("npm view osagent --json 2>/dev/null", { encoding: "utf-8" });
346794
+ const result = execSync6("npm view osagent --json 2>/dev/null", {
346795
+ encoding: "utf-8"
346796
+ });
346579
346797
  const packageInfo = JSON.parse(result);
346580
346798
  const changes = [];
346581
346799
  const times = packageInfo.time || {};
@@ -346600,17 +346818,14 @@ function fetchReleaseNotes(currentVersion, latestVersion2) {
346600
346818
  }
346601
346819
  __name(fetchReleaseNotes, "fetchReleaseNotes");
346602
346820
  function compareVersions(current, latest) {
346603
- if (current === "unknown" || latest === "unknown")
346604
- return 0;
346821
+ if (current === "unknown" || latest === "unknown") return 0;
346605
346822
  const currentParts = current.split(".").map((p) => parseInt(p, 10));
346606
346823
  const latestParts = latest.split(".").map((p) => parseInt(p, 10));
346607
346824
  for (let i = 0; i < Math.max(currentParts.length, latestParts.length); i++) {
346608
346825
  const c3 = currentParts[i] || 0;
346609
346826
  const l2 = latestParts[i] || 0;
346610
- if (c3 < l2)
346611
- return -1;
346612
- if (c3 > l2)
346613
- return 1;
346827
+ if (c3 < l2) return -1;
346828
+ if (c3 > l2) return 1;
346614
346829
  }
346615
346830
  return 0;
346616
346831
  }
@@ -346638,7 +346853,10 @@ function checkNodeVersion2() {
346638
346853
  __name(checkNodeVersion2, "checkNodeVersion");
346639
346854
  function checkOllamaInstalled2() {
346640
346855
  try {
346641
- const result = execSync6("ollama --version 2>&1", { encoding: "utf-8", timeout: 5e3 });
346856
+ const result = execSync6("ollama --version 2>&1", {
346857
+ encoding: "utf-8",
346858
+ timeout: 5e3
346859
+ });
346642
346860
  const version3 = result.match(/ollama version ([\d.]+)/)?.[1] || result.trim();
346643
346861
  return { name: "Ollama CLI", status: "ok", message: `v${version3}` };
346644
346862
  } catch {
@@ -346648,9 +346866,12 @@ function checkOllamaInstalled2() {
346648
346866
  message: "not installed",
346649
346867
  fix: "Install from https://ollama.com for local models",
346650
346868
  autoFix: /* @__PURE__ */ __name(async () => {
346651
- if (platform14() === "darwin") {
346869
+ if (platform15() === "darwin") {
346652
346870
  try {
346653
- execSync6("brew install ollama", { encoding: "utf-8", stdio: "pipe" });
346871
+ execSync6("brew install ollama", {
346872
+ encoding: "utf-8",
346873
+ stdio: "pipe"
346874
+ });
346654
346875
  return true;
346655
346876
  } catch {
346656
346877
  return false;
@@ -346670,7 +346891,10 @@ function getOllamaEndpoint2() {
346670
346891
  }
346671
346892
  const ollamaBaseUrl = process.env["OLLAMA_BASE_URL"];
346672
346893
  if (ollamaBaseUrl) {
346673
- return { url: ollamaBaseUrl.replace(/\/v1\/?$/, "").replace(/\/$/, ""), source: "OLLAMA_BASE_URL" };
346894
+ return {
346895
+ url: ollamaBaseUrl.replace(/\/v1\/?$/, "").replace(/\/$/, ""),
346896
+ source: "OLLAMA_BASE_URL"
346897
+ };
346674
346898
  }
346675
346899
  return { url: "http://localhost:11434", source: "default" };
346676
346900
  }
@@ -346684,7 +346908,9 @@ function checkOllamaRunning2() {
346684
346908
  ];
346685
346909
  for (const endpoint of endpoints) {
346686
346910
  try {
346687
- execSync6(`curl -s --max-time 2 ${endpoint}/api/tags`, { encoding: "utf-8" });
346911
+ execSync6(`curl -s --max-time 2 ${endpoint}/api/tags`, {
346912
+ encoding: "utf-8"
346913
+ });
346688
346914
  const displayEndpoint = endpoint.replace("http://", "").replace(":11434", ":11434");
346689
346915
  const sourceNote = source2 !== "default" ? ` (from ${source2})` : "";
346690
346916
  return {
@@ -346696,7 +346922,7 @@ function checkOllamaRunning2() {
346696
346922
  } catch {
346697
346923
  }
346698
346924
  }
346699
- const isWSL = platform14() === "linux" && release3().toLowerCase().includes("microsoft");
346925
+ const isWSL = platform15() === "linux" && release4().toLowerCase().includes("microsoft");
346700
346926
  const fix = isWSL ? "WSL detected. Set OLLAMA_HOST=host.docker.internal:11434 or your Windows IP" : "Run: ollama serve";
346701
346927
  return {
346702
346928
  name: "Ollama Server",
@@ -346717,7 +346943,9 @@ function checkOllamaRunning2() {
346717
346943
  child.unref();
346718
346944
  await new Promise((resolve25) => setTimeout(resolve25, 2e3));
346719
346945
  try {
346720
- execSync6(`curl -s --max-time 2 ${primaryUrl}/api/tags`, { encoding: "utf-8" });
346946
+ execSync6(`curl -s --max-time 2 ${primaryUrl}/api/tags`, {
346947
+ encoding: "utf-8"
346948
+ });
346721
346949
  return true;
346722
346950
  } catch {
346723
346951
  return false;
@@ -346729,9 +346957,12 @@ function checkOllamaRunning2() {
346729
346957
  };
346730
346958
  }
346731
346959
  __name(checkOllamaRunning2, "checkOllamaRunning");
346732
- function checkGitInstalled() {
346960
+ function checkGitInstalled2() {
346733
346961
  try {
346734
- const result = execSync6("git --version 2>&1", { encoding: "utf-8", timeout: 5e3 });
346962
+ const result = execSync6("git --version 2>&1", {
346963
+ encoding: "utf-8",
346964
+ timeout: 5e3
346965
+ });
346735
346966
  const version3 = result.match(/git version ([\d.]+)/)?.[1] || "installed";
346736
346967
  return { name: "Git", status: "ok", message: `v${version3}` };
346737
346968
  } catch {
@@ -346743,10 +346974,11 @@ function checkGitInstalled() {
346743
346974
  };
346744
346975
  }
346745
346976
  }
346746
- __name(checkGitInstalled, "checkGitInstalled");
346747
- function checkAPIKeys() {
346977
+ __name(checkGitInstalled2, "checkGitInstalled");
346978
+ function checkAPIKeys2() {
346748
346979
  const keys = {
346749
346980
  OLLAMA_API_KEY: !!process.env["OLLAMA_API_KEY"],
346981
+ ANTHROPIC_API_KEY: !!process.env["ANTHROPIC_API_KEY"],
346750
346982
  GROQ_API_KEY: !!process.env["GROQ_API_KEY"],
346751
346983
  OPENAI_API_KEY: !!process.env["OPENAI_API_KEY"]
346752
346984
  };
@@ -346762,14 +346994,14 @@ function checkAPIKeys() {
346762
346994
  name: "API Keys",
346763
346995
  status: "warning",
346764
346996
  message: "none configured",
346765
- fix: "Set OLLAMA_API_KEY, GROQ_API_KEY, or OPENAI_API_KEY",
346997
+ fix: "Set OLLAMA_API_KEY, ANTHROPIC_API_KEY, GROQ_API_KEY, or OPENAI_API_KEY",
346766
346998
  details: [
346767
346999
  'export OLLAMA_API_KEY="your-key"',
346768
347000
  "Or configure in ~/.osagent/settings.json"
346769
347001
  ]
346770
347002
  };
346771
347003
  }
346772
- __name(checkAPIKeys, "checkAPIKeys");
347004
+ __name(checkAPIKeys2, "checkAPIKeys");
346773
347005
  function checkSettings() {
346774
347006
  const settingsPath = join38(homedir19(), ".osagent", "settings.json");
346775
347007
  if (existsSync22(settingsPath)) {
@@ -346821,11 +347053,13 @@ function checkSystemPrompt() {
346821
347053
  return { name: "System Prompt", status: "ok", message: "default" };
346822
347054
  }
346823
347055
  __name(checkSystemPrompt, "checkSystemPrompt");
346824
- function checkCustomAgents() {
347056
+ function checkCustomAgents2() {
346825
347057
  const agentsDir = join38(homedir19(), ".osagent", "agents");
346826
347058
  if (existsSync22(agentsDir)) {
346827
347059
  try {
346828
- const agents = readdirSync5(agentsDir).filter((f) => f.endsWith(".json") || f.endsWith(".yaml") || f.endsWith(".yml"));
347060
+ const agents = readdirSync6(agentsDir).filter(
347061
+ (f) => f.endsWith(".json") || f.endsWith(".yaml") || f.endsWith(".yml")
347062
+ );
346829
347063
  if (agents.length > 0) {
346830
347064
  return {
346831
347065
  name: "Custom Agents",
@@ -346839,12 +347073,14 @@ function checkCustomAgents() {
346839
347073
  }
346840
347074
  return { name: "Custom Agents", status: "ok", message: "none" };
346841
347075
  }
346842
- __name(checkCustomAgents, "checkCustomAgents");
347076
+ __name(checkCustomAgents2, "checkCustomAgents");
346843
347077
  function checkCustomCommands() {
346844
347078
  const commandsDir = join38(homedir19(), ".osagent", "commands");
346845
347079
  if (existsSync22(commandsDir)) {
346846
347080
  try {
346847
- const commands = readdirSync5(commandsDir).filter((f) => f.endsWith(".js") || f.endsWith(".ts") || f.endsWith(".toml"));
347081
+ const commands = readdirSync6(commandsDir).filter(
347082
+ (f) => f.endsWith(".js") || f.endsWith(".ts") || f.endsWith(".toml")
347083
+ );
346848
347084
  if (commands.length > 0) {
346849
347085
  return {
346850
347086
  name: "Custom Commands",
@@ -346859,7 +347095,7 @@ function checkCustomCommands() {
346859
347095
  return { name: "Custom Commands", status: "ok", message: "none" };
346860
347096
  }
346861
347097
  __name(checkCustomCommands, "checkCustomCommands");
346862
- function checkMCPServers() {
347098
+ function checkMCPServers2() {
346863
347099
  const mcpPath = join38(homedir19(), ".osagent", "mcp.json");
346864
347100
  if (existsSync22(mcpPath)) {
346865
347101
  try {
@@ -346885,10 +347121,10 @@ function checkMCPServers() {
346885
347121
  }
346886
347122
  return { name: "MCP Servers", status: "ok", message: "none" };
346887
347123
  }
346888
- __name(checkMCPServers, "checkMCPServers");
346889
- function checkDiskSpace() {
347124
+ __name(checkMCPServers2, "checkMCPServers");
347125
+ function checkDiskSpace2() {
346890
347126
  try {
346891
- if (platform14() === "darwin" || platform14() === "linux") {
347127
+ if (platform15() === "darwin" || platform15() === "linux") {
346892
347128
  const result = execSync6("df -h ~ | tail -1", { encoding: "utf-8" });
346893
347129
  const parts = result.trim().split(/\s+/);
346894
347130
  const available = parts[3];
@@ -346911,7 +347147,106 @@ function checkDiskSpace() {
346911
347147
  }
346912
347148
  return { name: "Disk Space", status: "ok", message: "unknown" };
346913
347149
  }
346914
- __name(checkDiskSpace, "checkDiskSpace");
347150
+ __name(checkDiskSpace2, "checkDiskSpace");
347151
+ function checkProjectMemory2() {
347152
+ const cwd7 = process.cwd();
347153
+ const osagentMd = join38(cwd7, "OSAGENT.md");
347154
+ const claudeMd = join38(cwd7, "CLAUDE.md");
347155
+ if (existsSync22(osagentMd)) {
347156
+ try {
347157
+ const content = readFileSync16(osagentMd, "utf-8");
347158
+ const lines = content.split("\n").length;
347159
+ return {
347160
+ name: "Project Memory",
347161
+ status: "ok",
347162
+ message: `OSAGENT.md (${lines} lines)`
347163
+ };
347164
+ } catch {
347165
+ return {
347166
+ name: "Project Memory",
347167
+ status: "warning",
347168
+ message: "OSAGENT.md unreadable"
347169
+ };
347170
+ }
347171
+ }
347172
+ if (existsSync22(claudeMd)) {
347173
+ try {
347174
+ const content = readFileSync16(claudeMd, "utf-8");
347175
+ const lines = content.split("\n").length;
347176
+ return {
347177
+ name: "Project Memory",
347178
+ status: "ok",
347179
+ message: `CLAUDE.md (${lines} lines)`
347180
+ };
347181
+ } catch {
347182
+ return {
347183
+ name: "Project Memory",
347184
+ status: "warning",
347185
+ message: "CLAUDE.md unreadable"
347186
+ };
347187
+ }
347188
+ }
347189
+ return {
347190
+ name: "Project Memory",
347191
+ status: "ok",
347192
+ message: "none (run /init to create)"
347193
+ };
347194
+ }
347195
+ __name(checkProjectMemory2, "checkProjectMemory");
347196
+ function checkEpisodicMemory() {
347197
+ const episodesDir = join38(homedir19(), ".osagent", "episodes");
347198
+ if (existsSync22(episodesDir)) {
347199
+ try {
347200
+ const episodes = readdirSync6(episodesDir).filter(
347201
+ (f) => f.endsWith(".json") || f.endsWith(".md")
347202
+ );
347203
+ if (episodes.length > 0) {
347204
+ return {
347205
+ name: "Episodic Memory",
347206
+ status: "ok",
347207
+ message: `${episodes.length} episodes`
347208
+ };
347209
+ }
347210
+ } catch {
347211
+ }
347212
+ }
347213
+ const memoryDir = join38(homedir19(), ".osagent", "memory");
347214
+ if (existsSync22(memoryDir)) {
347215
+ try {
347216
+ const files = readdirSync6(memoryDir).filter(
347217
+ (f) => f.endsWith(".json") || f.endsWith(".md")
347218
+ );
347219
+ if (files.length > 0) {
347220
+ return {
347221
+ name: "Episodic Memory",
347222
+ status: "ok",
347223
+ message: `${files.length} memory files`
347224
+ };
347225
+ }
347226
+ } catch {
347227
+ }
347228
+ }
347229
+ return { name: "Episodic Memory", status: "ok", message: "none" };
347230
+ }
347231
+ __name(checkEpisodicMemory, "checkEpisodicMemory");
347232
+ function checkBuildVersion() {
347233
+ const gitCommit = GIT_COMMIT_INFO2 || "unknown";
347234
+ const version3 = CLI_VERSION2 || "unknown";
347235
+ if (version3 === "unknown" || version3 === "UNKNOWN") {
347236
+ return {
347237
+ name: "Build Info",
347238
+ status: "warning",
347239
+ message: "version not embedded",
347240
+ fix: "Run: npm run generate && npm run build"
347241
+ };
347242
+ }
347243
+ return {
347244
+ name: "Build Info",
347245
+ status: "ok",
347246
+ message: `v${version3} (${gitCommit})`
347247
+ };
347248
+ }
347249
+ __name(checkBuildVersion, "checkBuildVersion");
346915
347250
  function formatReport(checks, systemInfo, currentVersion, latestVersion2, autoFix = false) {
346916
347251
  const lines = [];
346917
347252
  const width = 60;
@@ -346919,14 +347254,22 @@ function formatReport(checks, systemInfo, currentVersion, latestVersion2, autoFi
346919
347254
  lines.push("");
346920
347255
  const headerBox = createBox("osagent doctor", width);
346921
347256
  lines.push(headerBox.top);
346922
- lines.push(headerBox.line(centerPad(`${icons.doctor} System Health Report`, width - 4)));
347257
+ lines.push(
347258
+ headerBox.line(
347259
+ centerPad(`${icons.doctor} System Health Report`, width - 4)
347260
+ )
347261
+ );
346923
347262
  lines.push(headerBox.bottom);
346924
347263
  lines.push("");
346925
347264
  lines.push(plainSectionHeader("Diagnostics", icons.terminal));
346926
347265
  lines.push(plainDivider(width));
346927
- lines.push(`\u2514 Currently running: ${installInfo.method} (${installInfo.version})`);
347266
+ lines.push(
347267
+ `\u2514 Currently running: ${installInfo.method} (${installInfo.version})`
347268
+ );
346928
347269
  lines.push(`\u2514 Path: ${installInfo.path}`);
346929
- lines.push(`\u2514 Auto-updates: ${installInfo.autoUpdates ? "enabled" : "disabled"}`);
347270
+ lines.push(
347271
+ `\u2514 Auto-updates: ${installInfo.autoUpdates ? "enabled" : "disabled"}`
347272
+ );
346930
347273
  lines.push(`\u2514 Search: ${installInfo.searchStatus}`);
346931
347274
  if (installInfo.multipleInstalls && installInfo.multipleInstalls.length > 0) {
346932
347275
  lines.push("");
@@ -346941,7 +347284,9 @@ function formatReport(checks, systemInfo, currentVersion, latestVersion2, autoFi
346941
347284
  lines.push(plainDivider(width));
346942
347285
  lines.push(plainKeyValue("Installed", currentVersion));
346943
347286
  if (updateAvailable) {
346944
- lines.push(plainKeyValue("Available", `${latestVersion2} (update available)`));
347287
+ lines.push(
347288
+ plainKeyValue("Available", `${latestVersion2} (update available)`)
347289
+ );
346945
347290
  } else {
346946
347291
  lines.push(plainKeyValue("Status", "up to date"));
346947
347292
  }
@@ -346960,17 +347305,15 @@ function formatReport(checks, systemInfo, currentVersion, latestVersion2, autoFi
346960
347305
  let warningCount = 0;
346961
347306
  const fixes = [];
346962
347307
  for (const check2 of checks) {
346963
- const icon = plainStatusIcon(check2.status);
346964
- lines.push(`${icon} ${check2.name.padEnd(20)} ${check2.message}`);
347308
+ const icon2 = plainStatusIcon(check2.status);
347309
+ lines.push(`${icon2} ${check2.name.padEnd(20)} ${check2.message}`);
346965
347310
  if (check2.details && check2.details.length > 0) {
346966
347311
  for (const detail of check2.details) {
346967
347312
  lines.push(` ${box.pipe} ${detail}`);
346968
347313
  }
346969
347314
  }
346970
- if (check2.status === "error")
346971
- errorCount++;
346972
- if (check2.status === "warning")
346973
- warningCount++;
347315
+ if (check2.status === "error") errorCount++;
347316
+ if (check2.status === "warning") warningCount++;
346974
347317
  if (check2.fix) {
346975
347318
  fixes.push(`${check2.name}: ${check2.fix}`);
346976
347319
  }
@@ -346988,7 +347331,9 @@ function formatReport(checks, systemInfo, currentVersion, latestVersion2, autoFi
346988
347331
  lines.push(`${passed} passed, ${warningCount} warnings`);
346989
347332
  lines.push(" \u26A0 System functional with warnings");
346990
347333
  } else {
346991
- lines.push(`${passed} passed, ${warningCount} warnings, ${errorCount} errors`);
347334
+ lines.push(
347335
+ `${passed} passed, ${warningCount} warnings, ${errorCount} errors`
347336
+ );
346992
347337
  lines.push(" \u2716 Issues detected - see recommended actions below");
346993
347338
  }
346994
347339
  lines.push("");
@@ -347070,7 +347415,10 @@ var doctorCommand2 = {
347070
347415
  lines.push("");
347071
347416
  }
347072
347417
  lines.push(`${icons.pending} Installing latest version...`);
347073
- execSync6("npm install -g osagent@latest 2>&1", { encoding: "utf-8", stdio: "pipe" });
347418
+ execSync6("npm install -g osagent@latest 2>&1", {
347419
+ encoding: "utf-8",
347420
+ stdio: "pipe"
347421
+ });
347074
347422
  const newVersion = getLatestVersion();
347075
347423
  lines.push("");
347076
347424
  lines.push(`${icons.success} Updated successfully!`);
@@ -347117,9 +347465,12 @@ var doctorCommand2 = {
347117
347465
  checkNodeVersion2(),
347118
347466
  checkOllamaInstalled2(),
347119
347467
  checkOllamaRunning2(),
347120
- checkGitInstalled(),
347468
+ checkGitInstalled2(),
347121
347469
  checkSettings(),
347122
- checkAPIKeys()
347470
+ checkAPIKeys2(),
347471
+ checkProjectMemory2(),
347472
+ checkEpisodicMemory(),
347473
+ checkBuildVersion()
347123
347474
  ];
347124
347475
  let fixed = 0;
347125
347476
  let failed = 0;
@@ -347132,18 +347483,24 @@ var doctorCommand2 = {
347132
347483
  lines.push(` ${plainStatusIcon("ok")} ${check2.name} fixed`);
347133
347484
  fixed++;
347134
347485
  } else {
347135
- lines.push(` ${plainStatusIcon("warning")} ${check2.name} - manual fix needed`);
347486
+ lines.push(
347487
+ ` ${plainStatusIcon("warning")} ${check2.name} - manual fix needed`
347488
+ );
347136
347489
  if (check2.fix) {
347137
347490
  lines.push(` ${icons.arrow} ${check2.fix}`);
347138
347491
  }
347139
347492
  failed++;
347140
347493
  }
347141
347494
  } catch {
347142
- lines.push(` ${plainStatusIcon("error")} ${check2.name} - fix failed`);
347495
+ lines.push(
347496
+ ` ${plainStatusIcon("error")} ${check2.name} - fix failed`
347497
+ );
347143
347498
  failed++;
347144
347499
  }
347145
347500
  } else if (check2.status !== "ok" && check2.fix) {
347146
- lines.push(`${plainStatusIcon("warning")} ${check2.name} - manual fix needed`);
347501
+ lines.push(
347502
+ `${plainStatusIcon("warning")} ${check2.name} - manual fix needed`
347503
+ );
347147
347504
  lines.push(` ${icons.arrow} ${check2.fix}`);
347148
347505
  }
347149
347506
  }
@@ -347225,15 +347582,20 @@ var doctorCommand2 = {
347225
347582
  lines.push(`${icons.success} Initialization complete!`);
347226
347583
  lines.push("");
347227
347584
  lines.push(plainSectionHeader("Directory Structure", icons.folder));
347228
- lines.push(createTree([
347229
- { label: "~/.osagent/", children: [
347230
- { label: "agents/ - Custom AI agents" },
347231
- { label: "commands/ - Custom slash commands" },
347232
- { label: "prompts/ - Custom prompts" },
347233
- { label: "skills/ - Custom skills/workflows" },
347234
- { label: "memory/ - Memory storage" }
347235
- ] }
347236
- ]).join("\n"));
347585
+ lines.push(
347586
+ createTree([
347587
+ {
347588
+ label: "~/.osagent/",
347589
+ children: [
347590
+ { label: "agents/ - Custom AI agents" },
347591
+ { label: "commands/ - Custom slash commands" },
347592
+ { label: "prompts/ - Custom prompts" },
347593
+ { label: "skills/ - Custom skills/workflows" },
347594
+ { label: "memory/ - Memory storage" }
347595
+ ]
347596
+ }
347597
+ ]).join("\n")
347598
+ );
347237
347599
  return {
347238
347600
  type: "message",
347239
347601
  messageType: "info",
@@ -347274,7 +347636,9 @@ var doctorCommand2 = {
347274
347636
  }
347275
347637
  promptLines.push(plainDivider(50));
347276
347638
  promptLines.push("");
347277
- promptLines.push(" Update now? This will run: npm install -g osagent@latest");
347639
+ promptLines.push(
347640
+ " Update now? This will run: npm install -g osagent@latest"
347641
+ );
347278
347642
  promptLines.push("");
347279
347643
  return {
347280
347644
  type: "confirm_action",
@@ -347293,7 +347657,10 @@ var doctorCommand2 = {
347293
347657
  lines.push(`${icons.pending} Checking current version...`);
347294
347658
  const oldVersion = currentVersion;
347295
347659
  lines.push(`${icons.pending} Installing latest version...`);
347296
- execSync6("npm install -g osagent@latest 2>&1", { encoding: "utf-8", stdio: "pipe" });
347660
+ execSync6("npm install -g osagent@latest 2>&1", {
347661
+ encoding: "utf-8",
347662
+ stdio: "pipe"
347663
+ });
347297
347664
  const newVersion = getLatestVersion();
347298
347665
  lines.push("");
347299
347666
  lines.push(`${icons.success} Updated successfully!`);
@@ -347309,14 +347676,17 @@ var doctorCommand2 = {
347309
347676
  checkNodeVersion2(),
347310
347677
  checkOllamaInstalled2(),
347311
347678
  checkOllamaRunning2(),
347312
- checkGitInstalled(),
347313
- checkDiskSpace(),
347314
- checkAPIKeys(),
347679
+ checkGitInstalled2(),
347680
+ checkDiskSpace2(),
347681
+ checkAPIKeys2(),
347315
347682
  checkSettings(),
347316
347683
  checkSystemPrompt(),
347317
- checkCustomAgents(),
347684
+ checkCustomAgents2(),
347318
347685
  checkCustomCommands(),
347319
- checkMCPServers()
347686
+ checkMCPServers2(),
347687
+ checkProjectMemory2(),
347688
+ checkEpisodicMemory(),
347689
+ checkBuildVersion()
347320
347690
  ];
347321
347691
  const systemInfo2 = getSystemInfo2();
347322
347692
  const report2 = formatReport(checks2, systemInfo2, newVersion, newVersion);
@@ -347341,17 +347711,25 @@ var doctorCommand2 = {
347341
347711
  checkNodeVersion2(),
347342
347712
  checkOllamaInstalled2(),
347343
347713
  checkOllamaRunning2(),
347344
- checkGitInstalled(),
347345
- checkDiskSpace(),
347346
- checkAPIKeys(),
347714
+ checkGitInstalled2(),
347715
+ checkDiskSpace2(),
347716
+ checkAPIKeys2(),
347347
347717
  checkSettings(),
347348
347718
  checkSystemPrompt(),
347349
- checkCustomAgents(),
347719
+ checkCustomAgents2(),
347350
347720
  checkCustomCommands(),
347351
- checkMCPServers()
347721
+ checkMCPServers2(),
347722
+ checkProjectMemory2(),
347723
+ checkEpisodicMemory(),
347724
+ checkBuildVersion()
347352
347725
  ];
347353
347726
  const systemInfo2 = getSystemInfo2();
347354
- const report2 = formatReport(checks2, systemInfo2, currentVersion, latestVersion2);
347727
+ const report2 = formatReport(
347728
+ checks2,
347729
+ systemInfo2,
347730
+ currentVersion,
347731
+ latestVersion2
347732
+ );
347355
347733
  lines.push(...report2);
347356
347734
  return {
347357
347735
  type: "message",
@@ -347364,17 +347742,25 @@ var doctorCommand2 = {
347364
347742
  checkNodeVersion2(),
347365
347743
  checkOllamaInstalled2(),
347366
347744
  checkOllamaRunning2(),
347367
- checkGitInstalled(),
347368
- checkDiskSpace(),
347369
- checkAPIKeys(),
347745
+ checkGitInstalled2(),
347746
+ checkDiskSpace2(),
347747
+ checkAPIKeys2(),
347370
347748
  checkSettings(),
347371
347749
  checkSystemPrompt(),
347372
- checkCustomAgents(),
347750
+ checkCustomAgents2(),
347373
347751
  checkCustomCommands(),
347374
- checkMCPServers()
347752
+ checkMCPServers2(),
347753
+ checkProjectMemory2(),
347754
+ checkEpisodicMemory(),
347755
+ checkBuildVersion()
347375
347756
  ];
347376
347757
  const systemInfo = getSystemInfo2();
347377
- const report = formatReport(checks, systemInfo, currentVersion, latestVersion2);
347758
+ const report = formatReport(
347759
+ checks,
347760
+ systemInfo,
347761
+ currentVersion,
347762
+ latestVersion2
347763
+ );
347378
347764
  return {
347379
347765
  type: "message",
347380
347766
  messageType: "info",
@@ -351275,10 +351661,10 @@ async function backupFile(filePath) {
351275
351661
  }
351276
351662
  __name(backupFile, "backupFile");
351277
351663
  function getVSCodeStyleConfigDir(appName) {
351278
- const platform16 = os32.platform();
351279
- if (platform16 === "darwin") {
351664
+ const platform17 = os32.platform();
351665
+ if (platform17 === "darwin") {
351280
351666
  return path94.join(os32.homedir(), "Library", "Application Support", appName, "User");
351281
- } else if (platform16 === "win32") {
351667
+ } else if (platform17 === "win32") {
351282
351668
  if (!process.env["APPDATA"]) {
351283
351669
  return null;
351284
351670
  }
@@ -351549,7 +351935,7 @@ init_esbuild_shims();
351549
351935
  import * as fs83 from "node:fs";
351550
351936
  import * as path95 from "node:path";
351551
351937
  import { homedir as homedir23 } from "node:os";
351552
- var OSA_DIR3 = ".OSA";
351938
+ var OSA_DIR2 = ".OSA";
351553
351939
  var viewCommand = {
351554
351940
  name: "view",
351555
351941
  altNames: ["architecture", "arch", "system"],
@@ -351618,9 +352004,9 @@ var viewCommand = {
351618
352004
  kind: CommandKind.BUILT_IN,
351619
352005
  action: /* @__PURE__ */ __name((context2) => {
351620
352006
  const homeDir = homedir23();
351621
- const globalSettingsPath = path95.join(homeDir, OSA_DIR3, "settings.json");
352007
+ const globalSettingsPath = path95.join(homeDir, OSA_DIR2, "settings.json");
351622
352008
  const projectRoot = context2.services.config?.getProjectRoot() || process.cwd();
351623
- const localSettingsPath = path95.join(projectRoot, OSA_DIR3, "settings.json");
352009
+ const localSettingsPath = path95.join(projectRoot, OSA_DIR2, "settings.json");
351624
352010
  const osagentMdPath = path95.join(projectRoot, "OSAGENT.md");
351625
352011
  const files = [
351626
352012
  { path: globalSettingsPath, name: "Global Settings", exists: fs83.existsSync(globalSettingsPath) },
@@ -376051,11 +376437,11 @@ var ToolStatusIndicator = /* @__PURE__ */ __name(({ status, name: name3 }) => {
376051
376437
  return { icon: TREE_STATUS.PENDING, color: theme.text.secondary };
376052
376438
  }
376053
376439
  }, "getStatusDisplay");
376054
- const { icon, color } = getStatusDisplay();
376440
+ const { icon: icon2, color } = getStatusDisplay();
376055
376441
  if (status === ToolCallStatus.Executing) {
376056
- return (0, import_jsx_runtime40.jsx)(Box_default, { minWidth: STATUS_INDICATOR_WIDTH, children: (0, import_jsx_runtime40.jsx)(OSARespondingSpinner, { spinnerType: "toggle", nonRespondingDisplay: icon }) });
376442
+ return (0, import_jsx_runtime40.jsx)(Box_default, { minWidth: STATUS_INDICATOR_WIDTH, children: (0, import_jsx_runtime40.jsx)(OSARespondingSpinner, { spinnerType: "toggle", nonRespondingDisplay: icon2 }) });
376057
376443
  }
376058
- return (0, import_jsx_runtime40.jsx)(Box_default, { minWidth: STATUS_INDICATOR_WIDTH, children: (0, import_jsx_runtime40.jsx)(Text3, { color, children: icon }) });
376444
+ return (0, import_jsx_runtime40.jsx)(Box_default, { minWidth: STATUS_INDICATOR_WIDTH, children: (0, import_jsx_runtime40.jsx)(Text3, { color, children: icon2 }) });
376059
376445
  }, "ToolStatusIndicator");
376060
376446
  var ToolInfo = /* @__PURE__ */ __name(({ name: name3, description, status, emphasis }) => {
376061
376447
  const nameColor = import_react70.default.useMemo(() => {
@@ -379343,25 +379729,25 @@ var DetailedMessagesDisplay = /* @__PURE__ */ __name(({ messages, maxHeight, wid
379343
379729
  const borderAndPadding = 4;
379344
379730
  return (0, import_jsx_runtime95.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, borderStyle: "round", borderColor: theme.border.default, paddingX: 1, width, children: [(0, import_jsx_runtime95.jsx)(Box_default, { marginBottom: 1, children: (0, import_jsx_runtime95.jsxs)(Text3, { bold: true, color: theme.text.primary, children: ["Debug Console", " ", (0, import_jsx_runtime95.jsx)(Text3, { color: theme.text.secondary, children: "(ctrl+o to close)" })] }) }), (0, import_jsx_runtime95.jsx)(MaxSizedBox, { maxHeight, maxWidth: width - borderAndPadding, children: messages.map((msg, index) => {
379345
379731
  let textColor = theme.text.primary;
379346
- let icon = "\u2139";
379732
+ let icon2 = "\u2139";
379347
379733
  switch (msg.type) {
379348
379734
  case "warn":
379349
379735
  textColor = theme.status.warning;
379350
- icon = "\u26A0";
379736
+ icon2 = "\u26A0";
379351
379737
  break;
379352
379738
  case "error":
379353
379739
  textColor = theme.status.error;
379354
- icon = "\u2716";
379740
+ icon2 = "\u2716";
379355
379741
  break;
379356
379742
  case "debug":
379357
379743
  textColor = theme.text.secondary;
379358
- icon = "\u{1F50D}";
379744
+ icon2 = "\u{1F50D}";
379359
379745
  break;
379360
379746
  case "log":
379361
379747
  default:
379362
379748
  break;
379363
379749
  }
379364
- return (0, import_jsx_runtime95.jsxs)(Box_default, { flexDirection: "row", children: [(0, import_jsx_runtime95.jsxs)(Text3, { color: textColor, children: [icon, " "] }), (0, import_jsx_runtime95.jsxs)(Text3, { color: textColor, wrap: "wrap", children: [msg.content, msg.count && msg.count > 1 && (0, import_jsx_runtime95.jsxs)(Text3, { color: theme.text.secondary, children: [" (x", msg.count, ")"] })] })] }, index);
379750
+ return (0, import_jsx_runtime95.jsxs)(Box_default, { flexDirection: "row", children: [(0, import_jsx_runtime95.jsxs)(Text3, { color: textColor, children: [icon2, " "] }), (0, import_jsx_runtime95.jsxs)(Text3, { color: textColor, wrap: "wrap", children: [msg.content, msg.count && msg.count > 1 && (0, import_jsx_runtime95.jsxs)(Text3, { color: theme.text.secondary, children: [" (x", msg.count, ")"] })] })] }, index);
379365
379751
  }) })] });
379366
379752
  }, "DetailedMessagesDisplay");
379367
379753