You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Client: in-memory JWT auto-renew after manual beam-in; 401 retry with refresh, clear token on refresh fail
- Client: SetRefreshToken/GetCurrentRefreshToken + native exports for games to persist refresh_token
- Client: throttle 'no cached quest' log spam; inventory logging for diagnostics
- ODOOM: persist refresh_token in oasisstar.json; pass to client on restore; always call star_api_refresh_quest_cache_in_background (remove ODOOM_STAR_API_HAS_REFRESH_QUEST_BACKGROUND guards) so tracker and quest list load
- No flow/callback changes to games; master remains stable
Made-with: Cursor
Copy file name to clipboardExpand all lines: OASIS Omniverse/STARAPIClient/StarApiClient.cs
+46-8Lines changed: 46 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -472,8 +472,6 @@ public async Task<OASISResult<bool>> RestoreSessionAsync(CancellationToken cance
472
472
/* Invoke the same "profile loaded" operation callback that refresh_avatar_profile uses, so the game runs beamed-in logic: tracker, XP, quest cache, etc. */
/// <summary>Whether STAR debug logging is on (games set via star_api_set_debug). When true, quest API and other requests log URI and response to file and console.</summary>
5254
5276
internalstaticboolGetStarDebug()=>_starDebug!=0;
@@ -5488,18 +5510,24 @@ public static int StarApiGetInventory(star_item_list_t** itemList)
5488
5510
5489
5511
varclient=GetClient();
5490
5512
if(clientisnull)
5513
+
{
5514
+
try{StarApiExports.StarApiLogFileOnly("[Inventory] star_api_get_inventory: no client");}catch{}
5491
5515
return(int)SetErrorAndReturn("Client is not initialized.",StarApiResultCode.NotInitialized,StarApiOpGetInventory);
return(int)SetErrorAndReturn("Memory allocation failed for item list.",StarApiResultCode.InitFailed,StarApiOpGetInventory);
@@ -6043,8 +6071,13 @@ public static int StarApiGetActiveQuestId(sbyte* buf, nuint bufSize)
6043
6071
varid=client.GetCachedActiveQuestId();
6044
6072
if(!id.HasValue||id.Value==Guid.Empty)
6045
6073
{
6046
-
try{StarApiExports.StarApiLogFileOnly("[Quest] star_api_get_active_quest_id: no cached value");}catch{}
6047
-
if(StarApiExports.GetStarDebug())try{StarApiExports.StarApiLog("[Quest] get_active_quest_id: no cached quest (API may not return AvatarDetail.ActiveQuestId)");}catch{}
try{StarApiExports.StarApiLogFileOnly("[Quest] star_api_get_active_quest_id: no cached value (throttled)");}catch{}
6079
+
if(StarApiExports.GetStarDebug())try{StarApiExports.StarApiLog("[Quest] get_active_quest_id: no cached quest (API may not return AvatarDetail.ActiveQuestId)");}catch{}
@@ -6066,8 +6099,13 @@ public static int StarApiGetActiveObjectiveId(sbyte* buf, nuint bufSize)
6066
6099
varid=client.GetCachedActiveObjectiveId();
6067
6100
if(!id.HasValue||id.Value==Guid.Empty)
6068
6101
{
6069
-
try{StarApiExports.StarApiLogFileOnly("[Quest] star_api_get_active_objective_id: no cached value");}catch{}
6070
-
if(StarApiExports.GetStarDebug())try{StarApiExports.StarApiLog("[Quest] get_active_objective_id: no cached objective (API may not return AvatarDetail.ActiveObjectiveId)");}catch{}
try{StarApiExports.StarApiLogFileOnly("[Quest] star_api_get_active_objective_id: no cached value (throttled)");}catch{}
6107
+
if(StarApiExports.GetStarDebug())try{StarApiExports.StarApiLog("[Quest] get_active_objective_id: no cached objective (API may not return AvatarDetail.ActiveObjectiveId)");}catch{}
0 commit comments