@remnic/core 9.35.3 → 9.35.4

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.
@@ -826,13 +826,13 @@ var EngramAccessHttpServer = class {
826
826
  return;
827
827
  }
828
828
  if (req.method === "GET" && pathname === "/engram/v1/health") {
829
- const readiness = this.readiness();
830
- if (!readiness.ready) {
829
+ const { ready, warmupAttempts, lastError } = this.readiness();
830
+ if (!ready) {
831
831
  this.respondJson(res, 503, {
832
832
  ok: false,
833
833
  ready: false,
834
- warmupAttempts: readiness.warmupAttempts,
835
- lastError: readiness.lastError ?? null,
834
+ warmupAttempts,
835
+ lastError: lastError ?? null,
836
836
  code: "not_ready"
837
837
  });
838
838
  return;
@@ -875,7 +875,14 @@ var EngramAccessHttpServer = class {
875
875
  return;
876
876
  }
877
877
  if (req.method === "GET" && pathname === "/engram/v1/health") {
878
- this.respondJson(res, 200, await this.service.health());
878
+ const { degraded, warmupAttempts, lastError } = this.readiness();
879
+ const health = await this.service.health();
880
+ this.respondJson(res, 200, degraded !== true ? health : {
881
+ ...health,
882
+ degraded: true,
883
+ warmupAttempts,
884
+ lastError: lastError ?? null
885
+ });
879
886
  return;
880
887
  }
881
888
  if (req.method === "GET" && pathname === "/engram/v1/capabilities") return respondLcmCompactionCapabilitiesHttp(res);
@@ -3218,4 +3225,4 @@ export {
3218
3225
  MeetingsInputError,
3219
3226
  EngramAccessHttpServer
3220
3227
  };
3221
- //# sourceMappingURL=chunk-WL2S2UBB.js.map
3228
+ //# sourceMappingURL=chunk-IE2CS5BM.js.map