Spaces:
Running
Running
Joseph Pollack
commited on
Commit
·
90aae85
1
Parent(s):
f173aad
fix spaces config and ci and hf oauth
Browse files- .github/scripts/deploy_to_hf_space.py +93 -3
- README.md +8 -1
- dev/__init__.py +1 -0
- docs/LICENSE.md +3 -0
- src/app.py +37 -2
- src/tools/searchxng_web_search.py +1 -0
- src/tools/serper_web_search.py +1 -0
- src/tools/vendored/crawl_website.py +1 -0
- src/tools/vendored/searchxng_client.py +1 -0
- src/tools/vendored/serper_client.py +1 -0
- src/tools/vendored/web_search_core.py +1 -0
- src/tools/web_search_factory.py +1 -0
- src/utils/markdown.css +1 -0
- src/utils/md_to_pdf.py +1 -0
- src/utils/message_history.py +1 -0
- src/utils/report_generator.py +1 -0
- tests/unit/middleware/test_budget_tracker_phase7.py +1 -0
- tests/unit/middleware/test_workflow_manager.py +1 -0
.github/scripts/deploy_to_hf_space.py
CHANGED
|
@@ -3,6 +3,7 @@
|
|
| 3 |
import os
|
| 4 |
import shutil
|
| 5 |
import subprocess
|
|
|
|
| 6 |
from pathlib import Path
|
| 7 |
from typing import Set
|
| 8 |
|
|
@@ -48,7 +49,6 @@ def get_excluded_files() -> Set[str]:
|
|
| 48 |
"mkdocs.yml",
|
| 49 |
"uv.lock",
|
| 50 |
"AGENTS.txt",
|
| 51 |
-
"CONTRIBUTING.md",
|
| 52 |
".env",
|
| 53 |
".env.local",
|
| 54 |
"*.local",
|
|
@@ -147,8 +147,36 @@ def deploy_to_hf_space() -> None:
|
|
| 147 |
)
|
| 148 |
print(f"✅ Created new Space: {repo_id}")
|
| 149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
# Clone repository using git
|
| 151 |
-
|
|
|
|
| 152 |
|
| 153 |
if Path(local_dir).exists():
|
| 154 |
print(f"🧹 Removing existing {local_dir} directory...")
|
|
@@ -163,10 +191,58 @@ def deploy_to_hf_space() -> None:
|
|
| 163 |
text=True,
|
| 164 |
)
|
| 165 |
print(f"✅ Cloned Space repository")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
except subprocess.CalledProcessError as e:
|
| 167 |
error_msg = e.stderr if e.stderr else e.stdout if e.stdout else "Unknown error"
|
| 168 |
print(f"❌ Failed to clone Space repository: {error_msg}")
|
| 169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
|
| 171 |
# Get exclusion sets
|
| 172 |
excluded_dirs = get_excluded_dirs()
|
|
@@ -266,6 +342,12 @@ def deploy_to_hf_space() -> None:
|
|
| 266 |
capture_output=True,
|
| 267 |
)
|
| 268 |
print("📤 Pushing to Hugging Face Space...")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 269 |
subprocess.run(
|
| 270 |
["git", "push"],
|
| 271 |
check=True,
|
|
@@ -286,6 +368,14 @@ def deploy_to_hf_space() -> None:
|
|
| 286 |
finally:
|
| 287 |
# Return to original directory
|
| 288 |
os.chdir(original_cwd)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 289 |
|
| 290 |
print(f"🎉 Successfully deployed to: https://huggingface.co/spaces/{repo_id}")
|
| 291 |
|
|
|
|
| 3 |
import os
|
| 4 |
import shutil
|
| 5 |
import subprocess
|
| 6 |
+
import tempfile
|
| 7 |
from pathlib import Path
|
| 8 |
from typing import Set
|
| 9 |
|
|
|
|
| 49 |
"mkdocs.yml",
|
| 50 |
"uv.lock",
|
| 51 |
"AGENTS.txt",
|
|
|
|
| 52 |
".env",
|
| 53 |
".env.local",
|
| 54 |
"*.local",
|
|
|
|
| 147 |
)
|
| 148 |
print(f"✅ Created new Space: {repo_id}")
|
| 149 |
|
| 150 |
+
# Configure Git credential helper for authentication
|
| 151 |
+
# This is needed for Git LFS to work properly with fine-grained tokens
|
| 152 |
+
print("🔐 Configuring Git credentials...")
|
| 153 |
+
|
| 154 |
+
# Use Git credential store to store the token
|
| 155 |
+
# This allows Git LFS to authenticate properly
|
| 156 |
+
temp_dir = Path(tempfile.gettempdir())
|
| 157 |
+
credential_store = temp_dir / ".git-credentials-hf"
|
| 158 |
+
|
| 159 |
+
# Write credentials in the format: https://username:token@huggingface.co
|
| 160 |
+
credential_store.write_text(f"https://{hf_username}:{hf_token}@huggingface.co\n", encoding="utf-8")
|
| 161 |
+
try:
|
| 162 |
+
credential_store.chmod(0o600) # Secure permissions (Unix only)
|
| 163 |
+
except OSError:
|
| 164 |
+
# Windows doesn't support chmod, skip
|
| 165 |
+
pass
|
| 166 |
+
|
| 167 |
+
# Configure Git to use the credential store
|
| 168 |
+
subprocess.run(
|
| 169 |
+
["git", "config", "--global", "credential.helper", f"store --file={credential_store}"],
|
| 170 |
+
check=True,
|
| 171 |
+
capture_output=True,
|
| 172 |
+
)
|
| 173 |
+
|
| 174 |
+
# Also set environment variable for Git LFS
|
| 175 |
+
os.environ["GIT_CREDENTIAL_HELPER"] = f"store --file={credential_store}"
|
| 176 |
+
|
| 177 |
# Clone repository using git
|
| 178 |
+
# Use the token in the URL for initial clone, but LFS will use credential store
|
| 179 |
+
space_url = f"https://{hf_username}:{hf_token}@huggingface.co/spaces/{repo_id}"
|
| 180 |
|
| 181 |
if Path(local_dir).exists():
|
| 182 |
print(f"🧹 Removing existing {local_dir} directory...")
|
|
|
|
| 191 |
text=True,
|
| 192 |
)
|
| 193 |
print(f"✅ Cloned Space repository")
|
| 194 |
+
|
| 195 |
+
# After clone, configure the remote to use credential helper
|
| 196 |
+
# This ensures future operations (like push) use the credential store
|
| 197 |
+
os.chdir(local_dir)
|
| 198 |
+
subprocess.run(
|
| 199 |
+
["git", "remote", "set-url", "origin", f"https://huggingface.co/spaces/{repo_id}"],
|
| 200 |
+
check=True,
|
| 201 |
+
capture_output=True,
|
| 202 |
+
)
|
| 203 |
+
os.chdir("..")
|
| 204 |
+
|
| 205 |
except subprocess.CalledProcessError as e:
|
| 206 |
error_msg = e.stderr if e.stderr else e.stdout if e.stdout else "Unknown error"
|
| 207 |
print(f"❌ Failed to clone Space repository: {error_msg}")
|
| 208 |
+
|
| 209 |
+
# Try alternative: clone with LFS skip, then fetch LFS files separately
|
| 210 |
+
print("🔄 Trying alternative clone method (skip LFS during clone)...")
|
| 211 |
+
try:
|
| 212 |
+
env = os.environ.copy()
|
| 213 |
+
env["GIT_LFS_SKIP_SMUDGE"] = "1" # Skip LFS during clone
|
| 214 |
+
|
| 215 |
+
subprocess.run(
|
| 216 |
+
["git", "clone", space_url, local_dir],
|
| 217 |
+
check=True,
|
| 218 |
+
capture_output=True,
|
| 219 |
+
text=True,
|
| 220 |
+
env=env,
|
| 221 |
+
)
|
| 222 |
+
print(f"✅ Cloned Space repository (LFS skipped)")
|
| 223 |
+
|
| 224 |
+
# Configure remote
|
| 225 |
+
os.chdir(local_dir)
|
| 226 |
+
subprocess.run(
|
| 227 |
+
["git", "remote", "set-url", "origin", f"https://huggingface.co/spaces/{repo_id}"],
|
| 228 |
+
check=True,
|
| 229 |
+
capture_output=True,
|
| 230 |
+
)
|
| 231 |
+
|
| 232 |
+
# Try to fetch LFS files with proper authentication
|
| 233 |
+
print("📥 Fetching LFS files...")
|
| 234 |
+
subprocess.run(
|
| 235 |
+
["git", "lfs", "pull"],
|
| 236 |
+
check=False, # Don't fail if LFS pull fails - we'll continue without LFS files
|
| 237 |
+
capture_output=True,
|
| 238 |
+
text=True,
|
| 239 |
+
)
|
| 240 |
+
os.chdir("..")
|
| 241 |
+
print(f"✅ Repository cloned (LFS files may be incomplete, but deployment can continue)")
|
| 242 |
+
except subprocess.CalledProcessError as e2:
|
| 243 |
+
error_msg2 = e2.stderr if e2.stderr else e2.stdout if e2.stdout else "Unknown error"
|
| 244 |
+
print(f"❌ Alternative clone method also failed: {error_msg2}")
|
| 245 |
+
raise RuntimeError(f"Git clone failed: {error_msg}") from e
|
| 246 |
|
| 247 |
# Get exclusion sets
|
| 248 |
excluded_dirs = get_excluded_dirs()
|
|
|
|
| 342 |
capture_output=True,
|
| 343 |
)
|
| 344 |
print("📤 Pushing to Hugging Face Space...")
|
| 345 |
+
# Ensure remote URL uses credential helper (not token in URL)
|
| 346 |
+
subprocess.run(
|
| 347 |
+
["git", "remote", "set-url", "origin", f"https://huggingface.co/spaces/{repo_id}"],
|
| 348 |
+
check=True,
|
| 349 |
+
capture_output=True,
|
| 350 |
+
)
|
| 351 |
subprocess.run(
|
| 352 |
["git", "push"],
|
| 353 |
check=True,
|
|
|
|
| 368 |
finally:
|
| 369 |
# Return to original directory
|
| 370 |
os.chdir(original_cwd)
|
| 371 |
+
|
| 372 |
+
# Clean up credential store for security
|
| 373 |
+
try:
|
| 374 |
+
if credential_store.exists():
|
| 375 |
+
credential_store.unlink()
|
| 376 |
+
except Exception:
|
| 377 |
+
# Ignore cleanup errors
|
| 378 |
+
pass
|
| 379 |
|
| 380 |
print(f"🎉 Successfully deployed to: https://huggingface.co/spaces/{repo_id}")
|
| 381 |
|
README.md
CHANGED
|
@@ -10,7 +10,14 @@ app_file: src/app.py
|
|
| 10 |
hf_oauth: true
|
| 11 |
hf_oauth_expiration_minutes: 480
|
| 12 |
hf_oauth_scopes:
|
| 13 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
pinned: true
|
| 15 |
license: mit
|
| 16 |
tags:
|
|
|
|
| 10 |
hf_oauth: true
|
| 11 |
hf_oauth_expiration_minutes: 480
|
| 12 |
hf_oauth_scopes:
|
| 13 |
+
# Required for HuggingFace Inference API (includes all third-party providers)
|
| 14 |
+
# This scope grants access to:
|
| 15 |
+
# - HuggingFace's own Inference API
|
| 16 |
+
# - Third-party inference providers (nebius, together, scaleway, hyperbolic, novita, nscale, sambanova, ovh, fireworks, etc.)
|
| 17 |
+
# - All models available through the Inference Providers API
|
| 18 |
+
- inference-api
|
| 19 |
+
# Optional: Uncomment if you need to access user's billing information
|
| 20 |
+
# - read-billing
|
| 21 |
pinned: true
|
| 22 |
license: mit
|
| 23 |
tags:
|
dev/__init__.py
CHANGED
|
@@ -7,3 +7,4 @@
|
|
| 7 |
|
| 8 |
|
| 9 |
|
|
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
+
|
docs/LICENSE.md
CHANGED
|
@@ -26,3 +26,6 @@ SOFTWARE.
|
|
| 26 |
|
| 27 |
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
|
src/app.py
CHANGED
|
@@ -110,11 +110,29 @@ def configure_orchestrator(
|
|
| 110 |
# 2. API Key (OAuth or Env) - HuggingFace only (OAuth provides HF token)
|
| 111 |
# Priority: oauth_token > env vars
|
| 112 |
# On HuggingFace Spaces, OAuth token is available via request.oauth_token
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
effective_api_key = oauth_token or os.getenv("HF_TOKEN") or os.getenv("HUGGINGFACE_API_KEY")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
|
| 115 |
if effective_api_key:
|
| 116 |
# We have an API key (OAuth or env) - use pydantic-ai with JudgeHandler
|
| 117 |
-
# This uses HuggingFace
|
|
|
|
| 118 |
model: Any | None = None
|
| 119 |
# Use selected model or fall back to env var/settings
|
| 120 |
model_name = (
|
|
@@ -132,6 +150,7 @@ def configure_orchestrator(
|
|
| 132 |
# Per https://ai.pydantic.dev/models/huggingface/#configure-the-provider
|
| 133 |
# HuggingFaceProvider accepts api_key parameter directly
|
| 134 |
# This is consistent with usage in src/utils/llm_factory.py and src/agent_factory/judges.py
|
|
|
|
| 135 |
provider = HuggingFaceProvider(api_key=effective_api_key) # type: ignore[misc]
|
| 136 |
model = HuggingFaceModel(model_name, provider=provider) # type: ignore[misc]
|
| 137 |
backend_info = "API (HuggingFace OAuth)" if oauth_token else "API (Env Config)"
|
|
@@ -599,11 +618,14 @@ async def research_agent(
|
|
| 599 |
# OAuthToken has a .token attribute containing the access token
|
| 600 |
if hasattr(oauth_token, "token"):
|
| 601 |
token_value = oauth_token.token
|
|
|
|
| 602 |
elif isinstance(oauth_token, str):
|
| 603 |
# Handle case where oauth_token is already a string (shouldn't happen but defensive)
|
| 604 |
token_value = oauth_token
|
|
|
|
| 605 |
else:
|
| 606 |
token_value = None
|
|
|
|
| 607 |
|
| 608 |
if oauth_profile is not None:
|
| 609 |
# OAuthProfile has .username, .name, .profile_image attributes
|
|
@@ -616,6 +638,8 @@ async def research_agent(
|
|
| 616 |
else None
|
| 617 |
)
|
| 618 |
)
|
|
|
|
|
|
|
| 619 |
|
| 620 |
# Check if user is logged in (OAuth token or env var)
|
| 621 |
# Fallback to env vars for local development or Spaces with HF_TOKEN secret
|
|
@@ -695,10 +719,21 @@ async def research_agent(
|
|
| 695 |
model_id = hf_model if hf_model and hf_model.strip() else None
|
| 696 |
provider_name = hf_provider if hf_provider and hf_provider.strip() else None
|
| 697 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 698 |
orchestrator, backend_name = configure_orchestrator(
|
| 699 |
use_mock=False, # Never use mock in production - HF Inference is the free fallback
|
| 700 |
mode=effective_mode,
|
| 701 |
-
oauth_token=token_value, # Use extracted token value
|
| 702 |
hf_model=model_id, # None will use defaults in configure_orchestrator
|
| 703 |
hf_provider=provider_name, # None will use defaults in configure_orchestrator
|
| 704 |
graph_mode=graph_mode if graph_mode else None,
|
|
|
|
| 110 |
# 2. API Key (OAuth or Env) - HuggingFace only (OAuth provides HF token)
|
| 111 |
# Priority: oauth_token > env vars
|
| 112 |
# On HuggingFace Spaces, OAuth token is available via request.oauth_token
|
| 113 |
+
#
|
| 114 |
+
# OAuth Scope Requirements:
|
| 115 |
+
# - 'inference-api': Required for HuggingFace Inference API access
|
| 116 |
+
# This scope grants access to:
|
| 117 |
+
# * HuggingFace's own Inference API
|
| 118 |
+
# * All third-party inference providers (nebius, together, scaleway, hyperbolic, novita, nscale, sambanova, ovh, fireworks, etc.)
|
| 119 |
+
# * All models available through the Inference Providers API
|
| 120 |
+
# See: https://huggingface.co/docs/hub/oauth#currently-supported-scopes
|
| 121 |
+
#
|
| 122 |
+
# Note: The hf_provider parameter is accepted but not used here because HuggingFaceProvider
|
| 123 |
+
# from pydantic-ai doesn't support provider selection. Provider selection happens at the
|
| 124 |
+
# InferenceClient level (used in HuggingFaceChatClient for advanced mode).
|
| 125 |
effective_api_key = oauth_token or os.getenv("HF_TOKEN") or os.getenv("HUGGINGFACE_API_KEY")
|
| 126 |
+
|
| 127 |
+
# Log which authentication source is being used
|
| 128 |
+
if effective_api_key:
|
| 129 |
+
auth_source = "OAuth token" if oauth_token else ("HF_TOKEN env var" if os.getenv("HF_TOKEN") else "HUGGINGFACE_API_KEY env var")
|
| 130 |
+
logger.info("Using HuggingFace authentication", source=auth_source, has_token=bool(effective_api_key))
|
| 131 |
|
| 132 |
if effective_api_key:
|
| 133 |
# We have an API key (OAuth or env) - use pydantic-ai with JudgeHandler
|
| 134 |
+
# This uses HuggingFace Inference API, which includes access to all third-party providers
|
| 135 |
+
# via the Inference Providers API (router.huggingface.co)
|
| 136 |
model: Any | None = None
|
| 137 |
# Use selected model or fall back to env var/settings
|
| 138 |
model_name = (
|
|
|
|
| 150 |
# Per https://ai.pydantic.dev/models/huggingface/#configure-the-provider
|
| 151 |
# HuggingFaceProvider accepts api_key parameter directly
|
| 152 |
# This is consistent with usage in src/utils/llm_factory.py and src/agent_factory/judges.py
|
| 153 |
+
# The OAuth token with 'inference-api' scope provides access to all inference providers
|
| 154 |
provider = HuggingFaceProvider(api_key=effective_api_key) # type: ignore[misc]
|
| 155 |
model = HuggingFaceModel(model_name, provider=provider) # type: ignore[misc]
|
| 156 |
backend_info = "API (HuggingFace OAuth)" if oauth_token else "API (Env Config)"
|
|
|
|
| 618 |
# OAuthToken has a .token attribute containing the access token
|
| 619 |
if hasattr(oauth_token, "token"):
|
| 620 |
token_value = oauth_token.token
|
| 621 |
+
logger.debug("OAuth token extracted from oauth_token.token attribute")
|
| 622 |
elif isinstance(oauth_token, str):
|
| 623 |
# Handle case where oauth_token is already a string (shouldn't happen but defensive)
|
| 624 |
token_value = oauth_token
|
| 625 |
+
logger.debug("OAuth token extracted as string")
|
| 626 |
else:
|
| 627 |
token_value = None
|
| 628 |
+
logger.warning("OAuth token object present but token extraction failed", oauth_token_type=type(oauth_token).__name__)
|
| 629 |
|
| 630 |
if oauth_profile is not None:
|
| 631 |
# OAuthProfile has .username, .name, .profile_image attributes
|
|
|
|
| 638 |
else None
|
| 639 |
)
|
| 640 |
)
|
| 641 |
+
if username:
|
| 642 |
+
logger.info("OAuth user authenticated", username=username)
|
| 643 |
|
| 644 |
# Check if user is logged in (OAuth token or env var)
|
| 645 |
# Fallback to env vars for local development or Spaces with HF_TOKEN secret
|
|
|
|
| 719 |
model_id = hf_model if hf_model and hf_model.strip() else None
|
| 720 |
provider_name = hf_provider if hf_provider and hf_provider.strip() else None
|
| 721 |
|
| 722 |
+
# Log authentication source for debugging
|
| 723 |
+
auth_source = "OAuth" if token_value else ("Env (HF_TOKEN)" if os.getenv("HF_TOKEN") else ("Env (HUGGINGFACE_API_KEY)" if os.getenv("HUGGINGFACE_API_KEY") else "None"))
|
| 724 |
+
logger.info(
|
| 725 |
+
"Configuring orchestrator",
|
| 726 |
+
mode=effective_mode,
|
| 727 |
+
auth_source=auth_source,
|
| 728 |
+
has_oauth_token=bool(token_value),
|
| 729 |
+
model=model_id or "default",
|
| 730 |
+
provider=provider_name or "auto",
|
| 731 |
+
)
|
| 732 |
+
|
| 733 |
orchestrator, backend_name = configure_orchestrator(
|
| 734 |
use_mock=False, # Never use mock in production - HF Inference is the free fallback
|
| 735 |
mode=effective_mode,
|
| 736 |
+
oauth_token=token_value, # Use extracted token value - passed to all agents and services
|
| 737 |
hf_model=model_id, # None will use defaults in configure_orchestrator
|
| 738 |
hf_provider=provider_name, # None will use defaults in configure_orchestrator
|
| 739 |
graph_mode=graph_mode if graph_mode else None,
|
src/tools/searchxng_web_search.py
CHANGED
|
@@ -126,3 +126,4 @@ class SearchXNGWebSearchTool:
|
|
| 126 |
|
| 127 |
|
| 128 |
|
|
|
|
|
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
+
|
src/tools/serper_web_search.py
CHANGED
|
@@ -126,3 +126,4 @@ class SerperWebSearchTool:
|
|
| 126 |
|
| 127 |
|
| 128 |
|
|
|
|
|
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
+
|
src/tools/vendored/crawl_website.py
CHANGED
|
@@ -138,3 +138,4 @@ async def crawl_website(starting_url: str) -> list[ScrapeResult] | str:
|
|
| 138 |
|
| 139 |
|
| 140 |
|
|
|
|
|
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
+
|
src/tools/vendored/searchxng_client.py
CHANGED
|
@@ -107,3 +107,4 @@ class SearchXNGClient:
|
|
| 107 |
|
| 108 |
|
| 109 |
|
|
|
|
|
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
+
|
src/tools/vendored/serper_client.py
CHANGED
|
@@ -103,3 +103,4 @@ class SerperClient:
|
|
| 103 |
|
| 104 |
|
| 105 |
|
|
|
|
|
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
+
|
src/tools/vendored/web_search_core.py
CHANGED
|
@@ -212,3 +212,4 @@ def is_valid_url(url: str) -> bool:
|
|
| 212 |
|
| 213 |
|
| 214 |
|
|
|
|
|
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
+
|
src/tools/web_search_factory.py
CHANGED
|
@@ -79,3 +79,4 @@ def create_web_search_tool() -> SearchTool | None:
|
|
| 79 |
|
| 80 |
|
| 81 |
|
|
|
|
|
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
+
|
src/utils/markdown.css
CHANGED
|
@@ -17,3 +17,4 @@ body {
|
|
| 17 |
|
| 18 |
|
| 19 |
|
|
|
|
|
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
+
|
src/utils/md_to_pdf.py
CHANGED
|
@@ -77,3 +77,4 @@ def md_to_pdf(md_text: str, pdf_file_path: str) -> None:
|
|
| 77 |
|
| 78 |
|
| 79 |
|
|
|
|
|
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
+
|
src/utils/message_history.py
CHANGED
|
@@ -170,3 +170,4 @@ def create_relevance_processor(min_length: int = 10):
|
|
| 170 |
|
| 171 |
|
| 172 |
|
|
|
|
|
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
+
|
src/utils/report_generator.py
CHANGED
|
@@ -180,3 +180,4 @@ def generate_report_from_evidence(
|
|
| 180 |
|
| 181 |
|
| 182 |
|
|
|
|
|
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
+
|
tests/unit/middleware/test_budget_tracker_phase7.py
CHANGED
|
@@ -163,3 +163,4 @@ class TestIterationTokenTracking:
|
|
| 163 |
|
| 164 |
|
| 165 |
|
|
|
|
|
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
+
|
tests/unit/middleware/test_workflow_manager.py
CHANGED
|
@@ -289,3 +289,4 @@ class TestWorkflowManager:
|
|
| 289 |
|
| 290 |
|
| 291 |
|
|
|
|
|
|
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
+
|