@danhachuel/thunderbolt 0.3.91 → 0.3.92

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.
package/app/main.py CHANGED
@@ -47,7 +47,7 @@ from hermes_ui.notifications import clear_notifications, list_notifications, mar
47
47
  from hermes_ui.influencers import BACKEND_OPTIONS, DOCUMENT_EXTENSIONS, IMAGE_EXTENSIONS, backend_name, backend_status, get_repository, test_backend
48
48
  from hermes_ui.logs import list_logs, logs_to_rows
49
49
  from hermes_ui.languages import LANGUAGE_CODES, VIDEO_LANGUAGE_CODES, LANGUAGE_FLAG_DATA_URIS, language_code, language_label, ui_language_menu_label, ui_text, video_language_label, video_language_options
50
- from hermes_ui.api_key_tests import test_apify_credentials, test_influencer_database, test_kaggle_credentials, test_material_source_credentials, test_media_provider_card, test_nano_banana_credentials, test_postiz_credentials, test_telegram_credentials, test_tiktok_credentials, test_upload_post_credentials, test_voice_provider
50
+ from hermes_ui.api_key_tests import test_apify_credentials, test_influencer_database, test_innertube_api_key, test_kaggle_credentials, test_material_source_credentials, test_media_provider_card, test_nano_banana_credentials, test_postiz_credentials, test_telegram_credentials, test_tiktok_credentials, test_upload_post_credentials, test_voice_provider
51
51
  from hermes_ui.tutorials import tutorial_body, tutorial_caption, tutorial_title
52
52
 
53
53
  from hermes_ui.script_documents import list_script_documents, read_script_document, save_script_document, script_storage_path
@@ -5204,6 +5204,12 @@ def render_google_accounts():
5204
5204
  key="global_innertube_api_key",
5205
5205
  help="Chave global usada pelo Upload directo para todas as contas Google/YouTube. Guarde-a na configuração global, separada dos documentos de cookies.",
5206
5206
  )
5207
+ _render_api_test_control(
5208
+ settings,
5209
+ "innertube",
5210
+ lambda: test_innertube_api_key(innertube_api_key_value),
5211
+ widget_key="api_test_innertube",
5212
+ )
5207
5213
  save_innertube_api_key = st.form_submit_button("Guardar INNERTUBE_API_KEY global", type="primary", use_container_width=True)
5208
5214
  if save_innertube_api_key:
5209
5215
  settings["direct_innertube_api_key"] = innertube_api_key_value.strip()
@@ -95,6 +95,24 @@ def test_apify_credentials(api_token: str) -> dict[str, Any]:
95
95
  return _get(f"{APIFY_API_BASE}/users/me", headers={"Authorization": f"Bearer {api_token}"})
96
96
 
97
97
 
98
+ def test_innertube_api_key(api_key: str) -> dict[str, Any]:
99
+ """Validate a global InnerTube key with a public, read-only guide request."""
100
+ api_key = str(api_key or "").strip()
101
+ if not api_key:
102
+ return _missing("Introduza a INNERTUBE_API_KEY antes de testar.")
103
+ return _post(
104
+ f"https://www.youtube.com/youtubei/v1/guide?key={quote(api_key, safe='')}",
105
+ json={
106
+ "context": {
107
+ "client": {
108
+ "clientName": "WEB",
109
+ "clientVersion": "2.20250305.01.00",
110
+ }
111
+ }
112
+ },
113
+ )
114
+
115
+
98
116
  def test_nano_banana_credentials(api_key: str, model: str) -> dict[str, Any]:
99
117
  """Validate the configured Gemini image model metadata without generating an image."""
100
118
  api_key = str(api_key or "").strip()
@@ -307,6 +325,7 @@ __all__ = [
307
325
  "test_apify_credentials",
308
326
  "test_azure_speech_credentials",
309
327
  "test_elevenlabs_credentials",
328
+ "test_innertube_api_key",
310
329
  "test_kaggle_credentials",
311
330
  "test_influencer_database",
312
331
  "test_material_source_credentials",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danhachuel/thunderbolt",
3
- "version": "0.3.91",
3
+ "version": "0.3.92",
4
4
  "description": "Thunderbolt — interface local para operação de canais faceless e motor MoneyPrinterTurbo",
5
5
  "license": "MIT",
6
6
  "main": "scripts/cli.mjs",