@kenkaiiii/ggcoder 5.39.3 → 5.39.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.
Files changed (46) hide show
  1. package/dist/app-sidecar.js +8 -1
  2. package/dist/app-sidecar.js.map +1 -1
  3. package/dist/cli/auth.d.ts.map +1 -1
  4. package/dist/cli/auth.js +5 -2
  5. package/dist/cli/auth.js.map +1 -1
  6. package/dist/core/agent-session.d.ts.map +1 -1
  7. package/dist/core/agent-session.js +28 -0
  8. package/dist/core/agent-session.js.map +1 -1
  9. package/dist/core/mcp/client.d.ts.map +1 -1
  10. package/dist/core/mcp/client.js +2 -10
  11. package/dist/core/mcp/client.js.map +1 -1
  12. package/dist/core/mcp/content.d.ts +19 -0
  13. package/dist/core/mcp/content.d.ts.map +1 -0
  14. package/dist/core/mcp/content.js +172 -0
  15. package/dist/core/mcp/content.js.map +1 -0
  16. package/dist/core/mcp/content.test.d.ts +2 -0
  17. package/dist/core/mcp/content.test.d.ts.map +1 -0
  18. package/dist/core/mcp/content.test.js +135 -0
  19. package/dist/core/mcp/content.test.js.map +1 -0
  20. package/dist/ui/App.js.map +1 -1
  21. package/dist/ui/components/Banner.d.ts.map +1 -1
  22. package/dist/ui/components/Banner.js +25 -16
  23. package/dist/ui/components/Banner.js.map +1 -1
  24. package/dist/ui/components/ToolExecution.js +42 -34
  25. package/dist/ui/components/ToolExecution.js.map +1 -1
  26. package/dist/ui/components/force-color.d.ts +2 -0
  27. package/dist/ui/components/force-color.d.ts.map +1 -0
  28. package/dist/ui/components/force-color.js +11 -0
  29. package/dist/ui/components/force-color.js.map +1 -0
  30. package/dist/ui/components/themed-output.test.d.ts +2 -0
  31. package/dist/ui/components/themed-output.test.d.ts.map +1 -0
  32. package/dist/ui/components/themed-output.test.js +111 -0
  33. package/dist/ui/components/themed-output.test.js.map +1 -0
  34. package/dist/ui/hooks/useAgentLoop.d.ts +3 -0
  35. package/dist/ui/hooks/useAgentLoop.d.ts.map +1 -1
  36. package/dist/ui/hooks/useAgentLoop.js +26 -1
  37. package/dist/ui/hooks/useAgentLoop.js.map +1 -1
  38. package/dist/ui/theme/dark-ansi.json +6 -0
  39. package/dist/ui/theme/dark-daltonized.json +6 -0
  40. package/dist/ui/theme/dark.json +6 -0
  41. package/dist/ui/theme/light-ansi.json +6 -0
  42. package/dist/ui/theme/light-daltonized.json +6 -0
  43. package/dist/ui/theme/light.json +6 -0
  44. package/dist/ui/theme/theme.d.ts +6 -0
  45. package/dist/ui/theme/theme.d.ts.map +1 -1
  46. package/package.json +4 -4
@@ -672,7 +672,14 @@ async function main() {
672
672
  // A provider can revoke an access token before its stored expiry. Refresh
673
673
  // once on 401, matching inference auth recovery, then retry the usage call.
674
674
  if (error instanceof SubscriptionUsageError && error.status === 401) {
675
- credentials = await auth.resolveCredentials(authKey, { forceRefresh: true });
675
+ // Name the rejected token. This poller runs on a timer alongside live
676
+ // agent runs, so an unconditional refresh here would invalidate the
677
+ // token those runs are holding and fail them mid-turn — a background
678
+ // status check must never be able to log out the foreground.
679
+ credentials = await auth.resolveCredentials(authKey, {
680
+ forceRefresh: true,
681
+ rejectedToken: credentials.accessToken,
682
+ });
676
683
  const snapshot = {
677
684
  ...(await fetchSubscriptionUsage(provider, credentials)),
678
685
  connected: true,