zevairouter 1.1.13 → 1.1.15

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 (351) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +6 -6
  4. package/cli/app/.next-cli-build/build-manifest.json +2 -2
  5. package/cli/app/.next-cli-build/prerender-manifest.json +3 -3
  6. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  7. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  33. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  34. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  35. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  36. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  37. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  38. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  39. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  40. package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  41. package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  42. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  43. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  44. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  45. package/cli/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  46. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  47. package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  48. package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  49. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  50. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  51. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  52. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  53. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  54. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  55. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  56. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  57. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  58. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  59. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  60. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  61. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  62. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  63. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
  64. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  65. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  66. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  67. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  68. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  69. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  70. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  71. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  72. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js +1 -1
  73. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  74. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +3 -3
  75. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  76. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  77. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  78. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  79. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  80. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  81. package/cli/app/.next-cli-build/server/app/callback.rsc +3 -3
  82. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  83. package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  84. package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  85. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  86. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  87. package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  88. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  89. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +5 -5
  90. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
  91. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
  92. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  93. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  94. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +5 -5
  95. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
  96. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +3 -3
  97. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
  98. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  99. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  100. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  101. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  102. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  103. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  104. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  105. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  106. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  107. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  108. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  109. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  110. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  111. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  112. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  113. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  114. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  115. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  116. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  117. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  118. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  119. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  120. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  121. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  122. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  123. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  124. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  125. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  126. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  127. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  128. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  129. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +5 -5
  130. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
  131. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
  132. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  133. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  134. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +5 -5
  135. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
  136. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +3 -3
  137. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
  138. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  139. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  140. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  141. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  142. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  143. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  144. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  145. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  146. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  147. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  148. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  149. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  150. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  151. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  152. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  153. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  154. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  155. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  156. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  157. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  158. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  159. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  160. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  161. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  162. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  163. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  164. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  165. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  166. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  167. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  168. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  169. package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  170. package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +5 -5
  171. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
  172. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
  173. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  174. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  175. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +5 -5
  176. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
  177. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +3 -3
  178. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
  179. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  180. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  181. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  182. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  183. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  184. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  185. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  186. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  187. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  188. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  189. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  190. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  191. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  192. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  193. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  194. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  195. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  196. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  197. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  198. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  199. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  200. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  201. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  202. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  203. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  204. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  205. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  206. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  207. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  208. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  209. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  210. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  211. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  212. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  213. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  214. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  215. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  216. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  217. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  218. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  219. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  220. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  221. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  222. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  223. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  224. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  225. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  226. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  227. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  228. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
  229. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  230. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  231. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  232. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  233. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  234. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  235. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  236. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  237. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  238. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  239. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  240. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  241. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  242. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  243. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing.segment.rsc +1 -1
  244. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +1 -1
  245. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  246. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  247. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  248. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  249. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  250. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  251. package/cli/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  252. package/cli/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  253. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  254. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  255. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  256. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  257. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  258. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  259. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +3 -3
  260. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  261. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  262. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  263. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  264. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  265. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  266. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  267. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  268. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  269. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
  270. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  271. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  272. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  273. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  274. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  275. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  276. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  277. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  278. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  279. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  280. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  281. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  282. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  283. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  284. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  285. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  286. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  287. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  288. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  289. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  290. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  291. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  292. package/cli/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  293. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  294. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  295. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  296. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  297. package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  298. package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  299. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  300. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  301. package/cli/app/.next-cli-build/server/app/index.rsc +3 -3
  302. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  303. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  304. package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  305. package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  306. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  307. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  308. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  309. package/cli/app/.next-cli-build/server/app/landing.rsc +4 -4
  310. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  311. package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  312. package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  313. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  314. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  315. package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  316. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  317. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  318. package/cli/app/.next-cli-build/server/app/login.rsc +4 -4
  319. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  320. package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  321. package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  322. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  323. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  324. package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  325. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  326. package/cli/app/.next-cli-build/server/app-paths-manifest.json +6 -6
  327. package/cli/app/.next-cli-build/server/chunks/1131.js +1 -1
  328. package/cli/app/.next-cli-build/server/chunks/1350.js +1 -1
  329. package/cli/app/.next-cli-build/server/chunks/220.js +1 -1
  330. package/cli/app/.next-cli-build/server/chunks/2760.js +1 -1
  331. package/cli/app/.next-cli-build/server/chunks/3949.js +1 -1
  332. package/cli/app/.next-cli-build/server/chunks/4827.js +1 -1
  333. package/cli/app/.next-cli-build/server/chunks/5295.js +3 -3
  334. package/cli/app/.next-cli-build/server/chunks/6651.js +14 -10
  335. package/cli/app/.next-cli-build/server/chunks/7319.js +23 -19
  336. package/cli/app/.next-cli-build/server/chunks/7634.js +1 -1
  337. package/cli/app/.next-cli-build/server/chunks/8255.js +1 -1
  338. package/cli/app/.next-cli-build/server/chunks/8306.js +1 -1
  339. package/cli/app/.next-cli-build/server/chunks/8491.js +1 -1
  340. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  341. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  342. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  343. package/cli/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  344. package/cli/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  345. package/cli/app/.next-cli-build/static/chunks/{620-92e97ab01cb4c25a.js → 620-2e6639e4ca9afb1d.js} +1 -1
  346. package/cli/app/CHANGELOG.md +10 -0
  347. package/cli/app/package.json +1 -1
  348. package/cli/package.json +1 -1
  349. package/package.json +1 -1
  350. /package/cli/app/.next-cli-build/static/{JzhJR_QLUCS172Am3eS9H → S4Ni0EVNQQgndbz1Kanxu}/_buildManifest.js +0 -0
  351. /package/cli/app/.next-cli-build/static/{JzhJR_QLUCS172Am3eS9H → S4Ni0EVNQQgndbz1Kanxu}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";exports.id=5295,exports.ids=[5295],exports.modules={6382:(a,b,c)=>{c.d(b,{$D:()=>s,Oj:()=>g,VE:()=>k,ZF:()=>p,Zm:()=>f,aZ:()=>t,gI:()=>o,h3:()=>h,rG:()=>n});let d="-agentic",e="-thinking",f=64,g=10237,h=64,i="1.0.138",j="1.0.0";function k(a){return{userAgent:`aws-sdk-js/${j} ua/2.1 os/windows#10.0.26200 lang/js md/nodejs#22.21.1 api/codewhispererruntime#${j} m/N,E KiroIDE-${i}-${a}`,amzUserAgent:`aws-sdk-js/${j} KiroIDE-${i}-${a}`}}let l=new Set(["1","true","yes","on"]),m=new Set(["0","false","no","off"]),n=`
1
+ "use strict";exports.id=5295,exports.ids=[5295],exports.modules={6382:(a,b,c)=>{c.d(b,{$D:()=>v,Oj:()=>g,P9:()=>q,VE:()=>m,We:()=>i,ZF:()=>s,Zm:()=>f,aZ:()=>A,cr:()=>y,gI:()=>r,h3:()=>h,rG:()=>p,yh:()=>z});let d="-agentic",e="-thinking",f=64,g=10237,h=64;function i(a){return"google"===a||"github"===a?"arn:aws:codewhisperer:us-east-1:699475941385:profile/EHGA3GRVQMUK":"arn:aws:codewhisperer:us-east-1:638616132270:profile/AAAACCCCXXXX"}let j={minimal:512,low:1024,medium:8192,high:24576,xhigh:32768,max:128e3},k="1.0.138",l="1.0.0";function m(a){return{userAgent:`aws-sdk-js/${l} ua/2.1 os/windows#10.0.26200 lang/js md/nodejs#22.21.1 api/codewhispererruntime#${l} m/N,E KiroIDE-${k}-${a}`,amzUserAgent:`aws-sdk-js/${l} KiroIDE-${k}-${a}`}}let n=new Set(["1","true","yes","on"]),o=new Set(["0","false","no","off"]),p=`
2
2
  # CRITICAL: CHUNKED WRITE PROTOCOL (MANDATORY)
3
3
 
4
4
  You MUST follow these rules for ALL file operations. Violation causes server timeouts and task failure.
@@ -47,5 +47,5 @@ WRONG: Generating massive code blocks without chunking -> TIMEOUT
47
47
  - Failed writes waste time and require retry
48
48
 
49
49
  REMEMBER: When in doubt, write LESS per operation. Multiple small operations > one large operation.
50
- `.trim();function o(a,b,c){if(function(a){if(!a||"object"!=typeof a)return!1;let b=a.thinking;if(b&&"object"==typeof b&&"disabled"===b.type)return!0;let c=a.reasoning_effort??(a.reasoning&&"object"==typeof a.reasoning?a.reasoning.effort:null);return"string"==typeof c&&"none"===c.toLowerCase()}(a))return!1;if(b){let a=function(a,b){if(!a)return;if("function"==typeof a.get)return a.get(b);let c=b.toLowerCase();for(let b of Object.keys(a))if(b.toLowerCase()===c)return a[b]}(b,"anthropic-beta");if("string"==typeof a&&a.toLowerCase().includes("interleaved-thinking"))return!0}if(a&&"object"==typeof a){let b=a.thinking;if(b&&"object"==typeof b&&"enabled"===b.type){let a=Number(b.budget_tokens);if(!Number.isFinite(a)||a>0)return!0}let c=a.reasoning_effort??(a.reasoning&&"object"==typeof a.reasoning?a.reasoning.effort:null);if("string"==typeof c){let a=c.toLowerCase();if(a&&"none"!==a&&("low"===a||"medium"===a||"high"===a||"auto"===a))return!0}if(function(a){for(let b of Array.isArray(a?.messages)?a.messages:[]){if(!b||"system"!==b.role&&"user"!==b.role)continue;let a=b.content;if("string"==typeof a){if(u(a))return!0}else if(Array.isArray(a))for(let b of a){let a=b?.text;if("string"==typeof a&&u(a))return!0}}return!!("string"==typeof a?.system&&u(a.system))}(a))return!0}if("string"==typeof c&&c){let a=c.toLowerCase();if(a.includes("thinking")||a.includes("-reason"))return!0}return!1}function p(a){let b=w(v(a?.kiro_expose_reasoning,a?.kiroExposeReasoning,a?.metadata?.kiro_expose_reasoning,a?.metadata?.kiroExposeReasoning,a?.extra_body?.kiro_expose_reasoning,a?.extra_body?.kiroExposeReasoning));if(null!==b)return b;let c="u">typeof process?process.env:{};return!0===w(v(c.KIRO_EXPOSE_REASONING,c.ZEVAI_EXPOSE_REASONING))}function q(a){return"string"==typeof a&&a.endsWith(d)}function r(a){return"string"==typeof a&&a.endsWith(e)}function s(a){var b,c;let f=a,g=!1,h=!1;return q(f)&&(g=!0,f=q(b=f)?b.slice(0,-d.length):b),r(f)&&(h=!0,f=r(c=f)?c.slice(0,-e.length):c),{upstream:f,agentic:g,thinking:h}}function t(a=16e3){let b=Math.max(1,Math.min(32e3,Number(a)||16e3));return`<thinking_mode>enabled</thinking_mode>
51
- <max_thinking_length>${b}</max_thinking_length>`}function u(a){return!!a&&!!a.includes("<thinking_mode>")&&(a.includes("<thinking_mode>enabled</thinking_mode>")||a.includes("<thinking_mode>interleaved</thinking_mode>"))}function v(...a){return a.find(a=>null!=a)}function w(a){if("boolean"==typeof a)return a;if("number"==typeof a)return 1===a||0!==a&&null;if("string"!=typeof a)return null;let b=a.trim().toLowerCase();return!!l.has(b)||!m.has(b)&&null}},8590:(a,b,c)=>{c.d(b,{$B:()=>H,I9:()=>u,Og:()=>r,Ql:()=>D,R_:()=>q,Sc:()=>I,jR:()=>G,jT:()=>p,oD:()=>k,pb:()=>K,qZ:()=>L});var d=c(35024),e=c(75924),f=c(39609),g=c(18080),h=c(52060);let i=null;async function j(a,b){return a?o("xai",a,async()=>{try{i||(i=new(await Promise.all([c.e(4897),c.e(2030)]).then(c.bind(c,82030))).XaiService);let b=await i.refreshAccessToken(a);return{accessToken:b.access_token,refreshToken:b.refresh_token||a,expiresIn:b.expires_in,idToken:b.id_token}}catch(c){b?.warn?.("TOKEN_REFRESH","xAI OAuth refresh failed",{status:c?.status||null,code:y(c?.code,c?.status),permanent:c?.permanent===!0});let a=String(c?.message||"");if(c?.permanent===!0||a.includes("invalid_grant")||a.includes("invalid_request"))return{error:"invalid_grant",code:y(c?.code||"invalid_grant",c?.status)};return null}},b):null}let k=3e5,l=new Map;function m(){let a=Error("Request aborted");return a.name="AbortError",a}function n(a,b){return a.waiterCount+=1,new Promise((c,d)=>{let e=!1,f=(c,d)=>{e||(e=!0,b?.removeEventListener?.("abort",g),a.waiterCount=Math.max(0,a.waiterCount-1),0!==a.waiterCount||a.settled||(a.acceptingWaiters=!1,a.controller.abort(m())),c(d))},g=()=>f(d,m());b?.addEventListener?.("abort",g,{once:!0}),b?.aborted&&g(),a.promise.then(a=>f(c,a),a=>f(d,a))})}async function o(a,b,c,d,e=null){let f,g;if(e?.aborted)throw m();if(!b)return c();let h=`${a}:${b}`,i=l.get(h);if(i){if(i.promise){if(!1===i.acceptingWaiters||i.controller.signal.aborted)try{return await (e?.aborted?Promise.reject(m()):new Promise((a,b)=>{let c=!1,d=(a,b)=>{c||(c=!0,e?.removeEventListener?.("abort",f),a(b))},f=()=>d(b,m());e?.addEventListener?.("abort",f,{once:!0}),e?.aborted&&f(),i.promise.then(b=>d(a,b),a=>d(b,a))}))}catch(f){if(e?.aborted)throw m();if(i.controller.signal.aborted&&f?.name==="AbortError")return o(a,b,c,d,e);throw f}return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),n(i,e)}if(i.expiresAt>Date.now())return d?.info?.("TOKEN_REFRESH",`Reusing recent refresh result for ${a}`),i.result;l.delete(h)}let j={controller:new AbortController,promise:new Promise((a,b)=>{f=a,g=b}),acceptingWaiters:!0,settled:!1,waiterCount:0};return l.set(h,j),(async()=>{try{let a=await c(j.controller.signal),b={result:a,expiresAt:Date.now()+1e4};l.set(h,b);let d=setTimeout(()=>{l.get(h)===b&&l.delete(h)},1e4);d.unref?.(),j.settled=!0,f(a)}catch(a){l.get(h)===j&&l.delete(h),j.settled=!0,g(a)}})(),n(j,e)}function p(a){return a&&"object"==typeof a&&("unrecoverable_refresh_error"===a.error||"refresh_token_reused"===a.error||"invalid_request"===a.error||"invalid_grant"===a.error)}function q(a={}){let b=String(a.code||a.error||"refresh_token_rejected").slice(0,120),c=Error("Refresh credential rejected; re-authentication required.");return c.name="RefreshCredentialError",c.code=b,c.permanent=!0,c}function r(a){return e.Wu[a]||k}async function s(a,b,c,e){let f=d.xq[a];return f&&f.refreshUrl?b?o(a,b,async()=>{try{let c=await fetch(f.refreshUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:b,client_id:f.clientId,client_secret:f.clientSecret})});if(!c.ok){let b=await c.text();return z(b,c.status,e,a)}let d=await c.json();return e?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!d.access_token,hasNewRefreshToken:!!d.refresh_token,expiresIn:d.expires_in}),{accessToken:d.access_token,refreshToken:d.refresh_token||b,expiresIn:d.expires_in}}catch(b){return e?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}},e):(e?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null):(e?.warn?.("TOKEN_REFRESH",`No refresh URL configured for provider: ${a}`),null)}async function t(a,b){return a?o("claude",a,async()=>{try{let c=await fetch(e.NA.anthropic.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.claude.clientId})});if(!c.ok){let a=await c.text();return z(a,c.status,b,"Claude")}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Claude OAuth token",{hasNewAccessToken:!!f.access_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Claude token: ${a.message}`),null}},b):null}async function u(a,b,c,d){return a?o(`google:${b}`,a,async()=>{try{let f=await fetch(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:b,client_secret:c})});if(!f.ok){let a=await f.text();return z(a,f.status,d,"Google")}let g=await f.json();return d?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!g.access_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return d?.error?.("TOKEN_REFRESH",`Network error refreshing Google token: ${a.message}`),null}},d):null}async function v(a,b){return a?o("qwen",a,async()=>{let c=e.NA.qwen.token;try{let e=await fetch(c,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.qwen.clientId})});if(200===e.status){let c=await e.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Qwen token",{hasNewAccessToken:!!c.access_token,hasNewRefreshToken:!!c.refresh_token,expiresIn:c.expires_in}),{accessToken:c.access_token,refreshToken:c.refresh_token||a,expiresIn:c.expires_in,providerSpecificData:c.resource_url?{resourceUrl:c.resource_url}:void 0}}{let a=await e.text().catch(()=>"");return z(a,e.status,b,"Qwen")}}catch(a){b?.warn?.("TOKEN_REFRESH","Network error trying Qwen endpoint",{error:a.message})}return b?.error?.("TOKEN_REFRESH","Failed to refresh Qwen token"),null},b):null}async function w(a,b,c="codebuddy"){return a?o(c,a,async()=>{try{let e=d.xq[c]||d.xq.codebuddy,g=e.refreshUrl,i=e.domain||"www.codebuddy.ai",j=await (0,f.proxyAwareFetch)(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":h.C,"X-Requested-With":"XMLHttpRequest","X-Domain":i,"X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!j.ok){let a=await j.text().catch(()=>"");return z(a,j.status,b,c)}let k=await j.json(),l=k?.data||k,m=l?.accessToken||l?.access_token;if(!m)return null;return{accessToken:m,refreshToken:l?.refreshToken||l?.refresh_token||a,expiresIn:l?.expiresIn||l?.expires_in||86400}}catch(a){return b?.error?.("TOKEN_REFRESH",`Error refreshing token for ${c}`,{error:a.message}),null}},b):null}function x(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error&&"object"==typeof c.error?c.error:null,e=d?.code||d?.type||("string"==typeof c?.error?c.error:"")||c?.error_code||"",f=d?.message||d?.error_description||c?.error_description||c?.message||a||"",g=`${e} ${f}`.toLowerCase(),h=400===b||401===b||["refresh_token_expired","refresh_token_reused","refresh_token_invalidated","invalid_refresh_token","invalid_grant"].some(a=>g.includes(a));return{status:b,code:e,description:f,permanent:h}}function y(a,b){let c="string"==typeof a?a.trim():"";return/^[a-zA-Z0-9_.:-]{1,120}$/.test(c)?c:`HTTP_${Number(b)||0}`}function z(a,b,c,d){let e=x(a,b),f=y(e.code,b);return c?.error?.("TOKEN_REFRESH",`${d} OAuth refresh failed`,{status:b,code:f,permanent:e.permanent}),e.permanent?{error:"unrecoverable_refresh_error",code:f}:null}function A(a,b,c,d){let e=function(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error&&"object"==typeof c.error?c.error:c,e=[d?.reason,c?.reason,d?.code,c?.code,d?.errorCode,c?.errorCode,d?.type,c?.type,d?.__type,c?.__type,"string"==typeof c?.error?c.error:""].filter(a=>("string"==typeof a||"number"==typeof a)&&String(a).trim()),f=e.map(a=>String(a).trim()).find(a=>/^[A-Za-z0-9_.:#/-]{1,200}$/.test(a)&&!/^aor[A-Za-z0-9._~+/=-]{8,}$/.test(a)&&!/^eyJ[A-Za-z0-9_-]{8,}\./.test(a))||null,g=[d?.message,d?.Message,d?.error_description,c?.message,c?.Message,c?.error_description,c?"":a].find(a=>"string"==typeof a&&a.trim())||"",h=e.map(a=>String(a).replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")),i=["invalid_grant","invalid_grant_exception","invalid_refresh_token","refresh_token_expired","refresh_token_revoked","refresh_token_reused","refresh_token_invalidated","expired_token","token_revoked","invalid_token","invalid_token_exception","invalid_client","invalid_client_exception","unauthorized_client"],j=h.some(a=>{let b=a.replace(/_exception$/,"");return i.some(a=>b===a||b.endsWith(`_${a}`))}),k=g.toLowerCase().slice(0,4e3),l=400===b||401===b||j||/\binvalid[_ -]?grant\b/.test(k)||/\brefresh token\b.{0,60}\b(?:expired|invalid|revoked|reused|disabled)\b/.test(k)||/\b(?:expired|invalid|revoked|reused|disabled)\b.{0,60}\brefresh token\b/.test(k);return{status:b,code:f,permanent:l}}(b,a.status);c?.error?.("TOKEN_REFRESH",`Kiro ${d} refresh failed`,{status:a.status,code:e.code,permanent:e.permanent});let f=Error(e.permanent?"Kiro refresh credential rejected":"Kiro refresh temporarily unavailable");throw f.name=e.permanent?"KiroRefreshCredentialError":"KiroRefreshTransientError",f.status=a.status,f.code=e.code,f.permanent=e.permanent,f}function B(a,b){a?.error?.("TOKEN_REFRESH",`Kiro ${b} refresh returned no access token`);let c=Error("Kiro refresh returned an invalid response");throw c.name="KiroRefreshTransientError",c.status=502,c.code="MISSING_ACCESS_TOKEN",c.permanent=!1,c}async function C(a,b){return a?o("codex",a,async()=>{try{let c=await fetch(e.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:d.xq.codex.clientId,grant_type:"refresh_token",refresh_token:a})});if(!c.ok){let a=await c.text();return x(a,c.status).permanent,z(a,c.status,b,"Codex")}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!f.access_token,hasNewRefreshToken:!!f.refresh_token,hasIdToken:!!f.id_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,idToken:f.id_token,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}},b):null}async function D(a,b,c,e=null,h=null){return a?o("kiro",a,async h=>{let i=b?.authMethod,j=b?.clientId,k=b?.clientSecret,l=b?.region;if("external_idp"===i){let d;try{d=(0,g.uo)(a,b)}catch(a){return c?.warn?.("TOKEN_REFRESH",`Kiro external IdP refresh rejected: ${a.message}`),null}let i=await (0,f.proxyAwareFetch)(d.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:d.body,signal:h},{...e,singleTransportAttempt:!0});if(!i.ok){let a=await i.text();return A(i,a,c,"external IdP")}let j=await i.json();return j?.access_token?{accessToken:j.access_token,refreshToken:j.refresh_token||a,expiresIn:j.expires_in,providerSpecificData:d.providerSpecificData}:B(c,"external IdP")}if(j&&k){let b="idc"===i&&l?`https://oidc.${l}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",d=await (0,f.proxyAwareFetch)(b,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:j,clientSecret:k,refreshToken:a,grantType:"refresh_token"}),signal:h},{...e,singleTransportAttempt:!0});if(!d.ok){let a=await d.text();return A(d,a,c,"AWS")}let g=await d.json();return g?.accessToken?(c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!g.accessToken,expiresIn:g.expiresIn}),{accessToken:g.accessToken,refreshToken:g.refreshToken||a,expiresIn:g.expiresIn}):B(c,"AWS")}let m=await (0,f.proxyAwareFetch)(d.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/2.12.2"},body:JSON.stringify({refreshToken:a}),signal:h},{...e,singleTransportAttempt:!0});if(!m.ok){let a=await m.text();return A(m,a,c,"social")}let n=await m.json();return n?.accessToken?(c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!n.accessToken,expiresIn:n.expiresIn}),{accessToken:n.accessToken,refreshToken:n.refreshToken||a,expiresIn:n.expiresIn}):B(c,"social")},c,h):null}async function E(a,b){return a?o("iflow",a,async()=>{let c=btoa(`${d.xq.iflow.clientId}:${d.xq.iflow.clientSecret}`),f=await fetch(e.NA.iflow.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${c}`},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.iflow.clientId,client_secret:d.xq.iflow.clientSecret})});if(!f.ok)return z(await f.text(),f.status,b,"iFlow");let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed iFlow token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}},b):null}async function F(a,b){return a?o("github",a,async()=>{let c={grant_type:"refresh_token",refresh_token:a,client_id:d.xq.github.clientId};d.xq.github.clientSecret&&(c.client_secret=d.xq.github.clientSecret);let f=await fetch(e.NA.github.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(c)});if(!f.ok)return z(await f.text(),f.status,b,"GitHub");let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed GitHub token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}},b):null}async function G(a,b){return a?o("copilot",a,async()=>{try{let c=await fetch("https://api.github.com/copilot_internal/v2/token",{headers:{Authorization:`token ${a}`,"User-Agent":e.x0.USER_AGENT,"Editor-Version":`vscode/${e.x0.VSCODE_VERSION}`,"Editor-Plugin-Version":`copilot-chat/${e.x0.COPILOT_CHAT_VERSION}`,Accept:"application/json","x-github-api-version":e.x0.API_VERSION}});if(!c.ok)return await c.body?.cancel?.().catch?.(()=>{}),b?.error?.("TOKEN_REFRESH","Copilot token refresh failed",{status:c.status}),null;let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!d.token,expiresAt:d.expires_at}),{token:d.token,expiresAt:d.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function H(a,b,c){if(!b.refreshToken)return null;switch(a){case"gemini-cli":case"antigravity":return u(b.refreshToken,d.xq[a].clientId,d.xq[a].clientSecret,c);case"claude":return t(b.refreshToken,c);case"codex":return C(b.refreshToken,c);case"qwen":return v(b.refreshToken,c);case"codebuddy":return w(b.refreshToken,c,"codebuddy");case"codebuddy-cn":return w(b.refreshToken,c,"codebuddy-cn");case"iflow":return E(b.refreshToken,c);case"github":return F(b.refreshToken,c);case"kiro":return D(b.refreshToken,b.providerSpecificData,c);case"xai":case"grok-cli":return j(b.refreshToken,c);case"vertex":case"vertex-partner":{let a=I(b.apiKey);if(!a)return null;return K(a,c)}default:return s(a,b.refreshToken,b,c)}}function I(a){if("string"!=typeof a)return null;try{let b=JSON.parse(a);if("service_account"===b.type&&b.client_email&&b.private_key&&b.project_id)return b;return null}catch{return null}}let J=new Map;async function K(a,b){let d=a.client_email,e=J.get(d);if(e&&e.expiresAt-Date.now()>3e5)return{accessToken:e.token,expiresAt:e.expiresAt};try{let{SignJWT:e,importPKCS8:f}=await Promise.all([c.e(6935),c.e(8971)]).then(c.bind(c,8971));b?.debug?.("TOKEN_REFRESH",`Vertex minting token for ${a.client_email}`);let g=await f(a.private_key.replace(/\\n/g,"\n"),"RS256"),h=Math.floor(Date.now()/1e3),i=await new e({scope:"https://www.googleapis.com/auth/cloud-platform"}).setProtectedHeader({alg:"RS256"}).setIssuer(a.client_email).setAudience("https://oauth2.googleapis.com/token").setIssuedAt(h).setExpirationTime(h+3600).sign(g),j=await fetch("https://oauth2.googleapis.com/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:i})});if(!j.ok){let a=await j.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:k,expires_in:l}=await j.json(),m=Date.now()+(l??3600)*1e3;return J.set(d,{token:k,expiresAt:m}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:k,expiresAt:m}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}async function L(a,b=3,c=null,d=null){let e=()=>{let a=Error("Request aborted");return a.name="AbortError",a},f=a=>d?d.aborted?Promise.reject(e()):new Promise((b,c)=>{let f,g=()=>{clearTimeout(f),d.removeEventListener("abort",g),c(e())};f=setTimeout(()=>{d.removeEventListener("abort",g),b()},a),d.addEventListener("abort",g,{once:!0})}):new Promise(b=>setTimeout(b,a));for(let g=0;g<b;g++){if(d?.aborted)throw e();if(g>0){let a=1e3*g;c?.debug?.("TOKEN_REFRESH",`Retry ${g}/${b} after ${a}ms`),await f(a)}try{let b=await a();if(p(b))throw q(b);if(b)return b}catch(a){if(d?.aborted||a?.name==="AbortError")throw e();if(a?.permanent===!0)throw a;c?.warn?.("TOKEN_REFRESH",`Attempt ${g+1}/${b} failed: ${a.message}`)}}return c?.error?.("TOKEN_REFRESH",`All ${b} retry attempts failed`),null}},18080:(a,b,c)=>{c.d(b,{Xj:()=>i,uo:()=>j});let d=new Set(["login.microsoftonline.com","login.microsoft.com","login.windows.net"]);function e(a){return"string"==typeof a?a.trim():""}function f(a){let b,c=e(a);if(!c)throw Error("token_endpoint is required");try{b=new URL(c)}catch{throw Error("token_endpoint must be a valid URL")}if("https:"!==b.protocol)throw Error("token_endpoint must use https");if(!d.has(b.hostname.toLowerCase()))throw Error("token_endpoint must be a Microsoft login endpoint");return b.toString()}function g(a){return Array.isArray(a)?a.map(e).filter(Boolean).join(" "):e(a)}function h(a){try{if(!a||"string"!=typeof a)return null;let b=a.split(".");if(3!==b.length)return null;let c=b[1].replace(/-/g,"+").replace(/_/g,"/"),d=(4-c.length%4)%4;return JSON.parse(Buffer.from(`${c}${"=".repeat(d)}`,"base64").toString("utf8"))}catch{return null}}function i(a){let b=a;if("string"==typeof b)try{b=JSON.parse(b)}catch{throw Error("CLIProxyAPI auth JSON is invalid")}if(!b||"object"!=typeof b)throw Error("CLIProxyAPI auth JSON is required");let c=e(b.auth_method||b.authMethod);if(c&&"external_idp"!==c)throw Error("Only external_idp Kiro auth is supported by this importer");let d=e(b.access_token||b.accessToken),i=e(b.refresh_token||b.refreshToken),j=e(b.client_id||b.clientId),k=f(b.token_endpoint||b.tokenEndpoint),l=e(b.profile_arn||b.profileArn),m=e(b.region)||"us-east-1",n=g(b.scopes||b.scope);if(!d)throw Error("access_token is required");if(!i)throw Error("refresh_token is required");if(!j)throw Error("client_id is required");if(!n)throw Error("scopes is required");if(!l)throw Error("profile_arn is required");let o=h(d),p=b.email||o?.email||o?.preferred_username||o?.upn||o?.sub||null;return{accessToken:d,refreshToken:i,expiresAt:function(a){let b=a.expired||a.expires_at||a.expiresAt;if(b){let a=new Date(b).getTime();if(Number.isFinite(a))return new Date(a).toISOString()}let c=Number(a.expires_in||a.expiresIn||0);if(Number.isFinite(c)&&c>0)return new Date(Date.now()+1e3*c).toISOString();let d=h(a.access_token||a.accessToken);return d?.exp?new Date(1e3*d.exp).toISOString():new Date(Date.now()+36e5).toISOString()}(b),email:p,providerSpecificData:{profileArn:l,region:m,authMethod:"external_idp",provider:"CLIProxyAPI",clientId:j,tokenEndpoint:k,scope:n}}}function j(a,b={}){let c=e(b.clientId||b.client_id),d=f(b.tokenEndpoint||b.token_endpoint),h=g(b.scope||b.scopes);if(!a)throw Error("refresh token is required");if(!c)throw Error("clientId is required for external_idp refresh");if(!h)throw Error("scope is required for external_idp refresh");return{tokenEndpoint:d,body:new URLSearchParams({grant_type:"refresh_token",client_id:c,refresh_token:a,scope:h}),providerSpecificData:{...b,authMethod:"external_idp",clientId:c,tokenEndpoint:d,scope:h}}}}};
50
+ `.trim();function q(a,b,c){if(function(a){if(!a||"object"!=typeof a)return!1;let b=a.thinking;if(b&&"object"==typeof b&&"disabled"===b.type)return!0;let c=a.reasoning_effort??a.output_config?.effort??(a.reasoning&&"object"==typeof a.reasoning?a.reasoning.effort:null);return"string"==typeof c&&["none","off","disabled"].includes(c.toLowerCase())}(a))return null;let d=a?.output_config?.effort;if("string"==typeof d){let a=j[d.toLowerCase()];if(a)return a}let e=a?.thinking;if(e&&"object"==typeof e&&"enabled"===e.type){let a=Number(e.budget_tokens);return Number.isFinite(a)&&a>0?a:16e3}let f=a?.reasoning_effort??(a?.reasoning&&"object"==typeof a.reasoning?a.reasoning.effort:null);if("string"==typeof f){let a=f.toLowerCase();if("auto"===a)return 16e3;let b=j[a];if(b)return b}if(b){let a=function(a,b){if(!a)return;if("function"==typeof a.get)return a.get(b);let c=b.toLowerCase();for(let b of Object.keys(a))if(b.toLowerCase()===c)return a[b]}(b,"anthropic-beta");if("string"==typeof a&&a.toLowerCase().includes("interleaved-thinking"))return 16e3}if(function(a){for(let b of Array.isArray(a?.messages)?a.messages:[]){if(!b||"system"!==b.role&&"user"!==b.role)continue;let a=b.content;if("string"==typeof a){if(B(a))return!0}else if(Array.isArray(a))for(let b of a){let a=b?.text;if("string"==typeof a&&B(a))return!0}}return!!("string"==typeof a?.system&&B(a.system))}(a))return 16e3;if("string"==typeof c&&c){let a=c.toLowerCase();if(a.includes("thinking")||a.includes("-reason"))return 16e3}return null}function r(a,b,c){return null!==q(a,b,c)}function s(a){let b=D(C(a?.kiro_expose_reasoning,a?.kiroExposeReasoning,a?.metadata?.kiro_expose_reasoning,a?.metadata?.kiroExposeReasoning,a?.extra_body?.kiro_expose_reasoning,a?.extra_body?.kiroExposeReasoning));if(null!==b)return b;let c="u">typeof process?process.env:{};return!0===D(C(c.KIRO_EXPOSE_REASONING,c.ZEVAI_EXPOSE_REASONING))}function t(a){return"string"==typeof a&&a.endsWith(d)}function u(a){return"string"==typeof a&&a.endsWith(e)}function v(a){var b,c;let f=a,g=!1,h=!1;return t(f)&&(g=!0,f=t(b=f)?b.slice(0,-d.length):b),u(f)&&(h=!0,f=u(c=f)?c.slice(0,-e.length):c),{upstream:f,agentic:g,thinking:h}}function w(a){let b=a?.output_config?.effort??a?.reasoning_effort??("object"==typeof a?.reasoning?a.reasoning.effort:null);if("string"!=typeof b)return null;let c=b.toLowerCase();return"max"===c?"xhigh":["low","medium","high","xhigh"].includes(c)?c:null}function x(a){if("string"!=typeof a)return null;let b=a.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(b))return"reasoning";if(!b.includes("claude"))return null;let c=b.match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);if(!c)return null;let d=Number(c[1]),e=void 0===c[2]?null:Number(c[2]);return d<4||4===d&&(null===e||e<=5||null!==e&&e>=1e3)?null:"output_config"}function y(a,b){return"reasoning"===x(b)&&null!==w(a)}function z(a,b){let c=x(b);if(!c)return;if("reasoning"===c){let b=w(a);return b?{reasoning:{effort:b}}:void 0}let d=function(a){let b=a?.output_config?.effort??a?.reasoning_effort??("object"==typeof a?.reasoning?a.reasoning.effort:null);if("string"!=typeof b)return null;let c=b.toLowerCase();return"none"===c||"off"===c||"disabled"===c?null:"xhigh"===c||"max"===c?"high":["low","medium","high"].includes(c)?c:null}(a);return d?{thinking:{type:"adaptive",display:"summarized"},output_config:{effort:d}}:void 0}function A(a=16e3){let b=Math.max(1,Math.min(32e3,Number(a)||16e3));return`<thinking_mode>enabled</thinking_mode>
51
+ <max_thinking_length>${b}</max_thinking_length>`}function B(a){return!!a&&!!a.includes("<thinking_mode>")&&(a.includes("<thinking_mode>enabled</thinking_mode>")||a.includes("<thinking_mode>interleaved</thinking_mode>"))}function C(...a){return a.find(a=>null!=a)}function D(a){if("boolean"==typeof a)return a;if("number"==typeof a)return 1===a||0!==a&&null;if("string"!=typeof a)return null;let b=a.trim().toLowerCase();return!!n.has(b)||!o.has(b)&&null}},8590:(a,b,c)=>{c.d(b,{$B:()=>H,I9:()=>u,Og:()=>r,Ql:()=>D,R_:()=>q,Sc:()=>I,jR:()=>G,jT:()=>p,oD:()=>k,pb:()=>K,qZ:()=>L});var d=c(35024),e=c(75924),f=c(39609),g=c(18080),h=c(52060);let i=null;async function j(a,b){return a?o("xai",a,async()=>{try{i||(i=new(await Promise.all([c.e(4897),c.e(2030)]).then(c.bind(c,82030))).XaiService);let b=await i.refreshAccessToken(a);return{accessToken:b.access_token,refreshToken:b.refresh_token||a,expiresIn:b.expires_in,idToken:b.id_token}}catch(c){b?.warn?.("TOKEN_REFRESH","xAI OAuth refresh failed",{status:c?.status||null,code:y(c?.code,c?.status),permanent:c?.permanent===!0});let a=String(c?.message||"");if(c?.permanent===!0||a.includes("invalid_grant")||a.includes("invalid_request"))return{error:"invalid_grant",code:y(c?.code||"invalid_grant",c?.status)};return null}},b):null}let k=3e5,l=new Map;function m(){let a=Error("Request aborted");return a.name="AbortError",a}function n(a,b){return a.waiterCount+=1,new Promise((c,d)=>{let e=!1,f=(c,d)=>{e||(e=!0,b?.removeEventListener?.("abort",g),a.waiterCount=Math.max(0,a.waiterCount-1),0!==a.waiterCount||a.settled||(a.acceptingWaiters=!1,a.controller.abort(m())),c(d))},g=()=>f(d,m());b?.addEventListener?.("abort",g,{once:!0}),b?.aborted&&g(),a.promise.then(a=>f(c,a),a=>f(d,a))})}async function o(a,b,c,d,e=null){let f,g;if(e?.aborted)throw m();if(!b)return c();let h=`${a}:${b}`,i=l.get(h);if(i){if(i.promise){if(!1===i.acceptingWaiters||i.controller.signal.aborted)try{return await (e?.aborted?Promise.reject(m()):new Promise((a,b)=>{let c=!1,d=(a,b)=>{c||(c=!0,e?.removeEventListener?.("abort",f),a(b))},f=()=>d(b,m());e?.addEventListener?.("abort",f,{once:!0}),e?.aborted&&f(),i.promise.then(b=>d(a,b),a=>d(b,a))}))}catch(f){if(e?.aborted)throw m();if(i.controller.signal.aborted&&f?.name==="AbortError")return o(a,b,c,d,e);throw f}return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),n(i,e)}if(i.expiresAt>Date.now())return d?.info?.("TOKEN_REFRESH",`Reusing recent refresh result for ${a}`),i.result;l.delete(h)}let j={controller:new AbortController,promise:new Promise((a,b)=>{f=a,g=b}),acceptingWaiters:!0,settled:!1,waiterCount:0};return l.set(h,j),(async()=>{try{let a=await c(j.controller.signal),b={result:a,expiresAt:Date.now()+1e4};l.set(h,b);let d=setTimeout(()=>{l.get(h)===b&&l.delete(h)},1e4);d.unref?.(),j.settled=!0,f(a)}catch(a){l.get(h)===j&&l.delete(h),j.settled=!0,g(a)}})(),n(j,e)}function p(a){return a&&"object"==typeof a&&("unrecoverable_refresh_error"===a.error||"refresh_token_reused"===a.error||"invalid_request"===a.error||"invalid_grant"===a.error)}function q(a={}){let b=String(a.code||a.error||"refresh_token_rejected").slice(0,120),c=Error("Refresh credential rejected; re-authentication required.");return c.name="RefreshCredentialError",c.code=b,c.permanent=!0,c}function r(a){return e.Wu[a]||k}async function s(a,b,c,e){let f=d.xq[a];return f&&f.refreshUrl?b?o(a,b,async()=>{try{let c=await fetch(f.refreshUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:b,client_id:f.clientId,client_secret:f.clientSecret})});if(!c.ok){let b=await c.text();return z(b,c.status,e,a)}let d=await c.json();return e?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!d.access_token,hasNewRefreshToken:!!d.refresh_token,expiresIn:d.expires_in}),{accessToken:d.access_token,refreshToken:d.refresh_token||b,expiresIn:d.expires_in}}catch(b){return e?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}},e):(e?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null):(e?.warn?.("TOKEN_REFRESH",`No refresh URL configured for provider: ${a}`),null)}async function t(a,b){return a?o("claude",a,async()=>{try{let c=await fetch(e.NA.anthropic.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.claude.clientId})});if(!c.ok){let a=await c.text();return z(a,c.status,b,"Claude")}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Claude OAuth token",{hasNewAccessToken:!!f.access_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Claude token: ${a.message}`),null}},b):null}async function u(a,b,c,d){return a?o(`google:${b}`,a,async()=>{try{let f=await fetch(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:b,client_secret:c})});if(!f.ok){let a=await f.text();return z(a,f.status,d,"Google")}let g=await f.json();return d?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!g.access_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return d?.error?.("TOKEN_REFRESH",`Network error refreshing Google token: ${a.message}`),null}},d):null}async function v(a,b){return a?o("qwen",a,async()=>{let c=e.NA.qwen.token;try{let e=await fetch(c,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.qwen.clientId})});if(200===e.status){let c=await e.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Qwen token",{hasNewAccessToken:!!c.access_token,hasNewRefreshToken:!!c.refresh_token,expiresIn:c.expires_in}),{accessToken:c.access_token,refreshToken:c.refresh_token||a,expiresIn:c.expires_in,providerSpecificData:c.resource_url?{resourceUrl:c.resource_url}:void 0}}{let a=await e.text().catch(()=>"");return z(a,e.status,b,"Qwen")}}catch(a){b?.warn?.("TOKEN_REFRESH","Network error trying Qwen endpoint",{error:a.message})}return b?.error?.("TOKEN_REFRESH","Failed to refresh Qwen token"),null},b):null}async function w(a,b,c="codebuddy"){return a?o(c,a,async()=>{try{let e=d.xq[c]||d.xq.codebuddy,g=e.refreshUrl,i=e.domain||"www.codebuddy.ai",j=await (0,f.proxyAwareFetch)(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":h.C,"X-Requested-With":"XMLHttpRequest","X-Domain":i,"X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!j.ok){let a=await j.text().catch(()=>"");return z(a,j.status,b,c)}let k=await j.json(),l=k?.data||k,m=l?.accessToken||l?.access_token;if(!m)return null;return{accessToken:m,refreshToken:l?.refreshToken||l?.refresh_token||a,expiresIn:l?.expiresIn||l?.expires_in||86400}}catch(a){return b?.error?.("TOKEN_REFRESH",`Error refreshing token for ${c}`,{error:a.message}),null}},b):null}function x(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error&&"object"==typeof c.error?c.error:null,e=d?.code||d?.type||("string"==typeof c?.error?c.error:"")||c?.error_code||"",f=d?.message||d?.error_description||c?.error_description||c?.message||a||"",g=`${e} ${f}`.toLowerCase(),h=400===b||401===b||["refresh_token_expired","refresh_token_reused","refresh_token_invalidated","invalid_refresh_token","invalid_grant"].some(a=>g.includes(a));return{status:b,code:e,description:f,permanent:h}}function y(a,b){let c="string"==typeof a?a.trim():"";return/^[a-zA-Z0-9_.:-]{1,120}$/.test(c)?c:`HTTP_${Number(b)||0}`}function z(a,b,c,d){let e=x(a,b),f=y(e.code,b);return c?.error?.("TOKEN_REFRESH",`${d} OAuth refresh failed`,{status:b,code:f,permanent:e.permanent}),e.permanent?{error:"unrecoverable_refresh_error",code:f}:null}function A(a,b,c,d){let e=function(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error&&"object"==typeof c.error?c.error:c,e=[d?.reason,c?.reason,d?.code,c?.code,d?.errorCode,c?.errorCode,d?.type,c?.type,d?.__type,c?.__type,"string"==typeof c?.error?c.error:""].filter(a=>("string"==typeof a||"number"==typeof a)&&String(a).trim()),f=e.map(a=>String(a).trim()).find(a=>/^[A-Za-z0-9_.:#/-]{1,200}$/.test(a)&&!/^aor[A-Za-z0-9._~+/=-]{8,}$/.test(a)&&!/^eyJ[A-Za-z0-9_-]{8,}\./.test(a))||null,g=[d?.message,d?.Message,d?.error_description,c?.message,c?.Message,c?.error_description,c?"":a].find(a=>"string"==typeof a&&a.trim())||"",h=e.map(a=>String(a).replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")),i=["invalid_grant","invalid_grant_exception","invalid_refresh_token","refresh_token_expired","refresh_token_revoked","refresh_token_reused","refresh_token_invalidated","expired_token","token_revoked","invalid_token","invalid_token_exception","invalid_client","invalid_client_exception","unauthorized_client"],j=h.some(a=>{let b=a.replace(/_exception$/,"");return i.some(a=>b===a||b.endsWith(`_${a}`))}),k=g.toLowerCase().slice(0,4e3),l=400===b||401===b||j||/\binvalid[_ -]?grant\b/.test(k)||/\brefresh token\b.{0,60}\b(?:expired|invalid|revoked|reused|disabled)\b/.test(k)||/\b(?:expired|invalid|revoked|reused|disabled)\b.{0,60}\brefresh token\b/.test(k);return{status:b,code:f,permanent:l}}(b,a.status);c?.error?.("TOKEN_REFRESH",`Kiro ${d} refresh failed`,{status:a.status,code:e.code,permanent:e.permanent});let f=Error(e.permanent?"Kiro refresh credential rejected":"Kiro refresh temporarily unavailable");throw f.name=e.permanent?"KiroRefreshCredentialError":"KiroRefreshTransientError",f.status=a.status,f.code=e.code,f.permanent=e.permanent,f}function B(a,b){a?.error?.("TOKEN_REFRESH",`Kiro ${b} refresh returned no access token`);let c=Error("Kiro refresh returned an invalid response");throw c.name="KiroRefreshTransientError",c.status=502,c.code="MISSING_ACCESS_TOKEN",c.permanent=!1,c}async function C(a,b){return a?o("codex",a,async()=>{try{let c=await fetch(e.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:d.xq.codex.clientId,grant_type:"refresh_token",refresh_token:a})});if(!c.ok){let a=await c.text();return x(a,c.status).permanent,z(a,c.status,b,"Codex")}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!f.access_token,hasNewRefreshToken:!!f.refresh_token,hasIdToken:!!f.id_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,idToken:f.id_token,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}},b):null}async function D(a,b,c,e=null,h=null){return a?o("kiro",a,async h=>{let i=b?.authMethod,j=b?.clientId,k=b?.clientSecret,l=b?.region;if("external_idp"===i){let d;try{d=(0,g.uo)(a,b)}catch(a){return c?.warn?.("TOKEN_REFRESH",`Kiro external IdP refresh rejected: ${a.message}`),null}let i=await (0,f.proxyAwareFetch)(d.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:d.body,signal:h},{...e,singleTransportAttempt:!0});if(!i.ok){let a=await i.text();return A(i,a,c,"external IdP")}let j=await i.json();return j?.access_token?{accessToken:j.access_token,refreshToken:j.refresh_token||a,expiresIn:j.expires_in,providerSpecificData:d.providerSpecificData}:B(c,"external IdP")}if(j&&k){let b="idc"===i&&l?`https://oidc.${l}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",d=await (0,f.proxyAwareFetch)(b,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:j,clientSecret:k,refreshToken:a,grantType:"refresh_token"}),signal:h},{...e,singleTransportAttempt:!0});if(!d.ok){let a=await d.text();return A(d,a,c,"AWS")}let g=await d.json();return g?.accessToken?(c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!g.accessToken,expiresIn:g.expiresIn}),{accessToken:g.accessToken,refreshToken:g.refreshToken||a,expiresIn:g.expiresIn}):B(c,"AWS")}let m=await (0,f.proxyAwareFetch)(d.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/2.12.2"},body:JSON.stringify({refreshToken:a}),signal:h},{...e,singleTransportAttempt:!0});if(!m.ok){let a=await m.text();return A(m,a,c,"social")}let n=await m.json();return n?.accessToken?(c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!n.accessToken,expiresIn:n.expiresIn}),{accessToken:n.accessToken,refreshToken:n.refreshToken||a,expiresIn:n.expiresIn}):B(c,"social")},c,h):null}async function E(a,b){return a?o("iflow",a,async()=>{let c=btoa(`${d.xq.iflow.clientId}:${d.xq.iflow.clientSecret}`),f=await fetch(e.NA.iflow.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${c}`},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.iflow.clientId,client_secret:d.xq.iflow.clientSecret})});if(!f.ok)return z(await f.text(),f.status,b,"iFlow");let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed iFlow token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}},b):null}async function F(a,b){return a?o("github",a,async()=>{let c={grant_type:"refresh_token",refresh_token:a,client_id:d.xq.github.clientId};d.xq.github.clientSecret&&(c.client_secret=d.xq.github.clientSecret);let f=await fetch(e.NA.github.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(c)});if(!f.ok)return z(await f.text(),f.status,b,"GitHub");let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed GitHub token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}},b):null}async function G(a,b){return a?o("copilot",a,async()=>{try{let c=await fetch("https://api.github.com/copilot_internal/v2/token",{headers:{Authorization:`token ${a}`,"User-Agent":e.x0.USER_AGENT,"Editor-Version":`vscode/${e.x0.VSCODE_VERSION}`,"Editor-Plugin-Version":`copilot-chat/${e.x0.COPILOT_CHAT_VERSION}`,Accept:"application/json","x-github-api-version":e.x0.API_VERSION}});if(!c.ok)return await c.body?.cancel?.().catch?.(()=>{}),b?.error?.("TOKEN_REFRESH","Copilot token refresh failed",{status:c.status}),null;let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!d.token,expiresAt:d.expires_at}),{token:d.token,expiresAt:d.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function H(a,b,c){if(!b.refreshToken)return null;switch(a){case"gemini-cli":case"antigravity":return u(b.refreshToken,d.xq[a].clientId,d.xq[a].clientSecret,c);case"claude":return t(b.refreshToken,c);case"codex":return C(b.refreshToken,c);case"qwen":return v(b.refreshToken,c);case"codebuddy":return w(b.refreshToken,c,"codebuddy");case"codebuddy-cn":return w(b.refreshToken,c,"codebuddy-cn");case"iflow":return E(b.refreshToken,c);case"github":return F(b.refreshToken,c);case"kiro":return D(b.refreshToken,b.providerSpecificData,c);case"xai":case"grok-cli":return j(b.refreshToken,c);case"vertex":case"vertex-partner":{let a=I(b.apiKey);if(!a)return null;return K(a,c)}default:return s(a,b.refreshToken,b,c)}}function I(a){if("string"!=typeof a)return null;try{let b=JSON.parse(a);if("service_account"===b.type&&b.client_email&&b.private_key&&b.project_id)return b;return null}catch{return null}}let J=new Map;async function K(a,b){let d=a.client_email,e=J.get(d);if(e&&e.expiresAt-Date.now()>3e5)return{accessToken:e.token,expiresAt:e.expiresAt};try{let{SignJWT:e,importPKCS8:f}=await Promise.all([c.e(6935),c.e(8971)]).then(c.bind(c,8971));b?.debug?.("TOKEN_REFRESH",`Vertex minting token for ${a.client_email}`);let g=await f(a.private_key.replace(/\\n/g,"\n"),"RS256"),h=Math.floor(Date.now()/1e3),i=await new e({scope:"https://www.googleapis.com/auth/cloud-platform"}).setProtectedHeader({alg:"RS256"}).setIssuer(a.client_email).setAudience("https://oauth2.googleapis.com/token").setIssuedAt(h).setExpirationTime(h+3600).sign(g),j=await fetch("https://oauth2.googleapis.com/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:i})});if(!j.ok){let a=await j.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:k,expires_in:l}=await j.json(),m=Date.now()+(l??3600)*1e3;return J.set(d,{token:k,expiresAt:m}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:k,expiresAt:m}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}async function L(a,b=3,c=null,d=null){let e=()=>{let a=Error("Request aborted");return a.name="AbortError",a},f=a=>d?d.aborted?Promise.reject(e()):new Promise((b,c)=>{let f,g=()=>{clearTimeout(f),d.removeEventListener("abort",g),c(e())};f=setTimeout(()=>{d.removeEventListener("abort",g),b()},a),d.addEventListener("abort",g,{once:!0})}):new Promise(b=>setTimeout(b,a));for(let g=0;g<b;g++){if(d?.aborted)throw e();if(g>0){let a=1e3*g;c?.debug?.("TOKEN_REFRESH",`Retry ${g}/${b} after ${a}ms`),await f(a)}try{let b=await a();if(p(b))throw q(b);if(b)return b}catch(a){if(d?.aborted||a?.name==="AbortError")throw e();if(a?.permanent===!0)throw a;c?.warn?.("TOKEN_REFRESH",`Attempt ${g+1}/${b} failed: ${a.message}`)}}return c?.error?.("TOKEN_REFRESH",`All ${b} retry attempts failed`),null}},18080:(a,b,c)=>{c.d(b,{Xj:()=>i,uo:()=>j});let d=new Set(["login.microsoftonline.com","login.microsoft.com","login.windows.net"]);function e(a){return"string"==typeof a?a.trim():""}function f(a){let b,c=e(a);if(!c)throw Error("token_endpoint is required");try{b=new URL(c)}catch{throw Error("token_endpoint must be a valid URL")}if("https:"!==b.protocol)throw Error("token_endpoint must use https");if(!d.has(b.hostname.toLowerCase()))throw Error("token_endpoint must be a Microsoft login endpoint");return b.toString()}function g(a){return Array.isArray(a)?a.map(e).filter(Boolean).join(" "):e(a)}function h(a){try{if(!a||"string"!=typeof a)return null;let b=a.split(".");if(3!==b.length)return null;let c=b[1].replace(/-/g,"+").replace(/_/g,"/"),d=(4-c.length%4)%4;return JSON.parse(Buffer.from(`${c}${"=".repeat(d)}`,"base64").toString("utf8"))}catch{return null}}function i(a){let b=a;if("string"==typeof b)try{b=JSON.parse(b)}catch{throw Error("CLIProxyAPI auth JSON is invalid")}if(!b||"object"!=typeof b)throw Error("CLIProxyAPI auth JSON is required");let c=e(b.auth_method||b.authMethod);if(c&&"external_idp"!==c)throw Error("Only external_idp Kiro auth is supported by this importer");let d=e(b.access_token||b.accessToken),i=e(b.refresh_token||b.refreshToken),j=e(b.client_id||b.clientId),k=f(b.token_endpoint||b.tokenEndpoint),l=e(b.profile_arn||b.profileArn),m=e(b.region)||"us-east-1",n=g(b.scopes||b.scope);if(!d)throw Error("access_token is required");if(!i)throw Error("refresh_token is required");if(!j)throw Error("client_id is required");if(!n)throw Error("scopes is required");if(!l)throw Error("profile_arn is required");let o=h(d),p=b.email||o?.email||o?.preferred_username||o?.upn||o?.sub||null;return{accessToken:d,refreshToken:i,expiresAt:function(a){let b=a.expired||a.expires_at||a.expiresAt;if(b){let a=new Date(b).getTime();if(Number.isFinite(a))return new Date(a).toISOString()}let c=Number(a.expires_in||a.expiresIn||0);if(Number.isFinite(c)&&c>0)return new Date(Date.now()+1e3*c).toISOString();let d=h(a.access_token||a.accessToken);return d?.exp?new Date(1e3*d.exp).toISOString():new Date(Date.now()+36e5).toISOString()}(b),email:p,providerSpecificData:{profileArn:l,region:m,authMethod:"external_idp",provider:"CLIProxyAPI",clientId:j,tokenEndpoint:k,scope:n}}}function j(a,b={}){let c=e(b.clientId||b.client_id),d=f(b.tokenEndpoint||b.token_endpoint),h=g(b.scope||b.scopes);if(!a)throw Error("refresh token is required");if(!c)throw Error("clientId is required for external_idp refresh");if(!h)throw Error("scope is required for external_idp refresh");return{tokenEndpoint:d,body:new URLSearchParams({grant_type:"refresh_token",client_id:c,refresh_token:a,scope:h}),providerSpecificData:{...b,authMethod:"external_idp",clientId:c,tokenEndpoint:d,scope:h}}}}};