diff --git a/.gitattributes b/.gitattributes index ff0b7e751b7999399f2f1158d3445d77e4f90ab1..2ff740ec37b610125872ea958c50f373c41e0f1c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -35,3 +35,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text *tfevents* filter=lfs diff=lfs merge=lfs -text app/api/__pycache__/simulation.cpython-311.pyc filter=lfs diff=lfs merge=lfs -text app/services/__pycache__/report_agent.cpython-311.pyc filter=lfs diff=lfs merge=lfs -text +app/app/api/__pycache__/simulation.cpython-311.pyc filter=lfs diff=lfs merge=lfs -text +app/app/services/__pycache__/report_agent.cpython-311.pyc filter=lfs diff=lfs merge=lfs -text diff --git a/app/.dockerignore b/app/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..e10a9437b1261ecad811cdfbf7629586f337a402 --- /dev/null +++ b/app/.dockerignore @@ -0,0 +1,12 @@ +__pycache__ +*.py[cod] +*.egg-info +.eggs +.env +.venv +venv +uploads +*.log +.git +.gitignore +.pytest_cache diff --git a/app/.python-version b/app/.python-version new file mode 100644 index 0000000000000000000000000000000000000000..a9d3e48c99bf04c3acb0bf5558fe8b691e74d6d9 --- /dev/null +++ b/app/.python-version @@ -0,0 +1 @@ +3.11.9 diff --git a/app/.python-version.txt b/app/.python-version.txt new file mode 100644 index 0000000000000000000000000000000000000000..a9d3e48c99bf04c3acb0bf5558fe8b691e74d6d9 --- /dev/null +++ b/app/.python-version.txt @@ -0,0 +1 @@ +3.11.9 diff --git a/app/Dockerfile b/app/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..386a9a3ef25a7b2cecedd0aa06bc31ef86b244fd --- /dev/null +++ b/app/Dockerfile @@ -0,0 +1,20 @@ +# MiroFish API — Docker (Hugging Face Spaces, Fly, etc.) +# Build context must be this backend/ directory (contains app/, wsgi.py, requirements.txt). + +FROM python:3.11-slim-bookworm + +WORKDIR /app + +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + && rm -rf /var/lib/apt/lists/* + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +ENV PYTHONUNBUFFERED=1 +EXPOSE 7860 + +CMD gunicorn --bind "0.0.0.0:${PORT:-7860}" --workers 1 --threads 4 --timeout 600 --worker-tmp-dir /dev/shm wsgi:app diff --git a/app/HUGGINGFACE_SPACE.md b/app/HUGGINGFACE_SPACE.md new file mode 100644 index 0000000000000000000000000000000000000000..13dffcf3ecadb82648d18614b3a9ef41c5e1377d --- /dev/null +++ b/app/HUGGINGFACE_SPACE.md @@ -0,0 +1,50 @@ +# Hugging Face Spaces — MiroFish API (Docker) + +## Create the Space + +1. [huggingface.co/spaces](https://huggingface.co/spaces) → **Create new Space** +2. **SDK**: **Docker** +3. **Hardware**: CPU (free) — long simulations may OOM or time out; upgrade if needed. +4. Connect this repo and set the Docker **app directory** to **`backend`** (or copy only `backend/` into a dedicated repo). + +### Visibility must be **Public** (important) + +If the Space is **Private**, browsers and your static site get **`401` with body `unauthorized`** (plain text) **before** the request reaches Flask. +Open **Space → Settings → Visibility** and set **Public** so `https://YOUR-SPACE.hf.space/api/...` works without a Hugging Face login cookie. + +Build context = folder that contains `Dockerfile`, `requirements.txt`, `app/`, `wsgi.py`. + +## Secrets (Space → Settings → Variables and secrets) + +| Variable | Notes | +|----------|--------| +| `SECRET_KEY` | Long random string (Flask). | +| `LLM_API_KEY`, `LLM_BASE_URL`, `LLM_MODEL_NAME` | Your LLM. | +| `ZEP_API_KEY` | Zep. | +| `SUPABASE_URL` | `https://xxx.supabase.co` | +| `SUPABASE_SERVICE_ROLE_KEY` | Service role (never expose to browser). | +| `PIPELINE_CLIENT_SECRET` | **Same** as website `VITE_PIPELINE_CLIENT_SECRET`. | +| `SUPABASE_REPORTS_BUCKET` | Default `reports`. | +| `PIPELINE_MAX_ROUNDS` | Optional integer cap. | + +Optional: `SUPABASE_JWT_SECRET` if you use Supabase Auth JWT on the pipeline. + +## Website (`website/.env`) + +```env +VITE_API_BASE_URLS=https://YOUR-SPACE.hf.space +VITE_PIPELINE_CLIENT_SECRET=same-as-PIPELINE_CLIENT_SECRET +VITE_SUPABASE_URL=https://xxx.supabase.co +VITE_SUPABASE_ANON_KEY=your_anon_key +``` + +Login/sign-up use **Supabase** on `public."User"` — run `supabase/grants_public_user.sql` in the SQL editor. + +## Free tier notes + +- Space **sleeps** when idle; first request is a cold start. +- Proxies may **time out** on very long HTTP requests; heavy pipelines may need paid hardware or another host. + +## Health check + +`GET /health` → `{"status":"ok",...}` diff --git a/app/Procfile b/app/Procfile new file mode 100644 index 0000000000000000000000000000000000000000..ad43792d8f2b0bed8befb23a6502945d8f41ed28 --- /dev/null +++ b/app/Procfile @@ -0,0 +1 @@ +web: gunicorn --bind 0.0.0.0:$PORT --workers 1 --threads 8 --timeout 600 wsgi:app diff --git a/app/app/__init__.py b/app/app/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d140168fad6532039c807e34b838241afe9835c --- /dev/null +++ b/app/app/__init__.py @@ -0,0 +1,108 @@ +""" +MiroFish Backend - Flask应用工厂 +""" + +import os +import warnings + +# 抑制 multiprocessing resource_tracker 的警告(来自第三方库如 transformers) +# 需要在所有其他导入之前设置 +warnings.filterwarnings("ignore", message=".*resource_tracker.*") + +from flask import Flask, request +from flask_cors import CORS + +from .config import Config +from .services.supabase_jobs import sync_enabled as supabase_sync_enabled +from .utils.logger import setup_logger, get_logger + + +def create_app(config_class=Config): + """Flask应用工厂函数""" + app = Flask(__name__) + app.config.from_object(config_class) + + # 设置JSON编码:确保中文直接显示(而不是 \uXXXX 格式) + # Flask >= 2.3 使用 app.json.ensure_ascii,旧版本使用 JSON_AS_ASCII 配置 + if hasattr(app, 'json') and hasattr(app.json, 'ensure_ascii'): + app.json.ensure_ascii = False + + # 设置日志 + logger = setup_logger('mirofish') + + # 只在 reloader 子进程中打印启动信息(避免 debug 模式下打印两次) + is_reloader_process = os.environ.get('WERKZEUG_RUN_MAIN') == 'true' + debug_mode = app.config.get('DEBUG', False) + should_log_startup = not debug_mode or is_reloader_process + + if should_log_startup: + logger.info("=" * 50) + logger.info("MiroFish Backend 启动中...") + logger.info("=" * 50) + + # CORS: allow custom pipeline auth headers from static sites / other origins + CORS( + app, + resources={ + r"/api/*": { + "origins": "*", + "allow_headers": [ + "Content-Type", + "Authorization", + "X-Mirofish-User-Id", + "X-Pipeline-Client-Secret", + ], + } + }, + ) + + # 注册模拟进程清理函数(确保服务器关闭时终止所有模拟进程) + from .services.simulation_runner import SimulationRunner + SimulationRunner.register_cleanup() + if should_log_startup: + logger.info("已注册模拟进程清理函数") + + # 请求日志中间件 + @app.before_request + def log_request(): + logger = get_logger('mirofish.request') + logger.debug(f"请求: {request.method} {request.path}") + if request.content_type and 'json' in request.content_type: + logger.debug(f"请求体: {request.get_json(silent=True)}") + + @app.after_request + def log_response(response): + logger = get_logger('mirofish.request') + logger.debug(f"响应: {response.status_code}") + return response + + # 注册蓝图 + from .api import graph_bp, simulation_bp, report_bp, pipeline_bp, billing_bp + app.register_blueprint(graph_bp, url_prefix='/api/graph') + app.register_blueprint(simulation_bp, url_prefix='/api/simulation') + app.register_blueprint(report_bp, url_prefix='/api/report') + app.register_blueprint(pipeline_bp, url_prefix='/api/pipeline') + app.register_blueprint(billing_bp, url_prefix='/api/billing') + + # 健康检查 + @app.route('/health') + def health(): + return { + 'status': 'ok', + 'service': 'MiroFish Backend', + 'supabase_sync': supabase_sync_enabled(), + 'pipeline_client_secret_configured': bool((Config.PIPELINE_CLIENT_SECRET or '').strip()), + } + + if should_log_startup: + if supabase_sync_enabled(): + logger.info("Supabase cloud sync: ENABLED (simulation_runs + reports)") + else: + logger.warning( + "Supabase cloud sync: DISABLED — set SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY " + "so runs appear in Past simulations and in the database." + ) + logger.info("MiroFish Backend 启动完成") + + return app + diff --git a/app/app/__pycache__/__init__.cpython-311.pyc b/app/app/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bdf893d59746a19fe14fc6a71d8cc3f86d85a613 Binary files /dev/null and b/app/app/__pycache__/__init__.cpython-311.pyc differ diff --git a/app/app/__pycache__/config.cpython-311.pyc b/app/app/__pycache__/config.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6d3846a0b6286abf3fb72899d8505e38c13d35c8 Binary files /dev/null and b/app/app/__pycache__/config.cpython-311.pyc differ diff --git a/app/app/api/__init__.py b/app/app/api/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4f4c58bc86d1528fa2cc95355ccfaffac920c4c5 --- /dev/null +++ b/app/app/api/__init__.py @@ -0,0 +1,18 @@ +""" +API路由模块 +""" + +from flask import Blueprint + +graph_bp = Blueprint('graph', __name__) +simulation_bp = Blueprint('simulation', __name__) +report_bp = Blueprint('report', __name__) +pipeline_bp = Blueprint('pipeline', __name__) +billing_bp = Blueprint('billing', __name__) + +from . import graph # noqa: E402, F401 +from . import simulation # noqa: E402, F401 +from . import report # noqa: E402, F401 +from . import pipeline # noqa: E402, F401 +from . import billing # noqa: E402, F401 + diff --git a/app/app/api/__pycache__/__init__.cpython-311.pyc b/app/app/api/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..171d705f2de52451abaed4dc7a6cf069fc6ad56f Binary files /dev/null and b/app/app/api/__pycache__/__init__.cpython-311.pyc differ diff --git a/app/app/api/__pycache__/billing.cpython-311.pyc b/app/app/api/__pycache__/billing.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b9642f350dbc1e00885a2cceba6b46ae613237a8 Binary files /dev/null and b/app/app/api/__pycache__/billing.cpython-311.pyc differ diff --git a/app/app/api/__pycache__/graph.cpython-311.pyc b/app/app/api/__pycache__/graph.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f754abd6f4455d462c3e159dfa516c8f9820f2ba Binary files /dev/null and b/app/app/api/__pycache__/graph.cpython-311.pyc differ diff --git a/app/app/api/__pycache__/pipeline.cpython-311.pyc b/app/app/api/__pycache__/pipeline.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1af0a6b1d2148ae8e54a2c7fa18637e5b5d62d60 Binary files /dev/null and b/app/app/api/__pycache__/pipeline.cpython-311.pyc differ diff --git a/app/app/api/__pycache__/report.cpython-311.pyc b/app/app/api/__pycache__/report.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e4d2ce00aeda056a3a98622a5421fade7e1a4113 Binary files /dev/null and b/app/app/api/__pycache__/report.cpython-311.pyc differ diff --git a/app/app/api/__pycache__/simulation.cpython-311.pyc b/app/app/api/__pycache__/simulation.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ca1d433faabf963fec82614a4a69399c68c05d8b --- /dev/null +++ b/app/app/api/__pycache__/simulation.cpython-311.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9dce4de5fc345cab32a0ca7867868edae47884de3c0f667c0268cba30c6364d3 +size 108767 diff --git a/app/app/api/billing.py b/app/app/api/billing.py new file mode 100644 index 0000000000000000000000000000000000000000..ce44905d4f8b3fc3bf3c7f00cfa714ecee8b1db9 --- /dev/null +++ b/app/app/api/billing.py @@ -0,0 +1,82 @@ +"""Razorpay + coupon unlock for /api/pipeline/start.""" + +from flask import request, jsonify + +from . import billing_bp +from ..config import Config +from ..services import billing_service +from ..utils.logger import get_logger + +logger = get_logger("mirofish.api.billing") + + +@billing_bp.route("/status", methods=["GET"]) +def billing_status(): + if not Config.billing_enabled(): + return jsonify( + { + "success": True, + "data": { + "enabled": False, + "key_id": None, + "amount": None, + "currency": None, + }, + } + ) + data = { + "enabled": True, + "key_id": Config.RAZORPAY_KEY_ID or None, + "amount": Config.RAZORPAY_AMOUNT_PAISE if Config.RAZORPAY_KEY_SECRET else None, + "currency": Config.RAZORPAY_CURRENCY if Config.RAZORPAY_KEY_SECRET else None, + "coupons_enabled": bool(Config.payment_coupon_set()), + } + return jsonify({"success": True, "data": data}) + + +@billing_bp.route("/create-order", methods=["POST"]) +def billing_create_order(): + try: + if not (Config.RAZORPAY_KEY_ID and Config.RAZORPAY_KEY_SECRET): + return jsonify({"success": False, "error": "Razorpay is not configured"}), 503 + order = billing_service.create_razorpay_order() + return jsonify({"success": True, "data": order}) + except Exception as e: + logger.error("create-order: %s", e) + return jsonify({"success": False, "error": str(e)}), 500 + + +@billing_bp.route("/verify-payment", methods=["POST"]) +def billing_verify_payment(): + try: + if not (Config.RAZORPAY_KEY_ID and Config.RAZORPAY_KEY_SECRET): + return jsonify({"success": False, "error": "Razorpay is not configured"}), 503 + body = request.get_json(silent=True) or {} + oid = (body.get("razorpay_order_id") or "").strip() + pid = (body.get("razorpay_payment_id") or "").strip() + sig = (body.get("razorpay_signature") or "").strip() + if not oid or not pid or not sig: + return jsonify({"success": False, "error": "Missing payment fields"}), 400 + if not billing_service.verify_razorpay_payment_signature(oid, pid, sig): + return jsonify({"success": False, "error": "Invalid payment signature"}), 400 + token = billing_service.issue_simulation_payment_token(via="razorpay") + return jsonify({"success": True, "data": {"simulation_payment_token": token}}) + except Exception as e: + logger.error("verify-payment: %s", e) + return jsonify({"success": False, "error": str(e)}), 500 + + +@billing_bp.route("/apply-coupon", methods=["POST"]) +def billing_apply_coupon(): + try: + if not Config.payment_coupon_set(): + return jsonify({"success": False, "error": "Coupons are not configured"}), 503 + body = request.get_json(silent=True) or {} + code = body.get("code") or body.get("coupon") or "" + if not billing_service.coupon_valid(str(code)): + return jsonify({"success": False, "error": "Invalid coupon code"}), 400 + token = billing_service.issue_simulation_payment_token(via="coupon") + return jsonify({"success": True, "data": {"simulation_payment_token": token}}) + except Exception as e: + logger.error("apply-coupon: %s", e) + return jsonify({"success": False, "error": str(e)}), 500 diff --git a/app/app/api/graph.py b/app/app/api/graph.py new file mode 100644 index 0000000000000000000000000000000000000000..12ff1ba2daeaaea0abbfe3cf9b21cae7a269a946 --- /dev/null +++ b/app/app/api/graph.py @@ -0,0 +1,617 @@ +""" +图谱相关API路由 +采用项目上下文机制,服务端持久化状态 +""" + +import os +import traceback +import threading +from flask import request, jsonify + +from . import graph_bp +from ..config import Config +from ..services.ontology_generator import OntologyGenerator +from ..services.graph_builder import GraphBuilderService +from ..services.text_processor import TextProcessor +from ..utils.file_parser import FileParser +from ..utils.logger import get_logger +from ..models.task import TaskManager, TaskStatus +from ..models.project import ProjectManager, ProjectStatus + +# 获取日志器 +logger = get_logger('mirofish.api') + + +def allowed_file(filename: str) -> bool: + """检查文件扩展名是否允许""" + if not filename or '.' not in filename: + return False + ext = os.path.splitext(filename)[1].lower().lstrip('.') + return ext in Config.ALLOWED_EXTENSIONS + + +# ============== 项目管理接口 ============== + +@graph_bp.route('/project/', methods=['GET']) +def get_project(project_id: str): + """ + 获取项目详情 + """ + project = ProjectManager.get_project(project_id) + + if not project: + return jsonify({ + "success": False, + "error": f"项目不存在: {project_id}" + }), 404 + + return jsonify({ + "success": True, + "data": project.to_dict() + }) + + +@graph_bp.route('/project/list', methods=['GET']) +def list_projects(): + """ + 列出所有项目 + """ + limit = request.args.get('limit', 50, type=int) + projects = ProjectManager.list_projects(limit=limit) + + return jsonify({ + "success": True, + "data": [p.to_dict() for p in projects], + "count": len(projects) + }) + + +@graph_bp.route('/project/', methods=['DELETE']) +def delete_project(project_id: str): + """ + 删除项目 + """ + success = ProjectManager.delete_project(project_id) + + if not success: + return jsonify({ + "success": False, + "error": f"项目不存在或删除失败: {project_id}" + }), 404 + + return jsonify({ + "success": True, + "message": f"项目已删除: {project_id}" + }) + + +@graph_bp.route('/project//reset', methods=['POST']) +def reset_project(project_id: str): + """ + 重置项目状态(用于重新构建图谱) + """ + project = ProjectManager.get_project(project_id) + + if not project: + return jsonify({ + "success": False, + "error": f"项目不存在: {project_id}" + }), 404 + + # 重置到本体已生成状态 + if project.ontology: + project.status = ProjectStatus.ONTOLOGY_GENERATED + else: + project.status = ProjectStatus.CREATED + + project.graph_id = None + project.graph_build_task_id = None + project.error = None + ProjectManager.save_project(project) + + return jsonify({ + "success": True, + "message": f"项目已重置: {project_id}", + "data": project.to_dict() + }) + + +# ============== 接口1:上传文件并生成本体 ============== + +@graph_bp.route('/ontology/generate', methods=['POST']) +def generate_ontology(): + """ + 接口1:上传文件,分析生成本体定义 + + 请求方式:multipart/form-data + + 参数: + files: 上传的文件(PDF/MD/TXT),可多个 + simulation_requirement: 模拟需求描述(必填) + project_name: 项目名称(可选) + additional_context: 额外说明(可选) + + 返回: + { + "success": true, + "data": { + "project_id": "proj_xxxx", + "ontology": { + "entity_types": [...], + "edge_types": [...], + "analysis_summary": "..." + }, + "files": [...], + "total_text_length": 12345 + } + } + """ + try: + logger.info("=== 开始生成本体定义 ===") + + # 获取参数 + simulation_requirement = request.form.get('simulation_requirement', '') + project_name = request.form.get('project_name', 'Unnamed Project') + additional_context = request.form.get('additional_context', '') + + logger.debug(f"项目名称: {project_name}") + logger.debug(f"模拟需求: {simulation_requirement[:100]}...") + + if not simulation_requirement: + return jsonify({ + "success": False, + "error": "请提供模拟需求描述 (simulation_requirement)" + }), 400 + + # 获取上传的文件 + uploaded_files = request.files.getlist('files') + if not uploaded_files or all(not f.filename for f in uploaded_files): + return jsonify({ + "success": False, + "error": "请至少上传一个文档文件" + }), 400 + + # 创建项目 + project = ProjectManager.create_project(name=project_name) + project.simulation_requirement = simulation_requirement + logger.info(f"创建项目: {project.project_id}") + + # 保存文件并提取文本 + document_texts = [] + all_text = "" + + for file in uploaded_files: + if file and file.filename and allowed_file(file.filename): + # 保存文件到项目目录 + file_info = ProjectManager.save_file_to_project( + project.project_id, + file, + file.filename + ) + project.files.append({ + "filename": file_info["original_filename"], + "size": file_info["size"] + }) + + # 提取文本 + text = FileParser.extract_text(file_info["path"]) + text = TextProcessor.preprocess_text(text) + document_texts.append(text) + all_text += f"\n\n=== {file_info['original_filename']} ===\n{text}" + + if not document_texts: + ProjectManager.delete_project(project.project_id) + return jsonify({ + "success": False, + "error": "没有成功处理任何文档,请检查文件格式" + }), 400 + + # 保存提取的文本 + project.total_text_length = len(all_text) + ProjectManager.save_extracted_text(project.project_id, all_text) + logger.info(f"文本提取完成,共 {len(all_text)} 字符") + + # 生成本体 + logger.info("调用 LLM 生成本体定义...") + generator = OntologyGenerator() + ontology = generator.generate( + document_texts=document_texts, + simulation_requirement=simulation_requirement, + additional_context=additional_context if additional_context else None + ) + + # 保存本体到项目 + entity_count = len(ontology.get("entity_types", [])) + edge_count = len(ontology.get("edge_types", [])) + logger.info(f"本体生成完成: {entity_count} 个实体类型, {edge_count} 个关系类型") + + project.ontology = { + "entity_types": ontology.get("entity_types", []), + "edge_types": ontology.get("edge_types", []) + } + project.analysis_summary = ontology.get("analysis_summary", "") + project.status = ProjectStatus.ONTOLOGY_GENERATED + ProjectManager.save_project(project) + logger.info(f"=== 本体生成完成 === 项目ID: {project.project_id}") + + return jsonify({ + "success": True, + "data": { + "project_id": project.project_id, + "project_name": project.name, + "ontology": project.ontology, + "analysis_summary": project.analysis_summary, + "files": project.files, + "total_text_length": project.total_text_length + } + }) + + except Exception as e: + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +# ============== 接口2:构建图谱 ============== + +@graph_bp.route('/build', methods=['POST']) +def build_graph(): + """ + 接口2:根据project_id构建图谱 + + 请求(JSON): + { + "project_id": "proj_xxxx", // 必填,来自接口1 + "graph_name": "图谱名称", // 可选 + "chunk_size": 500, // 可选,默认500 + "chunk_overlap": 50 // 可选,默认50 + } + + 返回: + { + "success": true, + "data": { + "project_id": "proj_xxxx", + "task_id": "task_xxxx", + "message": "图谱构建任务已启动" + } + } + """ + try: + logger.info("=== 开始构建图谱 ===") + + # 检查配置 + errors = [] + if not Config.ZEP_API_KEY: + errors.append("ZEP_API_KEY未配置") + if errors: + logger.error(f"配置错误: {errors}") + return jsonify({ + "success": False, + "error": "配置错误: " + "; ".join(errors) + }), 500 + + # 解析请求 + data = request.get_json() or {} + project_id = data.get('project_id') + logger.debug(f"请求参数: project_id={project_id}") + + if not project_id: + return jsonify({ + "success": False, + "error": "请提供 project_id" + }), 400 + + # 获取项目 + project = ProjectManager.get_project(project_id) + if not project: + return jsonify({ + "success": False, + "error": f"项目不存在: {project_id}" + }), 404 + + # 检查项目状态 + force = data.get('force', False) # 强制重新构建 + + if project.status == ProjectStatus.CREATED: + return jsonify({ + "success": False, + "error": "项目尚未生成本体,请先调用 /ontology/generate" + }), 400 + + if project.status == ProjectStatus.GRAPH_BUILDING and not force: + return jsonify({ + "success": False, + "error": "图谱正在构建中,请勿重复提交。如需强制重建,请添加 force: true", + "task_id": project.graph_build_task_id + }), 400 + + # 如果强制重建,重置状态 + if force and project.status in [ProjectStatus.GRAPH_BUILDING, ProjectStatus.FAILED, ProjectStatus.GRAPH_COMPLETED]: + project.status = ProjectStatus.ONTOLOGY_GENERATED + project.graph_id = None + project.graph_build_task_id = None + project.error = None + + # 获取配置 + graph_name = data.get('graph_name', project.name or 'MiroFish Graph') + chunk_size = data.get('chunk_size', project.chunk_size or Config.DEFAULT_CHUNK_SIZE) + chunk_overlap = data.get('chunk_overlap', project.chunk_overlap or Config.DEFAULT_CHUNK_OVERLAP) + + # 更新项目配置 + project.chunk_size = chunk_size + project.chunk_overlap = chunk_overlap + + # 获取提取的文本 + text = ProjectManager.get_extracted_text(project_id) + if not text: + return jsonify({ + "success": False, + "error": "未找到提取的文本内容" + }), 400 + + # 获取本体 + ontology = project.ontology + if not ontology: + return jsonify({ + "success": False, + "error": "未找到本体定义" + }), 400 + + # 创建异步任务 + task_manager = TaskManager() + task_id = task_manager.create_task(f"构建图谱: {graph_name}") + logger.info(f"创建图谱构建任务: task_id={task_id}, project_id={project_id}") + + # 更新项目状态 + project.status = ProjectStatus.GRAPH_BUILDING + project.graph_build_task_id = task_id + ProjectManager.save_project(project) + + # 启动后台任务 + def build_task(): + build_logger = get_logger('mirofish.build') + try: + build_logger.info(f"[{task_id}] 开始构建图谱...") + task_manager.update_task( + task_id, + status=TaskStatus.PROCESSING, + message="初始化图谱构建服务..." + ) + + # 创建图谱构建服务 + builder = GraphBuilderService(api_key=Config.ZEP_API_KEY) + + # 分块 + task_manager.update_task( + task_id, + message="文本分块中...", + progress=5 + ) + chunks = TextProcessor.split_text( + text, + chunk_size=chunk_size, + overlap=chunk_overlap + ) + total_chunks = len(chunks) + + # 创建图谱 + task_manager.update_task( + task_id, + message="创建Zep图谱...", + progress=10 + ) + graph_id = builder.create_graph(name=graph_name) + + # 更新项目的graph_id + project.graph_id = graph_id + ProjectManager.save_project(project) + + # 设置本体 + task_manager.update_task( + task_id, + message="设置本体定义...", + progress=15 + ) + builder.set_ontology(graph_id, ontology) + + # 添加文本(progress_callback 签名是 (msg, progress_ratio)) + def add_progress_callback(msg, progress_ratio): + progress = 15 + int(progress_ratio * 40) # 15% - 55% + task_manager.update_task( + task_id, + message=msg, + progress=progress + ) + + task_manager.update_task( + task_id, + message=f"开始添加 {total_chunks} 个文本块...", + progress=15 + ) + + episode_uuids = builder.add_text_batches( + graph_id, + chunks, + batch_size=3, + progress_callback=add_progress_callback + ) + + # 等待Zep处理完成(查询每个episode的processed状态) + task_manager.update_task( + task_id, + message="等待Zep处理数据...", + progress=55 + ) + + def wait_progress_callback(msg, progress_ratio): + progress = 55 + int(progress_ratio * 35) # 55% - 90% + task_manager.update_task( + task_id, + message=msg, + progress=progress + ) + + builder._wait_for_episodes(episode_uuids, wait_progress_callback) + + # 获取图谱数据 + task_manager.update_task( + task_id, + message="获取图谱数据...", + progress=95 + ) + graph_data = builder.get_graph_data(graph_id) + + # 更新项目状态 + project.status = ProjectStatus.GRAPH_COMPLETED + ProjectManager.save_project(project) + + node_count = graph_data.get("node_count", 0) + edge_count = graph_data.get("edge_count", 0) + build_logger.info(f"[{task_id}] 图谱构建完成: graph_id={graph_id}, 节点={node_count}, 边={edge_count}") + + # 完成 + task_manager.update_task( + task_id, + status=TaskStatus.COMPLETED, + message="图谱构建完成", + progress=100, + result={ + "project_id": project_id, + "graph_id": graph_id, + "node_count": node_count, + "edge_count": edge_count, + "chunk_count": total_chunks + } + ) + + except Exception as e: + # 更新项目状态为失败 + build_logger.error(f"[{task_id}] 图谱构建失败: {str(e)}") + build_logger.debug(traceback.format_exc()) + + project.status = ProjectStatus.FAILED + project.error = str(e) + ProjectManager.save_project(project) + + task_manager.update_task( + task_id, + status=TaskStatus.FAILED, + message=f"构建失败: {str(e)}", + error=traceback.format_exc() + ) + + # 启动后台线程 + thread = threading.Thread(target=build_task, daemon=True) + thread.start() + + return jsonify({ + "success": True, + "data": { + "project_id": project_id, + "task_id": task_id, + "message": "图谱构建任务已启动,请通过 /task/{task_id} 查询进度" + } + }) + + except Exception as e: + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +# ============== 任务查询接口 ============== + +@graph_bp.route('/task/', methods=['GET']) +def get_task(task_id: str): + """ + 查询任务状态 + """ + task = TaskManager().get_task(task_id) + + if not task: + return jsonify({ + "success": False, + "error": f"任务不存在: {task_id}" + }), 404 + + return jsonify({ + "success": True, + "data": task.to_dict() + }) + + +@graph_bp.route('/tasks', methods=['GET']) +def list_tasks(): + """ + 列出所有任务 + """ + tasks = TaskManager().list_tasks() + + return jsonify({ + "success": True, + "data": [t.to_dict() for t in tasks], + "count": len(tasks) + }) + + +# ============== 图谱数据接口 ============== + +@graph_bp.route('/data/', methods=['GET']) +def get_graph_data(graph_id: str): + """ + 获取图谱数据(节点和边) + """ + try: + if not Config.ZEP_API_KEY: + return jsonify({ + "success": False, + "error": "ZEP_API_KEY未配置" + }), 500 + + builder = GraphBuilderService(api_key=Config.ZEP_API_KEY) + graph_data = builder.get_graph_data(graph_id) + + return jsonify({ + "success": True, + "data": graph_data + }) + + except Exception as e: + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@graph_bp.route('/delete/', methods=['DELETE']) +def delete_graph(graph_id: str): + """ + 删除Zep图谱 + """ + try: + if not Config.ZEP_API_KEY: + return jsonify({ + "success": False, + "error": "ZEP_API_KEY未配置" + }), 500 + + builder = GraphBuilderService(api_key=Config.ZEP_API_KEY) + builder.delete_graph(graph_id) + + return jsonify({ + "success": True, + "message": f"图谱已删除: {graph_id}" + }) + + except Exception as e: + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 diff --git a/app/app/api/pipeline.py b/app/app/api/pipeline.py new file mode 100644 index 0000000000000000000000000000000000000000..f5301520a6ded0988dd2779348d331dadcf06122 --- /dev/null +++ b/app/app/api/pipeline.py @@ -0,0 +1,230 @@ +""" +One-shot pipeline API for the website: upload text + requirement → full automation → report. + +When Supabase sync is configured (URL + service role), records runs + reports. +Identify users: Bearer JWT (Mirofish / Supabase Auth) or X-Mirofish-User-Id + X-Pipeline-Client-Secret. +""" + +import threading +import traceback +import uuid + +from flask import request, jsonify + +from . import pipeline_bp +from ..models.task import TaskManager, TaskStatus +from ..services.pipeline_orchestrator import run_full_pipeline +from ..services.supabase_jobs import ( + get_run_row_for_user, + insert_pending_run, + list_simulation_runs_for_user, + signed_url_for_storage_path, + sync_enabled, +) +from ..config import Config +from ..services.billing_service import verify_simulation_payment_token +from ..utils.logger import get_logger +from ..utils.supabase_auth import resolve_pipeline_user_id + +logger = get_logger("mirofish.api.pipeline") + +ALLOWED = {"txt", "md", "text"} + + +def _allowed(name: str) -> bool: + if not name or "." not in name: + return False + ext = name.rsplit(".", 1)[-1].lower() + return ext in ALLOWED + + +@pipeline_bp.route("/start", methods=["POST"]) +def pipeline_start(): + """ + multipart/form-data: + - file: .txt (or .md) reality seed + - simulation_requirement: string + + When Supabase sync is enabled: Bearer JWT (optional) or headers + X-Mirofish-User-Id + X-Pipeline-Client-Secret (same secret as PIPELINE_CLIENT_SECRET). + + Returns { task_id, simulation_run_id? }. + """ + try: + simulation_requirement = "" + document_text = "" + filename = "seed.txt" + + if request.content_type and "multipart/form-data" in request.content_type: + simulation_requirement = (request.form.get("simulation_requirement") or "").strip() + f = request.files.get("file") + if not f or not f.filename: + return jsonify({"success": False, "error": "Missing file"}), 400 + if not _allowed(f.filename): + return jsonify( + {"success": False, "error": "Only .txt or .md files are allowed for this endpoint"} + ), 400 + filename = f.filename + raw = f.read() + try: + document_text = raw.decode("utf-8") + except UnicodeDecodeError: + document_text = raw.decode("utf-8", errors="replace") + else: + data = request.get_json(silent=True) or {} + simulation_requirement = (data.get("simulation_requirement") or "").strip() + document_text = (data.get("document_text") or "").strip() + filename = (data.get("filename") or "seed.txt").strip() or "seed.txt" + if not document_text: + return jsonify({"success": False, "error": "document_text is required"}), 400 + + if not simulation_requirement: + return jsonify({"success": False, "error": "simulation_requirement is required"}), 400 + if len(document_text.strip()) < 10: + return jsonify({"success": False, "error": "Document text is too short"}), 400 + + if Config.billing_enabled(): + if request.content_type and "multipart/form-data" in request.content_type: + pay_tok = (request.form.get("simulation_payment_token") or "").strip() + else: + _jd = request.get_json(silent=True) or {} + pay_tok = (_jd.get("simulation_payment_token") or "").strip() + if not verify_simulation_payment_token(pay_tok): + return jsonify( + { + "success": False, + "error": "Complete payment or apply a valid coupon before starting a simulation.", + } + ), 402 + + user_id = None + simulation_run_id = None + if sync_enabled(): + uid, err = resolve_pipeline_user_id() + if err or not uid: + return jsonify({"success": False, "error": err or "Unauthorized"}), 401 + user_id = uid + simulation_run_id = str(uuid.uuid4()) + + tm = TaskManager() + task_id = tm.create_task( + task_type="full_pipeline", + metadata={ + "filename": filename, + "simulation_run_id": simulation_run_id, + "user_id": user_id, + }, + ) + tm.update_task( + task_id, + status=TaskStatus.PROCESSING, + progress=1, + message="Pipeline queued…", + ) + + if sync_enabled() and simulation_run_id and user_id: + try: + insert_pending_run( + simulation_run_id=simulation_run_id, + user_id=user_id, + backend_task_id=task_id, + requirement_preview=simulation_requirement, + ) + except Exception as e: + logger.error("Supabase insert_pending_run: %s", e) + tm.fail_task(task_id, f"Could not record run: {e}") + return jsonify({"success": False, "error": str(e)}), 500 + + def worker(): + run_full_pipeline( + simulation_requirement=simulation_requirement, + document_text=document_text, + source_filename=filename, + task_id=task_id, + task_manager=tm, + simulation_run_id=simulation_run_id, + user_id=user_id, + ) + + threading.Thread(target=worker, daemon=True).start() + + sync = sync_enabled() + payload = { + "task_id": task_id, + "supabase_sync": sync, + "message": ( + "Simulation started. Runs are saved to Supabase when cloud sync is enabled." + if sync + else "Simulation started. Cloud sync is OFF — add SUPABASE_URL + SUPABASE_SERVICE_ROLE_KEY on the server to record runs in Past simulations." + ), + } + if simulation_run_id: + payload["simulation_run_id"] = simulation_run_id + + if sync: + logger.info( + "pipeline/start task=%s simulation_run_id=%s user_id=%s", + task_id, + simulation_run_id, + user_id, + ) + else: + logger.warning( + "pipeline/start task=%s without Supabase sync — no simulation_runs row (set SUPABASE_* env)", + task_id, + ) + + return jsonify({"success": True, "data": payload}) + except Exception as e: + logger.error(traceback.format_exc()) + return jsonify({"success": False, "error": str(e)}), 500 + + +@pipeline_bp.route("/status/", methods=["GET"]) +def pipeline_status(task_id: str): + tm = TaskManager() + task = tm.get_task(task_id) + if not task: + return jsonify({"success": False, "error": "Unknown task_id"}), 404 + out = task.to_dict() + return jsonify({"success": True, "data": out}) + + +@pipeline_bp.route("/runs", methods=["GET"]) +def pipeline_list_runs(): + """List simulation_runs for the authenticated user (service role query on server).""" + try: + if not sync_enabled(): + return jsonify({"success": True, "data": {"runs": [], "supabase_sync": False}}) + uid, err = resolve_pipeline_user_id() + if err or not uid: + return jsonify({"success": False, "error": err or "Unauthorized"}), 401 + runs = list_simulation_runs_for_user(user_id=uid) + return jsonify({"success": True, "data": {"runs": runs, "supabase_sync": True}}) + except Exception as e: + logger.error(traceback.format_exc()) + return jsonify({"success": False, "error": str(e)}), 500 + + +@pipeline_bp.route("/runs//signed-download", methods=["GET"]) +def pipeline_signed_report_download(run_id: str): + """Return a time-limited signed URL for the report object in Storage.""" + try: + if not sync_enabled(): + return jsonify({"success": False, "error": "Sync not configured"}), 503 + uid, err = resolve_pipeline_user_id() + if err or not uid: + return jsonify({"success": False, "error": err or "Unauthorized"}), 401 + row = get_run_row_for_user(run_id=run_id, user_id=uid) + if not row: + return jsonify({"success": False, "error": "Run not found"}), 404 + path = row.get("report_storage_path") or "" + if not path: + return jsonify({"success": False, "error": "Report not ready"}), 400 + url = signed_url_for_storage_path(storage_path=path, expires_sec=3600) + if not url: + return jsonify({"success": False, "error": "Could not create download link"}), 500 + return jsonify({"success": True, "data": {"signed_url": url}}) + except Exception as e: + logger.error(traceback.format_exc()) + return jsonify({"success": False, "error": str(e)}), 500 diff --git a/app/app/api/report.py b/app/app/api/report.py new file mode 100644 index 0000000000000000000000000000000000000000..aad2bd4f118444781332ba2398511efbd2f5860a --- /dev/null +++ b/app/app/api/report.py @@ -0,0 +1,1015 @@ +""" +Report API路由 +提供模拟报告生成、获取、对话等接口 +""" + +import os +import traceback +import threading +from flask import request, jsonify, send_file + +from . import report_bp +from ..config import Config +from ..services.report_agent import ReportAgent, ReportManager, ReportStatus +from ..services.simulation_manager import SimulationManager +from ..models.project import ProjectManager +from ..models.task import TaskManager, TaskStatus +from ..utils.logger import get_logger + +logger = get_logger('mirofish.api.report') + + +# ============== 报告生成接口 ============== + +@report_bp.route('/generate', methods=['POST']) +def generate_report(): + """ + 生成模拟分析报告(异步任务) + + 这是一个耗时操作,接口会立即返回task_id, + 使用 GET /api/report/generate/status 查询进度 + + 请求(JSON): + { + "simulation_id": "sim_xxxx", // 必填,模拟ID + "force_regenerate": false // 可选,强制重新生成 + } + + 返回: + { + "success": true, + "data": { + "simulation_id": "sim_xxxx", + "task_id": "task_xxxx", + "status": "generating", + "message": "报告生成任务已启动" + } + } + """ + try: + data = request.get_json() or {} + + simulation_id = data.get('simulation_id') + if not simulation_id: + return jsonify({ + "success": False, + "error": "请提供 simulation_id" + }), 400 + + force_regenerate = data.get('force_regenerate', False) + + # 获取模拟信息 + manager = SimulationManager() + state = manager.get_simulation(simulation_id) + + if not state: + return jsonify({ + "success": False, + "error": f"模拟不存在: {simulation_id}" + }), 404 + + # 检查是否已有报告 + if not force_regenerate: + existing_report = ReportManager.get_report_by_simulation(simulation_id) + if existing_report and existing_report.status == ReportStatus.COMPLETED: + return jsonify({ + "success": True, + "data": { + "simulation_id": simulation_id, + "report_id": existing_report.report_id, + "status": "completed", + "message": "报告已存在", + "already_generated": True + } + }) + + # 获取项目信息 + project = ProjectManager.get_project(state.project_id) + if not project: + return jsonify({ + "success": False, + "error": f"项目不存在: {state.project_id}" + }), 404 + + graph_id = state.graph_id or project.graph_id + if not graph_id: + return jsonify({ + "success": False, + "error": "缺少图谱ID,请确保已构建图谱" + }), 400 + + simulation_requirement = project.simulation_requirement + if not simulation_requirement: + return jsonify({ + "success": False, + "error": "缺少模拟需求描述" + }), 400 + + # 提前生成 report_id,以便立即返回给前端 + import uuid + report_id = f"report_{uuid.uuid4().hex[:12]}" + + # 创建异步任务 + task_manager = TaskManager() + task_id = task_manager.create_task( + task_type="report_generate", + metadata={ + "simulation_id": simulation_id, + "graph_id": graph_id, + "report_id": report_id + } + ) + + # 定义后台任务 + def run_generate(): + try: + task_manager.update_task( + task_id, + status=TaskStatus.PROCESSING, + progress=0, + message="初始化Report Agent..." + ) + + # 创建Report Agent + agent = ReportAgent( + graph_id=graph_id, + simulation_id=simulation_id, + simulation_requirement=simulation_requirement + ) + + # 进度回调 + def progress_callback(stage, progress, message): + task_manager.update_task( + task_id, + progress=progress, + message=f"[{stage}] {message}" + ) + + # 生成报告(传入预先生成的 report_id) + report = agent.generate_report( + progress_callback=progress_callback, + report_id=report_id + ) + + # 保存报告 + ReportManager.save_report(report) + + if report.status == ReportStatus.COMPLETED: + task_manager.complete_task( + task_id, + result={ + "report_id": report.report_id, + "simulation_id": simulation_id, + "status": "completed" + } + ) + else: + task_manager.fail_task(task_id, report.error or "报告生成失败") + + except Exception as e: + logger.error(f"报告生成失败: {str(e)}") + task_manager.fail_task(task_id, str(e)) + + # 启动后台线程 + thread = threading.Thread(target=run_generate, daemon=True) + thread.start() + + return jsonify({ + "success": True, + "data": { + "simulation_id": simulation_id, + "report_id": report_id, + "task_id": task_id, + "status": "generating", + "message": "报告生成任务已启动,请通过 /api/report/generate/status 查询进度", + "already_generated": False + } + }) + + except Exception as e: + logger.error(f"启动报告生成任务失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@report_bp.route('/generate/status', methods=['POST']) +def get_generate_status(): + """ + 查询报告生成任务进度 + + 请求(JSON): + { + "task_id": "task_xxxx", // 可选,generate返回的task_id + "simulation_id": "sim_xxxx" // 可选,模拟ID + } + + 返回: + { + "success": true, + "data": { + "task_id": "task_xxxx", + "status": "processing|completed|failed", + "progress": 45, + "message": "..." + } + } + """ + try: + data = request.get_json() or {} + + task_id = data.get('task_id') + simulation_id = data.get('simulation_id') + + # 如果提供了simulation_id,先检查是否已有完成的报告 + if simulation_id: + existing_report = ReportManager.get_report_by_simulation(simulation_id) + if existing_report and existing_report.status == ReportStatus.COMPLETED: + return jsonify({ + "success": True, + "data": { + "simulation_id": simulation_id, + "report_id": existing_report.report_id, + "status": "completed", + "progress": 100, + "message": "报告已生成", + "already_completed": True + } + }) + + if not task_id: + return jsonify({ + "success": False, + "error": "请提供 task_id 或 simulation_id" + }), 400 + + task_manager = TaskManager() + task = task_manager.get_task(task_id) + + if not task: + return jsonify({ + "success": False, + "error": f"任务不存在: {task_id}" + }), 404 + + return jsonify({ + "success": True, + "data": task.to_dict() + }) + + except Exception as e: + logger.error(f"查询任务状态失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e) + }), 500 + + +# ============== 报告获取接口 ============== + +@report_bp.route('/', methods=['GET']) +def get_report(report_id: str): + """ + 获取报告详情 + + 返回: + { + "success": true, + "data": { + "report_id": "report_xxxx", + "simulation_id": "sim_xxxx", + "status": "completed", + "outline": {...}, + "markdown_content": "...", + "created_at": "...", + "completed_at": "..." + } + } + """ + try: + report = ReportManager.get_report(report_id) + + if not report: + return jsonify({ + "success": False, + "error": f"报告不存在: {report_id}" + }), 404 + + return jsonify({ + "success": True, + "data": report.to_dict() + }) + + except Exception as e: + logger.error(f"获取报告失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@report_bp.route('/by-simulation/', methods=['GET']) +def get_report_by_simulation(simulation_id: str): + """ + 根据模拟ID获取报告 + + 返回: + { + "success": true, + "data": { + "report_id": "report_xxxx", + ... + } + } + """ + try: + report = ReportManager.get_report_by_simulation(simulation_id) + + if not report: + return jsonify({ + "success": False, + "error": f"该模拟暂无报告: {simulation_id}", + "has_report": False + }), 404 + + return jsonify({ + "success": True, + "data": report.to_dict(), + "has_report": True + }) + + except Exception as e: + logger.error(f"获取报告失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@report_bp.route('/list', methods=['GET']) +def list_reports(): + """ + 列出所有报告 + + Query参数: + simulation_id: 按模拟ID过滤(可选) + limit: 返回数量限制(默认50) + + 返回: + { + "success": true, + "data": [...], + "count": 10 + } + """ + try: + simulation_id = request.args.get('simulation_id') + limit = request.args.get('limit', 50, type=int) + + reports = ReportManager.list_reports( + simulation_id=simulation_id, + limit=limit + ) + + return jsonify({ + "success": True, + "data": [r.to_dict() for r in reports], + "count": len(reports) + }) + + except Exception as e: + logger.error(f"列出报告失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@report_bp.route('//download', methods=['GET']) +def download_report(report_id: str): + """ + 下载报告(Markdown格式) + + 返回Markdown文件 + """ + try: + report = ReportManager.get_report(report_id) + + if not report: + return jsonify({ + "success": False, + "error": f"报告不存在: {report_id}" + }), 404 + + md_path = ReportManager._get_report_markdown_path(report_id) + + if not os.path.exists(md_path): + # 如果MD文件不存在,生成一个临时文件 + import tempfile + with tempfile.NamedTemporaryFile(mode='w', suffix='.md', delete=False) as f: + f.write(report.markdown_content) + temp_path = f.name + + return send_file( + temp_path, + as_attachment=True, + download_name=f"{report_id}.md" + ) + + return send_file( + md_path, + as_attachment=True, + download_name=f"{report_id}.md" + ) + + except Exception as e: + logger.error(f"下载报告失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@report_bp.route('/', methods=['DELETE']) +def delete_report(report_id: str): + """删除报告""" + try: + success = ReportManager.delete_report(report_id) + + if not success: + return jsonify({ + "success": False, + "error": f"报告不存在: {report_id}" + }), 404 + + return jsonify({ + "success": True, + "message": f"报告已删除: {report_id}" + }) + + except Exception as e: + logger.error(f"删除报告失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +# ============== Report Agent对话接口 ============== + +@report_bp.route('/chat', methods=['POST']) +def chat_with_report_agent(): + """ + 与Report Agent对话 + + Report Agent可以在对话中自主调用检索工具来回答问题 + + 请求(JSON): + { + "simulation_id": "sim_xxxx", // 必填,模拟ID + "message": "请解释一下舆情走向", // 必填,用户消息 + "chat_history": [ // 可选,对话历史 + {"role": "user", "content": "..."}, + {"role": "assistant", "content": "..."} + ] + } + + 返回: + { + "success": true, + "data": { + "response": "Agent回复...", + "tool_calls": [调用的工具列表], + "sources": [信息来源] + } + } + """ + try: + data = request.get_json() or {} + + simulation_id = data.get('simulation_id') + message = data.get('message') + chat_history = data.get('chat_history', []) + + if not simulation_id: + return jsonify({ + "success": False, + "error": "请提供 simulation_id" + }), 400 + + if not message: + return jsonify({ + "success": False, + "error": "请提供 message" + }), 400 + + # 获取模拟和项目信息 + manager = SimulationManager() + state = manager.get_simulation(simulation_id) + + if not state: + return jsonify({ + "success": False, + "error": f"模拟不存在: {simulation_id}" + }), 404 + + project = ProjectManager.get_project(state.project_id) + if not project: + return jsonify({ + "success": False, + "error": f"项目不存在: {state.project_id}" + }), 404 + + graph_id = state.graph_id or project.graph_id + if not graph_id: + return jsonify({ + "success": False, + "error": "缺少图谱ID" + }), 400 + + simulation_requirement = project.simulation_requirement or "" + + # 创建Agent并进行对话 + agent = ReportAgent( + graph_id=graph_id, + simulation_id=simulation_id, + simulation_requirement=simulation_requirement + ) + + result = agent.chat(message=message, chat_history=chat_history) + + return jsonify({ + "success": True, + "data": result + }) + + except Exception as e: + logger.error(f"对话失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +# ============== 报告进度与分章节接口 ============== + +@report_bp.route('//progress', methods=['GET']) +def get_report_progress(report_id: str): + """ + 获取报告生成进度(实时) + + 返回: + { + "success": true, + "data": { + "status": "generating", + "progress": 45, + "message": "正在生成章节: 关键发现", + "current_section": "关键发现", + "completed_sections": ["执行摘要", "模拟背景"], + "updated_at": "2025-12-09T..." + } + } + """ + try: + progress = ReportManager.get_progress(report_id) + + if not progress: + return jsonify({ + "success": False, + "error": f"报告不存在或进度信息不可用: {report_id}" + }), 404 + + return jsonify({ + "success": True, + "data": progress + }) + + except Exception as e: + logger.error(f"获取报告进度失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@report_bp.route('//sections', methods=['GET']) +def get_report_sections(report_id: str): + """ + 获取已生成的章节列表(分章节输出) + + 前端可以轮询此接口获取已生成的章节内容,无需等待整个报告完成 + + 返回: + { + "success": true, + "data": { + "report_id": "report_xxxx", + "sections": [ + { + "filename": "section_01.md", + "section_index": 1, + "content": "## 执行摘要\\n\\n..." + }, + ... + ], + "total_sections": 3, + "is_complete": false + } + } + """ + try: + sections = ReportManager.get_generated_sections(report_id) + + # 获取报告状态 + report = ReportManager.get_report(report_id) + is_complete = report is not None and report.status == ReportStatus.COMPLETED + + return jsonify({ + "success": True, + "data": { + "report_id": report_id, + "sections": sections, + "total_sections": len(sections), + "is_complete": is_complete + } + }) + + except Exception as e: + logger.error(f"获取章节列表失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@report_bp.route('//section/', methods=['GET']) +def get_single_section(report_id: str, section_index: int): + """ + 获取单个章节内容 + + 返回: + { + "success": true, + "data": { + "filename": "section_01.md", + "content": "## 执行摘要\\n\\n..." + } + } + """ + try: + section_path = ReportManager._get_section_path(report_id, section_index) + + if not os.path.exists(section_path): + return jsonify({ + "success": False, + "error": f"章节不存在: section_{section_index:02d}.md" + }), 404 + + with open(section_path, 'r', encoding='utf-8') as f: + content = f.read() + + return jsonify({ + "success": True, + "data": { + "filename": f"section_{section_index:02d}.md", + "section_index": section_index, + "content": content + } + }) + + except Exception as e: + logger.error(f"获取章节内容失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +# ============== 报告状态检查接口 ============== + +@report_bp.route('/check/', methods=['GET']) +def check_report_status(simulation_id: str): + """ + 检查模拟是否有报告,以及报告状态 + + 用于前端判断是否解锁Interview功能 + + 返回: + { + "success": true, + "data": { + "simulation_id": "sim_xxxx", + "has_report": true, + "report_status": "completed", + "report_id": "report_xxxx", + "interview_unlocked": true + } + } + """ + try: + report = ReportManager.get_report_by_simulation(simulation_id) + + has_report = report is not None + report_status = report.status.value if report else None + report_id = report.report_id if report else None + + # 只有报告完成后才解锁interview + interview_unlocked = has_report and report.status == ReportStatus.COMPLETED + + return jsonify({ + "success": True, + "data": { + "simulation_id": simulation_id, + "has_report": has_report, + "report_status": report_status, + "report_id": report_id, + "interview_unlocked": interview_unlocked + } + }) + + except Exception as e: + logger.error(f"检查报告状态失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +# ============== Agent 日志接口 ============== + +@report_bp.route('//agent-log', methods=['GET']) +def get_agent_log(report_id: str): + """ + 获取 Report Agent 的详细执行日志 + + 实时获取报告生成过程中的每一步动作,包括: + - 报告开始、规划开始/完成 + - 每个章节的开始、工具调用、LLM响应、完成 + - 报告完成或失败 + + Query参数: + from_line: 从第几行开始读取(可选,默认0,用于增量获取) + + 返回: + { + "success": true, + "data": { + "logs": [ + { + "timestamp": "2025-12-13T...", + "elapsed_seconds": 12.5, + "report_id": "report_xxxx", + "action": "tool_call", + "stage": "generating", + "section_title": "执行摘要", + "section_index": 1, + "details": { + "tool_name": "insight_forge", + "parameters": {...}, + ... + } + }, + ... + ], + "total_lines": 25, + "from_line": 0, + "has_more": false + } + } + """ + try: + from_line = request.args.get('from_line', 0, type=int) + + log_data = ReportManager.get_agent_log(report_id, from_line=from_line) + + return jsonify({ + "success": True, + "data": log_data + }) + + except Exception as e: + logger.error(f"获取Agent日志失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@report_bp.route('//agent-log/stream', methods=['GET']) +def stream_agent_log(report_id: str): + """ + 获取完整的 Agent 日志(一次性获取全部) + + 返回: + { + "success": true, + "data": { + "logs": [...], + "count": 25 + } + } + """ + try: + logs = ReportManager.get_agent_log_stream(report_id) + + return jsonify({ + "success": True, + "data": { + "logs": logs, + "count": len(logs) + } + }) + + except Exception as e: + logger.error(f"获取Agent日志失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +# ============== 控制台日志接口 ============== + +@report_bp.route('//console-log', methods=['GET']) +def get_console_log(report_id: str): + """ + 获取 Report Agent 的控制台输出日志 + + 实时获取报告生成过程中的控制台输出(INFO、WARNING等), + 这与 agent-log 接口返回的结构化 JSON 日志不同, + 是纯文本格式的控制台风格日志。 + + Query参数: + from_line: 从第几行开始读取(可选,默认0,用于增量获取) + + 返回: + { + "success": true, + "data": { + "logs": [ + "[19:46:14] INFO: 搜索完成: 找到 15 条相关事实", + "[19:46:14] INFO: 图谱搜索: graph_id=xxx, query=...", + ... + ], + "total_lines": 100, + "from_line": 0, + "has_more": false + } + } + """ + try: + from_line = request.args.get('from_line', 0, type=int) + + log_data = ReportManager.get_console_log(report_id, from_line=from_line) + + return jsonify({ + "success": True, + "data": log_data + }) + + except Exception as e: + logger.error(f"获取控制台日志失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@report_bp.route('//console-log/stream', methods=['GET']) +def stream_console_log(report_id: str): + """ + 获取完整的控制台日志(一次性获取全部) + + 返回: + { + "success": true, + "data": { + "logs": [...], + "count": 100 + } + } + """ + try: + logs = ReportManager.get_console_log_stream(report_id) + + return jsonify({ + "success": True, + "data": { + "logs": logs, + "count": len(logs) + } + }) + + except Exception as e: + logger.error(f"获取控制台日志失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +# ============== 工具调用接口(供调试使用)============== + +@report_bp.route('/tools/search', methods=['POST']) +def search_graph_tool(): + """ + 图谱搜索工具接口(供调试使用) + + 请求(JSON): + { + "graph_id": "mirofish_xxxx", + "query": "搜索查询", + "limit": 10 + } + """ + try: + data = request.get_json() or {} + + graph_id = data.get('graph_id') + query = data.get('query') + limit = data.get('limit', 10) + + if not graph_id or not query: + return jsonify({ + "success": False, + "error": "请提供 graph_id 和 query" + }), 400 + + from ..services.zep_tools import ZepToolsService + + tools = ZepToolsService() + result = tools.search_graph( + graph_id=graph_id, + query=query, + limit=limit + ) + + return jsonify({ + "success": True, + "data": result.to_dict() + }) + + except Exception as e: + logger.error(f"图谱搜索失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@report_bp.route('/tools/statistics', methods=['POST']) +def get_graph_statistics_tool(): + """ + 图谱统计工具接口(供调试使用) + + 请求(JSON): + { + "graph_id": "mirofish_xxxx" + } + """ + try: + data = request.get_json() or {} + + graph_id = data.get('graph_id') + + if not graph_id: + return jsonify({ + "success": False, + "error": "请提供 graph_id" + }), 400 + + from ..services.zep_tools import ZepToolsService + + tools = ZepToolsService() + result = tools.get_graph_statistics(graph_id) + + return jsonify({ + "success": True, + "data": result + }) + + except Exception as e: + logger.error(f"获取图谱统计失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 diff --git a/app/app/api/simulation.py b/app/app/api/simulation.py new file mode 100644 index 0000000000000000000000000000000000000000..d44a54e50ce947f47b7aae60bea6918174a42bcf --- /dev/null +++ b/app/app/api/simulation.py @@ -0,0 +1,2718 @@ +""" +模拟相关API路由 +Step2: Zep实体读取与过滤、OASIS模拟准备与运行(全程自动化) +""" + +import os +import traceback +from flask import request, jsonify, send_file + +from . import simulation_bp +from ..config import Config +from ..services.zep_entity_reader import ZepEntityReader +from ..services.oasis_profile_generator import OasisProfileGenerator +from ..services.simulation_manager import SimulationManager, SimulationStatus +from ..services.simulation_runner import SimulationRunner, RunnerStatus +from ..utils.logger import get_logger +from ..models.project import ProjectManager + +logger = get_logger('mirofish.api.simulation') + + +# Interview prompt 优化前缀 +# 添加此前缀可以避免Agent调用工具,直接用文本回复。 +# Startup validation: agents stay in persona (investor, founder, customer, skeptic, etc.). +INTERVIEW_PROMPT_PREFIX = ( + "Stay in character using your persona, memories, and past actions. Do not call any tools—reply in plain text only. " + "You are in a startup idea validation simulation: respond in character only " + "(e.g. VC, angel, YC-style partner, picky investor, peer founder, buyer, undecided user). " + "Ground answers in your persona and the simulated discussion, not generic advice.\n\n" + "Question: " +) + + +def optimize_interview_prompt(prompt: str) -> str: + """ + 优化Interview提问,添加前缀避免Agent调用工具 + + Args: + prompt: 原始提问 + + Returns: + 优化后的提问 + """ + if not prompt: + return prompt + # 避免重复添加前缀 + if prompt.startswith(INTERVIEW_PROMPT_PREFIX): + return prompt + return f"{INTERVIEW_PROMPT_PREFIX}{prompt}" + + +# ============== 实体读取接口 ============== + +@simulation_bp.route('/entities/', methods=['GET']) +def get_graph_entities(graph_id: str): + """ + 获取图谱中的所有实体(已过滤) + + 只返回符合预定义实体类型的节点(Labels不只是Entity的节点) + + Query参数: + entity_types: 逗号分隔的实体类型列表(可选,用于进一步过滤) + enrich: 是否获取相关边信息(默认true) + """ + try: + if not Config.ZEP_API_KEY: + return jsonify({ + "success": False, + "error": "ZEP_API_KEY未配置" + }), 500 + + entity_types_str = request.args.get('entity_types', '') + entity_types = [t.strip() for t in entity_types_str.split(',') if t.strip()] if entity_types_str else None + enrich = request.args.get('enrich', 'true').lower() == 'true' + + logger.info(f"获取图谱实体: graph_id={graph_id}, entity_types={entity_types}, enrich={enrich}") + + reader = ZepEntityReader() + result = reader.filter_defined_entities( + graph_id=graph_id, + defined_entity_types=entity_types, + enrich_with_edges=enrich + ) + + return jsonify({ + "success": True, + "data": result.to_dict() + }) + + except Exception as e: + logger.error(f"获取图谱实体失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('/entities//', methods=['GET']) +def get_entity_detail(graph_id: str, entity_uuid: str): + """获取单个实体的详细信息""" + try: + if not Config.ZEP_API_KEY: + return jsonify({ + "success": False, + "error": "ZEP_API_KEY未配置" + }), 500 + + reader = ZepEntityReader() + entity = reader.get_entity_with_context(graph_id, entity_uuid) + + if not entity: + return jsonify({ + "success": False, + "error": f"实体不存在: {entity_uuid}" + }), 404 + + return jsonify({ + "success": True, + "data": entity.to_dict() + }) + + except Exception as e: + logger.error(f"获取实体详情失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('/entities//by-type/', methods=['GET']) +def get_entities_by_type(graph_id: str, entity_type: str): + """获取指定类型的所有实体""" + try: + if not Config.ZEP_API_KEY: + return jsonify({ + "success": False, + "error": "ZEP_API_KEY未配置" + }), 500 + + enrich = request.args.get('enrich', 'true').lower() == 'true' + + reader = ZepEntityReader() + entities = reader.get_entities_by_type( + graph_id=graph_id, + entity_type=entity_type, + enrich_with_edges=enrich + ) + + return jsonify({ + "success": True, + "data": { + "entity_type": entity_type, + "count": len(entities), + "entities": [e.to_dict() for e in entities] + } + }) + + except Exception as e: + logger.error(f"获取实体失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +# ============== 模拟管理接口 ============== + +@simulation_bp.route('/create', methods=['POST']) +def create_simulation(): + """ + 创建新的模拟 + + 注意:max_rounds等参数由LLM智能生成,无需手动设置 + + 请求(JSON): + { + "project_id": "proj_xxxx", // 必填 + "graph_id": "mirofish_xxxx", // 可选,如不提供则从project获取 + "enable_twitter": true, // 可选,默认true + "enable_reddit": true // 可选,默认true + } + + 返回: + { + "success": true, + "data": { + "simulation_id": "sim_xxxx", + "project_id": "proj_xxxx", + "graph_id": "mirofish_xxxx", + "status": "created", + "enable_twitter": true, + "enable_reddit": true, + "created_at": "2025-12-01T10:00:00" + } + } + """ + try: + data = request.get_json() or {} + + project_id = data.get('project_id') + if not project_id: + return jsonify({ + "success": False, + "error": "请提供 project_id" + }), 400 + + project = ProjectManager.get_project(project_id) + if not project: + return jsonify({ + "success": False, + "error": f"项目不存在: {project_id}" + }), 404 + + graph_id = data.get('graph_id') or project.graph_id + if not graph_id: + return jsonify({ + "success": False, + "error": "项目尚未构建图谱,请先调用 /api/graph/build" + }), 400 + + manager = SimulationManager() + state = manager.create_simulation( + project_id=project_id, + graph_id=graph_id, + enable_twitter=data.get('enable_twitter', True), + enable_reddit=data.get('enable_reddit', True), + ) + + return jsonify({ + "success": True, + "data": state.to_dict() + }) + + except Exception as e: + logger.error(f"创建模拟失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +def _check_simulation_prepared(simulation_id: str) -> tuple: + """ + 检查模拟是否已经准备完成 + + 检查条件: + 1. state.json 存在且 status 为 "ready" + 2. 必要文件存在:reddit_profiles.json, twitter_profiles.csv, simulation_config.json + + 注意:运行脚本(run_*.py)保留在 backend/scripts/ 目录,不再复制到模拟目录 + + Args: + simulation_id: 模拟ID + + Returns: + (is_prepared: bool, info: dict) + """ + import os + from ..config import Config + + simulation_dir = os.path.join(Config.OASIS_SIMULATION_DATA_DIR, simulation_id) + + # 检查目录是否存在 + if not os.path.exists(simulation_dir): + return False, {"reason": "模拟目录不存在"} + + # 必要文件列表(不包括脚本,脚本位于 backend/scripts/) + required_files = [ + "state.json", + "simulation_config.json", + "reddit_profiles.json", + "twitter_profiles.csv" + ] + + # 检查文件是否存在 + existing_files = [] + missing_files = [] + for f in required_files: + file_path = os.path.join(simulation_dir, f) + if os.path.exists(file_path): + existing_files.append(f) + else: + missing_files.append(f) + + if missing_files: + return False, { + "reason": "缺少必要文件", + "missing_files": missing_files, + "existing_files": existing_files + } + + # 检查state.json中的状态 + state_file = os.path.join(simulation_dir, "state.json") + try: + import json + with open(state_file, 'r', encoding='utf-8') as f: + state_data = json.load(f) + + status = state_data.get("status", "") + config_generated = state_data.get("config_generated", False) + + # 详细日志 + logger.debug(f"检测模拟准备状态: {simulation_id}, status={status}, config_generated={config_generated}") + + # 如果 config_generated=True 且文件存在,认为准备完成 + # 以下状态都说明准备工作已完成: + # - ready: 准备完成,可以运行 + # - preparing: 如果 config_generated=True 说明已完成 + # - running: 正在运行,说明准备早就完成了 + # - completed: 运行完成,说明准备早就完成了 + # - stopped: 已停止,说明准备早就完成了 + # - failed: 运行失败(但准备是完成的) + prepared_statuses = ["ready", "preparing", "running", "completed", "stopped", "failed"] + if status in prepared_statuses and config_generated: + # 获取文件统计信息 + profiles_file = os.path.join(simulation_dir, "reddit_profiles.json") + config_file = os.path.join(simulation_dir, "simulation_config.json") + + profiles_count = 0 + if os.path.exists(profiles_file): + with open(profiles_file, 'r', encoding='utf-8') as f: + profiles_data = json.load(f) + profiles_count = len(profiles_data) if isinstance(profiles_data, list) else 0 + + # 如果状态是preparing但文件已完成,自动更新状态为ready + if status == "preparing": + try: + state_data["status"] = "ready" + from datetime import datetime + state_data["updated_at"] = datetime.now().isoformat() + with open(state_file, 'w', encoding='utf-8') as f: + json.dump(state_data, f, ensure_ascii=False, indent=2) + logger.info(f"自动更新模拟状态: {simulation_id} preparing -> ready") + status = "ready" + except Exception as e: + logger.warning(f"自动更新状态失败: {e}") + + logger.info(f"模拟 {simulation_id} 检测结果: 已准备完成 (status={status}, config_generated={config_generated})") + return True, { + "status": status, + "entities_count": state_data.get("entities_count", 0), + "profiles_count": profiles_count, + "entity_types": state_data.get("entity_types", []), + "config_generated": config_generated, + "created_at": state_data.get("created_at"), + "updated_at": state_data.get("updated_at"), + "existing_files": existing_files + } + else: + logger.warning(f"模拟 {simulation_id} 检测结果: 未准备完成 (status={status}, config_generated={config_generated})") + return False, { + "reason": f"状态不在已准备列表中或config_generated为false: status={status}, config_generated={config_generated}", + "status": status, + "config_generated": config_generated + } + + except Exception as e: + return False, {"reason": f"读取状态文件失败: {str(e)}"} + + +@simulation_bp.route('/prepare', methods=['POST']) +def prepare_simulation(): + """ + 准备模拟环境(异步任务,LLM智能生成所有参数) + + 这是一个耗时操作,接口会立即返回task_id, + 使用 GET /api/simulation/prepare/status 查询进度 + + 特性: + - 自动检测已完成的准备工作,避免重复生成 + - 如果已准备完成,直接返回已有结果 + - 支持强制重新生成(force_regenerate=true) + + 步骤: + 1. 检查是否已有完成的准备工作 + 2. 从Zep图谱读取并过滤实体 + 3. 为每个实体生成OASIS Agent Profile(带重试机制) + 4. LLM智能生成模拟配置(带重试机制) + 5. 保存配置文件和预设脚本 + + 请求(JSON): + { + "simulation_id": "sim_xxxx", // 必填,模拟ID + "entity_types": ["Student", "PublicFigure"], // 可选,指定实体类型 + "use_llm_for_profiles": true, // 可选,是否用LLM生成人设 + "parallel_profile_count": 5, // 可选,并行生成人设数量,默认5 + "force_regenerate": false // 可选,强制重新生成,默认false + } + + 返回: + { + "success": true, + "data": { + "simulation_id": "sim_xxxx", + "task_id": "task_xxxx", // 新任务时返回 + "status": "preparing|ready", + "message": "准备任务已启动|已有完成的准备工作", + "already_prepared": true|false // 是否已准备完成 + } + } + """ + import threading + import os + from ..models.task import TaskManager, TaskStatus + from ..config import Config + + try: + data = request.get_json() or {} + + simulation_id = data.get('simulation_id') + if not simulation_id: + return jsonify({ + "success": False, + "error": "请提供 simulation_id" + }), 400 + + manager = SimulationManager() + state = manager.get_simulation(simulation_id) + + if not state: + return jsonify({ + "success": False, + "error": f"模拟不存在: {simulation_id}" + }), 404 + + # 检查是否强制重新生成 + force_regenerate = data.get('force_regenerate', False) + logger.info(f"开始处理 /prepare 请求: simulation_id={simulation_id}, force_regenerate={force_regenerate}") + + # 检查是否已经准备完成(避免重复生成) + if not force_regenerate: + logger.debug(f"检查模拟 {simulation_id} 是否已准备完成...") + is_prepared, prepare_info = _check_simulation_prepared(simulation_id) + logger.debug(f"检查结果: is_prepared={is_prepared}, prepare_info={prepare_info}") + if is_prepared: + logger.info(f"模拟 {simulation_id} 已准备完成,跳过重复生成") + return jsonify({ + "success": True, + "data": { + "simulation_id": simulation_id, + "status": "ready", + "message": "已有完成的准备工作,无需重复生成", + "already_prepared": True, + "prepare_info": prepare_info + } + }) + else: + logger.info(f"模拟 {simulation_id} 未准备完成,将启动准备任务") + + # 从项目获取必要信息 + project = ProjectManager.get_project(state.project_id) + if not project: + return jsonify({ + "success": False, + "error": f"项目不存在: {state.project_id}" + }), 404 + + # 获取模拟需求 + simulation_requirement = project.simulation_requirement or "" + if not simulation_requirement: + return jsonify({ + "success": False, + "error": "项目缺少模拟需求描述 (simulation_requirement)" + }), 400 + + # 获取文档文本 + document_text = ProjectManager.get_extracted_text(state.project_id) or "" + + entity_types_list = data.get('entity_types') + use_llm_for_profiles = data.get('use_llm_for_profiles', True) + parallel_profile_count = data.get('parallel_profile_count', 5) + + # ========== 同步获取实体数量(在后台任务启动前) ========== + # 这样前端在调用prepare后立即就能获取到预期Agent总数 + try: + logger.info(f"同步获取实体数量: graph_id={state.graph_id}") + reader = ZepEntityReader() + # 快速读取实体(不需要边信息,只统计数量) + filtered_preview = reader.filter_defined_entities( + graph_id=state.graph_id, + defined_entity_types=entity_types_list, + enrich_with_edges=False # 不获取边信息,加快速度 + ) + # 保存实体数量到状态(供前端立即获取) + state.entities_count = filtered_preview.filtered_count + state.entity_types = list(filtered_preview.entity_types) + logger.info(f"预期实体数量: {filtered_preview.filtered_count}, 类型: {filtered_preview.entity_types}") + except Exception as e: + logger.warning(f"同步获取实体数量失败(将在后台任务中重试): {e}") + # 失败不影响后续流程,后台任务会重新获取 + + # 创建异步任务 + task_manager = TaskManager() + task_id = task_manager.create_task( + task_type="simulation_prepare", + metadata={ + "simulation_id": simulation_id, + "project_id": state.project_id + } + ) + + # 更新模拟状态(包含预先获取的实体数量) + state.status = SimulationStatus.PREPARING + manager._save_simulation_state(state) + + # 定义后台任务 + def run_prepare(): + try: + task_manager.update_task( + task_id, + status=TaskStatus.PROCESSING, + progress=0, + message="开始准备模拟环境..." + ) + + # 准备模拟(带进度回调) + # 存储阶段进度详情 + stage_details = {} + + def progress_callback(stage, progress, message, **kwargs): + # 计算总进度 + stage_weights = { + "reading": (0, 20), # 0-20% + "generating_profiles": (20, 70), # 20-70% + "generating_config": (70, 90), # 70-90% + "copying_scripts": (90, 100) # 90-100% + } + + start, end = stage_weights.get(stage, (0, 100)) + current_progress = int(start + (end - start) * progress / 100) + + # 构建详细进度信息 + stage_names = { + "reading": "读取图谱实体", + "generating_profiles": "生成Agent人设", + "generating_config": "生成模拟配置", + "copying_scripts": "准备模拟脚本" + } + + stage_index = list(stage_weights.keys()).index(stage) + 1 if stage in stage_weights else 1 + total_stages = len(stage_weights) + + # 更新阶段详情 + stage_details[stage] = { + "stage_name": stage_names.get(stage, stage), + "stage_progress": progress, + "current": kwargs.get("current", 0), + "total": kwargs.get("total", 0), + "item_name": kwargs.get("item_name", "") + } + + # 构建详细进度信息 + detail = stage_details[stage] + progress_detail_data = { + "current_stage": stage, + "current_stage_name": stage_names.get(stage, stage), + "stage_index": stage_index, + "total_stages": total_stages, + "stage_progress": progress, + "current_item": detail["current"], + "total_items": detail["total"], + "item_description": message + } + + # 构建简洁消息 + if detail["total"] > 0: + detailed_message = ( + f"[{stage_index}/{total_stages}] {stage_names.get(stage, stage)}: " + f"{detail['current']}/{detail['total']} - {message}" + ) + else: + detailed_message = f"[{stage_index}/{total_stages}] {stage_names.get(stage, stage)}: {message}" + + task_manager.update_task( + task_id, + progress=current_progress, + message=detailed_message, + progress_detail=progress_detail_data + ) + + result_state = manager.prepare_simulation( + simulation_id=simulation_id, + simulation_requirement=simulation_requirement, + document_text=document_text, + defined_entity_types=entity_types_list, + use_llm_for_profiles=use_llm_for_profiles, + progress_callback=progress_callback, + parallel_profile_count=parallel_profile_count + ) + + # 任务完成 + task_manager.complete_task( + task_id, + result=result_state.to_simple_dict() + ) + + except Exception as e: + logger.error(f"准备模拟失败: {str(e)}") + task_manager.fail_task(task_id, str(e)) + + # 更新模拟状态为失败 + state = manager.get_simulation(simulation_id) + if state: + state.status = SimulationStatus.FAILED + state.error = str(e) + manager._save_simulation_state(state) + + # 启动后台线程 + thread = threading.Thread(target=run_prepare, daemon=True) + thread.start() + + return jsonify({ + "success": True, + "data": { + "simulation_id": simulation_id, + "task_id": task_id, + "status": "preparing", + "message": "准备任务已启动,请通过 /api/simulation/prepare/status 查询进度", + "already_prepared": False, + "expected_entities_count": state.entities_count, # 预期的Agent总数 + "entity_types": state.entity_types # 实体类型列表 + } + }) + + except ValueError as e: + return jsonify({ + "success": False, + "error": str(e) + }), 404 + + except Exception as e: + logger.error(f"启动准备任务失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('/prepare/status', methods=['POST']) +def get_prepare_status(): + """ + 查询准备任务进度 + + 支持两种查询方式: + 1. 通过task_id查询正在进行的任务进度 + 2. 通过simulation_id检查是否已有完成的准备工作 + + 请求(JSON): + { + "task_id": "task_xxxx", // 可选,prepare返回的task_id + "simulation_id": "sim_xxxx" // 可选,模拟ID(用于检查已完成的准备) + } + + 返回: + { + "success": true, + "data": { + "task_id": "task_xxxx", + "status": "processing|completed|ready", + "progress": 45, + "message": "...", + "already_prepared": true|false, // 是否已有完成的准备 + "prepare_info": {...} // 已准备完成时的详细信息 + } + } + """ + from ..models.task import TaskManager + + try: + data = request.get_json() or {} + + task_id = data.get('task_id') + simulation_id = data.get('simulation_id') + + # 如果提供了simulation_id,先检查是否已准备完成 + if simulation_id: + is_prepared, prepare_info = _check_simulation_prepared(simulation_id) + if is_prepared: + return jsonify({ + "success": True, + "data": { + "simulation_id": simulation_id, + "status": "ready", + "progress": 100, + "message": "已有完成的准备工作", + "already_prepared": True, + "prepare_info": prepare_info + } + }) + + # 如果没有task_id,返回错误 + if not task_id: + if simulation_id: + # 有simulation_id但未准备完成 + return jsonify({ + "success": True, + "data": { + "simulation_id": simulation_id, + "status": "not_started", + "progress": 0, + "message": "尚未开始准备,请调用 /api/simulation/prepare 开始", + "already_prepared": False + } + }) + return jsonify({ + "success": False, + "error": "请提供 task_id 或 simulation_id" + }), 400 + + task_manager = TaskManager() + task = task_manager.get_task(task_id) + + if not task: + # 任务不存在,但如果有simulation_id,检查是否已准备完成 + if simulation_id: + is_prepared, prepare_info = _check_simulation_prepared(simulation_id) + if is_prepared: + return jsonify({ + "success": True, + "data": { + "simulation_id": simulation_id, + "task_id": task_id, + "status": "ready", + "progress": 100, + "message": "任务已完成(准备工作已存在)", + "already_prepared": True, + "prepare_info": prepare_info + } + }) + + return jsonify({ + "success": False, + "error": f"任务不存在: {task_id}" + }), 404 + + task_dict = task.to_dict() + task_dict["already_prepared"] = False + + return jsonify({ + "success": True, + "data": task_dict + }) + + except Exception as e: + logger.error(f"查询任务状态失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e) + }), 500 + + +@simulation_bp.route('/', methods=['GET']) +def get_simulation(simulation_id: str): + """获取模拟状态""" + try: + manager = SimulationManager() + state = manager.get_simulation(simulation_id) + + if not state: + return jsonify({ + "success": False, + "error": f"模拟不存在: {simulation_id}" + }), 404 + + result = state.to_dict() + + # 如果模拟已准备好,附加运行说明 + if state.status == SimulationStatus.READY: + result["run_instructions"] = manager.get_run_instructions(simulation_id) + + return jsonify({ + "success": True, + "data": result + }) + + except Exception as e: + logger.error(f"获取模拟状态失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('/list', methods=['GET']) +def list_simulations(): + """ + 列出所有模拟 + + Query参数: + project_id: 按项目ID过滤(可选) + """ + try: + project_id = request.args.get('project_id') + + manager = SimulationManager() + simulations = manager.list_simulations(project_id=project_id) + + return jsonify({ + "success": True, + "data": [s.to_dict() for s in simulations], + "count": len(simulations) + }) + + except Exception as e: + logger.error(f"列出模拟失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +def _get_report_id_for_simulation(simulation_id: str) -> str: + """ + 获取 simulation 对应的最新 report_id + + 遍历 reports 目录,找出 simulation_id 匹配的 report, + 如果有多个则返回最新的(按 created_at 排序) + + Args: + simulation_id: 模拟ID + + Returns: + report_id 或 None + """ + import json + from datetime import datetime + + # reports 目录路径:backend/uploads/reports + # __file__ 是 app/api/simulation.py,需要向上两级到 backend/ + reports_dir = os.path.join(os.path.dirname(__file__), '../../uploads/reports') + if not os.path.exists(reports_dir): + return None + + matching_reports = [] + + try: + for report_folder in os.listdir(reports_dir): + report_path = os.path.join(reports_dir, report_folder) + if not os.path.isdir(report_path): + continue + + meta_file = os.path.join(report_path, "meta.json") + if not os.path.exists(meta_file): + continue + + try: + with open(meta_file, 'r', encoding='utf-8') as f: + meta = json.load(f) + + if meta.get("simulation_id") == simulation_id: + matching_reports.append({ + "report_id": meta.get("report_id"), + "created_at": meta.get("created_at", ""), + "status": meta.get("status", "") + }) + except Exception: + continue + + if not matching_reports: + return None + + # 按创建时间倒序排序,返回最新的 + matching_reports.sort(key=lambda x: x.get("created_at", ""), reverse=True) + return matching_reports[0].get("report_id") + + except Exception as e: + logger.warning(f"查找 simulation {simulation_id} 的 report 失败: {e}") + return None + + +@simulation_bp.route('/history', methods=['GET']) +def get_simulation_history(): + """ + 获取历史模拟列表(带项目详情) + + 用于首页历史项目展示,返回包含项目名称、描述等丰富信息的模拟列表 + + Query参数: + limit: 返回数量限制(默认20) + + 返回: + { + "success": true, + "data": [ + { + "simulation_id": "sim_xxxx", + "project_id": "proj_xxxx", + "project_name": "武大舆情分析", + "simulation_requirement": "如果武汉大学发布...", + "status": "completed", + "entities_count": 68, + "profiles_count": 68, + "entity_types": ["Student", "Professor", ...], + "created_at": "2024-12-10", + "updated_at": "2024-12-10", + "total_rounds": 120, + "current_round": 120, + "report_id": "report_xxxx", + "version": "v1.0.2" + }, + ... + ], + "count": 7 + } + """ + try: + limit = request.args.get('limit', 20, type=int) + + manager = SimulationManager() + simulations = manager.list_simulations()[:limit] + + # 增强模拟数据,只从 Simulation 文件读取 + enriched_simulations = [] + for sim in simulations: + sim_dict = sim.to_dict() + + # 获取模拟配置信息(从 simulation_config.json 读取 simulation_requirement) + config = manager.get_simulation_config(sim.simulation_id) + if config: + sim_dict["simulation_requirement"] = config.get("simulation_requirement", "") + time_config = config.get("time_config", {}) + sim_dict["total_simulation_hours"] = time_config.get("total_simulation_hours", 0) + # 推荐轮数(后备值) + recommended_rounds = int( + time_config.get("total_simulation_hours", 0) * 60 / + max(time_config.get("minutes_per_round", 60), 1) + ) + else: + sim_dict["simulation_requirement"] = "" + sim_dict["total_simulation_hours"] = 0 + recommended_rounds = 0 + + # 获取运行状态(从 run_state.json 读取用户设置的实际轮数) + run_state = SimulationRunner.get_run_state(sim.simulation_id) + if run_state: + sim_dict["current_round"] = run_state.current_round + sim_dict["runner_status"] = run_state.runner_status.value + # 使用用户设置的 total_rounds,若无则使用推荐轮数 + sim_dict["total_rounds"] = run_state.total_rounds if run_state.total_rounds > 0 else recommended_rounds + else: + sim_dict["current_round"] = 0 + sim_dict["runner_status"] = "idle" + sim_dict["total_rounds"] = recommended_rounds + + # 获取关联项目的文件列表(最多3个) + project = ProjectManager.get_project(sim.project_id) + if project and hasattr(project, 'files') and project.files: + sim_dict["files"] = [ + {"filename": f.get("filename", "未知文件")} + for f in project.files[:3] + ] + else: + sim_dict["files"] = [] + + # 获取关联的 report_id(查找该 simulation 最新的 report) + sim_dict["report_id"] = _get_report_id_for_simulation(sim.simulation_id) + + # 添加版本号 + sim_dict["version"] = "v1.0.2" + + # 格式化日期 + try: + created_date = sim_dict.get("created_at", "")[:10] + sim_dict["created_date"] = created_date + except: + sim_dict["created_date"] = "" + + enriched_simulations.append(sim_dict) + + return jsonify({ + "success": True, + "data": enriched_simulations, + "count": len(enriched_simulations) + }) + + except Exception as e: + logger.error(f"获取历史模拟失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('//profiles', methods=['GET']) +def get_simulation_profiles(simulation_id: str): + """ + 获取模拟的Agent Profile + + Query参数: + platform: 平台类型(reddit/twitter,默认reddit) + """ + try: + platform = request.args.get('platform', 'reddit') + + manager = SimulationManager() + profiles = manager.get_profiles(simulation_id, platform=platform) + + return jsonify({ + "success": True, + "data": { + "platform": platform, + "count": len(profiles), + "profiles": profiles + } + }) + + except ValueError as e: + return jsonify({ + "success": False, + "error": str(e) + }), 404 + + except Exception as e: + logger.error(f"获取Profile失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('//profiles/realtime', methods=['GET']) +def get_simulation_profiles_realtime(simulation_id: str): + """ + 实时获取模拟的Agent Profile(用于在生成过程中实时查看进度) + + 与 /profiles 接口的区别: + - 直接读取文件,不经过 SimulationManager + - 适用于生成过程中的实时查看 + - 返回额外的元数据(如文件修改时间、是否正在生成等) + + Query参数: + platform: 平台类型(reddit/twitter,默认reddit) + + 返回: + { + "success": true, + "data": { + "simulation_id": "sim_xxxx", + "platform": "reddit", + "count": 15, + "total_expected": 93, // 预期总数(如果有) + "is_generating": true, // 是否正在生成 + "file_exists": true, + "file_modified_at": "2025-12-04T18:20:00", + "profiles": [...] + } + } + """ + import json + import csv + from datetime import datetime + + try: + platform = request.args.get('platform', 'reddit') + + # 获取模拟目录 + sim_dir = os.path.join(Config.OASIS_SIMULATION_DATA_DIR, simulation_id) + + if not os.path.exists(sim_dir): + return jsonify({ + "success": False, + "error": f"模拟不存在: {simulation_id}" + }), 404 + + # 确定文件路径 + if platform == "reddit": + profiles_file = os.path.join(sim_dir, "reddit_profiles.json") + else: + profiles_file = os.path.join(sim_dir, "twitter_profiles.csv") + + # 检查文件是否存在 + file_exists = os.path.exists(profiles_file) + profiles = [] + file_modified_at = None + + if file_exists: + # 获取文件修改时间 + file_stat = os.stat(profiles_file) + file_modified_at = datetime.fromtimestamp(file_stat.st_mtime).isoformat() + + try: + if platform == "reddit": + with open(profiles_file, 'r', encoding='utf-8') as f: + profiles = json.load(f) + else: + with open(profiles_file, 'r', encoding='utf-8') as f: + reader = csv.DictReader(f) + profiles = list(reader) + except (json.JSONDecodeError, Exception) as e: + logger.warning(f"读取 profiles 文件失败(可能正在写入中): {e}") + profiles = [] + + # 检查是否正在生成(通过 state.json 判断) + is_generating = False + total_expected = None + + state_file = os.path.join(sim_dir, "state.json") + if os.path.exists(state_file): + try: + with open(state_file, 'r', encoding='utf-8') as f: + state_data = json.load(f) + status = state_data.get("status", "") + is_generating = status == "preparing" + total_expected = state_data.get("entities_count") + except Exception: + pass + + return jsonify({ + "success": True, + "data": { + "simulation_id": simulation_id, + "platform": platform, + "count": len(profiles), + "total_expected": total_expected, + "is_generating": is_generating, + "file_exists": file_exists, + "file_modified_at": file_modified_at, + "profiles": profiles + } + }) + + except Exception as e: + logger.error(f"实时获取Profile失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('//config/realtime', methods=['GET']) +def get_simulation_config_realtime(simulation_id: str): + """ + 实时获取模拟配置(用于在生成过程中实时查看进度) + + 与 /config 接口的区别: + - 直接读取文件,不经过 SimulationManager + - 适用于生成过程中的实时查看 + - 返回额外的元数据(如文件修改时间、是否正在生成等) + - 即使配置还没生成完也能返回部分信息 + + 返回: + { + "success": true, + "data": { + "simulation_id": "sim_xxxx", + "file_exists": true, + "file_modified_at": "2025-12-04T18:20:00", + "is_generating": true, // 是否正在生成 + "generation_stage": "generating_config", // 当前生成阶段 + "config": {...} // 配置内容(如果存在) + } + } + """ + import json + from datetime import datetime + + try: + # 获取模拟目录 + sim_dir = os.path.join(Config.OASIS_SIMULATION_DATA_DIR, simulation_id) + + if not os.path.exists(sim_dir): + return jsonify({ + "success": False, + "error": f"模拟不存在: {simulation_id}" + }), 404 + + # 配置文件路径 + config_file = os.path.join(sim_dir, "simulation_config.json") + + # 检查文件是否存在 + file_exists = os.path.exists(config_file) + config = None + file_modified_at = None + + if file_exists: + # 获取文件修改时间 + file_stat = os.stat(config_file) + file_modified_at = datetime.fromtimestamp(file_stat.st_mtime).isoformat() + + try: + with open(config_file, 'r', encoding='utf-8') as f: + config = json.load(f) + except (json.JSONDecodeError, Exception) as e: + logger.warning(f"读取 config 文件失败(可能正在写入中): {e}") + config = None + + # 检查是否正在生成(通过 state.json 判断) + is_generating = False + generation_stage = None + config_generated = False + + state_file = os.path.join(sim_dir, "state.json") + if os.path.exists(state_file): + try: + with open(state_file, 'r', encoding='utf-8') as f: + state_data = json.load(f) + status = state_data.get("status", "") + is_generating = status == "preparing" + config_generated = state_data.get("config_generated", False) + + # 判断当前阶段 + if is_generating: + if state_data.get("profiles_generated", False): + generation_stage = "generating_config" + else: + generation_stage = "generating_profiles" + elif status == "ready": + generation_stage = "completed" + except Exception: + pass + + # 构建返回数据 + response_data = { + "simulation_id": simulation_id, + "file_exists": file_exists, + "file_modified_at": file_modified_at, + "is_generating": is_generating, + "generation_stage": generation_stage, + "config_generated": config_generated, + "config": config + } + + # 如果配置存在,提取一些关键统计信息 + if config: + response_data["summary"] = { + "total_agents": len(config.get("agent_configs", [])), + "simulation_hours": config.get("time_config", {}).get("total_simulation_hours"), + "initial_posts_count": len(config.get("event_config", {}).get("initial_posts", [])), + "hot_topics_count": len(config.get("event_config", {}).get("hot_topics", [])), + "has_twitter_config": "twitter_config" in config, + "has_reddit_config": "reddit_config" in config, + "generated_at": config.get("generated_at"), + "llm_model": config.get("llm_model") + } + + return jsonify({ + "success": True, + "data": response_data + }) + + except Exception as e: + logger.error(f"实时获取Config失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('//config', methods=['GET']) +def get_simulation_config(simulation_id: str): + """ + 获取模拟配置(LLM智能生成的完整配置) + + 返回包含: + - time_config: 时间配置(模拟时长、轮次、高峰/低谷时段) + - agent_configs: 每个Agent的活动配置(活跃度、发言频率、立场等) + - event_config: 事件配置(初始帖子、热点话题) + - platform_configs: 平台配置 + - generation_reasoning: LLM的配置推理说明 + """ + try: + manager = SimulationManager() + config = manager.get_simulation_config(simulation_id) + + if not config: + return jsonify({ + "success": False, + "error": f"模拟配置不存在,请先调用 /prepare 接口" + }), 404 + + return jsonify({ + "success": True, + "data": config + }) + + except Exception as e: + logger.error(f"获取配置失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('//config/download', methods=['GET']) +def download_simulation_config(simulation_id: str): + """下载模拟配置文件""" + try: + manager = SimulationManager() + sim_dir = manager._get_simulation_dir(simulation_id) + config_path = os.path.join(sim_dir, "simulation_config.json") + + if not os.path.exists(config_path): + return jsonify({ + "success": False, + "error": "配置文件不存在,请先调用 /prepare 接口" + }), 404 + + return send_file( + config_path, + as_attachment=True, + download_name="simulation_config.json" + ) + + except Exception as e: + logger.error(f"下载配置失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('/script//download', methods=['GET']) +def download_simulation_script(script_name: str): + """ + 下载模拟运行脚本文件(通用脚本,位于 backend/scripts/) + + script_name可选值: + - run_twitter_simulation.py + - run_reddit_simulation.py + - run_parallel_simulation.py + - action_logger.py + """ + try: + # 脚本位于 backend/scripts/ 目录 + scripts_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../scripts')) + + # 验证脚本名称 + allowed_scripts = [ + "run_twitter_simulation.py", + "run_reddit_simulation.py", + "run_parallel_simulation.py", + "action_logger.py" + ] + + if script_name not in allowed_scripts: + return jsonify({ + "success": False, + "error": f"未知脚本: {script_name},可选: {allowed_scripts}" + }), 400 + + script_path = os.path.join(scripts_dir, script_name) + + if not os.path.exists(script_path): + return jsonify({ + "success": False, + "error": f"脚本文件不存在: {script_name}" + }), 404 + + return send_file( + script_path, + as_attachment=True, + download_name=script_name + ) + + except Exception as e: + logger.error(f"下载脚本失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +# ============== Profile生成接口(独立使用) ============== + +@simulation_bp.route('/generate-profiles', methods=['POST']) +def generate_profiles(): + """ + 直接从图谱生成OASIS Agent Profile(不创建模拟) + + 请求(JSON): + { + "graph_id": "mirofish_xxxx", // 必填 + "entity_types": ["Student"], // 可选 + "use_llm": true, // 可选 + "platform": "reddit" // 可选 + } + """ + try: + data = request.get_json() or {} + + graph_id = data.get('graph_id') + if not graph_id: + return jsonify({ + "success": False, + "error": "请提供 graph_id" + }), 400 + + entity_types = data.get('entity_types') + use_llm = data.get('use_llm', True) + platform = data.get('platform', 'reddit') + + reader = ZepEntityReader() + filtered = reader.filter_defined_entities( + graph_id=graph_id, + defined_entity_types=entity_types, + enrich_with_edges=True + ) + + if filtered.filtered_count == 0: + return jsonify({ + "success": False, + "error": "没有找到符合条件的实体" + }), 400 + + generator = OasisProfileGenerator() + profiles = generator.generate_profiles_from_entities( + entities=filtered.entities, + use_llm=use_llm + ) + + if platform == "reddit": + profiles_data = [p.to_reddit_format() for p in profiles] + elif platform == "twitter": + profiles_data = [p.to_twitter_format() for p in profiles] + else: + profiles_data = [p.to_dict() for p in profiles] + + return jsonify({ + "success": True, + "data": { + "platform": platform, + "entity_types": list(filtered.entity_types), + "count": len(profiles_data), + "profiles": profiles_data + } + }) + + except Exception as e: + logger.error(f"生成Profile失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +# ============== 模拟运行控制接口 ============== + +@simulation_bp.route('/start', methods=['POST']) +def start_simulation(): + """ + 开始运行模拟 + + 请求(JSON): + { + "simulation_id": "sim_xxxx", // 必填,模拟ID + "platform": "parallel", // 可选: twitter / reddit / parallel (默认) + "max_rounds": 100, // 可选: 最大模拟轮数,用于截断过长的模拟 + "enable_graph_memory_update": false, // 可选: 是否将Agent活动动态更新到Zep图谱记忆 + "force": false // 可选: 强制重新开始(会停止运行中的模拟并清理日志) + } + + 关于 force 参数: + - 启用后,如果模拟正在运行或已完成,会先停止并清理运行日志 + - 清理的内容包括:run_state.json, actions.jsonl, simulation.log 等 + - 不会清理配置文件(simulation_config.json)和 profile 文件 + - 适用于需要重新运行模拟的场景 + + 关于 enable_graph_memory_update: + - 启用后,模拟中所有Agent的活动(发帖、评论、点赞等)都会实时更新到Zep图谱 + - 这可以让图谱"记住"模拟过程,用于后续分析或AI对话 + - 需要模拟关联的项目有有效的 graph_id + - 采用批量更新机制,减少API调用次数 + + 返回: + { + "success": true, + "data": { + "simulation_id": "sim_xxxx", + "runner_status": "running", + "process_pid": 12345, + "twitter_running": true, + "reddit_running": true, + "started_at": "2025-12-01T10:00:00", + "graph_memory_update_enabled": true, // 是否启用了图谱记忆更新 + "force_restarted": true // 是否是强制重新开始 + } + } + """ + try: + data = request.get_json() or {} + + simulation_id = data.get('simulation_id') + if not simulation_id: + return jsonify({ + "success": False, + "error": "请提供 simulation_id" + }), 400 + + platform = data.get('platform', 'parallel') + max_rounds = data.get('max_rounds') # 可选:最大模拟轮数 + enable_graph_memory_update = data.get('enable_graph_memory_update', False) # 可选:是否启用图谱记忆更新 + force = data.get('force', False) # 可选:强制重新开始 + + # 验证 max_rounds 参数 + if max_rounds is not None: + try: + max_rounds = int(max_rounds) + if max_rounds <= 0: + return jsonify({ + "success": False, + "error": "max_rounds 必须是正整数" + }), 400 + except (ValueError, TypeError): + return jsonify({ + "success": False, + "error": "max_rounds 必须是有效的整数" + }), 400 + + if platform not in ['twitter', 'reddit', 'parallel']: + return jsonify({ + "success": False, + "error": f"无效的平台类型: {platform},可选: twitter/reddit/parallel" + }), 400 + + # 检查模拟是否已准备好 + manager = SimulationManager() + state = manager.get_simulation(simulation_id) + + if not state: + return jsonify({ + "success": False, + "error": f"模拟不存在: {simulation_id}" + }), 404 + + force_restarted = False + + # 智能处理状态:如果准备工作已完成,允许重新启动 + if state.status != SimulationStatus.READY: + # 检查准备工作是否已完成 + is_prepared, prepare_info = _check_simulation_prepared(simulation_id) + + if is_prepared: + # 准备工作已完成,检查是否有正在运行的进程 + if state.status == SimulationStatus.RUNNING: + # 检查模拟进程是否真的在运行 + run_state = SimulationRunner.get_run_state(simulation_id) + if run_state and run_state.runner_status.value == "running": + # 进程确实在运行 + if force: + # 强制模式:停止运行中的模拟 + logger.info(f"强制模式:停止运行中的模拟 {simulation_id}") + try: + SimulationRunner.stop_simulation(simulation_id) + except Exception as e: + logger.warning(f"停止模拟时出现警告: {str(e)}") + else: + return jsonify({ + "success": False, + "error": f"模拟正在运行中,请先调用 /stop 接口停止,或使用 force=true 强制重新开始" + }), 400 + + # 如果是强制模式,清理运行日志 + if force: + logger.info(f"强制模式:清理模拟日志 {simulation_id}") + cleanup_result = SimulationRunner.cleanup_simulation_logs(simulation_id) + if not cleanup_result.get("success"): + logger.warning(f"清理日志时出现警告: {cleanup_result.get('errors')}") + force_restarted = True + + # 进程不存在或已结束,重置状态为 ready + logger.info(f"模拟 {simulation_id} 准备工作已完成,重置状态为 ready(原状态: {state.status.value})") + state.status = SimulationStatus.READY + manager._save_simulation_state(state) + else: + # 准备工作未完成 + return jsonify({ + "success": False, + "error": f"模拟未准备好,当前状态: {state.status.value},请先调用 /prepare 接口" + }), 400 + + # 获取图谱ID(用于图谱记忆更新) + graph_id = None + if enable_graph_memory_update: + # 从模拟状态或项目中获取 graph_id + graph_id = state.graph_id + if not graph_id: + # 尝试从项目中获取 + project = ProjectManager.get_project(state.project_id) + if project: + graph_id = project.graph_id + + if not graph_id: + return jsonify({ + "success": False, + "error": "启用图谱记忆更新需要有效的 graph_id,请确保项目已构建图谱" + }), 400 + + logger.info(f"启用图谱记忆更新: simulation_id={simulation_id}, graph_id={graph_id}") + + # 启动模拟 + run_state = SimulationRunner.start_simulation( + simulation_id=simulation_id, + platform=platform, + max_rounds=max_rounds, + enable_graph_memory_update=enable_graph_memory_update, + graph_id=graph_id + ) + + # 更新模拟状态 + state.status = SimulationStatus.RUNNING + manager._save_simulation_state(state) + + response_data = run_state.to_dict() + if max_rounds: + response_data['max_rounds_applied'] = max_rounds + response_data['graph_memory_update_enabled'] = enable_graph_memory_update + response_data['force_restarted'] = force_restarted + if enable_graph_memory_update: + response_data['graph_id'] = graph_id + + return jsonify({ + "success": True, + "data": response_data + }) + + except ValueError as e: + return jsonify({ + "success": False, + "error": str(e) + }), 400 + + except Exception as e: + logger.error(f"启动模拟失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('/stop', methods=['POST']) +def stop_simulation(): + """ + 停止模拟 + + 请求(JSON): + { + "simulation_id": "sim_xxxx" // 必填,模拟ID + } + + 返回: + { + "success": true, + "data": { + "simulation_id": "sim_xxxx", + "runner_status": "stopped", + "completed_at": "2025-12-01T12:00:00" + } + } + """ + try: + data = request.get_json() or {} + + simulation_id = data.get('simulation_id') + if not simulation_id: + return jsonify({ + "success": False, + "error": "请提供 simulation_id" + }), 400 + + run_state = SimulationRunner.stop_simulation(simulation_id) + + # 更新模拟状态 + manager = SimulationManager() + state = manager.get_simulation(simulation_id) + if state: + state.status = SimulationStatus.PAUSED + manager._save_simulation_state(state) + + return jsonify({ + "success": True, + "data": run_state.to_dict() + }) + + except ValueError as e: + return jsonify({ + "success": False, + "error": str(e) + }), 400 + + except Exception as e: + logger.error(f"停止模拟失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +# ============== 实时状态监控接口 ============== + +@simulation_bp.route('//run-status', methods=['GET']) +def get_run_status(simulation_id: str): + """ + 获取模拟运行实时状态(用于前端轮询) + + 返回: + { + "success": true, + "data": { + "simulation_id": "sim_xxxx", + "runner_status": "running", + "current_round": 5, + "total_rounds": 144, + "progress_percent": 3.5, + "simulated_hours": 2, + "total_simulation_hours": 72, + "twitter_running": true, + "reddit_running": true, + "twitter_actions_count": 150, + "reddit_actions_count": 200, + "total_actions_count": 350, + "started_at": "2025-12-01T10:00:00", + "updated_at": "2025-12-01T10:30:00" + } + } + """ + try: + run_state = SimulationRunner.get_run_state(simulation_id) + + if not run_state: + return jsonify({ + "success": True, + "data": { + "simulation_id": simulation_id, + "runner_status": "idle", + "current_round": 0, + "total_rounds": 0, + "progress_percent": 0, + "twitter_actions_count": 0, + "reddit_actions_count": 0, + "total_actions_count": 0, + } + }) + + return jsonify({ + "success": True, + "data": run_state.to_dict() + }) + + except Exception as e: + logger.error(f"获取运行状态失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('//run-status/detail', methods=['GET']) +def get_run_status_detail(simulation_id: str): + """ + 获取模拟运行详细状态(包含所有动作) + + 用于前端展示实时动态 + + Query参数: + platform: 过滤平台(twitter/reddit,可选) + + 返回: + { + "success": true, + "data": { + "simulation_id": "sim_xxxx", + "runner_status": "running", + "current_round": 5, + ... + "all_actions": [ + { + "round_num": 5, + "timestamp": "2025-12-01T10:30:00", + "platform": "twitter", + "agent_id": 3, + "agent_name": "Agent Name", + "action_type": "CREATE_POST", + "action_args": {"content": "..."}, + "result": null, + "success": true + }, + ... + ], + "twitter_actions": [...], # Twitter 平台的所有动作 + "reddit_actions": [...] # Reddit 平台的所有动作 + } + } + """ + try: + run_state = SimulationRunner.get_run_state(simulation_id) + platform_filter = request.args.get('platform') + + if not run_state: + return jsonify({ + "success": True, + "data": { + "simulation_id": simulation_id, + "runner_status": "idle", + "all_actions": [], + "twitter_actions": [], + "reddit_actions": [] + } + }) + + # 获取完整的动作列表 + all_actions = SimulationRunner.get_all_actions( + simulation_id=simulation_id, + platform=platform_filter + ) + + # 分平台获取动作 + twitter_actions = SimulationRunner.get_all_actions( + simulation_id=simulation_id, + platform="twitter" + ) if not platform_filter or platform_filter == "twitter" else [] + + reddit_actions = SimulationRunner.get_all_actions( + simulation_id=simulation_id, + platform="reddit" + ) if not platform_filter or platform_filter == "reddit" else [] + + # 获取当前轮次的动作(recent_actions 只展示最新一轮) + current_round = run_state.current_round + recent_actions = SimulationRunner.get_all_actions( + simulation_id=simulation_id, + platform=platform_filter, + round_num=current_round + ) if current_round > 0 else [] + + # 获取基础状态信息 + result = run_state.to_dict() + result["all_actions"] = [a.to_dict() for a in all_actions] + result["twitter_actions"] = [a.to_dict() for a in twitter_actions] + result["reddit_actions"] = [a.to_dict() for a in reddit_actions] + result["rounds_count"] = len(run_state.rounds) + # recent_actions 只展示当前最新一轮两个平台的内容 + result["recent_actions"] = [a.to_dict() for a in recent_actions] + + return jsonify({ + "success": True, + "data": result + }) + + except Exception as e: + logger.error(f"获取详细状态失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('//actions', methods=['GET']) +def get_simulation_actions(simulation_id: str): + """ + 获取模拟中的Agent动作历史 + + Query参数: + limit: 返回数量(默认100) + offset: 偏移量(默认0) + platform: 过滤平台(twitter/reddit) + agent_id: 过滤Agent ID + round_num: 过滤轮次 + + 返回: + { + "success": true, + "data": { + "count": 100, + "actions": [...] + } + } + """ + try: + limit = request.args.get('limit', 100, type=int) + offset = request.args.get('offset', 0, type=int) + platform = request.args.get('platform') + agent_id = request.args.get('agent_id', type=int) + round_num = request.args.get('round_num', type=int) + + actions = SimulationRunner.get_actions( + simulation_id=simulation_id, + limit=limit, + offset=offset, + platform=platform, + agent_id=agent_id, + round_num=round_num + ) + + return jsonify({ + "success": True, + "data": { + "count": len(actions), + "actions": [a.to_dict() for a in actions] + } + }) + + except Exception as e: + logger.error(f"获取动作历史失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('//timeline', methods=['GET']) +def get_simulation_timeline(simulation_id: str): + """ + 获取模拟时间线(按轮次汇总) + + 用于前端展示进度条和时间线视图 + + Query参数: + start_round: 起始轮次(默认0) + end_round: 结束轮次(默认全部) + + 返回每轮的汇总信息 + """ + try: + start_round = request.args.get('start_round', 0, type=int) + end_round = request.args.get('end_round', type=int) + + timeline = SimulationRunner.get_timeline( + simulation_id=simulation_id, + start_round=start_round, + end_round=end_round + ) + + return jsonify({ + "success": True, + "data": { + "rounds_count": len(timeline), + "timeline": timeline + } + }) + + except Exception as e: + logger.error(f"获取时间线失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('//agent-stats', methods=['GET']) +def get_agent_stats(simulation_id: str): + """ + 获取每个Agent的统计信息 + + 用于前端展示Agent活跃度排行、动作分布等 + """ + try: + stats = SimulationRunner.get_agent_stats(simulation_id) + + return jsonify({ + "success": True, + "data": { + "agents_count": len(stats), + "stats": stats + } + }) + + except Exception as e: + logger.error(f"获取Agent统计失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +# ============== 数据库查询接口 ============== + +@simulation_bp.route('//posts', methods=['GET']) +def get_simulation_posts(simulation_id: str): + """ + 获取模拟中的帖子 + + Query参数: + platform: 平台类型(twitter/reddit) + limit: 返回数量(默认50) + offset: 偏移量 + + 返回帖子列表(从SQLite数据库读取) + """ + try: + platform = request.args.get('platform', 'reddit') + limit = request.args.get('limit', 50, type=int) + offset = request.args.get('offset', 0, type=int) + + sim_dir = os.path.join( + os.path.dirname(__file__), + f'../../uploads/simulations/{simulation_id}' + ) + + db_file = f"{platform}_simulation.db" + db_path = os.path.join(sim_dir, db_file) + + if not os.path.exists(db_path): + return jsonify({ + "success": True, + "data": { + "platform": platform, + "count": 0, + "posts": [], + "message": "数据库不存在,模拟可能尚未运行" + } + }) + + import sqlite3 + conn = sqlite3.connect(db_path) + conn.row_factory = sqlite3.Row + cursor = conn.cursor() + + try: + cursor.execute(""" + SELECT * FROM post + ORDER BY created_at DESC + LIMIT ? OFFSET ? + """, (limit, offset)) + + posts = [dict(row) for row in cursor.fetchall()] + + cursor.execute("SELECT COUNT(*) FROM post") + total = cursor.fetchone()[0] + + except sqlite3.OperationalError: + posts = [] + total = 0 + + conn.close() + + return jsonify({ + "success": True, + "data": { + "platform": platform, + "total": total, + "count": len(posts), + "posts": posts + } + }) + + except Exception as e: + logger.error(f"获取帖子失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('//comments', methods=['GET']) +def get_simulation_comments(simulation_id: str): + """ + 获取模拟中的评论(仅Reddit) + + Query参数: + post_id: 过滤帖子ID(可选) + limit: 返回数量 + offset: 偏移量 + """ + try: + post_id = request.args.get('post_id') + limit = request.args.get('limit', 50, type=int) + offset = request.args.get('offset', 0, type=int) + + sim_dir = os.path.join( + os.path.dirname(__file__), + f'../../uploads/simulations/{simulation_id}' + ) + + db_path = os.path.join(sim_dir, "reddit_simulation.db") + + if not os.path.exists(db_path): + return jsonify({ + "success": True, + "data": { + "count": 0, + "comments": [] + } + }) + + import sqlite3 + conn = sqlite3.connect(db_path) + conn.row_factory = sqlite3.Row + cursor = conn.cursor() + + try: + if post_id: + cursor.execute(""" + SELECT * FROM comment + WHERE post_id = ? + ORDER BY created_at DESC + LIMIT ? OFFSET ? + """, (post_id, limit, offset)) + else: + cursor.execute(""" + SELECT * FROM comment + ORDER BY created_at DESC + LIMIT ? OFFSET ? + """, (limit, offset)) + + comments = [dict(row) for row in cursor.fetchall()] + + except sqlite3.OperationalError: + comments = [] + + conn.close() + + return jsonify({ + "success": True, + "data": { + "count": len(comments), + "comments": comments + } + }) + + except Exception as e: + logger.error(f"获取评论失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +# ============== Interview 采访接口 ============== + +@simulation_bp.route('/interview', methods=['POST']) +def interview_agent(): + """ + 采访单个Agent + + 注意:此功能需要模拟环境处于运行状态(完成模拟循环后进入等待命令模式) + + 请求(JSON): + { + "simulation_id": "sim_xxxx", // 必填,模拟ID + "agent_id": 0, // 必填,Agent ID + "prompt": "你对这件事有什么看法?", // 必填,采访问题 + "platform": "twitter", // 可选,指定平台(twitter/reddit) + // 不指定时:双平台模拟同时采访两个平台 + "timeout": 60 // 可选,超时时间(秒),默认60 + } + + 返回(不指定platform,双平台模式): + { + "success": true, + "data": { + "agent_id": 0, + "prompt": "你对这件事有什么看法?", + "result": { + "agent_id": 0, + "prompt": "...", + "platforms": { + "twitter": {"agent_id": 0, "response": "...", "platform": "twitter"}, + "reddit": {"agent_id": 0, "response": "...", "platform": "reddit"} + } + }, + "timestamp": "2025-12-08T10:00:01" + } + } + + 返回(指定platform): + { + "success": true, + "data": { + "agent_id": 0, + "prompt": "你对这件事有什么看法?", + "result": { + "agent_id": 0, + "response": "我认为...", + "platform": "twitter", + "timestamp": "2025-12-08T10:00:00" + }, + "timestamp": "2025-12-08T10:00:01" + } + } + """ + try: + data = request.get_json() or {} + + simulation_id = data.get('simulation_id') + agent_id = data.get('agent_id') + prompt = data.get('prompt') + platform = data.get('platform') # 可选:twitter/reddit/None + timeout = data.get('timeout', 60) + + if not simulation_id: + return jsonify({ + "success": False, + "error": "请提供 simulation_id" + }), 400 + + if agent_id is None: + return jsonify({ + "success": False, + "error": "请提供 agent_id" + }), 400 + + if not prompt: + return jsonify({ + "success": False, + "error": "请提供 prompt(采访问题)" + }), 400 + + # 验证platform参数 + if platform and platform not in ("twitter", "reddit"): + return jsonify({ + "success": False, + "error": "platform 参数只能是 'twitter' 或 'reddit'" + }), 400 + + # 检查环境状态 + if not SimulationRunner.check_env_alive(simulation_id): + return jsonify({ + "success": False, + "error": "模拟环境未运行或已关闭。请确保模拟已完成并进入等待命令模式。" + }), 400 + + # 优化prompt,添加前缀避免Agent调用工具 + optimized_prompt = optimize_interview_prompt(prompt) + + result = SimulationRunner.interview_agent( + simulation_id=simulation_id, + agent_id=agent_id, + prompt=optimized_prompt, + platform=platform, + timeout=timeout + ) + + return jsonify({ + "success": result.get("success", False), + "data": result + }) + + except ValueError as e: + return jsonify({ + "success": False, + "error": str(e) + }), 400 + + except TimeoutError as e: + return jsonify({ + "success": False, + "error": f"等待Interview响应超时: {str(e)}" + }), 504 + + except Exception as e: + logger.error(f"Interview失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('/interview/batch', methods=['POST']) +def interview_agents_batch(): + """ + 批量采访多个Agent + + 注意:此功能需要模拟环境处于运行状态 + + 请求(JSON): + { + "simulation_id": "sim_xxxx", // 必填,模拟ID + "interviews": [ // 必填,采访列表 + { + "agent_id": 0, + "prompt": "你对A有什么看法?", + "platform": "twitter" // 可选,指定该Agent的采访平台 + }, + { + "agent_id": 1, + "prompt": "你对B有什么看法?" // 不指定platform则使用默认值 + } + ], + "platform": "reddit", // 可选,默认平台(被每项的platform覆盖) + // 不指定时:双平台模拟每个Agent同时采访两个平台 + "timeout": 120 // 可选,超时时间(秒),默认120 + } + + 返回: + { + "success": true, + "data": { + "interviews_count": 2, + "result": { + "interviews_count": 4, + "results": { + "twitter_0": {"agent_id": 0, "response": "...", "platform": "twitter"}, + "reddit_0": {"agent_id": 0, "response": "...", "platform": "reddit"}, + "twitter_1": {"agent_id": 1, "response": "...", "platform": "twitter"}, + "reddit_1": {"agent_id": 1, "response": "...", "platform": "reddit"} + } + }, + "timestamp": "2025-12-08T10:00:01" + } + } + """ + try: + data = request.get_json() or {} + + simulation_id = data.get('simulation_id') + interviews = data.get('interviews') + platform = data.get('platform') # 可选:twitter/reddit/None + timeout = data.get('timeout', 120) + + if not simulation_id: + return jsonify({ + "success": False, + "error": "请提供 simulation_id" + }), 400 + + if not interviews or not isinstance(interviews, list): + return jsonify({ + "success": False, + "error": "请提供 interviews(采访列表)" + }), 400 + + # 验证platform参数 + if platform and platform not in ("twitter", "reddit"): + return jsonify({ + "success": False, + "error": "platform 参数只能是 'twitter' 或 'reddit'" + }), 400 + + # 验证每个采访项 + for i, interview in enumerate(interviews): + if 'agent_id' not in interview: + return jsonify({ + "success": False, + "error": f"采访列表第{i+1}项缺少 agent_id" + }), 400 + if 'prompt' not in interview: + return jsonify({ + "success": False, + "error": f"采访列表第{i+1}项缺少 prompt" + }), 400 + # 验证每项的platform(如果有) + item_platform = interview.get('platform') + if item_platform and item_platform not in ("twitter", "reddit"): + return jsonify({ + "success": False, + "error": f"采访列表第{i+1}项的platform只能是 'twitter' 或 'reddit'" + }), 400 + + # 检查环境状态 + if not SimulationRunner.check_env_alive(simulation_id): + return jsonify({ + "success": False, + "error": "模拟环境未运行或已关闭。请确保模拟已完成并进入等待命令模式。" + }), 400 + + # 优化每个采访项的prompt,添加前缀避免Agent调用工具 + optimized_interviews = [] + for interview in interviews: + optimized_interview = interview.copy() + optimized_interview['prompt'] = optimize_interview_prompt(interview.get('prompt', '')) + optimized_interviews.append(optimized_interview) + + result = SimulationRunner.interview_agents_batch( + simulation_id=simulation_id, + interviews=optimized_interviews, + platform=platform, + timeout=timeout + ) + + return jsonify({ + "success": result.get("success", False), + "data": result + }) + + except ValueError as e: + return jsonify({ + "success": False, + "error": str(e) + }), 400 + + except TimeoutError as e: + return jsonify({ + "success": False, + "error": f"等待批量Interview响应超时: {str(e)}" + }), 504 + + except Exception as e: + logger.error(f"批量Interview失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('/interview/all', methods=['POST']) +def interview_all_agents(): + """ + 全局采访 - 使用相同问题采访所有Agent + + 注意:此功能需要模拟环境处于运行状态 + + 请求(JSON): + { + "simulation_id": "sim_xxxx", // 必填,模拟ID + "prompt": "你对这件事整体有什么看法?", // 必填,采访问题(所有Agent使用相同问题) + "platform": "reddit", // 可选,指定平台(twitter/reddit) + // 不指定时:双平台模拟每个Agent同时采访两个平台 + "timeout": 180 // 可选,超时时间(秒),默认180 + } + + 返回: + { + "success": true, + "data": { + "interviews_count": 50, + "result": { + "interviews_count": 100, + "results": { + "twitter_0": {"agent_id": 0, "response": "...", "platform": "twitter"}, + "reddit_0": {"agent_id": 0, "response": "...", "platform": "reddit"}, + ... + } + }, + "timestamp": "2025-12-08T10:00:01" + } + } + """ + try: + data = request.get_json() or {} + + simulation_id = data.get('simulation_id') + prompt = data.get('prompt') + platform = data.get('platform') # 可选:twitter/reddit/None + timeout = data.get('timeout', 180) + + if not simulation_id: + return jsonify({ + "success": False, + "error": "请提供 simulation_id" + }), 400 + + if not prompt: + return jsonify({ + "success": False, + "error": "请提供 prompt(采访问题)" + }), 400 + + # 验证platform参数 + if platform and platform not in ("twitter", "reddit"): + return jsonify({ + "success": False, + "error": "platform 参数只能是 'twitter' 或 'reddit'" + }), 400 + + # 检查环境状态 + if not SimulationRunner.check_env_alive(simulation_id): + return jsonify({ + "success": False, + "error": "模拟环境未运行或已关闭。请确保模拟已完成并进入等待命令模式。" + }), 400 + + # 优化prompt,添加前缀避免Agent调用工具 + optimized_prompt = optimize_interview_prompt(prompt) + + result = SimulationRunner.interview_all_agents( + simulation_id=simulation_id, + prompt=optimized_prompt, + platform=platform, + timeout=timeout + ) + + return jsonify({ + "success": result.get("success", False), + "data": result + }) + + except ValueError as e: + return jsonify({ + "success": False, + "error": str(e) + }), 400 + + except TimeoutError as e: + return jsonify({ + "success": False, + "error": f"等待全局Interview响应超时: {str(e)}" + }), 504 + + except Exception as e: + logger.error(f"全局Interview失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('/interview/history', methods=['POST']) +def get_interview_history(): + """ + 获取Interview历史记录 + + 从模拟数据库中读取所有Interview记录 + + 请求(JSON): + { + "simulation_id": "sim_xxxx", // 必填,模拟ID + "platform": "reddit", // 可选,平台类型(reddit/twitter) + // 不指定则返回两个平台的所有历史 + "agent_id": 0, // 可选,只获取该Agent的采访历史 + "limit": 100 // 可选,返回数量,默认100 + } + + 返回: + { + "success": true, + "data": { + "count": 10, + "history": [ + { + "agent_id": 0, + "response": "我认为...", + "prompt": "你对这件事有什么看法?", + "timestamp": "2025-12-08T10:00:00", + "platform": "reddit" + }, + ... + ] + } + } + """ + try: + data = request.get_json() or {} + + simulation_id = data.get('simulation_id') + platform = data.get('platform') # 不指定则返回两个平台的历史 + agent_id = data.get('agent_id') + limit = data.get('limit', 100) + + if not simulation_id: + return jsonify({ + "success": False, + "error": "请提供 simulation_id" + }), 400 + + history = SimulationRunner.get_interview_history( + simulation_id=simulation_id, + platform=platform, + agent_id=agent_id, + limit=limit + ) + + return jsonify({ + "success": True, + "data": { + "count": len(history), + "history": history + } + }) + + except Exception as e: + logger.error(f"获取Interview历史失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('/env-status', methods=['POST']) +def get_env_status(): + """ + 获取模拟环境状态 + + 检查模拟环境是否存活(可以接收Interview命令) + + 请求(JSON): + { + "simulation_id": "sim_xxxx" // 必填,模拟ID + } + + 返回: + { + "success": true, + "data": { + "simulation_id": "sim_xxxx", + "env_alive": true, + "twitter_available": true, + "reddit_available": true, + "message": "环境正在运行,可以接收Interview命令" + } + } + """ + try: + data = request.get_json() or {} + + simulation_id = data.get('simulation_id') + + if not simulation_id: + return jsonify({ + "success": False, + "error": "请提供 simulation_id" + }), 400 + + env_alive = SimulationRunner.check_env_alive(simulation_id) + + # 获取更详细的状态信息 + env_status = SimulationRunner.get_env_status_detail(simulation_id) + + if env_alive: + message = "环境正在运行,可以接收Interview命令" + else: + message = "环境未运行或已关闭" + + return jsonify({ + "success": True, + "data": { + "simulation_id": simulation_id, + "env_alive": env_alive, + "twitter_available": env_status.get("twitter_available", False), + "reddit_available": env_status.get("reddit_available", False), + "message": message + } + }) + + except Exception as e: + logger.error(f"获取环境状态失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 + + +@simulation_bp.route('/close-env', methods=['POST']) +def close_simulation_env(): + """ + 关闭模拟环境 + + 向模拟发送关闭环境命令,使其优雅退出等待命令模式。 + + 注意:这不同于 /stop 接口,/stop 会强制终止进程, + 而此接口会让模拟优雅地关闭环境并退出。 + + 请求(JSON): + { + "simulation_id": "sim_xxxx", // 必填,模拟ID + "timeout": 30 // 可选,超时时间(秒),默认30 + } + + 返回: + { + "success": true, + "data": { + "message": "环境关闭命令已发送", + "result": {...}, + "timestamp": "2025-12-08T10:00:01" + } + } + """ + try: + data = request.get_json() or {} + + simulation_id = data.get('simulation_id') + timeout = data.get('timeout', 30) + + if not simulation_id: + return jsonify({ + "success": False, + "error": "请提供 simulation_id" + }), 400 + + result = SimulationRunner.close_simulation_env( + simulation_id=simulation_id, + timeout=timeout + ) + + # 更新模拟状态 + manager = SimulationManager() + state = manager.get_simulation(simulation_id) + if state: + state.status = SimulationStatus.COMPLETED + manager._save_simulation_state(state) + + return jsonify({ + "success": result.get("success", False), + "data": result + }) + + except ValueError as e: + return jsonify({ + "success": False, + "error": str(e) + }), 400 + + except Exception as e: + logger.error(f"关闭环境失败: {str(e)}") + return jsonify({ + "success": False, + "error": str(e), + "traceback": traceback.format_exc() + }), 500 diff --git a/app/app/config.py b/app/app/config.py new file mode 100644 index 0000000000000000000000000000000000000000..2c743da20876efe2fe93f8a05f46003133731140 --- /dev/null +++ b/app/app/config.py @@ -0,0 +1,129 @@ +""" +配置管理 +统一从项目根目录的 .env 文件加载配置 +""" + +import os +from dotenv import load_dotenv + +# 加载项目根目录的 .env 文件 +# 路径: MiroFish/.env (相对于 backend/app/config.py) +project_root_env = os.path.join(os.path.dirname(__file__), '../../.env') + +if os.path.exists(project_root_env): + load_dotenv(project_root_env, override=True) +else: + # 如果根目录没有 .env,尝试加载环境变量(用于生产环境) + load_dotenv(override=True) + + +class Config: + """Flask配置类""" + + # Flask配置 + SECRET_KEY = os.environ.get('SECRET_KEY', 'mirofish-secret-key') + DEBUG = os.environ.get('FLASK_DEBUG', 'True').lower() == 'true' + + # JSON配置 - 禁用ASCII转义,让中文直接显示(而不是 \uXXXX 格式) + JSON_AS_ASCII = False + + # LLM配置(统一使用OpenAI格式) + LLM_API_KEY = os.environ.get('LLM_API_KEY') + LLM_BASE_URL = os.environ.get('LLM_BASE_URL', 'https://api.openai.com/v1') + LLM_MODEL_NAME = os.environ.get('LLM_MODEL_NAME', 'gpt-4o-mini') + + # Zep配置 + ZEP_API_KEY = os.environ.get('ZEP_API_KEY') + + @classmethod + def get_zep_api_keys(cls): + """Non-empty Zep API keys: single ZEP_API_KEY or comma-separated list (first used by default).""" + raw = (cls.ZEP_API_KEY or "").strip() + if not raw: + return [] + return [k.strip() for k in raw.split(",") if k.strip()] + + @classmethod + def get_llm_api_keys(cls): + """Non-empty LLM keys: single LLM_API_KEY or comma-separated list (paired slot with Zep).""" + raw = (cls.LLM_API_KEY or "").strip() + if not raw: + return [] + return [k.strip() for k in raw.split(",") if k.strip()] + + # Razorpay + simulation unlock (website) + RAZORPAY_KEY_ID = os.environ.get("RAZORPAY_KEY_ID", "").strip() + RAZORPAY_KEY_SECRET = os.environ.get("RAZORPAY_KEY_SECRET", "").strip() + RAZORPAY_AMOUNT_PAISE = int(os.environ.get("RAZORPAY_AMOUNT_PAISE", "49900")) + RAZORPAY_CURRENCY = os.environ.get("RAZORPAY_CURRENCY", "INR").strip() or "INR" + PAYMENT_COUPON_CODES = os.environ.get("PAYMENT_COUPON_CODES", "").strip() + PAYMENT_JWT_SECRET = os.environ.get("PAYMENT_JWT_SECRET", "").strip() + + @classmethod + def payment_coupon_set(cls): + if not cls.PAYMENT_COUPON_CODES: + return set() + return {c.strip().lower() for c in cls.PAYMENT_COUPON_CODES.split(",") if c.strip()} + + @classmethod + def billing_enabled(cls) -> bool: + razorpay_ok = bool(cls.RAZORPAY_KEY_ID and cls.RAZORPAY_KEY_SECRET) + return razorpay_ok or bool(cls.payment_coupon_set()) + + @classmethod + def payment_signing_secret(cls) -> str: + return (cls.PAYMENT_JWT_SECRET or cls.PIPELINE_CLIENT_SECRET or cls.SECRET_KEY or "mirofish-pay").strip() + + # 文件上传配置 + MAX_CONTENT_LENGTH = 50 * 1024 * 1024 # 50MB + UPLOAD_FOLDER = os.path.join(os.path.dirname(__file__), '../uploads') + ALLOWED_EXTENSIONS = {'pdf', 'md', 'txt', 'markdown'} + + # 文本处理配置 + DEFAULT_CHUNK_SIZE = 500 # 默认切块大小 + DEFAULT_CHUNK_OVERLAP = 50 # 默认重叠大小 + + # OASIS模拟配置 + OASIS_DEFAULT_MAX_ROUNDS = int(os.environ.get('OASIS_DEFAULT_MAX_ROUNDS', '10')) + OASIS_SIMULATION_DATA_DIR = os.path.join(os.path.dirname(__file__), '../uploads/simulations') + + # OASIS平台可用动作配置 + OASIS_TWITTER_ACTIONS = [ + 'CREATE_POST', 'LIKE_POST', 'REPOST', 'FOLLOW', 'DO_NOTHING', 'QUOTE_POST' + ] + OASIS_REDDIT_ACTIONS = [ + 'LIKE_POST', 'DISLIKE_POST', 'CREATE_POST', 'CREATE_COMMENT', + 'LIKE_COMMENT', 'DISLIKE_COMMENT', 'SEARCH_POSTS', 'SEARCH_USER', + 'TREND', 'REFRESH', 'DO_NOTHING', 'FOLLOW', 'MUTE' + ] + + # 全自动流水线(website → /api/pipeline/start) + PIPELINE_MAX_ROUNDS = os.environ.get('PIPELINE_MAX_ROUNDS') # optional cap on OASIS rounds + PIPELINE_PARALLEL_PROFILES = int(os.environ.get('PIPELINE_PARALLEL_PROFILES', '5')) + + # Supabase: report storage + simulation_runs table (free tier friendly) + SUPABASE_URL = os.environ.get('SUPABASE_URL', '').rstrip('/') + SUPABASE_SERVICE_ROLE_KEY = os.environ.get('SUPABASE_SERVICE_ROLE_KEY', '') + # Project Settings → API → JWT Secret (verify user access tokens from the website) + SUPABASE_JWT_SECRET = os.environ.get('SUPABASE_JWT_SECRET', '') + SUPABASE_REPORTS_BUCKET = os.environ.get('SUPABASE_REPORTS_BUCKET', 'reports') + # Optional: signing secret for legacy MiroFish Bearer JWTs. Defaults to SECRET_KEY. + MIROFISH_SESSION_JWT_SECRET = os.environ.get('MIROFISH_SESSION_JWT_SECRET', '').strip() + # Same value as website VITE_PIPELINE_CLIENT_SECRET (browser sends X-Mirofish-User-Id + X-Pipeline-Client-Secret). + PIPELINE_CLIENT_SECRET = os.environ.get('PIPELINE_CLIENT_SECRET', '').strip() + + # Report Agent配置 + REPORT_AGENT_MAX_TOOL_CALLS = int(os.environ.get('REPORT_AGENT_MAX_TOOL_CALLS', '5')) + REPORT_AGENT_MAX_REFLECTION_ROUNDS = int(os.environ.get('REPORT_AGENT_MAX_REFLECTION_ROUNDS', '2')) + REPORT_AGENT_TEMPERATURE = float(os.environ.get('REPORT_AGENT_TEMPERATURE', '0.5')) + + @classmethod + def validate(cls): + """验证必要配置""" + errors = [] + if not cls.get_llm_api_keys(): + errors.append("LLM_API_KEY 未配置") + if not cls.get_zep_api_keys(): + errors.append("ZEP_API_KEY 未配置") + return errors + diff --git a/app/app/models/__init__.py b/app/app/models/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6233cb4d61c5b19ca747694748c65df5a99684ad --- /dev/null +++ b/app/app/models/__init__.py @@ -0,0 +1,9 @@ +""" +数据模型模块 +""" + +from .task import TaskManager, TaskStatus +from .project import Project, ProjectStatus, ProjectManager + +__all__ = ['TaskManager', 'TaskStatus', 'Project', 'ProjectStatus', 'ProjectManager'] + diff --git a/app/app/models/__pycache__/__init__.cpython-311.pyc b/app/app/models/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6f001424446b0e333404ffe2b8bd7c6d858944d8 Binary files /dev/null and b/app/app/models/__pycache__/__init__.cpython-311.pyc differ diff --git a/app/app/models/__pycache__/project.cpython-311.pyc b/app/app/models/__pycache__/project.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2a0f9c7221d091d3e4840de6e9901a23f72dda24 Binary files /dev/null and b/app/app/models/__pycache__/project.cpython-311.pyc differ diff --git a/app/app/models/__pycache__/task.cpython-311.pyc b/app/app/models/__pycache__/task.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2b264fa6d5fdbdca8b8b2119d95f709ca0b57334 Binary files /dev/null and b/app/app/models/__pycache__/task.cpython-311.pyc differ diff --git a/app/app/models/project.py b/app/app/models/project.py new file mode 100644 index 0000000000000000000000000000000000000000..d1490820ac27ef8c7f1b78449f7a9a56c7970196 --- /dev/null +++ b/app/app/models/project.py @@ -0,0 +1,305 @@ +""" +项目上下文管理 +用于在服务端持久化项目状态,避免前端在接口间传递大量数据 +""" + +import os +import json +import uuid +import shutil +from datetime import datetime +from typing import Dict, Any, List, Optional +from enum import Enum +from dataclasses import dataclass, field, asdict +from ..config import Config + + +class ProjectStatus(str, Enum): + """项目状态""" + CREATED = "created" # 刚创建,文件已上传 + ONTOLOGY_GENERATED = "ontology_generated" # 本体已生成 + GRAPH_BUILDING = "graph_building" # 图谱构建中 + GRAPH_COMPLETED = "graph_completed" # 图谱构建完成 + FAILED = "failed" # 失败 + + +@dataclass +class Project: + """项目数据模型""" + project_id: str + name: str + status: ProjectStatus + created_at: str + updated_at: str + + # 文件信息 + files: List[Dict[str, str]] = field(default_factory=list) # [{filename, path, size}] + total_text_length: int = 0 + + # 本体信息(接口1生成后填充) + ontology: Optional[Dict[str, Any]] = None + analysis_summary: Optional[str] = None + + # 图谱信息(接口2完成后填充) + graph_id: Optional[str] = None + graph_build_task_id: Optional[str] = None + + # 配置 + simulation_requirement: Optional[str] = None + chunk_size: int = 500 + chunk_overlap: int = 50 + + # 错误信息 + error: Optional[str] = None + + def to_dict(self) -> Dict[str, Any]: + """转换为字典""" + return { + "project_id": self.project_id, + "name": self.name, + "status": self.status.value if isinstance(self.status, ProjectStatus) else self.status, + "created_at": self.created_at, + "updated_at": self.updated_at, + "files": self.files, + "total_text_length": self.total_text_length, + "ontology": self.ontology, + "analysis_summary": self.analysis_summary, + "graph_id": self.graph_id, + "graph_build_task_id": self.graph_build_task_id, + "simulation_requirement": self.simulation_requirement, + "chunk_size": self.chunk_size, + "chunk_overlap": self.chunk_overlap, + "error": self.error + } + + @classmethod + def from_dict(cls, data: Dict[str, Any]) -> 'Project': + """从字典创建""" + status = data.get('status', 'created') + if isinstance(status, str): + status = ProjectStatus(status) + + return cls( + project_id=data['project_id'], + name=data.get('name', 'Unnamed Project'), + status=status, + created_at=data.get('created_at', ''), + updated_at=data.get('updated_at', ''), + files=data.get('files', []), + total_text_length=data.get('total_text_length', 0), + ontology=data.get('ontology'), + analysis_summary=data.get('analysis_summary'), + graph_id=data.get('graph_id'), + graph_build_task_id=data.get('graph_build_task_id'), + simulation_requirement=data.get('simulation_requirement'), + chunk_size=data.get('chunk_size', 500), + chunk_overlap=data.get('chunk_overlap', 50), + error=data.get('error') + ) + + +class ProjectManager: + """项目管理器 - 负责项目的持久化存储和检索""" + + # 项目存储根目录 + PROJECTS_DIR = os.path.join(Config.UPLOAD_FOLDER, 'projects') + + @classmethod + def _ensure_projects_dir(cls): + """确保项目目录存在""" + os.makedirs(cls.PROJECTS_DIR, exist_ok=True) + + @classmethod + def _get_project_dir(cls, project_id: str) -> str: + """获取项目目录路径""" + return os.path.join(cls.PROJECTS_DIR, project_id) + + @classmethod + def _get_project_meta_path(cls, project_id: str) -> str: + """获取项目元数据文件路径""" + return os.path.join(cls._get_project_dir(project_id), 'project.json') + + @classmethod + def _get_project_files_dir(cls, project_id: str) -> str: + """获取项目文件存储目录""" + return os.path.join(cls._get_project_dir(project_id), 'files') + + @classmethod + def _get_project_text_path(cls, project_id: str) -> str: + """获取项目提取文本存储路径""" + return os.path.join(cls._get_project_dir(project_id), 'extracted_text.txt') + + @classmethod + def create_project(cls, name: str = "Unnamed Project") -> Project: + """ + 创建新项目 + + Args: + name: 项目名称 + + Returns: + 新创建的Project对象 + """ + cls._ensure_projects_dir() + + project_id = f"proj_{uuid.uuid4().hex[:12]}" + now = datetime.now().isoformat() + + project = Project( + project_id=project_id, + name=name, + status=ProjectStatus.CREATED, + created_at=now, + updated_at=now + ) + + # 创建项目目录结构 + project_dir = cls._get_project_dir(project_id) + files_dir = cls._get_project_files_dir(project_id) + os.makedirs(project_dir, exist_ok=True) + os.makedirs(files_dir, exist_ok=True) + + # 保存项目元数据 + cls.save_project(project) + + return project + + @classmethod + def save_project(cls, project: Project) -> None: + """保存项目元数据""" + project.updated_at = datetime.now().isoformat() + meta_path = cls._get_project_meta_path(project.project_id) + + with open(meta_path, 'w', encoding='utf-8') as f: + json.dump(project.to_dict(), f, ensure_ascii=False, indent=2) + + @classmethod + def get_project(cls, project_id: str) -> Optional[Project]: + """ + 获取项目 + + Args: + project_id: 项目ID + + Returns: + Project对象,如果不存在返回None + """ + meta_path = cls._get_project_meta_path(project_id) + + if not os.path.exists(meta_path): + return None + + with open(meta_path, 'r', encoding='utf-8') as f: + data = json.load(f) + + return Project.from_dict(data) + + @classmethod + def list_projects(cls, limit: int = 50) -> List[Project]: + """ + 列出所有项目 + + Args: + limit: 返回数量限制 + + Returns: + 项目列表,按创建时间倒序 + """ + cls._ensure_projects_dir() + + projects = [] + for project_id in os.listdir(cls.PROJECTS_DIR): + project = cls.get_project(project_id) + if project: + projects.append(project) + + # 按创建时间倒序排序 + projects.sort(key=lambda p: p.created_at, reverse=True) + + return projects[:limit] + + @classmethod + def delete_project(cls, project_id: str) -> bool: + """ + 删除项目及其所有文件 + + Args: + project_id: 项目ID + + Returns: + 是否删除成功 + """ + project_dir = cls._get_project_dir(project_id) + + if not os.path.exists(project_dir): + return False + + shutil.rmtree(project_dir) + return True + + @classmethod + def save_file_to_project(cls, project_id: str, file_storage, original_filename: str) -> Dict[str, str]: + """ + 保存上传的文件到项目目录 + + Args: + project_id: 项目ID + file_storage: Flask的FileStorage对象 + original_filename: 原始文件名 + + Returns: + 文件信息字典 {filename, path, size} + """ + files_dir = cls._get_project_files_dir(project_id) + os.makedirs(files_dir, exist_ok=True) + + # 生成安全的文件名 + ext = os.path.splitext(original_filename)[1].lower() + safe_filename = f"{uuid.uuid4().hex[:8]}{ext}" + file_path = os.path.join(files_dir, safe_filename) + + # 保存文件 + file_storage.save(file_path) + + # 获取文件大小 + file_size = os.path.getsize(file_path) + + return { + "original_filename": original_filename, + "saved_filename": safe_filename, + "path": file_path, + "size": file_size + } + + @classmethod + def save_extracted_text(cls, project_id: str, text: str) -> None: + """保存提取的文本""" + text_path = cls._get_project_text_path(project_id) + with open(text_path, 'w', encoding='utf-8') as f: + f.write(text) + + @classmethod + def get_extracted_text(cls, project_id: str) -> Optional[str]: + """获取提取的文本""" + text_path = cls._get_project_text_path(project_id) + + if not os.path.exists(text_path): + return None + + with open(text_path, 'r', encoding='utf-8') as f: + return f.read() + + @classmethod + def get_project_files(cls, project_id: str) -> List[str]: + """获取项目的所有文件路径""" + files_dir = cls._get_project_files_dir(project_id) + + if not os.path.exists(files_dir): + return [] + + return [ + os.path.join(files_dir, f) + for f in os.listdir(files_dir) + if os.path.isfile(os.path.join(files_dir, f)) + ] + diff --git a/app/app/models/task.py b/app/app/models/task.py new file mode 100644 index 0000000000000000000000000000000000000000..acfe747628fb391a26c7ddd0857532710b35741a --- /dev/null +++ b/app/app/models/task.py @@ -0,0 +1,184 @@ +""" +任务状态管理 +用于跟踪长时间运行的任务(如图谱构建) +""" + +import uuid +import threading +from datetime import datetime +from enum import Enum +from typing import Dict, Any, Optional +from dataclasses import dataclass, field + + +class TaskStatus(str, Enum): + """任务状态枚举""" + PENDING = "pending" # 等待中 + PROCESSING = "processing" # 处理中 + COMPLETED = "completed" # 已完成 + FAILED = "failed" # 失败 + + +@dataclass +class Task: + """任务数据类""" + task_id: str + task_type: str + status: TaskStatus + created_at: datetime + updated_at: datetime + progress: int = 0 # 总进度百分比 0-100 + message: str = "" # 状态消息 + result: Optional[Dict] = None # 任务结果 + error: Optional[str] = None # 错误信息 + metadata: Dict = field(default_factory=dict) # 额外元数据 + progress_detail: Dict = field(default_factory=dict) # 详细进度信息 + + def to_dict(self) -> Dict[str, Any]: + """转换为字典""" + return { + "task_id": self.task_id, + "task_type": self.task_type, + "status": self.status.value, + "created_at": self.created_at.isoformat(), + "updated_at": self.updated_at.isoformat(), + "progress": self.progress, + "message": self.message, + "progress_detail": self.progress_detail, + "result": self.result, + "error": self.error, + "metadata": self.metadata, + } + + +class TaskManager: + """ + 任务管理器 + 线程安全的任务状态管理 + """ + + _instance = None + _lock = threading.Lock() + + def __new__(cls): + """单例模式""" + if cls._instance is None: + with cls._lock: + if cls._instance is None: + cls._instance = super().__new__(cls) + cls._instance._tasks: Dict[str, Task] = {} + cls._instance._task_lock = threading.Lock() + return cls._instance + + def create_task(self, task_type: str, metadata: Optional[Dict] = None) -> str: + """ + 创建新任务 + + Args: + task_type: 任务类型 + metadata: 额外元数据 + + Returns: + 任务ID + """ + task_id = str(uuid.uuid4()) + now = datetime.now() + + task = Task( + task_id=task_id, + task_type=task_type, + status=TaskStatus.PENDING, + created_at=now, + updated_at=now, + metadata=metadata or {} + ) + + with self._task_lock: + self._tasks[task_id] = task + + return task_id + + def get_task(self, task_id: str) -> Optional[Task]: + """获取任务""" + with self._task_lock: + return self._tasks.get(task_id) + + def update_task( + self, + task_id: str, + status: Optional[TaskStatus] = None, + progress: Optional[int] = None, + message: Optional[str] = None, + result: Optional[Dict] = None, + error: Optional[str] = None, + progress_detail: Optional[Dict] = None + ): + """ + 更新任务状态 + + Args: + task_id: 任务ID + status: 新状态 + progress: 进度 + message: 消息 + result: 结果 + error: 错误信息 + progress_detail: 详细进度信息 + """ + with self._task_lock: + task = self._tasks.get(task_id) + if task: + task.updated_at = datetime.now() + if status is not None: + task.status = status + if progress is not None: + task.progress = progress + if message is not None: + task.message = message + if result is not None: + task.result = result + if error is not None: + task.error = error + if progress_detail is not None: + task.progress_detail = progress_detail + + def complete_task(self, task_id: str, result: Dict): + """标记任务完成""" + self.update_task( + task_id, + status=TaskStatus.COMPLETED, + progress=100, + message="任务完成", + result=result + ) + + def fail_task(self, task_id: str, error: str): + """标记任务失败""" + self.update_task( + task_id, + status=TaskStatus.FAILED, + message="任务失败", + error=error + ) + + def list_tasks(self, task_type: Optional[str] = None) -> list: + """列出任务""" + with self._task_lock: + tasks = list(self._tasks.values()) + if task_type: + tasks = [t for t in tasks if t.task_type == task_type] + return [t.to_dict() for t in sorted(tasks, key=lambda x: x.created_at, reverse=True)] + + def cleanup_old_tasks(self, max_age_hours: int = 24): + """清理旧任务""" + from datetime import timedelta + cutoff = datetime.now() - timedelta(hours=max_age_hours) + + with self._task_lock: + old_ids = [ + tid for tid, task in self._tasks.items() + if task.created_at < cutoff and task.status in [TaskStatus.COMPLETED, TaskStatus.FAILED] + ] + for tid in old_ids: + del self._tasks[tid] + diff --git a/app/app/services/__init__.py b/app/app/services/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a1b2b89ed26726624f797358f2b5307e1c0191ef --- /dev/null +++ b/app/app/services/__init__.py @@ -0,0 +1,73 @@ +""" +业务服务模块 +""" + +from .ontology_generator import OntologyGenerator +from .graph_builder import GraphBuilderService +from .text_processor import TextProcessor +from .zep_entity_reader import ZepEntityReader, EntityNode, FilteredEntities +from .oasis_profile_generator import OasisProfileGenerator, OasisAgentProfile +from .simulation_manager import SimulationManager, SimulationState, SimulationStatus +from .simulation_config_generator import ( + SimulationConfigGenerator, + SimulationParameters, + AgentActivityConfig, + TimeSimulationConfig, + EventConfig, + PlatformConfig +) +from .simulation_runner import ( + SimulationRunner, + SimulationRunState, + RunnerStatus, + AgentAction, + RoundSummary +) +from .zep_graph_memory_updater import ( + ZepGraphMemoryUpdater, + ZepGraphMemoryManager, + AgentActivity +) +from .simulation_ipc import ( + SimulationIPCClient, + SimulationIPCServer, + IPCCommand, + IPCResponse, + CommandType, + CommandStatus +) + +__all__ = [ + 'OntologyGenerator', + 'GraphBuilderService', + 'TextProcessor', + 'ZepEntityReader', + 'EntityNode', + 'FilteredEntities', + 'OasisProfileGenerator', + 'OasisAgentProfile', + 'SimulationManager', + 'SimulationState', + 'SimulationStatus', + 'SimulationConfigGenerator', + 'SimulationParameters', + 'AgentActivityConfig', + 'TimeSimulationConfig', + 'EventConfig', + 'PlatformConfig', + 'SimulationRunner', + 'SimulationRunState', + 'RunnerStatus', + 'AgentAction', + 'RoundSummary', + 'ZepGraphMemoryUpdater', + 'ZepGraphMemoryManager', + 'AgentActivity', + 'SimulationIPCClient', + 'SimulationIPCServer', + 'IPCCommand', + 'IPCResponse', + 'CommandType', + 'CommandStatus', +] + diff --git a/app/app/services/__pycache__/__init__.cpython-311.pyc b/app/app/services/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9ca2e74e2a350e73785bd62407ca59f7705182c3 Binary files /dev/null and b/app/app/services/__pycache__/__init__.cpython-311.pyc differ diff --git a/app/app/services/__pycache__/graph_builder.cpython-311.pyc b/app/app/services/__pycache__/graph_builder.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..05c63f3e8962bd33d65d41c26428a653b4cbb01d Binary files /dev/null and b/app/app/services/__pycache__/graph_builder.cpython-311.pyc differ diff --git a/app/app/services/__pycache__/oasis_profile_generator.cpython-311.pyc b/app/app/services/__pycache__/oasis_profile_generator.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..38964a457af23116b1b248d7b471663f56a23841 Binary files /dev/null and b/app/app/services/__pycache__/oasis_profile_generator.cpython-311.pyc differ diff --git a/app/app/services/__pycache__/ontology_generator.cpython-311.pyc b/app/app/services/__pycache__/ontology_generator.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bbbdbfbcc3e4dc9a4e9488f4245d97ebc0f93b9b Binary files /dev/null and b/app/app/services/__pycache__/ontology_generator.cpython-311.pyc differ diff --git a/app/app/services/__pycache__/pipeline_orchestrator.cpython-311.pyc b/app/app/services/__pycache__/pipeline_orchestrator.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6d0117e38c66492a901f5ee969d4c590717553ef Binary files /dev/null and b/app/app/services/__pycache__/pipeline_orchestrator.cpython-311.pyc differ diff --git a/app/app/services/__pycache__/report_agent.cpython-311.pyc b/app/app/services/__pycache__/report_agent.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..71b8b4dfb14e9b29579df86f5e590ed9ecef073d --- /dev/null +++ b/app/app/services/__pycache__/report_agent.cpython-311.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0abd3c1a2d5a1d6fb13ad578076ad09dfa74c527e44a79114bcfb8c101ea788 +size 108041 diff --git a/app/app/services/__pycache__/simulation_config_generator.cpython-311.pyc b/app/app/services/__pycache__/simulation_config_generator.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4fd11b97ef3851c2cddaa9283a5e3f3b959d4b54 Binary files /dev/null and b/app/app/services/__pycache__/simulation_config_generator.cpython-311.pyc differ diff --git a/app/app/services/__pycache__/simulation_ipc.cpython-311.pyc b/app/app/services/__pycache__/simulation_ipc.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f08ac896a50de7c9d98f7bae0e3657fd9636ebe0 Binary files /dev/null and b/app/app/services/__pycache__/simulation_ipc.cpython-311.pyc differ diff --git a/app/app/services/__pycache__/simulation_manager.cpython-311.pyc b/app/app/services/__pycache__/simulation_manager.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..086fe81b4a5f509fa13b2902bad878e2bddecbf5 Binary files /dev/null and b/app/app/services/__pycache__/simulation_manager.cpython-311.pyc differ diff --git a/app/app/services/__pycache__/simulation_runner.cpython-311.pyc b/app/app/services/__pycache__/simulation_runner.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..49d9c8e447e753e64b0ad45796e9629fddec7904 Binary files /dev/null and b/app/app/services/__pycache__/simulation_runner.cpython-311.pyc differ diff --git a/app/app/services/__pycache__/supabase_jobs.cpython-311.pyc b/app/app/services/__pycache__/supabase_jobs.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e2321e211b1b62807b7b0375882b285cbe7fda55 Binary files /dev/null and b/app/app/services/__pycache__/supabase_jobs.cpython-311.pyc differ diff --git a/app/app/services/__pycache__/text_processor.cpython-311.pyc b/app/app/services/__pycache__/text_processor.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4ca19cf56b01bba72ea18895359ad6265320da09 Binary files /dev/null and b/app/app/services/__pycache__/text_processor.cpython-311.pyc differ diff --git a/app/app/services/__pycache__/zep_entity_reader.cpython-311.pyc b/app/app/services/__pycache__/zep_entity_reader.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..55305d4a53de500649a27b885c4b3bef10adcb4b Binary files /dev/null and b/app/app/services/__pycache__/zep_entity_reader.cpython-311.pyc differ diff --git a/app/app/services/__pycache__/zep_graph_memory_updater.cpython-311.pyc b/app/app/services/__pycache__/zep_graph_memory_updater.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..543623a9cfb892cbc7fa4865f0990c8bc774aa79 Binary files /dev/null and b/app/app/services/__pycache__/zep_graph_memory_updater.cpython-311.pyc differ diff --git a/app/app/services/__pycache__/zep_tools.cpython-311.pyc b/app/app/services/__pycache__/zep_tools.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c8a22932fe100243b75ce34e55d7ad00171827f7 Binary files /dev/null and b/app/app/services/__pycache__/zep_tools.cpython-311.pyc differ diff --git a/app/app/services/billing_service.py b/app/app/services/billing_service.py new file mode 100644 index 0000000000000000000000000000000000000000..a27188bcce53913ac81ea71e31b9a680d379eb6c --- /dev/null +++ b/app/app/services/billing_service.py @@ -0,0 +1,85 @@ +"""Razorpay orders, signature verification, coupon checks, and simulation payment JWTs.""" + +from __future__ import annotations + +import time +import uuid + +import jwt + +from ..config import Config + + +def issue_simulation_payment_token(*, via: str) -> str: + """via: 'razorpay' | 'coupon'""" + now = int(time.time()) + payload = { + "typ": "sim_pay", + "via": via, + "iat": now, + "exp": now + 3600, + "jti": uuid.uuid4().hex, + } + return jwt.encode(payload, Config.payment_signing_secret(), algorithm="HS256") + + +def verify_simulation_payment_token(token: str | None) -> bool: + if not token or not str(token).strip(): + return False + try: + payload = jwt.decode( + str(token).strip(), + Config.payment_signing_secret(), + algorithms=["HS256"], + ) + return payload.get("typ") == "sim_pay" + except jwt.PyJWTError: + return False + + +def create_razorpay_order() -> dict: + import razorpay + + client = razorpay.Client(auth=(Config.RAZORPAY_KEY_ID, Config.RAZORPAY_KEY_SECRET)) + receipt = f"mf_{uuid.uuid4().hex[:24]}" + order = client.order.create( + { + "amount": Config.RAZORPAY_AMOUNT_PAISE, + "currency": Config.RAZORPAY_CURRENCY, + "receipt": receipt, + } + ) + return { + "order_id": order["id"], + "amount": order["amount"], + "currency": order["currency"], + "key_id": Config.RAZORPAY_KEY_ID, + } + + +def verify_razorpay_payment_signature( + razorpay_order_id: str, + razorpay_payment_id: str, + razorpay_signature: str, +) -> bool: + import razorpay + + client = razorpay.Client(auth=(Config.RAZORPAY_KEY_ID, Config.RAZORPAY_KEY_SECRET)) + try: + client.utility.verify_payment_signature( + { + "razorpay_order_id": razorpay_order_id, + "razorpay_payment_id": razorpay_payment_id, + "razorpay_signature": razorpay_signature, + } + ) + return True + except Exception: + return False + + +def coupon_valid(code: str | None) -> bool: + if not code: + return False + normalized = code.strip().lower() + return normalized in Config.payment_coupon_set() diff --git a/app/app/services/graph_builder.py b/app/app/services/graph_builder.py new file mode 100644 index 0000000000000000000000000000000000000000..d4c2547ce57a9cdde51d5547f6f5584b8e12db76 --- /dev/null +++ b/app/app/services/graph_builder.py @@ -0,0 +1,532 @@ +""" +图谱构建服务 +接口2:使用Zep API构建Standalone Graph +""" + +import os +import uuid +import time +import threading +from typing import Dict, Any, List, Optional, Callable +from dataclasses import dataclass + +from zep_cloud.client import Zep +from zep_cloud import EpisodeData, EntityEdgeSourceTarget + +from ..config import Config +from ..models.task import TaskManager, TaskStatus +from ..utils.api_key_runtime import call_with_limit_rotation, get_zep_key +from ..utils.zep_paging import fetch_all_nodes, fetch_all_edges +from .text_processor import TextProcessor + + +@dataclass +class GraphInfo: + """图谱信息""" + graph_id: str + node_count: int + edge_count: int + entity_types: List[str] + + def to_dict(self) -> Dict[str, Any]: + return { + "graph_id": self.graph_id, + "node_count": self.node_count, + "edge_count": self.edge_count, + "entity_types": self.entity_types, + } + + +class GraphBuilderService: + """ + 图谱构建服务 + 负责调用Zep API构建知识图谱 + """ + + def __init__(self, api_key: Optional[str] = None): + self._fixed_api_key = (api_key or "").strip() or None + if self._fixed_api_key: + self.api_key = self._fixed_api_key + else: + self.api_key = get_zep_key() or (Config.get_zep_api_keys()[0] if Config.get_zep_api_keys() else None) + if not self.api_key and not Config.get_zep_api_keys(): + raise ValueError("ZEP_API_KEY 未配置") + + self.client = Zep(api_key=self.api_key) if self._fixed_api_key else None # noqa: SLF001 + self.task_manager = TaskManager() + + def _zep_call(self, fn): + """Zep API call with shared LLM/Zep rate-limit rotation (pipeline uses runtime keys).""" + if self._fixed_api_key: + return fn(Zep(api_key=self._fixed_api_key)) + + def run(): + k = get_zep_key() + if not k: + raise ValueError("ZEP_API_KEY 未配置") + return fn(Zep(api_key=k)) + + return call_with_limit_rotation(run) + + def build_graph_async( + self, + text: str, + ontology: Dict[str, Any], + graph_name: str = "MiroFish Graph", + chunk_size: int = 500, + chunk_overlap: int = 50, + batch_size: int = 3 + ) -> str: + """ + 异步构建图谱 + + Args: + text: 输入文本 + ontology: 本体定义(来自接口1的输出) + graph_name: 图谱名称 + chunk_size: 文本块大小 + chunk_overlap: 块重叠大小 + batch_size: 每批发送的块数量 + + Returns: + 任务ID + """ + # 创建任务 + task_id = self.task_manager.create_task( + task_type="graph_build", + metadata={ + "graph_name": graph_name, + "chunk_size": chunk_size, + "text_length": len(text), + } + ) + + # 在后台线程中执行构建 + thread = threading.Thread( + target=self._build_graph_worker, + args=(task_id, text, ontology, graph_name, chunk_size, chunk_overlap, batch_size) + ) + thread.daemon = True + thread.start() + + return task_id + + def _build_graph_worker( + self, + task_id: str, + text: str, + ontology: Dict[str, Any], + graph_name: str, + chunk_size: int, + chunk_overlap: int, + batch_size: int + ): + """图谱构建工作线程""" + try: + self.task_manager.update_task( + task_id, + status=TaskStatus.PROCESSING, + progress=5, + message="开始构建图谱..." + ) + + # 1. 创建图谱 + graph_id = self.create_graph(graph_name) + self.task_manager.update_task( + task_id, + progress=10, + message=f"图谱已创建: {graph_id}" + ) + + # 2. 设置本体 + self.set_ontology(graph_id, ontology) + self.task_manager.update_task( + task_id, + progress=15, + message="本体已设置" + ) + + # 3. 文本分块 + chunks = TextProcessor.split_text(text, chunk_size, chunk_overlap) + total_chunks = len(chunks) + self.task_manager.update_task( + task_id, + progress=20, + message=f"文本已分割为 {total_chunks} 个块" + ) + + # 4. 分批发送数据 + episode_uuids = self.add_text_batches( + graph_id, chunks, batch_size, + lambda msg, prog: self.task_manager.update_task( + task_id, + progress=20 + int(prog * 0.4), # 20-60% + message=msg + ) + ) + + # 5. 等待Zep处理完成 + self.task_manager.update_task( + task_id, + progress=60, + message="等待Zep处理数据..." + ) + + self._wait_for_episodes( + episode_uuids, + lambda msg, prog: self.task_manager.update_task( + task_id, + progress=60 + int(prog * 0.3), # 60-90% + message=msg + ) + ) + + # 6. 获取图谱信息 + self.task_manager.update_task( + task_id, + progress=90, + message="获取图谱信息..." + ) + + graph_info = self._get_graph_info(graph_id) + + # 完成 + self.task_manager.complete_task(task_id, { + "graph_id": graph_id, + "graph_info": graph_info.to_dict(), + "chunks_processed": total_chunks, + }) + + except Exception as e: + import traceback + error_msg = f"{str(e)}\n{traceback.format_exc()}" + self.task_manager.fail_task(task_id, error_msg) + + def create_graph(self, name: str) -> str: + """创建Zep图谱(公开方法)""" + graph_id = f"mirofish_{uuid.uuid4().hex[:16]}" + + def op(c: Zep): + c.graph.create( + graph_id=graph_id, + name=name, + description="MiroFish Social Simulation Graph", + ) + + self._zep_call(op) + return graph_id + + def set_ontology(self, graph_id: str, ontology: Dict[str, Any]): + """设置图谱本体(公开方法)""" + import warnings + from typing import Optional + from pydantic import Field + from zep_cloud.external_clients.ontology import EntityModel, EntityText, EdgeModel + + # 抑制 Pydantic v2 关于 Field(default=None) 的警告 + # 这是 Zep SDK 要求的用法,警告来自动态类创建,可以安全忽略 + warnings.filterwarnings('ignore', category=UserWarning, module='pydantic') + + # Zep 保留名称,不能作为属性名 + RESERVED_NAMES = {'uuid', 'name', 'group_id', 'name_embedding', 'summary', 'created_at'} + + def safe_attr_name(attr_name: str) -> str: + """将保留名称转换为安全名称""" + if attr_name.lower() in RESERVED_NAMES: + return f"entity_{attr_name}" + return attr_name + + # 动态创建实体类型 + entity_types = {} + for entity_def in ontology.get("entity_types", []): + name = entity_def["name"] + description = entity_def.get("description", f"A {name} entity.") + + # 创建属性字典和类型注解(Pydantic v2 需要) + attrs = {"__doc__": description} + annotations = {} + + for attr_def in entity_def.get("attributes", []): + attr_name = safe_attr_name(attr_def["name"]) # 使用安全名称 + attr_desc = attr_def.get("description", attr_name) + # Zep API 需要 Field 的 description,这是必需的 + attrs[attr_name] = Field(description=attr_desc, default=None) + annotations[attr_name] = Optional[EntityText] # 类型注解 + + attrs["__annotations__"] = annotations + + # 动态创建类 + entity_class = type(name, (EntityModel,), attrs) + entity_class.__doc__ = description + entity_types[name] = entity_class + + # 动态创建边类型 + edge_definitions = {} + for edge_def in ontology.get("edge_types", []): + name = edge_def["name"] + description = edge_def.get("description", f"A {name} relationship.") + + # 创建属性字典和类型注解 + attrs = {"__doc__": description} + annotations = {} + + for attr_def in edge_def.get("attributes", []): + attr_name = safe_attr_name(attr_def["name"]) # 使用安全名称 + attr_desc = attr_def.get("description", attr_name) + # Zep API 需要 Field 的 description,这是必需的 + attrs[attr_name] = Field(description=attr_desc, default=None) + annotations[attr_name] = Optional[str] # 边属性用str类型 + + attrs["__annotations__"] = annotations + + # 动态创建类 + class_name = ''.join(word.capitalize() for word in name.split('_')) + edge_class = type(class_name, (EdgeModel,), attrs) + edge_class.__doc__ = description + + # 构建source_targets + source_targets = [] + for st in edge_def.get("source_targets", []): + source_targets.append( + EntityEdgeSourceTarget( + source=st.get("source", "Entity"), + target=st.get("target", "Entity") + ) + ) + + if source_targets: + edge_definitions[name] = (edge_class, source_targets) + + # 调用Zep API设置本体 + if entity_types or edge_definitions: + def op(c: Zep): + c.graph.set_ontology( + graph_ids=[graph_id], + entities=entity_types if entity_types else None, + edges=edge_definitions if edge_definitions else None, + ) + + self._zep_call(op) + + def add_text_batches( + self, + graph_id: str, + chunks: List[str], + batch_size: int = 3, + progress_callback: Optional[Callable] = None + ) -> List[str]: + """分批添加文本到图谱,返回所有 episode 的 uuid 列表""" + episode_uuids = [] + total_chunks = len(chunks) + + for i in range(0, total_chunks, batch_size): + batch_chunks = chunks[i:i + batch_size] + batch_num = i // batch_size + 1 + total_batches = (total_chunks + batch_size - 1) // batch_size + + if progress_callback: + progress = (i + len(batch_chunks)) / total_chunks + progress_callback( + f"发送第 {batch_num}/{total_batches} 批数据 ({len(batch_chunks)} 块)...", + progress + ) + + # 构建episode数据 + episodes = [ + EpisodeData(data=chunk, type="text") + for chunk in batch_chunks + ] + + # 发送到Zep + try: + def op(c: Zep): + return c.graph.add_batch(graph_id=graph_id, episodes=episodes) + + batch_result = self._zep_call(op) + + # 收集返回的 episode uuid + if batch_result and isinstance(batch_result, list): + for ep in batch_result: + ep_uuid = getattr(ep, 'uuid_', None) or getattr(ep, 'uuid', None) + if ep_uuid: + episode_uuids.append(ep_uuid) + + # 避免请求过快 + time.sleep(1) + + except Exception as e: + if progress_callback: + progress_callback(f"批次 {batch_num} 发送失败: {str(e)}", 0) + raise + + return episode_uuids + + def _wait_for_episodes( + self, + episode_uuids: List[str], + progress_callback: Optional[Callable] = None, + timeout: int = 600 + ): + """等待所有 episode 处理完成(通过查询每个 episode 的 processed 状态)""" + if not episode_uuids: + if progress_callback: + progress_callback("无需等待(没有 episode)", 1.0) + return + + start_time = time.time() + pending_episodes = set(episode_uuids) + completed_count = 0 + total_episodes = len(episode_uuids) + + if progress_callback: + progress_callback(f"开始等待 {total_episodes} 个文本块处理...", 0) + + while pending_episodes: + if time.time() - start_time > timeout: + if progress_callback: + progress_callback( + f"部分文本块超时,已完成 {completed_count}/{total_episodes}", + completed_count / total_episodes + ) + break + + # 检查每个 episode 的处理状态 + for ep_uuid in list(pending_episodes): + try: + def op(c: Zep): + return c.graph.episode.get(uuid_=ep_uuid) + + episode = self._zep_call(op) + is_processed = getattr(episode, 'processed', False) + + if is_processed: + pending_episodes.remove(ep_uuid) + completed_count += 1 + + except Exception as e: + # 忽略单个查询错误,继续 + pass + + elapsed = int(time.time() - start_time) + if progress_callback: + progress_callback( + f"Zep处理中... {completed_count}/{total_episodes} 完成, {len(pending_episodes)} 待处理 ({elapsed}秒)", + completed_count / total_episodes if total_episodes > 0 else 0 + ) + + if pending_episodes: + time.sleep(3) # 每3秒检查一次 + + if progress_callback: + progress_callback(f"处理完成: {completed_count}/{total_episodes}", 1.0) + + def _get_graph_info(self, graph_id: str) -> GraphInfo: + """获取图谱信息""" + + def fetch_pair(c: Zep): + return fetch_all_nodes(c, graph_id), fetch_all_edges(c, graph_id) + + nodes, edges = self._zep_call(fetch_pair) + + # 统计实体类型 + entity_types = set() + for node in nodes: + if node.labels: + for label in node.labels: + if label not in ["Entity", "Node"]: + entity_types.add(label) + + return GraphInfo( + graph_id=graph_id, + node_count=len(nodes), + edge_count=len(edges), + entity_types=list(entity_types) + ) + + def get_graph_data(self, graph_id: str) -> Dict[str, Any]: + """ + 获取完整图谱数据(包含详细信息) + + Args: + graph_id: 图谱ID + + Returns: + 包含nodes和edges的字典,包括时间信息、属性等详细数据 + """ + def fetch_pair(c: Zep): + return fetch_all_nodes(c, graph_id), fetch_all_edges(c, graph_id) + + nodes, edges = self._zep_call(fetch_pair) + + # 创建节点映射用于获取节点名称 + node_map = {} + for node in nodes: + node_map[node.uuid_] = node.name or "" + + nodes_data = [] + for node in nodes: + # 获取创建时间 + created_at = getattr(node, 'created_at', None) + if created_at: + created_at = str(created_at) + + nodes_data.append({ + "uuid": node.uuid_, + "name": node.name, + "labels": node.labels or [], + "summary": node.summary or "", + "attributes": node.attributes or {}, + "created_at": created_at, + }) + + edges_data = [] + for edge in edges: + # 获取时间信息 + created_at = getattr(edge, 'created_at', None) + valid_at = getattr(edge, 'valid_at', None) + invalid_at = getattr(edge, 'invalid_at', None) + expired_at = getattr(edge, 'expired_at', None) + + # 获取 episodes + episodes = getattr(edge, 'episodes', None) or getattr(edge, 'episode_ids', None) + if episodes and not isinstance(episodes, list): + episodes = [str(episodes)] + elif episodes: + episodes = [str(e) for e in episodes] + + # 获取 fact_type + fact_type = getattr(edge, 'fact_type', None) or edge.name or "" + + edges_data.append({ + "uuid": edge.uuid_, + "name": edge.name or "", + "fact": edge.fact or "", + "fact_type": fact_type, + "source_node_uuid": edge.source_node_uuid, + "target_node_uuid": edge.target_node_uuid, + "source_node_name": node_map.get(edge.source_node_uuid, ""), + "target_node_name": node_map.get(edge.target_node_uuid, ""), + "attributes": edge.attributes or {}, + "created_at": str(created_at) if created_at else None, + "valid_at": str(valid_at) if valid_at else None, + "invalid_at": str(invalid_at) if invalid_at else None, + "expired_at": str(expired_at) if expired_at else None, + "episodes": episodes or [], + }) + + return { + "graph_id": graph_id, + "nodes": nodes_data, + "edges": edges_data, + "node_count": len(nodes_data), + "edge_count": len(edges_data), + } + + def delete_graph(self, graph_id: str): + """删除图谱""" + + def op(c: Zep): + c.graph.delete(graph_id=graph_id) + + self._zep_call(op) + diff --git a/app/app/services/oasis_profile_generator.py b/app/app/services/oasis_profile_generator.py new file mode 100644 index 0000000000000000000000000000000000000000..b0c4deb9f9c2e0162043b8584daaacd014755995 --- /dev/null +++ b/app/app/services/oasis_profile_generator.py @@ -0,0 +1,1339 @@ +""" +OASIS Agent Profile生成器 +将Zep图谱中的实体转换为OASIS模拟平台所需的Agent Profile格式 + +优化改进: +1. 调用Zep检索功能二次丰富节点信息 +2. 优化提示词生成非常详细的人设 +3. 区分个人实体和抽象群体实体 +""" + +import json +import random +import time +from typing import Dict, Any, List, Optional +from dataclasses import dataclass, field +from datetime import datetime + +from openai import OpenAI +from zep_cloud.client import Zep + +from ..config import Config +from ..utils.api_key_runtime import call_with_limit_rotation, get_llm_key, get_zep_key +from ..utils.logger import get_logger +from .zep_entity_reader import EntityNode, ZepEntityReader + +logger = get_logger('mirofish.oasis_profile') + + +@dataclass +class OasisAgentProfile: + """OASIS Agent Profile数据结构""" + # 通用字段 + user_id: int + user_name: str + name: str + bio: str + persona: str + + # 可选字段 - Reddit风格 + karma: int = 1000 + + # 可选字段 - Twitter风格 + friend_count: int = 100 + follower_count: int = 150 + statuses_count: int = 500 + + # 额外人设信息 + age: Optional[int] = None + gender: Optional[str] = None + mbti: Optional[str] = None + country: Optional[str] = None + profession: Optional[str] = None + interested_topics: List[str] = field(default_factory=list) + + # 来源实体信息 + source_entity_uuid: Optional[str] = None + source_entity_type: Optional[str] = None + + created_at: str = field(default_factory=lambda: datetime.now().strftime("%Y-%m-%d")) + + def to_reddit_format(self) -> Dict[str, Any]: + """转换为Reddit平台格式""" + profile = { + "user_id": self.user_id, + "username": self.user_name, # OASIS 库要求字段名为 username(无下划线) + "name": self.name, + "bio": self.bio, + "persona": self.persona, + "karma": self.karma, + "created_at": self.created_at, + } + + # 添加额外人设信息(如果有) + if self.age: + profile["age"] = self.age + if self.gender: + profile["gender"] = self.gender + if self.mbti: + profile["mbti"] = self.mbti + if self.country: + profile["country"] = self.country + if self.profession: + profile["profession"] = self.profession + if self.interested_topics: + profile["interested_topics"] = self.interested_topics + + return profile + + def to_twitter_format(self) -> Dict[str, Any]: + """转换为Twitter平台格式""" + profile = { + "user_id": self.user_id, + "username": self.user_name, # OASIS 库要求字段名为 username(无下划线) + "name": self.name, + "bio": self.bio, + "persona": self.persona, + "friend_count": self.friend_count, + "follower_count": self.follower_count, + "statuses_count": self.statuses_count, + "created_at": self.created_at, + } + + # 添加额外人设信息 + if self.age: + profile["age"] = self.age + if self.gender: + profile["gender"] = self.gender + if self.mbti: + profile["mbti"] = self.mbti + if self.country: + profile["country"] = self.country + if self.profession: + profile["profession"] = self.profession + if self.interested_topics: + profile["interested_topics"] = self.interested_topics + + return profile + + def to_dict(self) -> Dict[str, Any]: + """转换为完整字典格式""" + return { + "user_id": self.user_id, + "user_name": self.user_name, + "name": self.name, + "bio": self.bio, + "persona": self.persona, + "karma": self.karma, + "friend_count": self.friend_count, + "follower_count": self.follower_count, + "statuses_count": self.statuses_count, + "age": self.age, + "gender": self.gender, + "mbti": self.mbti, + "country": self.country, + "profession": self.profession, + "interested_topics": self.interested_topics, + "source_entity_uuid": self.source_entity_uuid, + "source_entity_type": self.source_entity_type, + "created_at": self.created_at, + } + + +class OasisProfileGenerator: + """ + OASIS Profile生成器 + + 将Zep图谱中的实体转换为OASIS模拟所需的Agent Profile + + 优化特性: + 1. 调用Zep图谱检索功能获取更丰富的上下文 + 2. 生成非常详细的人设(包括基本信息、职业经历、性格特征、社交媒体行为等) + 3. 区分个人实体和抽象群体实体 + """ + + # MBTI类型列表 + MBTI_TYPES = [ + "INTJ", "INTP", "ENTJ", "ENTP", + "INFJ", "INFP", "ENFJ", "ENFP", + "ISTJ", "ISFJ", "ESTJ", "ESFJ", + "ISTP", "ISFP", "ESTP", "ESFP" + ] + + # 常见国家列表 + COUNTRIES = [ + "China", "US", "UK", "Japan", "Germany", "France", + "Canada", "Australia", "Brazil", "India", "South Korea" + ] + + # 个人类型实体(需要生成具体人设) + INDIVIDUAL_ENTITY_TYPES = [ + "student", "alumni", "professor", "person", "publicfigure", + "expert", "faculty", "official", "journalist", "activist" + ] + + # 群体/机构类型实体(需要生成群体代表人设) + GROUP_ENTITY_TYPES = [ + "university", "governmentagency", "organization", "ngo", + "mediaoutlet", "company", "institution", "group", "community" + ] + + def __init__( + self, + api_key: Optional[str] = None, + base_url: Optional[str] = None, + model_name: Optional[str] = None, + zep_api_key: Optional[str] = None, + graph_id: Optional[str] = None + ): + self._fixed_llm_key = (api_key or "").strip() or None + self.base_url = base_url or Config.LLM_BASE_URL + self.model_name = model_name or Config.LLM_MODEL_NAME + + if self._fixed_llm_key: + self.api_key = self._fixed_llm_key + self.client = OpenAI(api_key=self.api_key, base_url=self.base_url) + else: + if not Config.get_llm_api_keys(): + raise ValueError("LLM_API_KEY 未配置") + self.api_key = Config.get_llm_api_keys()[0] + self.client = None + + # Zep客户端用于检索丰富上下文(运行时与 pipeline 共用 key slot) + self._fixed_zep_key = (zep_api_key or "").strip() or None + self.zep_api_key = self._fixed_zep_key or ( + Config.get_zep_api_keys()[0] if Config.get_zep_api_keys() else None + ) + self.zep_client = None + self.graph_id = graph_id + + if self._fixed_zep_key: + try: + self.zep_client = Zep(api_key=self._fixed_zep_key) + except Exception as e: + logger.warning(f"Zep客户端初始化失败: {e}") + + def generate_profile_from_entity( + self, + entity: EntityNode, + user_id: int, + use_llm: bool = True + ) -> OasisAgentProfile: + """ + 从Zep实体生成OASIS Agent Profile + + Args: + entity: Zep实体节点 + user_id: 用户ID(用于OASIS) + use_llm: 是否使用LLM生成详细人设 + + Returns: + OasisAgentProfile + """ + entity_type = entity.get_entity_type() or "Entity" + + # 基础信息 + name = entity.name + user_name = self._generate_username(name) + + # 构建上下文信息 + context = self._build_entity_context(entity) + + if use_llm: + # 使用LLM生成详细人设 + profile_data = self._generate_profile_with_llm( + entity_name=name, + entity_type=entity_type, + entity_summary=entity.summary, + entity_attributes=entity.attributes, + context=context + ) + else: + # 使用规则生成基础人设 + profile_data = self._generate_profile_rule_based( + entity_name=name, + entity_type=entity_type, + entity_summary=entity.summary, + entity_attributes=entity.attributes + ) + + return OasisAgentProfile( + user_id=user_id, + user_name=user_name, + name=name, + bio=profile_data.get("bio", f"{entity_type}: {name}"), + persona=profile_data.get("persona", entity.summary or f"A {entity_type} named {name}."), + karma=profile_data.get("karma", random.randint(500, 5000)), + friend_count=profile_data.get("friend_count", random.randint(50, 500)), + follower_count=profile_data.get("follower_count", random.randint(100, 1000)), + statuses_count=profile_data.get("statuses_count", random.randint(100, 2000)), + age=profile_data.get("age"), + gender=profile_data.get("gender"), + mbti=profile_data.get("mbti"), + country=profile_data.get("country"), + profession=profile_data.get("profession"), + interested_topics=profile_data.get("interested_topics", []), + source_entity_uuid=entity.uuid, + source_entity_type=entity_type, + ) + + def _generate_username(self, name: str) -> str: + """生成用户名""" + # 移除特殊字符,转换为小写 + username = name.lower().replace(" ", "_") + username = ''.join(c for c in username if c.isalnum() or c == '_') + + # 添加随机后缀避免重复 + suffix = random.randint(100, 999) + return f"{username}_{suffix}" + + def _search_zep_for_entity(self, entity: EntityNode) -> Dict[str, Any]: + """ + 使用Zep图谱混合搜索功能获取实体相关的丰富信息 + + Zep没有内置混合搜索接口,需要分别搜索edges和nodes然后合并结果。 + 使用并行请求同时搜索,提高效率。 + + Args: + entity: 实体节点对象 + + Returns: + 包含facts, node_summaries, context的字典 + """ + import concurrent.futures + + if not self.graph_id: + return {"facts": [], "node_summaries": [], "context": ""} + if self._fixed_zep_key and not self.zep_client: + return {"facts": [], "node_summaries": [], "context": ""} + + entity_name = entity.name + + results = { + "facts": [], + "node_summaries": [], + "context": "" + } + + comprehensive_query = f"关于{entity_name}的所有信息、活动、事件、关系和背景" + + def search_edges(): + """搜索边(事实/关系)- 带重试机制""" + max_retries = 3 + last_exception = None + delay = 2.0 + + for attempt in range(max_retries): + try: + def _edges(): + k = self._fixed_zep_key or get_zep_key() + if not k: + raise ValueError("ZEP_API_KEY 未配置") + return Zep(api_key=k).graph.search( + query=comprehensive_query, + graph_id=self.graph_id, + limit=30, + scope="edges", + reranker="rrf", + ) + + if self._fixed_zep_key: + r = self.zep_client.graph.search( + query=comprehensive_query, + graph_id=self.graph_id, + limit=30, + scope="edges", + reranker="rrf", + ) + else: + r = call_with_limit_rotation(_edges) + return r + except Exception as e: + last_exception = e + if attempt < max_retries - 1: + logger.debug(f"Zep边搜索第 {attempt + 1} 次失败: {str(e)[:80]}, 重试中...") + time.sleep(delay) + delay *= 2 + else: + logger.debug(f"Zep边搜索在 {max_retries} 次尝试后仍失败: {e}") + return None + + def search_nodes(): + """搜索节点(实体摘要)- 带重试机制""" + max_retries = 3 + last_exception = None + delay = 2.0 + + for attempt in range(max_retries): + try: + def _nodes(): + k = self._fixed_zep_key or get_zep_key() + if not k: + raise ValueError("ZEP_API_KEY 未配置") + return Zep(api_key=k).graph.search( + query=comprehensive_query, + graph_id=self.graph_id, + limit=20, + scope="nodes", + reranker="rrf", + ) + + if self._fixed_zep_key: + r = self.zep_client.graph.search( + query=comprehensive_query, + graph_id=self.graph_id, + limit=20, + scope="nodes", + reranker="rrf", + ) + else: + r = call_with_limit_rotation(_nodes) + return r + except Exception as e: + last_exception = e + if attempt < max_retries - 1: + logger.debug(f"Zep节点搜索第 {attempt + 1} 次失败: {str(e)[:80]}, 重试中...") + time.sleep(delay) + delay *= 2 + else: + logger.debug(f"Zep节点搜索在 {max_retries} 次尝试后仍失败: {e}") + return None + + try: + # 并行执行edges和nodes搜索 + with concurrent.futures.ThreadPoolExecutor(max_workers=2) as executor: + edge_future = executor.submit(search_edges) + node_future = executor.submit(search_nodes) + + # 获取结果 + edge_result = edge_future.result(timeout=30) + node_result = node_future.result(timeout=30) + + # 处理边搜索结果 + all_facts = set() + if edge_result and hasattr(edge_result, 'edges') and edge_result.edges: + for edge in edge_result.edges: + if hasattr(edge, 'fact') and edge.fact: + all_facts.add(edge.fact) + results["facts"] = list(all_facts) + + # 处理节点搜索结果 + all_summaries = set() + if node_result and hasattr(node_result, 'nodes') and node_result.nodes: + for node in node_result.nodes: + if hasattr(node, 'summary') and node.summary: + all_summaries.add(node.summary) + if hasattr(node, 'name') and node.name and node.name != entity_name: + all_summaries.add(f"相关实体: {node.name}") + results["node_summaries"] = list(all_summaries) + + # 构建综合上下文 + context_parts = [] + if results["facts"]: + context_parts.append("事实信息:\n" + "\n".join(f"- {f}" for f in results["facts"][:20])) + if results["node_summaries"]: + context_parts.append("相关实体:\n" + "\n".join(f"- {s}" for s in results["node_summaries"][:10])) + results["context"] = "\n\n".join(context_parts) + + logger.info(f"Zep混合检索完成: {entity_name}, 获取 {len(results['facts'])} 条事实, {len(results['node_summaries'])} 个相关节点") + + except concurrent.futures.TimeoutError: + logger.warning(f"Zep检索超时 ({entity_name})") + except Exception as e: + logger.warning(f"Zep检索失败 ({entity_name}): {e}") + + return results + + def _build_entity_context(self, entity: EntityNode) -> str: + """ + 构建实体的完整上下文信息 + + 包括: + 1. 实体本身的边信息(事实) + 2. 关联节点的详细信息 + 3. Zep混合检索到的丰富信息 + """ + context_parts = [] + + # 1. 添加实体属性信息 + if entity.attributes: + attrs = [] + for key, value in entity.attributes.items(): + if value and str(value).strip(): + attrs.append(f"- {key}: {value}") + if attrs: + context_parts.append("### 实体属性\n" + "\n".join(attrs)) + + # 2. 添加相关边信息(事实/关系) + existing_facts = set() + if entity.related_edges: + relationships = [] + for edge in entity.related_edges: # 不限制数量 + fact = edge.get("fact", "") + edge_name = edge.get("edge_name", "") + direction = edge.get("direction", "") + + if fact: + relationships.append(f"- {fact}") + existing_facts.add(fact) + elif edge_name: + if direction == "outgoing": + relationships.append(f"- {entity.name} --[{edge_name}]--> (相关实体)") + else: + relationships.append(f"- (相关实体) --[{edge_name}]--> {entity.name}") + + if relationships: + context_parts.append("### 相关事实和关系\n" + "\n".join(relationships)) + + # 3. 添加关联节点的详细信息 + if entity.related_nodes: + related_info = [] + for node in entity.related_nodes: # 不限制数量 + node_name = node.get("name", "") + node_labels = node.get("labels", []) + node_summary = node.get("summary", "") + + # 过滤掉默认标签 + custom_labels = [l for l in node_labels if l not in ["Entity", "Node"]] + label_str = f" ({', '.join(custom_labels)})" if custom_labels else "" + + if node_summary: + related_info.append(f"- **{node_name}**{label_str}: {node_summary}") + else: + related_info.append(f"- **{node_name}**{label_str}") + + if related_info: + context_parts.append("### 关联实体信息\n" + "\n".join(related_info)) + + # 4. 使用Zep混合检索获取更丰富的信息 + zep_results = self._search_zep_for_entity(entity) + + if zep_results.get("facts"): + # 去重:排除已存在的事实 + new_facts = [f for f in zep_results["facts"] if f not in existing_facts] + if new_facts: + context_parts.append("### Zep检索到的事实信息\n" + "\n".join(f"- {f}" for f in new_facts[:15])) + + if zep_results.get("node_summaries"): + context_parts.append("### Zep检索到的相关节点\n" + "\n".join(f"- {s}" for s in zep_results["node_summaries"][:10])) + + return "\n\n".join(context_parts) + + def _is_individual_entity(self, entity_type: str) -> bool: + """判断是否是个人类型实体""" + return entity_type.lower() in self.INDIVIDUAL_ENTITY_TYPES + + def _is_group_entity(self, entity_type: str) -> bool: + """判断是否是群体/机构类型实体""" + return entity_type.lower() in self.GROUP_ENTITY_TYPES + + def _generate_profile_with_llm( + self, + entity_name: str, + entity_type: str, + entity_summary: str, + entity_attributes: Dict[str, Any], + context: str + ) -> Dict[str, Any]: + """ + 使用LLM生成非常详细的人设 + + 根据实体类型区分: + - 个人实体:生成具体的人物设定 + - 群体/机构实体:生成代表性账号设定 + """ + + is_individual = self._is_individual_entity(entity_type) + + if is_individual: + prompt = self._build_individual_persona_prompt( + entity_name, entity_type, entity_summary, entity_attributes, context + ) + else: + prompt = self._build_group_persona_prompt( + entity_name, entity_type, entity_summary, entity_attributes, context + ) + + # 尝试多次生成,直到成功或达到最大重试次数 + max_attempts = 3 + last_error = None + + for attempt in range(max_attempts): + try: + def _create(): + if self._fixed_llm_key: + return self.client.chat.completions.create( + model=self.model_name, + messages=[ + {"role": "system", "content": self._get_system_prompt(is_individual)}, + {"role": "user", "content": prompt}, + ], + response_format={"type": "json_object"}, + temperature=0.7 - (attempt * 0.1), + ) + key = get_llm_key() + if not key: + raise ValueError("LLM_API_KEY 未配置") + cl = OpenAI(api_key=key, base_url=self.base_url) + return cl.chat.completions.create( + model=self.model_name, + messages=[ + {"role": "system", "content": self._get_system_prompt(is_individual)}, + {"role": "user", "content": prompt}, + ], + response_format={"type": "json_object"}, + temperature=0.7 - (attempt * 0.1), + ) + + response = ( + self.client.chat.completions.create( + model=self.model_name, + messages=[ + {"role": "system", "content": self._get_system_prompt(is_individual)}, + {"role": "user", "content": prompt}, + ], + response_format={"type": "json_object"}, + temperature=0.7 - (attempt * 0.1), + ) + if self._fixed_llm_key + else call_with_limit_rotation(_create) + ) + + content = response.choices[0].message.content + + # 检查是否被截断(finish_reason不是'stop') + finish_reason = response.choices[0].finish_reason + if finish_reason == 'length': + logger.warning(f"LLM输出被截断 (attempt {attempt+1}), 尝试修复...") + content = self._fix_truncated_json(content) + + # 尝试解析JSON + try: + result = json.loads(content) + + # 验证必需字段 + if "bio" not in result or not result["bio"]: + result["bio"] = entity_summary[:200] if entity_summary else f"{entity_type}: {entity_name}" + if "persona" not in result or not result["persona"]: + result["persona"] = entity_summary or f"{entity_name}是一个{entity_type}。" + + return result + + except json.JSONDecodeError as je: + logger.warning(f"JSON解析失败 (attempt {attempt+1}): {str(je)[:80]}") + + # 尝试修复JSON + result = self._try_fix_json(content, entity_name, entity_type, entity_summary) + if result.get("_fixed"): + del result["_fixed"] + return result + + last_error = je + + except Exception as e: + logger.warning(f"LLM调用失败 (attempt {attempt+1}): {str(e)[:80]}") + last_error = e + import time + time.sleep(1 * (attempt + 1)) # 指数退避 + + logger.warning(f"LLM生成人设失败({max_attempts}次尝试): {last_error}, 使用规则生成") + return self._generate_profile_rule_based( + entity_name, entity_type, entity_summary, entity_attributes + ) + + def _fix_truncated_json(self, content: str) -> str: + """修复被截断的JSON(输出被max_tokens限制截断)""" + import re + + # 如果JSON被截断,尝试闭合它 + content = content.strip() + + # 计算未闭合的括号 + open_braces = content.count('{') - content.count('}') + open_brackets = content.count('[') - content.count(']') + + # 检查是否有未闭合的字符串 + # 简单检查:如果最后一个引号后没有逗号或闭合括号,可能是字符串被截断 + if content and content[-1] not in '",}]': + # 尝试闭合字符串 + content += '"' + + # 闭合括号 + content += ']' * open_brackets + content += '}' * open_braces + + return content + + def _try_fix_json(self, content: str, entity_name: str, entity_type: str, entity_summary: str = "") -> Dict[str, Any]: + """尝试修复损坏的JSON""" + import re + + # 1. 首先尝试修复被截断的情况 + content = self._fix_truncated_json(content) + + # 2. 尝试提取JSON部分 + json_match = re.search(r'\{[\s\S]*\}', content) + if json_match: + json_str = json_match.group() + + # 3. 处理字符串中的换行符问题 + # 找到所有字符串值并替换其中的换行符 + def fix_string_newlines(match): + s = match.group(0) + # 替换字符串内的实际换行符为空格 + s = s.replace('\n', ' ').replace('\r', ' ') + # 替换多余空格 + s = re.sub(r'\s+', ' ', s) + return s + + # 匹配JSON字符串值 + json_str = re.sub(r'"[^"\\]*(?:\\.[^"\\]*)*"', fix_string_newlines, json_str) + + # 4. 尝试解析 + try: + result = json.loads(json_str) + result["_fixed"] = True + return result + except json.JSONDecodeError as e: + # 5. 如果还是失败,尝试更激进的修复 + try: + # 移除所有控制字符 + json_str = re.sub(r'[\x00-\x1f\x7f-\x9f]', ' ', json_str) + # 替换所有连续空白 + json_str = re.sub(r'\s+', ' ', json_str) + result = json.loads(json_str) + result["_fixed"] = True + return result + except: + pass + + # 6. 尝试从内容中提取部分信息 + bio_match = re.search(r'"bio"\s*:\s*"([^"]*)"', content) + persona_match = re.search(r'"persona"\s*:\s*"([^"]*)', content) # 可能被截断 + + bio = bio_match.group(1) if bio_match else (entity_summary[:200] if entity_summary else f"{entity_type}: {entity_name}") + persona = persona_match.group(1) if persona_match else (entity_summary or f"{entity_name}是一个{entity_type}。") + + # 如果提取到了有意义的内容,标记为已修复 + if bio_match or persona_match: + logger.info(f"从损坏的JSON中提取了部分信息") + return { + "bio": bio, + "persona": persona, + "_fixed": True + } + + # 7. 完全失败,返回基础结构 + logger.warning(f"JSON修复失败,返回基础结构") + return { + "bio": entity_summary[:200] if entity_summary else f"{entity_type}: {entity_name}", + "persona": entity_summary or f"{entity_name}是一个{entity_type}。" + } + + def _get_system_prompt(self, is_individual: bool) -> str: + """获取系统提示词""" + base_prompt = ( + "你是社交媒体用户画像生成专家。生成详细、真实的人设用于「创业想法验证」舆论模拟:" + "实体可能为硅谷风格 VC、YC 式合伙人、难取悦的天使、同行创始人、目标付费客户、犹豫用户等。" + "人设须体现其对该类想法的典型评判标准( traction、差异化、团队、风险等)。" + "必须返回有效的JSON格式,所有字符串值不能包含未转义的换行符。使用中文。" + ) + return base_prompt + + def _build_individual_persona_prompt( + self, + entity_name: str, + entity_type: str, + entity_summary: str, + entity_attributes: Dict[str, Any], + context: str + ) -> str: + """构建个人实体的详细人设提示词""" + + attrs_str = json.dumps(entity_attributes, ensure_ascii=False) if entity_attributes else "无" + context_str = context[:3000] if context else "无额外上下文" + + return f"""为实体生成详细的社交媒体用户人设,最大程度还原已有现实情况。 + +实体名称: {entity_name} +实体类型: {entity_type} +实体摘要: {entity_summary} +实体属性: {attrs_str} + +上下文信息: +{context_str} + +请生成JSON,包含以下字段: + +1. bio: 社交媒体简介,200字 +2. persona: 详细人设描述(2000字的纯文本),需包含: + - 基本信息(年龄、职业、教育背景、所在地) + - 人物背景(重要经历、与事件的关联、社会关系) + - 性格特征(MBTI类型、核心性格、情绪表达方式) + - 社交媒体行为(发帖频率、内容偏好、互动风格、语言特点) + - 立场观点(对话题的态度;若是投资人需体现投资偏好与挑剔点;若是客户需体现付费阈值与痛点) + - 独特特征(口头禅、特殊经历、个人爱好) + - 个人记忆(人设的重要部分:该个体与材料中创业想法/事件的关系,以及已有动作与反应) +3. age: 年龄数字(必须是整数) +4. gender: 性别,必须是英文: "male" 或 "female" +5. mbti: MBTI类型(如INTJ、ENFP等) +6. country: 国家(使用中文,如"中国") +7. profession: 职业 +8. interested_topics: 感兴趣话题数组 + +重要: +- 所有字段值必须是字符串或数字,不要使用换行符 +- persona必须是一段连贯的文字描述 +- 使用中文(除了gender字段必须用英文male/female) +- 内容要与实体信息保持一致 +- age必须是有效的整数,gender必须是"male"或"female" +""" + + def _build_group_persona_prompt( + self, + entity_name: str, + entity_type: str, + entity_summary: str, + entity_attributes: Dict[str, Any], + context: str + ) -> str: + """构建群体/机构实体的详细人设提示词""" + + attrs_str = json.dumps(entity_attributes, ensure_ascii=False) if entity_attributes else "无" + context_str = context[:3000] if context else "无额外上下文" + + return f"""为机构/群体实体生成详细的社交媒体账号设定,最大程度还原已有现实情况。 + +实体名称: {entity_name} +实体类型: {entity_type} +实体摘要: {entity_summary} +实体属性: {attrs_str} + +上下文信息: +{context_str} + +请生成JSON,包含以下字段: + +1. bio: 官方账号简介,200字,专业得体 +2. persona: 详细账号设定描述(2000字的纯文本),需包含: + - 机构基本信息(正式名称、机构性质、成立背景、主要职能) + - 账号定位(账号类型、目标受众、核心功能) + - 发言风格(语言特点、常用表达、禁忌话题) + - 发布内容特点(内容类型、发布频率、活跃时间段) + - 立场态度(对核心话题的官方立场、面对争议的处理方式;若是投资机构/媒体需体现对该赛道的公开态度) + - 特殊说明(代表的群体画像、运营习惯) + - 机构记忆(机构与材料中创业想法/事件的关系,以及已有动作与反应) +3. age: 固定填30(机构账号的虚拟年龄) +4. gender: 固定填"other"(机构账号使用other表示非个人) +5. mbti: MBTI类型,用于描述账号风格,如ISTJ代表严谨保守 +6. country: 国家(使用中文,如"中国") +7. profession: 机构职能描述 +8. interested_topics: 关注领域数组 + +重要: +- 所有字段值必须是字符串或数字,不允许null值 +- persona必须是一段连贯的文字描述,不要使用换行符 +- 使用中文(除了gender字段必须用英文"other") +- age必须是整数30,gender必须是字符串"other" +- 机构账号发言要符合其身份定位""" + + def _generate_profile_rule_based( + self, + entity_name: str, + entity_type: str, + entity_summary: str, + entity_attributes: Dict[str, Any] + ) -> Dict[str, Any]: + """使用规则生成基础人设""" + + # 根据实体类型生成不同的人设 + entity_type_lower = entity_type.lower() + + if entity_type_lower in ["student", "alumni"]: + return { + "bio": f"{entity_type} with interests in academics and social issues.", + "persona": f"{entity_name} is a {entity_type.lower()} who is actively engaged in academic and social discussions. They enjoy sharing perspectives and connecting with peers.", + "age": random.randint(18, 30), + "gender": random.choice(["male", "female"]), + "mbti": random.choice(self.MBTI_TYPES), + "country": random.choice(self.COUNTRIES), + "profession": "Student", + "interested_topics": ["Education", "Social Issues", "Technology"], + } + + elif entity_type_lower in ["publicfigure", "expert", "faculty"]: + return { + "bio": f"Expert and thought leader in their field.", + "persona": f"{entity_name} is a recognized {entity_type.lower()} who shares insights and opinions on important matters. They are known for their expertise and influence in public discourse.", + "age": random.randint(35, 60), + "gender": random.choice(["male", "female"]), + "mbti": random.choice(["ENTJ", "INTJ", "ENTP", "INTP"]), + "country": random.choice(self.COUNTRIES), + "profession": entity_attributes.get("occupation", "Expert"), + "interested_topics": ["Politics", "Economics", "Culture & Society"], + } + + elif entity_type_lower in ["mediaoutlet", "socialmediaplatform"]: + return { + "bio": f"Official account for {entity_name}. News and updates.", + "persona": f"{entity_name} is a media entity that reports news and facilitates public discourse. The account shares timely updates and engages with the audience on current events.", + "age": 30, # 机构虚拟年龄 + "gender": "other", # 机构使用other + "mbti": "ISTJ", # 机构风格:严谨保守 + "country": "中国", + "profession": "Media", + "interested_topics": ["General News", "Current Events", "Public Affairs"], + } + + elif entity_type_lower in ["university", "governmentagency", "ngo", "organization"]: + return { + "bio": f"Official account of {entity_name}.", + "persona": f"{entity_name} is an institutional entity that communicates official positions, announcements, and engages with stakeholders on relevant matters.", + "age": 30, # 机构虚拟年龄 + "gender": "other", # 机构使用other + "mbti": "ISTJ", # 机构风格:严谨保守 + "country": "中国", + "profession": entity_type, + "interested_topics": ["Public Policy", "Community", "Official Announcements"], + } + + elif entity_type_lower in ["ventureinvestor", "venturecapitalfirm"]: + return { + "bio": "VC partner; focuses on traction, moat, and team.", + "persona": f"{entity_name} is a Silicon Valley-style VC who is hard to impress, asks about TAM and defensibility, and rarely commits without signal.", + "age": random.randint(32, 55), + "gender": random.choice(["male", "female"]), + "mbti": random.choice(["ENTJ", "INTJ", "ESTJ"]), + "country": "美国", + "profession": "Venture Investor", + "interested_topics": ["Startups", "B2B SaaS", "Fundraising"], + } + + elif entity_type_lower in ["angelinvestor"]: + return { + "bio": "Angel investor; skeptical, pattern-matches on founders.", + "persona": f"{entity_name} is a picky angel who has seen many pitches and pushes back on vague metrics and hype.", + "age": random.randint(38, 62), + "gender": random.choice(["male", "female"]), + "mbti": random.choice(["INTJ", "ISTP", "ENTP"]), + "country": random.choice(self.COUNTRIES), + "profession": "Angel Investor", + "interested_topics": ["Early-stage", "Angel deals", "Product-market fit"], + } + + elif entity_type_lower in ["acceleratorpartner"]: + return { + "bio": "Accelerator partner; YC-style fast feedback and clarity.", + "persona": f"{entity_name} is an accelerator partner who demands clear one-liners, weekly growth, and ruthless focus—friendly but intense.", + "age": random.randint(30, 48), + "gender": random.choice(["male", "female"]), + "mbti": random.choice(["ENTJ", "ENFP", "ENTP"]), + "country": "美国", + "profession": "Accelerator Partner", + "interested_topics": ["Demo day", "Batch companies", "Mentorship"], + } + + elif entity_type_lower in ["startupfounder"]: + return { + "bio": "Peer founder building in the same space.", + "persona": f"{entity_name} is another founder who compares ideas to their own roadmap, shares war stories, and may collaborate or compete.", + "age": random.randint(26, 45), + "gender": random.choice(["male", "female"]), + "mbti": random.choice(self.MBTI_TYPES), + "country": random.choice(self.COUNTRIES), + "profession": "Startup Founder", + "interested_topics": ["Product", "Growth", "Fundraising"], + } + + elif entity_type_lower in ["targetcustomer"]: + return { + "bio": "Potential buyer / adopter in the ICP.", + "persona": f"{entity_name} is a target customer who cares about price, workflow fit, and whether the product solves a real daily pain.", + "age": random.randint(25, 52), + "gender": random.choice(["male", "female"]), + "mbti": random.choice(["ISFJ", "ESTJ", "ENFP", "ISTJ"]), + "country": random.choice(self.COUNTRIES), + "profession": "Buyer / User", + "interested_topics": ["ROI", "Usability", "Support"], + } + + elif entity_type_lower in ["skepticaluser"]: + return { + "bio": "On-the-fence or negative potential user.", + "persona": f"{entity_name} is skeptical about new tools—worried about switching cost, privacy, or whether the idea beats incumbents.", + "age": random.randint(22, 55), + "gender": random.choice(["male", "female"]), + "mbti": random.choice(["ISTP", "INTP", "ISTJ"]), + "country": random.choice(self.COUNTRIES), + "profession": "Skeptical User", + "interested_topics": ["Trust", "Alternatives", "Risk"], + } + + else: + # 默认人设 + return { + "bio": entity_summary[:150] if entity_summary else f"{entity_type}: {entity_name}", + "persona": entity_summary or f"{entity_name} is a {entity_type.lower()} participating in social discussions.", + "age": random.randint(25, 50), + "gender": random.choice(["male", "female"]), + "mbti": random.choice(self.MBTI_TYPES), + "country": random.choice(self.COUNTRIES), + "profession": entity_type, + "interested_topics": ["General", "Social Issues"], + } + + def set_graph_id(self, graph_id: str): + """设置图谱ID用于Zep检索""" + self.graph_id = graph_id + + def generate_profiles_from_entities( + self, + entities: List[EntityNode], + use_llm: bool = True, + progress_callback: Optional[callable] = None, + graph_id: Optional[str] = None, + parallel_count: int = 5, + realtime_output_path: Optional[str] = None, + output_platform: str = "reddit" + ) -> List[OasisAgentProfile]: + """ + 批量从实体生成Agent Profile(支持并行生成) + + Args: + entities: 实体列表 + use_llm: 是否使用LLM生成详细人设 + progress_callback: 进度回调函数 (current, total, message) + graph_id: 图谱ID,用于Zep检索获取更丰富上下文 + parallel_count: 并行生成数量,默认5 + realtime_output_path: 实时写入的文件路径(如果提供,每生成一个就写入一次) + output_platform: 输出平台格式 ("reddit" 或 "twitter") + + Returns: + Agent Profile列表 + """ + import concurrent.futures + from threading import Lock + + # 设置graph_id用于Zep检索 + if graph_id: + self.graph_id = graph_id + + total = len(entities) + profiles = [None] * total # 预分配列表保持顺序 + completed_count = [0] # 使用列表以便在闭包中修改 + lock = Lock() + + # 实时写入文件的辅助函数 + def save_profiles_realtime(): + """实时保存已生成的 profiles 到文件""" + if not realtime_output_path: + return + + with lock: + # 过滤出已生成的 profiles + existing_profiles = [p for p in profiles if p is not None] + if not existing_profiles: + return + + try: + if output_platform == "reddit": + # Reddit JSON 格式 + profiles_data = [p.to_reddit_format() for p in existing_profiles] + with open(realtime_output_path, 'w', encoding='utf-8') as f: + json.dump(profiles_data, f, ensure_ascii=False, indent=2) + else: + # Twitter CSV 格式 + import csv + profiles_data = [p.to_twitter_format() for p in existing_profiles] + if profiles_data: + fieldnames = list(profiles_data[0].keys()) + with open(realtime_output_path, 'w', encoding='utf-8', newline='') as f: + writer = csv.DictWriter(f, fieldnames=fieldnames) + writer.writeheader() + writer.writerows(profiles_data) + except Exception as e: + logger.warning(f"实时保存 profiles 失败: {e}") + + def generate_single_profile(idx: int, entity: EntityNode) -> tuple: + """生成单个profile的工作函数""" + entity_type = entity.get_entity_type() or "Entity" + + try: + profile = self.generate_profile_from_entity( + entity=entity, + user_id=idx, + use_llm=use_llm + ) + + # 实时输出生成的人设到控制台和日志 + self._print_generated_profile(entity.name, entity_type, profile) + + return idx, profile, None + + except Exception as e: + logger.error(f"生成实体 {entity.name} 的人设失败: {str(e)}") + # 创建一个基础profile + fallback_profile = OasisAgentProfile( + user_id=idx, + user_name=self._generate_username(entity.name), + name=entity.name, + bio=f"{entity_type}: {entity.name}", + persona=entity.summary or f"A participant in social discussions.", + source_entity_uuid=entity.uuid, + source_entity_type=entity_type, + ) + return idx, fallback_profile, str(e) + + logger.info(f"开始并行生成 {total} 个Agent人设(并行数: {parallel_count})...") + print(f"\n{'='*60}") + print(f"开始生成Agent人设 - 共 {total} 个实体,并行数: {parallel_count}") + print(f"{'='*60}\n") + + # 使用线程池并行执行 + with concurrent.futures.ThreadPoolExecutor(max_workers=parallel_count) as executor: + # 提交所有任务 + future_to_entity = { + executor.submit(generate_single_profile, idx, entity): (idx, entity) + for idx, entity in enumerate(entities) + } + + # 收集结果 + for future in concurrent.futures.as_completed(future_to_entity): + idx, entity = future_to_entity[future] + entity_type = entity.get_entity_type() or "Entity" + + try: + result_idx, profile, error = future.result() + profiles[result_idx] = profile + + with lock: + completed_count[0] += 1 + current = completed_count[0] + + # 实时写入文件 + save_profiles_realtime() + + if progress_callback: + progress_callback( + current, + total, + f"已完成 {current}/{total}: {entity.name}({entity_type})" + ) + + if error: + logger.warning(f"[{current}/{total}] {entity.name} 使用备用人设: {error}") + else: + logger.info(f"[{current}/{total}] 成功生成人设: {entity.name} ({entity_type})") + + except Exception as e: + logger.error(f"处理实体 {entity.name} 时发生异常: {str(e)}") + with lock: + completed_count[0] += 1 + profiles[idx] = OasisAgentProfile( + user_id=idx, + user_name=self._generate_username(entity.name), + name=entity.name, + bio=f"{entity_type}: {entity.name}", + persona=entity.summary or "A participant in social discussions.", + source_entity_uuid=entity.uuid, + source_entity_type=entity_type, + ) + # 实时写入文件(即使是备用人设) + save_profiles_realtime() + + print(f"\n{'='*60}") + print(f"人设生成完成!共生成 {len([p for p in profiles if p])} 个Agent") + print(f"{'='*60}\n") + + return profiles + + def _print_generated_profile(self, entity_name: str, entity_type: str, profile: OasisAgentProfile): + """实时输出生成的人设到控制台(完整内容,不截断)""" + separator = "-" * 70 + + # 构建完整输出内容(不截断) + topics_str = ', '.join(profile.interested_topics) if profile.interested_topics else '无' + + output_lines = [ + f"\n{separator}", + f"[已生成] {entity_name} ({entity_type})", + f"{separator}", + f"用户名: {profile.user_name}", + f"", + f"【简介】", + f"{profile.bio}", + f"", + f"【详细人设】", + f"{profile.persona}", + f"", + f"【基本属性】", + f"年龄: {profile.age} | 性别: {profile.gender} | MBTI: {profile.mbti}", + f"职业: {profile.profession} | 国家: {profile.country}", + f"兴趣话题: {topics_str}", + separator + ] + + output = "\n".join(output_lines) + + # 只输出到控制台(避免重复,logger不再输出完整内容) + print(output) + + def save_profiles( + self, + profiles: List[OasisAgentProfile], + file_path: str, + platform: str = "reddit" + ): + """ + 保存Profile到文件(根据平台选择正确格式) + + OASIS平台格式要求: + - Twitter: CSV格式 + - Reddit: JSON格式 + + Args: + profiles: Profile列表 + file_path: 文件路径 + platform: 平台类型 ("reddit" 或 "twitter") + """ + if platform == "twitter": + self._save_twitter_csv(profiles, file_path) + else: + self._save_reddit_json(profiles, file_path) + + def _save_twitter_csv(self, profiles: List[OasisAgentProfile], file_path: str): + """ + 保存Twitter Profile为CSV格式(符合OASIS官方要求) + + OASIS Twitter要求的CSV字段: + - user_id: 用户ID(根据CSV顺序从0开始) + - name: 用户真实姓名 + - username: 系统中的用户名 + - user_char: 详细人设描述(注入到LLM系统提示中,指导Agent行为) + - description: 简短的公开简介(显示在用户资料页面) + + user_char vs description 区别: + - user_char: 内部使用,LLM系统提示,决定Agent如何思考和行动 + - description: 外部显示,其他用户可见的简介 + """ + import csv + + # 确保文件扩展名是.csv + if not file_path.endswith('.csv'): + file_path = file_path.replace('.json', '.csv') + + with open(file_path, 'w', newline='', encoding='utf-8') as f: + writer = csv.writer(f) + + # 写入OASIS要求的表头 + headers = ['user_id', 'name', 'username', 'user_char', 'description'] + writer.writerow(headers) + + # 写入数据行 + for idx, profile in enumerate(profiles): + # user_char: 完整人设(bio + persona),用于LLM系统提示 + user_char = profile.bio + if profile.persona and profile.persona != profile.bio: + user_char = f"{profile.bio} {profile.persona}" + # 处理换行符(CSV中用空格替代) + user_char = user_char.replace('\n', ' ').replace('\r', ' ') + + # description: 简短简介,用于外部显示 + description = profile.bio.replace('\n', ' ').replace('\r', ' ') + + row = [ + idx, # user_id: 从0开始的顺序ID + profile.name, # name: 真实姓名 + profile.user_name, # username: 用户名 + user_char, # user_char: 完整人设(内部LLM使用) + description # description: 简短简介(外部显示) + ] + writer.writerow(row) + + logger.info(f"已保存 {len(profiles)} 个Twitter Profile到 {file_path} (OASIS CSV格式)") + + def _normalize_gender(self, gender: Optional[str]) -> str: + """ + 标准化gender字段为OASIS要求的英文格式 + + OASIS要求: male, female, other + """ + if not gender: + return "other" + + gender_lower = gender.lower().strip() + + # 中文映射 + gender_map = { + "男": "male", + "女": "female", + "机构": "other", + "其他": "other", + # 英文已有 + "male": "male", + "female": "female", + "other": "other", + } + + return gender_map.get(gender_lower, "other") + + def _save_reddit_json(self, profiles: List[OasisAgentProfile], file_path: str): + """ + 保存Reddit Profile为JSON格式 + + 使用与 to_reddit_format() 一致的格式,确保 OASIS 能正确读取。 + 必须包含 user_id 字段,这是 OASIS agent_graph.get_agent() 匹配的关键! + + 必需字段: + - user_id: 用户ID(整数,用于匹配 initial_posts 中的 poster_agent_id) + - username: 用户名 + - name: 显示名称 + - bio: 简介 + - persona: 详细人设 + - age: 年龄(整数) + - gender: "male", "female", 或 "other" + - mbti: MBTI类型 + - country: 国家 + """ + data = [] + for idx, profile in enumerate(profiles): + # 使用与 to_reddit_format() 一致的格式 + item = { + "user_id": profile.user_id if profile.user_id is not None else idx, # 关键:必须包含 user_id + "username": profile.user_name, + "name": profile.name, + "bio": profile.bio[:150] if profile.bio else f"{profile.name}", + "persona": profile.persona or f"{profile.name} is a participant in social discussions.", + "karma": profile.karma if profile.karma else 1000, + "created_at": profile.created_at, + # OASIS必需字段 - 确保都有默认值 + "age": profile.age if profile.age else 30, + "gender": self._normalize_gender(profile.gender), + "mbti": profile.mbti if profile.mbti else "ISTJ", + "country": profile.country if profile.country else "中国", + } + + # 可选字段 + if profile.profession: + item["profession"] = profile.profession + if profile.interested_topics: + item["interested_topics"] = profile.interested_topics + + data.append(item) + + with open(file_path, 'w', encoding='utf-8') as f: + json.dump(data, f, ensure_ascii=False, indent=2) + + logger.info(f"已保存 {len(profiles)} 个Reddit Profile到 {file_path} (JSON格式,包含user_id字段)") + + # 保留旧方法名作为别名,保持向后兼容 + def save_profiles_to_json( + self, + profiles: List[OasisAgentProfile], + file_path: str, + platform: str = "reddit" + ): + """[已废弃] 请使用 save_profiles() 方法""" + logger.warning("save_profiles_to_json已废弃,请使用save_profiles方法") + self.save_profiles(profiles, file_path, platform) + diff --git a/app/app/services/ontology_generator.py b/app/app/services/ontology_generator.py new file mode 100644 index 0000000000000000000000000000000000000000..3abebd8639f35f86922cb4c1bea2e23c4b4d46df --- /dev/null +++ b/app/app/services/ontology_generator.py @@ -0,0 +1,507 @@ +""" +本体生成服务 +接口1:分析文本内容,生成适合社会模拟的实体和关系类型定义 +""" + +import json +import logging +import re +from typing import Dict, Any, List, Optional +from ..utils.llm_client import LLMClient + +logger = logging.getLogger(__name__) + + +def _to_pascal_case(name: str) -> str: + """将任意格式的名称转换为 PascalCase(如 'works_for' -> 'WorksFor', 'person' -> 'Person')""" + # 按非字母数字字符分割 + parts = re.split(r'[^a-zA-Z0-9]+', name) + # 再按 camelCase 边界分割(如 'camelCase' -> ['camel', 'Case']) + words = [] + for part in parts: + words.extend(re.sub(r'([a-z])([A-Z])', r'\1_\2', part).split('_')) + # 每个词首字母大写,过滤空串 + result = ''.join(word.capitalize() for word in words if word) + return result if result else 'Unknown' + + +# 本体生成的系统提示词 +ONTOLOGY_SYSTEM_PROMPT = """你是一个专业的知识图谱本体设计专家。你的任务是分析给定的文本内容和模拟需求,设计适合**社交媒体上的创业想法验证模拟**的实体类型和关系类型(在保留原「舆论/讨论」能力的同时,优先服务想法验证)。 + +**重要:你必须输出有效的JSON格式数据,不要输出任何其他内容。** + +## 核心任务背景 + +我们正在构建一个**社交媒体模拟系统**,典型用途是**用多角色 Agent 压力测试用户的创业想法**:投资人(可体现硅谷 VC、YC 风格、难取悦的天使等不同挑剔程度)、同行创始人、目标客户与潜在买家(含果断、犹豫、拒绝)、媒体或意见领袖等会在平台上讨论、质疑或支持该想法。 +- 每个实体都是一个可以在社交媒体上发声、互动、传播信息的"账号"或"主体" +- 实体之间会相互影响、转发、评论、回应 +- 我们需要模拟围绕「该产品/商业模式」的讨论、投资兴趣与购买意愿等信息路径 + +因此,**实体必须是现实中真实存在的、可以在社媒上发声和互动的主体**: + +**可以是**: +- 具体的个人(公众人物、当事人、意见领袖、专家学者、普通人) +- 公司、企业(包括其官方账号) +- 组织机构(大学、协会、NGO、工会等) +- 政府部门、监管机构 +- 媒体机构(报纸、电视台、自媒体、网站) +- 社交媒体平台本身 +- 特定群体代表(如校友会、粉丝团、维权群体等) + +**不可以是**: +- 抽象概念(如"舆论"、"情绪"、"趋势") +- 主题/话题(如"学术诚信"、"教育改革") +- 观点/态度(如"支持方"、"反对方") + +## 输出格式 + +请输出JSON格式,包含以下结构: + +```json +{ + "entity_types": [ + { + "name": "实体类型名称(英文,PascalCase)", + "description": "简短描述(英文,不超过100字符)", + "attributes": [ + { + "name": "属性名(英文,snake_case)", + "type": "text", + "description": "属性描述" + } + ], + "examples": ["示例实体1", "示例实体2"] + } + ], + "edge_types": [ + { + "name": "关系类型名称(英文,UPPER_SNAKE_CASE)", + "description": "简短描述(英文,不超过100字符)", + "source_targets": [ + {"source": "源实体类型", "target": "目标实体类型"} + ], + "attributes": [] + } + ], + "analysis_summary": "对文本内容的简要分析说明(中文)" +} +``` + +## 设计指南(极其重要!) + +### 1. 实体类型设计 - 必须严格遵守 + +**数量要求:必须正好10个实体类型** + +**层次结构要求(必须同时包含具体类型和兜底类型)**: + +你的10个实体类型必须包含以下层次: + +A. **兜底类型(必须包含,放在列表最后2个)**: + - `Person`: 任何自然人个体的兜底类型。当一个人不属于其他更具体的人物类型时,归入此类。 + - `Organization`: 任何组织机构的兜底类型。当一个组织不属于其他更具体的组织类型时,归入此类。 + +B. **具体类型(8个,根据文本内容设计)**: + - 针对文本中出现的主要角色,设计更具体的类型 + - 例如:如果文本涉及学术事件,可以有 `Student`, `Professor`, `University` + - 例如:如果文本涉及商业事件,可以有 `Company`, `CEO`, `Employee` + +**为什么需要兜底类型**: +- 文本中会出现各种人物,如"中小学教师"、"路人甲"、"某位网友" +- 如果没有专门的类型匹配,他们应该被归入 `Person` +- 同理,小型组织、临时团体等应该归入 `Organization` + +**具体类型的设计原则**: +- 从文本中识别出高频出现或关键的角色类型 +- 每个具体类型应该有明确的边界,避免重叠 +- description 必须清晰说明这个类型和兜底类型的区别 + +### 2. 关系类型设计 + +- 数量:6-10个 +- 关系应该反映社媒互动中的真实联系 +- 确保关系的 source_targets 涵盖你定义的实体类型 + +### 3. 属性设计 + +- 每个实体类型1-3个关键属性 +- **注意**:属性名不能使用 `name`、`uuid`、`group_id`、`created_at`、`summary`(这些是系统保留字) +- 推荐使用:`full_name`, `title`, `role`, `position`, `location`, `description` 等 + +## 实体类型参考 + +**个人类(具体)** — 若文本与「创业/产品」相关,请优先包含以下类型中的若干(名称用 PascalCase,可微调命名): +- VentureInvestor: 风险投资人(可偏硅谷风格大型基金) +- AngelInvestor: 天使/个人投资人(可设定为极难取悦) +- AcceleratorPartner: 加速器合伙人(可体现 YC 式 fast iteration 提问风格) +- StartupFounder: 同行创始人 +- TargetCustomer: 目标付费用户或核心采用者 +- SkepticalUser: 犹豫或反对的潜在用户 +- IndustryExpert: 行业专家/KOL(可质疑技术或商业假设) +- Journalist: 科技/商业记者 + +其他常见具体类型(若文本需要可替换其中部分): +- Student, Professor, Executive, Official, Lawyer, Doctor, Celebrity 等 + +**个人类(兜底)**: +- Person: 任何自然人(不属于上述具体类型时使用) + +**组织类(具体)**: +- StartupCompany: 初创公司 +- VentureCapitalFirm: VC 机构 +- University: 高校 +- Company: 公司企业 +- MediaOutlet: 媒体机构 +- NGO: 非政府组织 +(可按文本选用 GovernmentAgency、Hospital、School 等) + +**组织类(兜底)**: +- Organization: 任何组织机构(不属于上述具体类型时使用) + +## 关系类型参考 + +- INVESTS_IN: 投资关系 +- COMPETES_WITH: 竞争 +- WORKS_FOR: 工作于 +- STUDIES_AT: 就读于 +- AFFILIATED_WITH: 隶属于 +- REPRESENTS: 代表 +- REPORTS_ON: 报道 +- COMMENTS_ON: 评论 +- RESPONDS_TO: 回应 +- SUPPORTS: 支持 +- OPPOSES: 反对 +- COLLABORATES_WITH: 合作 +- PURCHASES_FROM / USES_PRODUCT: 可在描述中体现客户与产品关系(命名保持英文 PascalCase / UPPER_SNAKE_CASE) +""" + + +class OntologyGenerator: + """ + 本体生成器 + 分析文本内容,生成实体和关系类型定义 + """ + + def __init__(self, llm_client: Optional[LLMClient] = None): + self.llm_client = llm_client or LLMClient() + + def generate( + self, + document_texts: List[str], + simulation_requirement: str, + additional_context: Optional[str] = None + ) -> Dict[str, Any]: + """ + 生成本体定义 + + Args: + document_texts: 文档文本列表 + simulation_requirement: 模拟需求描述 + additional_context: 额外上下文 + + Returns: + 本体定义(entity_types, edge_types等) + """ + # 构建用户消息 + user_message = self._build_user_message( + document_texts, + simulation_requirement, + additional_context + ) + + messages = [ + {"role": "system", "content": ONTOLOGY_SYSTEM_PROMPT}, + {"role": "user", "content": user_message} + ] + + # 调用LLM + result = self.llm_client.chat_json( + messages=messages, + temperature=0.3, + max_tokens=4096 + ) + + # 验证和后处理 + result = self._validate_and_process(result) + + return result + + # 传给 LLM 的文本最大长度(5万字) + MAX_TEXT_LENGTH_FOR_LLM = 50000 + + def _build_user_message( + self, + document_texts: List[str], + simulation_requirement: str, + additional_context: Optional[str] + ) -> str: + """构建用户消息""" + + # 合并文本 + combined_text = "\n\n---\n\n".join(document_texts) + original_length = len(combined_text) + + # 如果文本超过5万字,截断(仅影响传给LLM的内容,不影响图谱构建) + if len(combined_text) > self.MAX_TEXT_LENGTH_FOR_LLM: + combined_text = combined_text[:self.MAX_TEXT_LENGTH_FOR_LLM] + combined_text += f"\n\n...(原文共{original_length}字,已截取前{self.MAX_TEXT_LENGTH_FOR_LLM}字用于本体分析)..." + + message = f"""## 模拟需求 + +{simulation_requirement} + +## 文档内容 + +{combined_text} +""" + + if additional_context: + message += f""" +## 额外说明 + +{additional_context} +""" + + message += """ +请根据以上内容,设计适合「创业想法验证」场景下社交媒体讨论的实体类型和关系类型。 + +**必须遵守的规则**: +1. 必须正好输出10个实体类型 +2. 最后2个必须是兜底类型:Person(个人兜底)和 Organization(组织兜底) +3. 前8个是根据文本内容设计的具体类型(若材料涉及创业/产品,应包含投资人、创始人、客户等可验证角色中的多类) +4. 所有实体类型必须是现实中可以发声的主体,不能是抽象概念 +5. 属性名不能使用 name、uuid、group_id 等保留字,用 full_name、org_name 等替代 +""" + + return message + + def _validate_and_process(self, result: Dict[str, Any]) -> Dict[str, Any]: + """验证和后处理结果""" + + # 确保必要字段存在 + if "entity_types" not in result: + result["entity_types"] = [] + if "edge_types" not in result: + result["edge_types"] = [] + if "analysis_summary" not in result: + result["analysis_summary"] = "" + + # 验证实体类型 + # 记录原始名称到 PascalCase 的映射,用于后续修正 edge 的 source_targets 引用 + entity_name_map = {} + for entity in result["entity_types"]: + # 强制将 entity name 转为 PascalCase(Zep API 要求) + if "name" in entity: + original_name = entity["name"] + entity["name"] = _to_pascal_case(original_name) + if entity["name"] != original_name: + logger.warning(f"Entity type name '{original_name}' auto-converted to '{entity['name']}'") + entity_name_map[original_name] = entity["name"] + if "attributes" not in entity: + entity["attributes"] = [] + if "examples" not in entity: + entity["examples"] = [] + # 确保description不超过100字符 + if len(entity.get("description", "")) > 100: + entity["description"] = entity["description"][:97] + "..." + + # 验证关系类型 + for edge in result["edge_types"]: + # 强制将 edge name 转为 SCREAMING_SNAKE_CASE(Zep API 要求) + if "name" in edge: + original_name = edge["name"] + edge["name"] = original_name.upper() + if edge["name"] != original_name: + logger.warning(f"Edge type name '{original_name}' auto-converted to '{edge['name']}'") + # 修正 source_targets 中的实体名称引用,与转换后的 PascalCase 保持一致 + for st in edge.get("source_targets", []): + if st.get("source") in entity_name_map: + st["source"] = entity_name_map[st["source"]] + if st.get("target") in entity_name_map: + st["target"] = entity_name_map[st["target"]] + if "source_targets" not in edge: + edge["source_targets"] = [] + if "attributes" not in edge: + edge["attributes"] = [] + if len(edge.get("description", "")) > 100: + edge["description"] = edge["description"][:97] + "..." + + # Zep API 限制:最多 10 个自定义实体类型,最多 10 个自定义边类型 + MAX_ENTITY_TYPES = 10 + MAX_EDGE_TYPES = 10 + + # 去重:按 name 去重,保留首次出现的 + seen_names = set() + deduped = [] + for entity in result["entity_types"]: + name = entity.get("name", "") + if name and name not in seen_names: + seen_names.add(name) + deduped.append(entity) + elif name in seen_names: + logger.warning(f"Duplicate entity type '{name}' removed during validation") + result["entity_types"] = deduped + + # 兜底类型定义 + person_fallback = { + "name": "Person", + "description": "Any individual person not fitting other specific person types.", + "attributes": [ + {"name": "full_name", "type": "text", "description": "Full name of the person"}, + {"name": "role", "type": "text", "description": "Role or occupation"} + ], + "examples": ["ordinary citizen", "anonymous netizen"] + } + + organization_fallback = { + "name": "Organization", + "description": "Any organization not fitting other specific organization types.", + "attributes": [ + {"name": "org_name", "type": "text", "description": "Name of the organization"}, + {"name": "org_type", "type": "text", "description": "Type of organization"} + ], + "examples": ["small business", "community group"] + } + + # 检查是否已有兜底类型 + entity_names = {e["name"] for e in result["entity_types"]} + has_person = "Person" in entity_names + has_organization = "Organization" in entity_names + + # 需要添加的兜底类型 + fallbacks_to_add = [] + if not has_person: + fallbacks_to_add.append(person_fallback) + if not has_organization: + fallbacks_to_add.append(organization_fallback) + + if fallbacks_to_add: + current_count = len(result["entity_types"]) + needed_slots = len(fallbacks_to_add) + + # 如果添加后会超过 10 个,需要移除一些现有类型 + if current_count + needed_slots > MAX_ENTITY_TYPES: + # 计算需要移除多少个 + to_remove = current_count + needed_slots - MAX_ENTITY_TYPES + # 从末尾移除(保留前面更重要的具体类型) + result["entity_types"] = result["entity_types"][:-to_remove] + + # 添加兜底类型 + result["entity_types"].extend(fallbacks_to_add) + + # 最终确保不超过限制(防御性编程) + if len(result["entity_types"]) > MAX_ENTITY_TYPES: + result["entity_types"] = result["entity_types"][:MAX_ENTITY_TYPES] + + if len(result["edge_types"]) > MAX_EDGE_TYPES: + result["edge_types"] = result["edge_types"][:MAX_EDGE_TYPES] + + return result + + def generate_python_code(self, ontology: Dict[str, Any]) -> str: + """ + 将本体定义转换为Python代码(类似ontology.py) + + Args: + ontology: 本体定义 + + Returns: + Python代码字符串 + """ + code_lines = [ + '"""', + '自定义实体类型定义', + '由MiroFish自动生成,用于创业想法验证与社交媒体模拟', + '"""', + '', + 'from pydantic import Field', + 'from zep_cloud.external_clients.ontology import EntityModel, EntityText, EdgeModel', + '', + '', + '# ============== 实体类型定义 ==============', + '', + ] + + # 生成实体类型 + for entity in ontology.get("entity_types", []): + name = entity["name"] + desc = entity.get("description", f"A {name} entity.") + + code_lines.append(f'class {name}(EntityModel):') + code_lines.append(f' """{desc}"""') + + attrs = entity.get("attributes", []) + if attrs: + for attr in attrs: + attr_name = attr["name"] + attr_desc = attr.get("description", attr_name) + code_lines.append(f' {attr_name}: EntityText = Field(') + code_lines.append(f' description="{attr_desc}",') + code_lines.append(f' default=None') + code_lines.append(f' )') + else: + code_lines.append(' pass') + + code_lines.append('') + code_lines.append('') + + code_lines.append('# ============== 关系类型定义 ==============') + code_lines.append('') + + # 生成关系类型 + for edge in ontology.get("edge_types", []): + name = edge["name"] + # 转换为PascalCase类名 + class_name = ''.join(word.capitalize() for word in name.split('_')) + desc = edge.get("description", f"A {name} relationship.") + + code_lines.append(f'class {class_name}(EdgeModel):') + code_lines.append(f' """{desc}"""') + + attrs = edge.get("attributes", []) + if attrs: + for attr in attrs: + attr_name = attr["name"] + attr_desc = attr.get("description", attr_name) + code_lines.append(f' {attr_name}: EntityText = Field(') + code_lines.append(f' description="{attr_desc}",') + code_lines.append(f' default=None') + code_lines.append(f' )') + else: + code_lines.append(' pass') + + code_lines.append('') + code_lines.append('') + + # 生成类型字典 + code_lines.append('# ============== 类型配置 ==============') + code_lines.append('') + code_lines.append('ENTITY_TYPES = {') + for entity in ontology.get("entity_types", []): + name = entity["name"] + code_lines.append(f' "{name}": {name},') + code_lines.append('}') + code_lines.append('') + code_lines.append('EDGE_TYPES = {') + for edge in ontology.get("edge_types", []): + name = edge["name"] + class_name = ''.join(word.capitalize() for word in name.split('_')) + code_lines.append(f' "{name}": {class_name},') + code_lines.append('}') + code_lines.append('') + + # 生成边的source_targets映射 + code_lines.append('EDGE_SOURCE_TARGETS = {') + for edge in ontology.get("edge_types", []): + name = edge["name"] + source_targets = edge.get("source_targets", []) + if source_targets: + st_list = ', '.join([ + f'{{"source": "{st.get("source", "Entity")}", "target": "{st.get("target", "Entity")}"}}' + for st in source_targets + ]) + code_lines.append(f' "{name}": [{st_list}],') + code_lines.append('}') + + return '\n'.join(code_lines) + diff --git a/app/app/services/pipeline_orchestrator.py b/app/app/services/pipeline_orchestrator.py new file mode 100644 index 0000000000000000000000000000000000000000..c1aec0d6023f1906b34cb898fbbc169f40efc6bb --- /dev/null +++ b/app/app/services/pipeline_orchestrator.py @@ -0,0 +1,368 @@ +""" +End-to-end pipeline: ontology → graph → simulation create → prepare → run → report. +Executes inside a worker thread (see api/pipeline.py). +""" + +from __future__ import annotations + +import time +import traceback +import uuid +from typing import Any, Dict, Optional + +from ..config import Config +from ..models.project import ProjectManager, ProjectStatus +from ..models.task import TaskManager, TaskStatus +from ..services.graph_builder import GraphBuilderService +from ..services.ontology_generator import OntologyGenerator +from ..services.report_agent import ReportAgent, ReportManager, ReportStatus +from ..services.simulation_manager import SimulationManager, SimulationStatus +from ..services.simulation_runner import SimulationRunner, RunnerStatus +from ..services.text_processor import TextProcessor +from ..utils.api_key_runtime import reset_pipeline_api_keys +from ..utils.logger import get_logger + +logger = get_logger("mirofish.pipeline") + + +def _update( + tm: TaskManager, + task_id: str, + progress: int, + message: str, + *, + stage: str, + extra: Optional[Dict[str, Any]] = None, +) -> None: + detail: Dict[str, Any] = {"stage": stage} + if extra: + detail.update(extra) + tm.update_task( + task_id, + status=TaskStatus.PROCESSING, + progress=max(0, min(100, progress)), + message=message, + progress_detail=detail, + ) + + +def _run_graph_build_sync( + project_id: str, + tm: TaskManager, + pipeline_task_id: str, +) -> str: + project = ProjectManager.get_project(project_id) + if not project or not project.ontology: + raise RuntimeError("Project missing ontology") + + text = ProjectManager.get_extracted_text(project_id) + if not text: + raise RuntimeError("No extracted text for project") + + if not Config.get_zep_api_keys(): + raise RuntimeError("ZEP_API_KEY is not configured") + + graph_name = project.name or "MiroFish Graph" + chunk_size = project.chunk_size or Config.DEFAULT_CHUNK_SIZE + chunk_overlap = project.chunk_overlap or Config.DEFAULT_CHUNK_OVERLAP + + project.status = ProjectStatus.GRAPH_BUILDING + ProjectManager.save_project(project) + + builder = GraphBuilderService() + + _update(tm, pipeline_task_id, 16, "Chunking document…", stage="graph") + chunks = TextProcessor.split_text(text, chunk_size=chunk_size, overlap=chunk_overlap) + total_chunks = len(chunks) + + _update( + tm, + pipeline_task_id, + 18, + f"Creating Zep graph ({total_chunks} chunks)…", + stage="graph", + ) + graph_id = builder.create_graph(name=graph_name) + project.graph_id = graph_id + ProjectManager.save_project(project) + + _update(tm, pipeline_task_id, 20, "Applying ontology to graph…", stage="graph", extra={"graph_id": graph_id}) + builder.set_ontology(graph_id, project.ontology) + + def add_progress(msg: str, ratio: float) -> None: + p = 20 + int(ratio * 22) # 20–42 + _update(tm, pipeline_task_id, p, msg, stage="graph", extra={"graph_id": graph_id}) + + episode_uuids = builder.add_text_batches( + graph_id, chunks, batch_size=3, progress_callback=add_progress + ) + + _update(tm, pipeline_task_id, 43, "Waiting for Zep to process episodes…", stage="graph") + + def wait_progress(msg: str, ratio: float) -> None: + p = 43 + int(ratio * 12) # 43–55 + _update(tm, pipeline_task_id, p, msg, stage="graph", extra={"graph_id": graph_id}) + + builder._wait_for_episodes(episode_uuids, wait_progress, timeout=900) + + project.status = ProjectStatus.GRAPH_COMPLETED + ProjectManager.save_project(project) + + _update(tm, pipeline_task_id, 55, "Graph build complete.", stage="graph", extra={"graph_id": graph_id}) + return graph_id + + +def run_full_pipeline( + *, + simulation_requirement: str, + document_text: str, + source_filename: str, + task_id: str, + task_manager: TaskManager, + simulation_run_id: Optional[str] = None, + user_id: Optional[str] = None, +) -> None: + """ + Full automated run. Updates task_manager task_id; on success completes with result dict. + Optional simulation_run_id + user_id sync status and report to Supabase. + """ + tm = task_manager + project_id: Optional[str] = None + simulation_id: Optional[str] = None + report_id = f"report_{uuid.uuid4().hex[:12]}" + + max_rounds: Optional[int] = None + if Config.PIPELINE_MAX_ROUNDS: + try: + max_rounds = int(Config.PIPELINE_MAX_ROUNDS) + except ValueError: + max_rounds = None + + parallel_profiles = Config.PIPELINE_PARALLEL_PROFILES + + try: + reset_pipeline_api_keys() + _update(tm, task_id, 2, "Creating project…", stage="ontology") + + project = ProjectManager.create_project(name=f"Pipeline {source_filename[:40]}") + project_id = project.project_id + project.simulation_requirement = simulation_requirement + project.files.append({"filename": source_filename, "size": len(document_text.encode("utf-8"))}) + ProjectManager.save_extracted_text(project_id, document_text) + project.total_text_length = len(document_text) + ProjectManager.save_project(project) + + _update( + tm, + task_id, + 5, + "Generating ontology (LLM)…", + stage="ontology", + extra={"project_id": project_id}, + ) + generator = OntologyGenerator() + ontology = generator.generate( + document_texts=[document_text], + simulation_requirement=simulation_requirement, + additional_context=None, + ) + project.ontology = { + "entity_types": ontology.get("entity_types", []), + "edge_types": ontology.get("edge_types", []), + } + project.analysis_summary = ontology.get("analysis_summary", "") + project.status = ProjectStatus.ONTOLOGY_GENERATED + ProjectManager.save_project(project) + + graph_id = _run_graph_build_sync(project_id, tm, task_id) + + _update( + tm, + task_id, + 56, + "Creating simulation instance…", + stage="simulation_create", + extra={"project_id": project_id, "graph_id": graph_id}, + ) + manager = SimulationManager() + state = manager.create_simulation( + project_id=project_id, + graph_id=graph_id, + enable_twitter=True, + enable_reddit=True, + ) + simulation_id = state.simulation_id + + document_text_full = ProjectManager.get_extracted_text(project_id) or document_text + + def prepare_progress(stage: str, prog: int, message: str, **kwargs: Any) -> None: + weights = { + "reading": (56, 60), + "generating_profiles": (60, 68), + "generating_config": (68, 71), + "copying_scripts": (71, 72), + } + lo, hi = weights.get(stage, (56, 72)) + pct = int(lo + (hi - lo) * (prog / 100.0)) + _update( + tm, + task_id, + pct, + message, + stage="prepare", + extra={"project_id": project_id, "simulation_id": simulation_id, "graph_id": graph_id}, + ) + + _update( + tm, + task_id, + 57, + "Preparing agents and simulation config (may take a long time)…", + stage="prepare", + extra={"project_id": project_id, "simulation_id": simulation_id}, + ) + prepared = manager.prepare_simulation( + simulation_id=simulation_id, + simulation_requirement=simulation_requirement, + document_text=document_text_full, + defined_entity_types=None, + use_llm_for_profiles=True, + progress_callback=prepare_progress, + parallel_profile_count=parallel_profiles, + ) + if prepared.status == SimulationStatus.FAILED: + raise RuntimeError(prepared.error or "Simulation prepare failed (no entities or setup error)") + + _update( + tm, + task_id, + 73, + "Starting OASIS simulation (parallel platforms)…", + stage="run", + extra={"project_id": project_id, "simulation_id": simulation_id}, + ) + SimulationRunner.start_simulation( + simulation_id=simulation_id, + platform="parallel", + max_rounds=max_rounds, + enable_graph_memory_update=False, + graph_id=None, + ) + + last_prog = 73 + # Wait until the simulation finishes — no wall-clock deadline (can run as long as OASIS needs). + while True: + rs = SimulationRunner.get_run_state(simulation_id) + if not rs: + time.sleep(3) + continue + status = rs.runner_status + if status == RunnerStatus.COMPLETED: + break + if status in (RunnerStatus.FAILED, RunnerStatus.STOPPED): + raise RuntimeError(rs.error or f"Simulation ended with status {status.value}") + last_prog = min(88, last_prog + 1) + _update( + tm, + task_id, + last_prog, + f"Simulation running: round ~{rs.twitter_current_round or rs.reddit_current_round or rs.current_round}…", + stage="run", + extra={"project_id": project_id, "simulation_id": simulation_id}, + ) + time.sleep(5) + + _update( + tm, + task_id, + 90, + "Generating English validation report (LLM)…", + stage="report", + extra={ + "project_id": project_id, + "simulation_id": simulation_id, + "report_id": report_id, + }, + ) + + agent = ReportAgent( + graph_id=graph_id, + simulation_id=simulation_id, + simulation_requirement=simulation_requirement, + ) + + def report_progress(stage: str, progress: int, message: str) -> None: + p = 90 + int(progress * 0.09) # 90–99 + _update( + tm, + task_id, + min(99, p), + f"[{stage}] {message}", + stage="report", + extra={ + "project_id": project_id, + "simulation_id": simulation_id, + "report_id": report_id, + }, + ) + + report = agent.generate_report( + progress_callback=report_progress, + report_id=report_id, + ) + ReportManager.save_report(report) + + if report.status != ReportStatus.COMPLETED: + raise RuntimeError(report.error or "Report generation failed") + + if simulation_run_id and user_id: + from ..services.supabase_jobs import mark_run_completed + + try: + mark_run_completed( + simulation_run_id=simulation_run_id, + user_id=user_id, + report_id=report.report_id, + markdown_content=report.markdown_content or "", + simulation_id=simulation_id, + project_id=project_id, + ) + except Exception: + logger.exception("Supabase mark_run_completed failed (report saved on disk)") + + tm.update_task( + task_id, + status=TaskStatus.COMPLETED, + progress=100, + message="Pipeline complete — report ready.", + result={ + "project_id": project_id, + "graph_id": graph_id, + "simulation_id": simulation_id, + "report_id": report.report_id, + }, + progress_detail={ + "stage": "completed", + "project_id": project_id, + "graph_id": graph_id, + "simulation_id": simulation_id, + "report_id": report.report_id, + }, + ) + logger.info( + "Pipeline finished: project=%s sim=%s report=%s", + project_id, + simulation_id, + report.report_id, + ) + + except Exception as e: + logger.error("Pipeline failed: %s", traceback.format_exc()) + if simulation_run_id: + from ..services.supabase_jobs import mark_run_failed + + try: + mark_run_failed(simulation_run_id=simulation_run_id, error_message=str(e)) + except Exception: + logger.exception("Supabase mark_run_failed failed") + tm.fail_task(task_id, str(e)) diff --git a/app/app/services/report_agent.py b/app/app/services/report_agent.py new file mode 100644 index 0000000000000000000000000000000000000000..55853e9720cc90fd6cc8609a7979ef788b267d15 --- /dev/null +++ b/app/app/services/report_agent.py @@ -0,0 +1,2568 @@ +""" +Report Agent服务 +使用LangChain + Zep实现ReACT模式的模拟报告生成 + +功能: +1. 根据模拟需求和Zep图谱信息生成报告 +2. 先规划目录结构,然后分段生成 +3. 每段采用ReACT多轮思考与反思模式 +4. 支持与用户对话,在对话中自主调用检索工具 +""" + +import os +import json +import time +import re +from typing import Dict, Any, List, Optional, Callable +from dataclasses import dataclass, field +from datetime import datetime +from enum import Enum + +from ..config import Config +from ..utils.llm_client import LLMClient +from ..utils.logger import get_logger +from .zep_tools import ( + ZepToolsService, + SearchResult, + InsightForgeResult, + PanoramaResult, + InterviewResult +) + +logger = get_logger('mirofish.report_agent') + + +class ReportLogger: + """ + Report Agent 详细日志记录器 + + 在报告文件夹中生成 agent_log.jsonl 文件,记录每一步详细动作。 + 每行是一个完整的 JSON 对象,包含时间戳、动作类型、详细内容等。 + """ + + def __init__(self, report_id: str): + """ + 初始化日志记录器 + + Args: + report_id: 报告ID,用于确定日志文件路径 + """ + self.report_id = report_id + self.log_file_path = os.path.join( + Config.UPLOAD_FOLDER, 'reports', report_id, 'agent_log.jsonl' + ) + self.start_time = datetime.now() + self._ensure_log_file() + + def _ensure_log_file(self): + """确保日志文件所在目录存在""" + log_dir = os.path.dirname(self.log_file_path) + os.makedirs(log_dir, exist_ok=True) + + def _get_elapsed_time(self) -> float: + """获取从开始到现在的耗时(秒)""" + return (datetime.now() - self.start_time).total_seconds() + + def log( + self, + action: str, + stage: str, + details: Dict[str, Any], + section_title: str = None, + section_index: int = None + ): + """ + 记录一条日志 + + Args: + action: 动作类型,如 'start', 'tool_call', 'llm_response', 'section_complete' 等 + stage: 当前阶段,如 'planning', 'generating', 'completed' + details: 详细内容字典,不截断 + section_title: 当前章节标题(可选) + section_index: 当前章节索引(可选) + """ + log_entry = { + "timestamp": datetime.now().isoformat(), + "elapsed_seconds": round(self._get_elapsed_time(), 2), + "report_id": self.report_id, + "action": action, + "stage": stage, + "section_title": section_title, + "section_index": section_index, + "details": details + } + + # 追加写入 JSONL 文件 + with open(self.log_file_path, 'a', encoding='utf-8') as f: + f.write(json.dumps(log_entry, ensure_ascii=False) + '\n') + + def log_start(self, simulation_id: str, graph_id: str, simulation_requirement: str): + """记录报告生成开始""" + self.log( + action="report_start", + stage="pending", + details={ + "simulation_id": simulation_id, + "graph_id": graph_id, + "simulation_requirement": simulation_requirement, + "message": "报告生成任务开始" + } + ) + + def log_planning_start(self): + """记录大纲规划开始""" + self.log( + action="planning_start", + stage="planning", + details={"message": "开始规划报告大纲"} + ) + + def log_planning_context(self, context: Dict[str, Any]): + """记录规划时获取的上下文信息""" + self.log( + action="planning_context", + stage="planning", + details={ + "message": "获取模拟上下文信息", + "context": context + } + ) + + def log_planning_complete(self, outline_dict: Dict[str, Any]): + """记录大纲规划完成""" + self.log( + action="planning_complete", + stage="planning", + details={ + "message": "大纲规划完成", + "outline": outline_dict + } + ) + + def log_section_start(self, section_title: str, section_index: int): + """记录章节生成开始""" + self.log( + action="section_start", + stage="generating", + section_title=section_title, + section_index=section_index, + details={"message": f"开始生成章节: {section_title}"} + ) + + def log_react_thought(self, section_title: str, section_index: int, iteration: int, thought: str): + """记录 ReACT 思考过程""" + self.log( + action="react_thought", + stage="generating", + section_title=section_title, + section_index=section_index, + details={ + "iteration": iteration, + "thought": thought, + "message": f"ReACT 第{iteration}轮思考" + } + ) + + def log_tool_call( + self, + section_title: str, + section_index: int, + tool_name: str, + parameters: Dict[str, Any], + iteration: int + ): + """记录工具调用""" + self.log( + action="tool_call", + stage="generating", + section_title=section_title, + section_index=section_index, + details={ + "iteration": iteration, + "tool_name": tool_name, + "parameters": parameters, + "message": f"调用工具: {tool_name}" + } + ) + + def log_tool_result( + self, + section_title: str, + section_index: int, + tool_name: str, + result: str, + iteration: int + ): + """记录工具调用结果(完整内容,不截断)""" + self.log( + action="tool_result", + stage="generating", + section_title=section_title, + section_index=section_index, + details={ + "iteration": iteration, + "tool_name": tool_name, + "result": result, # 完整结果,不截断 + "result_length": len(result), + "message": f"工具 {tool_name} 返回结果" + } + ) + + def log_llm_response( + self, + section_title: str, + section_index: int, + response: str, + iteration: int, + has_tool_calls: bool, + has_final_answer: bool + ): + """记录 LLM 响应(完整内容,不截断)""" + self.log( + action="llm_response", + stage="generating", + section_title=section_title, + section_index=section_index, + details={ + "iteration": iteration, + "response": response, # 完整响应,不截断 + "response_length": len(response), + "has_tool_calls": has_tool_calls, + "has_final_answer": has_final_answer, + "message": f"LLM 响应 (工具调用: {has_tool_calls}, 最终答案: {has_final_answer})" + } + ) + + def log_section_content( + self, + section_title: str, + section_index: int, + content: str, + tool_calls_count: int + ): + """记录章节内容生成完成(仅记录内容,不代表整个章节完成)""" + self.log( + action="section_content", + stage="generating", + section_title=section_title, + section_index=section_index, + details={ + "content": content, # 完整内容,不截断 + "content_length": len(content), + "tool_calls_count": tool_calls_count, + "message": f"章节 {section_title} 内容生成完成" + } + ) + + def log_section_full_complete( + self, + section_title: str, + section_index: int, + full_content: str + ): + """ + 记录章节生成完成 + + 前端应监听此日志来判断一个章节是否真正完成,并获取完整内容 + """ + self.log( + action="section_complete", + stage="generating", + section_title=section_title, + section_index=section_index, + details={ + "content": full_content, + "content_length": len(full_content), + "message": f"章节 {section_title} 生成完成" + } + ) + + def log_report_complete(self, total_sections: int, total_time_seconds: float): + """记录报告生成完成""" + self.log( + action="report_complete", + stage="completed", + details={ + "total_sections": total_sections, + "total_time_seconds": round(total_time_seconds, 2), + "message": "报告生成完成" + } + ) + + def log_error(self, error_message: str, stage: str, section_title: str = None): + """记录错误""" + self.log( + action="error", + stage=stage, + section_title=section_title, + section_index=None, + details={ + "error": error_message, + "message": f"发生错误: {error_message}" + } + ) + + +class ReportConsoleLogger: + """ + Report Agent 控制台日志记录器 + + 将控制台风格的日志(INFO、WARNING等)写入报告文件夹中的 console_log.txt 文件。 + 这些日志与 agent_log.jsonl 不同,是纯文本格式的控制台输出。 + """ + + def __init__(self, report_id: str): + """ + 初始化控制台日志记录器 + + Args: + report_id: 报告ID,用于确定日志文件路径 + """ + self.report_id = report_id + self.log_file_path = os.path.join( + Config.UPLOAD_FOLDER, 'reports', report_id, 'console_log.txt' + ) + self._ensure_log_file() + self._file_handler = None + self._setup_file_handler() + + def _ensure_log_file(self): + """确保日志文件所在目录存在""" + log_dir = os.path.dirname(self.log_file_path) + os.makedirs(log_dir, exist_ok=True) + + def _setup_file_handler(self): + """设置文件处理器,将日志同时写入文件""" + import logging + + # 创建文件处理器 + self._file_handler = logging.FileHandler( + self.log_file_path, + mode='a', + encoding='utf-8' + ) + self._file_handler.setLevel(logging.INFO) + + # 使用与控制台相同的简洁格式 + formatter = logging.Formatter( + '[%(asctime)s] %(levelname)s: %(message)s', + datefmt='%H:%M:%S' + ) + self._file_handler.setFormatter(formatter) + + # 添加到 report_agent 相关的 logger + loggers_to_attach = [ + 'mirofish.report_agent', + 'mirofish.zep_tools', + ] + + for logger_name in loggers_to_attach: + target_logger = logging.getLogger(logger_name) + # 避免重复添加 + if self._file_handler not in target_logger.handlers: + target_logger.addHandler(self._file_handler) + + def close(self): + """关闭文件处理器并从 logger 中移除""" + import logging + + if self._file_handler: + loggers_to_detach = [ + 'mirofish.report_agent', + 'mirofish.zep_tools', + ] + + for logger_name in loggers_to_detach: + target_logger = logging.getLogger(logger_name) + if self._file_handler in target_logger.handlers: + target_logger.removeHandler(self._file_handler) + + self._file_handler.close() + self._file_handler = None + + def __del__(self): + """析构时确保关闭文件处理器""" + self.close() + + +class ReportStatus(str, Enum): + """报告状态""" + PENDING = "pending" + PLANNING = "planning" + GENERATING = "generating" + COMPLETED = "completed" + FAILED = "failed" + + +@dataclass +class ReportSection: + """报告章节""" + title: str + content: str = "" + + def to_dict(self) -> Dict[str, Any]: + return { + "title": self.title, + "content": self.content + } + + def to_markdown(self, level: int = 2) -> str: + """转换为Markdown格式""" + md = f"{'#' * level} {self.title}\n\n" + if self.content: + md += f"{self.content}\n\n" + return md + + +@dataclass +class ReportOutline: + """报告大纲""" + title: str + summary: str + sections: List[ReportSection] + + def to_dict(self) -> Dict[str, Any]: + return { + "title": self.title, + "summary": self.summary, + "sections": [s.to_dict() for s in self.sections] + } + + def to_markdown(self) -> str: + """转换为Markdown格式""" + md = f"# {self.title}\n\n" + md += f"> {self.summary}\n\n" + for section in self.sections: + md += section.to_markdown() + return md + + +@dataclass +class Report: + """完整报告""" + report_id: str + simulation_id: str + graph_id: str + simulation_requirement: str + status: ReportStatus + outline: Optional[ReportOutline] = None + markdown_content: str = "" + created_at: str = "" + completed_at: str = "" + error: Optional[str] = None + + def to_dict(self) -> Dict[str, Any]: + return { + "report_id": self.report_id, + "simulation_id": self.simulation_id, + "graph_id": self.graph_id, + "simulation_requirement": self.simulation_requirement, + "status": self.status.value, + "outline": self.outline.to_dict() if self.outline else None, + "markdown_content": self.markdown_content, + "created_at": self.created_at, + "completed_at": self.completed_at, + "error": self.error + } + + +# ═══════════════════════════════════════════════════════════════ +# Prompt 模板常量 +# ═══════════════════════════════════════════════════════════════ + +# ── 工具描述 ── + +TOOL_DESC_INSIGHT_FORGE = """\ +【深度洞察检索 - 强大的检索工具】 +这是我们强大的检索函数,专为深度分析设计。它会: +1. 自动将你的问题分解为多个子问题 +2. 从多个维度检索模拟图谱中的信息 +3. 整合语义搜索、实体分析、关系链追踪的结果 +4. 返回最全面、最深度的检索内容 + +【使用场景】 +- 创业想法验证:投资人反应、客户付费意愿、创始人 peer 反馈、竞争与风险 +- 需要深入分析某个话题或验证假设 +- 需要获取支撑报告章节的丰富素材 + +【返回内容】 +- 相关事实原文(可直接引用) +- 核心实体洞察 +- 关系链分析""" + +TOOL_DESC_PANORAMA_SEARCH = """\ +【广度搜索 - 获取全貌视图】 +这个工具用于获取模拟结果的完整全貌,特别适合了解事件演变过程。它会: +1. 获取所有相关节点和关系 +2. 区分当前有效的事实和历史/过期的事实 +3. 帮助你了解讨论与「舆论」是如何演变的 + +【使用场景】 +- 创业验证:从全貌看投资人、用户、创始人随时间的立场变化 +- 需要了解话题的完整发展脉络 +- 需要获取全面的实体和关系信息 + +【返回内容】 +- 当前有效事实(模拟最新结果) +- 历史/过期事实(演变记录) +- 所有涉及的实体""" + +TOOL_DESC_QUICK_SEARCH = """\ +【简单搜索 - 快速检索】 +轻量级的快速检索工具,适合简单、直接的信息查询。 + +【使用场景】 +- 需要快速查找某个具体信息 +- 需要验证某个事实 +- 简单的信息检索 + +【返回内容】 +- 与查询最相关的事实列表""" + +TOOL_DESC_INTERVIEW_AGENTS = """\ +【深度采访 - 真实Agent采访(双平台)】 +调用OASIS模拟环境的采访API,对正在运行的模拟Agent进行真实采访! +这不是LLM模拟,而是调用真实的采访接口获取模拟Agent的原始回答。 +默认在Twitter和Reddit两个平台同时采访,获取更全面的观点。 + +功能流程: +1. 自动读取人设文件,了解所有模拟Agent +2. 智能选择与采访主题最相关的Agent(投资人、创始人、目标客户、难缠评委等) +3. 自动生成采访问题 +4. 调用 /api/simulation/interview/batch 接口在双平台进行真实采访 +5. 整合所有采访结果,提供多视角分析 + +【使用场景】 +- 创业想法验证:采访不同人设对「是否投资 / 是否购买 / 是否看好」的看法 +- 需要从不同角色视角了解立场(投资人、用户、同行创始人) +- 需要获取模拟Agent的真实回答(来自OASIS模拟环境) +- 想让报告更生动,包含"采访实录" + +【返回内容】 +- 被采访Agent的身份信息 +- 各Agent在Twitter和Reddit两个平台的采访回答 +- 关键引言(可直接引用) +- 采访摘要和观点对比 + +【重要】需要OASIS模拟环境正在运行才能使用此功能!""" + +# ── 大纲规划 prompt ── + +PLAN_SYSTEM_PROMPT = """\ +You are an expert author of **startup idea validation reports** with a god's-eye view of the simulation—you can reason about every agent's behaviour, statements, and interactions. + +【Core idea】 +We built a social-media-style simulation world and injected the user's **startup idea / simulation requirement** as the variable. Agents play investors (Silicon Valley style, YC-style, hard-to-please angels, etc.), peer founders, target customers and buyers (eager, hesitant, or refusing). The outcome is a **multi-angle stress test** of the idea—not a generic public-opinion essay. + +【Your job】 +Plan an English **startup validation report** that answers: +1. How did stakeholders react in the simulation (funding intent, purchase intent, word of mouth, pushback)? +2. Are there fatal flaws (no willingness to pay, unaddressed competition, unanimous investor rejection)? +3. From the simulated evidence, should the **validation conclusion** be **passed** or **not passed**? + +【Validation conclusion rules — strict and defensible】 +- **Not passed**: If most signals are negative—e.g. target customers won't pay, core assumptions are repeatedly challenged, investors clearly pass or valuation logic fails, no credible edge vs. competitors—the summary MUST contain the exact phrase **"Validation conclusion: Not passed"** and state the main reason briefly. +- **Passed**: If most signals are positive—e.g. users show buy/adopt intent, key risks are addressable, some investors or peer founders would proceed—the summary MUST contain **"Validation conclusion: Passed"** with brief evidence. **Do not** claim passed without simulation support. + +【Report stance】 +- Multi-perspective stress test from the simulation, not a vague trend forecast. +- Later sections must be supportable by retrievable agent statements via tools. +- This is simulated evidence, not real-market empirical research (say so where relevant). +- Do not cherry-pick only positive signals. + +【Section count】 +- Minimum 2 sections, maximum 5 sections. +- No sub-headings inside a section body in the outline; each section is one narrative block later. +- Suggested coverage: market/users, investors & business, risks & competition, synthesis (adjust titles to the evidence). + +Output a JSON outline **entirely in English**: +{ + "title": "Report title in English", + "summary": "One short paragraph that MUST include either \"Validation conclusion: Passed\" or \"Validation conclusion: Not passed\", plus the key reason.", + "sections": [ + { + "title": "Section title in English", + "description": "What this section will cover" + } + ] +} + +The sections array must have between 2 and 5 items.""" + +PLAN_USER_PROMPT_TEMPLATE = """\ +【Validation scenario】 +Startup idea / simulation requirement: {simulation_requirement} + +【Simulated world scale】 +- Entities in graph: {total_nodes} +- Relationships: {total_edges} +- Entity type distribution: {entity_types} +- Active agents: {total_entities} + +【Sample observed facts from the simulation】 +{related_facts_json} + +With a god's-eye view of this **idea validation** rehearsal: +1. Do investors, founders, and target customers lean toward supporting or rejecting the idea? +2. Are negative signals (won't pay, won't invest, strong competition) dominant? +3. Given the samples and structure, what validation conclusion and English section outline fit best? + +Reminder: 2–5 sections; summary must include **Validation conclusion: Passed** or **Validation conclusion: Not passed**.""" + +# ── 章节生成 prompt ── + +SECTION_SYSTEM_PROMPT_TEMPLATE = """\ +You are writing **one section** of a startup idea validation report. **Write the full section in English.** + +Report title: {report_title} +Report summary: {report_summary} +Idea under validation (requirement): {simulation_requirement} + +Section to write now: {section_title} + +═══════════════════════════════════════════════════════════════ +Core idea +═══════════════════════════════════════════════════════════════ + +The simulated world is a multi-role stress test of the startup idea. Agents play investors, founders, customers, etc.; their behaviour supports inference about adoption and risk. + +Your tasks: +- From tool-retrieved simulation content, explain stakeholder reactions (funding, purchase, skepticism, spread). +- If this section states conclusions, they must align with the overall **Validation conclusion** in the summary, with quoted agent behaviour as evidence. +- Surface key risks and opportunities; do not ignore negative evidence. + +❌ Do not write generic startup advice unrelated to this simulation. +✅ Ground everything in what actually happened among agents in the run. + +═══════════════════════════════════════════════════════════════ +【最重要的规则 - 必须遵守】 +═══════════════════════════════════════════════════════════════ + +1. 【必须调用工具观察模拟世界】 + - 你正在以「上帝视角」观察创业想法验证模拟 + - 所有内容必须来自模拟世界中发生的事件和Agent言行 + - 禁止使用你自己的知识编造「验证结果」——结论只能来自模拟证据 + - 每个章节至少调用3次工具(最多5次)来检索模拟中的讨论与行为 + +2. 【必须引用Agent的原始言行】 + - Agent的发言和行为代表该人设下对想法的反应(投资/购买/反对等) + - 在报告中使用引用格式展示,例如: + > "某类人群会表示:原文内容..." + - 这些引用是验证结论的核心证据 + +3. 【Language — report must be English】 + - Tool outputs may be English, Chinese, or mixed. + - Write the **entire report section in fluent English**, regardless of the language of the requirement or source documents. + - When quoting tool output, translate non-English fragments into natural English while preserving meaning. + - This applies to body text and block quotes (lines starting with >). + +4. 【Faithful to the simulation】 + - Content must reflect discussions and outcomes that actually occurred in the run. + - Do not invent facts that never appeared. + - If evidence is thin, say so—do not force a **Passed** verdict. + +═══════════════════════════════════════════════════════════════ +【⚠️ 格式规范 - 极其重要!】 +═══════════════════════════════════════════════════════════════ + +【一个章节 = 最小内容单位】 +- 每个章节是报告的最小分块单位 +- ❌ 禁止在章节内使用任何 Markdown 标题(#、##、###、#### 等) +- ❌ 禁止在内容开头添加章节主标题 +- ✅ 章节标题由系统自动添加,你只需撰写纯正文内容 +- ✅ 使用**粗体**、段落分隔、引用、列表来组织内容,但不要用标题 + +【Good example (English body, no markdown headings)】 +``` +This section examines how early adopters reacted in the simulation. From retrieved actions we see: + +**Early traction** + +Several founder personas echoed interest in the workflow: + +> "I'd pilot this with one team next quarter if the price stays under X..." + +**Pushback** + +A skeptical investor persona raised integration risk: + +- Data residency concerns +- Competing incumbents already bundling similar features +``` + +【Bad example】 +``` +## Executive summary ← wrong: do not add headings +### Phase one ← wrong: no ### subsections + +This section analyzes... +``` + +═══════════════════════════════════════════════════════════════ +【可用检索工具】(每章节调用3-5次) +═══════════════════════════════════════════════════════════════ + +{tools_description} + +【工具使用建议 - 请混合使用不同工具,不要只用一种】 +- insight_forge: 深度洞察分析,自动分解问题并多维度检索事实和关系 +- panorama_search: 广角全景搜索,了解事件全貌、时间线和演变过程 +- quick_search: 快速验证某个具体信息点 +- interview_agents: 采访模拟Agent,获取投资人/创始人/客户等第一人称观点(用于验证依据) + +═══════════════════════════════════════════════════════════════ +【工作流程】 +═══════════════════════════════════════════════════════════════ + +每次回复你只能做以下两件事之一(不可同时做): + +选项A - 调用工具: +输出你的思考,然后用以下格式调用一个工具: + +{{"name": "工具名称", "parameters": {{"参数名": "参数值"}}}} + +系统会执行工具并把结果返回给你。你不需要也不能自己编写工具返回结果。 + +选项B - 输出最终内容: +当你已通过工具获取了足够信息,以 "Final Answer:" 开头输出章节内容。 + +⚠️ 严格禁止: +- 禁止在一次回复中同时包含工具调用和 Final Answer +- 禁止自己编造工具返回结果(Observation),所有工具结果由系统注入 +- 每次回复最多调用一个工具 + +═══════════════════════════════════════════════════════════════ +【章节内容要求】 +═══════════════════════════════════════════════════════════════ + +1. 内容必须基于工具检索到的模拟数据 +2. 大量引用原文来展示模拟效果 +3. 使用Markdown格式(但禁止使用标题): + - 使用 **粗体文字** 标记重点(代替子标题) + - 使用列表(-或1.2.3.)组织要点 + - 使用空行分隔不同段落 + - ❌ 禁止使用 #、##、###、#### 等任何标题语法 +4. 【引用格式规范 - 必须单独成段】 + 引用必须独立成段,前后各有一个空行,不能混在段落中: + + ✅ 正确格式: + ``` + 校方的回应被认为缺乏实质内容。 + + > "校方的应对模式在瞬息万变的社交媒体环境中显得僵化和迟缓。" + + 这一评价反映了公众的普遍不满。 + ``` + + ❌ 错误格式: + ``` + 校方的回应被认为缺乏实质内容。> "校方的应对模式..." 这一评价反映了... + ``` +5. 保持与其他章节的逻辑连贯性 +6. 【避免重复】仔细阅读下方已完成的章节内容,不要重复描述相同的信息 +7. 【再次强调】不要添加任何标题!用**粗体**代替小节标题""" + +SECTION_USER_PROMPT_TEMPLATE = """\ +已完成的章节内容(请仔细阅读,避免重复): +{previous_content} + +═══════════════════════════════════════════════════════════════ +【当前任务】撰写章节: {section_title} +═══════════════════════════════════════════════════════════════ + +【重要提醒】 +1. 仔细阅读上方已完成的章节,避免重复相同的内容! +2. 开始前必须先调用工具获取模拟数据 +3. 请混合使用不同工具,不要只用一种 +4. 报告内容必须来自检索结果,不要使用自己的知识 + +【⚠️ 格式警告 - 必须遵守】 +- ❌ 不要写任何标题(#、##、###、####都不行) +- ❌ 不要写"{section_title}"作为开头 +- ✅ 章节标题由系统自动添加 +- ✅ 直接写正文,用**粗体**代替小节标题 + +请开始: +1. 首先思考(Thought)这个章节需要什么信息 +2. 然后调用工具(Action)获取模拟数据 +3. 收集足够信息后输出 Final Answer(纯正文,无任何标题)""" + +# ── ReACT 循环内消息模板 ── + +REACT_OBSERVATION_TEMPLATE = """\ +Observation(检索结果): + +═══ 工具 {tool_name} 返回 ═══ +{result} + +═══════════════════════════════════════════════════════════════ +已调用工具 {tool_calls_count}/{max_tool_calls} 次(已用: {used_tools_str}){unused_hint} +- 如果信息充分:以 "Final Answer:" 开头输出章节内容(必须引用上述原文) +- 如果需要更多信息:调用一个工具继续检索 +═══════════════════════════════════════════════════════════════""" + +REACT_INSUFFICIENT_TOOLS_MSG = ( + "【注意】你只调用了{tool_calls_count}次工具,至少需要{min_tool_calls}次。" + "请再调用工具获取更多模拟数据,然后再输出 Final Answer。{unused_hint}" +) + +REACT_INSUFFICIENT_TOOLS_MSG_ALT = ( + "当前只调用了 {tool_calls_count} 次工具,至少需要 {min_tool_calls} 次。" + "请调用工具获取模拟数据。{unused_hint}" +) + +REACT_TOOL_LIMIT_MSG = ( + "工具调用次数已达上限({tool_calls_count}/{max_tool_calls}),不能再调用工具。" + '请立即基于已获取的信息,以 "Final Answer:" 开头输出章节内容。' +) + +REACT_UNUSED_TOOLS_HINT = "\n💡 你还没有使用过: {unused_list},建议尝试不同工具获取多角度信息" + +REACT_FORCE_FINAL_MSG = "已达到工具调用限制,请直接输出 Final Answer: 并生成章节内容。" + +# ── Chat prompt ── + +CHAT_SYSTEM_PROMPT_TEMPLATE = """\ +You are a concise assistant for startup idea validation, grounded in the same simulation report. + +【Context】 +Idea / requirement under test: {simulation_requirement} + +【Report already generated】 +{report_content} + +【Rules】 +1. Prefer answering from the report (including **Validation conclusion: Passed** or **Validation conclusion: Not passed** when present). +2. Answer directly; avoid long meta-reasoning. +3. Call tools only if the report is insufficient (at most 1–2 tool calls). +4. Stay consistent with the report's conclusion and evidence; do not contradict it. + +【Tools】 (only if needed) +{tools_description} + +【Tool call format】 + +{{"name": "tool_name", "parameters": {{"param": "value"}}}} + + +【Style】 +- Short, clear English. +- Use > quotes for key evidence. +- State the validation conclusion and main evidence first, then details.""" + +CHAT_OBSERVATION_SUFFIX = "\n\n请简洁回答问题。" + + +# ═══════════════════════════════════════════════════════════════ +# ReportAgent 主类 +# ═══════════════════════════════════════════════════════════════ + + +class ReportAgent: + """ + Report Agent - 模拟报告生成Agent + + 采用ReACT(Reasoning + Acting)模式: + 1. 规划阶段:分析模拟需求,规划报告目录结构 + 2. 生成阶段:逐章节生成内容,每章节可多次调用工具获取信息 + 3. 反思阶段:检查内容完整性和准确性 + """ + + # 最大工具调用次数(每个章节) + MAX_TOOL_CALLS_PER_SECTION = 5 + + # 最大反思轮数 + MAX_REFLECTION_ROUNDS = 3 + + # 对话中的最大工具调用次数 + MAX_TOOL_CALLS_PER_CHAT = 2 + + def __init__( + self, + graph_id: str, + simulation_id: str, + simulation_requirement: str, + llm_client: Optional[LLMClient] = None, + zep_tools: Optional[ZepToolsService] = None + ): + """ + 初始化Report Agent + + Args: + graph_id: 图谱ID + simulation_id: 模拟ID + simulation_requirement: 模拟需求描述 + llm_client: LLM客户端(可选) + zep_tools: Zep工具服务(可选) + """ + self.graph_id = graph_id + self.simulation_id = simulation_id + self.simulation_requirement = simulation_requirement + + self.llm = llm_client or LLMClient() + self.zep_tools = zep_tools or ZepToolsService() + + # 工具定义 + self.tools = self._define_tools() + + # 日志记录器(在 generate_report 中初始化) + self.report_logger: Optional[ReportLogger] = None + # 控制台日志记录器(在 generate_report 中初始化) + self.console_logger: Optional[ReportConsoleLogger] = None + + logger.info(f"ReportAgent 初始化完成: graph_id={graph_id}, simulation_id={simulation_id}") + + def _define_tools(self) -> Dict[str, Dict[str, Any]]: + """定义可用工具""" + return { + "insight_forge": { + "name": "insight_forge", + "description": TOOL_DESC_INSIGHT_FORGE, + "parameters": { + "query": "你想深入分析的问题或话题", + "report_context": "当前报告章节的上下文(可选,有助于生成更精准的子问题)" + } + }, + "panorama_search": { + "name": "panorama_search", + "description": TOOL_DESC_PANORAMA_SEARCH, + "parameters": { + "query": "搜索查询,用于相关性排序", + "include_expired": "是否包含过期/历史内容(默认True)" + } + }, + "quick_search": { + "name": "quick_search", + "description": TOOL_DESC_QUICK_SEARCH, + "parameters": { + "query": "搜索查询字符串", + "limit": "返回结果数量(可选,默认10)" + } + }, + "interview_agents": { + "name": "interview_agents", + "description": TOOL_DESC_INTERVIEW_AGENTS, + "parameters": { + "interview_topic": "采访主题或需求描述(如:'了解学生对宿舍甲醛事件的看法')", + "max_agents": "最多采访的Agent数量(可选,默认5,最大10)" + } + } + } + + def _execute_tool(self, tool_name: str, parameters: Dict[str, Any], report_context: str = "") -> str: + """ + 执行工具调用 + + Args: + tool_name: 工具名称 + parameters: 工具参数 + report_context: 报告上下文(用于InsightForge) + + Returns: + 工具执行结果(文本格式) + """ + logger.info(f"执行工具: {tool_name}, 参数: {parameters}") + + try: + if tool_name == "insight_forge": + query = parameters.get("query", "") + ctx = parameters.get("report_context", "") or report_context + result = self.zep_tools.insight_forge( + graph_id=self.graph_id, + query=query, + simulation_requirement=self.simulation_requirement, + report_context=ctx + ) + return result.to_text() + + elif tool_name == "panorama_search": + # 广度搜索 - 获取全貌 + query = parameters.get("query", "") + include_expired = parameters.get("include_expired", True) + if isinstance(include_expired, str): + include_expired = include_expired.lower() in ['true', '1', 'yes'] + result = self.zep_tools.panorama_search( + graph_id=self.graph_id, + query=query, + include_expired=include_expired + ) + return result.to_text() + + elif tool_name == "quick_search": + # 简单搜索 - 快速检索 + query = parameters.get("query", "") + limit = parameters.get("limit", 10) + if isinstance(limit, str): + limit = int(limit) + result = self.zep_tools.quick_search( + graph_id=self.graph_id, + query=query, + limit=limit + ) + return result.to_text() + + elif tool_name == "interview_agents": + # 深度采访 - 调用真实的OASIS采访API获取模拟Agent的回答(双平台) + interview_topic = parameters.get("interview_topic", parameters.get("query", "")) + max_agents = parameters.get("max_agents", 5) + if isinstance(max_agents, str): + max_agents = int(max_agents) + max_agents = min(max_agents, 10) + result = self.zep_tools.interview_agents( + simulation_id=self.simulation_id, + interview_requirement=interview_topic, + simulation_requirement=self.simulation_requirement, + max_agents=max_agents + ) + return result.to_text() + + # ========== 向后兼容的旧工具(内部重定向到新工具) ========== + + elif tool_name == "search_graph": + # 重定向到 quick_search + logger.info("search_graph 已重定向到 quick_search") + return self._execute_tool("quick_search", parameters, report_context) + + elif tool_name == "get_graph_statistics": + result = self.zep_tools.get_graph_statistics(self.graph_id) + return json.dumps(result, ensure_ascii=False, indent=2) + + elif tool_name == "get_entity_summary": + entity_name = parameters.get("entity_name", "") + result = self.zep_tools.get_entity_summary( + graph_id=self.graph_id, + entity_name=entity_name + ) + return json.dumps(result, ensure_ascii=False, indent=2) + + elif tool_name == "get_simulation_context": + # 重定向到 insight_forge,因为它更强大 + logger.info("get_simulation_context 已重定向到 insight_forge") + query = parameters.get("query", self.simulation_requirement) + return self._execute_tool("insight_forge", {"query": query}, report_context) + + elif tool_name == "get_entities_by_type": + entity_type = parameters.get("entity_type", "") + nodes = self.zep_tools.get_entities_by_type( + graph_id=self.graph_id, + entity_type=entity_type + ) + result = [n.to_dict() for n in nodes] + return json.dumps(result, ensure_ascii=False, indent=2) + + else: + return f"未知工具: {tool_name}。请使用以下工具之一: insight_forge, panorama_search, quick_search" + + except Exception as e: + logger.error(f"工具执行失败: {tool_name}, 错误: {str(e)}") + return f"工具执行失败: {str(e)}" + + # 合法的工具名称集合,用于裸 JSON 兜底解析时校验 + VALID_TOOL_NAMES = {"insight_forge", "panorama_search", "quick_search", "interview_agents"} + + def _parse_tool_calls(self, response: str) -> List[Dict[str, Any]]: + """ + 从LLM响应中解析工具调用 + + 支持的格式(按优先级): + 1. {"name": "tool_name", "parameters": {...}} + 2. 裸 JSON(响应整体或单行就是一个工具调用 JSON) + """ + tool_calls = [] + + # 格式1: XML风格(标准格式) + xml_pattern = r'\s*(\{.*?\})\s*' + for match in re.finditer(xml_pattern, response, re.DOTALL): + try: + call_data = json.loads(match.group(1)) + tool_calls.append(call_data) + except json.JSONDecodeError: + pass + + if tool_calls: + return tool_calls + + # 格式2: 兜底 - LLM 直接输出裸 JSON(没包 标签) + # 只在格式1未匹配时尝试,避免误匹配正文中的 JSON + stripped = response.strip() + if stripped.startswith('{') and stripped.endswith('}'): + try: + call_data = json.loads(stripped) + if self._is_valid_tool_call(call_data): + tool_calls.append(call_data) + return tool_calls + except json.JSONDecodeError: + pass + + # 响应可能包含思考文字 + 裸 JSON,尝试提取最后一个 JSON 对象 + json_pattern = r'(\{"(?:name|tool)"\s*:.*?\})\s*$' + match = re.search(json_pattern, stripped, re.DOTALL) + if match: + try: + call_data = json.loads(match.group(1)) + if self._is_valid_tool_call(call_data): + tool_calls.append(call_data) + except json.JSONDecodeError: + pass + + return tool_calls + + def _is_valid_tool_call(self, data: dict) -> bool: + """校验解析出的 JSON 是否是合法的工具调用""" + # 支持 {"name": ..., "parameters": ...} 和 {"tool": ..., "params": ...} 两种键名 + tool_name = data.get("name") or data.get("tool") + if tool_name and tool_name in self.VALID_TOOL_NAMES: + # 统一键名为 name / parameters + if "tool" in data: + data["name"] = data.pop("tool") + if "params" in data and "parameters" not in data: + data["parameters"] = data.pop("params") + return True + return False + + def _get_tools_description(self) -> str: + """生成工具描述文本""" + desc_parts = ["可用工具:"] + for name, tool in self.tools.items(): + params_desc = ", ".join([f"{k}: {v}" for k, v in tool["parameters"].items()]) + desc_parts.append(f"- {name}: {tool['description']}") + if params_desc: + desc_parts.append(f" 参数: {params_desc}") + return "\n".join(desc_parts) + + def plan_outline( + self, + progress_callback: Optional[Callable] = None + ) -> ReportOutline: + """ + 规划报告大纲 + + 使用LLM分析模拟需求,规划报告的目录结构 + + Args: + progress_callback: 进度回调函数 + + Returns: + ReportOutline: 报告大纲 + """ + logger.info("开始规划报告大纲...") + + if progress_callback: + progress_callback("planning", 0, "正在分析模拟需求...") + + # 首先获取模拟上下文 + context = self.zep_tools.get_simulation_context( + graph_id=self.graph_id, + simulation_requirement=self.simulation_requirement + ) + + if progress_callback: + progress_callback("planning", 30, "正在生成报告大纲...") + + system_prompt = PLAN_SYSTEM_PROMPT + user_prompt = PLAN_USER_PROMPT_TEMPLATE.format( + simulation_requirement=self.simulation_requirement, + total_nodes=context.get('graph_statistics', {}).get('total_nodes', 0), + total_edges=context.get('graph_statistics', {}).get('total_edges', 0), + entity_types=list(context.get('graph_statistics', {}).get('entity_types', {}).keys()), + total_entities=context.get('total_entities', 0), + related_facts_json=json.dumps(context.get('related_facts', [])[:10], ensure_ascii=False, indent=2), + ) + + try: + response = self.llm.chat_json( + messages=[ + {"role": "system", "content": system_prompt}, + {"role": "user", "content": user_prompt} + ], + temperature=0.3 + ) + + if progress_callback: + progress_callback("planning", 80, "正在解析大纲结构...") + + # 解析大纲 + sections = [] + for section_data in response.get("sections", []): + sections.append(ReportSection( + title=section_data.get("title", ""), + content="" + )) + + outline = ReportOutline( + title=response.get("title", "Simulation analysis report"), + summary=response.get("summary", ""), + sections=sections + ) + + if progress_callback: + progress_callback("planning", 100, "大纲规划完成") + + logger.info(f"大纲规划完成: {len(sections)} 个章节") + return outline + + except Exception as e: + logger.error(f"大纲规划失败: {str(e)}") + # 返回默认大纲(3个章节,作为fallback) + return ReportOutline( + title="Startup idea validation report", + summary="Validation conclusion: Pending manual review (outline generation failed; placeholder summary).", + sections=[ + ReportSection(title="Scenario and key discussion in the simulation"), + ReportSection(title="Investors, founders, and user-side reactions"), + ReportSection(title="Risks, competition, and evidence for the validation conclusion") + ] + ) + + def _generate_section_react( + self, + section: ReportSection, + outline: ReportOutline, + previous_sections: List[str], + progress_callback: Optional[Callable] = None, + section_index: int = 0 + ) -> str: + """ + 使用ReACT模式生成单个章节内容 + + ReACT循环: + 1. Thought(思考)- 分析需要什么信息 + 2. Action(行动)- 调用工具获取信息 + 3. Observation(观察)- 分析工具返回结果 + 4. 重复直到信息足够或达到最大次数 + 5. Final Answer(最终回答)- 生成章节内容 + + Args: + section: 要生成的章节 + outline: 完整大纲 + previous_sections: 之前章节的内容(用于保持连贯性) + progress_callback: 进度回调 + section_index: 章节索引(用于日志记录) + + Returns: + 章节内容(Markdown格式) + """ + logger.info(f"ReACT生成章节: {section.title}") + + # 记录章节开始日志 + if self.report_logger: + self.report_logger.log_section_start(section.title, section_index) + + system_prompt = SECTION_SYSTEM_PROMPT_TEMPLATE.format( + report_title=outline.title, + report_summary=outline.summary, + simulation_requirement=self.simulation_requirement, + section_title=section.title, + tools_description=self._get_tools_description(), + ) + + # 构建用户prompt - 每个已完成章节各传入最大4000字 + if previous_sections: + previous_parts = [] + for sec in previous_sections: + # 每个章节最多4000字 + truncated = sec[:4000] + "..." if len(sec) > 4000 else sec + previous_parts.append(truncated) + previous_content = "\n\n---\n\n".join(previous_parts) + else: + previous_content = "(这是第一个章节)" + + user_prompt = SECTION_USER_PROMPT_TEMPLATE.format( + previous_content=previous_content, + section_title=section.title, + ) + + messages = [ + {"role": "system", "content": system_prompt}, + {"role": "user", "content": user_prompt} + ] + + # ReACT循环 + tool_calls_count = 0 + max_iterations = 5 # 最大迭代轮数 + min_tool_calls = 3 # 最少工具调用次数 + conflict_retries = 0 # 工具调用与Final Answer同时出现的连续冲突次数 + used_tools = set() # 记录已调用过的工具名 + all_tools = {"insight_forge", "panorama_search", "quick_search", "interview_agents"} + + # 报告上下文,用于InsightForge的子问题生成 + report_context = f"章节标题: {section.title}\n模拟需求: {self.simulation_requirement}" + + for iteration in range(max_iterations): + if progress_callback: + progress_callback( + "generating", + int((iteration / max_iterations) * 100), + f"深度检索与撰写中 ({tool_calls_count}/{self.MAX_TOOL_CALLS_PER_SECTION})" + ) + + # 调用LLM + response = self.llm.chat( + messages=messages, + temperature=0.5, + max_tokens=4096 + ) + + # 检查 LLM 返回是否为 None(API 异常或内容为空) + if response is None: + logger.warning(f"章节 {section.title} 第 {iteration + 1} 次迭代: LLM 返回 None") + # 如果还有迭代次数,添加消息并重试 + if iteration < max_iterations - 1: + messages.append({"role": "assistant", "content": "(响应为空)"}) + messages.append({"role": "user", "content": "请继续生成内容。"}) + continue + # 最后一次迭代也返回 None,跳出循环进入强制收尾 + break + + logger.debug(f"LLM响应: {response[:200]}...") + + # 解析一次,复用结果 + tool_calls = self._parse_tool_calls(response) + has_tool_calls = bool(tool_calls) + has_final_answer = "Final Answer:" in response + + # ── 冲突处理:LLM 同时输出了工具调用和 Final Answer ── + if has_tool_calls and has_final_answer: + conflict_retries += 1 + logger.warning( + f"章节 {section.title} 第 {iteration+1} 轮: " + f"LLM 同时输出工具调用和 Final Answer(第 {conflict_retries} 次冲突)" + ) + + if conflict_retries <= 2: + # 前两次:丢弃本次响应,要求 LLM 重新回复 + messages.append({"role": "assistant", "content": response}) + messages.append({ + "role": "user", + "content": ( + "【格式错误】你在一次回复中同时包含了工具调用和 Final Answer,这是不允许的。\n" + "每次回复只能做以下两件事之一:\n" + "- 调用一个工具(输出一个 块,不要写 Final Answer)\n" + "- 输出最终内容(以 'Final Answer:' 开头,不要包含 )\n" + "请重新回复,只做其中一件事。" + ), + }) + continue + else: + # 第三次:降级处理,截断到第一个工具调用,强制执行 + logger.warning( + f"章节 {section.title}: 连续 {conflict_retries} 次冲突," + "降级为截断执行第一个工具调用" + ) + first_tool_end = response.find('') + if first_tool_end != -1: + response = response[:first_tool_end + len('')] + tool_calls = self._parse_tool_calls(response) + has_tool_calls = bool(tool_calls) + has_final_answer = False + conflict_retries = 0 + + # 记录 LLM 响应日志 + if self.report_logger: + self.report_logger.log_llm_response( + section_title=section.title, + section_index=section_index, + response=response, + iteration=iteration + 1, + has_tool_calls=has_tool_calls, + has_final_answer=has_final_answer + ) + + # ── 情况1:LLM 输出了 Final Answer ── + if has_final_answer: + # 工具调用次数不足,拒绝并要求继续调工具 + if tool_calls_count < min_tool_calls: + messages.append({"role": "assistant", "content": response}) + unused_tools = all_tools - used_tools + unused_hint = f"(这些工具还未使用,推荐用一下他们: {', '.join(unused_tools)})" if unused_tools else "" + messages.append({ + "role": "user", + "content": REACT_INSUFFICIENT_TOOLS_MSG.format( + tool_calls_count=tool_calls_count, + min_tool_calls=min_tool_calls, + unused_hint=unused_hint, + ), + }) + continue + + # 正常结束 + final_answer = response.split("Final Answer:")[-1].strip() + logger.info(f"章节 {section.title} 生成完成(工具调用: {tool_calls_count}次)") + + if self.report_logger: + self.report_logger.log_section_content( + section_title=section.title, + section_index=section_index, + content=final_answer, + tool_calls_count=tool_calls_count + ) + return final_answer + + # ── 情况2:LLM 尝试调用工具 ── + if has_tool_calls: + # 工具额度已耗尽 → 明确告知,要求输出 Final Answer + if tool_calls_count >= self.MAX_TOOL_CALLS_PER_SECTION: + messages.append({"role": "assistant", "content": response}) + messages.append({ + "role": "user", + "content": REACT_TOOL_LIMIT_MSG.format( + tool_calls_count=tool_calls_count, + max_tool_calls=self.MAX_TOOL_CALLS_PER_SECTION, + ), + }) + continue + + # 只执行第一个工具调用 + call = tool_calls[0] + if len(tool_calls) > 1: + logger.info(f"LLM 尝试调用 {len(tool_calls)} 个工具,只执行第一个: {call['name']}") + + if self.report_logger: + self.report_logger.log_tool_call( + section_title=section.title, + section_index=section_index, + tool_name=call["name"], + parameters=call.get("parameters", {}), + iteration=iteration + 1 + ) + + result = self._execute_tool( + call["name"], + call.get("parameters", {}), + report_context=report_context + ) + + if self.report_logger: + self.report_logger.log_tool_result( + section_title=section.title, + section_index=section_index, + tool_name=call["name"], + result=result, + iteration=iteration + 1 + ) + + tool_calls_count += 1 + used_tools.add(call['name']) + + # 构建未使用工具提示 + unused_tools = all_tools - used_tools + unused_hint = "" + if unused_tools and tool_calls_count < self.MAX_TOOL_CALLS_PER_SECTION: + unused_hint = REACT_UNUSED_TOOLS_HINT.format(unused_list="、".join(unused_tools)) + + messages.append({"role": "assistant", "content": response}) + messages.append({ + "role": "user", + "content": REACT_OBSERVATION_TEMPLATE.format( + tool_name=call["name"], + result=result, + tool_calls_count=tool_calls_count, + max_tool_calls=self.MAX_TOOL_CALLS_PER_SECTION, + used_tools_str=", ".join(used_tools), + unused_hint=unused_hint, + ), + }) + continue + + # ── 情况3:既没有工具调用,也没有 Final Answer ── + messages.append({"role": "assistant", "content": response}) + + if tool_calls_count < min_tool_calls: + # 工具调用次数不足,推荐未用过的工具 + unused_tools = all_tools - used_tools + unused_hint = f"(这些工具还未使用,推荐用一下他们: {', '.join(unused_tools)})" if unused_tools else "" + + messages.append({ + "role": "user", + "content": REACT_INSUFFICIENT_TOOLS_MSG_ALT.format( + tool_calls_count=tool_calls_count, + min_tool_calls=min_tool_calls, + unused_hint=unused_hint, + ), + }) + continue + + # 工具调用已足够,LLM 输出了内容但没带 "Final Answer:" 前缀 + # 直接将这段内容作为最终答案,不再空转 + logger.info(f"章节 {section.title} 未检测到 'Final Answer:' 前缀,直接采纳LLM输出作为最终内容(工具调用: {tool_calls_count}次)") + final_answer = response.strip() + + if self.report_logger: + self.report_logger.log_section_content( + section_title=section.title, + section_index=section_index, + content=final_answer, + tool_calls_count=tool_calls_count + ) + return final_answer + + # 达到最大迭代次数,强制生成内容 + logger.warning(f"章节 {section.title} 达到最大迭代次数,强制生成") + messages.append({"role": "user", "content": REACT_FORCE_FINAL_MSG}) + + response = self.llm.chat( + messages=messages, + temperature=0.5, + max_tokens=4096 + ) + + # 检查强制收尾时 LLM 返回是否为 None + if response is None: + logger.error(f"章节 {section.title} 强制收尾时 LLM 返回 None,使用默认错误提示") + final_answer = f"(本章节生成失败:LLM 返回空响应,请稍后重试)" + elif "Final Answer:" in response: + final_answer = response.split("Final Answer:")[-1].strip() + else: + final_answer = response + + # 记录章节内容生成完成日志 + if self.report_logger: + self.report_logger.log_section_content( + section_title=section.title, + section_index=section_index, + content=final_answer, + tool_calls_count=tool_calls_count + ) + + return final_answer + + def generate_report( + self, + progress_callback: Optional[Callable[[str, int, str], None]] = None, + report_id: Optional[str] = None + ) -> Report: + """ + 生成完整报告(分章节实时输出) + + 每个章节生成完成后立即保存到文件夹,不需要等待整个报告完成。 + 文件结构: + reports/{report_id}/ + meta.json - 报告元信息 + outline.json - 报告大纲 + progress.json - 生成进度 + section_01.md - 第1章节 + section_02.md - 第2章节 + ... + full_report.md - 完整报告 + + Args: + progress_callback: 进度回调函数 (stage, progress, message) + report_id: 报告ID(可选,如果不传则自动生成) + + Returns: + Report: 完整报告 + """ + import uuid + + # 如果没有传入 report_id,则自动生成 + if not report_id: + report_id = f"report_{uuid.uuid4().hex[:12]}" + start_time = datetime.now() + + report = Report( + report_id=report_id, + simulation_id=self.simulation_id, + graph_id=self.graph_id, + simulation_requirement=self.simulation_requirement, + status=ReportStatus.PENDING, + created_at=datetime.now().isoformat() + ) + + # 已完成的章节标题列表(用于进度追踪) + completed_section_titles = [] + + try: + # 初始化:创建报告文件夹并保存初始状态 + ReportManager._ensure_report_folder(report_id) + + # 初始化日志记录器(结构化日志 agent_log.jsonl) + self.report_logger = ReportLogger(report_id) + self.report_logger.log_start( + simulation_id=self.simulation_id, + graph_id=self.graph_id, + simulation_requirement=self.simulation_requirement + ) + + # 初始化控制台日志记录器(console_log.txt) + self.console_logger = ReportConsoleLogger(report_id) + + ReportManager.update_progress( + report_id, "pending", 0, "初始化报告...", + completed_sections=[] + ) + ReportManager.save_report(report) + + # 阶段1: 规划大纲 + report.status = ReportStatus.PLANNING + ReportManager.update_progress( + report_id, "planning", 5, "开始规划报告大纲...", + completed_sections=[] + ) + + # 记录规划开始日志 + self.report_logger.log_planning_start() + + if progress_callback: + progress_callback("planning", 0, "开始规划报告大纲...") + + outline = self.plan_outline( + progress_callback=lambda stage, prog, msg: + progress_callback(stage, prog // 5, msg) if progress_callback else None + ) + report.outline = outline + + # 记录规划完成日志 + self.report_logger.log_planning_complete(outline.to_dict()) + + # 保存大纲到文件 + ReportManager.save_outline(report_id, outline) + ReportManager.update_progress( + report_id, "planning", 15, f"大纲规划完成,共{len(outline.sections)}个章节", + completed_sections=[] + ) + ReportManager.save_report(report) + + logger.info(f"大纲已保存到文件: {report_id}/outline.json") + + # 阶段2: 逐章节生成(分章节保存) + report.status = ReportStatus.GENERATING + + total_sections = len(outline.sections) + generated_sections = [] # 保存内容用于上下文 + + for i, section in enumerate(outline.sections): + section_num = i + 1 + base_progress = 20 + int((i / total_sections) * 70) + + # 更新进度 + ReportManager.update_progress( + report_id, "generating", base_progress, + f"正在生成章节: {section.title} ({section_num}/{total_sections})", + current_section=section.title, + completed_sections=completed_section_titles + ) + + if progress_callback: + progress_callback( + "generating", + base_progress, + f"正在生成章节: {section.title} ({section_num}/{total_sections})" + ) + + # 生成主章节内容 + section_content = self._generate_section_react( + section=section, + outline=outline, + previous_sections=generated_sections, + progress_callback=lambda stage, prog, msg: + progress_callback( + stage, + base_progress + int(prog * 0.7 / total_sections), + msg + ) if progress_callback else None, + section_index=section_num + ) + + section.content = section_content + generated_sections.append(f"## {section.title}\n\n{section_content}") + + # 保存章节 + ReportManager.save_section(report_id, section_num, section) + completed_section_titles.append(section.title) + + # 记录章节完成日志 + full_section_content = f"## {section.title}\n\n{section_content}" + + if self.report_logger: + self.report_logger.log_section_full_complete( + section_title=section.title, + section_index=section_num, + full_content=full_section_content.strip() + ) + + logger.info(f"章节已保存: {report_id}/section_{section_num:02d}.md") + + # 更新进度 + ReportManager.update_progress( + report_id, "generating", + base_progress + int(70 / total_sections), + f"章节 {section.title} 已完成", + current_section=None, + completed_sections=completed_section_titles + ) + + # 阶段3: 组装完整报告 + if progress_callback: + progress_callback("generating", 95, "正在组装完整报告...") + + ReportManager.update_progress( + report_id, "generating", 95, "正在组装完整报告...", + completed_sections=completed_section_titles + ) + + # 使用ReportManager组装完整报告 + report.markdown_content = ReportManager.assemble_full_report(report_id, outline) + report.status = ReportStatus.COMPLETED + report.completed_at = datetime.now().isoformat() + + # 计算总耗时 + total_time_seconds = (datetime.now() - start_time).total_seconds() + + # 记录报告完成日志 + if self.report_logger: + self.report_logger.log_report_complete( + total_sections=total_sections, + total_time_seconds=total_time_seconds + ) + + # 保存最终报告 + ReportManager.save_report(report) + ReportManager.update_progress( + report_id, "completed", 100, "报告生成完成", + completed_sections=completed_section_titles + ) + + if progress_callback: + progress_callback("completed", 100, "报告生成完成") + + logger.info(f"报告生成完成: {report_id}") + + # 关闭控制台日志记录器 + if self.console_logger: + self.console_logger.close() + self.console_logger = None + + return report + + except Exception as e: + logger.error(f"报告生成失败: {str(e)}") + report.status = ReportStatus.FAILED + report.error = str(e) + + # 记录错误日志 + if self.report_logger: + self.report_logger.log_error(str(e), "failed") + + # 保存失败状态 + try: + ReportManager.save_report(report) + ReportManager.update_progress( + report_id, "failed", -1, f"报告生成失败: {str(e)}", + completed_sections=completed_section_titles + ) + except Exception: + pass # 忽略保存失败的错误 + + # 关闭控制台日志记录器 + if self.console_logger: + self.console_logger.close() + self.console_logger = None + + return report + + def chat( + self, + message: str, + chat_history: List[Dict[str, str]] = None + ) -> Dict[str, Any]: + """ + 与Report Agent对话 + + 在对话中Agent可以自主调用检索工具来回答问题 + + Args: + message: 用户消息 + chat_history: 对话历史 + + Returns: + { + "response": "Agent回复", + "tool_calls": [调用的工具列表], + "sources": [信息来源] + } + """ + logger.info(f"Report Agent对话: {message[:50]}...") + + chat_history = chat_history or [] + + # 获取已生成的报告内容 + report_content = "" + try: + report = ReportManager.get_report_by_simulation(self.simulation_id) + if report and report.markdown_content: + # 限制报告长度,避免上下文过长 + report_content = report.markdown_content[:15000] + if len(report.markdown_content) > 15000: + report_content += "\n\n... [报告内容已截断] ..." + except Exception as e: + logger.warning(f"获取报告内容失败: {e}") + + system_prompt = CHAT_SYSTEM_PROMPT_TEMPLATE.format( + simulation_requirement=self.simulation_requirement, + report_content=report_content if report_content else "(暂无报告)", + tools_description=self._get_tools_description(), + ) + + # 构建消息 + messages = [{"role": "system", "content": system_prompt}] + + # 添加历史对话 + for h in chat_history[-10:]: # 限制历史长度 + messages.append(h) + + # 添加用户消息 + messages.append({ + "role": "user", + "content": message + }) + + # ReACT循环(简化版) + tool_calls_made = [] + max_iterations = 2 # 减少迭代轮数 + + for iteration in range(max_iterations): + response = self.llm.chat( + messages=messages, + temperature=0.5 + ) + + # 解析工具调用 + tool_calls = self._parse_tool_calls(response) + + if not tool_calls: + # 没有工具调用,直接返回响应 + clean_response = re.sub(r'.*?', '', response, flags=re.DOTALL) + clean_response = re.sub(r'\[TOOL_CALL\].*?\)', '', clean_response) + + return { + "response": clean_response.strip(), + "tool_calls": tool_calls_made, + "sources": [tc.get("parameters", {}).get("query", "") for tc in tool_calls_made] + } + + # 执行工具调用(限制数量) + tool_results = [] + for call in tool_calls[:1]: # 每轮最多执行1次工具调用 + if len(tool_calls_made) >= self.MAX_TOOL_CALLS_PER_CHAT: + break + result = self._execute_tool(call["name"], call.get("parameters", {})) + tool_results.append({ + "tool": call["name"], + "result": result[:1500] # 限制结果长度 + }) + tool_calls_made.append(call) + + # 将结果添加到消息 + messages.append({"role": "assistant", "content": response}) + observation = "\n".join([f"[{r['tool']}结果]\n{r['result']}" for r in tool_results]) + messages.append({ + "role": "user", + "content": observation + CHAT_OBSERVATION_SUFFIX + }) + + # 达到最大迭代,获取最终响应 + final_response = self.llm.chat( + messages=messages, + temperature=0.5 + ) + + # 清理响应 + clean_response = re.sub(r'.*?', '', final_response, flags=re.DOTALL) + clean_response = re.sub(r'\[TOOL_CALL\].*?\)', '', clean_response) + + return { + "response": clean_response.strip(), + "tool_calls": tool_calls_made, + "sources": [tc.get("parameters", {}).get("query", "") for tc in tool_calls_made] + } + + +class ReportManager: + """ + 报告管理器 + + 负责报告的持久化存储和检索 + + 文件结构(分章节输出): + reports/ + {report_id}/ + meta.json - 报告元信息和状态 + outline.json - 报告大纲 + progress.json - 生成进度 + section_01.md - 第1章节 + section_02.md - 第2章节 + ... + full_report.md - 完整报告 + """ + + # 报告存储目录 + REPORTS_DIR = os.path.join(Config.UPLOAD_FOLDER, 'reports') + + @classmethod + def _ensure_reports_dir(cls): + """确保报告根目录存在""" + os.makedirs(cls.REPORTS_DIR, exist_ok=True) + + @classmethod + def _get_report_folder(cls, report_id: str) -> str: + """获取报告文件夹路径""" + return os.path.join(cls.REPORTS_DIR, report_id) + + @classmethod + def _ensure_report_folder(cls, report_id: str) -> str: + """确保报告文件夹存在并返回路径""" + folder = cls._get_report_folder(report_id) + os.makedirs(folder, exist_ok=True) + return folder + + @classmethod + def _get_report_path(cls, report_id: str) -> str: + """获取报告元信息文件路径""" + return os.path.join(cls._get_report_folder(report_id), "meta.json") + + @classmethod + def _get_report_markdown_path(cls, report_id: str) -> str: + """获取完整报告Markdown文件路径""" + return os.path.join(cls._get_report_folder(report_id), "full_report.md") + + @classmethod + def _get_outline_path(cls, report_id: str) -> str: + """获取大纲文件路径""" + return os.path.join(cls._get_report_folder(report_id), "outline.json") + + @classmethod + def _get_progress_path(cls, report_id: str) -> str: + """获取进度文件路径""" + return os.path.join(cls._get_report_folder(report_id), "progress.json") + + @classmethod + def _get_section_path(cls, report_id: str, section_index: int) -> str: + """获取章节Markdown文件路径""" + return os.path.join(cls._get_report_folder(report_id), f"section_{section_index:02d}.md") + + @classmethod + def _get_agent_log_path(cls, report_id: str) -> str: + """获取 Agent 日志文件路径""" + return os.path.join(cls._get_report_folder(report_id), "agent_log.jsonl") + + @classmethod + def _get_console_log_path(cls, report_id: str) -> str: + """获取控制台日志文件路径""" + return os.path.join(cls._get_report_folder(report_id), "console_log.txt") + + @classmethod + def get_console_log(cls, report_id: str, from_line: int = 0) -> Dict[str, Any]: + """ + 获取控制台日志内容 + + 这是报告生成过程中的控制台输出日志(INFO、WARNING等), + 与 agent_log.jsonl 的结构化日志不同。 + + Args: + report_id: 报告ID + from_line: 从第几行开始读取(用于增量获取,0 表示从头开始) + + Returns: + { + "logs": [日志行列表], + "total_lines": 总行数, + "from_line": 起始行号, + "has_more": 是否还有更多日志 + } + """ + log_path = cls._get_console_log_path(report_id) + + if not os.path.exists(log_path): + return { + "logs": [], + "total_lines": 0, + "from_line": 0, + "has_more": False + } + + logs = [] + total_lines = 0 + + with open(log_path, 'r', encoding='utf-8') as f: + for i, line in enumerate(f): + total_lines = i + 1 + if i >= from_line: + # 保留原始日志行,去掉末尾换行符 + logs.append(line.rstrip('\n\r')) + + return { + "logs": logs, + "total_lines": total_lines, + "from_line": from_line, + "has_more": False # 已读取到末尾 + } + + @classmethod + def get_console_log_stream(cls, report_id: str) -> List[str]: + """ + 获取完整的控制台日志(一次性获取全部) + + Args: + report_id: 报告ID + + Returns: + 日志行列表 + """ + result = cls.get_console_log(report_id, from_line=0) + return result["logs"] + + @classmethod + def get_agent_log(cls, report_id: str, from_line: int = 0) -> Dict[str, Any]: + """ + 获取 Agent 日志内容 + + Args: + report_id: 报告ID + from_line: 从第几行开始读取(用于增量获取,0 表示从头开始) + + Returns: + { + "logs": [日志条目列表], + "total_lines": 总行数, + "from_line": 起始行号, + "has_more": 是否还有更多日志 + } + """ + log_path = cls._get_agent_log_path(report_id) + + if not os.path.exists(log_path): + return { + "logs": [], + "total_lines": 0, + "from_line": 0, + "has_more": False + } + + logs = [] + total_lines = 0 + + with open(log_path, 'r', encoding='utf-8') as f: + for i, line in enumerate(f): + total_lines = i + 1 + if i >= from_line: + try: + log_entry = json.loads(line.strip()) + logs.append(log_entry) + except json.JSONDecodeError: + # 跳过解析失败的行 + continue + + return { + "logs": logs, + "total_lines": total_lines, + "from_line": from_line, + "has_more": False # 已读取到末尾 + } + + @classmethod + def get_agent_log_stream(cls, report_id: str) -> List[Dict[str, Any]]: + """ + 获取完整的 Agent 日志(用于一次性获取全部) + + Args: + report_id: 报告ID + + Returns: + 日志条目列表 + """ + result = cls.get_agent_log(report_id, from_line=0) + return result["logs"] + + @classmethod + def save_outline(cls, report_id: str, outline: ReportOutline) -> None: + """ + 保存报告大纲 + + 在规划阶段完成后立即调用 + """ + cls._ensure_report_folder(report_id) + + with open(cls._get_outline_path(report_id), 'w', encoding='utf-8') as f: + json.dump(outline.to_dict(), f, ensure_ascii=False, indent=2) + + logger.info(f"大纲已保存: {report_id}") + + @classmethod + def save_section( + cls, + report_id: str, + section_index: int, + section: ReportSection + ) -> str: + """ + 保存单个章节 + + 在每个章节生成完成后立即调用,实现分章节输出 + + Args: + report_id: 报告ID + section_index: 章节索引(从1开始) + section: 章节对象 + + Returns: + 保存的文件路径 + """ + cls._ensure_report_folder(report_id) + + # 构建章节Markdown内容 - 清理可能存在的重复标题 + cleaned_content = cls._clean_section_content(section.content, section.title) + md_content = f"## {section.title}\n\n" + if cleaned_content: + md_content += f"{cleaned_content}\n\n" + + # 保存文件 + file_suffix = f"section_{section_index:02d}.md" + file_path = os.path.join(cls._get_report_folder(report_id), file_suffix) + with open(file_path, 'w', encoding='utf-8') as f: + f.write(md_content) + + logger.info(f"章节已保存: {report_id}/{file_suffix}") + return file_path + + @classmethod + def _clean_section_content(cls, content: str, section_title: str) -> str: + """ + 清理章节内容 + + 1. 移除内容开头与章节标题重复的Markdown标题行 + 2. 将所有 ### 及以下级别的标题转换为粗体文本 + + Args: + content: 原始内容 + section_title: 章节标题 + + Returns: + 清理后的内容 + """ + import re + + if not content: + return content + + content = content.strip() + lines = content.split('\n') + cleaned_lines = [] + skip_next_empty = False + + for i, line in enumerate(lines): + stripped = line.strip() + + # 检查是否是Markdown标题行 + heading_match = re.match(r'^(#{1,6})\s+(.+)$', stripped) + + if heading_match: + level = len(heading_match.group(1)) + title_text = heading_match.group(2).strip() + + # 检查是否是与章节标题重复的标题(跳过前5行内的重复) + if i < 5: + if title_text == section_title or title_text.replace(' ', '') == section_title.replace(' ', ''): + skip_next_empty = True + continue + + # 将所有级别的标题(#, ##, ###, ####等)转换为粗体 + # 因为章节标题由系统添加,内容中不应有任何标题 + cleaned_lines.append(f"**{title_text}**") + cleaned_lines.append("") # 添加空行 + continue + + # 如果上一行是被跳过的标题,且当前行为空,也跳过 + if skip_next_empty and stripped == '': + skip_next_empty = False + continue + + skip_next_empty = False + cleaned_lines.append(line) + + # 移除开头的空行 + while cleaned_lines and cleaned_lines[0].strip() == '': + cleaned_lines.pop(0) + + # 移除开头的分隔线 + while cleaned_lines and cleaned_lines[0].strip() in ['---', '***', '___']: + cleaned_lines.pop(0) + # 同时移除分隔线后的空行 + while cleaned_lines and cleaned_lines[0].strip() == '': + cleaned_lines.pop(0) + + return '\n'.join(cleaned_lines) + + @classmethod + def update_progress( + cls, + report_id: str, + status: str, + progress: int, + message: str, + current_section: str = None, + completed_sections: List[str] = None + ) -> None: + """ + 更新报告生成进度 + + 前端可以通过读取progress.json获取实时进度 + """ + cls._ensure_report_folder(report_id) + + progress_data = { + "status": status, + "progress": progress, + "message": message, + "current_section": current_section, + "completed_sections": completed_sections or [], + "updated_at": datetime.now().isoformat() + } + + with open(cls._get_progress_path(report_id), 'w', encoding='utf-8') as f: + json.dump(progress_data, f, ensure_ascii=False, indent=2) + + @classmethod + def get_progress(cls, report_id: str) -> Optional[Dict[str, Any]]: + """获取报告生成进度""" + path = cls._get_progress_path(report_id) + + if not os.path.exists(path): + return None + + with open(path, 'r', encoding='utf-8') as f: + return json.load(f) + + @classmethod + def get_generated_sections(cls, report_id: str) -> List[Dict[str, Any]]: + """ + 获取已生成的章节列表 + + 返回所有已保存的章节文件信息 + """ + folder = cls._get_report_folder(report_id) + + if not os.path.exists(folder): + return [] + + sections = [] + for filename in sorted(os.listdir(folder)): + if filename.startswith('section_') and filename.endswith('.md'): + file_path = os.path.join(folder, filename) + with open(file_path, 'r', encoding='utf-8') as f: + content = f.read() + + # 从文件名解析章节索引 + parts = filename.replace('.md', '').split('_') + section_index = int(parts[1]) + + sections.append({ + "filename": filename, + "section_index": section_index, + "content": content + }) + + return sections + + @classmethod + def assemble_full_report(cls, report_id: str, outline: ReportOutline) -> str: + """ + 组装完整报告 + + 从已保存的章节文件组装完整报告,并进行标题清理 + """ + folder = cls._get_report_folder(report_id) + + # 构建报告头部 + md_content = f"# {outline.title}\n\n" + md_content += f"> {outline.summary}\n\n" + md_content += f"---\n\n" + + # 按顺序读取所有章节文件 + sections = cls.get_generated_sections(report_id) + for section_info in sections: + md_content += section_info["content"] + + # 后处理:清理整个报告的标题问题 + md_content = cls._post_process_report(md_content, outline) + + # 保存完整报告 + full_path = cls._get_report_markdown_path(report_id) + with open(full_path, 'w', encoding='utf-8') as f: + f.write(md_content) + + logger.info(f"完整报告已组装: {report_id}") + return md_content + + @classmethod + def _post_process_report(cls, content: str, outline: ReportOutline) -> str: + """ + 后处理报告内容 + + 1. 移除重复的标题 + 2. 保留报告主标题(#)和章节标题(##),移除其他级别的标题(###, ####等) + 3. 清理多余的空行和分隔线 + + Args: + content: 原始报告内容 + outline: 报告大纲 + + Returns: + 处理后的内容 + """ + import re + + lines = content.split('\n') + processed_lines = [] + prev_was_heading = False + + # 收集大纲中的所有章节标题 + section_titles = set() + for section in outline.sections: + section_titles.add(section.title) + + i = 0 + while i < len(lines): + line = lines[i] + stripped = line.strip() + + # 检查是否是标题行 + heading_match = re.match(r'^(#{1,6})\s+(.+)$', stripped) + + if heading_match: + level = len(heading_match.group(1)) + title = heading_match.group(2).strip() + + # 检查是否是重复标题(在连续5行内出现相同内容的标题) + is_duplicate = False + for j in range(max(0, len(processed_lines) - 5), len(processed_lines)): + prev_line = processed_lines[j].strip() + prev_match = re.match(r'^(#{1,6})\s+(.+)$', prev_line) + if prev_match: + prev_title = prev_match.group(2).strip() + if prev_title == title: + is_duplicate = True + break + + if is_duplicate: + # 跳过重复标题及其后的空行 + i += 1 + while i < len(lines) and lines[i].strip() == '': + i += 1 + continue + + # 标题层级处理: + # - # (level=1) 只保留报告主标题 + # - ## (level=2) 保留章节标题 + # - ### 及以下 (level>=3) 转换为粗体文本 + + if level == 1: + if title == outline.title: + # 保留报告主标题 + processed_lines.append(line) + prev_was_heading = True + elif title in section_titles: + # 章节标题错误使用了#,修正为## + processed_lines.append(f"## {title}") + prev_was_heading = True + else: + # 其他一级标题转为粗体 + processed_lines.append(f"**{title}**") + processed_lines.append("") + prev_was_heading = False + elif level == 2: + if title in section_titles or title == outline.title: + # 保留章节标题 + processed_lines.append(line) + prev_was_heading = True + else: + # 非章节的二级标题转为粗体 + processed_lines.append(f"**{title}**") + processed_lines.append("") + prev_was_heading = False + else: + # ### 及以下级别的标题转换为粗体文本 + processed_lines.append(f"**{title}**") + processed_lines.append("") + prev_was_heading = False + + i += 1 + continue + + elif stripped == '---' and prev_was_heading: + # 跳过标题后紧跟的分隔线 + i += 1 + continue + + elif stripped == '' and prev_was_heading: + # 标题后只保留一个空行 + if processed_lines and processed_lines[-1].strip() != '': + processed_lines.append(line) + prev_was_heading = False + + else: + processed_lines.append(line) + prev_was_heading = False + + i += 1 + + # 清理连续的多个空行(保留最多2个) + result_lines = [] + empty_count = 0 + for line in processed_lines: + if line.strip() == '': + empty_count += 1 + if empty_count <= 2: + result_lines.append(line) + else: + empty_count = 0 + result_lines.append(line) + + return '\n'.join(result_lines) + + @classmethod + def save_report(cls, report: Report) -> None: + """保存报告元信息和完整报告""" + cls._ensure_report_folder(report.report_id) + + # 保存元信息JSON + with open(cls._get_report_path(report.report_id), 'w', encoding='utf-8') as f: + json.dump(report.to_dict(), f, ensure_ascii=False, indent=2) + + # 保存大纲 + if report.outline: + cls.save_outline(report.report_id, report.outline) + + # 保存完整Markdown报告 + if report.markdown_content: + with open(cls._get_report_markdown_path(report.report_id), 'w', encoding='utf-8') as f: + f.write(report.markdown_content) + + logger.info(f"报告已保存: {report.report_id}") + + @classmethod + def get_report(cls, report_id: str) -> Optional[Report]: + """获取报告""" + path = cls._get_report_path(report_id) + + if not os.path.exists(path): + # 兼容旧格式:检查直接存储在reports目录下的文件 + old_path = os.path.join(cls.REPORTS_DIR, f"{report_id}.json") + if os.path.exists(old_path): + path = old_path + else: + return None + + with open(path, 'r', encoding='utf-8') as f: + data = json.load(f) + + # 重建Report对象 + outline = None + if data.get('outline'): + outline_data = data['outline'] + sections = [] + for s in outline_data.get('sections', []): + sections.append(ReportSection( + title=s['title'], + content=s.get('content', '') + )) + outline = ReportOutline( + title=outline_data['title'], + summary=outline_data['summary'], + sections=sections + ) + + # 如果markdown_content为空,尝试从full_report.md读取 + markdown_content = data.get('markdown_content', '') + if not markdown_content: + full_report_path = cls._get_report_markdown_path(report_id) + if os.path.exists(full_report_path): + with open(full_report_path, 'r', encoding='utf-8') as f: + markdown_content = f.read() + + return Report( + report_id=data['report_id'], + simulation_id=data['simulation_id'], + graph_id=data['graph_id'], + simulation_requirement=data['simulation_requirement'], + status=ReportStatus(data['status']), + outline=outline, + markdown_content=markdown_content, + created_at=data.get('created_at', ''), + completed_at=data.get('completed_at', ''), + error=data.get('error') + ) + + @classmethod + def get_report_by_simulation(cls, simulation_id: str) -> Optional[Report]: + """根据模拟ID获取报告""" + cls._ensure_reports_dir() + + for item in os.listdir(cls.REPORTS_DIR): + item_path = os.path.join(cls.REPORTS_DIR, item) + # 新格式:文件夹 + if os.path.isdir(item_path): + report = cls.get_report(item) + if report and report.simulation_id == simulation_id: + return report + # 兼容旧格式:JSON文件 + elif item.endswith('.json'): + report_id = item[:-5] + report = cls.get_report(report_id) + if report and report.simulation_id == simulation_id: + return report + + return None + + @classmethod + def list_reports(cls, simulation_id: Optional[str] = None, limit: int = 50) -> List[Report]: + """列出报告""" + cls._ensure_reports_dir() + + reports = [] + for item in os.listdir(cls.REPORTS_DIR): + item_path = os.path.join(cls.REPORTS_DIR, item) + # 新格式:文件夹 + if os.path.isdir(item_path): + report = cls.get_report(item) + if report: + if simulation_id is None or report.simulation_id == simulation_id: + reports.append(report) + # 兼容旧格式:JSON文件 + elif item.endswith('.json'): + report_id = item[:-5] + report = cls.get_report(report_id) + if report: + if simulation_id is None or report.simulation_id == simulation_id: + reports.append(report) + + # 按创建时间倒序 + reports.sort(key=lambda r: r.created_at, reverse=True) + + return reports[:limit] + + @classmethod + def delete_report(cls, report_id: str) -> bool: + """删除报告(整个文件夹)""" + import shutil + + folder_path = cls._get_report_folder(report_id) + + # 新格式:删除整个文件夹 + if os.path.exists(folder_path) and os.path.isdir(folder_path): + shutil.rmtree(folder_path) + logger.info(f"报告文件夹已删除: {report_id}") + return True + + # 兼容旧格式:删除单独的文件 + deleted = False + old_json_path = os.path.join(cls.REPORTS_DIR, f"{report_id}.json") + old_md_path = os.path.join(cls.REPORTS_DIR, f"{report_id}.md") + + if os.path.exists(old_json_path): + os.remove(old_json_path) + deleted = True + if os.path.exists(old_md_path): + os.remove(old_md_path) + deleted = True + + return deleted diff --git a/app/app/services/simulation_config_generator.py b/app/app/services/simulation_config_generator.py new file mode 100644 index 0000000000000000000000000000000000000000..d7a0baedc334609297f29e899df58fca65ee32ca --- /dev/null +++ b/app/app/services/simulation_config_generator.py @@ -0,0 +1,1033 @@ +""" +模拟配置智能生成器 +使用LLM根据模拟需求、文档内容、图谱信息自动生成细致的模拟参数 +实现全程自动化,无需人工设置参数 + +采用分步生成策略,避免一次性生成过长内容导致失败: +1. 生成时间配置 +2. 生成事件配置 +3. 分批生成Agent配置 +4. 生成平台配置 +""" + +import json +import math +from typing import Dict, Any, List, Optional, Callable +from dataclasses import dataclass, field, asdict +from datetime import datetime + +from openai import OpenAI + +from ..config import Config +from ..utils.api_key_runtime import call_with_limit_rotation, get_llm_key +from ..utils.logger import get_logger +from .zep_entity_reader import EntityNode, ZepEntityReader + +logger = get_logger('mirofish.simulation_config') + +# 中国作息时间配置(北京时间) +CHINA_TIMEZONE_CONFIG = { + # 深夜时段(几乎无人活动) + "dead_hours": [0, 1, 2, 3, 4, 5], + # 早间时段(逐渐醒来) + "morning_hours": [6, 7, 8], + # 工作时段 + "work_hours": [9, 10, 11, 12, 13, 14, 15, 16, 17, 18], + # 晚间高峰(最活跃) + "peak_hours": [19, 20, 21, 22], + # 夜间时段(活跃度下降) + "night_hours": [23], + # 活跃度系数 + "activity_multipliers": { + "dead": 0.05, # 凌晨几乎无人 + "morning": 0.4, # 早间逐渐活跃 + "work": 0.7, # 工作时段中等 + "peak": 1.5, # 晚间高峰 + "night": 0.5 # 深夜下降 + } +} + + +@dataclass +class AgentActivityConfig: + """单个Agent的活动配置""" + agent_id: int + entity_uuid: str + entity_name: str + entity_type: str + + # 活跃度配置 (0.0-1.0) + activity_level: float = 0.5 # 整体活跃度 + + # 发言频率(每小时预期发言次数) + posts_per_hour: float = 1.0 + comments_per_hour: float = 2.0 + + # 活跃时间段(24小时制,0-23) + active_hours: List[int] = field(default_factory=lambda: list(range(8, 23))) + + # 响应速度(对热点事件的反应延迟,单位:模拟分钟) + response_delay_min: int = 5 + response_delay_max: int = 60 + + # 情感倾向 (-1.0到1.0,负面到正面) + sentiment_bias: float = 0.0 + + # 立场(对特定话题的态度) + stance: str = "neutral" # supportive, opposing, neutral, observer + + # 影响力权重(决定其发言被其他Agent看到的概率) + influence_weight: float = 1.0 + + +@dataclass +class TimeSimulationConfig: + """时间模拟配置(基于中国人作息习惯)""" + # 模拟总时长(模拟小时数) + total_simulation_hours: int = 72 # 默认模拟72小时(3天) + + # 每轮代表的时间(模拟分钟)- 默认60分钟(1小时),加快时间流速 + minutes_per_round: int = 60 + + # 每小时激活的Agent数量范围 + agents_per_hour_min: int = 5 + agents_per_hour_max: int = 20 + + # 高峰时段(晚间19-22点,中国人最活跃的时间) + peak_hours: List[int] = field(default_factory=lambda: [19, 20, 21, 22]) + peak_activity_multiplier: float = 1.5 + + # 低谷时段(凌晨0-5点,几乎无人活动) + off_peak_hours: List[int] = field(default_factory=lambda: [0, 1, 2, 3, 4, 5]) + off_peak_activity_multiplier: float = 0.05 # 凌晨活跃度极低 + + # 早间时段 + morning_hours: List[int] = field(default_factory=lambda: [6, 7, 8]) + morning_activity_multiplier: float = 0.4 + + # 工作时段 + work_hours: List[int] = field(default_factory=lambda: [9, 10, 11, 12, 13, 14, 15, 16, 17, 18]) + work_activity_multiplier: float = 0.7 + + +@dataclass +class EventConfig: + """事件配置""" + # 初始事件(模拟开始时的触发事件) + initial_posts: List[Dict[str, Any]] = field(default_factory=list) + + # 定时事件(在特定时间触发的事件) + scheduled_events: List[Dict[str, Any]] = field(default_factory=list) + + # 热点话题关键词 + hot_topics: List[str] = field(default_factory=list) + + # 舆论引导方向 + narrative_direction: str = "" + + +@dataclass +class PlatformConfig: + """平台特定配置""" + platform: str # twitter or reddit + + # 推荐算法权重 + recency_weight: float = 0.4 # 时间新鲜度 + popularity_weight: float = 0.3 # 热度 + relevance_weight: float = 0.3 # 相关性 + + # 病毒传播阈值(达到多少互动后触发扩散) + viral_threshold: int = 10 + + # 回声室效应强度(相似观点聚集程度) + echo_chamber_strength: float = 0.5 + + +@dataclass +class SimulationParameters: + """完整的模拟参数配置""" + # 基础信息 + simulation_id: str + project_id: str + graph_id: str + simulation_requirement: str + + # 时间配置 + time_config: TimeSimulationConfig = field(default_factory=TimeSimulationConfig) + + # Agent配置列表 + agent_configs: List[AgentActivityConfig] = field(default_factory=list) + + # 事件配置 + event_config: EventConfig = field(default_factory=EventConfig) + + # 平台配置 + twitter_config: Optional[PlatformConfig] = None + reddit_config: Optional[PlatformConfig] = None + + # LLM配置 + llm_model: str = "" + llm_base_url: str = "" + + # 生成元数据 + generated_at: str = field(default_factory=lambda: datetime.now().isoformat()) + generation_reasoning: str = "" # LLM的推理说明 + + def to_dict(self) -> Dict[str, Any]: + """转换为字典""" + time_dict = asdict(self.time_config) + return { + "simulation_id": self.simulation_id, + "project_id": self.project_id, + "graph_id": self.graph_id, + "simulation_requirement": self.simulation_requirement, + "time_config": time_dict, + "agent_configs": [asdict(a) for a in self.agent_configs], + "event_config": asdict(self.event_config), + "twitter_config": asdict(self.twitter_config) if self.twitter_config else None, + "reddit_config": asdict(self.reddit_config) if self.reddit_config else None, + "llm_model": self.llm_model, + "llm_base_url": self.llm_base_url, + "generated_at": self.generated_at, + "generation_reasoning": self.generation_reasoning, + } + + def to_json(self, indent: int = 2) -> str: + """转换为JSON字符串""" + return json.dumps(self.to_dict(), ensure_ascii=False, indent=indent) + + +class SimulationConfigGenerator: + """ + 模拟配置智能生成器 + + 使用LLM分析模拟需求、文档内容、图谱实体信息, + 自动生成最佳的模拟参数配置 + + 采用分步生成策略: + 1. 生成时间配置和事件配置(轻量级) + 2. 分批生成Agent配置(每批10-20个) + 3. 生成平台配置 + """ + + # 上下文最大字符数 + MAX_CONTEXT_LENGTH = 50000 + # 每批生成的Agent数量 + AGENTS_PER_BATCH = 15 + + # 各步骤的上下文截断长度(字符数) + TIME_CONFIG_CONTEXT_LENGTH = 10000 # 时间配置 + EVENT_CONFIG_CONTEXT_LENGTH = 8000 # 事件配置 + ENTITY_SUMMARY_LENGTH = 300 # 实体摘要 + AGENT_SUMMARY_LENGTH = 300 # Agent配置中的实体摘要 + ENTITIES_PER_TYPE_DISPLAY = 20 # 每类实体显示数量 + + def __init__( + self, + api_key: Optional[str] = None, + base_url: Optional[str] = None, + model_name: Optional[str] = None + ): + self._fixed_api_key = (api_key or "").strip() or None + self.base_url = base_url or Config.LLM_BASE_URL + self.model_name = model_name or Config.LLM_MODEL_NAME + + if self._fixed_api_key: + self.api_key = self._fixed_api_key + self.client = OpenAI(api_key=self.api_key, base_url=self.base_url) + else: + if not Config.get_llm_api_keys(): + raise ValueError("LLM_API_KEY 未配置") + self.api_key = Config.get_llm_api_keys()[0] + self.client = None + + def generate_config( + self, + simulation_id: str, + project_id: str, + graph_id: str, + simulation_requirement: str, + document_text: str, + entities: List[EntityNode], + enable_twitter: bool = True, + enable_reddit: bool = True, + progress_callback: Optional[Callable[[int, int, str], None]] = None, + ) -> SimulationParameters: + """ + 智能生成完整的模拟配置(分步生成) + + Args: + simulation_id: 模拟ID + project_id: 项目ID + graph_id: 图谱ID + simulation_requirement: 模拟需求描述 + document_text: 原始文档内容 + entities: 过滤后的实体列表 + enable_twitter: 是否启用Twitter + enable_reddit: 是否启用Reddit + progress_callback: 进度回调函数(current_step, total_steps, message) + + Returns: + SimulationParameters: 完整的模拟参数 + """ + logger.info(f"开始智能生成模拟配置: simulation_id={simulation_id}, 实体数={len(entities)}") + + # 计算总步骤数 + num_batches = math.ceil(len(entities) / self.AGENTS_PER_BATCH) + total_steps = 3 + num_batches # 时间配置 + 事件配置 + N批Agent + 平台配置 + current_step = 0 + + def report_progress(step: int, message: str): + nonlocal current_step + current_step = step + if progress_callback: + progress_callback(step, total_steps, message) + logger.info(f"[{step}/{total_steps}] {message}") + + # 1. 构建基础上下文信息 + context = self._build_context( + simulation_requirement=simulation_requirement, + document_text=document_text, + entities=entities + ) + + reasoning_parts = [] + + # ========== 步骤1: 生成时间配置 ========== + report_progress(1, "生成时间配置...") + num_entities = len(entities) + time_config_result = self._generate_time_config(context, num_entities) + time_config = self._parse_time_config(time_config_result, num_entities) + reasoning_parts.append(f"时间配置: {time_config_result.get('reasoning', '成功')}") + + # ========== 步骤2: 生成事件配置 ========== + report_progress(2, "生成事件配置和热点话题...") + event_config_result = self._generate_event_config(context, simulation_requirement, entities) + event_config = self._parse_event_config(event_config_result) + reasoning_parts.append(f"事件配置: {event_config_result.get('reasoning', '成功')}") + + # ========== 步骤3-N: 分批生成Agent配置 ========== + all_agent_configs = [] + for batch_idx in range(num_batches): + start_idx = batch_idx * self.AGENTS_PER_BATCH + end_idx = min(start_idx + self.AGENTS_PER_BATCH, len(entities)) + batch_entities = entities[start_idx:end_idx] + + report_progress( + 3 + batch_idx, + f"生成Agent配置 ({start_idx + 1}-{end_idx}/{len(entities)})..." + ) + + batch_configs = self._generate_agent_configs_batch( + context=context, + entities=batch_entities, + start_idx=start_idx, + simulation_requirement=simulation_requirement + ) + all_agent_configs.extend(batch_configs) + + reasoning_parts.append(f"Agent配置: 成功生成 {len(all_agent_configs)} 个") + + # ========== 为初始帖子分配发布者 Agent ========== + logger.info("为初始帖子分配合适的发布者 Agent...") + event_config = self._assign_initial_post_agents(event_config, all_agent_configs) + assigned_count = len([p for p in event_config.initial_posts if p.get("poster_agent_id") is not None]) + reasoning_parts.append(f"初始帖子分配: {assigned_count} 个帖子已分配发布者") + + # ========== 最后一步: 生成平台配置 ========== + report_progress(total_steps, "生成平台配置...") + twitter_config = None + reddit_config = None + + if enable_twitter: + twitter_config = PlatformConfig( + platform="twitter", + recency_weight=0.4, + popularity_weight=0.3, + relevance_weight=0.3, + viral_threshold=10, + echo_chamber_strength=0.5 + ) + + if enable_reddit: + reddit_config = PlatformConfig( + platform="reddit", + recency_weight=0.3, + popularity_weight=0.4, + relevance_weight=0.3, + viral_threshold=15, + echo_chamber_strength=0.6 + ) + + # 构建最终参数 + params = SimulationParameters( + simulation_id=simulation_id, + project_id=project_id, + graph_id=graph_id, + simulation_requirement=simulation_requirement, + time_config=time_config, + agent_configs=all_agent_configs, + event_config=event_config, + twitter_config=twitter_config, + reddit_config=reddit_config, + llm_model=self.model_name, + llm_base_url=self.base_url, + generation_reasoning=" | ".join(reasoning_parts) + ) + + logger.info(f"模拟配置生成完成: {len(params.agent_configs)} 个Agent配置") + + return params + + def _build_context( + self, + simulation_requirement: str, + document_text: str, + entities: List[EntityNode] + ) -> str: + """构建LLM上下文,截断到最大长度""" + + # 实体摘要 + entity_summary = self._summarize_entities(entities) + + # 构建上下文 + context_parts = [ + f"## 模拟需求\n{simulation_requirement}", + f"\n## 实体信息 ({len(entities)}个)\n{entity_summary}", + ] + + current_length = sum(len(p) for p in context_parts) + remaining_length = self.MAX_CONTEXT_LENGTH - current_length - 500 # 留500字符余量 + + if remaining_length > 0 and document_text: + doc_text = document_text[:remaining_length] + if len(document_text) > remaining_length: + doc_text += "\n...(文档已截断)" + context_parts.append(f"\n## 原始文档内容\n{doc_text}") + + return "\n".join(context_parts) + + def _summarize_entities(self, entities: List[EntityNode]) -> str: + """生成实体摘要""" + lines = [] + + # 按类型分组 + by_type: Dict[str, List[EntityNode]] = {} + for e in entities: + t = e.get_entity_type() or "Unknown" + if t not in by_type: + by_type[t] = [] + by_type[t].append(e) + + for entity_type, type_entities in by_type.items(): + lines.append(f"\n### {entity_type} ({len(type_entities)}个)") + # 使用配置的显示数量和摘要长度 + display_count = self.ENTITIES_PER_TYPE_DISPLAY + summary_len = self.ENTITY_SUMMARY_LENGTH + for e in type_entities[:display_count]: + summary_preview = (e.summary[:summary_len] + "...") if len(e.summary) > summary_len else e.summary + lines.append(f"- {e.name}: {summary_preview}") + if len(type_entities) > display_count: + lines.append(f" ... 还有 {len(type_entities) - display_count} 个") + + return "\n".join(lines) + + def _call_llm_with_retry(self, prompt: str, system_prompt: str) -> Dict[str, Any]: + """带重试的LLM调用,包含JSON修复逻辑""" + import re + + max_attempts = 3 + last_error = None + + for attempt in range(max_attempts): + try: + def _create(): + if self._fixed_api_key: + return self.client.chat.completions.create( + model=self.model_name, + messages=[ + {"role": "system", "content": system_prompt}, + {"role": "user", "content": prompt}, + ], + response_format={"type": "json_object"}, + temperature=0.7 - (attempt * 0.1), + ) + key = get_llm_key() + if not key: + raise ValueError("LLM_API_KEY 未配置") + cl = OpenAI(api_key=key, base_url=self.base_url) + return cl.chat.completions.create( + model=self.model_name, + messages=[ + {"role": "system", "content": system_prompt}, + {"role": "user", "content": prompt}, + ], + response_format={"type": "json_object"}, + temperature=0.7 - (attempt * 0.1), + ) + + response = ( + self.client.chat.completions.create( + model=self.model_name, + messages=[ + {"role": "system", "content": system_prompt}, + {"role": "user", "content": prompt}, + ], + response_format={"type": "json_object"}, + temperature=0.7 - (attempt * 0.1), + ) + if self._fixed_api_key + else call_with_limit_rotation(_create) + ) + + content = response.choices[0].message.content + finish_reason = response.choices[0].finish_reason + + # 检查是否被截断 + if finish_reason == 'length': + logger.warning(f"LLM输出被截断 (attempt {attempt+1})") + content = self._fix_truncated_json(content) + + # 尝试解析JSON + try: + return json.loads(content) + except json.JSONDecodeError as e: + logger.warning(f"JSON解析失败 (attempt {attempt+1}): {str(e)[:80]}") + + # 尝试修复JSON + fixed = self._try_fix_config_json(content) + if fixed: + return fixed + + last_error = e + + except Exception as e: + logger.warning(f"LLM调用失败 (attempt {attempt+1}): {str(e)[:80]}") + last_error = e + import time + time.sleep(2 * (attempt + 1)) + + raise last_error or Exception("LLM调用失败") + + def _fix_truncated_json(self, content: str) -> str: + """修复被截断的JSON""" + content = content.strip() + + # 计算未闭合的括号 + open_braces = content.count('{') - content.count('}') + open_brackets = content.count('[') - content.count(']') + + # 检查是否有未闭合的字符串 + if content and content[-1] not in '",}]': + content += '"' + + # 闭合括号 + content += ']' * open_brackets + content += '}' * open_braces + + return content + + def _try_fix_config_json(self, content: str) -> Optional[Dict[str, Any]]: + """尝试修复配置JSON""" + import re + + # 修复被截断的情况 + content = self._fix_truncated_json(content) + + # 提取JSON部分 + json_match = re.search(r'\{[\s\S]*\}', content) + if json_match: + json_str = json_match.group() + + # 移除字符串中的换行符 + def fix_string(match): + s = match.group(0) + s = s.replace('\n', ' ').replace('\r', ' ') + s = re.sub(r'\s+', ' ', s) + return s + + json_str = re.sub(r'"[^"\\]*(?:\\.[^"\\]*)*"', fix_string, json_str) + + try: + return json.loads(json_str) + except: + # 尝试移除所有控制字符 + json_str = re.sub(r'[\x00-\x1f\x7f-\x9f]', ' ', json_str) + json_str = re.sub(r'\s+', ' ', json_str) + try: + return json.loads(json_str) + except: + pass + + return None + + def _generate_time_config(self, context: str, num_entities: int) -> Dict[str, Any]: + """生成时间配置""" + # 使用配置的上下文截断长度 + context_truncated = context[:self.TIME_CONFIG_CONTEXT_LENGTH] + + # 计算最大允许值(80%的agent数) + max_agents_allowed = max(1, int(num_entities * 0.9)) + + prompt = f"""基于以下模拟需求,生成时间模拟配置。 + +{context_truncated} + +## 任务 +请生成时间配置JSON。 + +### 基本原则(仅供参考,需根据具体事件和参与群体灵活调整): +- 用户群体为中国人,需符合北京时间作息习惯 +- 凌晨0-5点几乎无人活动(活跃度系数0.05) +- 早上6-8点逐渐活跃(活跃度系数0.4) +- 工作时间9-18点中等活跃(活跃度系数0.7) +- 晚间19-22点是高峰期(活跃度系数1.5) +- 23点后活跃度下降(活跃度系数0.5) +- 一般规律:凌晨低活跃、早间渐增、工作时段中等、晚间高峰 +- **重要**:以下示例值仅供参考,你需要根据事件性质、参与群体特点来调整具体时段 + - 例如:学生群体高峰可能是21-23点;媒体全天活跃;官方机构只在工作时间 + - 例如:突发热点可能导致深夜也有讨论,off_peak_hours 可适当缩短 + +### 返回JSON格式(不要markdown) + +示例: +{{ + "total_simulation_hours": 72, + "minutes_per_round": 60, + "agents_per_hour_min": 5, + "agents_per_hour_max": 50, + "peak_hours": [19, 20, 21, 22], + "off_peak_hours": [0, 1, 2, 3, 4, 5], + "morning_hours": [6, 7, 8], + "work_hours": [9, 10, 11, 12, 13, 14, 15, 16, 17, 18], + "reasoning": "针对该事件的时间配置说明" +}} + +字段说明: +- total_simulation_hours (int): 模拟总时长,24-168小时,突发事件短、持续话题长 +- minutes_per_round (int): 每轮时长,30-120分钟,建议60分钟 +- agents_per_hour_min (int): 每小时最少激活Agent数(取值范围: 1-{max_agents_allowed}) +- agents_per_hour_max (int): 每小时最多激活Agent数(取值范围: 1-{max_agents_allowed}) +- peak_hours (int数组): 高峰时段,根据事件参与群体调整 +- off_peak_hours (int数组): 低谷时段,通常深夜凌晨 +- morning_hours (int数组): 早间时段 +- work_hours (int数组): 工作时段 +- reasoning (string): 简要说明为什么这样配置""" + + system_prompt = "你是社交媒体模拟专家。返回纯JSON格式,时间配置需符合中国人作息习惯。" + + try: + return self._call_llm_with_retry(prompt, system_prompt) + except Exception as e: + logger.warning(f"时间配置LLM生成失败: {e}, 使用默认配置") + return self._get_default_time_config(num_entities) + + def _get_default_time_config(self, num_entities: int) -> Dict[str, Any]: + """获取默认时间配置(中国人作息)""" + return { + "total_simulation_hours": 72, + "minutes_per_round": 60, # 每轮1小时,加快时间流速 + "agents_per_hour_min": max(1, num_entities // 15), + "agents_per_hour_max": max(5, num_entities // 5), + "peak_hours": [19, 20, 21, 22], + "off_peak_hours": [0, 1, 2, 3, 4, 5], + "morning_hours": [6, 7, 8], + "work_hours": [9, 10, 11, 12, 13, 14, 15, 16, 17, 18], + "reasoning": "使用默认中国人作息配置(每轮1小时)" + } + + def _parse_time_config(self, result: Dict[str, Any], num_entities: int) -> TimeSimulationConfig: + """解析时间配置结果,并验证agents_per_hour值不超过总agent数""" + # 获取原始值 + agents_per_hour_min = result.get("agents_per_hour_min", max(1, num_entities // 15)) + agents_per_hour_max = result.get("agents_per_hour_max", max(5, num_entities // 5)) + + # 验证并修正:确保不超过总agent数 + if agents_per_hour_min > num_entities: + logger.warning(f"agents_per_hour_min ({agents_per_hour_min}) 超过总Agent数 ({num_entities}),已修正") + agents_per_hour_min = max(1, num_entities // 10) + + if agents_per_hour_max > num_entities: + logger.warning(f"agents_per_hour_max ({agents_per_hour_max}) 超过总Agent数 ({num_entities}),已修正") + agents_per_hour_max = max(agents_per_hour_min + 1, num_entities // 2) + + # 确保 min < max + if agents_per_hour_min >= agents_per_hour_max: + agents_per_hour_min = max(1, agents_per_hour_max // 2) + logger.warning(f"agents_per_hour_min >= max,已修正为 {agents_per_hour_min}") + + return TimeSimulationConfig( + total_simulation_hours=result.get("total_simulation_hours", 72), + minutes_per_round=result.get("minutes_per_round", 60), # 默认每轮1小时 + agents_per_hour_min=agents_per_hour_min, + agents_per_hour_max=agents_per_hour_max, + peak_hours=result.get("peak_hours", [19, 20, 21, 22]), + off_peak_hours=result.get("off_peak_hours", [0, 1, 2, 3, 4, 5]), + off_peak_activity_multiplier=0.05, # 凌晨几乎无人 + morning_hours=result.get("morning_hours", [6, 7, 8]), + morning_activity_multiplier=0.4, + work_hours=result.get("work_hours", list(range(9, 19))), + work_activity_multiplier=0.7, + peak_activity_multiplier=1.5 + ) + + def _generate_event_config( + self, + context: str, + simulation_requirement: str, + entities: List[EntityNode] + ) -> Dict[str, Any]: + """生成事件配置""" + + # 获取可用的实体类型列表,供 LLM 参考 + entity_types_available = list(set( + e.get_entity_type() or "Unknown" for e in entities + )) + + # 为每种类型列出代表性实体名称 + type_examples = {} + for e in entities: + etype = e.get_entity_type() or "Unknown" + if etype not in type_examples: + type_examples[etype] = [] + if len(type_examples[etype]) < 3: + type_examples[etype].append(e.name) + + type_info = "\n".join([ + f"- {t}: {', '.join(examples)}" + for t, examples in type_examples.items() + ]) + + # 使用配置的上下文截断长度 + context_truncated = context[:self.EVENT_CONFIG_CONTEXT_LENGTH] + + prompt = f"""基于以下模拟需求,生成事件配置。 + +模拟需求: {simulation_requirement} + +{context_truncated} + +## 可用实体类型及示例 +{type_info} + +## 任务 +请生成事件配置JSON: +- 提取热点话题关键词(若涉及创业/产品,围绕「想法验证」:产品价值、商业模式、竞争、融资、用户痛点等) +- 描述舆论/讨论发展方向(各方如何质疑、支持或传播该想法) +- 设计初始帖子内容,**每个帖子必须指定 poster_type(发布者类型)** + +**重要**: poster_type 必须从上面的"可用实体类型"中选择,这样初始帖子才能分配给合适的 Agent 发布。 +例如:投资人观点由 VentureInvestor/AngelInvestor 等类型发布,创始人讨论由 StartupFounder,客户/用户反馈由 TargetCustomer/SkepticalUser,新闻由 MediaOutlet 发布。 + +返回JSON格式(不要markdown): +{{ + "hot_topics": ["关键词1", "关键词2", ...], + "narrative_direction": "<舆论发展方向描述>", + "initial_posts": [ + {{"content": "帖子内容", "poster_type": "实体类型(必须从可用类型中选择)"}}, + ... + ], + "reasoning": "<简要说明>" +}}""" + + system_prompt = ( + "你是舆论与创业想法验证场景分析专家。返回纯JSON格式。" + "poster_type 必须精确匹配可用实体类型;初始讨论应能引出投资、产品、市场等多角度反应。" + ) + + try: + return self._call_llm_with_retry(prompt, system_prompt) + except Exception as e: + logger.warning(f"事件配置LLM生成失败: {e}, 使用默认配置") + return { + "hot_topics": [], + "narrative_direction": "", + "initial_posts": [], + "reasoning": "使用默认配置" + } + + def _parse_event_config(self, result: Dict[str, Any]) -> EventConfig: + """解析事件配置结果""" + return EventConfig( + initial_posts=result.get("initial_posts", []), + scheduled_events=[], + hot_topics=result.get("hot_topics", []), + narrative_direction=result.get("narrative_direction", "") + ) + + def _assign_initial_post_agents( + self, + event_config: EventConfig, + agent_configs: List[AgentActivityConfig] + ) -> EventConfig: + """ + 为初始帖子分配合适的发布者 Agent + + 根据每个帖子的 poster_type 匹配最合适的 agent_id + """ + if not event_config.initial_posts: + return event_config + + # 按实体类型建立 agent 索引 + agents_by_type: Dict[str, List[AgentActivityConfig]] = {} + for agent in agent_configs: + etype = agent.entity_type.lower() + if etype not in agents_by_type: + agents_by_type[etype] = [] + agents_by_type[etype].append(agent) + + # 类型映射表(处理 LLM 可能输出的不同格式) + type_aliases = { + "official": ["official", "university", "governmentagency", "government"], + "university": ["university", "official"], + "mediaoutlet": ["mediaoutlet", "media"], + "student": ["student", "person"], + "professor": ["professor", "expert", "teacher"], + "alumni": ["alumni", "person"], + "organization": ["organization", "ngo", "company", "group"], + "person": ["person", "student", "alumni"], + "ventureinvestor": ["ventureinvestor", "angelinvestor", "acceleratorpartner", "person"], + "angelinvestor": ["angelinvestor", "ventureinvestor", "person"], + "acceleratorpartner": ["acceleratorpartner", "ventureinvestor", "person"], + "startupfounder": ["startupfounder", "person"], + "targetcustomer": ["targetcustomer", "skepticaluser", "person"], + "skepticaluser": ["skepticaluser", "targetcustomer", "person"], + "industryexpert": ["industryexpert", "expert", "person"], + "startupcompany": ["startupcompany", "company", "organization"], + "venturecapitalfirm": ["venturecapitalfirm", "company", "organization"], + } + + # 记录每种类型已使用的 agent 索引,避免重复使用同一个 agent + used_indices: Dict[str, int] = {} + + updated_posts = [] + for post in event_config.initial_posts: + poster_type = post.get("poster_type", "").lower() + content = post.get("content", "") + + # 尝试找到匹配的 agent + matched_agent_id = None + + # 1. 直接匹配 + if poster_type in agents_by_type: + agents = agents_by_type[poster_type] + idx = used_indices.get(poster_type, 0) % len(agents) + matched_agent_id = agents[idx].agent_id + used_indices[poster_type] = idx + 1 + else: + # 2. 使用别名匹配 + for alias_key, aliases in type_aliases.items(): + if poster_type in aliases or alias_key == poster_type: + for alias in aliases: + if alias in agents_by_type: + agents = agents_by_type[alias] + idx = used_indices.get(alias, 0) % len(agents) + matched_agent_id = agents[idx].agent_id + used_indices[alias] = idx + 1 + break + if matched_agent_id is not None: + break + + # 3. 如果仍未找到,使用影响力最高的 agent + if matched_agent_id is None: + logger.warning(f"未找到类型 '{poster_type}' 的匹配 Agent,使用影响力最高的 Agent") + if agent_configs: + # 按影响力排序,选择影响力最高的 + sorted_agents = sorted(agent_configs, key=lambda a: a.influence_weight, reverse=True) + matched_agent_id = sorted_agents[0].agent_id + else: + matched_agent_id = 0 + + updated_posts.append({ + "content": content, + "poster_type": post.get("poster_type", "Unknown"), + "poster_agent_id": matched_agent_id + }) + + logger.info(f"初始帖子分配: poster_type='{poster_type}' -> agent_id={matched_agent_id}") + + event_config.initial_posts = updated_posts + return event_config + + def _generate_agent_configs_batch( + self, + context: str, + entities: List[EntityNode], + start_idx: int, + simulation_requirement: str + ) -> List[AgentActivityConfig]: + """分批生成Agent配置""" + + # 构建实体信息(使用配置的摘要长度) + entity_list = [] + summary_len = self.AGENT_SUMMARY_LENGTH + for i, e in enumerate(entities): + entity_list.append({ + "agent_id": start_idx + i, + "entity_name": e.name, + "entity_type": e.get_entity_type() or "Unknown", + "summary": e.summary[:summary_len] if e.summary else "" + }) + + prompt = f"""基于以下信息,为每个实体生成社交媒体活动配置。 + +模拟需求: {simulation_requirement} + +## 实体列表 +```json +{json.dumps(entity_list, ensure_ascii=False, indent=2)} +``` + +## 任务 +为每个实体生成活动配置,注意: +- **时间符合中国人作息**:凌晨0-5点几乎不活动,晚间19-22点最活跃 +- **官方机构**(University/GovernmentAgency):活跃度低(0.1-0.3),工作时间(9-17)活动,响应慢(60-240分钟),影响力高(2.5-3.0) +- **媒体**(MediaOutlet):活跃度中(0.4-0.6),全天活动(8-23),响应快(5-30分钟),影响力高(2.0-2.5) +- **个人**(Student/Person/Alumni):活跃度高(0.6-0.9),主要晚间活动(18-23),响应快(1-15分钟),影响力低(0.8-1.2) +- **公众人物/专家**:活跃度中(0.4-0.6),影响力中高(1.5-2.0) +- **创业验证常见角色**:VC/天使(VentureInvestor/AngelInvestor 等)活跃度中、工作时间偏活跃、发言少但影响力高(2.0-3.0);StartupFounder 活跃度高、晚间与午间活跃;TargetCustomer/SkepticalUser 活跃度高、响应快、影响力中等(0.9-1.3) + +返回JSON格式(不要markdown): +{{ + "agent_configs": [ + {{ + "agent_id": <必须与输入一致>, + "activity_level": <0.0-1.0>, + "posts_per_hour": <发帖频率>, + "comments_per_hour": <评论频率>, + "active_hours": [<活跃小时列表,考虑中国人作息>], + "response_delay_min": <最小响应延迟分钟>, + "response_delay_max": <最大响应延迟分钟>, + "sentiment_bias": <-1.0到1.0>, + "stance": "", + "influence_weight": <影响力权重> + }}, + ... + ] +}}""" + + system_prompt = ( + "你是社交媒体行为分析专家,当前场景常为创业想法验证。返回纯JSON,配置需符合中国人作息习惯;" + "不同类型 Agent 的活跃度与影响力需符合其在验证中的角色(投资人 vs 客户 vs 创始人)。" + ) + + try: + result = self._call_llm_with_retry(prompt, system_prompt) + llm_configs = {cfg["agent_id"]: cfg for cfg in result.get("agent_configs", [])} + except Exception as e: + logger.warning(f"Agent配置批次LLM生成失败: {e}, 使用规则生成") + llm_configs = {} + + # 构建AgentActivityConfig对象 + configs = [] + for i, entity in enumerate(entities): + agent_id = start_idx + i + cfg = llm_configs.get(agent_id, {}) + + # 如果LLM没有生成,使用规则生成 + if not cfg: + cfg = self._generate_agent_config_by_rule(entity) + + config = AgentActivityConfig( + agent_id=agent_id, + entity_uuid=entity.uuid, + entity_name=entity.name, + entity_type=entity.get_entity_type() or "Unknown", + activity_level=cfg.get("activity_level", 0.5), + posts_per_hour=cfg.get("posts_per_hour", 0.5), + comments_per_hour=cfg.get("comments_per_hour", 1.0), + active_hours=cfg.get("active_hours", list(range(9, 23))), + response_delay_min=cfg.get("response_delay_min", 5), + response_delay_max=cfg.get("response_delay_max", 60), + sentiment_bias=cfg.get("sentiment_bias", 0.0), + stance=cfg.get("stance", "neutral"), + influence_weight=cfg.get("influence_weight", 1.0) + ) + configs.append(config) + + return configs + + def _generate_agent_config_by_rule(self, entity: EntityNode) -> Dict[str, Any]: + """基于规则生成单个Agent配置(中国人作息)""" + entity_type = (entity.get_entity_type() or "Unknown").lower() + + if entity_type in ["university", "governmentagency", "ngo"]: + # 官方机构:工作时间活动,低频率,高影响力 + return { + "activity_level": 0.2, + "posts_per_hour": 0.1, + "comments_per_hour": 0.05, + "active_hours": list(range(9, 18)), # 9:00-17:59 + "response_delay_min": 60, + "response_delay_max": 240, + "sentiment_bias": 0.0, + "stance": "neutral", + "influence_weight": 3.0 + } + elif entity_type in ["mediaoutlet"]: + # 媒体:全天活动,中等频率,高影响力 + return { + "activity_level": 0.5, + "posts_per_hour": 0.8, + "comments_per_hour": 0.3, + "active_hours": list(range(7, 24)), # 7:00-23:59 + "response_delay_min": 5, + "response_delay_max": 30, + "sentiment_bias": 0.0, + "stance": "observer", + "influence_weight": 2.5 + } + elif entity_type in ["professor", "expert", "official"]: + # 专家/教授:工作+晚间活动,中等频率 + return { + "activity_level": 0.4, + "posts_per_hour": 0.3, + "comments_per_hour": 0.5, + "active_hours": list(range(8, 22)), # 8:00-21:59 + "response_delay_min": 15, + "response_delay_max": 90, + "sentiment_bias": 0.0, + "stance": "neutral", + "influence_weight": 2.0 + } + elif entity_type in ["student"]: + # 学生:晚间为主,高频率 + return { + "activity_level": 0.8, + "posts_per_hour": 0.6, + "comments_per_hour": 1.5, + "active_hours": [8, 9, 10, 11, 12, 13, 18, 19, 20, 21, 22, 23], # 上午+晚间 + "response_delay_min": 1, + "response_delay_max": 15, + "sentiment_bias": 0.0, + "stance": "neutral", + "influence_weight": 0.8 + } + elif entity_type in ["alumni"]: + # 校友:晚间为主 + return { + "activity_level": 0.6, + "posts_per_hour": 0.4, + "comments_per_hour": 0.8, + "active_hours": [12, 13, 19, 20, 21, 22, 23], # 午休+晚间 + "response_delay_min": 5, + "response_delay_max": 30, + "sentiment_bias": 0.0, + "stance": "neutral", + "influence_weight": 1.0 + } + else: + # 普通人:晚间高峰 + return { + "activity_level": 0.7, + "posts_per_hour": 0.5, + "comments_per_hour": 1.2, + "active_hours": [9, 10, 11, 12, 13, 18, 19, 20, 21, 22, 23], # 白天+晚间 + "response_delay_min": 2, + "response_delay_max": 20, + "sentiment_bias": 0.0, + "stance": "neutral", + "influence_weight": 1.0 + } + + diff --git a/app/app/services/simulation_ipc.py b/app/app/services/simulation_ipc.py new file mode 100644 index 0000000000000000000000000000000000000000..2e36acdec02a82c5e2dc0f1c6c218b4d602635ba --- /dev/null +++ b/app/app/services/simulation_ipc.py @@ -0,0 +1,394 @@ +""" +模拟IPC通信模块 +用于Flask后端和模拟脚本之间的进程间通信 + +通过文件系统实现简单的命令/响应模式: +1. Flask写入命令到 commands/ 目录 +2. 模拟脚本轮询命令目录,执行命令并写入响应到 responses/ 目录 +3. Flask轮询响应目录获取结果 +""" + +import os +import json +import time +import uuid +from typing import Dict, Any, Optional, List +from dataclasses import dataclass, field +from datetime import datetime +from enum import Enum + +from ..utils.logger import get_logger + +logger = get_logger('mirofish.simulation_ipc') + + +class CommandType(str, Enum): + """命令类型""" + INTERVIEW = "interview" # 单个Agent采访 + BATCH_INTERVIEW = "batch_interview" # 批量采访 + CLOSE_ENV = "close_env" # 关闭环境 + + +class CommandStatus(str, Enum): + """命令状态""" + PENDING = "pending" + PROCESSING = "processing" + COMPLETED = "completed" + FAILED = "failed" + + +@dataclass +class IPCCommand: + """IPC命令""" + command_id: str + command_type: CommandType + args: Dict[str, Any] + timestamp: str = field(default_factory=lambda: datetime.now().isoformat()) + + def to_dict(self) -> Dict[str, Any]: + return { + "command_id": self.command_id, + "command_type": self.command_type.value, + "args": self.args, + "timestamp": self.timestamp + } + + @classmethod + def from_dict(cls, data: Dict[str, Any]) -> 'IPCCommand': + return cls( + command_id=data["command_id"], + command_type=CommandType(data["command_type"]), + args=data.get("args", {}), + timestamp=data.get("timestamp", datetime.now().isoformat()) + ) + + +@dataclass +class IPCResponse: + """IPC响应""" + command_id: str + status: CommandStatus + result: Optional[Dict[str, Any]] = None + error: Optional[str] = None + timestamp: str = field(default_factory=lambda: datetime.now().isoformat()) + + def to_dict(self) -> Dict[str, Any]: + return { + "command_id": self.command_id, + "status": self.status.value, + "result": self.result, + "error": self.error, + "timestamp": self.timestamp + } + + @classmethod + def from_dict(cls, data: Dict[str, Any]) -> 'IPCResponse': + return cls( + command_id=data["command_id"], + status=CommandStatus(data["status"]), + result=data.get("result"), + error=data.get("error"), + timestamp=data.get("timestamp", datetime.now().isoformat()) + ) + + +class SimulationIPCClient: + """ + 模拟IPC客户端(Flask端使用) + + 用于向模拟进程发送命令并等待响应 + """ + + def __init__(self, simulation_dir: str): + """ + 初始化IPC客户端 + + Args: + simulation_dir: 模拟数据目录 + """ + self.simulation_dir = simulation_dir + self.commands_dir = os.path.join(simulation_dir, "ipc_commands") + self.responses_dir = os.path.join(simulation_dir, "ipc_responses") + + # 确保目录存在 + os.makedirs(self.commands_dir, exist_ok=True) + os.makedirs(self.responses_dir, exist_ok=True) + + def send_command( + self, + command_type: CommandType, + args: Dict[str, Any], + timeout: float = 60.0, + poll_interval: float = 0.5 + ) -> IPCResponse: + """ + 发送命令并等待响应 + + Args: + command_type: 命令类型 + args: 命令参数 + timeout: 超时时间(秒) + poll_interval: 轮询间隔(秒) + + Returns: + IPCResponse + + Raises: + TimeoutError: 等待响应超时 + """ + command_id = str(uuid.uuid4()) + command = IPCCommand( + command_id=command_id, + command_type=command_type, + args=args + ) + + # 写入命令文件 + command_file = os.path.join(self.commands_dir, f"{command_id}.json") + with open(command_file, 'w', encoding='utf-8') as f: + json.dump(command.to_dict(), f, ensure_ascii=False, indent=2) + + logger.info(f"发送IPC命令: {command_type.value}, command_id={command_id}") + + # 等待响应 + response_file = os.path.join(self.responses_dir, f"{command_id}.json") + start_time = time.time() + + while time.time() - start_time < timeout: + if os.path.exists(response_file): + try: + with open(response_file, 'r', encoding='utf-8') as f: + response_data = json.load(f) + response = IPCResponse.from_dict(response_data) + + # 清理命令和响应文件 + try: + os.remove(command_file) + os.remove(response_file) + except OSError: + pass + + logger.info(f"收到IPC响应: command_id={command_id}, status={response.status.value}") + return response + except (json.JSONDecodeError, KeyError) as e: + logger.warning(f"解析响应失败: {e}") + + time.sleep(poll_interval) + + # 超时 + logger.error(f"等待IPC响应超时: command_id={command_id}") + + # 清理命令文件 + try: + os.remove(command_file) + except OSError: + pass + + raise TimeoutError(f"等待命令响应超时 ({timeout}秒)") + + def send_interview( + self, + agent_id: int, + prompt: str, + platform: str = None, + timeout: float = 60.0 + ) -> IPCResponse: + """ + 发送单个Agent采访命令 + + Args: + agent_id: Agent ID + prompt: 采访问题 + platform: 指定平台(可选) + - "twitter": 只采访Twitter平台 + - "reddit": 只采访Reddit平台 + - None: 双平台模拟时同时采访两个平台,单平台模拟时采访该平台 + timeout: 超时时间 + + Returns: + IPCResponse,result字段包含采访结果 + """ + args = { + "agent_id": agent_id, + "prompt": prompt + } + if platform: + args["platform"] = platform + + return self.send_command( + command_type=CommandType.INTERVIEW, + args=args, + timeout=timeout + ) + + def send_batch_interview( + self, + interviews: List[Dict[str, Any]], + platform: str = None, + timeout: float = 120.0 + ) -> IPCResponse: + """ + 发送批量采访命令 + + Args: + interviews: 采访列表,每个元素包含 {"agent_id": int, "prompt": str, "platform": str(可选)} + platform: 默认平台(可选,会被每个采访项的platform覆盖) + - "twitter": 默认只采访Twitter平台 + - "reddit": 默认只采访Reddit平台 + - None: 双平台模拟时每个Agent同时采访两个平台 + timeout: 超时时间 + + Returns: + IPCResponse,result字段包含所有采访结果 + """ + args = {"interviews": interviews} + if platform: + args["platform"] = platform + + return self.send_command( + command_type=CommandType.BATCH_INTERVIEW, + args=args, + timeout=timeout + ) + + def send_close_env(self, timeout: float = 30.0) -> IPCResponse: + """ + 发送关闭环境命令 + + Args: + timeout: 超时时间 + + Returns: + IPCResponse + """ + return self.send_command( + command_type=CommandType.CLOSE_ENV, + args={}, + timeout=timeout + ) + + def check_env_alive(self) -> bool: + """ + 检查模拟环境是否存活 + + 通过检查 env_status.json 文件来判断 + """ + status_file = os.path.join(self.simulation_dir, "env_status.json") + if not os.path.exists(status_file): + return False + + try: + with open(status_file, 'r', encoding='utf-8') as f: + status = json.load(f) + return status.get("status") == "alive" + except (json.JSONDecodeError, OSError): + return False + + +class SimulationIPCServer: + """ + 模拟IPC服务器(模拟脚本端使用) + + 轮询命令目录,执行命令并返回响应 + """ + + def __init__(self, simulation_dir: str): + """ + 初始化IPC服务器 + + Args: + simulation_dir: 模拟数据目录 + """ + self.simulation_dir = simulation_dir + self.commands_dir = os.path.join(simulation_dir, "ipc_commands") + self.responses_dir = os.path.join(simulation_dir, "ipc_responses") + + # 确保目录存在 + os.makedirs(self.commands_dir, exist_ok=True) + os.makedirs(self.responses_dir, exist_ok=True) + + # 环境状态 + self._running = False + + def start(self): + """标记服务器为运行状态""" + self._running = True + self._update_env_status("alive") + + def stop(self): + """标记服务器为停止状态""" + self._running = False + self._update_env_status("stopped") + + def _update_env_status(self, status: str): + """更新环境状态文件""" + status_file = os.path.join(self.simulation_dir, "env_status.json") + with open(status_file, 'w', encoding='utf-8') as f: + json.dump({ + "status": status, + "timestamp": datetime.now().isoformat() + }, f, ensure_ascii=False, indent=2) + + def poll_commands(self) -> Optional[IPCCommand]: + """ + 轮询命令目录,返回第一个待处理的命令 + + Returns: + IPCCommand 或 None + """ + if not os.path.exists(self.commands_dir): + return None + + # 按时间排序获取命令文件 + command_files = [] + for filename in os.listdir(self.commands_dir): + if filename.endswith('.json'): + filepath = os.path.join(self.commands_dir, filename) + command_files.append((filepath, os.path.getmtime(filepath))) + + command_files.sort(key=lambda x: x[1]) + + for filepath, _ in command_files: + try: + with open(filepath, 'r', encoding='utf-8') as f: + data = json.load(f) + return IPCCommand.from_dict(data) + except (json.JSONDecodeError, KeyError, OSError) as e: + logger.warning(f"读取命令文件失败: {filepath}, {e}") + continue + + return None + + def send_response(self, response: IPCResponse): + """ + 发送响应 + + Args: + response: IPC响应 + """ + response_file = os.path.join(self.responses_dir, f"{response.command_id}.json") + with open(response_file, 'w', encoding='utf-8') as f: + json.dump(response.to_dict(), f, ensure_ascii=False, indent=2) + + # 删除命令文件 + command_file = os.path.join(self.commands_dir, f"{response.command_id}.json") + try: + os.remove(command_file) + except OSError: + pass + + def send_success(self, command_id: str, result: Dict[str, Any]): + """发送成功响应""" + self.send_response(IPCResponse( + command_id=command_id, + status=CommandStatus.COMPLETED, + result=result + )) + + def send_error(self, command_id: str, error: str): + """发送错误响应""" + self.send_response(IPCResponse( + command_id=command_id, + status=CommandStatus.FAILED, + error=error + )) diff --git a/app/app/services/simulation_manager.py b/app/app/services/simulation_manager.py new file mode 100644 index 0000000000000000000000000000000000000000..172b012ae4d6cec30533fc832714fa852160530e --- /dev/null +++ b/app/app/services/simulation_manager.py @@ -0,0 +1,528 @@ +""" +OASIS模拟管理器 +管理Twitter和Reddit双平台并行模拟 +使用预设脚本 + LLM智能生成配置参数 +""" + +import os +import json +import shutil +from typing import Dict, Any, List, Optional +from dataclasses import dataclass, field +from datetime import datetime +from enum import Enum + +from ..config import Config +from ..utils.logger import get_logger +from .zep_entity_reader import ZepEntityReader, FilteredEntities +from .oasis_profile_generator import OasisProfileGenerator, OasisAgentProfile +from .simulation_config_generator import SimulationConfigGenerator, SimulationParameters + +logger = get_logger('mirofish.simulation') + + +class SimulationStatus(str, Enum): + """模拟状态""" + CREATED = "created" + PREPARING = "preparing" + READY = "ready" + RUNNING = "running" + PAUSED = "paused" + STOPPED = "stopped" # 模拟被手动停止 + COMPLETED = "completed" # 模拟自然完成 + FAILED = "failed" + + +class PlatformType(str, Enum): + """平台类型""" + TWITTER = "twitter" + REDDIT = "reddit" + + +@dataclass +class SimulationState: + """模拟状态""" + simulation_id: str + project_id: str + graph_id: str + + # 平台启用状态 + enable_twitter: bool = True + enable_reddit: bool = True + + # 状态 + status: SimulationStatus = SimulationStatus.CREATED + + # 准备阶段数据 + entities_count: int = 0 + profiles_count: int = 0 + entity_types: List[str] = field(default_factory=list) + + # 配置生成信息 + config_generated: bool = False + config_reasoning: str = "" + + # 运行时数据 + current_round: int = 0 + twitter_status: str = "not_started" + reddit_status: str = "not_started" + + # 时间戳 + created_at: str = field(default_factory=lambda: datetime.now().isoformat()) + updated_at: str = field(default_factory=lambda: datetime.now().isoformat()) + + # 错误信息 + error: Optional[str] = None + + def to_dict(self) -> Dict[str, Any]: + """完整状态字典(内部使用)""" + return { + "simulation_id": self.simulation_id, + "project_id": self.project_id, + "graph_id": self.graph_id, + "enable_twitter": self.enable_twitter, + "enable_reddit": self.enable_reddit, + "status": self.status.value, + "entities_count": self.entities_count, + "profiles_count": self.profiles_count, + "entity_types": self.entity_types, + "config_generated": self.config_generated, + "config_reasoning": self.config_reasoning, + "current_round": self.current_round, + "twitter_status": self.twitter_status, + "reddit_status": self.reddit_status, + "created_at": self.created_at, + "updated_at": self.updated_at, + "error": self.error, + } + + def to_simple_dict(self) -> Dict[str, Any]: + """简化状态字典(API返回使用)""" + return { + "simulation_id": self.simulation_id, + "project_id": self.project_id, + "graph_id": self.graph_id, + "status": self.status.value, + "entities_count": self.entities_count, + "profiles_count": self.profiles_count, + "entity_types": self.entity_types, + "config_generated": self.config_generated, + "error": self.error, + } + + +class SimulationManager: + """ + 模拟管理器 + + 核心功能: + 1. 从Zep图谱读取实体并过滤 + 2. 生成OASIS Agent Profile + 3. 使用LLM智能生成模拟配置参数 + 4. 准备预设脚本所需的所有文件 + """ + + # 模拟数据存储目录 + SIMULATION_DATA_DIR = os.path.join( + os.path.dirname(__file__), + '../../uploads/simulations' + ) + + def __init__(self): + # 确保目录存在 + os.makedirs(self.SIMULATION_DATA_DIR, exist_ok=True) + + # 内存中的模拟状态缓存 + self._simulations: Dict[str, SimulationState] = {} + + def _get_simulation_dir(self, simulation_id: str) -> str: + """获取模拟数据目录""" + sim_dir = os.path.join(self.SIMULATION_DATA_DIR, simulation_id) + os.makedirs(sim_dir, exist_ok=True) + return sim_dir + + def _save_simulation_state(self, state: SimulationState): + """保存模拟状态到文件""" + sim_dir = self._get_simulation_dir(state.simulation_id) + state_file = os.path.join(sim_dir, "state.json") + + state.updated_at = datetime.now().isoformat() + + with open(state_file, 'w', encoding='utf-8') as f: + json.dump(state.to_dict(), f, ensure_ascii=False, indent=2) + + self._simulations[state.simulation_id] = state + + def _load_simulation_state(self, simulation_id: str) -> Optional[SimulationState]: + """从文件加载模拟状态""" + if simulation_id in self._simulations: + return self._simulations[simulation_id] + + sim_dir = self._get_simulation_dir(simulation_id) + state_file = os.path.join(sim_dir, "state.json") + + if not os.path.exists(state_file): + return None + + with open(state_file, 'r', encoding='utf-8') as f: + data = json.load(f) + + state = SimulationState( + simulation_id=simulation_id, + project_id=data.get("project_id", ""), + graph_id=data.get("graph_id", ""), + enable_twitter=data.get("enable_twitter", True), + enable_reddit=data.get("enable_reddit", True), + status=SimulationStatus(data.get("status", "created")), + entities_count=data.get("entities_count", 0), + profiles_count=data.get("profiles_count", 0), + entity_types=data.get("entity_types", []), + config_generated=data.get("config_generated", False), + config_reasoning=data.get("config_reasoning", ""), + current_round=data.get("current_round", 0), + twitter_status=data.get("twitter_status", "not_started"), + reddit_status=data.get("reddit_status", "not_started"), + created_at=data.get("created_at", datetime.now().isoformat()), + updated_at=data.get("updated_at", datetime.now().isoformat()), + error=data.get("error"), + ) + + self._simulations[simulation_id] = state + return state + + def create_simulation( + self, + project_id: str, + graph_id: str, + enable_twitter: bool = True, + enable_reddit: bool = True, + ) -> SimulationState: + """ + 创建新的模拟 + + Args: + project_id: 项目ID + graph_id: Zep图谱ID + enable_twitter: 是否启用Twitter模拟 + enable_reddit: 是否启用Reddit模拟 + + Returns: + SimulationState + """ + import uuid + simulation_id = f"sim_{uuid.uuid4().hex[:12]}" + + state = SimulationState( + simulation_id=simulation_id, + project_id=project_id, + graph_id=graph_id, + enable_twitter=enable_twitter, + enable_reddit=enable_reddit, + status=SimulationStatus.CREATED, + ) + + self._save_simulation_state(state) + logger.info(f"创建模拟: {simulation_id}, project={project_id}, graph={graph_id}") + + return state + + def prepare_simulation( + self, + simulation_id: str, + simulation_requirement: str, + document_text: str, + defined_entity_types: Optional[List[str]] = None, + use_llm_for_profiles: bool = True, + progress_callback: Optional[callable] = None, + parallel_profile_count: int = 3 + ) -> SimulationState: + """ + 准备模拟环境(全程自动化) + + 步骤: + 1. 从Zep图谱读取并过滤实体 + 2. 为每个实体生成OASIS Agent Profile(可选LLM增强,支持并行) + 3. 使用LLM智能生成模拟配置参数(时间、活跃度、发言频率等) + 4. 保存配置文件和Profile文件 + 5. 复制预设脚本到模拟目录 + + Args: + simulation_id: 模拟ID + simulation_requirement: 模拟需求描述(用于LLM生成配置) + document_text: 原始文档内容(用于LLM理解背景) + defined_entity_types: 预定义的实体类型(可选) + use_llm_for_profiles: 是否使用LLM生成详细人设 + progress_callback: 进度回调函数 (stage, progress, message) + parallel_profile_count: 并行生成人设的数量,默认3 + + Returns: + SimulationState + """ + state = self._load_simulation_state(simulation_id) + if not state: + raise ValueError(f"模拟不存在: {simulation_id}") + + try: + state.status = SimulationStatus.PREPARING + self._save_simulation_state(state) + + sim_dir = self._get_simulation_dir(simulation_id) + + # ========== 阶段1: 读取并过滤实体 ========== + if progress_callback: + progress_callback("reading", 0, "正在连接Zep图谱...") + + reader = ZepEntityReader() + + if progress_callback: + progress_callback("reading", 30, "正在读取节点数据...") + + filtered = reader.filter_defined_entities( + graph_id=state.graph_id, + defined_entity_types=defined_entity_types, + enrich_with_edges=True + ) + + state.entities_count = filtered.filtered_count + state.entity_types = list(filtered.entity_types) + + if progress_callback: + progress_callback( + "reading", 100, + f"完成,共 {filtered.filtered_count} 个实体", + current=filtered.filtered_count, + total=filtered.filtered_count + ) + + if filtered.filtered_count == 0: + state.status = SimulationStatus.FAILED + state.error = "没有找到符合条件的实体,请检查图谱是否正确构建" + self._save_simulation_state(state) + return state + + # ========== 阶段2: 生成Agent Profile ========== + total_entities = len(filtered.entities) + + if progress_callback: + progress_callback( + "generating_profiles", 0, + "开始生成...", + current=0, + total=total_entities + ) + + # 传入graph_id以启用Zep检索功能,获取更丰富的上下文 + generator = OasisProfileGenerator(graph_id=state.graph_id) + + def profile_progress(current, total, msg): + if progress_callback: + progress_callback( + "generating_profiles", + int(current / total * 100), + msg, + current=current, + total=total, + item_name=msg + ) + + # 设置实时保存的文件路径(优先使用 Reddit JSON 格式) + realtime_output_path = None + realtime_platform = "reddit" + if state.enable_reddit: + realtime_output_path = os.path.join(sim_dir, "reddit_profiles.json") + realtime_platform = "reddit" + elif state.enable_twitter: + realtime_output_path = os.path.join(sim_dir, "twitter_profiles.csv") + realtime_platform = "twitter" + + profiles = generator.generate_profiles_from_entities( + entities=filtered.entities, + use_llm=use_llm_for_profiles, + progress_callback=profile_progress, + graph_id=state.graph_id, # 传入graph_id用于Zep检索 + parallel_count=parallel_profile_count, # 并行生成数量 + realtime_output_path=realtime_output_path, # 实时保存路径 + output_platform=realtime_platform # 输出格式 + ) + + state.profiles_count = len(profiles) + + # 保存Profile文件(注意:Twitter使用CSV格式,Reddit使用JSON格式) + # Reddit 已经在生成过程中实时保存了,这里再保存一次确保完整性 + if progress_callback: + progress_callback( + "generating_profiles", 95, + "保存Profile文件...", + current=total_entities, + total=total_entities + ) + + if state.enable_reddit: + generator.save_profiles( + profiles=profiles, + file_path=os.path.join(sim_dir, "reddit_profiles.json"), + platform="reddit" + ) + + if state.enable_twitter: + # Twitter使用CSV格式!这是OASIS的要求 + generator.save_profiles( + profiles=profiles, + file_path=os.path.join(sim_dir, "twitter_profiles.csv"), + platform="twitter" + ) + + if progress_callback: + progress_callback( + "generating_profiles", 100, + f"完成,共 {len(profiles)} 个Profile", + current=len(profiles), + total=len(profiles) + ) + + # ========== 阶段3: LLM智能生成模拟配置 ========== + if progress_callback: + progress_callback( + "generating_config", 0, + "正在分析模拟需求...", + current=0, + total=3 + ) + + config_generator = SimulationConfigGenerator() + + if progress_callback: + progress_callback( + "generating_config", 30, + "正在调用LLM生成配置...", + current=1, + total=3 + ) + + sim_params = config_generator.generate_config( + simulation_id=simulation_id, + project_id=state.project_id, + graph_id=state.graph_id, + simulation_requirement=simulation_requirement, + document_text=document_text, + entities=filtered.entities, + enable_twitter=state.enable_twitter, + enable_reddit=state.enable_reddit + ) + + if progress_callback: + progress_callback( + "generating_config", 70, + "正在保存配置文件...", + current=2, + total=3 + ) + + # 保存配置文件 + config_path = os.path.join(sim_dir, "simulation_config.json") + with open(config_path, 'w', encoding='utf-8') as f: + f.write(sim_params.to_json()) + + state.config_generated = True + state.config_reasoning = sim_params.generation_reasoning + + if progress_callback: + progress_callback( + "generating_config", 100, + "配置生成完成", + current=3, + total=3 + ) + + # 注意:运行脚本保留在 backend/scripts/ 目录,不再复制到模拟目录 + # 启动模拟时,simulation_runner 会从 scripts/ 目录运行脚本 + + # 更新状态 + state.status = SimulationStatus.READY + self._save_simulation_state(state) + + logger.info(f"模拟准备完成: {simulation_id}, " + f"entities={state.entities_count}, profiles={state.profiles_count}") + + return state + + except Exception as e: + logger.error(f"模拟准备失败: {simulation_id}, error={str(e)}") + import traceback + logger.error(traceback.format_exc()) + state.status = SimulationStatus.FAILED + state.error = str(e) + self._save_simulation_state(state) + raise + + def get_simulation(self, simulation_id: str) -> Optional[SimulationState]: + """获取模拟状态""" + return self._load_simulation_state(simulation_id) + + def list_simulations(self, project_id: Optional[str] = None) -> List[SimulationState]: + """列出所有模拟""" + simulations = [] + + if os.path.exists(self.SIMULATION_DATA_DIR): + for sim_id in os.listdir(self.SIMULATION_DATA_DIR): + # 跳过隐藏文件(如 .DS_Store)和非目录文件 + sim_path = os.path.join(self.SIMULATION_DATA_DIR, sim_id) + if sim_id.startswith('.') or not os.path.isdir(sim_path): + continue + + state = self._load_simulation_state(sim_id) + if state: + if project_id is None or state.project_id == project_id: + simulations.append(state) + + return simulations + + def get_profiles(self, simulation_id: str, platform: str = "reddit") -> List[Dict[str, Any]]: + """获取模拟的Agent Profile""" + state = self._load_simulation_state(simulation_id) + if not state: + raise ValueError(f"模拟不存在: {simulation_id}") + + sim_dir = self._get_simulation_dir(simulation_id) + profile_path = os.path.join(sim_dir, f"{platform}_profiles.json") + + if not os.path.exists(profile_path): + return [] + + with open(profile_path, 'r', encoding='utf-8') as f: + return json.load(f) + + def get_simulation_config(self, simulation_id: str) -> Optional[Dict[str, Any]]: + """获取模拟配置""" + sim_dir = self._get_simulation_dir(simulation_id) + config_path = os.path.join(sim_dir, "simulation_config.json") + + if not os.path.exists(config_path): + return None + + with open(config_path, 'r', encoding='utf-8') as f: + return json.load(f) + + def get_run_instructions(self, simulation_id: str) -> Dict[str, str]: + """获取运行说明""" + sim_dir = self._get_simulation_dir(simulation_id) + config_path = os.path.join(sim_dir, "simulation_config.json") + scripts_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../scripts')) + + return { + "simulation_dir": sim_dir, + "scripts_dir": scripts_dir, + "config_file": config_path, + "commands": { + "twitter": f"python {scripts_dir}/run_twitter_simulation.py --config {config_path}", + "reddit": f"python {scripts_dir}/run_reddit_simulation.py --config {config_path}", + "parallel": f"python {scripts_dir}/run_parallel_simulation.py --config {config_path}", + }, + "instructions": ( + f"1. 激活conda环境: conda activate MiroFish\n" + f"2. 运行模拟 (脚本位于 {scripts_dir}):\n" + f" - 单独运行Twitter: python {scripts_dir}/run_twitter_simulation.py --config {config_path}\n" + f" - 单独运行Reddit: python {scripts_dir}/run_reddit_simulation.py --config {config_path}\n" + f" - 并行运行双平台: python {scripts_dir}/run_parallel_simulation.py --config {config_path}" + ) + } diff --git a/app/app/services/simulation_runner.py b/app/app/services/simulation_runner.py new file mode 100644 index 0000000000000000000000000000000000000000..e6aaef307beb60a31bb6c86e435d115a167be0cb --- /dev/null +++ b/app/app/services/simulation_runner.py @@ -0,0 +1,1763 @@ +""" +OASIS模拟运行器 +在后台运行模拟并记录每个Agent的动作,支持实时状态监控 +""" + +import os +import sys +import json +import time +import asyncio +import threading +import subprocess +import signal +import atexit +from typing import Dict, Any, List, Optional, Union +from dataclasses import dataclass, field +from datetime import datetime +from enum import Enum +from queue import Queue + +from ..config import Config +from ..utils.logger import get_logger +from .zep_graph_memory_updater import ZepGraphMemoryManager +from .simulation_ipc import SimulationIPCClient, CommandType, IPCResponse + +logger = get_logger('mirofish.simulation_runner') + +# 标记是否已注册清理函数 +_cleanup_registered = False + +# 平台检测 +IS_WINDOWS = sys.platform == 'win32' + + +class RunnerStatus(str, Enum): + """运行器状态""" + IDLE = "idle" + STARTING = "starting" + RUNNING = "running" + PAUSED = "paused" + STOPPING = "stopping" + STOPPED = "stopped" + COMPLETED = "completed" + FAILED = "failed" + + +@dataclass +class AgentAction: + """Agent动作记录""" + round_num: int + timestamp: str + platform: str # twitter / reddit + agent_id: int + agent_name: str + action_type: str # CREATE_POST, LIKE_POST, etc. + action_args: Dict[str, Any] = field(default_factory=dict) + result: Optional[str] = None + success: bool = True + + def to_dict(self) -> Dict[str, Any]: + return { + "round_num": self.round_num, + "timestamp": self.timestamp, + "platform": self.platform, + "agent_id": self.agent_id, + "agent_name": self.agent_name, + "action_type": self.action_type, + "action_args": self.action_args, + "result": self.result, + "success": self.success, + } + + +@dataclass +class RoundSummary: + """每轮摘要""" + round_num: int + start_time: str + end_time: Optional[str] = None + simulated_hour: int = 0 + twitter_actions: int = 0 + reddit_actions: int = 0 + active_agents: List[int] = field(default_factory=list) + actions: List[AgentAction] = field(default_factory=list) + + def to_dict(self) -> Dict[str, Any]: + return { + "round_num": self.round_num, + "start_time": self.start_time, + "end_time": self.end_time, + "simulated_hour": self.simulated_hour, + "twitter_actions": self.twitter_actions, + "reddit_actions": self.reddit_actions, + "active_agents": self.active_agents, + "actions_count": len(self.actions), + "actions": [a.to_dict() for a in self.actions], + } + + +@dataclass +class SimulationRunState: + """模拟运行状态(实时)""" + simulation_id: str + runner_status: RunnerStatus = RunnerStatus.IDLE + + # 进度信息 + current_round: int = 0 + total_rounds: int = 0 + simulated_hours: int = 0 + total_simulation_hours: int = 0 + + # 各平台独立轮次和模拟时间(用于双平台并行显示) + twitter_current_round: int = 0 + reddit_current_round: int = 0 + twitter_simulated_hours: int = 0 + reddit_simulated_hours: int = 0 + + # 平台状态 + twitter_running: bool = False + reddit_running: bool = False + twitter_actions_count: int = 0 + reddit_actions_count: int = 0 + + # 平台完成状态(通过检测 actions.jsonl 中的 simulation_end 事件) + twitter_completed: bool = False + reddit_completed: bool = False + + # 每轮摘要 + rounds: List[RoundSummary] = field(default_factory=list) + + # 最近动作(用于前端实时展示) + recent_actions: List[AgentAction] = field(default_factory=list) + max_recent_actions: int = 50 + + # 时间戳 + started_at: Optional[str] = None + updated_at: str = field(default_factory=lambda: datetime.now().isoformat()) + completed_at: Optional[str] = None + + # 错误信息 + error: Optional[str] = None + + # 进程ID(用于停止) + process_pid: Optional[int] = None + + def add_action(self, action: AgentAction): + """添加动作到最近动作列表""" + self.recent_actions.insert(0, action) + if len(self.recent_actions) > self.max_recent_actions: + self.recent_actions = self.recent_actions[:self.max_recent_actions] + + if action.platform == "twitter": + self.twitter_actions_count += 1 + else: + self.reddit_actions_count += 1 + + self.updated_at = datetime.now().isoformat() + + def to_dict(self) -> Dict[str, Any]: + return { + "simulation_id": self.simulation_id, + "runner_status": self.runner_status.value, + "current_round": self.current_round, + "total_rounds": self.total_rounds, + "simulated_hours": self.simulated_hours, + "total_simulation_hours": self.total_simulation_hours, + "progress_percent": round(self.current_round / max(self.total_rounds, 1) * 100, 1), + # 各平台独立轮次和时间 + "twitter_current_round": self.twitter_current_round, + "reddit_current_round": self.reddit_current_round, + "twitter_simulated_hours": self.twitter_simulated_hours, + "reddit_simulated_hours": self.reddit_simulated_hours, + "twitter_running": self.twitter_running, + "reddit_running": self.reddit_running, + "twitter_completed": self.twitter_completed, + "reddit_completed": self.reddit_completed, + "twitter_actions_count": self.twitter_actions_count, + "reddit_actions_count": self.reddit_actions_count, + "total_actions_count": self.twitter_actions_count + self.reddit_actions_count, + "started_at": self.started_at, + "updated_at": self.updated_at, + "completed_at": self.completed_at, + "error": self.error, + "process_pid": self.process_pid, + } + + def to_detail_dict(self) -> Dict[str, Any]: + """包含最近动作的详细信息""" + result = self.to_dict() + result["recent_actions"] = [a.to_dict() for a in self.recent_actions] + result["rounds_count"] = len(self.rounds) + return result + + +class SimulationRunner: + """ + 模拟运行器 + + 负责: + 1. 在后台进程中运行OASIS模拟 + 2. 解析运行日志,记录每个Agent的动作 + 3. 提供实时状态查询接口 + 4. 支持暂停/停止/恢复操作 + """ + + # 运行状态存储目录 + RUN_STATE_DIR = os.path.join( + os.path.dirname(__file__), + '../../uploads/simulations' + ) + + # 脚本目录 + SCRIPTS_DIR = os.path.join( + os.path.dirname(__file__), + '../../scripts' + ) + + # 内存中的运行状态 + _run_states: Dict[str, SimulationRunState] = {} + _processes: Dict[str, subprocess.Popen] = {} + _action_queues: Dict[str, Queue] = {} + _monitor_threads: Dict[str, threading.Thread] = {} + _stdout_files: Dict[str, Any] = {} # 存储 stdout 文件句柄 + _stderr_files: Dict[str, Any] = {} # 存储 stderr 文件句柄 + + # 图谱记忆更新配置 + _graph_memory_enabled: Dict[str, bool] = {} # simulation_id -> enabled + + @classmethod + def get_run_state(cls, simulation_id: str) -> Optional[SimulationRunState]: + """获取运行状态""" + if simulation_id in cls._run_states: + return cls._run_states[simulation_id] + + # 尝试从文件加载 + state = cls._load_run_state(simulation_id) + if state: + cls._run_states[simulation_id] = state + return state + + @classmethod + def _load_run_state(cls, simulation_id: str) -> Optional[SimulationRunState]: + """从文件加载运行状态""" + state_file = os.path.join(cls.RUN_STATE_DIR, simulation_id, "run_state.json") + if not os.path.exists(state_file): + return None + + try: + with open(state_file, 'r', encoding='utf-8') as f: + data = json.load(f) + + state = SimulationRunState( + simulation_id=simulation_id, + runner_status=RunnerStatus(data.get("runner_status", "idle")), + current_round=data.get("current_round", 0), + total_rounds=data.get("total_rounds", 0), + simulated_hours=data.get("simulated_hours", 0), + total_simulation_hours=data.get("total_simulation_hours", 0), + # 各平台独立轮次和时间 + twitter_current_round=data.get("twitter_current_round", 0), + reddit_current_round=data.get("reddit_current_round", 0), + twitter_simulated_hours=data.get("twitter_simulated_hours", 0), + reddit_simulated_hours=data.get("reddit_simulated_hours", 0), + twitter_running=data.get("twitter_running", False), + reddit_running=data.get("reddit_running", False), + twitter_completed=data.get("twitter_completed", False), + reddit_completed=data.get("reddit_completed", False), + twitter_actions_count=data.get("twitter_actions_count", 0), + reddit_actions_count=data.get("reddit_actions_count", 0), + started_at=data.get("started_at"), + updated_at=data.get("updated_at", datetime.now().isoformat()), + completed_at=data.get("completed_at"), + error=data.get("error"), + process_pid=data.get("process_pid"), + ) + + # 加载最近动作 + actions_data = data.get("recent_actions", []) + for a in actions_data: + state.recent_actions.append(AgentAction( + round_num=a.get("round_num", 0), + timestamp=a.get("timestamp", ""), + platform=a.get("platform", ""), + agent_id=a.get("agent_id", 0), + agent_name=a.get("agent_name", ""), + action_type=a.get("action_type", ""), + action_args=a.get("action_args", {}), + result=a.get("result"), + success=a.get("success", True), + )) + + return state + except Exception as e: + logger.error(f"加载运行状态失败: {str(e)}") + return None + + @classmethod + def _save_run_state(cls, state: SimulationRunState): + """保存运行状态到文件""" + sim_dir = os.path.join(cls.RUN_STATE_DIR, state.simulation_id) + os.makedirs(sim_dir, exist_ok=True) + state_file = os.path.join(sim_dir, "run_state.json") + + data = state.to_detail_dict() + + with open(state_file, 'w', encoding='utf-8') as f: + json.dump(data, f, ensure_ascii=False, indent=2) + + cls._run_states[state.simulation_id] = state + + @classmethod + def start_simulation( + cls, + simulation_id: str, + platform: str = "parallel", # twitter / reddit / parallel + max_rounds: int = None, # 最大模拟轮数(可选,用于截断过长的模拟) + enable_graph_memory_update: bool = False, # 是否将活动更新到Zep图谱 + graph_id: str = None # Zep图谱ID(启用图谱更新时必需) + ) -> SimulationRunState: + """ + 启动模拟 + + Args: + simulation_id: 模拟ID + platform: 运行平台 (twitter/reddit/parallel) + max_rounds: 最大模拟轮数(可选,用于截断过长的模拟) + enable_graph_memory_update: 是否将Agent活动动态更新到Zep图谱 + graph_id: Zep图谱ID(启用图谱更新时必需) + + Returns: + SimulationRunState + """ + # 检查是否已在运行 + existing = cls.get_run_state(simulation_id) + if existing and existing.runner_status in [RunnerStatus.RUNNING, RunnerStatus.STARTING]: + raise ValueError(f"模拟已在运行中: {simulation_id}") + + # 加载模拟配置 + sim_dir = os.path.join(cls.RUN_STATE_DIR, simulation_id) + config_path = os.path.join(sim_dir, "simulation_config.json") + + if not os.path.exists(config_path): + raise ValueError(f"模拟配置不存在,请先调用 /prepare 接口") + + with open(config_path, 'r', encoding='utf-8') as f: + config = json.load(f) + + # 初始化运行状态 + time_config = config.get("time_config", {}) + total_hours = time_config.get("total_simulation_hours", 72) + minutes_per_round = time_config.get("minutes_per_round", 30) + total_rounds = int(total_hours * 60 / minutes_per_round) + + # 如果指定了最大轮数,则截断 + if max_rounds is not None and max_rounds > 0: + original_rounds = total_rounds + total_rounds = min(total_rounds, max_rounds) + if total_rounds < original_rounds: + logger.info(f"轮数已截断: {original_rounds} -> {total_rounds} (max_rounds={max_rounds})") + + state = SimulationRunState( + simulation_id=simulation_id, + runner_status=RunnerStatus.STARTING, + total_rounds=total_rounds, + total_simulation_hours=total_hours, + started_at=datetime.now().isoformat(), + ) + + cls._save_run_state(state) + + # 如果启用图谱记忆更新,创建更新器 + if enable_graph_memory_update: + if not graph_id: + raise ValueError("启用图谱记忆更新时必须提供 graph_id") + + try: + ZepGraphMemoryManager.create_updater(simulation_id, graph_id) + cls._graph_memory_enabled[simulation_id] = True + logger.info(f"已启用图谱记忆更新: simulation_id={simulation_id}, graph_id={graph_id}") + except Exception as e: + logger.error(f"创建图谱记忆更新器失败: {e}") + cls._graph_memory_enabled[simulation_id] = False + else: + cls._graph_memory_enabled[simulation_id] = False + + # 确定运行哪个脚本(脚本位于 backend/scripts/ 目录) + if platform == "twitter": + script_name = "run_twitter_simulation.py" + state.twitter_running = True + elif platform == "reddit": + script_name = "run_reddit_simulation.py" + state.reddit_running = True + else: + script_name = "run_parallel_simulation.py" + state.twitter_running = True + state.reddit_running = True + + script_path = os.path.join(cls.SCRIPTS_DIR, script_name) + + if not os.path.exists(script_path): + raise ValueError(f"脚本不存在: {script_path}") + + # 创建动作队列 + action_queue = Queue() + cls._action_queues[simulation_id] = action_queue + + # 启动模拟进程 + try: + # 构建运行命令,使用完整路径 + # 新的日志结构: + # twitter/actions.jsonl - Twitter 动作日志 + # reddit/actions.jsonl - Reddit 动作日志 + # simulation.log - 主进程日志 + + cmd = [ + sys.executable, # Python解释器 + script_path, + "--config", config_path, # 使用完整配置文件路径 + ] + + # 如果指定了最大轮数,添加到命令行参数 + if max_rounds is not None and max_rounds > 0: + cmd.extend(["--max-rounds", str(max_rounds)]) + + # 创建主日志文件,避免 stdout/stderr 管道缓冲区满导致进程阻塞 + main_log_path = os.path.join(sim_dir, "simulation.log") + main_log_file = open(main_log_path, 'w', encoding='utf-8') + + # 设置子进程环境变量,确保 Windows 上使用 UTF-8 编码 + # 这可以修复第三方库(如 OASIS)读取文件时未指定编码的问题 + env = os.environ.copy() + env['PYTHONUTF8'] = '1' # Python 3.7+ 支持,让所有 open() 默认使用 UTF-8 + env['PYTHONIOENCODING'] = 'utf-8' # 确保 stdout/stderr 使用 UTF-8 + + # 设置工作目录为模拟目录(数据库等文件会生成在此) + # 使用 start_new_session=True 创建新的进程组,确保可以通过 os.killpg 终止所有子进程 + process = subprocess.Popen( + cmd, + cwd=sim_dir, + stdout=main_log_file, + stderr=subprocess.STDOUT, # stderr 也写入同一个文件 + text=True, + encoding='utf-8', # 显式指定编码 + bufsize=1, + env=env, # 传递带有 UTF-8 设置的环境变量 + start_new_session=True, # 创建新进程组,确保服务器关闭时能终止所有相关进程 + ) + + # 保存文件句柄以便后续关闭 + cls._stdout_files[simulation_id] = main_log_file + cls._stderr_files[simulation_id] = None # 不再需要单独的 stderr + + state.process_pid = process.pid + state.runner_status = RunnerStatus.RUNNING + cls._processes[simulation_id] = process + cls._save_run_state(state) + + # 启动监控线程 + monitor_thread = threading.Thread( + target=cls._monitor_simulation, + args=(simulation_id,), + daemon=True + ) + monitor_thread.start() + cls._monitor_threads[simulation_id] = monitor_thread + + logger.info(f"模拟启动成功: {simulation_id}, pid={process.pid}, platform={platform}") + + except Exception as e: + state.runner_status = RunnerStatus.FAILED + state.error = str(e) + cls._save_run_state(state) + raise + + return state + + @classmethod + def _monitor_simulation(cls, simulation_id: str): + """监控模拟进程,解析动作日志""" + sim_dir = os.path.join(cls.RUN_STATE_DIR, simulation_id) + + # 新的日志结构:分平台的动作日志 + twitter_actions_log = os.path.join(sim_dir, "twitter", "actions.jsonl") + reddit_actions_log = os.path.join(sim_dir, "reddit", "actions.jsonl") + + process = cls._processes.get(simulation_id) + state = cls.get_run_state(simulation_id) + + if not process or not state: + return + + twitter_position = 0 + reddit_position = 0 + + try: + while process.poll() is None: # 进程仍在运行 + # 读取 Twitter 动作日志 + if os.path.exists(twitter_actions_log): + twitter_position = cls._read_action_log( + twitter_actions_log, twitter_position, state, "twitter" + ) + + # 读取 Reddit 动作日志 + if os.path.exists(reddit_actions_log): + reddit_position = cls._read_action_log( + reddit_actions_log, reddit_position, state, "reddit" + ) + + # 更新状态 + cls._save_run_state(state) + time.sleep(2) + + # 进程结束后,最后读取一次日志 + if os.path.exists(twitter_actions_log): + cls._read_action_log(twitter_actions_log, twitter_position, state, "twitter") + if os.path.exists(reddit_actions_log): + cls._read_action_log(reddit_actions_log, reddit_position, state, "reddit") + + # 进程结束 + exit_code = process.returncode + + if exit_code == 0: + state.runner_status = RunnerStatus.COMPLETED + state.completed_at = datetime.now().isoformat() + logger.info(f"模拟完成: {simulation_id}") + else: + state.runner_status = RunnerStatus.FAILED + # 从主日志文件读取错误信息 + main_log_path = os.path.join(sim_dir, "simulation.log") + error_info = "" + try: + if os.path.exists(main_log_path): + with open(main_log_path, 'r', encoding='utf-8') as f: + error_info = f.read()[-2000:] # 取最后2000字符 + except Exception: + pass + state.error = f"进程退出码: {exit_code}, 错误: {error_info}" + logger.error(f"模拟失败: {simulation_id}, error={state.error}") + + state.twitter_running = False + state.reddit_running = False + cls._save_run_state(state) + + except Exception as e: + logger.error(f"监控线程异常: {simulation_id}, error={str(e)}") + state.runner_status = RunnerStatus.FAILED + state.error = str(e) + cls._save_run_state(state) + + finally: + # 停止图谱记忆更新器 + if cls._graph_memory_enabled.get(simulation_id, False): + try: + ZepGraphMemoryManager.stop_updater(simulation_id) + logger.info(f"已停止图谱记忆更新: simulation_id={simulation_id}") + except Exception as e: + logger.error(f"停止图谱记忆更新器失败: {e}") + cls._graph_memory_enabled.pop(simulation_id, None) + + # 清理进程资源 + cls._processes.pop(simulation_id, None) + cls._action_queues.pop(simulation_id, None) + + # 关闭日志文件句柄 + if simulation_id in cls._stdout_files: + try: + cls._stdout_files[simulation_id].close() + except Exception: + pass + cls._stdout_files.pop(simulation_id, None) + if simulation_id in cls._stderr_files and cls._stderr_files[simulation_id]: + try: + cls._stderr_files[simulation_id].close() + except Exception: + pass + cls._stderr_files.pop(simulation_id, None) + + @classmethod + def _read_action_log( + cls, + log_path: str, + position: int, + state: SimulationRunState, + platform: str + ) -> int: + """ + 读取动作日志文件 + + Args: + log_path: 日志文件路径 + position: 上次读取位置 + state: 运行状态对象 + platform: 平台名称 (twitter/reddit) + + Returns: + 新的读取位置 + """ + # 检查是否启用了图谱记忆更新 + graph_memory_enabled = cls._graph_memory_enabled.get(state.simulation_id, False) + graph_updater = None + if graph_memory_enabled: + graph_updater = ZepGraphMemoryManager.get_updater(state.simulation_id) + + try: + with open(log_path, 'r', encoding='utf-8') as f: + f.seek(position) + for line in f: + line = line.strip() + if line: + try: + action_data = json.loads(line) + + # 处理事件类型的条目 + if "event_type" in action_data: + event_type = action_data.get("event_type") + + # 检测 simulation_end 事件,标记平台已完成 + if event_type == "simulation_end": + if platform == "twitter": + state.twitter_completed = True + state.twitter_running = False + logger.info(f"Twitter 模拟已完成: {state.simulation_id}, total_rounds={action_data.get('total_rounds')}, total_actions={action_data.get('total_actions')}") + elif platform == "reddit": + state.reddit_completed = True + state.reddit_running = False + logger.info(f"Reddit 模拟已完成: {state.simulation_id}, total_rounds={action_data.get('total_rounds')}, total_actions={action_data.get('total_actions')}") + + # 检查是否所有启用的平台都已完成 + # 如果只运行了一个平台,只检查那个平台 + # 如果运行了两个平台,需要两个都完成 + all_completed = cls._check_all_platforms_completed(state) + if all_completed: + state.runner_status = RunnerStatus.COMPLETED + state.completed_at = datetime.now().isoformat() + logger.info(f"所有平台模拟已完成: {state.simulation_id}") + + # 更新轮次信息(从 round_end 事件) + elif event_type == "round_end": + round_num = action_data.get("round", 0) + simulated_hours = action_data.get("simulated_hours", 0) + + # 更新各平台独立的轮次和时间 + if platform == "twitter": + if round_num > state.twitter_current_round: + state.twitter_current_round = round_num + state.twitter_simulated_hours = simulated_hours + elif platform == "reddit": + if round_num > state.reddit_current_round: + state.reddit_current_round = round_num + state.reddit_simulated_hours = simulated_hours + + # 总体轮次取两个平台的最大值 + if round_num > state.current_round: + state.current_round = round_num + # 总体时间取两个平台的最大值 + state.simulated_hours = max(state.twitter_simulated_hours, state.reddit_simulated_hours) + + continue + + action = AgentAction( + round_num=action_data.get("round", 0), + timestamp=action_data.get("timestamp", datetime.now().isoformat()), + platform=platform, + agent_id=action_data.get("agent_id", 0), + agent_name=action_data.get("agent_name", ""), + action_type=action_data.get("action_type", ""), + action_args=action_data.get("action_args", {}), + result=action_data.get("result"), + success=action_data.get("success", True), + ) + state.add_action(action) + + # 更新轮次 + if action.round_num and action.round_num > state.current_round: + state.current_round = action.round_num + + # 如果启用了图谱记忆更新,将活动发送到Zep + if graph_updater: + graph_updater.add_activity_from_dict(action_data, platform) + + except json.JSONDecodeError: + pass + return f.tell() + except Exception as e: + logger.warning(f"读取动作日志失败: {log_path}, error={e}") + return position + + @classmethod + def _check_all_platforms_completed(cls, state: SimulationRunState) -> bool: + """ + 检查所有启用的平台是否都已完成模拟 + + 通过检查对应的 actions.jsonl 文件是否存在来判断平台是否被启用 + + Returns: + True 如果所有启用的平台都已完成 + """ + sim_dir = os.path.join(cls.RUN_STATE_DIR, state.simulation_id) + twitter_log = os.path.join(sim_dir, "twitter", "actions.jsonl") + reddit_log = os.path.join(sim_dir, "reddit", "actions.jsonl") + + # 检查哪些平台被启用(通过文件是否存在判断) + twitter_enabled = os.path.exists(twitter_log) + reddit_enabled = os.path.exists(reddit_log) + + # 如果平台被启用但未完成,则返回 False + if twitter_enabled and not state.twitter_completed: + return False + if reddit_enabled and not state.reddit_completed: + return False + + # 至少有一个平台被启用且已完成 + return twitter_enabled or reddit_enabled + + @classmethod + def _terminate_process(cls, process: subprocess.Popen, simulation_id: str, timeout: int = 10): + """ + 跨平台终止进程及其子进程 + + Args: + process: 要终止的进程 + simulation_id: 模拟ID(用于日志) + timeout: 等待进程退出的超时时间(秒) + """ + if IS_WINDOWS: + # Windows: 使用 taskkill 命令终止进程树 + # /F = 强制终止, /T = 终止进程树(包括子进程) + logger.info(f"终止进程树 (Windows): simulation={simulation_id}, pid={process.pid}") + try: + # 先尝试优雅终止 + subprocess.run( + ['taskkill', '/PID', str(process.pid), '/T'], + capture_output=True, + timeout=5 + ) + try: + process.wait(timeout=timeout) + except subprocess.TimeoutExpired: + # 强制终止 + logger.warning(f"进程未响应,强制终止: {simulation_id}") + subprocess.run( + ['taskkill', '/F', '/PID', str(process.pid), '/T'], + capture_output=True, + timeout=5 + ) + process.wait(timeout=5) + except Exception as e: + logger.warning(f"taskkill 失败,尝试 terminate: {e}") + process.terminate() + try: + process.wait(timeout=5) + except subprocess.TimeoutExpired: + process.kill() + else: + # Unix: 使用进程组终止 + # 由于使用了 start_new_session=True,进程组 ID 等于主进程 PID + pgid = os.getpgid(process.pid) + logger.info(f"终止进程组 (Unix): simulation={simulation_id}, pgid={pgid}") + + # 先发送 SIGTERM 给整个进程组 + os.killpg(pgid, signal.SIGTERM) + + try: + process.wait(timeout=timeout) + except subprocess.TimeoutExpired: + # 如果超时后还没结束,强制发送 SIGKILL + logger.warning(f"进程组未响应 SIGTERM,强制终止: {simulation_id}") + os.killpg(pgid, signal.SIGKILL) + process.wait(timeout=5) + + @classmethod + def stop_simulation(cls, simulation_id: str) -> SimulationRunState: + """停止模拟""" + state = cls.get_run_state(simulation_id) + if not state: + raise ValueError(f"模拟不存在: {simulation_id}") + + if state.runner_status not in [RunnerStatus.RUNNING, RunnerStatus.PAUSED]: + raise ValueError(f"模拟未在运行: {simulation_id}, status={state.runner_status}") + + state.runner_status = RunnerStatus.STOPPING + cls._save_run_state(state) + + # 终止进程 + process = cls._processes.get(simulation_id) + if process and process.poll() is None: + try: + cls._terminate_process(process, simulation_id) + except ProcessLookupError: + # 进程已经不存在 + pass + except Exception as e: + logger.error(f"终止进程组失败: {simulation_id}, error={e}") + # 回退到直接终止进程 + try: + process.terminate() + process.wait(timeout=5) + except Exception: + process.kill() + + state.runner_status = RunnerStatus.STOPPED + state.twitter_running = False + state.reddit_running = False + state.completed_at = datetime.now().isoformat() + cls._save_run_state(state) + + # 停止图谱记忆更新器 + if cls._graph_memory_enabled.get(simulation_id, False): + try: + ZepGraphMemoryManager.stop_updater(simulation_id) + logger.info(f"已停止图谱记忆更新: simulation_id={simulation_id}") + except Exception as e: + logger.error(f"停止图谱记忆更新器失败: {e}") + cls._graph_memory_enabled.pop(simulation_id, None) + + logger.info(f"模拟已停止: {simulation_id}") + return state + + @classmethod + def _read_actions_from_file( + cls, + file_path: str, + default_platform: Optional[str] = None, + platform_filter: Optional[str] = None, + agent_id: Optional[int] = None, + round_num: Optional[int] = None + ) -> List[AgentAction]: + """ + 从单个动作文件中读取动作 + + Args: + file_path: 动作日志文件路径 + default_platform: 默认平台(当动作记录中没有 platform 字段时使用) + platform_filter: 过滤平台 + agent_id: 过滤 Agent ID + round_num: 过滤轮次 + """ + if not os.path.exists(file_path): + return [] + + actions = [] + + with open(file_path, 'r', encoding='utf-8') as f: + for line in f: + line = line.strip() + if not line: + continue + + try: + data = json.loads(line) + + # 跳过非动作记录(如 simulation_start, round_start, round_end 等事件) + if "event_type" in data: + continue + + # 跳过没有 agent_id 的记录(非 Agent 动作) + if "agent_id" not in data: + continue + + # 获取平台:优先使用记录中的 platform,否则使用默认平台 + record_platform = data.get("platform") or default_platform or "" + + # 过滤 + if platform_filter and record_platform != platform_filter: + continue + if agent_id is not None and data.get("agent_id") != agent_id: + continue + if round_num is not None and data.get("round") != round_num: + continue + + actions.append(AgentAction( + round_num=data.get("round", 0), + timestamp=data.get("timestamp", ""), + platform=record_platform, + agent_id=data.get("agent_id", 0), + agent_name=data.get("agent_name", ""), + action_type=data.get("action_type", ""), + action_args=data.get("action_args", {}), + result=data.get("result"), + success=data.get("success", True), + )) + + except json.JSONDecodeError: + continue + + return actions + + @classmethod + def get_all_actions( + cls, + simulation_id: str, + platform: Optional[str] = None, + agent_id: Optional[int] = None, + round_num: Optional[int] = None + ) -> List[AgentAction]: + """ + 获取所有平台的完整动作历史(无分页限制) + + Args: + simulation_id: 模拟ID + platform: 过滤平台(twitter/reddit) + agent_id: 过滤Agent + round_num: 过滤轮次 + + Returns: + 完整的动作列表(按时间戳排序,新的在前) + """ + sim_dir = os.path.join(cls.RUN_STATE_DIR, simulation_id) + actions = [] + + # 读取 Twitter 动作文件(根据文件路径自动设置 platform 为 twitter) + twitter_actions_log = os.path.join(sim_dir, "twitter", "actions.jsonl") + if not platform or platform == "twitter": + actions.extend(cls._read_actions_from_file( + twitter_actions_log, + default_platform="twitter", # 自动填充 platform 字段 + platform_filter=platform, + agent_id=agent_id, + round_num=round_num + )) + + # 读取 Reddit 动作文件(根据文件路径自动设置 platform 为 reddit) + reddit_actions_log = os.path.join(sim_dir, "reddit", "actions.jsonl") + if not platform or platform == "reddit": + actions.extend(cls._read_actions_from_file( + reddit_actions_log, + default_platform="reddit", # 自动填充 platform 字段 + platform_filter=platform, + agent_id=agent_id, + round_num=round_num + )) + + # 如果分平台文件不存在,尝试读取旧的单一文件格式 + if not actions: + actions_log = os.path.join(sim_dir, "actions.jsonl") + actions = cls._read_actions_from_file( + actions_log, + default_platform=None, # 旧格式文件中应该有 platform 字段 + platform_filter=platform, + agent_id=agent_id, + round_num=round_num + ) + + # 按时间戳排序(新的在前) + actions.sort(key=lambda x: x.timestamp, reverse=True) + + return actions + + @classmethod + def get_actions( + cls, + simulation_id: str, + limit: int = 100, + offset: int = 0, + platform: Optional[str] = None, + agent_id: Optional[int] = None, + round_num: Optional[int] = None + ) -> List[AgentAction]: + """ + 获取动作历史(带分页) + + Args: + simulation_id: 模拟ID + limit: 返回数量限制 + offset: 偏移量 + platform: 过滤平台 + agent_id: 过滤Agent + round_num: 过滤轮次 + + Returns: + 动作列表 + """ + actions = cls.get_all_actions( + simulation_id=simulation_id, + platform=platform, + agent_id=agent_id, + round_num=round_num + ) + + # 分页 + return actions[offset:offset + limit] + + @classmethod + def get_timeline( + cls, + simulation_id: str, + start_round: int = 0, + end_round: Optional[int] = None + ) -> List[Dict[str, Any]]: + """ + 获取模拟时间线(按轮次汇总) + + Args: + simulation_id: 模拟ID + start_round: 起始轮次 + end_round: 结束轮次 + + Returns: + 每轮的汇总信息 + """ + actions = cls.get_actions(simulation_id, limit=10000) + + # 按轮次分组 + rounds: Dict[int, Dict[str, Any]] = {} + + for action in actions: + round_num = action.round_num + + if round_num < start_round: + continue + if end_round is not None and round_num > end_round: + continue + + if round_num not in rounds: + rounds[round_num] = { + "round_num": round_num, + "twitter_actions": 0, + "reddit_actions": 0, + "active_agents": set(), + "action_types": {}, + "first_action_time": action.timestamp, + "last_action_time": action.timestamp, + } + + r = rounds[round_num] + + if action.platform == "twitter": + r["twitter_actions"] += 1 + else: + r["reddit_actions"] += 1 + + r["active_agents"].add(action.agent_id) + r["action_types"][action.action_type] = r["action_types"].get(action.action_type, 0) + 1 + r["last_action_time"] = action.timestamp + + # 转换为列表 + result = [] + for round_num in sorted(rounds.keys()): + r = rounds[round_num] + result.append({ + "round_num": round_num, + "twitter_actions": r["twitter_actions"], + "reddit_actions": r["reddit_actions"], + "total_actions": r["twitter_actions"] + r["reddit_actions"], + "active_agents_count": len(r["active_agents"]), + "active_agents": list(r["active_agents"]), + "action_types": r["action_types"], + "first_action_time": r["first_action_time"], + "last_action_time": r["last_action_time"], + }) + + return result + + @classmethod + def get_agent_stats(cls, simulation_id: str) -> List[Dict[str, Any]]: + """ + 获取每个Agent的统计信息 + + Returns: + Agent统计列表 + """ + actions = cls.get_actions(simulation_id, limit=10000) + + agent_stats: Dict[int, Dict[str, Any]] = {} + + for action in actions: + agent_id = action.agent_id + + if agent_id not in agent_stats: + agent_stats[agent_id] = { + "agent_id": agent_id, + "agent_name": action.agent_name, + "total_actions": 0, + "twitter_actions": 0, + "reddit_actions": 0, + "action_types": {}, + "first_action_time": action.timestamp, + "last_action_time": action.timestamp, + } + + stats = agent_stats[agent_id] + stats["total_actions"] += 1 + + if action.platform == "twitter": + stats["twitter_actions"] += 1 + else: + stats["reddit_actions"] += 1 + + stats["action_types"][action.action_type] = stats["action_types"].get(action.action_type, 0) + 1 + stats["last_action_time"] = action.timestamp + + # 按总动作数排序 + result = sorted(agent_stats.values(), key=lambda x: x["total_actions"], reverse=True) + + return result + + @classmethod + def cleanup_simulation_logs(cls, simulation_id: str) -> Dict[str, Any]: + """ + 清理模拟的运行日志(用于强制重新开始模拟) + + 会删除以下文件: + - run_state.json + - twitter/actions.jsonl + - reddit/actions.jsonl + - simulation.log + - stdout.log / stderr.log + - twitter_simulation.db(模拟数据库) + - reddit_simulation.db(模拟数据库) + - env_status.json(环境状态) + + 注意:不会删除配置文件(simulation_config.json)和 profile 文件 + + Args: + simulation_id: 模拟ID + + Returns: + 清理结果信息 + """ + import shutil + + sim_dir = os.path.join(cls.RUN_STATE_DIR, simulation_id) + + if not os.path.exists(sim_dir): + return {"success": True, "message": "模拟目录不存在,无需清理"} + + cleaned_files = [] + errors = [] + + # 要删除的文件列表(包括数据库文件) + files_to_delete = [ + "run_state.json", + "simulation.log", + "stdout.log", + "stderr.log", + "twitter_simulation.db", # Twitter 平台数据库 + "reddit_simulation.db", # Reddit 平台数据库 + "env_status.json", # 环境状态文件 + ] + + # 要删除的目录列表(包含动作日志) + dirs_to_clean = ["twitter", "reddit"] + + # 删除文件 + for filename in files_to_delete: + file_path = os.path.join(sim_dir, filename) + if os.path.exists(file_path): + try: + os.remove(file_path) + cleaned_files.append(filename) + except Exception as e: + errors.append(f"删除 {filename} 失败: {str(e)}") + + # 清理平台目录中的动作日志 + for dir_name in dirs_to_clean: + dir_path = os.path.join(sim_dir, dir_name) + if os.path.exists(dir_path): + actions_file = os.path.join(dir_path, "actions.jsonl") + if os.path.exists(actions_file): + try: + os.remove(actions_file) + cleaned_files.append(f"{dir_name}/actions.jsonl") + except Exception as e: + errors.append(f"删除 {dir_name}/actions.jsonl 失败: {str(e)}") + + # 清理内存中的运行状态 + if simulation_id in cls._run_states: + del cls._run_states[simulation_id] + + logger.info(f"清理模拟日志完成: {simulation_id}, 删除文件: {cleaned_files}") + + return { + "success": len(errors) == 0, + "cleaned_files": cleaned_files, + "errors": errors if errors else None + } + + # 防止重复清理的标志 + _cleanup_done = False + + @classmethod + def cleanup_all_simulations(cls): + """ + 清理所有运行中的模拟进程 + + 在服务器关闭时调用,确保所有子进程被终止 + """ + # 防止重复清理 + if cls._cleanup_done: + return + cls._cleanup_done = True + + # 检查是否有内容需要清理(避免空进程的进程打印无用日志) + has_processes = bool(cls._processes) + has_updaters = bool(cls._graph_memory_enabled) + + if not has_processes and not has_updaters: + return # 没有需要清理的内容,静默返回 + + logger.info("正在清理所有模拟进程...") + + # 首先停止所有图谱记忆更新器(stop_all 内部会打印日志) + try: + ZepGraphMemoryManager.stop_all() + except Exception as e: + logger.error(f"停止图谱记忆更新器失败: {e}") + cls._graph_memory_enabled.clear() + + # 复制字典以避免在迭代时修改 + processes = list(cls._processes.items()) + + for simulation_id, process in processes: + try: + if process.poll() is None: # 进程仍在运行 + logger.info(f"终止模拟进程: {simulation_id}, pid={process.pid}") + + try: + # 使用跨平台的进程终止方法 + cls._terminate_process(process, simulation_id, timeout=5) + except (ProcessLookupError, OSError): + # 进程可能已经不存在,尝试直接终止 + try: + process.terminate() + process.wait(timeout=3) + except Exception: + process.kill() + + # 更新 run_state.json + state = cls.get_run_state(simulation_id) + if state: + state.runner_status = RunnerStatus.STOPPED + state.twitter_running = False + state.reddit_running = False + state.completed_at = datetime.now().isoformat() + state.error = "服务器关闭,模拟被终止" + cls._save_run_state(state) + + # 同时更新 state.json,将状态设为 stopped + try: + sim_dir = os.path.join(cls.RUN_STATE_DIR, simulation_id) + state_file = os.path.join(sim_dir, "state.json") + logger.info(f"尝试更新 state.json: {state_file}") + if os.path.exists(state_file): + with open(state_file, 'r', encoding='utf-8') as f: + state_data = json.load(f) + state_data['status'] = 'stopped' + state_data['updated_at'] = datetime.now().isoformat() + with open(state_file, 'w', encoding='utf-8') as f: + json.dump(state_data, f, indent=2, ensure_ascii=False) + logger.info(f"已更新 state.json 状态为 stopped: {simulation_id}") + else: + logger.warning(f"state.json 不存在: {state_file}") + except Exception as state_err: + logger.warning(f"更新 state.json 失败: {simulation_id}, error={state_err}") + + except Exception as e: + logger.error(f"清理进程失败: {simulation_id}, error={e}") + + # 清理文件句柄 + for simulation_id, file_handle in list(cls._stdout_files.items()): + try: + if file_handle: + file_handle.close() + except Exception: + pass + cls._stdout_files.clear() + + for simulation_id, file_handle in list(cls._stderr_files.items()): + try: + if file_handle: + file_handle.close() + except Exception: + pass + cls._stderr_files.clear() + + # 清理内存中的状态 + cls._processes.clear() + cls._action_queues.clear() + + logger.info("模拟进程清理完成") + + @classmethod + def register_cleanup(cls): + """ + 注册清理函数 + + 在 Flask 应用启动时调用,确保服务器关闭时清理所有模拟进程 + """ + global _cleanup_registered + + if _cleanup_registered: + return + + # Flask debug 模式下,只在 reloader 子进程中注册清理(实际运行应用的进程) + # WERKZEUG_RUN_MAIN=true 表示是 reloader 子进程 + # 如果不是 debug 模式,则没有这个环境变量,也需要注册 + is_reloader_process = os.environ.get('WERKZEUG_RUN_MAIN') == 'true' + is_debug_mode = os.environ.get('FLASK_DEBUG') == '1' or os.environ.get('WERKZEUG_RUN_MAIN') is not None + + # 在 debug 模式下,只在 reloader 子进程中注册;非 debug 模式下始终注册 + if is_debug_mode and not is_reloader_process: + _cleanup_registered = True # 标记已注册,防止子进程再次尝试 + return + + # 保存原有的信号处理器 + original_sigint = signal.getsignal(signal.SIGINT) + original_sigterm = signal.getsignal(signal.SIGTERM) + # SIGHUP 只在 Unix 系统存在(macOS/Linux),Windows 没有 + original_sighup = None + has_sighup = hasattr(signal, 'SIGHUP') + if has_sighup: + original_sighup = signal.getsignal(signal.SIGHUP) + + def cleanup_handler(signum=None, frame=None): + """信号处理器:先清理模拟进程,再调用原处理器""" + # 只有在有进程需要清理时才打印日志 + if cls._processes or cls._graph_memory_enabled: + logger.info(f"收到信号 {signum},开始清理...") + cls.cleanup_all_simulations() + + # 调用原有的信号处理器,让 Flask 正常退出 + if signum == signal.SIGINT and callable(original_sigint): + original_sigint(signum, frame) + elif signum == signal.SIGTERM and callable(original_sigterm): + original_sigterm(signum, frame) + elif has_sighup and signum == signal.SIGHUP: + # SIGHUP: 终端关闭时发送 + if callable(original_sighup): + original_sighup(signum, frame) + else: + # 默认行为:正常退出 + sys.exit(0) + else: + # 如果原处理器不可调用(如 SIG_DFL),则使用默认行为 + raise KeyboardInterrupt + + # 注册 atexit 处理器(作为备用) + atexit.register(cls.cleanup_all_simulations) + + # 注册信号处理器(仅在主线程中) + try: + # SIGTERM: kill 命令默认信号 + signal.signal(signal.SIGTERM, cleanup_handler) + # SIGINT: Ctrl+C + signal.signal(signal.SIGINT, cleanup_handler) + # SIGHUP: 终端关闭(仅 Unix 系统) + if has_sighup: + signal.signal(signal.SIGHUP, cleanup_handler) + except ValueError: + # 不在主线程中,只能使用 atexit + logger.warning("无法注册信号处理器(不在主线程),仅使用 atexit") + + _cleanup_registered = True + + @classmethod + def get_running_simulations(cls) -> List[str]: + """ + 获取所有正在运行的模拟ID列表 + """ + running = [] + for sim_id, process in cls._processes.items(): + if process.poll() is None: + running.append(sim_id) + return running + + # ============== Interview 功能 ============== + + @classmethod + def check_env_alive(cls, simulation_id: str) -> bool: + """ + 检查模拟环境是否存活(可以接收Interview命令) + + Args: + simulation_id: 模拟ID + + Returns: + True 表示环境存活,False 表示环境已关闭 + """ + sim_dir = os.path.join(cls.RUN_STATE_DIR, simulation_id) + if not os.path.exists(sim_dir): + return False + + ipc_client = SimulationIPCClient(sim_dir) + return ipc_client.check_env_alive() + + @classmethod + def get_env_status_detail(cls, simulation_id: str) -> Dict[str, Any]: + """ + 获取模拟环境的详细状态信息 + + Args: + simulation_id: 模拟ID + + Returns: + 状态详情字典,包含 status, twitter_available, reddit_available, timestamp + """ + sim_dir = os.path.join(cls.RUN_STATE_DIR, simulation_id) + status_file = os.path.join(sim_dir, "env_status.json") + + default_status = { + "status": "stopped", + "twitter_available": False, + "reddit_available": False, + "timestamp": None + } + + if not os.path.exists(status_file): + return default_status + + try: + with open(status_file, 'r', encoding='utf-8') as f: + status = json.load(f) + return { + "status": status.get("status", "stopped"), + "twitter_available": status.get("twitter_available", False), + "reddit_available": status.get("reddit_available", False), + "timestamp": status.get("timestamp") + } + except (json.JSONDecodeError, OSError): + return default_status + + @classmethod + def interview_agent( + cls, + simulation_id: str, + agent_id: int, + prompt: str, + platform: str = None, + timeout: float = 60.0 + ) -> Dict[str, Any]: + """ + 采访单个Agent + + Args: + simulation_id: 模拟ID + agent_id: Agent ID + prompt: 采访问题 + platform: 指定平台(可选) + - "twitter": 只采访Twitter平台 + - "reddit": 只采访Reddit平台 + - None: 双平台模拟时同时采访两个平台,返回整合结果 + timeout: 超时时间(秒) + + Returns: + 采访结果字典 + + Raises: + ValueError: 模拟不存在或环境未运行 + TimeoutError: 等待响应超时 + """ + sim_dir = os.path.join(cls.RUN_STATE_DIR, simulation_id) + if not os.path.exists(sim_dir): + raise ValueError(f"模拟不存在: {simulation_id}") + + ipc_client = SimulationIPCClient(sim_dir) + + if not ipc_client.check_env_alive(): + raise ValueError(f"模拟环境未运行或已关闭,无法执行Interview: {simulation_id}") + + logger.info(f"发送Interview命令: simulation_id={simulation_id}, agent_id={agent_id}, platform={platform}") + + response = ipc_client.send_interview( + agent_id=agent_id, + prompt=prompt, + platform=platform, + timeout=timeout + ) + + if response.status.value == "completed": + return { + "success": True, + "agent_id": agent_id, + "prompt": prompt, + "result": response.result, + "timestamp": response.timestamp + } + else: + return { + "success": False, + "agent_id": agent_id, + "prompt": prompt, + "error": response.error, + "timestamp": response.timestamp + } + + @classmethod + def interview_agents_batch( + cls, + simulation_id: str, + interviews: List[Dict[str, Any]], + platform: str = None, + timeout: float = 120.0 + ) -> Dict[str, Any]: + """ + 批量采访多个Agent + + Args: + simulation_id: 模拟ID + interviews: 采访列表,每个元素包含 {"agent_id": int, "prompt": str, "platform": str(可选)} + platform: 默认平台(可选,会被每个采访项的platform覆盖) + - "twitter": 默认只采访Twitter平台 + - "reddit": 默认只采访Reddit平台 + - None: 双平台模拟时每个Agent同时采访两个平台 + timeout: 超时时间(秒) + + Returns: + 批量采访结果字典 + + Raises: + ValueError: 模拟不存在或环境未运行 + TimeoutError: 等待响应超时 + """ + sim_dir = os.path.join(cls.RUN_STATE_DIR, simulation_id) + if not os.path.exists(sim_dir): + raise ValueError(f"模拟不存在: {simulation_id}") + + ipc_client = SimulationIPCClient(sim_dir) + + if not ipc_client.check_env_alive(): + raise ValueError(f"模拟环境未运行或已关闭,无法执行Interview: {simulation_id}") + + logger.info(f"发送批量Interview命令: simulation_id={simulation_id}, count={len(interviews)}, platform={platform}") + + response = ipc_client.send_batch_interview( + interviews=interviews, + platform=platform, + timeout=timeout + ) + + if response.status.value == "completed": + return { + "success": True, + "interviews_count": len(interviews), + "result": response.result, + "timestamp": response.timestamp + } + else: + return { + "success": False, + "interviews_count": len(interviews), + "error": response.error, + "timestamp": response.timestamp + } + + @classmethod + def interview_all_agents( + cls, + simulation_id: str, + prompt: str, + platform: str = None, + timeout: float = 180.0 + ) -> Dict[str, Any]: + """ + 采访所有Agent(全局采访) + + 使用相同的问题采访模拟中的所有Agent + + Args: + simulation_id: 模拟ID + prompt: 采访问题(所有Agent使用相同问题) + platform: 指定平台(可选) + - "twitter": 只采访Twitter平台 + - "reddit": 只采访Reddit平台 + - None: 双平台模拟时每个Agent同时采访两个平台 + timeout: 超时时间(秒) + + Returns: + 全局采访结果字典 + """ + sim_dir = os.path.join(cls.RUN_STATE_DIR, simulation_id) + if not os.path.exists(sim_dir): + raise ValueError(f"模拟不存在: {simulation_id}") + + # 从配置文件获取所有Agent信息 + config_path = os.path.join(sim_dir, "simulation_config.json") + if not os.path.exists(config_path): + raise ValueError(f"模拟配置不存在: {simulation_id}") + + with open(config_path, 'r', encoding='utf-8') as f: + config = json.load(f) + + agent_configs = config.get("agent_configs", []) + if not agent_configs: + raise ValueError(f"模拟配置中没有Agent: {simulation_id}") + + # 构建批量采访列表 + interviews = [] + for agent_config in agent_configs: + agent_id = agent_config.get("agent_id") + if agent_id is not None: + interviews.append({ + "agent_id": agent_id, + "prompt": prompt + }) + + logger.info(f"发送全局Interview命令: simulation_id={simulation_id}, agent_count={len(interviews)}, platform={platform}") + + return cls.interview_agents_batch( + simulation_id=simulation_id, + interviews=interviews, + platform=platform, + timeout=timeout + ) + + @classmethod + def close_simulation_env( + cls, + simulation_id: str, + timeout: float = 30.0 + ) -> Dict[str, Any]: + """ + 关闭模拟环境(而不是停止模拟进程) + + 向模拟发送关闭环境命令,使其优雅退出等待命令模式 + + Args: + simulation_id: 模拟ID + timeout: 超时时间(秒) + + Returns: + 操作结果字典 + """ + sim_dir = os.path.join(cls.RUN_STATE_DIR, simulation_id) + if not os.path.exists(sim_dir): + raise ValueError(f"模拟不存在: {simulation_id}") + + ipc_client = SimulationIPCClient(sim_dir) + + if not ipc_client.check_env_alive(): + return { + "success": True, + "message": "环境已经关闭" + } + + logger.info(f"发送关闭环境命令: simulation_id={simulation_id}") + + try: + response = ipc_client.send_close_env(timeout=timeout) + + return { + "success": response.status.value == "completed", + "message": "环境关闭命令已发送", + "result": response.result, + "timestamp": response.timestamp + } + except TimeoutError: + # 超时可能是因为环境正在关闭 + return { + "success": True, + "message": "环境关闭命令已发送(等待响应超时,环境可能正在关闭)" + } + + @classmethod + def _get_interview_history_from_db( + cls, + db_path: str, + platform_name: str, + agent_id: Optional[int] = None, + limit: int = 100 + ) -> List[Dict[str, Any]]: + """从单个数据库获取Interview历史""" + import sqlite3 + + if not os.path.exists(db_path): + return [] + + results = [] + + try: + conn = sqlite3.connect(db_path) + cursor = conn.cursor() + + if agent_id is not None: + cursor.execute(""" + SELECT user_id, info, created_at + FROM trace + WHERE action = 'interview' AND user_id = ? + ORDER BY created_at DESC + LIMIT ? + """, (agent_id, limit)) + else: + cursor.execute(""" + SELECT user_id, info, created_at + FROM trace + WHERE action = 'interview' + ORDER BY created_at DESC + LIMIT ? + """, (limit,)) + + for user_id, info_json, created_at in cursor.fetchall(): + try: + info = json.loads(info_json) if info_json else {} + except json.JSONDecodeError: + info = {"raw": info_json} + + results.append({ + "agent_id": user_id, + "response": info.get("response", info), + "prompt": info.get("prompt", ""), + "timestamp": created_at, + "platform": platform_name + }) + + conn.close() + + except Exception as e: + logger.error(f"读取Interview历史失败 ({platform_name}): {e}") + + return results + + @classmethod + def get_interview_history( + cls, + simulation_id: str, + platform: str = None, + agent_id: Optional[int] = None, + limit: int = 100 + ) -> List[Dict[str, Any]]: + """ + 获取Interview历史记录(从数据库读取) + + Args: + simulation_id: 模拟ID + platform: 平台类型(reddit/twitter/None) + - "reddit": 只获取Reddit平台的历史 + - "twitter": 只获取Twitter平台的历史 + - None: 获取两个平台的所有历史 + agent_id: 指定Agent ID(可选,只获取该Agent的历史) + limit: 每个平台返回数量限制 + + Returns: + Interview历史记录列表 + """ + sim_dir = os.path.join(cls.RUN_STATE_DIR, simulation_id) + + results = [] + + # 确定要查询的平台 + if platform in ("reddit", "twitter"): + platforms = [platform] + else: + # 不指定platform时,查询两个平台 + platforms = ["twitter", "reddit"] + + for p in platforms: + db_path = os.path.join(sim_dir, f"{p}_simulation.db") + platform_results = cls._get_interview_history_from_db( + db_path=db_path, + platform_name=p, + agent_id=agent_id, + limit=limit + ) + results.extend(platform_results) + + # 按时间降序排序 + results.sort(key=lambda x: x.get("timestamp", ""), reverse=True) + + # 如果查询了多个平台,限制总数 + if len(platforms) > 1 and len(results) > limit: + results = results[:limit] + + return results + diff --git a/app/app/services/supabase_jobs.py b/app/app/services/supabase_jobs.py new file mode 100644 index 0000000000000000000000000000000000000000..bca8e86c75b3a485004266fd4cb94e99533de798 --- /dev/null +++ b/app/app/services/supabase_jobs.py @@ -0,0 +1,176 @@ +""" +Persist pipeline runs and finished reports to Supabase (Postgres + Storage). +Uses the service role on the server only — never expose the key to the browser. +""" + +from __future__ import annotations + +from datetime import datetime, timezone +from typing import Any, Dict, Optional + +from ..config import Config +from ..utils.logger import get_logger + +logger = get_logger("mirofish.supabase_jobs") + + +def sync_enabled() -> bool: + """True when Postgres + Storage sync is available (service role). JWT secret is only required for Bearer auth.""" + return bool(Config.SUPABASE_URL and Config.SUPABASE_SERVICE_ROLE_KEY) + + +def _client(): + from supabase import create_client + + return create_client(Config.SUPABASE_URL, Config.SUPABASE_SERVICE_ROLE_KEY) + + +def insert_pending_run( + *, + simulation_run_id: str, + user_id: str, + backend_task_id: str, + requirement_preview: str, +) -> None: + if not sync_enabled(): + return + try: + sb = _client() + sb.table("simulation_runs").insert( + { + "id": simulation_run_id, + "user_id": user_id, + "backend_task_id": backend_task_id, + "status": "pending", + "requirement_preview": (requirement_preview or "")[:2000], + "created_at": datetime.now(timezone.utc).isoformat(), + "updated_at": datetime.now(timezone.utc).isoformat(), + } + ).execute() + except Exception as e: + logger.error("insert_pending_run failed: %s", e) + raise + + +def mark_run_failed(*, simulation_run_id: str, error_message: str) -> None: + if not sync_enabled() or not simulation_run_id: + return + try: + sb = _client() + sb.table("simulation_runs").update( + { + "status": "failed", + "error_message": (error_message or "")[:4000], + "updated_at": datetime.now(timezone.utc).isoformat(), + } + ).eq("id", simulation_run_id).execute() + except Exception as e: + logger.error("mark_run_failed failed: %s", e) + + +def mark_run_completed( + *, + simulation_run_id: str, + user_id: str, + report_id: str, + markdown_content: str, + simulation_id: Optional[str] = None, + project_id: Optional[str] = None, +) -> Optional[Dict[str, Any]]: + """ + Upload markdown to Storage and mark row completed. Returns { report_storage_path, report_public_url? }. + """ + if not sync_enabled() or not simulation_run_id: + return None + path = f"{user_id}/{simulation_run_id}.md" + body = markdown_content.encode("utf-8") + try: + sb = _client() + bucket = Config.SUPABASE_REPORTS_BUCKET + # upsert so retries overwrite + storage_api = sb.storage.from_(bucket) + try: + storage_api.upload( + path, + body, + file_options={ + "content-type": "text/markdown; charset=utf-8", + "upsert": "true", + }, + ) + except TypeError: + storage_api.upload(path, body) + + pub: Optional[str] = None + try: + u = storage_api.get_public_url(path) + if isinstance(u, dict): + pub = u.get("publicUrl") or u.get("public_url") + elif isinstance(u, str): + pub = u + except Exception: + pub = None + + sb.table("simulation_runs").update( + { + "status": "completed", + "report_id": report_id, + "report_storage_path": path, + "report_public_url": pub, + "simulation_id": simulation_id, + "project_id": project_id, + "error_message": None, + "updated_at": datetime.now(timezone.utc).isoformat(), + } + ).eq("id", simulation_run_id).execute() + + return {"report_storage_path": path, "report_public_url": pub} + except Exception as e: + logger.error("mark_run_completed failed: %s", e) + mark_run_failed(simulation_run_id=simulation_run_id, error_message=f"Report upload failed: {e}") + raise + + +def list_simulation_runs_for_user(*, user_id: str) -> list: + if not sync_enabled(): + return [] + sb = _client() + r = sb.table("simulation_runs").select("*").eq("user_id", user_id).order("created_at", desc=True).execute() + return r.data or [] + + +def get_run_row_for_user(*, run_id: str, user_id: str) -> Optional[Dict[str, Any]]: + if not sync_enabled(): + return None + sb = _client() + r = sb.table("simulation_runs").select("*").eq("id", run_id).eq("user_id", user_id).limit(1).execute() + rows = r.data or [] + return rows[0] if rows else None + + +def signed_url_for_storage_path(*, storage_path: str, expires_sec: int = 3600) -> Optional[str]: + if not sync_enabled() or not storage_path: + return None + sb = _client() + bucket = Config.SUPABASE_REPORTS_BUCKET + try: + res = sb.storage.from_(bucket).create_signed_url(storage_path, expires_sec) + if isinstance(res, dict): + return ( + res.get("signedURL") + or res.get("signed_url") + or (res.get("data") or {}).get("signedUrl") + ) + signed = getattr(res, "signed_url", None) or getattr(res, "signedURL", None) + if signed: + return signed + except TypeError: + try: + res = sb.storage.from_(bucket).create_signed_url(storage_path, {"expires_in": expires_sec}) + if isinstance(res, dict): + return res.get("signedURL") or res.get("signed_url") + except Exception as e2: + logger.error("signed_url_for_storage_path fallback: %s", e2) + except Exception as e: + logger.error("signed_url_for_storage_path: %s", e) + return None diff --git a/app/app/services/text_processor.py b/app/app/services/text_processor.py new file mode 100644 index 0000000000000000000000000000000000000000..351df45ff4ed6e0b6d2e1b4f508c1be15fdf6440 --- /dev/null +++ b/app/app/services/text_processor.py @@ -0,0 +1,71 @@ +""" +文本处理服务 +""" + +from typing import List, Optional +from ..utils.file_parser import FileParser, split_text_into_chunks + + +class TextProcessor: + """文本处理器""" + + @staticmethod + def extract_from_files(file_paths: List[str]) -> str: + """从多个文件提取文本""" + return FileParser.extract_from_multiple(file_paths) + + @staticmethod + def split_text( + text: str, + chunk_size: int = 500, + overlap: int = 50 + ) -> List[str]: + """ + 分割文本 + + Args: + text: 原始文本 + chunk_size: 块大小 + overlap: 重叠大小 + + Returns: + 文本块列表 + """ + return split_text_into_chunks(text, chunk_size, overlap) + + @staticmethod + def preprocess_text(text: str) -> str: + """ + 预处理文本 + - 移除多余空白 + - 标准化换行 + + Args: + text: 原始文本 + + Returns: + 处理后的文本 + """ + import re + + # 标准化换行 + text = text.replace('\r\n', '\n').replace('\r', '\n') + + # 移除连续空行(保留最多两个换行) + text = re.sub(r'\n{3,}', '\n\n', text) + + # 移除行首行尾空白 + lines = [line.strip() for line in text.split('\n')] + text = '\n'.join(lines) + + return text.strip() + + @staticmethod + def get_text_stats(text: str) -> dict: + """获取文本统计信息""" + return { + "total_chars": len(text), + "total_lines": text.count('\n') + 1, + "total_words": len(text.split()), + } + diff --git a/app/app/services/zep_entity_reader.py b/app/app/services/zep_entity_reader.py new file mode 100644 index 0000000000000000000000000000000000000000..c318b23c1ef9f886dd942caa6e8f1fc89bb86197 --- /dev/null +++ b/app/app/services/zep_entity_reader.py @@ -0,0 +1,450 @@ +""" +Zep实体读取与过滤服务 +从Zep图谱中读取节点,筛选出符合预定义实体类型的节点 +""" + +import time +from typing import Dict, Any, List, Optional, Set, Callable, TypeVar +from dataclasses import dataclass, field + +from zep_cloud.client import Zep + +from ..config import Config +from ..utils.api_key_runtime import call_with_limit_rotation, get_zep_key +from ..utils.logger import get_logger +from ..utils.zep_paging import fetch_all_nodes, fetch_all_edges + +logger = get_logger('mirofish.zep_entity_reader') + +# 用于泛型返回类型 +T = TypeVar('T') + + +@dataclass +class EntityNode: + """实体节点数据结构""" + uuid: str + name: str + labels: List[str] + summary: str + attributes: Dict[str, Any] + # 相关的边信息 + related_edges: List[Dict[str, Any]] = field(default_factory=list) + # 相关的其他节点信息 + related_nodes: List[Dict[str, Any]] = field(default_factory=list) + + def to_dict(self) -> Dict[str, Any]: + return { + "uuid": self.uuid, + "name": self.name, + "labels": self.labels, + "summary": self.summary, + "attributes": self.attributes, + "related_edges": self.related_edges, + "related_nodes": self.related_nodes, + } + + def get_entity_type(self) -> Optional[str]: + """获取实体类型(排除默认的Entity标签)""" + for label in self.labels: + if label not in ["Entity", "Node"]: + return label + return None + + +@dataclass +class FilteredEntities: + """过滤后的实体集合""" + entities: List[EntityNode] + entity_types: Set[str] + total_count: int + filtered_count: int + + def to_dict(self) -> Dict[str, Any]: + return { + "entities": [e.to_dict() for e in self.entities], + "entity_types": list(self.entity_types), + "total_count": self.total_count, + "filtered_count": self.filtered_count, + } + + +class ZepEntityReader: + """ + Zep实体读取与过滤服务 + + 主要功能: + 1. 从Zep图谱读取所有节点 + 2. 筛选出符合预定义实体类型的节点(Labels不只是Entity的节点) + 3. 获取每个实体的相关边和关联节点信息 + """ + + def __init__(self, api_key: Optional[str] = None): + self._fixed_api_key = (api_key or "").strip() or None + zk = Config.get_zep_api_keys() + if self._fixed_api_key: + self.api_key = self._fixed_api_key + else: + self.api_key = zk[0] if zk else None + if not self.api_key and not zk: + raise ValueError("ZEP_API_KEY 未配置") + + @property + def client(self) -> Zep: + if self._fixed_api_key: + return Zep(api_key=self._fixed_api_key) + k = get_zep_key() + if not k: + raise ValueError("ZEP_API_KEY 未配置") + return Zep(api_key=k) + + def _call_with_retry( + self, + func: Callable[[], T], + operation_name: str, + max_retries: int = 3, + initial_delay: float = 2.0 + ) -> T: + """ + 带重试机制的Zep API调用 + + Args: + func: 要执行的函数(无参数的lambda或callable) + operation_name: 操作名称,用于日志 + max_retries: 最大重试次数(默认3次,即最多尝试3次) + initial_delay: 初始延迟秒数 + + Returns: + API调用结果 + """ + last_exception = None + delay = initial_delay + + for attempt in range(max_retries): + try: + return call_with_limit_rotation(func) + except Exception as e: + last_exception = e + if attempt < max_retries - 1: + logger.warning( + f"Zep {operation_name} 第 {attempt + 1} 次尝试失败: {str(e)[:100]}, " + f"{delay:.1f}秒后重试..." + ) + time.sleep(delay) + delay *= 2 # 指数退避 + else: + logger.error(f"Zep {operation_name} 在 {max_retries} 次尝试后仍失败: {str(e)}") + + raise last_exception + + def get_all_nodes(self, graph_id: str) -> List[Dict[str, Any]]: + """ + 获取图谱的所有节点(分页获取) + + Args: + graph_id: 图谱ID + + Returns: + 节点列表 + """ + logger.info(f"获取图谱 {graph_id} 的所有节点...") + + nodes = call_with_limit_rotation(lambda: fetch_all_nodes(self.client, graph_id)) + + nodes_data = [] + for node in nodes: + nodes_data.append({ + "uuid": getattr(node, 'uuid_', None) or getattr(node, 'uuid', ''), + "name": node.name or "", + "labels": node.labels or [], + "summary": node.summary or "", + "attributes": node.attributes or {}, + }) + + logger.info(f"共获取 {len(nodes_data)} 个节点") + return nodes_data + + def get_all_edges(self, graph_id: str) -> List[Dict[str, Any]]: + """ + 获取图谱的所有边(分页获取) + + Args: + graph_id: 图谱ID + + Returns: + 边列表 + """ + logger.info(f"获取图谱 {graph_id} 的所有边...") + + edges = call_with_limit_rotation(lambda: fetch_all_edges(self.client, graph_id)) + + edges_data = [] + for edge in edges: + edges_data.append({ + "uuid": getattr(edge, 'uuid_', None) or getattr(edge, 'uuid', ''), + "name": edge.name or "", + "fact": edge.fact or "", + "source_node_uuid": edge.source_node_uuid, + "target_node_uuid": edge.target_node_uuid, + "attributes": edge.attributes or {}, + }) + + logger.info(f"共获取 {len(edges_data)} 条边") + return edges_data + + def get_node_edges(self, node_uuid: str) -> List[Dict[str, Any]]: + """ + 获取指定节点的所有相关边(带重试机制) + + Args: + node_uuid: 节点UUID + + Returns: + 边列表 + """ + try: + # 使用重试机制调用Zep API + edges = self._call_with_retry( + func=lambda: self.client.graph.node.get_entity_edges(node_uuid=node_uuid), + operation_name=f"获取节点边(node={node_uuid[:8]}...)" + ) + + edges_data = [] + for edge in edges: + edges_data.append({ + "uuid": getattr(edge, 'uuid_', None) or getattr(edge, 'uuid', ''), + "name": edge.name or "", + "fact": edge.fact or "", + "source_node_uuid": edge.source_node_uuid, + "target_node_uuid": edge.target_node_uuid, + "attributes": edge.attributes or {}, + }) + + return edges_data + except Exception as e: + logger.warning(f"获取节点 {node_uuid} 的边失败: {str(e)}") + return [] + + def filter_defined_entities( + self, + graph_id: str, + defined_entity_types: Optional[List[str]] = None, + enrich_with_edges: bool = True + ) -> FilteredEntities: + """ + 筛选出符合预定义实体类型的节点 + + 筛选逻辑: + - 如果节点的Labels只有一个"Entity",说明这个实体不符合我们预定义的类型,跳过 + - 如果节点的Labels包含除"Entity"和"Node"之外的标签,说明符合预定义类型,保留 + + Args: + graph_id: 图谱ID + defined_entity_types: 预定义的实体类型列表(可选,如果提供则只保留这些类型) + enrich_with_edges: 是否获取每个实体的相关边信息 + + Returns: + FilteredEntities: 过滤后的实体集合 + """ + logger.info(f"开始筛选图谱 {graph_id} 的实体...") + + # 获取所有节点 + all_nodes = self.get_all_nodes(graph_id) + total_count = len(all_nodes) + + # 获取所有边(用于后续关联查找) + all_edges = self.get_all_edges(graph_id) if enrich_with_edges else [] + + # 构建节点UUID到节点数据的映射 + node_map = {n["uuid"]: n for n in all_nodes} + + # 筛选符合条件的实体 + filtered_entities = [] + entity_types_found = set() + + for node in all_nodes: + labels = node.get("labels", []) + + # 筛选逻辑:Labels必须包含除"Entity"和"Node"之外的标签 + custom_labels = [l for l in labels if l not in ["Entity", "Node"]] + + if not custom_labels: + # 只有默认标签,跳过 + continue + + # 如果指定了预定义类型,检查是否匹配 + if defined_entity_types: + matching_labels = [l for l in custom_labels if l in defined_entity_types] + if not matching_labels: + continue + entity_type = matching_labels[0] + else: + entity_type = custom_labels[0] + + entity_types_found.add(entity_type) + + # 创建实体节点对象 + entity = EntityNode( + uuid=node["uuid"], + name=node["name"], + labels=labels, + summary=node["summary"], + attributes=node["attributes"], + ) + + # 获取相关边和节点 + if enrich_with_edges: + related_edges = [] + related_node_uuids = set() + + for edge in all_edges: + if edge["source_node_uuid"] == node["uuid"]: + related_edges.append({ + "direction": "outgoing", + "edge_name": edge["name"], + "fact": edge["fact"], + "target_node_uuid": edge["target_node_uuid"], + }) + related_node_uuids.add(edge["target_node_uuid"]) + elif edge["target_node_uuid"] == node["uuid"]: + related_edges.append({ + "direction": "incoming", + "edge_name": edge["name"], + "fact": edge["fact"], + "source_node_uuid": edge["source_node_uuid"], + }) + related_node_uuids.add(edge["source_node_uuid"]) + + entity.related_edges = related_edges + + # 获取关联节点的基本信息 + related_nodes = [] + for related_uuid in related_node_uuids: + if related_uuid in node_map: + related_node = node_map[related_uuid] + related_nodes.append({ + "uuid": related_node["uuid"], + "name": related_node["name"], + "labels": related_node["labels"], + "summary": related_node.get("summary", ""), + }) + + entity.related_nodes = related_nodes + + filtered_entities.append(entity) + + logger.info(f"筛选完成: 总节点 {total_count}, 符合条件 {len(filtered_entities)}, " + f"实体类型: {entity_types_found}") + + return FilteredEntities( + entities=filtered_entities, + entity_types=entity_types_found, + total_count=total_count, + filtered_count=len(filtered_entities), + ) + + def get_entity_with_context( + self, + graph_id: str, + entity_uuid: str + ) -> Optional[EntityNode]: + """ + 获取单个实体及其完整上下文(边和关联节点,带重试机制) + + Args: + graph_id: 图谱ID + entity_uuid: 实体UUID + + Returns: + EntityNode或None + """ + try: + # 使用重试机制获取节点 + node = self._call_with_retry( + func=lambda: self.client.graph.node.get(uuid_=entity_uuid), + operation_name=f"获取节点详情(uuid={entity_uuid[:8]}...)" + ) + + if not node: + return None + + # 获取节点的边 + edges = self.get_node_edges(entity_uuid) + + # 获取所有节点用于关联查找 + all_nodes = self.get_all_nodes(graph_id) + node_map = {n["uuid"]: n for n in all_nodes} + + # 处理相关边和节点 + related_edges = [] + related_node_uuids = set() + + for edge in edges: + if edge["source_node_uuid"] == entity_uuid: + related_edges.append({ + "direction": "outgoing", + "edge_name": edge["name"], + "fact": edge["fact"], + "target_node_uuid": edge["target_node_uuid"], + }) + related_node_uuids.add(edge["target_node_uuid"]) + else: + related_edges.append({ + "direction": "incoming", + "edge_name": edge["name"], + "fact": edge["fact"], + "source_node_uuid": edge["source_node_uuid"], + }) + related_node_uuids.add(edge["source_node_uuid"]) + + # 获取关联节点信息 + related_nodes = [] + for related_uuid in related_node_uuids: + if related_uuid in node_map: + related_node = node_map[related_uuid] + related_nodes.append({ + "uuid": related_node["uuid"], + "name": related_node["name"], + "labels": related_node["labels"], + "summary": related_node.get("summary", ""), + }) + + return EntityNode( + uuid=getattr(node, 'uuid_', None) or getattr(node, 'uuid', ''), + name=node.name or "", + labels=node.labels or [], + summary=node.summary or "", + attributes=node.attributes or {}, + related_edges=related_edges, + related_nodes=related_nodes, + ) + + except Exception as e: + logger.error(f"获取实体 {entity_uuid} 失败: {str(e)}") + return None + + def get_entities_by_type( + self, + graph_id: str, + entity_type: str, + enrich_with_edges: bool = True + ) -> List[EntityNode]: + """ + 获取指定类型的所有实体 + + Args: + graph_id: 图谱ID + entity_type: 实体类型(如 "Student", "PublicFigure" 等) + enrich_with_edges: 是否获取相关边信息 + + Returns: + 实体列表 + """ + result = self.filter_defined_entities( + graph_id=graph_id, + defined_entity_types=[entity_type], + enrich_with_edges=enrich_with_edges + ) + return result.entities + + diff --git a/app/app/services/zep_graph_memory_updater.py b/app/app/services/zep_graph_memory_updater.py new file mode 100644 index 0000000000000000000000000000000000000000..2508a4ef54ed879f7e2c2581786bd166ab9232d0 --- /dev/null +++ b/app/app/services/zep_graph_memory_updater.py @@ -0,0 +1,561 @@ +""" +Zep图谱记忆更新服务 +将模拟中的Agent活动动态更新到Zep图谱中 +""" + +import os +import time +import threading +import json +from typing import Dict, Any, List, Optional, Callable +from dataclasses import dataclass +from datetime import datetime +from queue import Queue, Empty + +from zep_cloud.client import Zep + +from ..config import Config +from ..utils.api_key_runtime import call_with_limit_rotation, get_zep_key +from ..utils.logger import get_logger + +logger = get_logger('mirofish.zep_graph_memory_updater') + + +@dataclass +class AgentActivity: + """Agent活动记录""" + platform: str # twitter / reddit + agent_id: int + agent_name: str + action_type: str # CREATE_POST, LIKE_POST, etc. + action_args: Dict[str, Any] + round_num: int + timestamp: str + + def to_episode_text(self) -> str: + """ + 将活动转换为可以发送给Zep的文本描述 + + 采用自然语言描述格式,让Zep能够从中提取实体和关系 + 不添加模拟相关的前缀,避免误导图谱更新 + """ + # 根据不同的动作类型生成不同的描述 + action_descriptions = { + "CREATE_POST": self._describe_create_post, + "LIKE_POST": self._describe_like_post, + "DISLIKE_POST": self._describe_dislike_post, + "REPOST": self._describe_repost, + "QUOTE_POST": self._describe_quote_post, + "FOLLOW": self._describe_follow, + "CREATE_COMMENT": self._describe_create_comment, + "LIKE_COMMENT": self._describe_like_comment, + "DISLIKE_COMMENT": self._describe_dislike_comment, + "SEARCH_POSTS": self._describe_search, + "SEARCH_USER": self._describe_search_user, + "MUTE": self._describe_mute, + } + + describe_func = action_descriptions.get(self.action_type, self._describe_generic) + description = describe_func() + + # 直接返回 "agent名称: 活动描述" 格式,不添加模拟前缀 + return f"{self.agent_name}: {description}" + + def _describe_create_post(self) -> str: + content = self.action_args.get("content", "") + if content: + return f"发布了一条帖子:「{content}」" + return "发布了一条帖子" + + def _describe_like_post(self) -> str: + """点赞帖子 - 包含帖子原文和作者信息""" + post_content = self.action_args.get("post_content", "") + post_author = self.action_args.get("post_author_name", "") + + if post_content and post_author: + return f"点赞了{post_author}的帖子:「{post_content}」" + elif post_content: + return f"点赞了一条帖子:「{post_content}」" + elif post_author: + return f"点赞了{post_author}的一条帖子" + return "点赞了一条帖子" + + def _describe_dislike_post(self) -> str: + """踩帖子 - 包含帖子原文和作者信息""" + post_content = self.action_args.get("post_content", "") + post_author = self.action_args.get("post_author_name", "") + + if post_content and post_author: + return f"踩了{post_author}的帖子:「{post_content}」" + elif post_content: + return f"踩了一条帖子:「{post_content}」" + elif post_author: + return f"踩了{post_author}的一条帖子" + return "踩了一条帖子" + + def _describe_repost(self) -> str: + """转发帖子 - 包含原帖内容和作者信息""" + original_content = self.action_args.get("original_content", "") + original_author = self.action_args.get("original_author_name", "") + + if original_content and original_author: + return f"转发了{original_author}的帖子:「{original_content}」" + elif original_content: + return f"转发了一条帖子:「{original_content}」" + elif original_author: + return f"转发了{original_author}的一条帖子" + return "转发了一条帖子" + + def _describe_quote_post(self) -> str: + """引用帖子 - 包含原帖内容、作者信息和引用评论""" + original_content = self.action_args.get("original_content", "") + original_author = self.action_args.get("original_author_name", "") + quote_content = self.action_args.get("quote_content", "") or self.action_args.get("content", "") + + base = "" + if original_content and original_author: + base = f"引用了{original_author}的帖子「{original_content}」" + elif original_content: + base = f"引用了一条帖子「{original_content}」" + elif original_author: + base = f"引用了{original_author}的一条帖子" + else: + base = "引用了一条帖子" + + if quote_content: + base += f",并评论道:「{quote_content}」" + return base + + def _describe_follow(self) -> str: + """关注用户 - 包含被关注用户的名称""" + target_user_name = self.action_args.get("target_user_name", "") + + if target_user_name: + return f"关注了用户「{target_user_name}」" + return "关注了一个用户" + + def _describe_create_comment(self) -> str: + """发表评论 - 包含评论内容和所评论的帖子信息""" + content = self.action_args.get("content", "") + post_content = self.action_args.get("post_content", "") + post_author = self.action_args.get("post_author_name", "") + + if content: + if post_content and post_author: + return f"在{post_author}的帖子「{post_content}」下评论道:「{content}」" + elif post_content: + return f"在帖子「{post_content}」下评论道:「{content}」" + elif post_author: + return f"在{post_author}的帖子下评论道:「{content}」" + return f"评论道:「{content}」" + return "发表了评论" + + def _describe_like_comment(self) -> str: + """点赞评论 - 包含评论内容和作者信息""" + comment_content = self.action_args.get("comment_content", "") + comment_author = self.action_args.get("comment_author_name", "") + + if comment_content and comment_author: + return f"点赞了{comment_author}的评论:「{comment_content}」" + elif comment_content: + return f"点赞了一条评论:「{comment_content}」" + elif comment_author: + return f"点赞了{comment_author}的一条评论" + return "点赞了一条评论" + + def _describe_dislike_comment(self) -> str: + """踩评论 - 包含评论内容和作者信息""" + comment_content = self.action_args.get("comment_content", "") + comment_author = self.action_args.get("comment_author_name", "") + + if comment_content and comment_author: + return f"踩了{comment_author}的评论:「{comment_content}」" + elif comment_content: + return f"踩了一条评论:「{comment_content}」" + elif comment_author: + return f"踩了{comment_author}的一条评论" + return "踩了一条评论" + + def _describe_search(self) -> str: + """搜索帖子 - 包含搜索关键词""" + query = self.action_args.get("query", "") or self.action_args.get("keyword", "") + return f"搜索了「{query}」" if query else "进行了搜索" + + def _describe_search_user(self) -> str: + """搜索用户 - 包含搜索关键词""" + query = self.action_args.get("query", "") or self.action_args.get("username", "") + return f"搜索了用户「{query}」" if query else "搜索了用户" + + def _describe_mute(self) -> str: + """屏蔽用户 - 包含被屏蔽用户的名称""" + target_user_name = self.action_args.get("target_user_name", "") + + if target_user_name: + return f"屏蔽了用户「{target_user_name}」" + return "屏蔽了一个用户" + + def _describe_generic(self) -> str: + # 对于未知的动作类型,生成通用描述 + return f"执行了{self.action_type}操作" + + +class ZepGraphMemoryUpdater: + """ + Zep图谱记忆更新器 + + 监控模拟的actions日志文件,将新的agent活动实时更新到Zep图谱中。 + 按平台分组,每累积BATCH_SIZE条活动后批量发送到Zep。 + + 所有有意义的行为都会被更新到Zep,action_args中会包含完整的上下文信息: + - 点赞/踩的帖子原文 + - 转发/引用的帖子原文 + - 关注/屏蔽的用户名 + - 点赞/踩的评论原文 + """ + + # 批量发送大小(每个平台累积多少条后发送) + BATCH_SIZE = 5 + + # 平台名称映射(用于控制台显示) + PLATFORM_DISPLAY_NAMES = { + 'twitter': '世界1', + 'reddit': '世界2', + } + + # 发送间隔(秒),避免请求过快 + SEND_INTERVAL = 0.5 + + # 重试配置 + MAX_RETRIES = 3 + RETRY_DELAY = 2 # 秒 + + def __init__(self, graph_id: str, api_key: Optional[str] = None): + """ + 初始化更新器 + + Args: + graph_id: Zep图谱ID + api_key: Zep API Key(可选,默认从配置读取) + """ + self.graph_id = graph_id + self._fixed_api_key = (api_key or "").strip() or None + self.api_key = self._fixed_api_key or (Config.get_zep_api_keys()[0] if Config.get_zep_api_keys() else None) + + if not self.api_key: + raise ValueError("ZEP_API_KEY未配置") + + # 活动队列 + self._activity_queue: Queue = Queue() + + # 按平台分组的活动缓冲区(每个平台各自累积到BATCH_SIZE后批量发送) + self._platform_buffers: Dict[str, List[AgentActivity]] = { + 'twitter': [], + 'reddit': [], + } + self._buffer_lock = threading.Lock() + + # 控制标志 + self._running = False + self._worker_thread: Optional[threading.Thread] = None + + # 统计 + self._total_activities = 0 # 实际添加到队列的活动数 + self._total_sent = 0 # 成功发送到Zep的批次数 + self._total_items_sent = 0 # 成功发送到Zep的活动条数 + self._failed_count = 0 # 发送失败的批次数 + self._skipped_count = 0 # 被过滤跳过的活动数(DO_NOTHING) + + logger.info(f"ZepGraphMemoryUpdater 初始化完成: graph_id={graph_id}, batch_size={self.BATCH_SIZE}") + + def _get_platform_display_name(self, platform: str) -> str: + """获取平台的显示名称""" + return self.PLATFORM_DISPLAY_NAMES.get(platform.lower(), platform) + + def start(self): + """启动后台工作线程""" + if self._running: + return + + self._running = True + self._worker_thread = threading.Thread( + target=self._worker_loop, + daemon=True, + name=f"ZepMemoryUpdater-{self.graph_id[:8]}" + ) + self._worker_thread.start() + logger.info(f"ZepGraphMemoryUpdater 已启动: graph_id={self.graph_id}") + + def stop(self): + """停止后台工作线程""" + self._running = False + + # 发送剩余的活动 + self._flush_remaining() + + if self._worker_thread and self._worker_thread.is_alive(): + self._worker_thread.join(timeout=10) + + logger.info(f"ZepGraphMemoryUpdater 已停止: graph_id={self.graph_id}, " + f"total_activities={self._total_activities}, " + f"batches_sent={self._total_sent}, " + f"items_sent={self._total_items_sent}, " + f"failed={self._failed_count}, " + f"skipped={self._skipped_count}") + + def add_activity(self, activity: AgentActivity): + """ + 添加一个agent活动到队列 + + 所有有意义的行为都会被添加到队列,包括: + - CREATE_POST(发帖) + - CREATE_COMMENT(评论) + - QUOTE_POST(引用帖子) + - SEARCH_POSTS(搜索帖子) + - SEARCH_USER(搜索用户) + - LIKE_POST/DISLIKE_POST(点赞/踩帖子) + - REPOST(转发) + - FOLLOW(关注) + - MUTE(屏蔽) + - LIKE_COMMENT/DISLIKE_COMMENT(点赞/踩评论) + + action_args中会包含完整的上下文信息(如帖子原文、用户名等)。 + + Args: + activity: Agent活动记录 + """ + # 跳过DO_NOTHING类型的活动 + if activity.action_type == "DO_NOTHING": + self._skipped_count += 1 + return + + self._activity_queue.put(activity) + self._total_activities += 1 + logger.debug(f"添加活动到Zep队列: {activity.agent_name} - {activity.action_type}") + + def add_activity_from_dict(self, data: Dict[str, Any], platform: str): + """ + 从字典数据添加活动 + + Args: + data: 从actions.jsonl解析的字典数据 + platform: 平台名称 (twitter/reddit) + """ + # 跳过事件类型的条目 + if "event_type" in data: + return + + activity = AgentActivity( + platform=platform, + agent_id=data.get("agent_id", 0), + agent_name=data.get("agent_name", ""), + action_type=data.get("action_type", ""), + action_args=data.get("action_args", {}), + round_num=data.get("round", 0), + timestamp=data.get("timestamp", datetime.now().isoformat()), + ) + + self.add_activity(activity) + + def _worker_loop(self): + """后台工作循环 - 按平台批量发送活动到Zep""" + while self._running or not self._activity_queue.empty(): + try: + # 尝试从队列获取活动(超时1秒) + try: + activity = self._activity_queue.get(timeout=1) + + # 将活动添加到对应平台的缓冲区 + platform = activity.platform.lower() + with self._buffer_lock: + if platform not in self._platform_buffers: + self._platform_buffers[platform] = [] + self._platform_buffers[platform].append(activity) + + # 检查该平台是否达到批量大小 + if len(self._platform_buffers[platform]) >= self.BATCH_SIZE: + batch = self._platform_buffers[platform][:self.BATCH_SIZE] + self._platform_buffers[platform] = self._platform_buffers[platform][self.BATCH_SIZE:] + # 释放锁后再发送 + self._send_batch_activities(batch, platform) + # 发送间隔,避免请求过快 + time.sleep(self.SEND_INTERVAL) + + except Empty: + pass + + except Exception as e: + logger.error(f"工作循环异常: {e}") + time.sleep(1) + + def _send_batch_activities(self, activities: List[AgentActivity], platform: str): + """ + 批量发送活动到Zep图谱(合并为一条文本) + + Args: + activities: Agent活动列表 + platform: 平台名称 + """ + if not activities: + return + + # 将多条活动合并为一条文本,用换行分隔 + episode_texts = [activity.to_episode_text() for activity in activities] + combined_text = "\n".join(episode_texts) + + # 带重试的发送 + for attempt in range(self.MAX_RETRIES): + try: + def _add(): + k = self._fixed_api_key or get_zep_key() + if not k: + raise ValueError("ZEP_API_KEY未配置") + return Zep(api_key=k).graph.add( + graph_id=self.graph_id, + type="text", + data=combined_text, + ) + + if self._fixed_api_key: + Zep(api_key=self._fixed_api_key).graph.add( + graph_id=self.graph_id, + type="text", + data=combined_text, + ) + else: + call_with_limit_rotation(_add) + + self._total_sent += 1 + self._total_items_sent += len(activities) + display_name = self._get_platform_display_name(platform) + logger.info(f"成功批量发送 {len(activities)} 条{display_name}活动到图谱 {self.graph_id}") + logger.debug(f"批量内容预览: {combined_text[:200]}...") + return + + except Exception as e: + if attempt < self.MAX_RETRIES - 1: + logger.warning(f"批量发送到Zep失败 (尝试 {attempt + 1}/{self.MAX_RETRIES}): {e}") + time.sleep(self.RETRY_DELAY * (attempt + 1)) + else: + logger.error(f"批量发送到Zep失败,已重试{self.MAX_RETRIES}次: {e}") + self._failed_count += 1 + + def _flush_remaining(self): + """发送队列和缓冲区中剩余的活动""" + # 首先处理队列中剩余的活动,添加到缓冲区 + while not self._activity_queue.empty(): + try: + activity = self._activity_queue.get_nowait() + platform = activity.platform.lower() + with self._buffer_lock: + if platform not in self._platform_buffers: + self._platform_buffers[platform] = [] + self._platform_buffers[platform].append(activity) + except Empty: + break + + # 然后发送各平台缓冲区中剩余的活动(即使不足BATCH_SIZE条) + with self._buffer_lock: + for platform, buffer in self._platform_buffers.items(): + if buffer: + display_name = self._get_platform_display_name(platform) + logger.info(f"发送{display_name}平台剩余的 {len(buffer)} 条活动") + self._send_batch_activities(buffer, platform) + # 清空所有缓冲区 + for platform in self._platform_buffers: + self._platform_buffers[platform] = [] + + def get_stats(self) -> Dict[str, Any]: + """获取统计信息""" + with self._buffer_lock: + buffer_sizes = {p: len(b) for p, b in self._platform_buffers.items()} + + return { + "graph_id": self.graph_id, + "batch_size": self.BATCH_SIZE, + "total_activities": self._total_activities, # 添加到队列的活动总数 + "batches_sent": self._total_sent, # 成功发送的批次数 + "items_sent": self._total_items_sent, # 成功发送的活动条数 + "failed_count": self._failed_count, # 发送失败的批次数 + "skipped_count": self._skipped_count, # 被过滤跳过的活动数(DO_NOTHING) + "queue_size": self._activity_queue.qsize(), + "buffer_sizes": buffer_sizes, # 各平台缓冲区大小 + "running": self._running, + } + + +class ZepGraphMemoryManager: + """ + 管理多个模拟的Zep图谱记忆更新器 + + 每个模拟可以有自己的更新器实例 + """ + + _updaters: Dict[str, ZepGraphMemoryUpdater] = {} + _lock = threading.Lock() + + @classmethod + def create_updater(cls, simulation_id: str, graph_id: str) -> ZepGraphMemoryUpdater: + """ + 为模拟创建图谱记忆更新器 + + Args: + simulation_id: 模拟ID + graph_id: Zep图谱ID + + Returns: + ZepGraphMemoryUpdater实例 + """ + with cls._lock: + # 如果已存在,先停止旧的 + if simulation_id in cls._updaters: + cls._updaters[simulation_id].stop() + + updater = ZepGraphMemoryUpdater(graph_id) + updater.start() + cls._updaters[simulation_id] = updater + + logger.info(f"创建图谱记忆更新器: simulation_id={simulation_id}, graph_id={graph_id}") + return updater + + @classmethod + def get_updater(cls, simulation_id: str) -> Optional[ZepGraphMemoryUpdater]: + """获取模拟的更新器""" + return cls._updaters.get(simulation_id) + + @classmethod + def stop_updater(cls, simulation_id: str): + """停止并移除模拟的更新器""" + with cls._lock: + if simulation_id in cls._updaters: + cls._updaters[simulation_id].stop() + del cls._updaters[simulation_id] + logger.info(f"已停止图谱记忆更新器: simulation_id={simulation_id}") + + # 防止 stop_all 重复调用的标志 + _stop_all_done = False + + @classmethod + def stop_all(cls): + """停止所有更新器""" + # 防止重复调用 + if cls._stop_all_done: + return + cls._stop_all_done = True + + with cls._lock: + if cls._updaters: + for simulation_id, updater in list(cls._updaters.items()): + try: + updater.stop() + except Exception as e: + logger.error(f"停止更新器失败: simulation_id={simulation_id}, error={e}") + cls._updaters.clear() + logger.info("已停止所有图谱记忆更新器") + + @classmethod + def get_all_stats(cls) -> Dict[str, Dict[str, Any]]: + """获取所有更新器的统计信息""" + return { + sim_id: updater.get_stats() + for sim_id, updater in cls._updaters.items() + } diff --git a/app/app/services/zep_tools.py b/app/app/services/zep_tools.py new file mode 100644 index 0000000000000000000000000000000000000000..0200594f383f7faab1ae270ac211fcb2905699c7 --- /dev/null +++ b/app/app/services/zep_tools.py @@ -0,0 +1,1751 @@ +""" +Zep检索工具服务 +封装图谱搜索、节点读取、边查询等工具,供Report Agent使用 + +核心检索工具(优化后): +1. InsightForge(深度洞察检索)- 最强大的混合检索,自动生成子问题并多维度检索 +2. PanoramaSearch(广度搜索)- 获取全貌,包括过期内容 +3. QuickSearch(简单搜索)- 快速检索 +""" + +import time +import json +from typing import Dict, Any, List, Optional +from dataclasses import dataclass, field + +from zep_cloud.client import Zep + +from ..config import Config +from ..utils.api_key_runtime import call_with_limit_rotation, get_zep_key +from ..utils.logger import get_logger +from ..utils.llm_client import LLMClient +from ..utils.zep_paging import fetch_all_nodes, fetch_all_edges + +logger = get_logger('mirofish.zep_tools') + + +@dataclass +class SearchResult: + """搜索结果""" + facts: List[str] + edges: List[Dict[str, Any]] + nodes: List[Dict[str, Any]] + query: str + total_count: int + + def to_dict(self) -> Dict[str, Any]: + return { + "facts": self.facts, + "edges": self.edges, + "nodes": self.nodes, + "query": self.query, + "total_count": self.total_count + } + + def to_text(self) -> str: + """转换为文本格式,供LLM理解""" + text_parts = [f"搜索查询: {self.query}", f"找到 {self.total_count} 条相关信息"] + + if self.facts: + text_parts.append("\n### 相关事实:") + for i, fact in enumerate(self.facts, 1): + text_parts.append(f"{i}. {fact}") + + return "\n".join(text_parts) + + +@dataclass +class NodeInfo: + """节点信息""" + uuid: str + name: str + labels: List[str] + summary: str + attributes: Dict[str, Any] + + def to_dict(self) -> Dict[str, Any]: + return { + "uuid": self.uuid, + "name": self.name, + "labels": self.labels, + "summary": self.summary, + "attributes": self.attributes + } + + def to_text(self) -> str: + """转换为文本格式""" + entity_type = next((l for l in self.labels if l not in ["Entity", "Node"]), "未知类型") + return f"实体: {self.name} (类型: {entity_type})\n摘要: {self.summary}" + + +@dataclass +class EdgeInfo: + """边信息""" + uuid: str + name: str + fact: str + source_node_uuid: str + target_node_uuid: str + source_node_name: Optional[str] = None + target_node_name: Optional[str] = None + # 时间信息 + created_at: Optional[str] = None + valid_at: Optional[str] = None + invalid_at: Optional[str] = None + expired_at: Optional[str] = None + + def to_dict(self) -> Dict[str, Any]: + return { + "uuid": self.uuid, + "name": self.name, + "fact": self.fact, + "source_node_uuid": self.source_node_uuid, + "target_node_uuid": self.target_node_uuid, + "source_node_name": self.source_node_name, + "target_node_name": self.target_node_name, + "created_at": self.created_at, + "valid_at": self.valid_at, + "invalid_at": self.invalid_at, + "expired_at": self.expired_at + } + + def to_text(self, include_temporal: bool = False) -> str: + """转换为文本格式""" + source = self.source_node_name or self.source_node_uuid[:8] + target = self.target_node_name or self.target_node_uuid[:8] + base_text = f"关系: {source} --[{self.name}]--> {target}\n事实: {self.fact}" + + if include_temporal: + valid_at = self.valid_at or "未知" + invalid_at = self.invalid_at or "至今" + base_text += f"\n时效: {valid_at} - {invalid_at}" + if self.expired_at: + base_text += f" (已过期: {self.expired_at})" + + return base_text + + @property + def is_expired(self) -> bool: + """是否已过期""" + return self.expired_at is not None + + @property + def is_invalid(self) -> bool: + """是否已失效""" + return self.invalid_at is not None + + +@dataclass +class InsightForgeResult: + """ + 深度洞察检索结果 (InsightForge) + 包含多个子问题的检索结果,以及综合分析 + """ + query: str + simulation_requirement: str + sub_queries: List[str] + + # 各维度检索结果 + semantic_facts: List[str] = field(default_factory=list) # 语义搜索结果 + entity_insights: List[Dict[str, Any]] = field(default_factory=list) # 实体洞察 + relationship_chains: List[str] = field(default_factory=list) # 关系链 + + # 统计信息 + total_facts: int = 0 + total_entities: int = 0 + total_relationships: int = 0 + + def to_dict(self) -> Dict[str, Any]: + return { + "query": self.query, + "simulation_requirement": self.simulation_requirement, + "sub_queries": self.sub_queries, + "semantic_facts": self.semantic_facts, + "entity_insights": self.entity_insights, + "relationship_chains": self.relationship_chains, + "total_facts": self.total_facts, + "total_entities": self.total_entities, + "total_relationships": self.total_relationships + } + + def to_text(self) -> str: + """转换为详细的文本格式,供LLM理解""" + text_parts = [ + f"## 创业想法验证 · 深度检索分析", + f"分析问题: {self.query}", + f"验证场景(模拟需求): {self.simulation_requirement}", + f"\n### 模拟数据统计", + f"- 相关模拟事实: {self.total_facts}条", + f"- 涉及实体: {self.total_entities}个", + f"- 关系链: {self.total_relationships}条" + ] + + # 子问题 + if self.sub_queries: + text_parts.append(f"\n### 分析的子问题") + for i, sq in enumerate(self.sub_queries, 1): + text_parts.append(f"{i}. {sq}") + + # 语义搜索结果 + if self.semantic_facts: + text_parts.append(f"\n### 【关键事实】(请在报告中引用这些原文)") + for i, fact in enumerate(self.semantic_facts, 1): + text_parts.append(f"{i}. \"{fact}\"") + + # 实体洞察 + if self.entity_insights: + text_parts.append(f"\n### 【核心实体】") + for entity in self.entity_insights: + text_parts.append(f"- **{entity.get('name', '未知')}** ({entity.get('type', '实体')})") + if entity.get('summary'): + text_parts.append(f" 摘要: \"{entity.get('summary')}\"") + if entity.get('related_facts'): + text_parts.append(f" 相关事实: {len(entity.get('related_facts', []))}条") + + # 关系链 + if self.relationship_chains: + text_parts.append(f"\n### 【关系链】") + for chain in self.relationship_chains: + text_parts.append(f"- {chain}") + + return "\n".join(text_parts) + + +@dataclass +class PanoramaResult: + """ + 广度搜索结果 (Panorama) + 包含所有相关信息,包括过期内容 + """ + query: str + + # 全部节点 + all_nodes: List[NodeInfo] = field(default_factory=list) + # 全部边(包括过期的) + all_edges: List[EdgeInfo] = field(default_factory=list) + # 当前有效的事实 + active_facts: List[str] = field(default_factory=list) + # 已过期/失效的事实(历史记录) + historical_facts: List[str] = field(default_factory=list) + + # 统计 + total_nodes: int = 0 + total_edges: int = 0 + active_count: int = 0 + historical_count: int = 0 + + def to_dict(self) -> Dict[str, Any]: + return { + "query": self.query, + "all_nodes": [n.to_dict() for n in self.all_nodes], + "all_edges": [e.to_dict() for e in self.all_edges], + "active_facts": self.active_facts, + "historical_facts": self.historical_facts, + "total_nodes": self.total_nodes, + "total_edges": self.total_edges, + "active_count": self.active_count, + "historical_count": self.historical_count + } + + def to_text(self) -> str: + """转换为文本格式(完整版本,不截断)""" + text_parts = [ + f"## 广度搜索结果(未来全景视图)", + f"查询: {self.query}", + f"\n### 统计信息", + f"- 总节点数: {self.total_nodes}", + f"- 总边数: {self.total_edges}", + f"- 当前有效事实: {self.active_count}条", + f"- 历史/过期事实: {self.historical_count}条" + ] + + # 当前有效的事实(完整输出,不截断) + if self.active_facts: + text_parts.append(f"\n### 【当前有效事实】(模拟结果原文)") + for i, fact in enumerate(self.active_facts, 1): + text_parts.append(f"{i}. \"{fact}\"") + + # 历史/过期事实(完整输出,不截断) + if self.historical_facts: + text_parts.append(f"\n### 【历史/过期事实】(演变过程记录)") + for i, fact in enumerate(self.historical_facts, 1): + text_parts.append(f"{i}. \"{fact}\"") + + # 关键实体(完整输出,不截断) + if self.all_nodes: + text_parts.append(f"\n### 【涉及实体】") + for node in self.all_nodes: + entity_type = next((l for l in node.labels if l not in ["Entity", "Node"]), "实体") + text_parts.append(f"- **{node.name}** ({entity_type})") + + return "\n".join(text_parts) + + +@dataclass +class AgentInterview: + """单个Agent的采访结果""" + agent_name: str + agent_role: str # 角色类型(如:学生、教师、媒体等) + agent_bio: str # 简介 + question: str # 采访问题 + response: str # 采访回答 + key_quotes: List[str] = field(default_factory=list) # 关键引言 + + def to_dict(self) -> Dict[str, Any]: + return { + "agent_name": self.agent_name, + "agent_role": self.agent_role, + "agent_bio": self.agent_bio, + "question": self.question, + "response": self.response, + "key_quotes": self.key_quotes + } + + def to_text(self) -> str: + text = f"**{self.agent_name}** ({self.agent_role})\n" + # 显示完整的agent_bio,不截断 + text += f"_简介: {self.agent_bio}_\n\n" + text += f"**Q:** {self.question}\n\n" + text += f"**A:** {self.response}\n" + if self.key_quotes: + text += "\n**关键引言:**\n" + for quote in self.key_quotes: + # 清理各种引号 + clean_quote = quote.replace('\u201c', '').replace('\u201d', '').replace('"', '') + clean_quote = clean_quote.replace('\u300c', '').replace('\u300d', '') + clean_quote = clean_quote.strip() + # 去掉开头的标点 + while clean_quote and clean_quote[0] in ',,;;::、。!?\n\r\t ': + clean_quote = clean_quote[1:] + # 过滤包含问题编号的垃圾内容(问题1-9) + skip = False + for d in '123456789': + if f'\u95ee\u9898{d}' in clean_quote: + skip = True + break + if skip: + continue + # 截断过长内容(按句号截断,而非硬截断) + if len(clean_quote) > 150: + dot_pos = clean_quote.find('\u3002', 80) + if dot_pos > 0: + clean_quote = clean_quote[:dot_pos + 1] + else: + clean_quote = clean_quote[:147] + "..." + if clean_quote and len(clean_quote) >= 10: + text += f'> "{clean_quote}"\n' + return text + + +@dataclass +class InterviewResult: + """ + 采访结果 (Interview) + 包含多个模拟Agent的采访回答 + """ + interview_topic: str # 采访主题 + interview_questions: List[str] # 采访问题列表 + + # 采访选择的Agent + selected_agents: List[Dict[str, Any]] = field(default_factory=list) + # 各Agent的采访回答 + interviews: List[AgentInterview] = field(default_factory=list) + + # 选择Agent的理由 + selection_reasoning: str = "" + # 整合后的采访摘要 + summary: str = "" + + # 统计 + total_agents: int = 0 + interviewed_count: int = 0 + + def to_dict(self) -> Dict[str, Any]: + return { + "interview_topic": self.interview_topic, + "interview_questions": self.interview_questions, + "selected_agents": self.selected_agents, + "interviews": [i.to_dict() for i in self.interviews], + "selection_reasoning": self.selection_reasoning, + "summary": self.summary, + "total_agents": self.total_agents, + "interviewed_count": self.interviewed_count + } + + def to_text(self) -> str: + """转换为详细的文本格式,供LLM理解和报告引用""" + text_parts = [ + "## 深度采访报告", + f"**采访主题:** {self.interview_topic}", + f"**采访人数:** {self.interviewed_count} / {self.total_agents} 位模拟Agent", + "\n### 采访对象选择理由", + self.selection_reasoning or "(自动选择)", + "\n---", + "\n### 采访实录", + ] + + if self.interviews: + for i, interview in enumerate(self.interviews, 1): + text_parts.append(f"\n#### 采访 #{i}: {interview.agent_name}") + text_parts.append(interview.to_text()) + text_parts.append("\n---") + else: + text_parts.append("(无采访记录)\n\n---") + + text_parts.append("\n### 采访摘要与核心观点") + text_parts.append(self.summary or "(无摘要)") + + return "\n".join(text_parts) + + +class ZepToolsService: + """ + Zep检索工具服务 + + 【核心检索工具 - 优化后】 + 1. insight_forge - 深度洞察检索(最强大,自动生成子问题,多维度检索) + 2. panorama_search - 广度搜索(获取全貌,包括过期内容) + 3. quick_search - 简单搜索(快速检索) + 4. interview_agents - 深度采访(采访模拟Agent,获取多视角观点) + + 【基础工具】 + - search_graph - 图谱语义搜索 + - get_all_nodes - 获取图谱所有节点 + - get_all_edges - 获取图谱所有边(含时间信息) + - get_node_detail - 获取节点详细信息 + - get_node_edges - 获取节点相关的边 + - get_entities_by_type - 按类型获取实体 + - get_entity_summary - 获取实体的关系摘要 + """ + + # 重试配置 + MAX_RETRIES = 3 + RETRY_DELAY = 2.0 + + def __init__(self, api_key: Optional[str] = None, llm_client: Optional[LLMClient] = None): + self._fixed_api_key = (api_key or "").strip() or None + if self._fixed_api_key: + self.api_key = self._fixed_api_key + elif Config.get_zep_api_keys(): + self.api_key = Config.get_zep_api_keys()[0] + else: + raise ValueError("ZEP_API_KEY 未配置") + # LLM客户端用于InsightForge生成子问题 + self._llm_client = llm_client + logger.info("ZepToolsService 初始化完成") + + @property + def client(self) -> Zep: + if self._fixed_api_key: + return Zep(api_key=self._fixed_api_key) + k = get_zep_key() + if not k: + raise ValueError("ZEP_API_KEY 未配置") + return Zep(api_key=k) + + @property + def llm(self) -> LLMClient: + """延迟初始化LLM客户端""" + if self._llm_client is None: + self._llm_client = LLMClient() + return self._llm_client + + def _call_with_retry(self, func, operation_name: str, max_retries: int = None): + """带重试机制的API调用""" + max_retries = max_retries or self.MAX_RETRIES + last_exception = None + delay = self.RETRY_DELAY + + for attempt in range(max_retries): + try: + return call_with_limit_rotation(func) + except Exception as e: + last_exception = e + if attempt < max_retries - 1: + logger.warning( + f"Zep {operation_name} 第 {attempt + 1} 次尝试失败: {str(e)[:100]}, " + f"{delay:.1f}秒后重试..." + ) + time.sleep(delay) + delay *= 2 + else: + logger.error(f"Zep {operation_name} 在 {max_retries} 次尝试后仍失败: {str(e)}") + + raise last_exception + + def search_graph( + self, + graph_id: str, + query: str, + limit: int = 10, + scope: str = "edges" + ) -> SearchResult: + """ + 图谱语义搜索 + + 使用混合搜索(语义+BM25)在图谱中搜索相关信息。 + 如果Zep Cloud的search API不可用,则降级为本地关键词匹配。 + + Args: + graph_id: 图谱ID (Standalone Graph) + query: 搜索查询 + limit: 返回结果数量 + scope: 搜索范围,"edges" 或 "nodes" + + Returns: + SearchResult: 搜索结果 + """ + logger.info(f"图谱搜索: graph_id={graph_id}, query={query[:50]}...") + + # 尝试使用Zep Cloud Search API + try: + search_results = self._call_with_retry( + func=lambda: self.client.graph.search( + graph_id=graph_id, + query=query, + limit=limit, + scope=scope, + reranker="cross_encoder" + ), + operation_name=f"图谱搜索(graph={graph_id})" + ) + + facts = [] + edges = [] + nodes = [] + + # 解析边搜索结果 + if hasattr(search_results, 'edges') and search_results.edges: + for edge in search_results.edges: + if hasattr(edge, 'fact') and edge.fact: + facts.append(edge.fact) + edges.append({ + "uuid": getattr(edge, 'uuid_', None) or getattr(edge, 'uuid', ''), + "name": getattr(edge, 'name', ''), + "fact": getattr(edge, 'fact', ''), + "source_node_uuid": getattr(edge, 'source_node_uuid', ''), + "target_node_uuid": getattr(edge, 'target_node_uuid', ''), + }) + + # 解析节点搜索结果 + if hasattr(search_results, 'nodes') and search_results.nodes: + for node in search_results.nodes: + nodes.append({ + "uuid": getattr(node, 'uuid_', None) or getattr(node, 'uuid', ''), + "name": getattr(node, 'name', ''), + "labels": getattr(node, 'labels', []), + "summary": getattr(node, 'summary', ''), + }) + # 节点摘要也算作事实 + if hasattr(node, 'summary') and node.summary: + facts.append(f"[{node.name}]: {node.summary}") + + logger.info(f"搜索完成: 找到 {len(facts)} 条相关事实") + + return SearchResult( + facts=facts, + edges=edges, + nodes=nodes, + query=query, + total_count=len(facts) + ) + + except Exception as e: + logger.warning(f"Zep Search API失败,降级为本地搜索: {str(e)}") + # 降级:使用本地关键词匹配搜索 + return self._local_search(graph_id, query, limit, scope) + + def _local_search( + self, + graph_id: str, + query: str, + limit: int = 10, + scope: str = "edges" + ) -> SearchResult: + """ + 本地关键词匹配搜索(作为Zep Search API的降级方案) + + 获取所有边/节点,然后在本地进行关键词匹配 + + Args: + graph_id: 图谱ID + query: 搜索查询 + limit: 返回结果数量 + scope: 搜索范围 + + Returns: + SearchResult: 搜索结果 + """ + logger.info(f"使用本地搜索: query={query[:30]}...") + + facts = [] + edges_result = [] + nodes_result = [] + + # 提取查询关键词(简单分词) + query_lower = query.lower() + keywords = [w.strip() for w in query_lower.replace(',', ' ').replace(',', ' ').split() if len(w.strip()) > 1] + + def match_score(text: str) -> int: + """计算文本与查询的匹配分数""" + if not text: + return 0 + text_lower = text.lower() + # 完全匹配查询 + if query_lower in text_lower: + return 100 + # 关键词匹配 + score = 0 + for keyword in keywords: + if keyword in text_lower: + score += 10 + return score + + try: + if scope in ["edges", "both"]: + # 获取所有边并匹配 + all_edges = self.get_all_edges(graph_id) + scored_edges = [] + for edge in all_edges: + score = match_score(edge.fact) + match_score(edge.name) + if score > 0: + scored_edges.append((score, edge)) + + # 按分数排序 + scored_edges.sort(key=lambda x: x[0], reverse=True) + + for score, edge in scored_edges[:limit]: + if edge.fact: + facts.append(edge.fact) + edges_result.append({ + "uuid": edge.uuid, + "name": edge.name, + "fact": edge.fact, + "source_node_uuid": edge.source_node_uuid, + "target_node_uuid": edge.target_node_uuid, + }) + + if scope in ["nodes", "both"]: + # 获取所有节点并匹配 + all_nodes = self.get_all_nodes(graph_id) + scored_nodes = [] + for node in all_nodes: + score = match_score(node.name) + match_score(node.summary) + if score > 0: + scored_nodes.append((score, node)) + + scored_nodes.sort(key=lambda x: x[0], reverse=True) + + for score, node in scored_nodes[:limit]: + nodes_result.append({ + "uuid": node.uuid, + "name": node.name, + "labels": node.labels, + "summary": node.summary, + }) + if node.summary: + facts.append(f"[{node.name}]: {node.summary}") + + logger.info(f"本地搜索完成: 找到 {len(facts)} 条相关事实") + + except Exception as e: + logger.error(f"本地搜索失败: {str(e)}") + + return SearchResult( + facts=facts, + edges=edges_result, + nodes=nodes_result, + query=query, + total_count=len(facts) + ) + + def get_all_nodes(self, graph_id: str) -> List[NodeInfo]: + """ + 获取图谱的所有节点(分页获取) + + Args: + graph_id: 图谱ID + + Returns: + 节点列表 + """ + logger.info(f"获取图谱 {graph_id} 的所有节点...") + + nodes = call_with_limit_rotation(lambda: fetch_all_nodes(self.client, graph_id)) + + result = [] + for node in nodes: + node_uuid = getattr(node, 'uuid_', None) or getattr(node, 'uuid', None) or "" + result.append(NodeInfo( + uuid=str(node_uuid) if node_uuid else "", + name=node.name or "", + labels=node.labels or [], + summary=node.summary or "", + attributes=node.attributes or {} + )) + + logger.info(f"获取到 {len(result)} 个节点") + return result + + def get_all_edges(self, graph_id: str, include_temporal: bool = True) -> List[EdgeInfo]: + """ + 获取图谱的所有边(分页获取,包含时间信息) + + Args: + graph_id: 图谱ID + include_temporal: 是否包含时间信息(默认True) + + Returns: + 边列表(包含created_at, valid_at, invalid_at, expired_at) + """ + logger.info(f"获取图谱 {graph_id} 的所有边...") + + edges = call_with_limit_rotation(lambda: fetch_all_edges(self.client, graph_id)) + + result = [] + for edge in edges: + edge_uuid = getattr(edge, 'uuid_', None) or getattr(edge, 'uuid', None) or "" + edge_info = EdgeInfo( + uuid=str(edge_uuid) if edge_uuid else "", + name=edge.name or "", + fact=edge.fact or "", + source_node_uuid=edge.source_node_uuid or "", + target_node_uuid=edge.target_node_uuid or "" + ) + + # 添加时间信息 + if include_temporal: + edge_info.created_at = getattr(edge, 'created_at', None) + edge_info.valid_at = getattr(edge, 'valid_at', None) + edge_info.invalid_at = getattr(edge, 'invalid_at', None) + edge_info.expired_at = getattr(edge, 'expired_at', None) + + result.append(edge_info) + + logger.info(f"获取到 {len(result)} 条边") + return result + + def get_node_detail(self, node_uuid: str) -> Optional[NodeInfo]: + """ + 获取单个节点的详细信息 + + Args: + node_uuid: 节点UUID + + Returns: + 节点信息或None + """ + logger.info(f"获取节点详情: {node_uuid[:8]}...") + + try: + node = self._call_with_retry( + func=lambda: self.client.graph.node.get(uuid_=node_uuid), + operation_name=f"获取节点详情(uuid={node_uuid[:8]}...)" + ) + + if not node: + return None + + return NodeInfo( + uuid=getattr(node, 'uuid_', None) or getattr(node, 'uuid', ''), + name=node.name or "", + labels=node.labels or [], + summary=node.summary or "", + attributes=node.attributes or {} + ) + except Exception as e: + logger.error(f"获取节点详情失败: {str(e)}") + return None + + def get_node_edges(self, graph_id: str, node_uuid: str) -> List[EdgeInfo]: + """ + 获取节点相关的所有边 + + 通过获取图谱所有边,然后过滤出与指定节点相关的边 + + Args: + graph_id: 图谱ID + node_uuid: 节点UUID + + Returns: + 边列表 + """ + logger.info(f"获取节点 {node_uuid[:8]}... 的相关边") + + try: + # 获取图谱所有边,然后过滤 + all_edges = self.get_all_edges(graph_id) + + result = [] + for edge in all_edges: + # 检查边是否与指定节点相关(作为源或目标) + if edge.source_node_uuid == node_uuid or edge.target_node_uuid == node_uuid: + result.append(edge) + + logger.info(f"找到 {len(result)} 条与节点相关的边") + return result + + except Exception as e: + logger.warning(f"获取节点边失败: {str(e)}") + return [] + + def get_entities_by_type( + self, + graph_id: str, + entity_type: str + ) -> List[NodeInfo]: + """ + 按类型获取实体 + + Args: + graph_id: 图谱ID + entity_type: 实体类型(如 Student, PublicFigure 等) + + Returns: + 符合类型的实体列表 + """ + logger.info(f"获取类型为 {entity_type} 的实体...") + + all_nodes = self.get_all_nodes(graph_id) + + filtered = [] + for node in all_nodes: + # 检查labels是否包含指定类型 + if entity_type in node.labels: + filtered.append(node) + + logger.info(f"找到 {len(filtered)} 个 {entity_type} 类型的实体") + return filtered + + def get_entity_summary( + self, + graph_id: str, + entity_name: str + ) -> Dict[str, Any]: + """ + 获取指定实体的关系摘要 + + 搜索与该实体相关的所有信息,并生成摘要 + + Args: + graph_id: 图谱ID + entity_name: 实体名称 + + Returns: + 实体摘要信息 + """ + logger.info(f"获取实体 {entity_name} 的关系摘要...") + + # 先搜索该实体相关的信息 + search_result = self.search_graph( + graph_id=graph_id, + query=entity_name, + limit=20 + ) + + # 尝试在所有节点中找到该实体 + all_nodes = self.get_all_nodes(graph_id) + entity_node = None + for node in all_nodes: + if node.name.lower() == entity_name.lower(): + entity_node = node + break + + related_edges = [] + if entity_node: + # 传入graph_id参数 + related_edges = self.get_node_edges(graph_id, entity_node.uuid) + + return { + "entity_name": entity_name, + "entity_info": entity_node.to_dict() if entity_node else None, + "related_facts": search_result.facts, + "related_edges": [e.to_dict() for e in related_edges], + "total_relations": len(related_edges) + } + + def get_graph_statistics(self, graph_id: str) -> Dict[str, Any]: + """ + 获取图谱的统计信息 + + Args: + graph_id: 图谱ID + + Returns: + 统计信息 + """ + logger.info(f"获取图谱 {graph_id} 的统计信息...") + + nodes = self.get_all_nodes(graph_id) + edges = self.get_all_edges(graph_id) + + # 统计实体类型分布 + entity_types = {} + for node in nodes: + for label in node.labels: + if label not in ["Entity", "Node"]: + entity_types[label] = entity_types.get(label, 0) + 1 + + # 统计关系类型分布 + relation_types = {} + for edge in edges: + relation_types[edge.name] = relation_types.get(edge.name, 0) + 1 + + return { + "graph_id": graph_id, + "total_nodes": len(nodes), + "total_edges": len(edges), + "entity_types": entity_types, + "relation_types": relation_types + } + + def get_simulation_context( + self, + graph_id: str, + simulation_requirement: str, + limit: int = 30 + ) -> Dict[str, Any]: + """ + 获取模拟相关的上下文信息 + + 综合搜索与模拟需求相关的所有信息 + + Args: + graph_id: 图谱ID + simulation_requirement: 模拟需求描述 + limit: 每类信息的数量限制 + + Returns: + 模拟上下文信息 + """ + logger.info(f"获取模拟上下文: {simulation_requirement[:50]}...") + + # 搜索与模拟需求相关的信息 + search_result = self.search_graph( + graph_id=graph_id, + query=simulation_requirement, + limit=limit + ) + + # 获取图谱统计 + stats = self.get_graph_statistics(graph_id) + + # 获取所有实体节点 + all_nodes = self.get_all_nodes(graph_id) + + # 筛选有实际类型的实体(非纯Entity节点) + entities = [] + for node in all_nodes: + custom_labels = [l for l in node.labels if l not in ["Entity", "Node"]] + if custom_labels: + entities.append({ + "name": node.name, + "type": custom_labels[0], + "summary": node.summary + }) + + return { + "simulation_requirement": simulation_requirement, + "related_facts": search_result.facts, + "graph_statistics": stats, + "entities": entities[:limit], # 限制数量 + "total_entities": len(entities) + } + + # ========== 核心检索工具(优化后) ========== + + def insight_forge( + self, + graph_id: str, + query: str, + simulation_requirement: str, + report_context: str = "", + max_sub_queries: int = 5 + ) -> InsightForgeResult: + """ + 【InsightForge - 深度洞察检索】 + + 最强大的混合检索函数,自动分解问题并多维度检索: + 1. 使用LLM将问题分解为多个子问题 + 2. 对每个子问题进行语义搜索 + 3. 提取相关实体并获取其详细信息 + 4. 追踪关系链 + 5. 整合所有结果,生成深度洞察 + + Args: + graph_id: 图谱ID + query: 用户问题 + simulation_requirement: 模拟需求描述 + report_context: 报告上下文(可选,用于更精准的子问题生成) + max_sub_queries: 最大子问题数量 + + Returns: + InsightForgeResult: 深度洞察检索结果 + """ + logger.info(f"InsightForge 深度洞察检索: {query[:50]}...") + + result = InsightForgeResult( + query=query, + simulation_requirement=simulation_requirement, + sub_queries=[] + ) + + # Step 1: 使用LLM生成子问题 + sub_queries = self._generate_sub_queries( + query=query, + simulation_requirement=simulation_requirement, + report_context=report_context, + max_queries=max_sub_queries + ) + result.sub_queries = sub_queries + logger.info(f"生成 {len(sub_queries)} 个子问题") + + # Step 2: 对每个子问题进行语义搜索 + all_facts = [] + all_edges = [] + seen_facts = set() + + for sub_query in sub_queries: + search_result = self.search_graph( + graph_id=graph_id, + query=sub_query, + limit=15, + scope="edges" + ) + + for fact in search_result.facts: + if fact not in seen_facts: + all_facts.append(fact) + seen_facts.add(fact) + + all_edges.extend(search_result.edges) + + # 对原始问题也进行搜索 + main_search = self.search_graph( + graph_id=graph_id, + query=query, + limit=20, + scope="edges" + ) + for fact in main_search.facts: + if fact not in seen_facts: + all_facts.append(fact) + seen_facts.add(fact) + + result.semantic_facts = all_facts + result.total_facts = len(all_facts) + + # Step 3: 从边中提取相关实体UUID,只获取这些实体的信息(不获取全部节点) + entity_uuids = set() + for edge_data in all_edges: + if isinstance(edge_data, dict): + source_uuid = edge_data.get('source_node_uuid', '') + target_uuid = edge_data.get('target_node_uuid', '') + if source_uuid: + entity_uuids.add(source_uuid) + if target_uuid: + entity_uuids.add(target_uuid) + + # 获取所有相关实体的详情(不限制数量,完整输出) + entity_insights = [] + node_map = {} # 用于后续关系链构建 + + for uuid in list(entity_uuids): # 处理所有实体,不截断 + if not uuid: + continue + try: + # 单独获取每个相关节点的信息 + node = self.get_node_detail(uuid) + if node: + node_map[uuid] = node + entity_type = next((l for l in node.labels if l not in ["Entity", "Node"]), "实体") + + # 获取该实体相关的所有事实(不截断) + related_facts = [ + f for f in all_facts + if node.name.lower() in f.lower() + ] + + entity_insights.append({ + "uuid": node.uuid, + "name": node.name, + "type": entity_type, + "summary": node.summary, + "related_facts": related_facts # 完整输出,不截断 + }) + except Exception as e: + logger.debug(f"获取节点 {uuid} 失败: {e}") + continue + + result.entity_insights = entity_insights + result.total_entities = len(entity_insights) + + # Step 4: 构建所有关系链(不限制数量) + relationship_chains = [] + for edge_data in all_edges: # 处理所有边,不截断 + if isinstance(edge_data, dict): + source_uuid = edge_data.get('source_node_uuid', '') + target_uuid = edge_data.get('target_node_uuid', '') + relation_name = edge_data.get('name', '') + + source_name = node_map.get(source_uuid, NodeInfo('', '', [], '', {})).name or source_uuid[:8] + target_name = node_map.get(target_uuid, NodeInfo('', '', [], '', {})).name or target_uuid[:8] + + chain = f"{source_name} --[{relation_name}]--> {target_name}" + if chain not in relationship_chains: + relationship_chains.append(chain) + + result.relationship_chains = relationship_chains + result.total_relationships = len(relationship_chains) + + logger.info(f"InsightForge完成: {result.total_facts}条事实, {result.total_entities}个实体, {result.total_relationships}条关系") + return result + + def _generate_sub_queries( + self, + query: str, + simulation_requirement: str, + report_context: str = "", + max_queries: int = 5 + ) -> List[str]: + """ + 使用LLM生成子问题 + + 将复杂问题分解为多个可以独立检索的子问题 + """ + system_prompt = """你是一个专业的问题分析专家。你的任务是将一个复杂问题分解为多个可以在模拟世界中独立观察的子问题。 +默认模拟场景为「创业想法验证」:Agent 可能包括投资人、同行创始人、目标客户、犹豫用户、竞品关注者等。 + +要求: +1. 每个子问题应该足够具体,可以在模拟世界中找到相关的Agent行为或事件 +2. 子问题应覆盖验证维度:付费/采用意愿、投资兴趣、竞争与差异化、风险与反对意见、传播与口碑等(按问题相关性选取) +3. 子问题应该与模拟场景相关 +4. 返回JSON格式:{"sub_queries": ["子问题1", "子问题2", ...]}""" + + user_prompt = f"""模拟需求背景: +{simulation_requirement} + +{f"报告上下文:{report_context[:500]}" if report_context else ""} + +请将以下问题分解为{max_queries}个子问题: +{query} + +返回JSON格式的子问题列表。""" + + try: + response = self.llm.chat_json( + messages=[ + {"role": "system", "content": system_prompt}, + {"role": "user", "content": user_prompt} + ], + temperature=0.3 + ) + + sub_queries = response.get("sub_queries", []) + # 确保是字符串列表 + return [str(sq) for sq in sub_queries[:max_queries]] + + except Exception as e: + logger.warning(f"生成子问题失败: {str(e)},使用默认子问题") + # 降级:返回基于原问题的变体 + return [ + query, + f"{query} 的主要参与者", + f"{query} 的原因和影响", + f"{query} 的发展过程" + ][:max_queries] + + def panorama_search( + self, + graph_id: str, + query: str, + include_expired: bool = True, + limit: int = 50 + ) -> PanoramaResult: + """ + 【PanoramaSearch - 广度搜索】 + + 获取全貌视图,包括所有相关内容和历史/过期信息: + 1. 获取所有相关节点 + 2. 获取所有边(包括已过期/失效的) + 3. 分类整理当前有效和历史信息 + + 这个工具适用于需要了解事件全貌、追踪演变过程的场景。 + + Args: + graph_id: 图谱ID + query: 搜索查询(用于相关性排序) + include_expired: 是否包含过期内容(默认True) + limit: 返回结果数量限制 + + Returns: + PanoramaResult: 广度搜索结果 + """ + logger.info(f"PanoramaSearch 广度搜索: {query[:50]}...") + + result = PanoramaResult(query=query) + + # 获取所有节点 + all_nodes = self.get_all_nodes(graph_id) + node_map = {n.uuid: n for n in all_nodes} + result.all_nodes = all_nodes + result.total_nodes = len(all_nodes) + + # 获取所有边(包含时间信息) + all_edges = self.get_all_edges(graph_id, include_temporal=True) + result.all_edges = all_edges + result.total_edges = len(all_edges) + + # 分类事实 + active_facts = [] + historical_facts = [] + + for edge in all_edges: + if not edge.fact: + continue + + # 为事实添加实体名称 + source_name = node_map.get(edge.source_node_uuid, NodeInfo('', '', [], '', {})).name or edge.source_node_uuid[:8] + target_name = node_map.get(edge.target_node_uuid, NodeInfo('', '', [], '', {})).name or edge.target_node_uuid[:8] + + # 判断是否过期/失效 + is_historical = edge.is_expired or edge.is_invalid + + if is_historical: + # 历史/过期事实,添加时间标记 + valid_at = edge.valid_at or "未知" + invalid_at = edge.invalid_at or edge.expired_at or "未知" + fact_with_time = f"[{valid_at} - {invalid_at}] {edge.fact}" + historical_facts.append(fact_with_time) + else: + # 当前有效事实 + active_facts.append(edge.fact) + + # 基于查询进行相关性排序 + query_lower = query.lower() + keywords = [w.strip() for w in query_lower.replace(',', ' ').replace(',', ' ').split() if len(w.strip()) > 1] + + def relevance_score(fact: str) -> int: + fact_lower = fact.lower() + score = 0 + if query_lower in fact_lower: + score += 100 + for kw in keywords: + if kw in fact_lower: + score += 10 + return score + + # 排序并限制数量 + active_facts.sort(key=relevance_score, reverse=True) + historical_facts.sort(key=relevance_score, reverse=True) + + result.active_facts = active_facts[:limit] + result.historical_facts = historical_facts[:limit] if include_expired else [] + result.active_count = len(active_facts) + result.historical_count = len(historical_facts) + + logger.info(f"PanoramaSearch完成: {result.active_count}条有效, {result.historical_count}条历史") + return result + + def quick_search( + self, + graph_id: str, + query: str, + limit: int = 10 + ) -> SearchResult: + """ + 【QuickSearch - 简单搜索】 + + 快速、轻量级的检索工具: + 1. 直接调用Zep语义搜索 + 2. 返回最相关的结果 + 3. 适用于简单、直接的检索需求 + + Args: + graph_id: 图谱ID + query: 搜索查询 + limit: 返回结果数量 + + Returns: + SearchResult: 搜索结果 + """ + logger.info(f"QuickSearch 简单搜索: {query[:50]}...") + + # 直接调用现有的search_graph方法 + result = self.search_graph( + graph_id=graph_id, + query=query, + limit=limit, + scope="edges" + ) + + logger.info(f"QuickSearch完成: {result.total_count}条结果") + return result + + def interview_agents( + self, + simulation_id: str, + interview_requirement: str, + simulation_requirement: str = "", + max_agents: int = 5, + custom_questions: List[str] = None + ) -> InterviewResult: + """ + 【InterviewAgents - 深度采访】 + + 调用真实的OASIS采访API,采访模拟中正在运行的Agent: + 1. 自动读取人设文件,了解所有模拟Agent + 2. 使用LLM分析采访需求,智能选择最相关的Agent + 3. 使用LLM生成采访问题 + 4. 调用 /api/simulation/interview/batch 接口进行真实采访(双平台同时采访) + 5. 整合所有采访结果,生成采访报告 + + 【重要】此功能需要模拟环境处于运行状态(OASIS环境未关闭) + + 【使用场景】 + - 需要从不同角色视角了解事件看法 + - 需要收集多方意见和观点 + - 需要获取模拟Agent的真实回答(非LLM模拟) + + Args: + simulation_id: 模拟ID(用于定位人设文件和调用采访API) + interview_requirement: 采访需求描述(非结构化,如"了解学生对事件的看法") + simulation_requirement: 模拟需求背景(可选) + max_agents: 最多采访的Agent数量 + custom_questions: 自定义采访问题(可选,若不提供则自动生成) + + Returns: + InterviewResult: 采访结果 + """ + from .simulation_runner import SimulationRunner + + logger.info(f"InterviewAgents 深度采访(真实API): {interview_requirement[:50]}...") + + result = InterviewResult( + interview_topic=interview_requirement, + interview_questions=custom_questions or [] + ) + + # Step 1: 读取人设文件 + profiles = self._load_agent_profiles(simulation_id) + + if not profiles: + logger.warning(f"未找到模拟 {simulation_id} 的人设文件") + result.summary = "未找到可采访的Agent人设文件" + return result + + result.total_agents = len(profiles) + logger.info(f"加载到 {len(profiles)} 个Agent人设") + + # Step 2: 使用LLM选择要采访的Agent(返回agent_id列表) + selected_agents, selected_indices, selection_reasoning = self._select_agents_for_interview( + profiles=profiles, + interview_requirement=interview_requirement, + simulation_requirement=simulation_requirement, + max_agents=max_agents + ) + + result.selected_agents = selected_agents + result.selection_reasoning = selection_reasoning + logger.info(f"选择了 {len(selected_agents)} 个Agent进行采访: {selected_indices}") + + # Step 3: 生成采访问题(如果没有提供) + if not result.interview_questions: + result.interview_questions = self._generate_interview_questions( + interview_requirement=interview_requirement, + simulation_requirement=simulation_requirement, + selected_agents=selected_agents + ) + logger.info(f"生成了 {len(result.interview_questions)} 个采访问题") + + # 将问题合并为一个采访prompt + combined_prompt = "\n".join([f"{i+1}. {q}" for i, q in enumerate(result.interview_questions)]) + + # 添加优化前缀,约束Agent回复格式 + INTERVIEW_PROMPT_PREFIX = ( + "你正在接受一次与「创业想法验证」相关的采访。请结合你的人设、所有的过往记忆与行动," + "以纯文本方式直接回答以下问题(保持人设:投资人/创始人/客户/犹豫者等)。\n" + "回复要求:\n" + "1. 直接用自然语言回答,不要调用任何工具\n" + "2. 不要返回JSON格式或工具调用格式\n" + "3. 不要使用Markdown标题(如#、##、###)\n" + "4. 按问题编号逐一回答,每个回答以「问题X:」开头(X为问题编号)\n" + "5. 每个问题的回答之间用空行分隔\n" + "6. 回答要有实质内容,每个问题至少回答2-3句话;若你是投资人请明确投资态度线索,若你是客户请明确购买意愿线索\n\n" + ) + optimized_prompt = f"{INTERVIEW_PROMPT_PREFIX}{combined_prompt}" + + # Step 4: 调用真实的采访API(不指定platform,默认双平台同时采访) + try: + # 构建批量采访列表(不指定platform,双平台采访) + interviews_request = [] + for agent_idx in selected_indices: + interviews_request.append({ + "agent_id": agent_idx, + "prompt": optimized_prompt # 使用优化后的prompt + # 不指定platform,API会在twitter和reddit两个平台都采访 + }) + + logger.info(f"调用批量采访API(双平台): {len(interviews_request)} 个Agent") + + # 调用 SimulationRunner 的批量采访方法(不传platform,双平台采访) + api_result = SimulationRunner.interview_agents_batch( + simulation_id=simulation_id, + interviews=interviews_request, + platform=None, # 不指定platform,双平台采访 + timeout=180.0 # 双平台需要更长超时 + ) + + logger.info(f"采访API返回: {api_result.get('interviews_count', 0)} 个结果, success={api_result.get('success')}") + + # 检查API调用是否成功 + if not api_result.get("success", False): + error_msg = api_result.get("error", "未知错误") + logger.warning(f"采访API返回失败: {error_msg}") + result.summary = f"采访API调用失败:{error_msg}。请检查OASIS模拟环境状态。" + return result + + # Step 5: 解析API返回结果,构建AgentInterview对象 + # 双平台模式返回格式: {"twitter_0": {...}, "reddit_0": {...}, "twitter_1": {...}, ...} + api_data = api_result.get("result", {}) + results_dict = api_data.get("results", {}) if isinstance(api_data, dict) else {} + + for i, agent_idx in enumerate(selected_indices): + agent = selected_agents[i] + agent_name = agent.get("realname", agent.get("username", f"Agent_{agent_idx}")) + agent_role = agent.get("profession", "未知") + agent_bio = agent.get("bio", "") + + # 获取该Agent在两个平台的采访结果 + twitter_result = results_dict.get(f"twitter_{agent_idx}", {}) + reddit_result = results_dict.get(f"reddit_{agent_idx}", {}) + + twitter_response = twitter_result.get("response", "") + reddit_response = reddit_result.get("response", "") + + # 清理可能的工具调用 JSON 包裹 + twitter_response = self._clean_tool_call_response(twitter_response) + reddit_response = self._clean_tool_call_response(reddit_response) + + # 始终输出双平台标记 + twitter_text = twitter_response if twitter_response else "(该平台未获得回复)" + reddit_text = reddit_response if reddit_response else "(该平台未获得回复)" + response_text = f"【Twitter平台回答】\n{twitter_text}\n\n【Reddit平台回答】\n{reddit_text}" + + # 提取关键引言(从两个平台的回答中) + import re + combined_responses = f"{twitter_response} {reddit_response}" + + # 清理响应文本:去掉标记、编号、Markdown 等干扰 + clean_text = re.sub(r'#{1,6}\s+', '', combined_responses) + clean_text = re.sub(r'\{[^}]*tool_name[^}]*\}', '', clean_text) + clean_text = re.sub(r'[*_`|>~\-]{2,}', '', clean_text) + clean_text = re.sub(r'问题\d+[::]\s*', '', clean_text) + clean_text = re.sub(r'【[^】]+】', '', clean_text) + + # 策略1(主): 提取完整的有实质内容的句子 + sentences = re.split(r'[。!?]', clean_text) + meaningful = [ + s.strip() for s in sentences + if 20 <= len(s.strip()) <= 150 + and not re.match(r'^[\s\W,,;;::、]+', s.strip()) + and not s.strip().startswith(('{', '问题')) + ] + meaningful.sort(key=len, reverse=True) + key_quotes = [s + "。" for s in meaningful[:3]] + + # 策略2(补充): 正确配对的中文引号「」内长文本 + if not key_quotes: + paired = re.findall(r'\u201c([^\u201c\u201d]{15,100})\u201d', clean_text) + paired += re.findall(r'\u300c([^\u300c\u300d]{15,100})\u300d', clean_text) + key_quotes = [q for q in paired if not re.match(r'^[,,;;::、]', q)][:3] + + interview = AgentInterview( + agent_name=agent_name, + agent_role=agent_role, + agent_bio=agent_bio[:1000], # 扩大bio长度限制 + question=combined_prompt, + response=response_text, + key_quotes=key_quotes[:5] + ) + result.interviews.append(interview) + + result.interviewed_count = len(result.interviews) + + except ValueError as e: + # 模拟环境未运行 + logger.warning(f"采访API调用失败(环境未运行?): {e}") + result.summary = f"采访失败:{str(e)}。模拟环境可能已关闭,请确保OASIS环境正在运行。" + return result + except Exception as e: + logger.error(f"采访API调用异常: {e}") + import traceback + logger.error(traceback.format_exc()) + result.summary = f"采访过程发生错误:{str(e)}" + return result + + # Step 6: 生成采访摘要 + if result.interviews: + result.summary = self._generate_interview_summary( + interviews=result.interviews, + interview_requirement=interview_requirement + ) + + logger.info(f"InterviewAgents完成: 采访了 {result.interviewed_count} 个Agent(双平台)") + return result + + @staticmethod + def _clean_tool_call_response(response: str) -> str: + """清理 Agent 回复中的 JSON 工具调用包裹,提取实际内容""" + if not response or not response.strip().startswith('{'): + return response + text = response.strip() + if 'tool_name' not in text[:80]: + return response + import re as _re + try: + data = json.loads(text) + if isinstance(data, dict) and 'arguments' in data: + for key in ('content', 'text', 'body', 'message', 'reply'): + if key in data['arguments']: + return str(data['arguments'][key]) + except (json.JSONDecodeError, KeyError, TypeError): + match = _re.search(r'"content"\s*:\s*"((?:[^"\\]|\\.)*)"', text) + if match: + return match.group(1).replace('\\n', '\n').replace('\\"', '"') + return response + + def _load_agent_profiles(self, simulation_id: str) -> List[Dict[str, Any]]: + """加载模拟的Agent人设文件""" + import os + import csv + + # 构建人设文件路径 + sim_dir = os.path.join( + os.path.dirname(__file__), + f'../../uploads/simulations/{simulation_id}' + ) + + profiles = [] + + # 优先尝试读取Reddit JSON格式 + reddit_profile_path = os.path.join(sim_dir, "reddit_profiles.json") + if os.path.exists(reddit_profile_path): + try: + with open(reddit_profile_path, 'r', encoding='utf-8') as f: + profiles = json.load(f) + logger.info(f"从 reddit_profiles.json 加载了 {len(profiles)} 个人设") + return profiles + except Exception as e: + logger.warning(f"读取 reddit_profiles.json 失败: {e}") + + # 尝试读取Twitter CSV格式 + twitter_profile_path = os.path.join(sim_dir, "twitter_profiles.csv") + if os.path.exists(twitter_profile_path): + try: + with open(twitter_profile_path, 'r', encoding='utf-8') as f: + reader = csv.DictReader(f) + for row in reader: + # CSV格式转换为统一格式 + profiles.append({ + "realname": row.get("name", ""), + "username": row.get("username", ""), + "bio": row.get("description", ""), + "persona": row.get("user_char", ""), + "profession": "未知" + }) + logger.info(f"从 twitter_profiles.csv 加载了 {len(profiles)} 个人设") + return profiles + except Exception as e: + logger.warning(f"读取 twitter_profiles.csv 失败: {e}") + + return profiles + + def _select_agents_for_interview( + self, + profiles: List[Dict[str, Any]], + interview_requirement: str, + simulation_requirement: str, + max_agents: int + ) -> tuple: + """ + 使用LLM选择要采访的Agent + + Returns: + tuple: (selected_agents, selected_indices, reasoning) + - selected_agents: 选中Agent的完整信息列表 + - selected_indices: 选中Agent的索引列表(用于API调用) + - reasoning: 选择理由 + """ + + # 构建Agent摘要列表 + agent_summaries = [] + for i, profile in enumerate(profiles): + summary = { + "index": i, + "name": profile.get("realname", profile.get("username", f"Agent_{i}")), + "profession": profile.get("profession", "未知"), + "bio": profile.get("bio", "")[:200], + "interested_topics": profile.get("interested_topics", []) + } + agent_summaries.append(summary) + + system_prompt = """你是一个专业的采访策划专家。你的任务是根据采访需求,从模拟Agent列表中选择最适合采访的对象。 +在「创业想法验证」场景下,应尽量覆盖:至少一类投资人视角(若列表中存在)、至少一类创始人/同行视角、至少一类目标客户或潜在买家视角;可包含犹豫或反对者以反映真实张力。 + +选择标准: +1. Agent的身份/职业与采访主题相关 +2. Agent可能持有独特或有价值的观点(投资、购买、质疑) +3. 选择多样化的视角(看好/不看好/犹豫/专业挑剔等) +4. 优先选择与「该创业想法」讨论直接相关的角色 + +返回JSON格式: +{ + "selected_indices": [选中Agent的索引列表], + "reasoning": "选择理由说明" +}""" + + user_prompt = f"""采访需求: +{interview_requirement} + +模拟背景: +{simulation_requirement if simulation_requirement else "未提供"} + +可选择的Agent列表(共{len(agent_summaries)}个): +{json.dumps(agent_summaries, ensure_ascii=False, indent=2)} + +请选择最多{max_agents}个最适合采访的Agent,并说明选择理由。""" + + try: + response = self.llm.chat_json( + messages=[ + {"role": "system", "content": system_prompt}, + {"role": "user", "content": user_prompt} + ], + temperature=0.3 + ) + + selected_indices = response.get("selected_indices", [])[:max_agents] + reasoning = response.get("reasoning", "基于相关性自动选择") + + # 获取选中的Agent完整信息 + selected_agents = [] + valid_indices = [] + for idx in selected_indices: + if 0 <= idx < len(profiles): + selected_agents.append(profiles[idx]) + valid_indices.append(idx) + + return selected_agents, valid_indices, reasoning + + except Exception as e: + logger.warning(f"LLM选择Agent失败,使用默认选择: {e}") + # 降级:选择前N个 + selected = profiles[:max_agents] + indices = list(range(min(max_agents, len(profiles)))) + return selected, indices, "使用默认选择策略" + + def _generate_interview_questions( + self, + interview_requirement: str, + simulation_requirement: str, + selected_agents: List[Dict[str, Any]] + ) -> List[str]: + """使用LLM生成采访问题""" + + agent_roles = [a.get("profession", "未知") for a in selected_agents] + + system_prompt = """你是一个专业的记者/采访者。根据采访需求,生成3-5个深度采访问题。 +默认用于「创业想法验证」:问题应帮助判断产品/商业模式是否值得投资、是否有人愿意付费、主要风险是什么。 + +问题要求: +1. 开放性问题,鼓励详细回答 +2. 针对不同角色(投资人/创始人/客户)可有不同侧重 +3. 涵盖动机、付费意愿、竞品、风险、增长假设等维度(按主题选3-5个) +4. 语言自然,像真实采访一样 +5. 每个问题控制在50字以内,简洁明了 +6. 直接提问,不要包含背景说明或前缀 + +返回JSON格式:{"questions": ["问题1", "问题2", ...]}""" + + user_prompt = f"""采访需求:{interview_requirement} + +模拟背景:{simulation_requirement if simulation_requirement else "未提供"} + +采访对象角色:{', '.join(agent_roles)} + +请生成3-5个采访问题。""" + + try: + response = self.llm.chat_json( + messages=[ + {"role": "system", "content": system_prompt}, + {"role": "user", "content": user_prompt} + ], + temperature=0.5 + ) + + return response.get("questions", [f"关于{interview_requirement},您有什么看法?"]) + + except Exception as e: + logger.warning(f"生成采访问题失败: {e}") + return [ + f"关于{interview_requirement},您的观点是什么?", + "这件事对您或您所代表的群体有什么影响?", + "您认为应该如何解决或改进这个问题?" + ] + + def _generate_interview_summary( + self, + interviews: List[AgentInterview], + interview_requirement: str + ) -> str: + """生成采访摘要""" + + if not interviews: + return "未完成任何采访" + + # 收集所有采访内容 + interview_texts = [] + for interview in interviews: + interview_texts.append(f"【{interview.agent_name}({interview.agent_role})】\n{interview.response[:500]}") + + system_prompt = """你是一个专业的新闻编辑。请根据多位受访者的回答,生成一份采访摘要。 +摘要应服务于「创业想法验证」:点明对用户侧(买不买)、投资侧(投不投)、创始人 peer 侧(靠不靠谱)的信号;若负面信号强于正面,须如实体现。 + +摘要要求: +1. 提炼各方主要观点 +2. 指出观点的共识和分歧(尤其是「验证通过 vs 不通过」的证据) +3. 突出有价值的引言 +4. 客观中立,不偏袒任何一方;不得粉饰失败信号 +5. 控制在1000字内 + +格式约束(必须遵守): +- 使用纯文本段落,用空行分隔不同部分 +- 不要使用Markdown标题(如#、##、###) +- 不要使用分割线(如---、***) +- 引用受访者原话时使用中文引号「」 +- 可以使用**加粗**标记关键词,但不要使用其他Markdown语法""" + + user_prompt = f"""采访主题:{interview_requirement} + +采访内容: +{"".join(interview_texts)} + +请生成采访摘要。""" + + try: + summary = self.llm.chat( + messages=[ + {"role": "system", "content": system_prompt}, + {"role": "user", "content": user_prompt} + ], + temperature=0.3, + max_tokens=800 + ) + return summary + + except Exception as e: + logger.warning(f"生成采访摘要失败: {e}") + # 降级:简单拼接 + return f"共采访了{len(interviews)}位受访者,包括:" + "、".join([i.agent_name for i in interviews]) diff --git a/app/app/utils/__init__.py b/app/app/utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..51920001cbe92d77992773db00a56c8950ac832b --- /dev/null +++ b/app/app/utils/__init__.py @@ -0,0 +1,9 @@ +""" +工具模块 +""" + +from .file_parser import FileParser +from .llm_client import LLMClient + +__all__ = ['FileParser', 'LLMClient'] + diff --git a/app/app/utils/__pycache__/__init__.cpython-311.pyc b/app/app/utils/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1cfaf1b44a372e04faf6a6f948b36eec38fd7723 Binary files /dev/null and b/app/app/utils/__pycache__/__init__.cpython-311.pyc differ diff --git a/app/app/utils/__pycache__/api_retry.cpython-311.pyc b/app/app/utils/__pycache__/api_retry.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ab89478e9336b0a4d4ba7b2f186e338ecc19d0f3 Binary files /dev/null and b/app/app/utils/__pycache__/api_retry.cpython-311.pyc differ diff --git a/app/app/utils/__pycache__/billing_token.cpython-311.pyc b/app/app/utils/__pycache__/billing_token.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0a9c98249fe4d885894a1349a2670fe837d9ea6b Binary files /dev/null and b/app/app/utils/__pycache__/billing_token.cpython-311.pyc differ diff --git a/app/app/utils/__pycache__/file_parser.cpython-311.pyc b/app/app/utils/__pycache__/file_parser.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d0e7bac1714782f9c8be9ea644224d7684810035 Binary files /dev/null and b/app/app/utils/__pycache__/file_parser.cpython-311.pyc differ diff --git a/app/app/utils/__pycache__/llm_client.cpython-311.pyc b/app/app/utils/__pycache__/llm_client.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e2cce024a74eec0c684f56f469df9496b30def20 Binary files /dev/null and b/app/app/utils/__pycache__/llm_client.cpython-311.pyc differ diff --git a/app/app/utils/__pycache__/logger.cpython-311.pyc b/app/app/utils/__pycache__/logger.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ec2f5109e8ddf3c022bdc5863786a1359a7c7b61 Binary files /dev/null and b/app/app/utils/__pycache__/logger.cpython-311.pyc differ diff --git a/app/app/utils/__pycache__/mirofish_jwt.cpython-311.pyc b/app/app/utils/__pycache__/mirofish_jwt.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8580eb5a21328707071ef6563790ce3445642a4f Binary files /dev/null and b/app/app/utils/__pycache__/mirofish_jwt.cpython-311.pyc differ diff --git a/app/app/utils/__pycache__/retry.cpython-311.pyc b/app/app/utils/__pycache__/retry.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..38f6eaecdef165d865443f5ae2772366946cf906 Binary files /dev/null and b/app/app/utils/__pycache__/retry.cpython-311.pyc differ diff --git a/app/app/utils/__pycache__/supabase_auth.cpython-311.pyc b/app/app/utils/__pycache__/supabase_auth.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4a98e8c9cef3e5fc6a04df5c5d0c578283d1d876 Binary files /dev/null and b/app/app/utils/__pycache__/supabase_auth.cpython-311.pyc differ diff --git a/app/app/utils/__pycache__/zep_paging.cpython-311.pyc b/app/app/utils/__pycache__/zep_paging.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..55cf4e5270811c934326955d689ee0f3aa32f6d4 Binary files /dev/null and b/app/app/utils/__pycache__/zep_paging.cpython-311.pyc differ diff --git a/app/app/utils/api_key_runtime.py b/app/app/utils/api_key_runtime.py new file mode 100644 index 0000000000000000000000000000000000000000..a5be3be2413e37c1669f9b2c1437d971bbbb1a50 --- /dev/null +++ b/app/app/utils/api_key_runtime.py @@ -0,0 +1,122 @@ +""" +Shared LLM + Zep API key slot (same index for both) with rate-limit handling: +try primary → on limit try secondary → on limit sleep 60s → retry from primary once more. +""" + +from __future__ import annotations + +import contextvars +import time +from typing import Any, Callable, TypeVar + +from ..config import Config +from ..utils.logger import get_logger + +logger = get_logger("mirofish.api_key_runtime") + +T = TypeVar("T") + +_key_slot: contextvars.ContextVar[int] = contextvars.ContextVar("miro_api_key_slot", default=0) + + +def reset_pipeline_api_keys() -> None: + """Call at the start of each full pipeline run (worker thread).""" + _key_slot.set(0) + + +def current_key_slot() -> int: + return _key_slot.get() + + +def _max_key_slots() -> int: + lk = Config.get_llm_api_keys() + zk = Config.get_zep_api_keys() + n = max(len(lk or []), len(zk or []), 1) + return n + + +def set_key_slot(i: int) -> None: + n = _max_key_slots() + _key_slot.set(max(0, min(i, n - 1))) + + +def get_llm_key() -> str | None: + keys = Config.get_llm_api_keys() + if not keys: + return None + i = min(_key_slot.get(), len(keys) - 1) + return keys[i] + + +def get_zep_key() -> str | None: + keys = Config.get_zep_api_keys() + if not keys: + return None + i = min(_key_slot.get(), len(keys) - 1) + return keys[i] + + +def is_rate_limit_error(exc: BaseException) -> bool: + try: + import openai + + if isinstance(exc, getattr(openai, "RateLimitError", ())): + return True + if isinstance(exc, getattr(openai, "APIStatusError", ())): + if getattr(exc, "status_code", None) == 429: + return True + except Exception: + pass + + st = getattr(exc, "status_code", None) + if st == 429: + return True + + msg = str(exc).lower() + for phrase in ( + "rate limit", + "429", + "too many requests", + "quota", + "resource_exhausted", + "resource exhausted", + "throttl", + "over capacity", + "capacity", + ): + if phrase in msg: + return True + return False + + +def call_with_limit_rotation(op: Callable[[], T]) -> T: + """ + Run op() using keys at the current slot. On rate-limit: + advance to next key slot if available; else sleep 60s, reset to slot 0, try again; + if still rate-limited after that full cycle, re-raise. + """ + cooldown_used = False + last_exc: BaseException | None = None + + while True: + try: + return op() + except BaseException as e: + if not is_rate_limit_error(e): + raise + last_exc = e + idx = current_key_slot() + n = _max_key_slots() + if idx + 1 < n: + set_key_slot(idx + 1) + logger.warning( + "Rate limit hit; switching API key slot to %s (LLM+Zep)", current_key_slot() + ) + continue + if not cooldown_used: + logger.warning("Rate limit on all API key slots; sleeping 60s then retrying from slot 0") + time.sleep(60) + cooldown_used = True + set_key_slot(0) + continue + raise last_exc from None diff --git a/app/app/utils/file_parser.py b/app/app/utils/file_parser.py new file mode 100644 index 0000000000000000000000000000000000000000..823b65c43c5ab6bdeba545e13436096545c3fa56 --- /dev/null +++ b/app/app/utils/file_parser.py @@ -0,0 +1,189 @@ +""" +文件解析工具 +支持PDF、Markdown、TXT文件的文本提取 +""" + +import os +from pathlib import Path +from typing import List, Optional + + +def _read_text_with_fallback(file_path: str) -> str: + """ + 读取文本文件,UTF-8失败时自动探测编码。 + + 采用多级回退策略: + 1. 首先尝试 UTF-8 解码 + 2. 使用 charset_normalizer 检测编码 + 3. 回退到 chardet 检测编码 + 4. 最终使用 UTF-8 + errors='replace' 兜底 + + Args: + file_path: 文件路径 + + Returns: + 解码后的文本内容 + """ + data = Path(file_path).read_bytes() + + # 首先尝试 UTF-8 + try: + return data.decode('utf-8') + except UnicodeDecodeError: + pass + + # 尝试使用 charset_normalizer 检测编码 + encoding = None + try: + from charset_normalizer import from_bytes + best = from_bytes(data).best() + if best and best.encoding: + encoding = best.encoding + except Exception: + pass + + # 回退到 chardet + if not encoding: + try: + import chardet + result = chardet.detect(data) + encoding = result.get('encoding') if result else None + except Exception: + pass + + # 最终兜底:使用 UTF-8 + replace + if not encoding: + encoding = 'utf-8' + + return data.decode(encoding, errors='replace') + + +class FileParser: + """文件解析器""" + + SUPPORTED_EXTENSIONS = {'.pdf', '.md', '.markdown', '.txt'} + + @classmethod + def extract_text(cls, file_path: str) -> str: + """ + 从文件中提取文本 + + Args: + file_path: 文件路径 + + Returns: + 提取的文本内容 + """ + path = Path(file_path) + + if not path.exists(): + raise FileNotFoundError(f"文件不存在: {file_path}") + + suffix = path.suffix.lower() + + if suffix not in cls.SUPPORTED_EXTENSIONS: + raise ValueError(f"不支持的文件格式: {suffix}") + + if suffix == '.pdf': + return cls._extract_from_pdf(file_path) + elif suffix in {'.md', '.markdown'}: + return cls._extract_from_md(file_path) + elif suffix == '.txt': + return cls._extract_from_txt(file_path) + + raise ValueError(f"无法处理的文件格式: {suffix}") + + @staticmethod + def _extract_from_pdf(file_path: str) -> str: + """从PDF提取文本""" + try: + import fitz # PyMuPDF + except ImportError: + raise ImportError("需要安装PyMuPDF: pip install PyMuPDF") + + text_parts = [] + with fitz.open(file_path) as doc: + for page in doc: + text = page.get_text() + if text.strip(): + text_parts.append(text) + + return "\n\n".join(text_parts) + + @staticmethod + def _extract_from_md(file_path: str) -> str: + """从Markdown提取文本,支持自动编码检测""" + return _read_text_with_fallback(file_path) + + @staticmethod + def _extract_from_txt(file_path: str) -> str: + """从TXT提取文本,支持自动编码检测""" + return _read_text_with_fallback(file_path) + + @classmethod + def extract_from_multiple(cls, file_paths: List[str]) -> str: + """ + 从多个文件提取文本并合并 + + Args: + file_paths: 文件路径列表 + + Returns: + 合并后的文本 + """ + all_texts = [] + + for i, file_path in enumerate(file_paths, 1): + try: + text = cls.extract_text(file_path) + filename = Path(file_path).name + all_texts.append(f"=== 文档 {i}: {filename} ===\n{text}") + except Exception as e: + all_texts.append(f"=== 文档 {i}: {file_path} (提取失败: {str(e)}) ===") + + return "\n\n".join(all_texts) + + +def split_text_into_chunks( + text: str, + chunk_size: int = 500, + overlap: int = 50 +) -> List[str]: + """ + 将文本分割成小块 + + Args: + text: 原始文本 + chunk_size: 每块的字符数 + overlap: 重叠字符数 + + Returns: + 文本块列表 + """ + if len(text) <= chunk_size: + return [text] if text.strip() else [] + + chunks = [] + start = 0 + + while start < len(text): + end = start + chunk_size + + # 尝试在句子边界处分割 + if end < len(text): + # 查找最近的句子结束符 + for sep in ['。', '!', '?', '.\n', '!\n', '?\n', '\n\n', '. ', '! ', '? ']: + last_sep = text[start:end].rfind(sep) + if last_sep != -1 and last_sep > chunk_size * 0.3: + end = start + last_sep + len(sep) + break + + chunk = text[start:end].strip() + if chunk: + chunks.append(chunk) + + # 下一个块从重叠位置开始 + start = end - overlap if end < len(text) else len(text) + + return chunks + diff --git a/app/app/utils/llm_client.py b/app/app/utils/llm_client.py new file mode 100644 index 0000000000000000000000000000000000000000..8816d0c6afeb9f7a61660830c4235f9a0bb4e775 --- /dev/null +++ b/app/app/utils/llm_client.py @@ -0,0 +1,116 @@ +""" +LLM客户端封装 +统一使用OpenAI格式调用 +""" + +import json +import re +from typing import Optional, Dict, Any, List +from openai import OpenAI + +from ..config import Config +from .api_key_runtime import call_with_limit_rotation, get_llm_key + + +class LLMClient: + """LLM客户端""" + + def __init__( + self, + api_key: Optional[str] = None, + base_url: Optional[str] = None, + model: Optional[str] = None + ): + self._fixed_api_key = (api_key or "").strip() or None + self.base_url = base_url or Config.LLM_BASE_URL + self.model = model or Config.LLM_MODEL_NAME + + if self._fixed_api_key: + self.client = OpenAI(api_key=self._fixed_api_key, base_url=self.base_url) + else: + if not Config.get_llm_api_keys(): + raise ValueError("LLM_API_KEY 未配置") + self.client = None # runtime keys via get_llm_key() + + def chat( + self, + messages: List[Dict[str, str]], + temperature: float = 0.7, + max_tokens: int = 4096, + response_format: Optional[Dict] = None + ) -> str: + """ + 发送聊天请求 + + Args: + messages: 消息列表 + temperature: 温度参数 + max_tokens: 最大token数 + response_format: 响应格式(如JSON模式) + + Returns: + 模型响应文本 + """ + kwargs = { + "model": self.model, + "messages": messages, + "temperature": temperature, + "max_tokens": max_tokens, + } + + if response_format: + kwargs["response_format"] = response_format + + def _create(): + if self._fixed_api_key: + return self.client.chat.completions.create(**kwargs) + key = get_llm_key() + if not key: + raise ValueError("LLM_API_KEY 未配置") + client = OpenAI(api_key=key, base_url=self.base_url) + return client.chat.completions.create(**kwargs) + + response = ( + self.client.chat.completions.create(**kwargs) + if self._fixed_api_key + else call_with_limit_rotation(_create) + ) + content = response.choices[0].message.content + # 部分模型(如MiniMax M2.5)会在content中包含思考内容,需要移除 + content = re.sub(r'[\s\S]*?', '', content).strip() + return content + + def chat_json( + self, + messages: List[Dict[str, str]], + temperature: float = 0.3, + max_tokens: int = 4096 + ) -> Dict[str, Any]: + """ + 发送聊天请求并返回JSON + + Args: + messages: 消息列表 + temperature: 温度参数 + max_tokens: 最大token数 + + Returns: + 解析后的JSON对象 + """ + response = self.chat( + messages=messages, + temperature=temperature, + max_tokens=max_tokens, + response_format={"type": "json_object"} + ) + # 清理markdown代码块标记 + cleaned_response = response.strip() + cleaned_response = re.sub(r'^```(?:json)?\s*\n?', '', cleaned_response, flags=re.IGNORECASE) + cleaned_response = re.sub(r'\n?```\s*$', '', cleaned_response) + cleaned_response = cleaned_response.strip() + + try: + return json.loads(cleaned_response) + except json.JSONDecodeError: + raise ValueError(f"LLM返回的JSON格式无效: {cleaned_response}") + diff --git a/app/app/utils/logger.py b/app/app/utils/logger.py new file mode 100644 index 0000000000000000000000000000000000000000..e20efdf2ae08f9f9af419dd3febae575977c733a --- /dev/null +++ b/app/app/utils/logger.py @@ -0,0 +1,126 @@ +""" +日志配置模块 +提供统一的日志管理,同时输出到控制台和文件 +""" + +import os +import sys +import logging +from datetime import datetime +from logging.handlers import RotatingFileHandler + + +def _ensure_utf8_stdout(): + """ + 确保 stdout/stderr 使用 UTF-8 编码 + 解决 Windows 控制台中文乱码问题 + """ + if sys.platform == 'win32': + # Windows 下重新配置标准输出为 UTF-8 + if hasattr(sys.stdout, 'reconfigure'): + sys.stdout.reconfigure(encoding='utf-8', errors='replace') + if hasattr(sys.stderr, 'reconfigure'): + sys.stderr.reconfigure(encoding='utf-8', errors='replace') + + +# 日志目录 +LOG_DIR = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'logs') + + +def setup_logger(name: str = 'mirofish', level: int = logging.DEBUG) -> logging.Logger: + """ + 设置日志器 + + Args: + name: 日志器名称 + level: 日志级别 + + Returns: + 配置好的日志器 + """ + # 确保日志目录存在 + os.makedirs(LOG_DIR, exist_ok=True) + + # 创建日志器 + logger = logging.getLogger(name) + logger.setLevel(level) + + # 阻止日志向上传播到根 logger,避免重复输出 + logger.propagate = False + + # 如果已经有处理器,不重复添加 + if logger.handlers: + return logger + + # 日志格式 + detailed_formatter = logging.Formatter( + '[%(asctime)s] %(levelname)s [%(name)s.%(funcName)s:%(lineno)d] %(message)s', + datefmt='%Y-%m-%d %H:%M:%S' + ) + + simple_formatter = logging.Formatter( + '[%(asctime)s] %(levelname)s: %(message)s', + datefmt='%H:%M:%S' + ) + + # 1. 文件处理器 - 详细日志(按日期命名,带轮转) + log_filename = datetime.now().strftime('%Y-%m-%d') + '.log' + file_handler = RotatingFileHandler( + os.path.join(LOG_DIR, log_filename), + maxBytes=10 * 1024 * 1024, # 10MB + backupCount=5, + encoding='utf-8' + ) + file_handler.setLevel(logging.DEBUG) + file_handler.setFormatter(detailed_formatter) + + # 2. 控制台处理器 - 简洁日志(INFO及以上) + # 确保 Windows 下使用 UTF-8 编码,避免中文乱码 + _ensure_utf8_stdout() + console_handler = logging.StreamHandler(sys.stdout) + console_handler.setLevel(logging.INFO) + console_handler.setFormatter(simple_formatter) + + # 添加处理器 + logger.addHandler(file_handler) + logger.addHandler(console_handler) + + return logger + + +def get_logger(name: str = 'mirofish') -> logging.Logger: + """ + 获取日志器(如果不存在则创建) + + Args: + name: 日志器名称 + + Returns: + 日志器实例 + """ + logger = logging.getLogger(name) + if not logger.handlers: + return setup_logger(name) + return logger + + +# 创建默认日志器 +logger = setup_logger() + + +# 便捷方法 +def debug(msg, *args, **kwargs): + logger.debug(msg, *args, **kwargs) + +def info(msg, *args, **kwargs): + logger.info(msg, *args, **kwargs) + +def warning(msg, *args, **kwargs): + logger.warning(msg, *args, **kwargs) + +def error(msg, *args, **kwargs): + logger.error(msg, *args, **kwargs) + +def critical(msg, *args, **kwargs): + logger.critical(msg, *args, **kwargs) + diff --git a/app/app/utils/mirofish_jwt.py b/app/app/utils/mirofish_jwt.py new file mode 100644 index 0000000000000000000000000000000000000000..8fb6c22098406ca225ff401ed6e962a56db7354d --- /dev/null +++ b/app/app/utils/mirofish_jwt.py @@ -0,0 +1,59 @@ +"""Short-lived session JWTs for public.User logins (signed by the backend only).""" + +from __future__ import annotations + +import time +from typing import Optional, Tuple + +import jwt + +from ..config import Config + +MIROFISH_ISS = "mirofish" +MIROFISH_AUD = "mirofish-web" +# Default 14 days +DEFAULT_TTL_SEC = 14 * 24 * 60 * 60 + + +def _signing_secret() -> str: + if (Config.MIROFISH_SESSION_JWT_SECRET or "").strip(): + return Config.MIROFISH_SESSION_JWT_SECRET.strip() + return (Config.SECRET_KEY or "").strip() or "change-me" + + +def issue_session_token(user_id: str, ttl_sec: int = DEFAULT_TTL_SEC) -> str: + now = int(time.time()) + payload = { + "sub": str(user_id), + "iat": now, + "exp": now + ttl_sec, + "iss": MIROFISH_ISS, + "aud": MIROFISH_AUD, + } + return jwt.encode(payload, _signing_secret(), algorithm="HS256") + + +def verify_mirofish_session_jwt(token: str) -> Tuple[Optional[str], Optional[str]]: + """ + Returns (user_id, None) on success, (None, error_hint) on failure. + error_hint is None if the token is simply not a MiroFish session JWT (try Supabase next). + """ + if not token: + return None, "missing" + try: + payload = jwt.decode( + token, + _signing_secret(), + algorithms=["HS256"], + audience=MIROFISH_AUD, + issuer=MIROFISH_ISS, + options={"verify_exp": True}, + ) + sub = payload.get("sub") + if not sub: + return None, "invalid" + return str(sub), None + except jwt.ExpiredSignatureError: + return None, "expired" + except jwt.InvalidTokenError: + return None, None diff --git a/app/app/utils/retry.py b/app/app/utils/retry.py new file mode 100644 index 0000000000000000000000000000000000000000..7065c99b6c55ce66484086c3cf4d7774624b3471 --- /dev/null +++ b/app/app/utils/retry.py @@ -0,0 +1,238 @@ +""" +API调用重试机制 +用于处理LLM等外部API调用的重试逻辑 +""" + +import time +import random +import functools +from typing import Callable, Any, Optional, Type, Tuple +from ..utils.logger import get_logger + +logger = get_logger('mirofish.retry') + + +def retry_with_backoff( + max_retries: int = 3, + initial_delay: float = 1.0, + max_delay: float = 30.0, + backoff_factor: float = 2.0, + jitter: bool = True, + exceptions: Tuple[Type[Exception], ...] = (Exception,), + on_retry: Optional[Callable[[Exception, int], None]] = None +): + """ + 带指数退避的重试装饰器 + + Args: + max_retries: 最大重试次数 + initial_delay: 初始延迟(秒) + max_delay: 最大延迟(秒) + backoff_factor: 退避因子 + jitter: 是否添加随机抖动 + exceptions: 需要重试的异常类型 + on_retry: 重试时的回调函数 (exception, retry_count) + + Usage: + @retry_with_backoff(max_retries=3) + def call_llm_api(): + ... + """ + def decorator(func: Callable) -> Callable: + @functools.wraps(func) + def wrapper(*args, **kwargs) -> Any: + last_exception = None + delay = initial_delay + + for attempt in range(max_retries + 1): + try: + return func(*args, **kwargs) + + except exceptions as e: + last_exception = e + + if attempt == max_retries: + logger.error(f"函数 {func.__name__} 在 {max_retries} 次重试后仍失败: {str(e)}") + raise + + # 计算延迟 + current_delay = min(delay, max_delay) + if jitter: + current_delay = current_delay * (0.5 + random.random()) + + logger.warning( + f"函数 {func.__name__} 第 {attempt + 1} 次尝试失败: {str(e)}, " + f"{current_delay:.1f}秒后重试..." + ) + + if on_retry: + on_retry(e, attempt + 1) + + time.sleep(current_delay) + delay *= backoff_factor + + raise last_exception + + return wrapper + return decorator + + +def retry_with_backoff_async( + max_retries: int = 3, + initial_delay: float = 1.0, + max_delay: float = 30.0, + backoff_factor: float = 2.0, + jitter: bool = True, + exceptions: Tuple[Type[Exception], ...] = (Exception,), + on_retry: Optional[Callable[[Exception, int], None]] = None +): + """ + 异步版本的重试装饰器 + """ + import asyncio + + def decorator(func: Callable) -> Callable: + @functools.wraps(func) + async def wrapper(*args, **kwargs) -> Any: + last_exception = None + delay = initial_delay + + for attempt in range(max_retries + 1): + try: + return await func(*args, **kwargs) + + except exceptions as e: + last_exception = e + + if attempt == max_retries: + logger.error(f"异步函数 {func.__name__} 在 {max_retries} 次重试后仍失败: {str(e)}") + raise + + current_delay = min(delay, max_delay) + if jitter: + current_delay = current_delay * (0.5 + random.random()) + + logger.warning( + f"异步函数 {func.__name__} 第 {attempt + 1} 次尝试失败: {str(e)}, " + f"{current_delay:.1f}秒后重试..." + ) + + if on_retry: + on_retry(e, attempt + 1) + + await asyncio.sleep(current_delay) + delay *= backoff_factor + + raise last_exception + + return wrapper + return decorator + + +class RetryableAPIClient: + """ + 可重试的API客户端封装 + """ + + def __init__( + self, + max_retries: int = 3, + initial_delay: float = 1.0, + max_delay: float = 30.0, + backoff_factor: float = 2.0 + ): + self.max_retries = max_retries + self.initial_delay = initial_delay + self.max_delay = max_delay + self.backoff_factor = backoff_factor + + def call_with_retry( + self, + func: Callable, + *args, + exceptions: Tuple[Type[Exception], ...] = (Exception,), + **kwargs + ) -> Any: + """ + 执行函数调用并在失败时重试 + + Args: + func: 要调用的函数 + *args: 函数参数 + exceptions: 需要重试的异常类型 + **kwargs: 函数关键字参数 + + Returns: + 函数返回值 + """ + last_exception = None + delay = self.initial_delay + + for attempt in range(self.max_retries + 1): + try: + return func(*args, **kwargs) + + except exceptions as e: + last_exception = e + + if attempt == self.max_retries: + logger.error(f"API调用在 {self.max_retries} 次重试后仍失败: {str(e)}") + raise + + current_delay = min(delay, self.max_delay) + current_delay = current_delay * (0.5 + random.random()) + + logger.warning( + f"API调用第 {attempt + 1} 次尝试失败: {str(e)}, " + f"{current_delay:.1f}秒后重试..." + ) + + time.sleep(current_delay) + delay *= self.backoff_factor + + raise last_exception + + def call_batch_with_retry( + self, + items: list, + process_func: Callable, + exceptions: Tuple[Type[Exception], ...] = (Exception,), + continue_on_failure: bool = True + ) -> Tuple[list, list]: + """ + 批量调用并对每个失败项单独重试 + + Args: + items: 要处理的项目列表 + process_func: 处理函数,接收单个item作为参数 + exceptions: 需要重试的异常类型 + continue_on_failure: 单项失败后是否继续处理其他项 + + Returns: + (成功结果列表, 失败项列表) + """ + results = [] + failures = [] + + for idx, item in enumerate(items): + try: + result = self.call_with_retry( + process_func, + item, + exceptions=exceptions + ) + results.append(result) + + except Exception as e: + logger.error(f"处理第 {idx + 1} 项失败: {str(e)}") + failures.append({ + "index": idx, + "item": item, + "error": str(e) + }) + + if not continue_on_failure: + raise + + return results, failures + diff --git a/app/app/utils/supabase_auth.py b/app/app/utils/supabase_auth.py new file mode 100644 index 0000000000000000000000000000000000000000..05c7402f59b3cecb12800c3f4aba4697a941be8c --- /dev/null +++ b/app/app/utils/supabase_auth.py @@ -0,0 +1,80 @@ +"""Verify caller identity for /api/pipeline/* — Bearer JWTs and/or pipeline client headers.""" + +from __future__ import annotations + +from typing import Optional, Tuple + +import jwt + +from flask import request + +from ..config import Config +from .mirofish_jwt import verify_mirofish_session_jwt + + +def verify_supabase_user_jwt(token: str) -> Tuple[Optional[str], Optional[str]]: + """ + Returns (user_id, error_message). user_id is None on failure. + """ + if not token or not Config.SUPABASE_JWT_SECRET: + return None, "JWT verification not configured" + try: + payload = jwt.decode( + token, + Config.SUPABASE_JWT_SECRET, + algorithms=["HS256"], + audience="authenticated", + options={"verify_exp": True}, + ) + sub = payload.get("sub") + if not sub: + return None, "Invalid token: missing sub" + return str(sub), None + except jwt.ExpiredSignatureError: + return None, "Token expired" + except jwt.InvalidTokenError as e: + return None, f"Invalid token: {e}" + + +def extract_bearer_token() -> Optional[str]: + h = request.headers.get("Authorization", "") + if h.lower().startswith("bearer "): + return h[7:].strip() + return None + + +def resolve_pipeline_user_id() -> Tuple[Optional[str], Optional[str]]: + """ + When Supabase sync is on: + + 1) Authorization: Bearer (optional / legacy). + 2) Authorization: Bearer if SUPABASE_JWT_SECRET is set. + 3) X-Mirofish-User-Id + X-Pipeline-Client-Secret matching PIPELINE_CLIENT_SECRET + (Supabase public.User in browser + VITE_PIPELINE_CLIENT_SECRET). + + Returns (user_id_str, error_message). + """ + token = extract_bearer_token() + if token: + m_uid, m_hint = verify_mirofish_session_jwt(token) + if m_uid: + return m_uid, None + if m_hint == "expired": + return None, "Token expired" + if Config.SUPABASE_JWT_SECRET: + s_uid, s_err = verify_supabase_user_jwt(token) + if s_uid: + return s_uid, None + return None, s_err or "Invalid token" + return None, "Invalid token" + + uid = (request.headers.get("X-Mirofish-User-Id") or "").strip() + key = (request.headers.get("X-Pipeline-Client-Secret") or "").strip() + secret = (Config.PIPELINE_CLIENT_SECRET or "").strip() + if uid and secret and key == secret: + return uid, None + if uid or key: + return None, "Invalid pipeline client credentials" + if not secret: + return None, "Server PIPELINE_CLIENT_SECRET is not configured" + return None, "Missing credentials" diff --git a/app/app/utils/zep_paging.py b/app/app/utils/zep_paging.py new file mode 100644 index 0000000000000000000000000000000000000000..4ac8a847a581eadeaa69fdd98ec593e7fd78d4b7 --- /dev/null +++ b/app/app/utils/zep_paging.py @@ -0,0 +1,143 @@ +"""Zep Graph 分页读取工具。 + +Zep 的 node/edge 列表接口使用 UUID cursor 分页, +本模块封装自动翻页逻辑(含单页重试),对调用方透明地返回完整列表。 +""" + +from __future__ import annotations + +import time +from collections.abc import Callable +from typing import Any + +from zep_cloud import InternalServerError +from zep_cloud.client import Zep + +from .logger import get_logger + +logger = get_logger('mirofish.zep_paging') + +_DEFAULT_PAGE_SIZE = 100 +_MAX_NODES = 2000 +_DEFAULT_MAX_RETRIES = 3 +_DEFAULT_RETRY_DELAY = 2.0 # seconds, doubles each retry + + +def _fetch_page_with_retry( + api_call: Callable[..., list[Any]], + *args: Any, + max_retries: int = _DEFAULT_MAX_RETRIES, + retry_delay: float = _DEFAULT_RETRY_DELAY, + page_description: str = "page", + **kwargs: Any, +) -> list[Any]: + """单页请求,失败时指数退避重试。仅重试网络/IO类瞬态错误。""" + if max_retries < 1: + raise ValueError("max_retries must be >= 1") + + last_exception: Exception | None = None + delay = retry_delay + + for attempt in range(max_retries): + try: + return api_call(*args, **kwargs) + except (ConnectionError, TimeoutError, OSError, InternalServerError) as e: + last_exception = e + if attempt < max_retries - 1: + logger.warning( + f"Zep {page_description} attempt {attempt + 1} failed: {str(e)[:100]}, retrying in {delay:.1f}s..." + ) + time.sleep(delay) + delay *= 2 + else: + logger.error(f"Zep {page_description} failed after {max_retries} attempts: {str(e)}") + + assert last_exception is not None + raise last_exception + + +def fetch_all_nodes( + client: Zep, + graph_id: str, + page_size: int = _DEFAULT_PAGE_SIZE, + max_items: int = _MAX_NODES, + max_retries: int = _DEFAULT_MAX_RETRIES, + retry_delay: float = _DEFAULT_RETRY_DELAY, +) -> list[Any]: + """分页获取图谱节点,最多返回 max_items 条(默认 2000)。每页请求自带重试。""" + all_nodes: list[Any] = [] + cursor: str | None = None + page_num = 0 + + while True: + kwargs: dict[str, Any] = {"limit": page_size} + if cursor is not None: + kwargs["uuid_cursor"] = cursor + + page_num += 1 + batch = _fetch_page_with_retry( + client.graph.node.get_by_graph_id, + graph_id, + max_retries=max_retries, + retry_delay=retry_delay, + page_description=f"fetch nodes page {page_num} (graph={graph_id})", + **kwargs, + ) + if not batch: + break + + all_nodes.extend(batch) + if len(all_nodes) >= max_items: + all_nodes = all_nodes[:max_items] + logger.warning(f"Node count reached limit ({max_items}), stopping pagination for graph {graph_id}") + break + if len(batch) < page_size: + break + + cursor = getattr(batch[-1], "uuid_", None) or getattr(batch[-1], "uuid", None) + if cursor is None: + logger.warning(f"Node missing uuid field, stopping pagination at {len(all_nodes)} nodes") + break + + return all_nodes + + +def fetch_all_edges( + client: Zep, + graph_id: str, + page_size: int = _DEFAULT_PAGE_SIZE, + max_retries: int = _DEFAULT_MAX_RETRIES, + retry_delay: float = _DEFAULT_RETRY_DELAY, +) -> list[Any]: + """分页获取图谱所有边,返回完整列表。每页请求自带重试。""" + all_edges: list[Any] = [] + cursor: str | None = None + page_num = 0 + + while True: + kwargs: dict[str, Any] = {"limit": page_size} + if cursor is not None: + kwargs["uuid_cursor"] = cursor + + page_num += 1 + batch = _fetch_page_with_retry( + client.graph.edge.get_by_graph_id, + graph_id, + max_retries=max_retries, + retry_delay=retry_delay, + page_description=f"fetch edges page {page_num} (graph={graph_id})", + **kwargs, + ) + if not batch: + break + + all_edges.extend(batch) + if len(batch) < page_size: + break + + cursor = getattr(batch[-1], "uuid_", None) or getattr(batch[-1], "uuid", None) + if cursor is None: + logger.warning(f"Edge missing uuid field, stopping pagination at {len(all_edges)} edges") + break + + return all_edges diff --git a/app/logs/2026-04-02.log b/app/logs/2026-04-02.log new file mode 100644 index 0000000000000000000000000000000000000000..72008ec9d8659164f46845972752a18fa995e7c2 --- /dev/null +++ b/app/logs/2026-04-02.log @@ -0,0 +1,29 @@ +[2026-04-02 05:20:43] INFO [mirofish.create_app:38] ================================================== +[2026-04-02 05:20:43] INFO [mirofish.create_app:39] MiroFish Backend 启动中... +[2026-04-02 05:20:43] INFO [mirofish.create_app:40] ================================================== +[2026-04-02 05:20:43] INFO [mirofish.create_app:49] 已注册模拟进程清理函数 +[2026-04-02 05:20:43] INFO [mirofish.create_app:77] MiroFish Backend 启动完成 +[2026-04-02 05:22:14] DEBUG [mirofish.request.log_request:55] 请求: POST /api/graph/ontology/generate +[2026-04-02 05:22:14] INFO [mirofish.api.generate_ontology:150] === 开始生成本体定义 === +[2026-04-02 05:22:14] DEBUG [mirofish.api.generate_ontology:157] 项目名称: Unnamed Project +[2026-04-02 05:22:14] DEBUG [mirofish.api.generate_ontology:158] 模拟需求: Simulate different real-world users reacting to this startup. Show whether they would use it, pay fo... +[2026-04-02 05:22:14] INFO [mirofish.api.generate_ontology:177] 创建项目: proj_55ec66b0213e +[2026-04-02 05:22:14] INFO [mirofish.api.generate_ontology:212] 文本提取完成,共 68973 字符 +[2026-04-02 05:22:14] INFO [mirofish.api.generate_ontology:215] 调用 LLM 生成本体定义... +[2026-04-02 05:22:19] DEBUG [mirofish.request.log_response:62] 响应: 500 +[2026-04-02 05:22:20] DEBUG [mirofish.request.log_request:55] 请求: POST /api/graph/ontology/generate +[2026-04-02 05:22:20] INFO [mirofish.api.generate_ontology:150] === 开始生成本体定义 === +[2026-04-02 05:22:20] DEBUG [mirofish.api.generate_ontology:157] 项目名称: Unnamed Project +[2026-04-02 05:22:20] DEBUG [mirofish.api.generate_ontology:158] 模拟需求: Simulate different real-world users reacting to this startup. Show whether they would use it, pay fo... +[2026-04-02 05:22:20] INFO [mirofish.api.generate_ontology:177] 创建项目: proj_4b6f733e29b2 +[2026-04-02 05:22:20] INFO [mirofish.api.generate_ontology:212] 文本提取完成,共 68973 字符 +[2026-04-02 05:22:20] INFO [mirofish.api.generate_ontology:215] 调用 LLM 生成本体定义... +[2026-04-02 05:22:20] DEBUG [mirofish.request.log_response:62] 响应: 500 +[2026-04-02 05:22:23] DEBUG [mirofish.request.log_request:55] 请求: POST /api/graph/ontology/generate +[2026-04-02 05:22:23] INFO [mirofish.api.generate_ontology:150] === 开始生成本体定义 === +[2026-04-02 05:22:23] DEBUG [mirofish.api.generate_ontology:157] 项目名称: Unnamed Project +[2026-04-02 05:22:23] DEBUG [mirofish.api.generate_ontology:158] 模拟需求: Simulate different real-world users reacting to this startup. Show whether they would use it, pay fo... +[2026-04-02 05:22:23] INFO [mirofish.api.generate_ontology:177] 创建项目: proj_74e216704aac +[2026-04-02 05:22:23] INFO [mirofish.api.generate_ontology:212] 文本提取完成,共 68973 字符 +[2026-04-02 05:22:23] INFO [mirofish.api.generate_ontology:215] 调用 LLM 生成本体定义... +[2026-04-02 05:22:23] DEBUG [mirofish.request.log_response:62] 响应: 500 diff --git a/app/pyproject.toml b/app/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..8213257afea48794ae63632ff4d159b59e4d9afd --- /dev/null +++ b/app/pyproject.toml @@ -0,0 +1,55 @@ +[project] +name = "mirofish-backend" +version = "0.1.0" +description = "MiroFish - 简洁通用的群体智能引擎,预测万物" +requires-python = ">=3.11" +license = { text = "AGPL-3.0" } +authors = [ + { name = "MiroFish Team" } +] + +dependencies = [ + # 核心框架 + "flask>=3.0.0", + "flask-cors>=6.0.0", + + # LLM 相关 + "openai>=1.0.0", + + # Zep Cloud + "zep-cloud==3.13.0", + + # OASIS 社交媒体模拟 + "camel-oasis==0.2.5", + "camel-ai==0.2.78", + + # 文件处理 + "PyMuPDF>=1.24.0", + # 编码检测(支持非UTF-8编码的文本文件) + "charset-normalizer>=3.0.0", + "chardet>=5.0.0", + + # 工具库 + "python-dotenv>=1.0.0", + "pydantic>=2.0.0", +] + +[project.optional-dependencies] +dev = [ + "pytest>=8.0.0", + "pytest-asyncio>=0.23.0", + "pipreqs>=0.5.0", +] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[dependency-groups] +dev = [ + "pytest>=8.0.0", + "pytest-asyncio>=0.23.0", +] + +[tool.hatch.build.targets.wheel] +packages = ["app"] diff --git a/app/requirements.txt b/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..ca43e3fa8cf94b46c329cc15600cfdfdd3b22e62 --- /dev/null +++ b/app/requirements.txt @@ -0,0 +1,16 @@ + +flask>=3.0.0 +flask-cors>=6.0.0 +gunicorn>=22.0.0 +openai>=1.0.0 +zep-cloud==3.13.0 +camel-oasis==0.2.5 +camel-ai==0.2.78 +PyMuPDF>=1.24.0 +charset-normalizer>=3.0.0 +chardet>=5.0.0 +python-dotenv>=1.0.0 +pydantic>=2.0.0 +supabase>=2.10.0 +PyJWT>=2.8.0 +razorpay>=1.4.0 diff --git a/app/run.py b/app/run.py new file mode 100644 index 0000000000000000000000000000000000000000..61dbfe2f82f77dc41a896b34bb7ae4060caae765 --- /dev/null +++ b/app/run.py @@ -0,0 +1,50 @@ +""" +MiroFish Backend 启动入口 +""" + +import os +import sys + +# 解决 Windows 控制台中文乱码问题:在所有导入之前设置 UTF-8 编码 +if sys.platform == 'win32': + # 设置环境变量确保 Python 使用 UTF-8 + os.environ.setdefault('PYTHONIOENCODING', 'utf-8') + # 重新配置标准输出流为 UTF-8 + if hasattr(sys.stdout, 'reconfigure'): + sys.stdout.reconfigure(encoding='utf-8', errors='replace') + if hasattr(sys.stderr, 'reconfigure'): + sys.stderr.reconfigure(encoding='utf-8', errors='replace') + +# 添加项目根目录到路径 +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) + +from app import create_app +from app.config import Config + + +def main(): + """主函数""" + # 验证配置 + errors = Config.validate() + if errors: + print("配置错误:") + for err in errors: + print(f" - {err}") + print("\n请检查 .env 文件中的配置") + sys.exit(1) + + # 创建应用 + app = create_app() + + # 获取运行配置 + host = os.environ.get('FLASK_HOST', '0.0.0.0') + port = int(os.environ.get('FLASK_PORT', 5001)) + debug = Config.DEBUG + + # 启动服务 + app.run(host=host, port=port, debug=debug, threaded=True) + + +if __name__ == '__main__': + main() + diff --git a/app/scripts/action_logger.py b/app/scripts/action_logger.py new file mode 100644 index 0000000000000000000000000000000000000000..abfa1e511eb558286dc1064cea5cc7e6d7a178b8 --- /dev/null +++ b/app/scripts/action_logger.py @@ -0,0 +1,305 @@ +""" +动作日志记录器 +用于记录OASIS模拟中每个Agent的动作,供后端监控使用 + +日志结构: + sim_xxx/ + ├── twitter/ + │ └── actions.jsonl # Twitter 平台动作日志 + ├── reddit/ + │ └── actions.jsonl # Reddit 平台动作日志 + ├── simulation.log # 主模拟进程日志 + └── run_state.json # 运行状态(API 查询用) +""" + +import json +import os +import logging +from datetime import datetime +from typing import Dict, Any, Optional + + +class PlatformActionLogger: + """单平台动作日志记录器""" + + def __init__(self, platform: str, base_dir: str): + """ + 初始化日志记录器 + + Args: + platform: 平台名称 (twitter/reddit) + base_dir: 模拟目录的基础路径 + """ + self.platform = platform + self.base_dir = base_dir + self.log_dir = os.path.join(base_dir, platform) + self.log_path = os.path.join(self.log_dir, "actions.jsonl") + self._ensure_dir() + + def _ensure_dir(self): + """确保目录存在""" + os.makedirs(self.log_dir, exist_ok=True) + + def log_action( + self, + round_num: int, + agent_id: int, + agent_name: str, + action_type: str, + action_args: Optional[Dict[str, Any]] = None, + result: Optional[str] = None, + success: bool = True + ): + """记录一个动作""" + entry = { + "round": round_num, + "timestamp": datetime.now().isoformat(), + "agent_id": agent_id, + "agent_name": agent_name, + "action_type": action_type, + "action_args": action_args or {}, + "result": result, + "success": success, + } + + with open(self.log_path, 'a', encoding='utf-8') as f: + f.write(json.dumps(entry, ensure_ascii=False) + '\n') + + def log_round_start(self, round_num: int, simulated_hour: int): + """记录轮次开始""" + entry = { + "round": round_num, + "timestamp": datetime.now().isoformat(), + "event_type": "round_start", + "simulated_hour": simulated_hour, + } + + with open(self.log_path, 'a', encoding='utf-8') as f: + f.write(json.dumps(entry, ensure_ascii=False) + '\n') + + def log_round_end(self, round_num: int, actions_count: int): + """记录轮次结束""" + entry = { + "round": round_num, + "timestamp": datetime.now().isoformat(), + "event_type": "round_end", + "actions_count": actions_count, + } + + with open(self.log_path, 'a', encoding='utf-8') as f: + f.write(json.dumps(entry, ensure_ascii=False) + '\n') + + def log_simulation_start(self, config: Dict[str, Any]): + """记录模拟开始""" + entry = { + "timestamp": datetime.now().isoformat(), + "event_type": "simulation_start", + "platform": self.platform, + "total_rounds": config.get("time_config", {}).get("total_simulation_hours", 72) * 2, + "agents_count": len(config.get("agent_configs", [])), + } + + with open(self.log_path, 'a', encoding='utf-8') as f: + f.write(json.dumps(entry, ensure_ascii=False) + '\n') + + def log_simulation_end(self, total_rounds: int, total_actions: int): + """记录模拟结束""" + entry = { + "timestamp": datetime.now().isoformat(), + "event_type": "simulation_end", + "platform": self.platform, + "total_rounds": total_rounds, + "total_actions": total_actions, + } + + with open(self.log_path, 'a', encoding='utf-8') as f: + f.write(json.dumps(entry, ensure_ascii=False) + '\n') + + +class SimulationLogManager: + """ + 模拟日志管理器 + 统一管理所有日志文件,按平台分离 + """ + + def __init__(self, simulation_dir: str): + """ + 初始化日志管理器 + + Args: + simulation_dir: 模拟目录路径 + """ + self.simulation_dir = simulation_dir + self.twitter_logger: Optional[PlatformActionLogger] = None + self.reddit_logger: Optional[PlatformActionLogger] = None + self._main_logger: Optional[logging.Logger] = None + + # 设置主日志 + self._setup_main_logger() + + def _setup_main_logger(self): + """设置主模拟日志""" + log_path = os.path.join(self.simulation_dir, "simulation.log") + + # 创建 logger + self._main_logger = logging.getLogger(f"simulation.{os.path.basename(self.simulation_dir)}") + self._main_logger.setLevel(logging.INFO) + self._main_logger.handlers.clear() + + # 文件处理器 + file_handler = logging.FileHandler(log_path, encoding='utf-8', mode='w') + file_handler.setLevel(logging.INFO) + file_handler.setFormatter(logging.Formatter( + '%(asctime)s - %(levelname)s - %(message)s', + datefmt='%Y-%m-%d %H:%M:%S' + )) + self._main_logger.addHandler(file_handler) + + # 控制台处理器 + console_handler = logging.StreamHandler() + console_handler.setLevel(logging.INFO) + console_handler.setFormatter(logging.Formatter( + '[%(asctime)s] %(message)s', + datefmt='%H:%M:%S' + )) + self._main_logger.addHandler(console_handler) + + self._main_logger.propagate = False + + def get_twitter_logger(self) -> PlatformActionLogger: + """获取 Twitter 平台日志记录器""" + if self.twitter_logger is None: + self.twitter_logger = PlatformActionLogger("twitter", self.simulation_dir) + return self.twitter_logger + + def get_reddit_logger(self) -> PlatformActionLogger: + """获取 Reddit 平台日志记录器""" + if self.reddit_logger is None: + self.reddit_logger = PlatformActionLogger("reddit", self.simulation_dir) + return self.reddit_logger + + def log(self, message: str, level: str = "info"): + """记录主日志""" + if self._main_logger: + getattr(self._main_logger, level.lower(), self._main_logger.info)(message) + + def info(self, message: str): + self.log(message, "info") + + def warning(self, message: str): + self.log(message, "warning") + + def error(self, message: str): + self.log(message, "error") + + def debug(self, message: str): + self.log(message, "debug") + + +# ============ 兼容旧接口 ============ + +class ActionLogger: + """ + 动作日志记录器(兼容旧接口) + 建议使用 SimulationLogManager 代替 + """ + + def __init__(self, log_path: str): + self.log_path = log_path + self._ensure_dir() + + def _ensure_dir(self): + log_dir = os.path.dirname(self.log_path) + if log_dir: + os.makedirs(log_dir, exist_ok=True) + + def log_action( + self, + round_num: int, + platform: str, + agent_id: int, + agent_name: str, + action_type: str, + action_args: Optional[Dict[str, Any]] = None, + result: Optional[str] = None, + success: bool = True + ): + entry = { + "round": round_num, + "timestamp": datetime.now().isoformat(), + "platform": platform, + "agent_id": agent_id, + "agent_name": agent_name, + "action_type": action_type, + "action_args": action_args or {}, + "result": result, + "success": success, + } + + with open(self.log_path, 'a', encoding='utf-8') as f: + f.write(json.dumps(entry, ensure_ascii=False) + '\n') + + def log_round_start(self, round_num: int, simulated_hour: int, platform: str): + entry = { + "round": round_num, + "timestamp": datetime.now().isoformat(), + "platform": platform, + "event_type": "round_start", + "simulated_hour": simulated_hour, + } + + with open(self.log_path, 'a', encoding='utf-8') as f: + f.write(json.dumps(entry, ensure_ascii=False) + '\n') + + def log_round_end(self, round_num: int, actions_count: int, platform: str): + entry = { + "round": round_num, + "timestamp": datetime.now().isoformat(), + "platform": platform, + "event_type": "round_end", + "actions_count": actions_count, + } + + with open(self.log_path, 'a', encoding='utf-8') as f: + f.write(json.dumps(entry, ensure_ascii=False) + '\n') + + def log_simulation_start(self, platform: str, config: Dict[str, Any]): + entry = { + "timestamp": datetime.now().isoformat(), + "platform": platform, + "event_type": "simulation_start", + "total_rounds": config.get("time_config", {}).get("total_simulation_hours", 72) * 2, + "agents_count": len(config.get("agent_configs", [])), + } + + with open(self.log_path, 'a', encoding='utf-8') as f: + f.write(json.dumps(entry, ensure_ascii=False) + '\n') + + def log_simulation_end(self, platform: str, total_rounds: int, total_actions: int): + entry = { + "timestamp": datetime.now().isoformat(), + "platform": platform, + "event_type": "simulation_end", + "total_rounds": total_rounds, + "total_actions": total_actions, + } + + with open(self.log_path, 'a', encoding='utf-8') as f: + f.write(json.dumps(entry, ensure_ascii=False) + '\n') + + +# 全局日志实例(兼容旧接口) +_global_logger: Optional[ActionLogger] = None + + +def get_logger(log_path: Optional[str] = None) -> ActionLogger: + """获取全局日志实例(兼容旧接口)""" + global _global_logger + + if log_path: + _global_logger = ActionLogger(log_path) + + if _global_logger is None: + _global_logger = ActionLogger("actions.jsonl") + + return _global_logger diff --git a/app/scripts/run_parallel_simulation.py b/app/scripts/run_parallel_simulation.py new file mode 100644 index 0000000000000000000000000000000000000000..ffeb19c77687f751209b0f5aa4c92fe8bd77e574 --- /dev/null +++ b/app/scripts/run_parallel_simulation.py @@ -0,0 +1,1699 @@ +""" +OASIS 双平台并行模拟预设脚本 +同时运行Twitter和Reddit模拟,读取相同的配置文件 + +功能特性: +- 双平台(Twitter + Reddit)并行模拟 +- 完成模拟后不立即关闭环境,进入等待命令模式 +- 支持通过IPC接收Interview命令 +- 支持单个Agent采访和批量采访 +- 支持远程关闭环境命令 + +使用方式: + python run_parallel_simulation.py --config simulation_config.json + python run_parallel_simulation.py --config simulation_config.json --no-wait # 完成后立即关闭 + python run_parallel_simulation.py --config simulation_config.json --twitter-only + python run_parallel_simulation.py --config simulation_config.json --reddit-only + +日志结构: + sim_xxx/ + ├── twitter/ + │ └── actions.jsonl # Twitter 平台动作日志 + ├── reddit/ + │ └── actions.jsonl # Reddit 平台动作日志 + ├── simulation.log # 主模拟进程日志 + └── run_state.json # 运行状态(API 查询用) +""" + +# ============================================================ +# 解决 Windows 编码问题:在所有 import 之前设置 UTF-8 编码 +# 这是为了修复 OASIS 第三方库读取文件时未指定编码的问题 +# ============================================================ +import sys +import os + +if sys.platform == 'win32': + # 设置 Python 默认 I/O 编码为 UTF-8 + # 这会影响所有未指定编码的 open() 调用 + os.environ.setdefault('PYTHONUTF8', '1') + os.environ.setdefault('PYTHONIOENCODING', 'utf-8') + + # 重新配置标准输出流为 UTF-8(解决控制台中文乱码) + if hasattr(sys.stdout, 'reconfigure'): + sys.stdout.reconfigure(encoding='utf-8', errors='replace') + if hasattr(sys.stderr, 'reconfigure'): + sys.stderr.reconfigure(encoding='utf-8', errors='replace') + + # 强制设置默认编码(影响 open() 函数的默认编码) + # 注意:这需要在 Python 启动时就设置,运行时设置可能不生效 + # 所以我们还需要 monkey-patch 内置的 open 函数 + import builtins + _original_open = builtins.open + + def _utf8_open(file, mode='r', buffering=-1, encoding=None, errors=None, + newline=None, closefd=True, opener=None): + """ + 包装 open() 函数,对于文本模式默认使用 UTF-8 编码 + 这可以修复第三方库(如 OASIS)读取文件时未指定编码的问题 + """ + # 只对文本模式(非二进制)且未指定编码的情况设置默认编码 + if encoding is None and 'b' not in mode: + encoding = 'utf-8' + return _original_open(file, mode, buffering, encoding, errors, + newline, closefd, opener) + + builtins.open = _utf8_open + +import argparse +import asyncio +import json +import logging +import multiprocessing +import random +import signal +import sqlite3 +import warnings +from datetime import datetime +from typing import Dict, Any, List, Optional, Tuple + + +# 全局变量:用于信号处理 +_shutdown_event = None +_cleanup_done = False + +# 添加 backend 目录到路径 +# 脚本固定位于 backend/scripts/ 目录 +_scripts_dir = os.path.dirname(os.path.abspath(__file__)) +_backend_dir = os.path.abspath(os.path.join(_scripts_dir, '..')) +_project_root = os.path.abspath(os.path.join(_backend_dir, '..')) +sys.path.insert(0, _scripts_dir) +sys.path.insert(0, _backend_dir) + +# 加载项目根目录的 .env 文件(包含 LLM_API_KEY 等配置) +from dotenv import load_dotenv +_env_file = os.path.join(_project_root, '.env') +if os.path.exists(_env_file): + load_dotenv(_env_file) + print(f"已加载环境配置: {_env_file}") +else: + # 尝试加载 backend/.env + _backend_env = os.path.join(_backend_dir, '.env') + if os.path.exists(_backend_env): + load_dotenv(_backend_env) + print(f"已加载环境配置: {_backend_env}") + + +class MaxTokensWarningFilter(logging.Filter): + """过滤掉 camel-ai 关于 max_tokens 的警告(我们故意不设置 max_tokens,让模型自行决定)""" + + def filter(self, record): + # 过滤掉包含 max_tokens 警告的日志 + if "max_tokens" in record.getMessage() and "Invalid or missing" in record.getMessage(): + return False + return True + + +# 在模块加载时立即添加过滤器,确保在 camel 代码执行前生效 +logging.getLogger().addFilter(MaxTokensWarningFilter()) + + +def disable_oasis_logging(): + """ + 禁用 OASIS 库的详细日志输出 + OASIS 的日志太冗余(记录每个 agent 的观察和动作),我们使用自己的 action_logger + """ + # 禁用 OASIS 的所有日志器 + oasis_loggers = [ + "social.agent", + "social.twitter", + "social.rec", + "oasis.env", + "table", + ] + + for logger_name in oasis_loggers: + logger = logging.getLogger(logger_name) + logger.setLevel(logging.CRITICAL) # 只记录严重错误 + logger.handlers.clear() + logger.propagate = False + + +def init_logging_for_simulation(simulation_dir: str): + """ + 初始化模拟的日志配置 + + Args: + simulation_dir: 模拟目录路径 + """ + # 禁用 OASIS 的详细日志 + disable_oasis_logging() + + # 清理旧的 log 目录(如果存在) + old_log_dir = os.path.join(simulation_dir, "log") + if os.path.exists(old_log_dir): + import shutil + shutil.rmtree(old_log_dir, ignore_errors=True) + + +from action_logger import SimulationLogManager, PlatformActionLogger + +try: + from camel.models import ModelFactory + from camel.types import ModelPlatformType + import oasis + from oasis import ( + ActionType, + LLMAction, + ManualAction, + generate_twitter_agent_graph, + generate_reddit_agent_graph + ) +except ImportError as e: + print(f"错误: 缺少依赖 {e}") + print("请先安装: pip install oasis-ai camel-ai") + sys.exit(1) + + +# Twitter可用动作(不包含INTERVIEW,INTERVIEW只能通过ManualAction手动触发) +TWITTER_ACTIONS = [ + ActionType.CREATE_POST, + ActionType.LIKE_POST, + ActionType.REPOST, + ActionType.FOLLOW, + ActionType.DO_NOTHING, + ActionType.QUOTE_POST, +] + +# Reddit可用动作(不包含INTERVIEW,INTERVIEW只能通过ManualAction手动触发) +REDDIT_ACTIONS = [ + ActionType.LIKE_POST, + ActionType.DISLIKE_POST, + ActionType.CREATE_POST, + ActionType.CREATE_COMMENT, + ActionType.LIKE_COMMENT, + ActionType.DISLIKE_COMMENT, + ActionType.SEARCH_POSTS, + ActionType.SEARCH_USER, + ActionType.TREND, + ActionType.REFRESH, + ActionType.DO_NOTHING, + ActionType.FOLLOW, + ActionType.MUTE, +] + + +# IPC相关常量 +IPC_COMMANDS_DIR = "ipc_commands" +IPC_RESPONSES_DIR = "ipc_responses" +ENV_STATUS_FILE = "env_status.json" + +class CommandType: + """命令类型常量""" + INTERVIEW = "interview" + BATCH_INTERVIEW = "batch_interview" + CLOSE_ENV = "close_env" + + +class ParallelIPCHandler: + """ + 双平台IPC命令处理器 + + 管理两个平台的环境,处理Interview命令 + """ + + def __init__( + self, + simulation_dir: str, + twitter_env=None, + twitter_agent_graph=None, + reddit_env=None, + reddit_agent_graph=None + ): + self.simulation_dir = simulation_dir + self.twitter_env = twitter_env + self.twitter_agent_graph = twitter_agent_graph + self.reddit_env = reddit_env + self.reddit_agent_graph = reddit_agent_graph + + self.commands_dir = os.path.join(simulation_dir, IPC_COMMANDS_DIR) + self.responses_dir = os.path.join(simulation_dir, IPC_RESPONSES_DIR) + self.status_file = os.path.join(simulation_dir, ENV_STATUS_FILE) + + # 确保目录存在 + os.makedirs(self.commands_dir, exist_ok=True) + os.makedirs(self.responses_dir, exist_ok=True) + + def update_status(self, status: str): + """更新环境状态""" + with open(self.status_file, 'w', encoding='utf-8') as f: + json.dump({ + "status": status, + "twitter_available": self.twitter_env is not None, + "reddit_available": self.reddit_env is not None, + "timestamp": datetime.now().isoformat() + }, f, ensure_ascii=False, indent=2) + + def poll_command(self) -> Optional[Dict[str, Any]]: + """轮询获取待处理命令""" + if not os.path.exists(self.commands_dir): + return None + + # 获取命令文件(按时间排序) + command_files = [] + for filename in os.listdir(self.commands_dir): + if filename.endswith('.json'): + filepath = os.path.join(self.commands_dir, filename) + command_files.append((filepath, os.path.getmtime(filepath))) + + command_files.sort(key=lambda x: x[1]) + + for filepath, _ in command_files: + try: + with open(filepath, 'r', encoding='utf-8') as f: + return json.load(f) + except (json.JSONDecodeError, OSError): + continue + + return None + + def send_response(self, command_id: str, status: str, result: Dict = None, error: str = None): + """发送响应""" + response = { + "command_id": command_id, + "status": status, + "result": result, + "error": error, + "timestamp": datetime.now().isoformat() + } + + response_file = os.path.join(self.responses_dir, f"{command_id}.json") + with open(response_file, 'w', encoding='utf-8') as f: + json.dump(response, f, ensure_ascii=False, indent=2) + + # 删除命令文件 + command_file = os.path.join(self.commands_dir, f"{command_id}.json") + try: + os.remove(command_file) + except OSError: + pass + + def _get_env_and_graph(self, platform: str): + """ + 获取指定平台的环境和agent_graph + + Args: + platform: 平台名称 ("twitter" 或 "reddit") + + Returns: + (env, agent_graph, platform_name) 或 (None, None, None) + """ + if platform == "twitter" and self.twitter_env: + return self.twitter_env, self.twitter_agent_graph, "twitter" + elif platform == "reddit" and self.reddit_env: + return self.reddit_env, self.reddit_agent_graph, "reddit" + else: + return None, None, None + + async def _interview_single_platform(self, agent_id: int, prompt: str, platform: str) -> Dict[str, Any]: + """ + 在单个平台上执行Interview + + Returns: + 包含结果的字典,或包含error的字典 + """ + env, agent_graph, actual_platform = self._get_env_and_graph(platform) + + if not env or not agent_graph: + return {"platform": platform, "error": f"{platform}平台不可用"} + + try: + agent = agent_graph.get_agent(agent_id) + interview_action = ManualAction( + action_type=ActionType.INTERVIEW, + action_args={"prompt": prompt} + ) + actions = {agent: interview_action} + await env.step(actions) + + result = self._get_interview_result(agent_id, actual_platform) + result["platform"] = actual_platform + return result + + except Exception as e: + return {"platform": platform, "error": str(e)} + + async def handle_interview(self, command_id: str, agent_id: int, prompt: str, platform: str = None) -> bool: + """ + 处理单个Agent采访命令 + + Args: + command_id: 命令ID + agent_id: Agent ID + prompt: 采访问题 + platform: 指定平台(可选) + - "twitter": 只采访Twitter平台 + - "reddit": 只采访Reddit平台 + - None/不指定: 同时采访两个平台,返回整合结果 + + Returns: + True 表示成功,False 表示失败 + """ + # 如果指定了平台,只采访该平台 + if platform in ("twitter", "reddit"): + result = await self._interview_single_platform(agent_id, prompt, platform) + + if "error" in result: + self.send_response(command_id, "failed", error=result["error"]) + print(f" Interview失败: agent_id={agent_id}, platform={platform}, error={result['error']}") + return False + else: + self.send_response(command_id, "completed", result=result) + print(f" Interview完成: agent_id={agent_id}, platform={platform}") + return True + + # 未指定平台:同时采访两个平台 + if not self.twitter_env and not self.reddit_env: + self.send_response(command_id, "failed", error="没有可用的模拟环境") + return False + + results = { + "agent_id": agent_id, + "prompt": prompt, + "platforms": {} + } + success_count = 0 + + # 并行采访两个平台 + tasks = [] + platforms_to_interview = [] + + if self.twitter_env: + tasks.append(self._interview_single_platform(agent_id, prompt, "twitter")) + platforms_to_interview.append("twitter") + + if self.reddit_env: + tasks.append(self._interview_single_platform(agent_id, prompt, "reddit")) + platforms_to_interview.append("reddit") + + # 并行执行 + platform_results = await asyncio.gather(*tasks) + + for platform_name, platform_result in zip(platforms_to_interview, platform_results): + results["platforms"][platform_name] = platform_result + if "error" not in platform_result: + success_count += 1 + + if success_count > 0: + self.send_response(command_id, "completed", result=results) + print(f" Interview完成: agent_id={agent_id}, 成功平台数={success_count}/{len(platforms_to_interview)}") + return True + else: + errors = [f"{p}: {r.get('error', '未知错误')}" for p, r in results["platforms"].items()] + self.send_response(command_id, "failed", error="; ".join(errors)) + print(f" Interview失败: agent_id={agent_id}, 所有平台都失败") + return False + + async def handle_batch_interview(self, command_id: str, interviews: List[Dict], platform: str = None) -> bool: + """ + 处理批量采访命令 + + Args: + command_id: 命令ID + interviews: [{"agent_id": int, "prompt": str, "platform": str(optional)}, ...] + platform: 默认平台(可被每个interview项覆盖) + - "twitter": 只采访Twitter平台 + - "reddit": 只采访Reddit平台 + - None/不指定: 每个Agent同时采访两个平台 + """ + # 按平台分组 + twitter_interviews = [] + reddit_interviews = [] + both_platforms_interviews = [] # 需要同时采访两个平台的 + + for interview in interviews: + item_platform = interview.get("platform", platform) + if item_platform == "twitter": + twitter_interviews.append(interview) + elif item_platform == "reddit": + reddit_interviews.append(interview) + else: + # 未指定平台:两个平台都采访 + both_platforms_interviews.append(interview) + + # 把 both_platforms_interviews 拆分到两个平台 + if both_platforms_interviews: + if self.twitter_env: + twitter_interviews.extend(both_platforms_interviews) + if self.reddit_env: + reddit_interviews.extend(both_platforms_interviews) + + results = {} + + # 处理Twitter平台的采访 + if twitter_interviews and self.twitter_env: + try: + twitter_actions = {} + for interview in twitter_interviews: + agent_id = interview.get("agent_id") + prompt = interview.get("prompt", "") + try: + agent = self.twitter_agent_graph.get_agent(agent_id) + twitter_actions[agent] = ManualAction( + action_type=ActionType.INTERVIEW, + action_args={"prompt": prompt} + ) + except Exception as e: + print(f" 警告: 无法获取Twitter Agent {agent_id}: {e}") + + if twitter_actions: + await self.twitter_env.step(twitter_actions) + + for interview in twitter_interviews: + agent_id = interview.get("agent_id") + result = self._get_interview_result(agent_id, "twitter") + result["platform"] = "twitter" + results[f"twitter_{agent_id}"] = result + except Exception as e: + print(f" Twitter批量Interview失败: {e}") + + # 处理Reddit平台的采访 + if reddit_interviews and self.reddit_env: + try: + reddit_actions = {} + for interview in reddit_interviews: + agent_id = interview.get("agent_id") + prompt = interview.get("prompt", "") + try: + agent = self.reddit_agent_graph.get_agent(agent_id) + reddit_actions[agent] = ManualAction( + action_type=ActionType.INTERVIEW, + action_args={"prompt": prompt} + ) + except Exception as e: + print(f" 警告: 无法获取Reddit Agent {agent_id}: {e}") + + if reddit_actions: + await self.reddit_env.step(reddit_actions) + + for interview in reddit_interviews: + agent_id = interview.get("agent_id") + result = self._get_interview_result(agent_id, "reddit") + result["platform"] = "reddit" + results[f"reddit_{agent_id}"] = result + except Exception as e: + print(f" Reddit批量Interview失败: {e}") + + if results: + self.send_response(command_id, "completed", result={ + "interviews_count": len(results), + "results": results + }) + print(f" 批量Interview完成: {len(results)} 个Agent") + return True + else: + self.send_response(command_id, "failed", error="没有成功的采访") + return False + + def _get_interview_result(self, agent_id: int, platform: str) -> Dict[str, Any]: + """从数据库获取最新的Interview结果""" + db_path = os.path.join(self.simulation_dir, f"{platform}_simulation.db") + + result = { + "agent_id": agent_id, + "response": None, + "timestamp": None + } + + if not os.path.exists(db_path): + return result + + try: + conn = sqlite3.connect(db_path) + cursor = conn.cursor() + + # 查询最新的Interview记录 + cursor.execute(""" + SELECT user_id, info, created_at + FROM trace + WHERE action = ? AND user_id = ? + ORDER BY created_at DESC + LIMIT 1 + """, (ActionType.INTERVIEW.value, agent_id)) + + row = cursor.fetchone() + if row: + user_id, info_json, created_at = row + try: + info = json.loads(info_json) if info_json else {} + result["response"] = info.get("response", info) + result["timestamp"] = created_at + except json.JSONDecodeError: + result["response"] = info_json + + conn.close() + + except Exception as e: + print(f" 读取Interview结果失败: {e}") + + return result + + async def process_commands(self) -> bool: + """ + 处理所有待处理命令 + + Returns: + True 表示继续运行,False 表示应该退出 + """ + command = self.poll_command() + if not command: + return True + + command_id = command.get("command_id") + command_type = command.get("command_type") + args = command.get("args", {}) + + print(f"\n收到IPC命令: {command_type}, id={command_id}") + + if command_type == CommandType.INTERVIEW: + await self.handle_interview( + command_id, + args.get("agent_id", 0), + args.get("prompt", ""), + args.get("platform") + ) + return True + + elif command_type == CommandType.BATCH_INTERVIEW: + await self.handle_batch_interview( + command_id, + args.get("interviews", []), + args.get("platform") + ) + return True + + elif command_type == CommandType.CLOSE_ENV: + print("收到关闭环境命令") + self.send_response(command_id, "completed", result={"message": "环境即将关闭"}) + return False + + else: + self.send_response(command_id, "failed", error=f"未知命令类型: {command_type}") + return True + + +def load_config(config_path: str) -> Dict[str, Any]: + """加载配置文件""" + with open(config_path, 'r', encoding='utf-8') as f: + return json.load(f) + + +# 需要过滤掉的非核心动作类型(这些动作对分析价值较低) +FILTERED_ACTIONS = {'refresh', 'sign_up'} + +# 动作类型映射表(数据库中的名称 -> 标准名称) +ACTION_TYPE_MAP = { + 'create_post': 'CREATE_POST', + 'like_post': 'LIKE_POST', + 'dislike_post': 'DISLIKE_POST', + 'repost': 'REPOST', + 'quote_post': 'QUOTE_POST', + 'follow': 'FOLLOW', + 'mute': 'MUTE', + 'create_comment': 'CREATE_COMMENT', + 'like_comment': 'LIKE_COMMENT', + 'dislike_comment': 'DISLIKE_COMMENT', + 'search_posts': 'SEARCH_POSTS', + 'search_user': 'SEARCH_USER', + 'trend': 'TREND', + 'do_nothing': 'DO_NOTHING', + 'interview': 'INTERVIEW', +} + + +def get_agent_names_from_config(config: Dict[str, Any]) -> Dict[int, str]: + """ + 从 simulation_config 中获取 agent_id -> entity_name 的映射 + + 这样可以在 actions.jsonl 中显示真实的实体名称,而不是 "Agent_0" 这样的代号 + + Args: + config: simulation_config.json 的内容 + + Returns: + agent_id -> entity_name 的映射字典 + """ + agent_names = {} + agent_configs = config.get("agent_configs", []) + + for agent_config in agent_configs: + agent_id = agent_config.get("agent_id") + entity_name = agent_config.get("entity_name", f"Agent_{agent_id}") + if agent_id is not None: + agent_names[agent_id] = entity_name + + return agent_names + + +def fetch_new_actions_from_db( + db_path: str, + last_rowid: int, + agent_names: Dict[int, str] +) -> Tuple[List[Dict[str, Any]], int]: + """ + 从数据库中获取新的动作记录,并补充完整的上下文信息 + + Args: + db_path: 数据库文件路径 + last_rowid: 上次读取的最大 rowid 值(使用 rowid 而不是 created_at,因为不同平台的 created_at 格式不同) + agent_names: agent_id -> agent_name 映射 + + Returns: + (actions_list, new_last_rowid) + - actions_list: 动作列表,每个元素包含 agent_id, agent_name, action_type, action_args(含上下文信息) + - new_last_rowid: 新的最大 rowid 值 + """ + actions = [] + new_last_rowid = last_rowid + + if not os.path.exists(db_path): + return actions, new_last_rowid + + try: + conn = sqlite3.connect(db_path) + cursor = conn.cursor() + + # 使用 rowid 来追踪已处理的记录(rowid 是 SQLite 的内置自增字段) + # 这样可以避免 created_at 格式差异问题(Twitter 用整数,Reddit 用日期时间字符串) + cursor.execute(""" + SELECT rowid, user_id, action, info + FROM trace + WHERE rowid > ? + ORDER BY rowid ASC + """, (last_rowid,)) + + for rowid, user_id, action, info_json in cursor.fetchall(): + # 更新最大 rowid + new_last_rowid = rowid + + # 过滤非核心动作 + if action in FILTERED_ACTIONS: + continue + + # 解析动作参数 + try: + action_args = json.loads(info_json) if info_json else {} + except json.JSONDecodeError: + action_args = {} + + # 精简 action_args,只保留关键字段(保留完整内容,不截断) + simplified_args = {} + if 'content' in action_args: + simplified_args['content'] = action_args['content'] + if 'post_id' in action_args: + simplified_args['post_id'] = action_args['post_id'] + if 'comment_id' in action_args: + simplified_args['comment_id'] = action_args['comment_id'] + if 'quoted_id' in action_args: + simplified_args['quoted_id'] = action_args['quoted_id'] + if 'new_post_id' in action_args: + simplified_args['new_post_id'] = action_args['new_post_id'] + if 'follow_id' in action_args: + simplified_args['follow_id'] = action_args['follow_id'] + if 'query' in action_args: + simplified_args['query'] = action_args['query'] + if 'like_id' in action_args: + simplified_args['like_id'] = action_args['like_id'] + if 'dislike_id' in action_args: + simplified_args['dislike_id'] = action_args['dislike_id'] + + # 转换动作类型名称 + action_type = ACTION_TYPE_MAP.get(action, action.upper()) + + # 补充上下文信息(帖子内容、用户名等) + _enrich_action_context(cursor, action_type, simplified_args, agent_names) + + actions.append({ + 'agent_id': user_id, + 'agent_name': agent_names.get(user_id, f'Agent_{user_id}'), + 'action_type': action_type, + 'action_args': simplified_args, + }) + + conn.close() + except Exception as e: + print(f"读取数据库动作失败: {e}") + + return actions, new_last_rowid + + +def _enrich_action_context( + cursor, + action_type: str, + action_args: Dict[str, Any], + agent_names: Dict[int, str] +) -> None: + """ + 为动作补充上下文信息(帖子内容、用户名等) + + Args: + cursor: 数据库游标 + action_type: 动作类型 + action_args: 动作参数(会被修改) + agent_names: agent_id -> agent_name 映射 + """ + try: + # 点赞/踩帖子:补充帖子内容和作者 + if action_type in ('LIKE_POST', 'DISLIKE_POST'): + post_id = action_args.get('post_id') + if post_id: + post_info = _get_post_info(cursor, post_id, agent_names) + if post_info: + action_args['post_content'] = post_info.get('content', '') + action_args['post_author_name'] = post_info.get('author_name', '') + + # 转发帖子:补充原帖内容和作者 + elif action_type == 'REPOST': + new_post_id = action_args.get('new_post_id') + if new_post_id: + # 转发帖子的 original_post_id 指向原帖 + cursor.execute(""" + SELECT original_post_id FROM post WHERE post_id = ? + """, (new_post_id,)) + row = cursor.fetchone() + if row and row[0]: + original_post_id = row[0] + original_info = _get_post_info(cursor, original_post_id, agent_names) + if original_info: + action_args['original_content'] = original_info.get('content', '') + action_args['original_author_name'] = original_info.get('author_name', '') + + # 引用帖子:补充原帖内容、作者和引用评论 + elif action_type == 'QUOTE_POST': + quoted_id = action_args.get('quoted_id') + new_post_id = action_args.get('new_post_id') + + if quoted_id: + original_info = _get_post_info(cursor, quoted_id, agent_names) + if original_info: + action_args['original_content'] = original_info.get('content', '') + action_args['original_author_name'] = original_info.get('author_name', '') + + # 获取引用帖子的评论内容(quote_content) + if new_post_id: + cursor.execute(""" + SELECT quote_content FROM post WHERE post_id = ? + """, (new_post_id,)) + row = cursor.fetchone() + if row and row[0]: + action_args['quote_content'] = row[0] + + # 关注用户:补充被关注用户的名称 + elif action_type == 'FOLLOW': + follow_id = action_args.get('follow_id') + if follow_id: + # 从 follow 表获取 followee_id + cursor.execute(""" + SELECT followee_id FROM follow WHERE follow_id = ? + """, (follow_id,)) + row = cursor.fetchone() + if row: + followee_id = row[0] + target_name = _get_user_name(cursor, followee_id, agent_names) + if target_name: + action_args['target_user_name'] = target_name + + # 屏蔽用户:补充被屏蔽用户的名称 + elif action_type == 'MUTE': + # 从 action_args 中获取 user_id 或 target_id + target_id = action_args.get('user_id') or action_args.get('target_id') + if target_id: + target_name = _get_user_name(cursor, target_id, agent_names) + if target_name: + action_args['target_user_name'] = target_name + + # 点赞/踩评论:补充评论内容和作者 + elif action_type in ('LIKE_COMMENT', 'DISLIKE_COMMENT'): + comment_id = action_args.get('comment_id') + if comment_id: + comment_info = _get_comment_info(cursor, comment_id, agent_names) + if comment_info: + action_args['comment_content'] = comment_info.get('content', '') + action_args['comment_author_name'] = comment_info.get('author_name', '') + + # 发表评论:补充所评论的帖子信息 + elif action_type == 'CREATE_COMMENT': + post_id = action_args.get('post_id') + if post_id: + post_info = _get_post_info(cursor, post_id, agent_names) + if post_info: + action_args['post_content'] = post_info.get('content', '') + action_args['post_author_name'] = post_info.get('author_name', '') + + except Exception as e: + # 补充上下文失败不影响主流程 + print(f"补充动作上下文失败: {e}") + + +def _get_post_info( + cursor, + post_id: int, + agent_names: Dict[int, str] +) -> Optional[Dict[str, str]]: + """ + 获取帖子信息 + + Args: + cursor: 数据库游标 + post_id: 帖子ID + agent_names: agent_id -> agent_name 映射 + + Returns: + 包含 content 和 author_name 的字典,或 None + """ + try: + cursor.execute(""" + SELECT p.content, p.user_id, u.agent_id + FROM post p + LEFT JOIN user u ON p.user_id = u.user_id + WHERE p.post_id = ? + """, (post_id,)) + row = cursor.fetchone() + if row: + content = row[0] or '' + user_id = row[1] + agent_id = row[2] + + # 优先使用 agent_names 中的名称 + author_name = '' + if agent_id is not None and agent_id in agent_names: + author_name = agent_names[agent_id] + elif user_id: + # 从 user 表获取名称 + cursor.execute("SELECT name, user_name FROM user WHERE user_id = ?", (user_id,)) + user_row = cursor.fetchone() + if user_row: + author_name = user_row[0] or user_row[1] or '' + + return {'content': content, 'author_name': author_name} + except Exception: + pass + return None + + +def _get_user_name( + cursor, + user_id: int, + agent_names: Dict[int, str] +) -> Optional[str]: + """ + 获取用户名称 + + Args: + cursor: 数据库游标 + user_id: 用户ID + agent_names: agent_id -> agent_name 映射 + + Returns: + 用户名称,或 None + """ + try: + cursor.execute(""" + SELECT agent_id, name, user_name FROM user WHERE user_id = ? + """, (user_id,)) + row = cursor.fetchone() + if row: + agent_id = row[0] + name = row[1] + user_name = row[2] + + # 优先使用 agent_names 中的名称 + if agent_id is not None and agent_id in agent_names: + return agent_names[agent_id] + return name or user_name or '' + except Exception: + pass + return None + + +def _get_comment_info( + cursor, + comment_id: int, + agent_names: Dict[int, str] +) -> Optional[Dict[str, str]]: + """ + 获取评论信息 + + Args: + cursor: 数据库游标 + comment_id: 评论ID + agent_names: agent_id -> agent_name 映射 + + Returns: + 包含 content 和 author_name 的字典,或 None + """ + try: + cursor.execute(""" + SELECT c.content, c.user_id, u.agent_id + FROM comment c + LEFT JOIN user u ON c.user_id = u.user_id + WHERE c.comment_id = ? + """, (comment_id,)) + row = cursor.fetchone() + if row: + content = row[0] or '' + user_id = row[1] + agent_id = row[2] + + # 优先使用 agent_names 中的名称 + author_name = '' + if agent_id is not None and agent_id in agent_names: + author_name = agent_names[agent_id] + elif user_id: + # 从 user 表获取名称 + cursor.execute("SELECT name, user_name FROM user WHERE user_id = ?", (user_id,)) + user_row = cursor.fetchone() + if user_row: + author_name = user_row[0] or user_row[1] or '' + + return {'content': content, 'author_name': author_name} + except Exception: + pass + return None + + +def create_model(config: Dict[str, Any], use_boost: bool = False): + """ + 创建LLM模型 + + 支持双 LLM 配置,用于并行模拟时提速: + - 通用配置:LLM_API_KEY, LLM_BASE_URL, LLM_MODEL_NAME + - 加速配置(可选):LLM_BOOST_API_KEY, LLM_BOOST_BASE_URL, LLM_BOOST_MODEL_NAME + + 如果配置了加速 LLM,并行模拟时可以让不同平台使用不同的 API 服务商,提高并发能力。 + + Args: + config: 模拟配置字典 + use_boost: 是否使用加速 LLM 配置(如果可用) + """ + # 检查是否有加速配置 + boost_api_key = os.environ.get("LLM_BOOST_API_KEY", "") + boost_base_url = os.environ.get("LLM_BOOST_BASE_URL", "") + boost_model = os.environ.get("LLM_BOOST_MODEL_NAME", "") + has_boost_config = bool(boost_api_key) + + # 根据参数和配置情况选择使用哪个 LLM + if use_boost and has_boost_config: + # 使用加速配置 + llm_api_key = boost_api_key + llm_base_url = boost_base_url + llm_model = boost_model or os.environ.get("LLM_MODEL_NAME", "") + config_label = "[加速LLM]" + else: + # 使用通用配置 + llm_api_key = os.environ.get("LLM_API_KEY", "") + llm_base_url = os.environ.get("LLM_BASE_URL", "") + llm_model = os.environ.get("LLM_MODEL_NAME", "") + config_label = "[通用LLM]" + + # 如果 .env 中没有模型名,则使用 config 作为备用 + if not llm_model: + llm_model = config.get("llm_model", "gpt-4o-mini") + + # 设置 camel-ai 所需的环境变量 + if llm_api_key: + os.environ["OPENAI_API_KEY"] = llm_api_key + + if not os.environ.get("OPENAI_API_KEY"): + raise ValueError("缺少 API Key 配置,请在项目根目录 .env 文件中设置 LLM_API_KEY") + + if llm_base_url: + os.environ["OPENAI_API_BASE_URL"] = llm_base_url + + print(f"{config_label} model={llm_model}, base_url={llm_base_url[:40] if llm_base_url else '默认'}...") + + return ModelFactory.create( + model_platform=ModelPlatformType.OPENAI, + model_type=llm_model, + ) + + +def get_active_agents_for_round( + env, + config: Dict[str, Any], + current_hour: int, + round_num: int +) -> List: + """根据时间和配置决定本轮激活哪些Agent""" + time_config = config.get("time_config", {}) + agent_configs = config.get("agent_configs", []) + + base_min = time_config.get("agents_per_hour_min", 5) + base_max = time_config.get("agents_per_hour_max", 20) + + peak_hours = time_config.get("peak_hours", [9, 10, 11, 14, 15, 20, 21, 22]) + off_peak_hours = time_config.get("off_peak_hours", [0, 1, 2, 3, 4, 5]) + + if current_hour in peak_hours: + multiplier = time_config.get("peak_activity_multiplier", 1.5) + elif current_hour in off_peak_hours: + multiplier = time_config.get("off_peak_activity_multiplier", 0.3) + else: + multiplier = 1.0 + + target_count = int(random.uniform(base_min, base_max) * multiplier) + + candidates = [] + for cfg in agent_configs: + agent_id = cfg.get("agent_id", 0) + active_hours = cfg.get("active_hours", list(range(8, 23))) + activity_level = cfg.get("activity_level", 0.5) + + if current_hour not in active_hours: + continue + + if random.random() < activity_level: + candidates.append(agent_id) + + selected_ids = random.sample( + candidates, + min(target_count, len(candidates)) + ) if candidates else [] + + active_agents = [] + for agent_id in selected_ids: + try: + agent = env.agent_graph.get_agent(agent_id) + active_agents.append((agent_id, agent)) + except Exception: + pass + + return active_agents + + +class PlatformSimulation: + """平台模拟结果容器""" + def __init__(self): + self.env = None + self.agent_graph = None + self.total_actions = 0 + + +async def run_twitter_simulation( + config: Dict[str, Any], + simulation_dir: str, + action_logger: Optional[PlatformActionLogger] = None, + main_logger: Optional[SimulationLogManager] = None, + max_rounds: Optional[int] = None +) -> PlatformSimulation: + """运行Twitter模拟 + + Args: + config: 模拟配置 + simulation_dir: 模拟目录 + action_logger: 动作日志记录器 + main_logger: 主日志管理器 + max_rounds: 最大模拟轮数(可选,用于截断过长的模拟) + + Returns: + PlatformSimulation: 包含env和agent_graph的结果对象 + """ + result = PlatformSimulation() + + def log_info(msg): + if main_logger: + main_logger.info(f"[Twitter] {msg}") + print(f"[Twitter] {msg}") + + log_info("初始化...") + + # Twitter 使用通用 LLM 配置 + model = create_model(config, use_boost=False) + + # OASIS Twitter使用CSV格式 + profile_path = os.path.join(simulation_dir, "twitter_profiles.csv") + if not os.path.exists(profile_path): + log_info(f"错误: Profile文件不存在: {profile_path}") + return result + + result.agent_graph = await generate_twitter_agent_graph( + profile_path=profile_path, + model=model, + available_actions=TWITTER_ACTIONS, + ) + + # 从配置文件获取 Agent 真实名称映射(使用 entity_name 而非默认的 Agent_X) + agent_names = get_agent_names_from_config(config) + # 如果配置中没有某个 agent,则使用 OASIS 的默认名称 + for agent_id, agent in result.agent_graph.get_agents(): + if agent_id not in agent_names: + agent_names[agent_id] = getattr(agent, 'name', f'Agent_{agent_id}') + + db_path = os.path.join(simulation_dir, "twitter_simulation.db") + if os.path.exists(db_path): + os.remove(db_path) + + result.env = oasis.make( + agent_graph=result.agent_graph, + platform=oasis.DefaultPlatformType.TWITTER, + database_path=db_path, + semaphore=30, # 限制最大并发 LLM 请求数,防止 API 过载 + ) + + await result.env.reset() + log_info("环境已启动") + + if action_logger: + action_logger.log_simulation_start(config) + + total_actions = 0 + last_rowid = 0 # 跟踪数据库中最后处理的行号(使用 rowid 避免 created_at 格式差异) + + # 执行初始事件 + event_config = config.get("event_config", {}) + initial_posts = event_config.get("initial_posts", []) + + # 记录 round 0 开始(初始事件阶段) + if action_logger: + action_logger.log_round_start(0, 0) # round 0, simulated_hour 0 + + initial_action_count = 0 + if initial_posts: + initial_actions = {} + for post in initial_posts: + agent_id = post.get("poster_agent_id", 0) + content = post.get("content", "") + try: + agent = result.env.agent_graph.get_agent(agent_id) + initial_actions[agent] = ManualAction( + action_type=ActionType.CREATE_POST, + action_args={"content": content} + ) + + if action_logger: + action_logger.log_action( + round_num=0, + agent_id=agent_id, + agent_name=agent_names.get(agent_id, f"Agent_{agent_id}"), + action_type="CREATE_POST", + action_args={"content": content} + ) + total_actions += 1 + initial_action_count += 1 + except Exception: + pass + + if initial_actions: + await result.env.step(initial_actions) + log_info(f"已发布 {len(initial_actions)} 条初始帖子") + + # 记录 round 0 结束 + if action_logger: + action_logger.log_round_end(0, initial_action_count) + + # 主模拟循环 + time_config = config.get("time_config", {}) + total_hours = time_config.get("total_simulation_hours", 72) + minutes_per_round = time_config.get("minutes_per_round", 30) + total_rounds = (total_hours * 60) // minutes_per_round + + # 如果指定了最大轮数,则截断 + if max_rounds is not None and max_rounds > 0: + original_rounds = total_rounds + total_rounds = min(total_rounds, max_rounds) + if total_rounds < original_rounds: + log_info(f"轮数已截断: {original_rounds} -> {total_rounds} (max_rounds={max_rounds})") + + start_time = datetime.now() + + for round_num in range(total_rounds): + # 检查是否收到退出信号 + if _shutdown_event and _shutdown_event.is_set(): + if main_logger: + main_logger.info(f"收到退出信号,在第 {round_num + 1} 轮停止模拟") + break + + simulated_minutes = round_num * minutes_per_round + simulated_hour = (simulated_minutes // 60) % 24 + simulated_day = simulated_minutes // (60 * 24) + 1 + + active_agents = get_active_agents_for_round( + result.env, config, simulated_hour, round_num + ) + + # 无论是否有活跃agent,都记录round开始 + if action_logger: + action_logger.log_round_start(round_num + 1, simulated_hour) + + if not active_agents: + # 没有活跃agent时也记录round结束(actions_count=0) + if action_logger: + action_logger.log_round_end(round_num + 1, 0) + continue + + actions = {agent: LLMAction() for _, agent in active_agents} + await result.env.step(actions) + + # 从数据库获取实际执行的动作并记录 + actual_actions, last_rowid = fetch_new_actions_from_db( + db_path, last_rowid, agent_names + ) + + round_action_count = 0 + for action_data in actual_actions: + if action_logger: + action_logger.log_action( + round_num=round_num + 1, + agent_id=action_data['agent_id'], + agent_name=action_data['agent_name'], + action_type=action_data['action_type'], + action_args=action_data['action_args'] + ) + total_actions += 1 + round_action_count += 1 + + if action_logger: + action_logger.log_round_end(round_num + 1, round_action_count) + + if (round_num + 1) % 20 == 0: + progress = (round_num + 1) / total_rounds * 100 + log_info(f"Day {simulated_day}, {simulated_hour:02d}:00 - Round {round_num + 1}/{total_rounds} ({progress:.1f}%)") + + # 注意:不关闭环境,保留给Interview使用 + + if action_logger: + action_logger.log_simulation_end(total_rounds, total_actions) + + result.total_actions = total_actions + elapsed = (datetime.now() - start_time).total_seconds() + log_info(f"模拟循环完成! 耗时: {elapsed:.1f}秒, 总动作: {total_actions}") + + return result + + +async def run_reddit_simulation( + config: Dict[str, Any], + simulation_dir: str, + action_logger: Optional[PlatformActionLogger] = None, + main_logger: Optional[SimulationLogManager] = None, + max_rounds: Optional[int] = None +) -> PlatformSimulation: + """运行Reddit模拟 + + Args: + config: 模拟配置 + simulation_dir: 模拟目录 + action_logger: 动作日志记录器 + main_logger: 主日志管理器 + max_rounds: 最大模拟轮数(可选,用于截断过长的模拟) + + Returns: + PlatformSimulation: 包含env和agent_graph的结果对象 + """ + result = PlatformSimulation() + + def log_info(msg): + if main_logger: + main_logger.info(f"[Reddit] {msg}") + print(f"[Reddit] {msg}") + + log_info("初始化...") + + # Reddit 使用加速 LLM 配置(如果有的话,否则回退到通用配置) + model = create_model(config, use_boost=True) + + profile_path = os.path.join(simulation_dir, "reddit_profiles.json") + if not os.path.exists(profile_path): + log_info(f"错误: Profile文件不存在: {profile_path}") + return result + + result.agent_graph = await generate_reddit_agent_graph( + profile_path=profile_path, + model=model, + available_actions=REDDIT_ACTIONS, + ) + + # 从配置文件获取 Agent 真实名称映射(使用 entity_name 而非默认的 Agent_X) + agent_names = get_agent_names_from_config(config) + # 如果配置中没有某个 agent,则使用 OASIS 的默认名称 + for agent_id, agent in result.agent_graph.get_agents(): + if agent_id not in agent_names: + agent_names[agent_id] = getattr(agent, 'name', f'Agent_{agent_id}') + + db_path = os.path.join(simulation_dir, "reddit_simulation.db") + if os.path.exists(db_path): + os.remove(db_path) + + result.env = oasis.make( + agent_graph=result.agent_graph, + platform=oasis.DefaultPlatformType.REDDIT, + database_path=db_path, + semaphore=30, # 限制最大并发 LLM 请求数,防止 API 过载 + ) + + await result.env.reset() + log_info("环境已启动") + + if action_logger: + action_logger.log_simulation_start(config) + + total_actions = 0 + last_rowid = 0 # 跟踪数据库中最后处理的行号(使用 rowid 避免 created_at 格式差异) + + # 执行初始事件 + event_config = config.get("event_config", {}) + initial_posts = event_config.get("initial_posts", []) + + # 记录 round 0 开始(初始事件阶段) + if action_logger: + action_logger.log_round_start(0, 0) # round 0, simulated_hour 0 + + initial_action_count = 0 + if initial_posts: + initial_actions = {} + for post in initial_posts: + agent_id = post.get("poster_agent_id", 0) + content = post.get("content", "") + try: + agent = result.env.agent_graph.get_agent(agent_id) + if agent in initial_actions: + if not isinstance(initial_actions[agent], list): + initial_actions[agent] = [initial_actions[agent]] + initial_actions[agent].append(ManualAction( + action_type=ActionType.CREATE_POST, + action_args={"content": content} + )) + else: + initial_actions[agent] = ManualAction( + action_type=ActionType.CREATE_POST, + action_args={"content": content} + ) + + if action_logger: + action_logger.log_action( + round_num=0, + agent_id=agent_id, + agent_name=agent_names.get(agent_id, f"Agent_{agent_id}"), + action_type="CREATE_POST", + action_args={"content": content} + ) + total_actions += 1 + initial_action_count += 1 + except Exception: + pass + + if initial_actions: + await result.env.step(initial_actions) + log_info(f"已发布 {len(initial_actions)} 条初始帖子") + + # 记录 round 0 结束 + if action_logger: + action_logger.log_round_end(0, initial_action_count) + + # 主模拟循环 + time_config = config.get("time_config", {}) + total_hours = time_config.get("total_simulation_hours", 72) + minutes_per_round = time_config.get("minutes_per_round", 30) + total_rounds = (total_hours * 60) // minutes_per_round + + # 如果指定了最大轮数,则截断 + if max_rounds is not None and max_rounds > 0: + original_rounds = total_rounds + total_rounds = min(total_rounds, max_rounds) + if total_rounds < original_rounds: + log_info(f"轮数已截断: {original_rounds} -> {total_rounds} (max_rounds={max_rounds})") + + start_time = datetime.now() + + for round_num in range(total_rounds): + # 检查是否收到退出信号 + if _shutdown_event and _shutdown_event.is_set(): + if main_logger: + main_logger.info(f"收到退出信号,在第 {round_num + 1} 轮停止模拟") + break + + simulated_minutes = round_num * minutes_per_round + simulated_hour = (simulated_minutes // 60) % 24 + simulated_day = simulated_minutes // (60 * 24) + 1 + + active_agents = get_active_agents_for_round( + result.env, config, simulated_hour, round_num + ) + + # 无论是否有活跃agent,都记录round开始 + if action_logger: + action_logger.log_round_start(round_num + 1, simulated_hour) + + if not active_agents: + # 没有活跃agent时也记录round结束(actions_count=0) + if action_logger: + action_logger.log_round_end(round_num + 1, 0) + continue + + actions = {agent: LLMAction() for _, agent in active_agents} + await result.env.step(actions) + + # 从数据库获取实际执行的动作并记录 + actual_actions, last_rowid = fetch_new_actions_from_db( + db_path, last_rowid, agent_names + ) + + round_action_count = 0 + for action_data in actual_actions: + if action_logger: + action_logger.log_action( + round_num=round_num + 1, + agent_id=action_data['agent_id'], + agent_name=action_data['agent_name'], + action_type=action_data['action_type'], + action_args=action_data['action_args'] + ) + total_actions += 1 + round_action_count += 1 + + if action_logger: + action_logger.log_round_end(round_num + 1, round_action_count) + + if (round_num + 1) % 20 == 0: + progress = (round_num + 1) / total_rounds * 100 + log_info(f"Day {simulated_day}, {simulated_hour:02d}:00 - Round {round_num + 1}/{total_rounds} ({progress:.1f}%)") + + # 注意:不关闭环境,保留给Interview使用 + + if action_logger: + action_logger.log_simulation_end(total_rounds, total_actions) + + result.total_actions = total_actions + elapsed = (datetime.now() - start_time).total_seconds() + log_info(f"模拟循环完成! 耗时: {elapsed:.1f}秒, 总动作: {total_actions}") + + return result + + +async def main(): + parser = argparse.ArgumentParser(description='OASIS双平台并行模拟') + parser.add_argument( + '--config', + type=str, + required=True, + help='配置文件路径 (simulation_config.json)' + ) + parser.add_argument( + '--twitter-only', + action='store_true', + help='只运行Twitter模拟' + ) + parser.add_argument( + '--reddit-only', + action='store_true', + help='只运行Reddit模拟' + ) + parser.add_argument( + '--max-rounds', + type=int, + default=None, + help='最大模拟轮数(可选,用于截断过长的模拟)' + ) + parser.add_argument( + '--no-wait', + action='store_true', + default=False, + help='模拟完成后立即关闭环境,不进入等待命令模式' + ) + + args = parser.parse_args() + + # 在 main 函数开始时创建 shutdown 事件,确保整个程序都能响应退出信号 + global _shutdown_event + _shutdown_event = asyncio.Event() + + if not os.path.exists(args.config): + print(f"错误: 配置文件不存在: {args.config}") + sys.exit(1) + + config = load_config(args.config) + simulation_dir = os.path.dirname(args.config) or "." + wait_for_commands = not args.no_wait + + # 初始化日志配置(禁用 OASIS 日志,清理旧文件) + init_logging_for_simulation(simulation_dir) + + # 创建日志管理器 + log_manager = SimulationLogManager(simulation_dir) + twitter_logger = log_manager.get_twitter_logger() + reddit_logger = log_manager.get_reddit_logger() + + log_manager.info("=" * 60) + log_manager.info("OASIS 双平台并行模拟") + log_manager.info(f"配置文件: {args.config}") + log_manager.info(f"模拟ID: {config.get('simulation_id', 'unknown')}") + log_manager.info(f"等待命令模式: {'启用' if wait_for_commands else '禁用'}") + log_manager.info("=" * 60) + + time_config = config.get("time_config", {}) + total_hours = time_config.get('total_simulation_hours', 72) + minutes_per_round = time_config.get('minutes_per_round', 30) + config_total_rounds = (total_hours * 60) // minutes_per_round + + log_manager.info(f"模拟参数:") + log_manager.info(f" - 总模拟时长: {total_hours}小时") + log_manager.info(f" - 每轮时间: {minutes_per_round}分钟") + log_manager.info(f" - 配置总轮数: {config_total_rounds}") + if args.max_rounds: + log_manager.info(f" - 最大轮数限制: {args.max_rounds}") + if args.max_rounds < config_total_rounds: + log_manager.info(f" - 实际执行轮数: {args.max_rounds} (已截断)") + log_manager.info(f" - Agent数量: {len(config.get('agent_configs', []))}") + + log_manager.info("日志结构:") + log_manager.info(f" - 主日志: simulation.log") + log_manager.info(f" - Twitter动作: twitter/actions.jsonl") + log_manager.info(f" - Reddit动作: reddit/actions.jsonl") + log_manager.info("=" * 60) + + start_time = datetime.now() + + # 存储两个平台的模拟结果 + twitter_result: Optional[PlatformSimulation] = None + reddit_result: Optional[PlatformSimulation] = None + + if args.twitter_only: + twitter_result = await run_twitter_simulation(config, simulation_dir, twitter_logger, log_manager, args.max_rounds) + elif args.reddit_only: + reddit_result = await run_reddit_simulation(config, simulation_dir, reddit_logger, log_manager, args.max_rounds) + else: + # 并行运行(每个平台使用独立的日志记录器) + results = await asyncio.gather( + run_twitter_simulation(config, simulation_dir, twitter_logger, log_manager, args.max_rounds), + run_reddit_simulation(config, simulation_dir, reddit_logger, log_manager, args.max_rounds), + ) + twitter_result, reddit_result = results + + total_elapsed = (datetime.now() - start_time).total_seconds() + log_manager.info("=" * 60) + log_manager.info(f"模拟循环完成! 总耗时: {total_elapsed:.1f}秒") + + # 是否进入等待命令模式 + if wait_for_commands: + log_manager.info("") + log_manager.info("=" * 60) + log_manager.info("进入等待命令模式 - 环境保持运行") + log_manager.info("支持的命令: interview, batch_interview, close_env") + log_manager.info("=" * 60) + + # 创建IPC处理器 + ipc_handler = ParallelIPCHandler( + simulation_dir=simulation_dir, + twitter_env=twitter_result.env if twitter_result else None, + twitter_agent_graph=twitter_result.agent_graph if twitter_result else None, + reddit_env=reddit_result.env if reddit_result else None, + reddit_agent_graph=reddit_result.agent_graph if reddit_result else None + ) + ipc_handler.update_status("alive") + + # 等待命令循环(使用全局 _shutdown_event) + try: + while not _shutdown_event.is_set(): + should_continue = await ipc_handler.process_commands() + if not should_continue: + break + # 使用 wait_for 替代 sleep,这样可以响应 shutdown_event + try: + await asyncio.wait_for(_shutdown_event.wait(), timeout=0.5) + break # 收到退出信号 + except asyncio.TimeoutError: + pass # 超时继续循环 + except KeyboardInterrupt: + print("\n收到中断信号") + except asyncio.CancelledError: + print("\n任务被取消") + except Exception as e: + print(f"\n命令处理出错: {e}") + + log_manager.info("\n关闭环境...") + ipc_handler.update_status("stopped") + + # 关闭环境 + if twitter_result and twitter_result.env: + await twitter_result.env.close() + log_manager.info("[Twitter] 环境已关闭") + + if reddit_result and reddit_result.env: + await reddit_result.env.close() + log_manager.info("[Reddit] 环境已关闭") + + log_manager.info("=" * 60) + log_manager.info(f"全部完成!") + log_manager.info(f"日志文件:") + log_manager.info(f" - {os.path.join(simulation_dir, 'simulation.log')}") + log_manager.info(f" - {os.path.join(simulation_dir, 'twitter', 'actions.jsonl')}") + log_manager.info(f" - {os.path.join(simulation_dir, 'reddit', 'actions.jsonl')}") + log_manager.info("=" * 60) + + +def setup_signal_handlers(loop=None): + """ + 设置信号处理器,确保收到 SIGTERM/SIGINT 时能够正确退出 + + 持久化模拟场景:模拟完成后不退出,等待 interview 命令 + 当收到终止信号时,需要: + 1. 通知 asyncio 循环退出等待 + 2. 让程序有机会正常清理资源(关闭数据库、环境等) + 3. 然后才退出 + """ + def signal_handler(signum, frame): + global _cleanup_done + sig_name = "SIGTERM" if signum == signal.SIGTERM else "SIGINT" + print(f"\n收到 {sig_name} 信号,正在退出...") + + if not _cleanup_done: + _cleanup_done = True + # 设置事件通知 asyncio 循环退出(让循环有机会清理资源) + if _shutdown_event: + _shutdown_event.set() + + # 不要直接 sys.exit(),让 asyncio 循环正常退出并清理资源 + # 如果是重复收到信号,才强制退出 + else: + print("强制退出...") + sys.exit(1) + + signal.signal(signal.SIGTERM, signal_handler) + signal.signal(signal.SIGINT, signal_handler) + + +if __name__ == "__main__": + setup_signal_handlers() + try: + asyncio.run(main()) + except KeyboardInterrupt: + print("\n程序被中断") + except SystemExit: + pass + finally: + # 清理 multiprocessing 资源跟踪器(防止退出时的警告) + try: + from multiprocessing import resource_tracker + resource_tracker._resource_tracker._stop() + except Exception: + pass + print("模拟进程已退出") diff --git a/app/scripts/run_reddit_simulation.py b/app/scripts/run_reddit_simulation.py new file mode 100644 index 0000000000000000000000000000000000000000..f7f3eae8cf2b99f9cead554e234708ba62c7632f --- /dev/null +++ b/app/scripts/run_reddit_simulation.py @@ -0,0 +1,769 @@ +""" +OASIS Reddit模拟预设脚本 +此脚本读取配置文件中的参数来执行模拟,实现全程自动化 + +功能特性: +- 完成模拟后不立即关闭环境,进入等待命令模式 +- 支持通过IPC接收Interview命令 +- 支持单个Agent采访和批量采访 +- 支持远程关闭环境命令 + +使用方式: + python run_reddit_simulation.py --config /path/to/simulation_config.json + python run_reddit_simulation.py --config /path/to/simulation_config.json --no-wait # 完成后立即关闭 +""" + +import argparse +import asyncio +import json +import logging +import os +import random +import signal +import sys +import sqlite3 +from datetime import datetime +from typing import Dict, Any, List, Optional + +# 全局变量:用于信号处理 +_shutdown_event = None +_cleanup_done = False + +# 添加项目路径 +_scripts_dir = os.path.dirname(os.path.abspath(__file__)) +_backend_dir = os.path.abspath(os.path.join(_scripts_dir, '..')) +_project_root = os.path.abspath(os.path.join(_backend_dir, '..')) +sys.path.insert(0, _scripts_dir) +sys.path.insert(0, _backend_dir) + +# 加载项目根目录的 .env 文件(包含 LLM_API_KEY 等配置) +from dotenv import load_dotenv +_env_file = os.path.join(_project_root, '.env') +if os.path.exists(_env_file): + load_dotenv(_env_file) +else: + _backend_env = os.path.join(_backend_dir, '.env') + if os.path.exists(_backend_env): + load_dotenv(_backend_env) + + +import re + + +class UnicodeFormatter(logging.Formatter): + """自定义格式化器,将 Unicode 转义序列转换为可读字符""" + + UNICODE_ESCAPE_PATTERN = re.compile(r'\\u([0-9a-fA-F]{4})') + + def format(self, record): + result = super().format(record) + + def replace_unicode(match): + try: + return chr(int(match.group(1), 16)) + except (ValueError, OverflowError): + return match.group(0) + + return self.UNICODE_ESCAPE_PATTERN.sub(replace_unicode, result) + + +class MaxTokensWarningFilter(logging.Filter): + """过滤掉 camel-ai 关于 max_tokens 的警告(我们故意不设置 max_tokens,让模型自行决定)""" + + def filter(self, record): + # 过滤掉包含 max_tokens 警告的日志 + if "max_tokens" in record.getMessage() and "Invalid or missing" in record.getMessage(): + return False + return True + + +# 在模块加载时立即添加过滤器,确保在 camel 代码执行前生效 +logging.getLogger().addFilter(MaxTokensWarningFilter()) + + +def setup_oasis_logging(log_dir: str): + """配置 OASIS 的日志,使用固定名称的日志文件""" + os.makedirs(log_dir, exist_ok=True) + + # 清理旧的日志文件 + for f in os.listdir(log_dir): + old_log = os.path.join(log_dir, f) + if os.path.isfile(old_log) and f.endswith('.log'): + try: + os.remove(old_log) + except OSError: + pass + + formatter = UnicodeFormatter("%(levelname)s - %(asctime)s - %(name)s - %(message)s") + + loggers_config = { + "social.agent": os.path.join(log_dir, "social.agent.log"), + "social.twitter": os.path.join(log_dir, "social.twitter.log"), + "social.rec": os.path.join(log_dir, "social.rec.log"), + "oasis.env": os.path.join(log_dir, "oasis.env.log"), + "table": os.path.join(log_dir, "table.log"), + } + + for logger_name, log_file in loggers_config.items(): + logger = logging.getLogger(logger_name) + logger.setLevel(logging.DEBUG) + logger.handlers.clear() + file_handler = logging.FileHandler(log_file, encoding='utf-8', mode='w') + file_handler.setLevel(logging.DEBUG) + file_handler.setFormatter(formatter) + logger.addHandler(file_handler) + logger.propagate = False + + +try: + from camel.models import ModelFactory + from camel.types import ModelPlatformType + import oasis + from oasis import ( + ActionType, + LLMAction, + ManualAction, + generate_reddit_agent_graph + ) +except ImportError as e: + print(f"错误: 缺少依赖 {e}") + print("请先安装: pip install oasis-ai camel-ai") + sys.exit(1) + + +# IPC相关常量 +IPC_COMMANDS_DIR = "ipc_commands" +IPC_RESPONSES_DIR = "ipc_responses" +ENV_STATUS_FILE = "env_status.json" + +class CommandType: + """命令类型常量""" + INTERVIEW = "interview" + BATCH_INTERVIEW = "batch_interview" + CLOSE_ENV = "close_env" + + +class IPCHandler: + """IPC命令处理器""" + + def __init__(self, simulation_dir: str, env, agent_graph): + self.simulation_dir = simulation_dir + self.env = env + self.agent_graph = agent_graph + self.commands_dir = os.path.join(simulation_dir, IPC_COMMANDS_DIR) + self.responses_dir = os.path.join(simulation_dir, IPC_RESPONSES_DIR) + self.status_file = os.path.join(simulation_dir, ENV_STATUS_FILE) + self._running = True + + # 确保目录存在 + os.makedirs(self.commands_dir, exist_ok=True) + os.makedirs(self.responses_dir, exist_ok=True) + + def update_status(self, status: str): + """更新环境状态""" + with open(self.status_file, 'w', encoding='utf-8') as f: + json.dump({ + "status": status, + "timestamp": datetime.now().isoformat() + }, f, ensure_ascii=False, indent=2) + + def poll_command(self) -> Optional[Dict[str, Any]]: + """轮询获取待处理命令""" + if not os.path.exists(self.commands_dir): + return None + + # 获取命令文件(按时间排序) + command_files = [] + for filename in os.listdir(self.commands_dir): + if filename.endswith('.json'): + filepath = os.path.join(self.commands_dir, filename) + command_files.append((filepath, os.path.getmtime(filepath))) + + command_files.sort(key=lambda x: x[1]) + + for filepath, _ in command_files: + try: + with open(filepath, 'r', encoding='utf-8') as f: + return json.load(f) + except (json.JSONDecodeError, OSError): + continue + + return None + + def send_response(self, command_id: str, status: str, result: Dict = None, error: str = None): + """发送响应""" + response = { + "command_id": command_id, + "status": status, + "result": result, + "error": error, + "timestamp": datetime.now().isoformat() + } + + response_file = os.path.join(self.responses_dir, f"{command_id}.json") + with open(response_file, 'w', encoding='utf-8') as f: + json.dump(response, f, ensure_ascii=False, indent=2) + + # 删除命令文件 + command_file = os.path.join(self.commands_dir, f"{command_id}.json") + try: + os.remove(command_file) + except OSError: + pass + + async def handle_interview(self, command_id: str, agent_id: int, prompt: str) -> bool: + """ + 处理单个Agent采访命令 + + Returns: + True 表示成功,False 表示失败 + """ + try: + # 获取Agent + agent = self.agent_graph.get_agent(agent_id) + + # 创建Interview动作 + interview_action = ManualAction( + action_type=ActionType.INTERVIEW, + action_args={"prompt": prompt} + ) + + # 执行Interview + actions = {agent: interview_action} + await self.env.step(actions) + + # 从数据库获取结果 + result = self._get_interview_result(agent_id) + + self.send_response(command_id, "completed", result=result) + print(f" Interview完成: agent_id={agent_id}") + return True + + except Exception as e: + error_msg = str(e) + print(f" Interview失败: agent_id={agent_id}, error={error_msg}") + self.send_response(command_id, "failed", error=error_msg) + return False + + async def handle_batch_interview(self, command_id: str, interviews: List[Dict]) -> bool: + """ + 处理批量采访命令 + + Args: + interviews: [{"agent_id": int, "prompt": str}, ...] + """ + try: + # 构建动作字典 + actions = {} + agent_prompts = {} # 记录每个agent的prompt + + for interview in interviews: + agent_id = interview.get("agent_id") + prompt = interview.get("prompt", "") + + try: + agent = self.agent_graph.get_agent(agent_id) + actions[agent] = ManualAction( + action_type=ActionType.INTERVIEW, + action_args={"prompt": prompt} + ) + agent_prompts[agent_id] = prompt + except Exception as e: + print(f" 警告: 无法获取Agent {agent_id}: {e}") + + if not actions: + self.send_response(command_id, "failed", error="没有有效的Agent") + return False + + # 执行批量Interview + await self.env.step(actions) + + # 获取所有结果 + results = {} + for agent_id in agent_prompts.keys(): + result = self._get_interview_result(agent_id) + results[agent_id] = result + + self.send_response(command_id, "completed", result={ + "interviews_count": len(results), + "results": results + }) + print(f" 批量Interview完成: {len(results)} 个Agent") + return True + + except Exception as e: + error_msg = str(e) + print(f" 批量Interview失败: {error_msg}") + self.send_response(command_id, "failed", error=error_msg) + return False + + def _get_interview_result(self, agent_id: int) -> Dict[str, Any]: + """从数据库获取最新的Interview结果""" + db_path = os.path.join(self.simulation_dir, "reddit_simulation.db") + + result = { + "agent_id": agent_id, + "response": None, + "timestamp": None + } + + if not os.path.exists(db_path): + return result + + try: + conn = sqlite3.connect(db_path) + cursor = conn.cursor() + + # 查询最新的Interview记录 + cursor.execute(""" + SELECT user_id, info, created_at + FROM trace + WHERE action = ? AND user_id = ? + ORDER BY created_at DESC + LIMIT 1 + """, (ActionType.INTERVIEW.value, agent_id)) + + row = cursor.fetchone() + if row: + user_id, info_json, created_at = row + try: + info = json.loads(info_json) if info_json else {} + result["response"] = info.get("response", info) + result["timestamp"] = created_at + except json.JSONDecodeError: + result["response"] = info_json + + conn.close() + + except Exception as e: + print(f" 读取Interview结果失败: {e}") + + return result + + async def process_commands(self) -> bool: + """ + 处理所有待处理命令 + + Returns: + True 表示继续运行,False 表示应该退出 + """ + command = self.poll_command() + if not command: + return True + + command_id = command.get("command_id") + command_type = command.get("command_type") + args = command.get("args", {}) + + print(f"\n收到IPC命令: {command_type}, id={command_id}") + + if command_type == CommandType.INTERVIEW: + await self.handle_interview( + command_id, + args.get("agent_id", 0), + args.get("prompt", "") + ) + return True + + elif command_type == CommandType.BATCH_INTERVIEW: + await self.handle_batch_interview( + command_id, + args.get("interviews", []) + ) + return True + + elif command_type == CommandType.CLOSE_ENV: + print("收到关闭环境命令") + self.send_response(command_id, "completed", result={"message": "环境即将关闭"}) + return False + + else: + self.send_response(command_id, "failed", error=f"未知命令类型: {command_type}") + return True + + +class RedditSimulationRunner: + """Reddit模拟运行器""" + + # Reddit可用动作(不包含INTERVIEW,INTERVIEW只能通过ManualAction手动触发) + AVAILABLE_ACTIONS = [ + ActionType.LIKE_POST, + ActionType.DISLIKE_POST, + ActionType.CREATE_POST, + ActionType.CREATE_COMMENT, + ActionType.LIKE_COMMENT, + ActionType.DISLIKE_COMMENT, + ActionType.SEARCH_POSTS, + ActionType.SEARCH_USER, + ActionType.TREND, + ActionType.REFRESH, + ActionType.DO_NOTHING, + ActionType.FOLLOW, + ActionType.MUTE, + ] + + def __init__(self, config_path: str, wait_for_commands: bool = True): + """ + 初始化模拟运行器 + + Args: + config_path: 配置文件路径 (simulation_config.json) + wait_for_commands: 模拟完成后是否等待命令(默认True) + """ + self.config_path = config_path + self.config = self._load_config() + self.simulation_dir = os.path.dirname(config_path) + self.wait_for_commands = wait_for_commands + self.env = None + self.agent_graph = None + self.ipc_handler = None + + def _load_config(self) -> Dict[str, Any]: + """加载配置文件""" + with open(self.config_path, 'r', encoding='utf-8') as f: + return json.load(f) + + def _get_profile_path(self) -> str: + """获取Profile文件路径""" + return os.path.join(self.simulation_dir, "reddit_profiles.json") + + def _get_db_path(self) -> str: + """获取数据库路径""" + return os.path.join(self.simulation_dir, "reddit_simulation.db") + + def _create_model(self): + """ + 创建LLM模型 + + 统一使用项目根目录 .env 文件中的配置(优先级最高): + - LLM_API_KEY: API密钥 + - LLM_BASE_URL: API基础URL + - LLM_MODEL_NAME: 模型名称 + """ + # 优先从 .env 读取配置 + llm_api_key = os.environ.get("LLM_API_KEY", "") + llm_base_url = os.environ.get("LLM_BASE_URL", "") + llm_model = os.environ.get("LLM_MODEL_NAME", "") + + # 如果 .env 中没有,则使用 config 作为备用 + if not llm_model: + llm_model = self.config.get("llm_model", "gpt-4o-mini") + + # 设置 camel-ai 所需的环境变量 + if llm_api_key: + os.environ["OPENAI_API_KEY"] = llm_api_key + + if not os.environ.get("OPENAI_API_KEY"): + raise ValueError("缺少 API Key 配置,请在项目根目录 .env 文件中设置 LLM_API_KEY") + + if llm_base_url: + os.environ["OPENAI_API_BASE_URL"] = llm_base_url + + print(f"LLM配置: model={llm_model}, base_url={llm_base_url[:40] if llm_base_url else '默认'}...") + + return ModelFactory.create( + model_platform=ModelPlatformType.OPENAI, + model_type=llm_model, + ) + + def _get_active_agents_for_round( + self, + env, + current_hour: int, + round_num: int + ) -> List: + """ + 根据时间和配置决定本轮激活哪些Agent + """ + time_config = self.config.get("time_config", {}) + agent_configs = self.config.get("agent_configs", []) + + base_min = time_config.get("agents_per_hour_min", 5) + base_max = time_config.get("agents_per_hour_max", 20) + + peak_hours = time_config.get("peak_hours", [9, 10, 11, 14, 15, 20, 21, 22]) + off_peak_hours = time_config.get("off_peak_hours", [0, 1, 2, 3, 4, 5]) + + if current_hour in peak_hours: + multiplier = time_config.get("peak_activity_multiplier", 1.5) + elif current_hour in off_peak_hours: + multiplier = time_config.get("off_peak_activity_multiplier", 0.3) + else: + multiplier = 1.0 + + target_count = int(random.uniform(base_min, base_max) * multiplier) + + candidates = [] + for cfg in agent_configs: + agent_id = cfg.get("agent_id", 0) + active_hours = cfg.get("active_hours", list(range(8, 23))) + activity_level = cfg.get("activity_level", 0.5) + + if current_hour not in active_hours: + continue + + if random.random() < activity_level: + candidates.append(agent_id) + + selected_ids = random.sample( + candidates, + min(target_count, len(candidates)) + ) if candidates else [] + + active_agents = [] + for agent_id in selected_ids: + try: + agent = env.agent_graph.get_agent(agent_id) + active_agents.append((agent_id, agent)) + except Exception: + pass + + return active_agents + + async def run(self, max_rounds: int = None): + """运行Reddit模拟 + + Args: + max_rounds: 最大模拟轮数(可选,用于截断过长的模拟) + """ + print("=" * 60) + print("OASIS Reddit模拟") + print(f"配置文件: {self.config_path}") + print(f"模拟ID: {self.config.get('simulation_id', 'unknown')}") + print(f"等待命令模式: {'启用' if self.wait_for_commands else '禁用'}") + print("=" * 60) + + time_config = self.config.get("time_config", {}) + total_hours = time_config.get("total_simulation_hours", 72) + minutes_per_round = time_config.get("minutes_per_round", 30) + total_rounds = (total_hours * 60) // minutes_per_round + + # 如果指定了最大轮数,则截断 + if max_rounds is not None and max_rounds > 0: + original_rounds = total_rounds + total_rounds = min(total_rounds, max_rounds) + if total_rounds < original_rounds: + print(f"\n轮数已截断: {original_rounds} -> {total_rounds} (max_rounds={max_rounds})") + + print(f"\n模拟参数:") + print(f" - 总模拟时长: {total_hours}小时") + print(f" - 每轮时间: {minutes_per_round}分钟") + print(f" - 总轮数: {total_rounds}") + if max_rounds: + print(f" - 最大轮数限制: {max_rounds}") + print(f" - Agent数量: {len(self.config.get('agent_configs', []))}") + + print("\n初始化LLM模型...") + model = self._create_model() + + print("加载Agent Profile...") + profile_path = self._get_profile_path() + if not os.path.exists(profile_path): + print(f"错误: Profile文件不存在: {profile_path}") + return + + self.agent_graph = await generate_reddit_agent_graph( + profile_path=profile_path, + model=model, + available_actions=self.AVAILABLE_ACTIONS, + ) + + db_path = self._get_db_path() + if os.path.exists(db_path): + os.remove(db_path) + print(f"已删除旧数据库: {db_path}") + + print("创建OASIS环境...") + self.env = oasis.make( + agent_graph=self.agent_graph, + platform=oasis.DefaultPlatformType.REDDIT, + database_path=db_path, + semaphore=30, # 限制最大并发 LLM 请求数,防止 API 过载 + ) + + await self.env.reset() + print("环境初始化完成\n") + + # 初始化IPC处理器 + self.ipc_handler = IPCHandler(self.simulation_dir, self.env, self.agent_graph) + self.ipc_handler.update_status("running") + + # 执行初始事件 + event_config = self.config.get("event_config", {}) + initial_posts = event_config.get("initial_posts", []) + + if initial_posts: + print(f"执行初始事件 ({len(initial_posts)}条初始帖子)...") + initial_actions = {} + for post in initial_posts: + agent_id = post.get("poster_agent_id", 0) + content = post.get("content", "") + try: + agent = self.env.agent_graph.get_agent(agent_id) + if agent in initial_actions: + if not isinstance(initial_actions[agent], list): + initial_actions[agent] = [initial_actions[agent]] + initial_actions[agent].append(ManualAction( + action_type=ActionType.CREATE_POST, + action_args={"content": content} + )) + else: + initial_actions[agent] = ManualAction( + action_type=ActionType.CREATE_POST, + action_args={"content": content} + ) + except Exception as e: + print(f" 警告: 无法为Agent {agent_id}创建初始帖子: {e}") + + if initial_actions: + await self.env.step(initial_actions) + print(f" 已发布 {len(initial_actions)} 条初始帖子") + + # 主模拟循环 + print("\n开始模拟循环...") + start_time = datetime.now() + + for round_num in range(total_rounds): + simulated_minutes = round_num * minutes_per_round + simulated_hour = (simulated_minutes // 60) % 24 + simulated_day = simulated_minutes // (60 * 24) + 1 + + active_agents = self._get_active_agents_for_round( + self.env, simulated_hour, round_num + ) + + if not active_agents: + continue + + actions = { + agent: LLMAction() + for _, agent in active_agents + } + + await self.env.step(actions) + + if (round_num + 1) % 10 == 0 or round_num == 0: + elapsed = (datetime.now() - start_time).total_seconds() + progress = (round_num + 1) / total_rounds * 100 + print(f" [Day {simulated_day}, {simulated_hour:02d}:00] " + f"Round {round_num + 1}/{total_rounds} ({progress:.1f}%) " + f"- {len(active_agents)} agents active " + f"- elapsed: {elapsed:.1f}s") + + total_elapsed = (datetime.now() - start_time).total_seconds() + print(f"\n模拟循环完成!") + print(f" - 总耗时: {total_elapsed:.1f}秒") + print(f" - 数据库: {db_path}") + + # 是否进入等待命令模式 + if self.wait_for_commands: + print("\n" + "=" * 60) + print("进入等待命令模式 - 环境保持运行") + print("支持的命令: interview, batch_interview, close_env") + print("=" * 60) + + self.ipc_handler.update_status("alive") + + # 等待命令循环(使用全局 _shutdown_event) + try: + while not _shutdown_event.is_set(): + should_continue = await self.ipc_handler.process_commands() + if not should_continue: + break + try: + await asyncio.wait_for(_shutdown_event.wait(), timeout=0.5) + break # 收到退出信号 + except asyncio.TimeoutError: + pass + except KeyboardInterrupt: + print("\n收到中断信号") + except asyncio.CancelledError: + print("\n任务被取消") + except Exception as e: + print(f"\n命令处理出错: {e}") + + print("\n关闭环境...") + + # 关闭环境 + self.ipc_handler.update_status("stopped") + await self.env.close() + + print("环境已关闭") + print("=" * 60) + + +async def main(): + parser = argparse.ArgumentParser(description='OASIS Reddit模拟') + parser.add_argument( + '--config', + type=str, + required=True, + help='配置文件路径 (simulation_config.json)' + ) + parser.add_argument( + '--max-rounds', + type=int, + default=None, + help='最大模拟轮数(可选,用于截断过长的模拟)' + ) + parser.add_argument( + '--no-wait', + action='store_true', + default=False, + help='模拟完成后立即关闭环境,不进入等待命令模式' + ) + + args = parser.parse_args() + + # 在 main 函数开始时创建 shutdown 事件 + global _shutdown_event + _shutdown_event = asyncio.Event() + + if not os.path.exists(args.config): + print(f"错误: 配置文件不存在: {args.config}") + sys.exit(1) + + # 初始化日志配置(使用固定文件名,清理旧日志) + simulation_dir = os.path.dirname(args.config) or "." + setup_oasis_logging(os.path.join(simulation_dir, "log")) + + runner = RedditSimulationRunner( + config_path=args.config, + wait_for_commands=not args.no_wait + ) + await runner.run(max_rounds=args.max_rounds) + + +def setup_signal_handlers(): + """ + 设置信号处理器,确保收到 SIGTERM/SIGINT 时能够正确退出 + 让程序有机会正常清理资源(关闭数据库、环境等) + """ + def signal_handler(signum, frame): + global _cleanup_done + sig_name = "SIGTERM" if signum == signal.SIGTERM else "SIGINT" + print(f"\n收到 {sig_name} 信号,正在退出...") + if not _cleanup_done: + _cleanup_done = True + if _shutdown_event: + _shutdown_event.set() + else: + # 重复收到信号才强制退出 + print("强制退出...") + sys.exit(1) + + signal.signal(signal.SIGTERM, signal_handler) + signal.signal(signal.SIGINT, signal_handler) + + +if __name__ == "__main__": + setup_signal_handlers() + try: + asyncio.run(main()) + except KeyboardInterrupt: + print("\n程序被中断") + except SystemExit: + pass + finally: + print("模拟进程已退出") + diff --git a/app/scripts/run_twitter_simulation.py b/app/scripts/run_twitter_simulation.py new file mode 100644 index 0000000000000000000000000000000000000000..0e83def45474a5a75b446c47fc4d462ab19443ed --- /dev/null +++ b/app/scripts/run_twitter_simulation.py @@ -0,0 +1,780 @@ +""" +OASIS Twitter模拟预设脚本 +此脚本读取配置文件中的参数来执行模拟,实现全程自动化 + +功能特性: +- 完成模拟后不立即关闭环境,进入等待命令模式 +- 支持通过IPC接收Interview命令 +- 支持单个Agent采访和批量采访 +- 支持远程关闭环境命令 + +使用方式: + python run_twitter_simulation.py --config /path/to/simulation_config.json + python run_twitter_simulation.py --config /path/to/simulation_config.json --no-wait # 完成后立即关闭 +""" + +import argparse +import asyncio +import json +import logging +import os +import random +import signal +import sys +import sqlite3 +from datetime import datetime +from typing import Dict, Any, List, Optional + +# 全局变量:用于信号处理 +_shutdown_event = None +_cleanup_done = False + +# 添加项目路径 +_scripts_dir = os.path.dirname(os.path.abspath(__file__)) +_backend_dir = os.path.abspath(os.path.join(_scripts_dir, '..')) +_project_root = os.path.abspath(os.path.join(_backend_dir, '..')) +sys.path.insert(0, _scripts_dir) +sys.path.insert(0, _backend_dir) + +# 加载项目根目录的 .env 文件(包含 LLM_API_KEY 等配置) +from dotenv import load_dotenv +_env_file = os.path.join(_project_root, '.env') +if os.path.exists(_env_file): + load_dotenv(_env_file) +else: + _backend_env = os.path.join(_backend_dir, '.env') + if os.path.exists(_backend_env): + load_dotenv(_backend_env) + + +import re + + +class UnicodeFormatter(logging.Formatter): + """自定义格式化器,将 Unicode 转义序列转换为可读字符""" + + UNICODE_ESCAPE_PATTERN = re.compile(r'\\u([0-9a-fA-F]{4})') + + def format(self, record): + result = super().format(record) + + def replace_unicode(match): + try: + return chr(int(match.group(1), 16)) + except (ValueError, OverflowError): + return match.group(0) + + return self.UNICODE_ESCAPE_PATTERN.sub(replace_unicode, result) + + +class MaxTokensWarningFilter(logging.Filter): + """过滤掉 camel-ai 关于 max_tokens 的警告(我们故意不设置 max_tokens,让模型自行决定)""" + + def filter(self, record): + # 过滤掉包含 max_tokens 警告的日志 + if "max_tokens" in record.getMessage() and "Invalid or missing" in record.getMessage(): + return False + return True + + +# 在模块加载时立即添加过滤器,确保在 camel 代码执行前生效 +logging.getLogger().addFilter(MaxTokensWarningFilter()) + + +def setup_oasis_logging(log_dir: str): + """配置 OASIS 的日志,使用固定名称的日志文件""" + os.makedirs(log_dir, exist_ok=True) + + # 清理旧的日志文件 + for f in os.listdir(log_dir): + old_log = os.path.join(log_dir, f) + if os.path.isfile(old_log) and f.endswith('.log'): + try: + os.remove(old_log) + except OSError: + pass + + formatter = UnicodeFormatter("%(levelname)s - %(asctime)s - %(name)s - %(message)s") + + loggers_config = { + "social.agent": os.path.join(log_dir, "social.agent.log"), + "social.twitter": os.path.join(log_dir, "social.twitter.log"), + "social.rec": os.path.join(log_dir, "social.rec.log"), + "oasis.env": os.path.join(log_dir, "oasis.env.log"), + "table": os.path.join(log_dir, "table.log"), + } + + for logger_name, log_file in loggers_config.items(): + logger = logging.getLogger(logger_name) + logger.setLevel(logging.DEBUG) + logger.handlers.clear() + file_handler = logging.FileHandler(log_file, encoding='utf-8', mode='w') + file_handler.setLevel(logging.DEBUG) + file_handler.setFormatter(formatter) + logger.addHandler(file_handler) + logger.propagate = False + + +try: + from camel.models import ModelFactory + from camel.types import ModelPlatformType + import oasis + from oasis import ( + ActionType, + LLMAction, + ManualAction, + generate_twitter_agent_graph + ) +except ImportError as e: + print(f"错误: 缺少依赖 {e}") + print("请先安装: pip install oasis-ai camel-ai") + sys.exit(1) + + +# IPC相关常量 +IPC_COMMANDS_DIR = "ipc_commands" +IPC_RESPONSES_DIR = "ipc_responses" +ENV_STATUS_FILE = "env_status.json" + +class CommandType: + """命令类型常量""" + INTERVIEW = "interview" + BATCH_INTERVIEW = "batch_interview" + CLOSE_ENV = "close_env" + + +class IPCHandler: + """IPC命令处理器""" + + def __init__(self, simulation_dir: str, env, agent_graph): + self.simulation_dir = simulation_dir + self.env = env + self.agent_graph = agent_graph + self.commands_dir = os.path.join(simulation_dir, IPC_COMMANDS_DIR) + self.responses_dir = os.path.join(simulation_dir, IPC_RESPONSES_DIR) + self.status_file = os.path.join(simulation_dir, ENV_STATUS_FILE) + self._running = True + + # 确保目录存在 + os.makedirs(self.commands_dir, exist_ok=True) + os.makedirs(self.responses_dir, exist_ok=True) + + def update_status(self, status: str): + """更新环境状态""" + with open(self.status_file, 'w', encoding='utf-8') as f: + json.dump({ + "status": status, + "timestamp": datetime.now().isoformat() + }, f, ensure_ascii=False, indent=2) + + def poll_command(self) -> Optional[Dict[str, Any]]: + """轮询获取待处理命令""" + if not os.path.exists(self.commands_dir): + return None + + # 获取命令文件(按时间排序) + command_files = [] + for filename in os.listdir(self.commands_dir): + if filename.endswith('.json'): + filepath = os.path.join(self.commands_dir, filename) + command_files.append((filepath, os.path.getmtime(filepath))) + + command_files.sort(key=lambda x: x[1]) + + for filepath, _ in command_files: + try: + with open(filepath, 'r', encoding='utf-8') as f: + return json.load(f) + except (json.JSONDecodeError, OSError): + continue + + return None + + def send_response(self, command_id: str, status: str, result: Dict = None, error: str = None): + """发送响应""" + response = { + "command_id": command_id, + "status": status, + "result": result, + "error": error, + "timestamp": datetime.now().isoformat() + } + + response_file = os.path.join(self.responses_dir, f"{command_id}.json") + with open(response_file, 'w', encoding='utf-8') as f: + json.dump(response, f, ensure_ascii=False, indent=2) + + # 删除命令文件 + command_file = os.path.join(self.commands_dir, f"{command_id}.json") + try: + os.remove(command_file) + except OSError: + pass + + async def handle_interview(self, command_id: str, agent_id: int, prompt: str) -> bool: + """ + 处理单个Agent采访命令 + + Returns: + True 表示成功,False 表示失败 + """ + try: + # 获取Agent + agent = self.agent_graph.get_agent(agent_id) + + # 创建Interview动作 + interview_action = ManualAction( + action_type=ActionType.INTERVIEW, + action_args={"prompt": prompt} + ) + + # 执行Interview + actions = {agent: interview_action} + await self.env.step(actions) + + # 从数据库获取结果 + result = self._get_interview_result(agent_id) + + self.send_response(command_id, "completed", result=result) + print(f" Interview完成: agent_id={agent_id}") + return True + + except Exception as e: + error_msg = str(e) + print(f" Interview失败: agent_id={agent_id}, error={error_msg}") + self.send_response(command_id, "failed", error=error_msg) + return False + + async def handle_batch_interview(self, command_id: str, interviews: List[Dict]) -> bool: + """ + 处理批量采访命令 + + Args: + interviews: [{"agent_id": int, "prompt": str}, ...] + """ + try: + # 构建动作字典 + actions = {} + agent_prompts = {} # 记录每个agent的prompt + + for interview in interviews: + agent_id = interview.get("agent_id") + prompt = interview.get("prompt", "") + + try: + agent = self.agent_graph.get_agent(agent_id) + actions[agent] = ManualAction( + action_type=ActionType.INTERVIEW, + action_args={"prompt": prompt} + ) + agent_prompts[agent_id] = prompt + except Exception as e: + print(f" 警告: 无法获取Agent {agent_id}: {e}") + + if not actions: + self.send_response(command_id, "failed", error="没有有效的Agent") + return False + + # 执行批量Interview + await self.env.step(actions) + + # 获取所有结果 + results = {} + for agent_id in agent_prompts.keys(): + result = self._get_interview_result(agent_id) + results[agent_id] = result + + self.send_response(command_id, "completed", result={ + "interviews_count": len(results), + "results": results + }) + print(f" 批量Interview完成: {len(results)} 个Agent") + return True + + except Exception as e: + error_msg = str(e) + print(f" 批量Interview失败: {error_msg}") + self.send_response(command_id, "failed", error=error_msg) + return False + + def _get_interview_result(self, agent_id: int) -> Dict[str, Any]: + """从数据库获取最新的Interview结果""" + db_path = os.path.join(self.simulation_dir, "twitter_simulation.db") + + result = { + "agent_id": agent_id, + "response": None, + "timestamp": None + } + + if not os.path.exists(db_path): + return result + + try: + conn = sqlite3.connect(db_path) + cursor = conn.cursor() + + # 查询最新的Interview记录 + cursor.execute(""" + SELECT user_id, info, created_at + FROM trace + WHERE action = ? AND user_id = ? + ORDER BY created_at DESC + LIMIT 1 + """, (ActionType.INTERVIEW.value, agent_id)) + + row = cursor.fetchone() + if row: + user_id, info_json, created_at = row + try: + info = json.loads(info_json) if info_json else {} + result["response"] = info.get("response", info) + result["timestamp"] = created_at + except json.JSONDecodeError: + result["response"] = info_json + + conn.close() + + except Exception as e: + print(f" 读取Interview结果失败: {e}") + + return result + + async def process_commands(self) -> bool: + """ + 处理所有待处理命令 + + Returns: + True 表示继续运行,False 表示应该退出 + """ + command = self.poll_command() + if not command: + return True + + command_id = command.get("command_id") + command_type = command.get("command_type") + args = command.get("args", {}) + + print(f"\n收到IPC命令: {command_type}, id={command_id}") + + if command_type == CommandType.INTERVIEW: + await self.handle_interview( + command_id, + args.get("agent_id", 0), + args.get("prompt", "") + ) + return True + + elif command_type == CommandType.BATCH_INTERVIEW: + await self.handle_batch_interview( + command_id, + args.get("interviews", []) + ) + return True + + elif command_type == CommandType.CLOSE_ENV: + print("收到关闭环境命令") + self.send_response(command_id, "completed", result={"message": "环境即将关闭"}) + return False + + else: + self.send_response(command_id, "failed", error=f"未知命令类型: {command_type}") + return True + + +class TwitterSimulationRunner: + """Twitter模拟运行器""" + + # Twitter可用动作(不包含INTERVIEW,INTERVIEW只能通过ManualAction手动触发) + AVAILABLE_ACTIONS = [ + ActionType.CREATE_POST, + ActionType.LIKE_POST, + ActionType.REPOST, + ActionType.FOLLOW, + ActionType.DO_NOTHING, + ActionType.QUOTE_POST, + ] + + def __init__(self, config_path: str, wait_for_commands: bool = True): + """ + 初始化模拟运行器 + + Args: + config_path: 配置文件路径 (simulation_config.json) + wait_for_commands: 模拟完成后是否等待命令(默认True) + """ + self.config_path = config_path + self.config = self._load_config() + self.simulation_dir = os.path.dirname(config_path) + self.wait_for_commands = wait_for_commands + self.env = None + self.agent_graph = None + self.ipc_handler = None + + def _load_config(self) -> Dict[str, Any]: + """加载配置文件""" + with open(self.config_path, 'r', encoding='utf-8') as f: + return json.load(f) + + def _get_profile_path(self) -> str: + """获取Profile文件路径(OASIS Twitter使用CSV格式)""" + return os.path.join(self.simulation_dir, "twitter_profiles.csv") + + def _get_db_path(self) -> str: + """获取数据库路径""" + return os.path.join(self.simulation_dir, "twitter_simulation.db") + + def _create_model(self): + """ + 创建LLM模型 + + 统一使用项目根目录 .env 文件中的配置(优先级最高): + - LLM_API_KEY: API密钥 + - LLM_BASE_URL: API基础URL + - LLM_MODEL_NAME: 模型名称 + """ + # 优先从 .env 读取配置 + llm_api_key = os.environ.get("LLM_API_KEY", "") + llm_base_url = os.environ.get("LLM_BASE_URL", "") + llm_model = os.environ.get("LLM_MODEL_NAME", "") + + # 如果 .env 中没有,则使用 config 作为备用 + if not llm_model: + llm_model = self.config.get("llm_model", "gpt-4o-mini") + + # 设置 camel-ai 所需的环境变量 + if llm_api_key: + os.environ["OPENAI_API_KEY"] = llm_api_key + + if not os.environ.get("OPENAI_API_KEY"): + raise ValueError("缺少 API Key 配置,请在项目根目录 .env 文件中设置 LLM_API_KEY") + + if llm_base_url: + os.environ["OPENAI_API_BASE_URL"] = llm_base_url + + print(f"LLM配置: model={llm_model}, base_url={llm_base_url[:40] if llm_base_url else '默认'}...") + + return ModelFactory.create( + model_platform=ModelPlatformType.OPENAI, + model_type=llm_model, + ) + + def _get_active_agents_for_round( + self, + env, + current_hour: int, + round_num: int + ) -> List: + """ + 根据时间和配置决定本轮激活哪些Agent + + Args: + env: OASIS环境 + current_hour: 当前模拟小时(0-23) + round_num: 当前轮数 + + Returns: + 激活的Agent列表 + """ + time_config = self.config.get("time_config", {}) + agent_configs = self.config.get("agent_configs", []) + + # 基础激活数量 + base_min = time_config.get("agents_per_hour_min", 5) + base_max = time_config.get("agents_per_hour_max", 20) + + # 根据时段调整 + peak_hours = time_config.get("peak_hours", [9, 10, 11, 14, 15, 20, 21, 22]) + off_peak_hours = time_config.get("off_peak_hours", [0, 1, 2, 3, 4, 5]) + + if current_hour in peak_hours: + multiplier = time_config.get("peak_activity_multiplier", 1.5) + elif current_hour in off_peak_hours: + multiplier = time_config.get("off_peak_activity_multiplier", 0.3) + else: + multiplier = 1.0 + + target_count = int(random.uniform(base_min, base_max) * multiplier) + + # 根据每个Agent的配置计算激活概率 + candidates = [] + for cfg in agent_configs: + agent_id = cfg.get("agent_id", 0) + active_hours = cfg.get("active_hours", list(range(8, 23))) + activity_level = cfg.get("activity_level", 0.5) + + # 检查是否在活跃时间 + if current_hour not in active_hours: + continue + + # 根据活跃度计算概率 + if random.random() < activity_level: + candidates.append(agent_id) + + # 随机选择 + selected_ids = random.sample( + candidates, + min(target_count, len(candidates)) + ) if candidates else [] + + # 转换为Agent对象 + active_agents = [] + for agent_id in selected_ids: + try: + agent = env.agent_graph.get_agent(agent_id) + active_agents.append((agent_id, agent)) + except Exception: + pass + + return active_agents + + async def run(self, max_rounds: int = None): + """运行Twitter模拟 + + Args: + max_rounds: 最大模拟轮数(可选,用于截断过长的模拟) + """ + print("=" * 60) + print("OASIS Twitter模拟") + print(f"配置文件: {self.config_path}") + print(f"模拟ID: {self.config.get('simulation_id', 'unknown')}") + print(f"等待命令模式: {'启用' if self.wait_for_commands else '禁用'}") + print("=" * 60) + + # 加载时间配置 + time_config = self.config.get("time_config", {}) + total_hours = time_config.get("total_simulation_hours", 72) + minutes_per_round = time_config.get("minutes_per_round", 30) + + # 计算总轮数 + total_rounds = (total_hours * 60) // minutes_per_round + + # 如果指定了最大轮数,则截断 + if max_rounds is not None and max_rounds > 0: + original_rounds = total_rounds + total_rounds = min(total_rounds, max_rounds) + if total_rounds < original_rounds: + print(f"\n轮数已截断: {original_rounds} -> {total_rounds} (max_rounds={max_rounds})") + + print(f"\n模拟参数:") + print(f" - 总模拟时长: {total_hours}小时") + print(f" - 每轮时间: {minutes_per_round}分钟") + print(f" - 总轮数: {total_rounds}") + if max_rounds: + print(f" - 最大轮数限制: {max_rounds}") + print(f" - Agent数量: {len(self.config.get('agent_configs', []))}") + + # 创建模型 + print("\n初始化LLM模型...") + model = self._create_model() + + # 加载Agent图 + print("加载Agent Profile...") + profile_path = self._get_profile_path() + if not os.path.exists(profile_path): + print(f"错误: Profile文件不存在: {profile_path}") + return + + self.agent_graph = await generate_twitter_agent_graph( + profile_path=profile_path, + model=model, + available_actions=self.AVAILABLE_ACTIONS, + ) + + # 数据库路径 + db_path = self._get_db_path() + if os.path.exists(db_path): + os.remove(db_path) + print(f"已删除旧数据库: {db_path}") + + # 创建环境 + print("创建OASIS环境...") + self.env = oasis.make( + agent_graph=self.agent_graph, + platform=oasis.DefaultPlatformType.TWITTER, + database_path=db_path, + semaphore=30, # 限制最大并发 LLM 请求数,防止 API 过载 + ) + + await self.env.reset() + print("环境初始化完成\n") + + # 初始化IPC处理器 + self.ipc_handler = IPCHandler(self.simulation_dir, self.env, self.agent_graph) + self.ipc_handler.update_status("running") + + # 执行初始事件 + event_config = self.config.get("event_config", {}) + initial_posts = event_config.get("initial_posts", []) + + if initial_posts: + print(f"执行初始事件 ({len(initial_posts)}条初始帖子)...") + initial_actions = {} + for post in initial_posts: + agent_id = post.get("poster_agent_id", 0) + content = post.get("content", "") + try: + agent = self.env.agent_graph.get_agent(agent_id) + initial_actions[agent] = ManualAction( + action_type=ActionType.CREATE_POST, + action_args={"content": content} + ) + except Exception as e: + print(f" 警告: 无法为Agent {agent_id}创建初始帖子: {e}") + + if initial_actions: + await self.env.step(initial_actions) + print(f" 已发布 {len(initial_actions)} 条初始帖子") + + # 主模拟循环 + print("\n开始模拟循环...") + start_time = datetime.now() + + for round_num in range(total_rounds): + # 计算当前模拟时间 + simulated_minutes = round_num * minutes_per_round + simulated_hour = (simulated_minutes // 60) % 24 + simulated_day = simulated_minutes // (60 * 24) + 1 + + # 获取本轮激活的Agent + active_agents = self._get_active_agents_for_round( + self.env, simulated_hour, round_num + ) + + if not active_agents: + continue + + # 构建动作 + actions = { + agent: LLMAction() + for _, agent in active_agents + } + + # 执行动作 + await self.env.step(actions) + + # 打印进度 + if (round_num + 1) % 10 == 0 or round_num == 0: + elapsed = (datetime.now() - start_time).total_seconds() + progress = (round_num + 1) / total_rounds * 100 + print(f" [Day {simulated_day}, {simulated_hour:02d}:00] " + f"Round {round_num + 1}/{total_rounds} ({progress:.1f}%) " + f"- {len(active_agents)} agents active " + f"- elapsed: {elapsed:.1f}s") + + total_elapsed = (datetime.now() - start_time).total_seconds() + print(f"\n模拟循环完成!") + print(f" - 总耗时: {total_elapsed:.1f}秒") + print(f" - 数据库: {db_path}") + + # 是否进入等待命令模式 + if self.wait_for_commands: + print("\n" + "=" * 60) + print("进入等待命令模式 - 环境保持运行") + print("支持的命令: interview, batch_interview, close_env") + print("=" * 60) + + self.ipc_handler.update_status("alive") + + # 等待命令循环(使用全局 _shutdown_event) + try: + while not _shutdown_event.is_set(): + should_continue = await self.ipc_handler.process_commands() + if not should_continue: + break + try: + await asyncio.wait_for(_shutdown_event.wait(), timeout=0.5) + break # 收到退出信号 + except asyncio.TimeoutError: + pass + except KeyboardInterrupt: + print("\n收到中断信号") + except asyncio.CancelledError: + print("\n任务被取消") + except Exception as e: + print(f"\n命令处理出错: {e}") + + print("\n关闭环境...") + + # 关闭环境 + self.ipc_handler.update_status("stopped") + await self.env.close() + + print("环境已关闭") + print("=" * 60) + + +async def main(): + parser = argparse.ArgumentParser(description='OASIS Twitter模拟') + parser.add_argument( + '--config', + type=str, + required=True, + help='配置文件路径 (simulation_config.json)' + ) + parser.add_argument( + '--max-rounds', + type=int, + default=None, + help='最大模拟轮数(可选,用于截断过长的模拟)' + ) + parser.add_argument( + '--no-wait', + action='store_true', + default=False, + help='模拟完成后立即关闭环境,不进入等待命令模式' + ) + + args = parser.parse_args() + + # 在 main 函数开始时创建 shutdown 事件 + global _shutdown_event + _shutdown_event = asyncio.Event() + + if not os.path.exists(args.config): + print(f"错误: 配置文件不存在: {args.config}") + sys.exit(1) + + # 初始化日志配置(使用固定文件名,清理旧日志) + simulation_dir = os.path.dirname(args.config) or "." + setup_oasis_logging(os.path.join(simulation_dir, "log")) + + runner = TwitterSimulationRunner( + config_path=args.config, + wait_for_commands=not args.no_wait + ) + await runner.run(max_rounds=args.max_rounds) + + +def setup_signal_handlers(): + """ + 设置信号处理器,确保收到 SIGTERM/SIGINT 时能够正确退出 + 让程序有机会正常清理资源(关闭数据库、环境等) + """ + def signal_handler(signum, frame): + global _cleanup_done + sig_name = "SIGTERM" if signum == signal.SIGTERM else "SIGINT" + print(f"\n收到 {sig_name} 信号,正在退出...") + if not _cleanup_done: + _cleanup_done = True + if _shutdown_event: + _shutdown_event.set() + else: + # 重复收到信号才强制退出 + print("强制退出...") + sys.exit(1) + + signal.signal(signal.SIGTERM, signal_handler) + signal.signal(signal.SIGINT, signal_handler) + + +if __name__ == "__main__": + setup_signal_handlers() + try: + asyncio.run(main()) + except KeyboardInterrupt: + print("\n程序被中断") + except SystemExit: + pass + finally: + print("模拟进程已退出") diff --git a/app/scripts/test_profile_format.py b/app/scripts/test_profile_format.py new file mode 100644 index 0000000000000000000000000000000000000000..749d47635263337a5175e9787c40187f52cbcaa9 --- /dev/null +++ b/app/scripts/test_profile_format.py @@ -0,0 +1,166 @@ +""" +测试Profile格式生成是否符合OASIS要求 +验证: +1. Twitter Profile生成CSV格式 +2. Reddit Profile生成JSON详细格式 +""" + +import os +import sys +import json +import csv +import tempfile + +# 添加项目路径 +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + +from app.services.oasis_profile_generator import OasisProfileGenerator, OasisAgentProfile + + +def test_profile_formats(): + """测试Profile格式""" + print("=" * 60) + print("OASIS Profile格式测试") + print("=" * 60) + + # 创建测试Profile数据 + test_profiles = [ + OasisAgentProfile( + user_id=0, + user_name="test_user_123", + name="Test User", + bio="A test user for validation", + persona="Test User is an enthusiastic participant in social discussions.", + karma=1500, + friend_count=100, + follower_count=200, + statuses_count=500, + age=25, + gender="male", + mbti="INTJ", + country="China", + profession="Student", + interested_topics=["Technology", "Education"], + source_entity_uuid="test-uuid-123", + source_entity_type="Student", + ), + OasisAgentProfile( + user_id=1, + user_name="org_official_456", + name="Official Organization", + bio="Official account for Organization", + persona="This is an official institutional account that communicates official positions.", + karma=5000, + friend_count=50, + follower_count=10000, + statuses_count=200, + profession="Organization", + interested_topics=["Public Policy", "Announcements"], + source_entity_uuid="test-uuid-456", + source_entity_type="University", + ), + ] + + generator = OasisProfileGenerator.__new__(OasisProfileGenerator) + + # 使用临时目录 + with tempfile.TemporaryDirectory() as temp_dir: + twitter_path = os.path.join(temp_dir, "twitter_profiles.csv") + reddit_path = os.path.join(temp_dir, "reddit_profiles.json") + + # 测试Twitter CSV格式 + print("\n1. 测试Twitter Profile (CSV格式)") + print("-" * 40) + generator._save_twitter_csv(test_profiles, twitter_path) + + # 读取并验证CSV + with open(twitter_path, 'r', encoding='utf-8') as f: + reader = csv.DictReader(f) + rows = list(reader) + + print(f" 文件: {twitter_path}") + print(f" 行数: {len(rows)}") + print(f" 表头: {list(rows[0].keys())}") + print(f"\n 示例数据 (第1行):") + for key, value in rows[0].items(): + print(f" {key}: {value}") + + # 验证必需字段 + required_twitter_fields = ['user_id', 'user_name', 'name', 'bio', + 'friend_count', 'follower_count', 'statuses_count', 'created_at'] + missing = set(required_twitter_fields) - set(rows[0].keys()) + if missing: + print(f"\n [错误] 缺少字段: {missing}") + else: + print(f"\n [通过] 所有必需字段都存在") + + # 测试Reddit JSON格式 + print("\n2. 测试Reddit Profile (JSON详细格式)") + print("-" * 40) + generator._save_reddit_json(test_profiles, reddit_path) + + # 读取并验证JSON + with open(reddit_path, 'r', encoding='utf-8') as f: + reddit_data = json.load(f) + + print(f" 文件: {reddit_path}") + print(f" 条目数: {len(reddit_data)}") + print(f" 字段: {list(reddit_data[0].keys())}") + print(f"\n 示例数据 (第1条):") + print(json.dumps(reddit_data[0], ensure_ascii=False, indent=4)) + + # 验证详细格式字段 + required_reddit_fields = ['realname', 'username', 'bio', 'persona'] + optional_reddit_fields = ['age', 'gender', 'mbti', 'country', 'profession', 'interested_topics'] + + missing = set(required_reddit_fields) - set(reddit_data[0].keys()) + if missing: + print(f"\n [错误] 缺少必需字段: {missing}") + else: + print(f"\n [通过] 所有必需字段都存在") + + present_optional = set(optional_reddit_fields) & set(reddit_data[0].keys()) + print(f" [信息] 可选字段: {present_optional}") + + print("\n" + "=" * 60) + print("测试完成!") + print("=" * 60) + + +def show_expected_formats(): + """显示OASIS期望的格式""" + print("\n" + "=" * 60) + print("OASIS 期望的Profile格式参考") + print("=" * 60) + + print("\n1. Twitter Profile (CSV格式)") + print("-" * 40) + twitter_example = """user_id,user_name,name,bio,friend_count,follower_count,statuses_count,created_at +0,user0,User Zero,I am user zero with interests in technology.,100,150,500,2023-01-01 +1,user1,User One,Tech enthusiast and coffee lover.,200,250,1000,2023-01-02""" + print(twitter_example) + + print("\n2. Reddit Profile (JSON详细格式)") + print("-" * 40) + reddit_example = [ + { + "realname": "James Miller", + "username": "millerhospitality", + "bio": "Passionate about hospitality & tourism.", + "persona": "James is a seasoned professional in the Hospitality & Tourism industry...", + "age": 40, + "gender": "male", + "mbti": "ESTJ", + "country": "UK", + "profession": "Hospitality & Tourism", + "interested_topics": ["Economics", "Business"] + } + ] + print(json.dumps(reddit_example, ensure_ascii=False, indent=2)) + + +if __name__ == "__main__": + test_profile_formats() + show_expected_formats() + + diff --git a/app/supabase/INSTALL_SIMULATION_RUNS.sql b/app/supabase/INSTALL_SIMULATION_RUNS.sql new file mode 100644 index 0000000000000000000000000000000000000000..d3cbe51ce8d38e01b200e4401617ad4d45a5d767 --- /dev/null +++ b/app/supabase/INSTALL_SIMULATION_RUNS.sql @@ -0,0 +1,39 @@ +-- ============================================================================= +-- Fix: PGRST205 "Could not find the table 'public.simulation_runs' in the schema cache" +-- ============================================================================= +-- 1. Open Supabase Dashboard → your project → SQL Editor → New query. +-- 2. Paste and run this entire script. +-- 3. If the API still errors after ~1 minute, run the last line alone to reload PostgREST. +-- 4. Create Storage bucket "reports" (private) under Storage if you use report files. +-- ============================================================================= + +create table if not exists public.simulation_runs ( + id uuid primary key, + user_id text not null, + backend_task_id text, + report_id text, + status text not null default 'pending', + requirement_preview text, + report_storage_path text, + report_public_url text, + simulation_id text, + project_id text, + error_message text, + created_at timestamptz not null default now(), + updated_at timestamptz not null default now() +); + +create index if not exists simulation_runs_user_id_idx on public.simulation_runs (user_id); +create index if not exists simulation_runs_status_idx on public.simulation_runs (status); + +alter table public.simulation_runs enable row level security; + +drop policy if exists "simulation_runs_select_own" on public.simulation_runs; +create policy "simulation_runs_select_own" + on public.simulation_runs for select + to authenticated + using (auth.uid()::text = user_id); + +-- If the table exists but REST still returns PGRST205, wait ~1 min or pause/resume the project +-- in Dashboard → Settings. (Uncomment below only if your project supports it.) +-- select pg_notify('pgrst', 'reload schema'); diff --git a/app/supabase/grants_public_user.sql b/app/supabase/grants_public_user.sql new file mode 100644 index 0000000000000000000000000000000000000000..92a9330dc608e11b7d9f5ceb33da266ea2a333a6 --- /dev/null +++ b/app/supabase/grants_public_user.sql @@ -0,0 +1,8 @@ +-- Required when login/sign-up run in the browser against public."User" (Supabase anon key). +-- Run in SQL Editor after your "User" table exists. + +grant usage on schema public to anon, authenticated; + +grant select, insert on table public."User" to anon; + +-- Production: prefer hashed passwords + RPC/Edge Function instead of plain Password in the client. diff --git a/app/supabase/migration_simulation_runs_user_id_text.sql b/app/supabase/migration_simulation_runs_user_id_text.sql new file mode 100644 index 0000000000000000000000000000000000000000..cc3efee9c810ca4b5fbcd7a55cd2f82b57f2e348 --- /dev/null +++ b/app/supabase/migration_simulation_runs_user_id_text.sql @@ -0,0 +1,13 @@ +-- Run once if you already had simulation_runs.user_id as uuid referencing auth.users. +-- After this, the API can store string user ids from public."User" (e.g. "12"). + +alter table public.simulation_runs drop constraint if exists simulation_runs_user_id_fkey; + +alter table public.simulation_runs + alter column user_id type text using user_id::text; + +drop policy if exists "simulation_runs_select_own" on public.simulation_runs; +create policy "simulation_runs_select_own" + on public.simulation_runs for select + to authenticated + using (auth.uid()::text = user_id); diff --git a/app/supabase/schema.sql b/app/supabase/schema.sql new file mode 100644 index 0000000000000000000000000000000000000000..0ed32a494bbef949ea431f5d94e8e5a467fdaca5 --- /dev/null +++ b/app/supabase/schema.sql @@ -0,0 +1,55 @@ +-- Run in Supabase SQL Editor after creating a project. +-- If you see PGRST205 (table not in schema cache), create the table first — see INSTALL_SIMULATION_RUNS.sql +-- 1) Create Storage bucket named "reports" (private). +-- 2) Apply this script (or run INSTALL_SIMULATION_RUNS.sql for table+RLS only, then storage section below). + +-- user_id is TEXT so it can hold auth.users UUID strings OR public."User" bigint ids as strings (e.g. "5"). +create table if not exists public.simulation_runs ( + id uuid primary key, + user_id text not null, + backend_task_id text, + report_id text, + status text not null default 'pending', + requirement_preview text, + report_storage_path text, + report_public_url text, + simulation_id text, + project_id text, + error_message text, + created_at timestamptz not null default now(), + updated_at timestamptz not null default now() +); + +create index if not exists simulation_runs_user_id_idx on public.simulation_runs (user_id); +create index if not exists simulation_runs_status_idx on public.simulation_runs (status); + +alter table public.simulation_runs enable row level security; + +drop policy if exists "simulation_runs_select_own" on public.simulation_runs; +-- JWT users (Supabase Auth) can read their own rows when user_id matches auth.uid() as text. +create policy "simulation_runs_select_own" + on public.simulation_runs for select + to authenticated + using (auth.uid()::text = user_id); + +-- Custom public."User" accounts use the backend API + service role; RLS still applies to anon. + +-- Storage: allow signed URL downloads for files under the user's folder (JWT uid as first path segment). +drop policy if exists "reports_select_own" on storage.objects; +create policy "reports_select_own" + on storage.objects for select + to authenticated + using ( + bucket_id = 'reports' + and (storage.foldername(name))[1] = auth.uid()::text + ); + +-- Optional: custom app table (manage in Table Editor). Example: +-- create table public."User" ( +-- id bigint generated by default as identity primary key, +-- created_at timestamptz not null default now(), +-- "Username" text not null, +-- "Email" text not null unique, +-- "Password" text not null +-- ); +-- Grant anon select/insert on "User" only if you accept client-side checks (prefer Edge Functions + hashing for production). diff --git a/app/uv.lock b/app/uv.lock new file mode 100644 index 0000000000000000000000000000000000000000..9af8224e5781fb0ce57ff1e71d735209b79b4f11 --- /dev/null +++ b/app/uv.lock @@ -0,0 +1,3506 @@ +version = 1 +revision = 3 +requires-python = ">=3.11" +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version < '3.12'", +] + +[[package]] +name = "aiofiles" +version = "25.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/41/c3/534eac40372d8ee36ef40df62ec129bee4fdb5ad9706e58a29be53b2c970/aiofiles-25.1.0.tar.gz", hash = "sha256:a8d728f0a29de45dc521f18f07297428d56992a742f0cd2701ba86e44d23d5b2", size = 46354, upload-time = "2025-10-09T20:51:04.358Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bc/8a/340a1555ae33d7354dbca4faa54948d76d89a27ceef032c8c3bc661d003e/aiofiles-25.1.0-py3-none-any.whl", hash = "sha256:abe311e527c862958650f9438e859c1fa7568a141b22abcd015e120e86a85695", size = 14668, upload-time = "2025-10-09T20:51:03.174Z" }, +] + +[[package]] +name = "annotated-types" +version = "0.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89", size = 16081, upload-time = "2024-05-20T21:33:25.928Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643, upload-time = "2024-05-20T21:33:24.1Z" }, +] + +[[package]] +name = "anyio" +version = "4.12.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "idna" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/16/ce/8a777047513153587e5434fd752e89334ac33e379aa3497db860eeb60377/anyio-4.12.0.tar.gz", hash = "sha256:73c693b567b0c55130c104d0b43a9baf3aa6a31fc6110116509f27bf75e21ec0", size = 228266, upload-time = "2025-11-28T23:37:38.911Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7f/9c/36c5c37947ebfb8c7f22e0eb6e4d188ee2d53aa3880f3f2744fb894f0cb1/anyio-4.12.0-py3-none-any.whl", hash = "sha256:dad2376a628f98eeca4881fc56cd06affd18f659b17a747d3ff0307ced94b1bb", size = 113362, upload-time = "2025-11-28T23:36:57.897Z" }, +] + +[[package]] +name = "appnope" +version = "0.1.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/35/5d/752690df9ef5b76e169e68d6a129fa6d08a7100ca7f754c89495db3c6019/appnope-0.1.4.tar.gz", hash = "sha256:1de3860566df9caf38f01f86f65e0e13e379af54f9e4bee1e66b48f2efffd1ee", size = 4170, upload-time = "2024-02-06T09:43:11.258Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/81/29/5ecc3a15d5a33e31b26c11426c45c501e439cb865d0bff96315d86443b78/appnope-0.1.4-py2.py3-none-any.whl", hash = "sha256:502575ee11cd7a28c0205f379b525beefebab9d161b7c964670864014ed7213c", size = 4321, upload-time = "2024-02-06T09:43:09.663Z" }, +] + +[[package]] +name = "astor" +version = "0.8.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5a/21/75b771132fee241dfe601d39ade629548a9626d1d39f333fde31bc46febe/astor-0.8.1.tar.gz", hash = "sha256:6a6effda93f4e1ce9f618779b2dd1d9d84f1e32812c23a29b3fff6fd7f63fa5e", size = 35090, upload-time = "2019-12-10T01:50:35.51Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c3/88/97eef84f48fa04fbd6750e62dcceafba6c63c81b7ac1420856c8dcc0a3f9/astor-0.8.1-py2.py3-none-any.whl", hash = "sha256:070a54e890cefb5b3739d19f30f5a5ec840ffc9c50ffa7d23cc9fc1a38ebbfc5", size = 27488, upload-time = "2019-12-10T01:50:33.628Z" }, +] + +[[package]] +name = "asttokens" +version = "3.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/be/a5/8e3f9b6771b0b408517c82d97aed8f2036509bc247d46114925e32fe33f0/asttokens-3.0.1.tar.gz", hash = "sha256:71a4ee5de0bde6a31d64f6b13f2293ac190344478f081c3d1bccfcf5eacb0cb7", size = 62308, upload-time = "2025-11-15T16:43:48.578Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d2/39/e7eaf1799466a4aef85b6a4fe7bd175ad2b1c6345066aa33f1f58d4b18d0/asttokens-3.0.1-py3-none-any.whl", hash = "sha256:15a3ebc0f43c2d0a50eeafea25e19046c68398e487b9f1f5b517f7c0f40f976a", size = 27047, upload-time = "2025-11-15T16:43:16.109Z" }, +] + +[[package]] +name = "attrs" +version = "25.4.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz", hash = "sha256:16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11", size = 934251, upload-time = "2025-10-06T13:54:44.725Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3a/2a/7cc015f5b9f5db42b7d48157e23356022889fc354a2813c15934b7cb5c0e/attrs-25.4.0-py3-none-any.whl", hash = "sha256:adcf7e2a1fb3b36ac48d97835bb6d8ade15b8dcce26aba8bf1d14847b57a3373", size = 67615, upload-time = "2025-10-06T13:54:43.17Z" }, +] + +[[package]] +name = "backcall" +version = "0.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a2/40/764a663805d84deee23043e1426a9175567db89c8b3287b5c2ad9f71aa93/backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e", size = 18041, upload-time = "2020-06-09T15:11:32.931Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4c/1c/ff6546b6c12603d8dd1070aa3c3d273ad4c07f5771689a7b69a550e8c951/backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255", size = 11157, upload-time = "2020-06-09T15:11:30.87Z" }, +] + +[[package]] +name = "backoff" +version = "2.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/47/d7/5bbeb12c44d7c4f2fb5b56abce497eb5ed9f34d85701de869acedd602619/backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba", size = 17001, upload-time = "2022-10-05T19:19:32.061Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/df/73/b6e24bd22e6720ca8ee9a85a0c4a2971af8497d8f3193fa05390cbd46e09/backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8", size = 15148, upload-time = "2022-10-05T19:19:30.546Z" }, +] + +[[package]] +name = "beautifulsoup4" +version = "4.14.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "soupsieve" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c3/b0/1c6a16426d389813b48d95e26898aff79abbde42ad353958ad95cc8c9b21/beautifulsoup4-4.14.3.tar.gz", hash = "sha256:6292b1c5186d356bba669ef9f7f051757099565ad9ada5dd630bd9de5fa7fb86", size = 627737, upload-time = "2025-11-30T15:08:26.084Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1a/39/47f9197bdd44df24d67ac8893641e16f386c984a0619ef2ee4c51fbbc019/beautifulsoup4-4.14.3-py3-none-any.whl", hash = "sha256:0918bfe44902e6ad8d57732ba310582e98da931428d231a5ecb9e7c703a735bb", size = 107721, upload-time = "2025-11-30T15:08:24.087Z" }, +] + +[[package]] +name = "bleach" +version = "6.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "webencodings" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/07/18/3c8523962314be6bf4c8989c79ad9531c825210dd13a8669f6b84336e8bd/bleach-6.3.0.tar.gz", hash = "sha256:6f3b91b1c0a02bb9a78b5a454c92506aa0fdf197e1d5e114d2e00c6f64306d22", size = 203533, upload-time = "2025-10-27T17:57:39.211Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cd/3a/577b549de0cc09d95f11087ee63c739bba856cd3952697eec4c4bb91350a/bleach-6.3.0-py3-none-any.whl", hash = "sha256:fe10ec77c93ddf3d13a73b035abaac7a9f5e436513864ccdad516693213c65d6", size = 164437, upload-time = "2025-10-27T17:57:37.538Z" }, +] + +[package.optional-dependencies] +css = [ + { name = "tinycss2" }, +] + +[[package]] +name = "blinker" +version = "1.9.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz", hash = "sha256:b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf", size = 22460, upload-time = "2024-11-08T17:25:47.436Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/10/cb/f2ad4230dc2eb1a74edf38f1a38b9b52277f75bef262d8908e60d957e13c/blinker-1.9.0-py3-none-any.whl", hash = "sha256:ba0efaa9080b619ff2f3459d1d500c57bddea4a6b424b60a91141db6fd2f08bc", size = 8458, upload-time = "2024-11-08T17:25:46.184Z" }, +] + +[[package]] +name = "cairocffi" +version = "1.7.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cffi" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/70/c5/1a4dc131459e68a173cbdab5fad6b524f53f9c1ef7861b7698e998b837cc/cairocffi-1.7.1.tar.gz", hash = "sha256:2e48ee864884ec4a3a34bfa8c9ab9999f688286eb714a15a43ec9d068c36557b", size = 88096, upload-time = "2024-06-18T10:56:06.741Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/93/d8/ba13451aa6b745c49536e87b6bf8f629b950e84bd0e8308f7dc6883b67e2/cairocffi-1.7.1-py3-none-any.whl", hash = "sha256:9803a0e11f6c962f3b0ae2ec8ba6ae45e957a146a004697a1ac1bbf16b073b3f", size = 75611, upload-time = "2024-06-18T10:55:59.489Z" }, +] + +[[package]] +name = "camel-ai" +version = "0.2.78" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "astor" }, + { name = "colorama" }, + { name = "docstring-parser" }, + { name = "httpx" }, + { name = "jsonschema" }, + { name = "mcp" }, + { name = "openai" }, + { name = "pillow" }, + { name = "psutil" }, + { name = "pydantic" }, + { name = "tiktoken" }, + { name = "websockets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3b/2b/cd5181bfd0ebcf567a088ee5c1e3768b132ba4b1489ee19d5fb0bd679586/camel_ai-0.2.78.tar.gz", hash = "sha256:24745da225da7da96dcd85f72d143c6104569c17f14280c369d7e82b86851284", size = 964632, upload-time = "2025-10-15T17:20:54.181Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/01/81/0cfb1c0d9da589665e2eb4471887967e70bba428638c37fb4f6a78baf300/camel_ai-0.2.78-py3-none-any.whl", hash = "sha256:356624da13dfe0c55ef43dc509c18ce029f67fe3997966495a4ce9be931078d5", size = 1415578, upload-time = "2025-10-15T17:20:51.727Z" }, +] + +[[package]] +name = "camel-oasis" +version = "0.2.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cairocffi" }, + { name = "camel-ai" }, + { name = "igraph" }, + { name = "neo4j" }, + { name = "openapi-spec-validator" }, + { name = "pandas" }, + { name = "pillow" }, + { name = "prance" }, + { name = "pre-commit" }, + { name = "pytest" }, + { name = "pytest-asyncio" }, + { name = "requests-oauthlib" }, + { name = "sentence-transformers" }, + { name = "slack-sdk" }, + { name = "unstructured" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d9/6f/b36240380c65397f3e18829fce8ed0a1d19893b32d3596aa0902c7b3ad81/camel_oasis-0.2.5.tar.gz", hash = "sha256:f667dec86f9f7823d50f76b07733a34afc1427b923f1a673519206bb41a57f8c", size = 56966, upload-time = "2025-12-04T11:58:19.43Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/77/d0/6d62173602433937d0228b7809e2b244e09c11cfb1be9c6754ae3b20d887/camel_oasis-0.2.5-py3-none-any.whl", hash = "sha256:9ebd6ba8e331495ee56b25cc63982188b94125dde499e5e9c00398a1d47e606d", size = 75954, upload-time = "2025-12-04T11:58:18.363Z" }, +] + +[[package]] +name = "certifi" +version = "2025.11.12" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a2/8c/58f469717fa48465e4a50c014a0400602d3c437d7c0c468e17ada824da3a/certifi-2025.11.12.tar.gz", hash = "sha256:d8ab5478f2ecd78af242878415affce761ca6bc54a22a27e026d7c25357c3316", size = 160538, upload-time = "2025-11-12T02:54:51.517Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/70/7d/9bc192684cea499815ff478dfcdc13835ddf401365057044fb721ec6bddb/certifi-2025.11.12-py3-none-any.whl", hash = "sha256:97de8790030bbd5c2d96b7ec782fc2f7820ef8dba6db909ccf95449f2d062d4b", size = 159438, upload-time = "2025-11-12T02:54:49.735Z" }, +] + +[[package]] +name = "cffi" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pycparser", marker = "implementation_name != 'PyPy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz", hash = "sha256:44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529", size = 523588, upload-time = "2025-09-08T23:24:04.541Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/12/4a/3dfd5f7850cbf0d06dc84ba9aa00db766b52ca38d8b86e3a38314d52498c/cffi-2.0.0-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:b4c854ef3adc177950a8dfc81a86f5115d2abd545751a304c5bcf2c2c7283cfe", size = 184344, upload-time = "2025-09-08T23:22:26.456Z" }, + { url = "https://files.pythonhosted.org/packages/4f/8b/f0e4c441227ba756aafbe78f117485b25bb26b1c059d01f137fa6d14896b/cffi-2.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2de9a304e27f7596cd03d16f1b7c72219bd944e99cc52b84d0145aefb07cbd3c", size = 180560, upload-time = "2025-09-08T23:22:28.197Z" }, + { url = "https://files.pythonhosted.org/packages/b1/b7/1200d354378ef52ec227395d95c2576330fd22a869f7a70e88e1447eb234/cffi-2.0.0-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:baf5215e0ab74c16e2dd324e8ec067ef59e41125d3eade2b863d294fd5035c92", size = 209613, upload-time = "2025-09-08T23:22:29.475Z" }, + { url = "https://files.pythonhosted.org/packages/b8/56/6033f5e86e8cc9bb629f0077ba71679508bdf54a9a5e112a3c0b91870332/cffi-2.0.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:730cacb21e1bdff3ce90babf007d0a0917cc3e6492f336c2f0134101e0944f93", size = 216476, upload-time = "2025-09-08T23:22:31.063Z" }, + { url = "https://files.pythonhosted.org/packages/dc/7f/55fecd70f7ece178db2f26128ec41430d8720f2d12ca97bf8f0a628207d5/cffi-2.0.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:6824f87845e3396029f3820c206e459ccc91760e8fa24422f8b0c3d1731cbec5", size = 203374, upload-time = "2025-09-08T23:22:32.507Z" }, + { url = "https://files.pythonhosted.org/packages/84/ef/a7b77c8bdc0f77adc3b46888f1ad54be8f3b7821697a7b89126e829e676a/cffi-2.0.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9de40a7b0323d889cf8d23d1ef214f565ab154443c42737dfe52ff82cf857664", size = 202597, upload-time = "2025-09-08T23:22:34.132Z" }, + { url = "https://files.pythonhosted.org/packages/d7/91/500d892b2bf36529a75b77958edfcd5ad8e2ce4064ce2ecfeab2125d72d1/cffi-2.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8941aaadaf67246224cee8c3803777eed332a19d909b47e29c9842ef1e79ac26", size = 215574, upload-time = "2025-09-08T23:22:35.443Z" }, + { url = "https://files.pythonhosted.org/packages/44/64/58f6255b62b101093d5df22dcb752596066c7e89dd725e0afaed242a61be/cffi-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a05d0c237b3349096d3981b727493e22147f934b20f6f125a3eba8f994bec4a9", size = 218971, upload-time = "2025-09-08T23:22:36.805Z" }, + { url = "https://files.pythonhosted.org/packages/ab/49/fa72cebe2fd8a55fbe14956f9970fe8eb1ac59e5df042f603ef7c8ba0adc/cffi-2.0.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:94698a9c5f91f9d138526b48fe26a199609544591f859c870d477351dc7b2414", size = 211972, upload-time = "2025-09-08T23:22:38.436Z" }, + { url = "https://files.pythonhosted.org/packages/0b/28/dd0967a76aab36731b6ebfe64dec4e981aff7e0608f60c2d46b46982607d/cffi-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:5fed36fccc0612a53f1d4d9a816b50a36702c28a2aa880cb8a122b3466638743", size = 217078, upload-time = "2025-09-08T23:22:39.776Z" }, + { url = "https://files.pythonhosted.org/packages/2b/c0/015b25184413d7ab0a410775fdb4a50fca20f5589b5dab1dbbfa3baad8ce/cffi-2.0.0-cp311-cp311-win32.whl", hash = "sha256:c649e3a33450ec82378822b3dad03cc228b8f5963c0c12fc3b1e0ab940f768a5", size = 172076, upload-time = "2025-09-08T23:22:40.95Z" }, + { url = "https://files.pythonhosted.org/packages/ae/8f/dc5531155e7070361eb1b7e4c1a9d896d0cb21c49f807a6c03fd63fc877e/cffi-2.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:66f011380d0e49ed280c789fbd08ff0d40968ee7b665575489afa95c98196ab5", size = 182820, upload-time = "2025-09-08T23:22:42.463Z" }, + { url = "https://files.pythonhosted.org/packages/95/5c/1b493356429f9aecfd56bc171285a4c4ac8697f76e9bbbbb105e537853a1/cffi-2.0.0-cp311-cp311-win_arm64.whl", hash = "sha256:c6638687455baf640e37344fe26d37c404db8b80d037c3d29f58fe8d1c3b194d", size = 177635, upload-time = "2025-09-08T23:22:43.623Z" }, + { url = "https://files.pythonhosted.org/packages/ea/47/4f61023ea636104d4f16ab488e268b93008c3d0bb76893b1b31db1f96802/cffi-2.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d02d6655b0e54f54c4ef0b94eb6be0607b70853c45ce98bd278dc7de718be5d", size = 185271, upload-time = "2025-09-08T23:22:44.795Z" }, + { url = "https://files.pythonhosted.org/packages/df/a2/781b623f57358e360d62cdd7a8c681f074a71d445418a776eef0aadb4ab4/cffi-2.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8eca2a813c1cb7ad4fb74d368c2ffbbb4789d377ee5bb8df98373c2cc0dee76c", size = 181048, upload-time = "2025-09-08T23:22:45.938Z" }, + { url = "https://files.pythonhosted.org/packages/ff/df/a4f0fbd47331ceeba3d37c2e51e9dfc9722498becbeec2bd8bc856c9538a/cffi-2.0.0-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:21d1152871b019407d8ac3985f6775c079416c282e431a4da6afe7aefd2bccbe", size = 212529, upload-time = "2025-09-08T23:22:47.349Z" }, + { url = "https://files.pythonhosted.org/packages/d5/72/12b5f8d3865bf0f87cf1404d8c374e7487dcf097a1c91c436e72e6badd83/cffi-2.0.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b21e08af67b8a103c71a250401c78d5e0893beff75e28c53c98f4de42f774062", size = 220097, upload-time = "2025-09-08T23:22:48.677Z" }, + { url = "https://files.pythonhosted.org/packages/c2/95/7a135d52a50dfa7c882ab0ac17e8dc11cec9d55d2c18dda414c051c5e69e/cffi-2.0.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:1e3a615586f05fc4065a8b22b8152f0c1b00cdbc60596d187c2a74f9e3036e4e", size = 207983, upload-time = "2025-09-08T23:22:50.06Z" }, + { url = "https://files.pythonhosted.org/packages/3a/c8/15cb9ada8895957ea171c62dc78ff3e99159ee7adb13c0123c001a2546c1/cffi-2.0.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:81afed14892743bbe14dacb9e36d9e0e504cd204e0b165062c488942b9718037", size = 206519, upload-time = "2025-09-08T23:22:51.364Z" }, + { url = "https://files.pythonhosted.org/packages/78/2d/7fa73dfa841b5ac06c7b8855cfc18622132e365f5b81d02230333ff26e9e/cffi-2.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3e17ed538242334bf70832644a32a7aae3d83b57567f9fd60a26257e992b79ba", size = 219572, upload-time = "2025-09-08T23:22:52.902Z" }, + { url = "https://files.pythonhosted.org/packages/07/e0/267e57e387b4ca276b90f0434ff88b2c2241ad72b16d31836adddfd6031b/cffi-2.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3925dd22fa2b7699ed2617149842d2e6adde22b262fcbfada50e3d195e4b3a94", size = 222963, upload-time = "2025-09-08T23:22:54.518Z" }, + { url = "https://files.pythonhosted.org/packages/b6/75/1f2747525e06f53efbd878f4d03bac5b859cbc11c633d0fb81432d98a795/cffi-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2c8f814d84194c9ea681642fd164267891702542f028a15fc97d4674b6206187", size = 221361, upload-time = "2025-09-08T23:22:55.867Z" }, + { url = "https://files.pythonhosted.org/packages/7b/2b/2b6435f76bfeb6bbf055596976da087377ede68df465419d192acf00c437/cffi-2.0.0-cp312-cp312-win32.whl", hash = "sha256:da902562c3e9c550df360bfa53c035b2f241fed6d9aef119048073680ace4a18", size = 172932, upload-time = "2025-09-08T23:22:57.188Z" }, + { url = "https://files.pythonhosted.org/packages/f8/ed/13bd4418627013bec4ed6e54283b1959cf6db888048c7cf4b4c3b5b36002/cffi-2.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:da68248800ad6320861f129cd9c1bf96ca849a2771a59e0344e88681905916f5", size = 183557, upload-time = "2025-09-08T23:22:58.351Z" }, + { url = "https://files.pythonhosted.org/packages/95/31/9f7f93ad2f8eff1dbc1c3656d7ca5bfd8fb52c9d786b4dcf19b2d02217fa/cffi-2.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:4671d9dd5ec934cb9a73e7ee9676f9362aba54f7f34910956b84d727b0d73fb6", size = 177762, upload-time = "2025-09-08T23:22:59.668Z" }, + { url = "https://files.pythonhosted.org/packages/4b/8d/a0a47a0c9e413a658623d014e91e74a50cdd2c423f7ccfd44086ef767f90/cffi-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:00bdf7acc5f795150faa6957054fbbca2439db2f775ce831222b66f192f03beb", size = 185230, upload-time = "2025-09-08T23:23:00.879Z" }, + { url = "https://files.pythonhosted.org/packages/4a/d2/a6c0296814556c68ee32009d9c2ad4f85f2707cdecfd7727951ec228005d/cffi-2.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:45d5e886156860dc35862657e1494b9bae8dfa63bf56796f2fb56e1679fc0bca", size = 181043, upload-time = "2025-09-08T23:23:02.231Z" }, + { url = "https://files.pythonhosted.org/packages/b0/1e/d22cc63332bd59b06481ceaac49d6c507598642e2230f201649058a7e704/cffi-2.0.0-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:07b271772c100085dd28b74fa0cd81c8fb1a3ba18b21e03d7c27f3436a10606b", size = 212446, upload-time = "2025-09-08T23:23:03.472Z" }, + { url = "https://files.pythonhosted.org/packages/a9/f5/a2c23eb03b61a0b8747f211eb716446c826ad66818ddc7810cc2cc19b3f2/cffi-2.0.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d48a880098c96020b02d5a1f7d9251308510ce8858940e6fa99ece33f610838b", size = 220101, upload-time = "2025-09-08T23:23:04.792Z" }, + { url = "https://files.pythonhosted.org/packages/f2/7f/e6647792fc5850d634695bc0e6ab4111ae88e89981d35ac269956605feba/cffi-2.0.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f93fd8e5c8c0a4aa1f424d6173f14a892044054871c771f8566e4008eaa359d2", size = 207948, upload-time = "2025-09-08T23:23:06.127Z" }, + { url = "https://files.pythonhosted.org/packages/cb/1e/a5a1bd6f1fb30f22573f76533de12a00bf274abcdc55c8edab639078abb6/cffi-2.0.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:dd4f05f54a52fb558f1ba9f528228066954fee3ebe629fc1660d874d040ae5a3", size = 206422, upload-time = "2025-09-08T23:23:07.753Z" }, + { url = "https://files.pythonhosted.org/packages/98/df/0a1755e750013a2081e863e7cd37e0cdd02664372c754e5560099eb7aa44/cffi-2.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c8d3b5532fc71b7a77c09192b4a5a200ea992702734a2e9279a37f2478236f26", size = 219499, upload-time = "2025-09-08T23:23:09.648Z" }, + { url = "https://files.pythonhosted.org/packages/50/e1/a969e687fcf9ea58e6e2a928ad5e2dd88cc12f6f0ab477e9971f2309b57c/cffi-2.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d9b29c1f0ae438d5ee9acb31cadee00a58c46cc9c0b2f9038c6b0b3470877a8c", size = 222928, upload-time = "2025-09-08T23:23:10.928Z" }, + { url = "https://files.pythonhosted.org/packages/36/54/0362578dd2c9e557a28ac77698ed67323ed5b9775ca9d3fe73fe191bb5d8/cffi-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6d50360be4546678fc1b79ffe7a66265e28667840010348dd69a314145807a1b", size = 221302, upload-time = "2025-09-08T23:23:12.42Z" }, + { url = "https://files.pythonhosted.org/packages/eb/6d/bf9bda840d5f1dfdbf0feca87fbdb64a918a69bca42cfa0ba7b137c48cb8/cffi-2.0.0-cp313-cp313-win32.whl", hash = "sha256:74a03b9698e198d47562765773b4a8309919089150a0bb17d829ad7b44b60d27", size = 172909, upload-time = "2025-09-08T23:23:14.32Z" }, + { url = "https://files.pythonhosted.org/packages/37/18/6519e1ee6f5a1e579e04b9ddb6f1676c17368a7aba48299c3759bbc3c8b3/cffi-2.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:19f705ada2530c1167abacb171925dd886168931e0a7b78f5bffcae5c6b5be75", size = 183402, upload-time = "2025-09-08T23:23:15.535Z" }, + { url = "https://files.pythonhosted.org/packages/cb/0e/02ceeec9a7d6ee63bb596121c2c8e9b3a9e150936f4fbef6ca1943e6137c/cffi-2.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:256f80b80ca3853f90c21b23ee78cd008713787b1b1e93eae9f3d6a7134abd91", size = 177780, upload-time = "2025-09-08T23:23:16.761Z" }, + { url = "https://files.pythonhosted.org/packages/92/c4/3ce07396253a83250ee98564f8d7e9789fab8e58858f35d07a9a2c78de9f/cffi-2.0.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:fc33c5141b55ed366cfaad382df24fe7dcbc686de5be719b207bb248e3053dc5", size = 185320, upload-time = "2025-09-08T23:23:18.087Z" }, + { url = "https://files.pythonhosted.org/packages/59/dd/27e9fa567a23931c838c6b02d0764611c62290062a6d4e8ff7863daf9730/cffi-2.0.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c654de545946e0db659b3400168c9ad31b5d29593291482c43e3564effbcee13", size = 181487, upload-time = "2025-09-08T23:23:19.622Z" }, + { url = "https://files.pythonhosted.org/packages/d6/43/0e822876f87ea8a4ef95442c3d766a06a51fc5298823f884ef87aaad168c/cffi-2.0.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:24b6f81f1983e6df8db3adc38562c83f7d4a0c36162885ec7f7b77c7dcbec97b", size = 220049, upload-time = "2025-09-08T23:23:20.853Z" }, + { url = "https://files.pythonhosted.org/packages/b4/89/76799151d9c2d2d1ead63c2429da9ea9d7aac304603de0c6e8764e6e8e70/cffi-2.0.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:12873ca6cb9b0f0d3a0da705d6086fe911591737a59f28b7936bdfed27c0d47c", size = 207793, upload-time = "2025-09-08T23:23:22.08Z" }, + { url = "https://files.pythonhosted.org/packages/bb/dd/3465b14bb9e24ee24cb88c9e3730f6de63111fffe513492bf8c808a3547e/cffi-2.0.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:d9b97165e8aed9272a6bb17c01e3cc5871a594a446ebedc996e2397a1c1ea8ef", size = 206300, upload-time = "2025-09-08T23:23:23.314Z" }, + { url = "https://files.pythonhosted.org/packages/47/d9/d83e293854571c877a92da46fdec39158f8d7e68da75bf73581225d28e90/cffi-2.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:afb8db5439b81cf9c9d0c80404b60c3cc9c3add93e114dcae767f1477cb53775", size = 219244, upload-time = "2025-09-08T23:23:24.541Z" }, + { url = "https://files.pythonhosted.org/packages/2b/0f/1f177e3683aead2bb00f7679a16451d302c436b5cbf2505f0ea8146ef59e/cffi-2.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:737fe7d37e1a1bffe70bd5754ea763a62a066dc5913ca57e957824b72a85e205", size = 222828, upload-time = "2025-09-08T23:23:26.143Z" }, + { url = "https://files.pythonhosted.org/packages/c6/0f/cafacebd4b040e3119dcb32fed8bdef8dfe94da653155f9d0b9dc660166e/cffi-2.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:38100abb9d1b1435bc4cc340bb4489635dc2f0da7456590877030c9b3d40b0c1", size = 220926, upload-time = "2025-09-08T23:23:27.873Z" }, + { url = "https://files.pythonhosted.org/packages/3e/aa/df335faa45b395396fcbc03de2dfcab242cd61a9900e914fe682a59170b1/cffi-2.0.0-cp314-cp314-win32.whl", hash = "sha256:087067fa8953339c723661eda6b54bc98c5625757ea62e95eb4898ad5e776e9f", size = 175328, upload-time = "2025-09-08T23:23:44.61Z" }, + { url = "https://files.pythonhosted.org/packages/bb/92/882c2d30831744296ce713f0feb4c1cd30f346ef747b530b5318715cc367/cffi-2.0.0-cp314-cp314-win_amd64.whl", hash = "sha256:203a48d1fb583fc7d78a4c6655692963b860a417c0528492a6bc21f1aaefab25", size = 185650, upload-time = "2025-09-08T23:23:45.848Z" }, + { url = "https://files.pythonhosted.org/packages/9f/2c/98ece204b9d35a7366b5b2c6539c350313ca13932143e79dc133ba757104/cffi-2.0.0-cp314-cp314-win_arm64.whl", hash = "sha256:dbd5c7a25a7cb98f5ca55d258b103a2054f859a46ae11aaf23134f9cc0d356ad", size = 180687, upload-time = "2025-09-08T23:23:47.105Z" }, + { url = "https://files.pythonhosted.org/packages/3e/61/c768e4d548bfa607abcda77423448df8c471f25dbe64fb2ef6d555eae006/cffi-2.0.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:9a67fc9e8eb39039280526379fb3a70023d77caec1852002b4da7e8b270c4dd9", size = 188773, upload-time = "2025-09-08T23:23:29.347Z" }, + { url = "https://files.pythonhosted.org/packages/2c/ea/5f76bce7cf6fcd0ab1a1058b5af899bfbef198bea4d5686da88471ea0336/cffi-2.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7a66c7204d8869299919db4d5069a82f1561581af12b11b3c9f48c584eb8743d", size = 185013, upload-time = "2025-09-08T23:23:30.63Z" }, + { url = "https://files.pythonhosted.org/packages/be/b4/c56878d0d1755cf9caa54ba71e5d049479c52f9e4afc230f06822162ab2f/cffi-2.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7cc09976e8b56f8cebd752f7113ad07752461f48a58cbba644139015ac24954c", size = 221593, upload-time = "2025-09-08T23:23:31.91Z" }, + { url = "https://files.pythonhosted.org/packages/e0/0d/eb704606dfe8033e7128df5e90fee946bbcb64a04fcdaa97321309004000/cffi-2.0.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:92b68146a71df78564e4ef48af17551a5ddd142e5190cdf2c5624d0c3ff5b2e8", size = 209354, upload-time = "2025-09-08T23:23:33.214Z" }, + { url = "https://files.pythonhosted.org/packages/d8/19/3c435d727b368ca475fb8742ab97c9cb13a0de600ce86f62eab7fa3eea60/cffi-2.0.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b1e74d11748e7e98e2f426ab176d4ed720a64412b6a15054378afdb71e0f37dc", size = 208480, upload-time = "2025-09-08T23:23:34.495Z" }, + { url = "https://files.pythonhosted.org/packages/d0/44/681604464ed9541673e486521497406fadcc15b5217c3e326b061696899a/cffi-2.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:28a3a209b96630bca57cce802da70c266eb08c6e97e5afd61a75611ee6c64592", size = 221584, upload-time = "2025-09-08T23:23:36.096Z" }, + { url = "https://files.pythonhosted.org/packages/25/8e/342a504ff018a2825d395d44d63a767dd8ebc927ebda557fecdaca3ac33a/cffi-2.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:7553fb2090d71822f02c629afe6042c299edf91ba1bf94951165613553984512", size = 224443, upload-time = "2025-09-08T23:23:37.328Z" }, + { url = "https://files.pythonhosted.org/packages/e1/5e/b666bacbbc60fbf415ba9988324a132c9a7a0448a9a8f125074671c0f2c3/cffi-2.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6c6c373cfc5c83a975506110d17457138c8c63016b563cc9ed6e056a82f13ce4", size = 223437, upload-time = "2025-09-08T23:23:38.945Z" }, + { url = "https://files.pythonhosted.org/packages/a0/1d/ec1a60bd1a10daa292d3cd6bb0b359a81607154fb8165f3ec95fe003b85c/cffi-2.0.0-cp314-cp314t-win32.whl", hash = "sha256:1fc9ea04857caf665289b7a75923f2c6ed559b8298a1b8c49e59f7dd95c8481e", size = 180487, upload-time = "2025-09-08T23:23:40.423Z" }, + { url = "https://files.pythonhosted.org/packages/bf/41/4c1168c74fac325c0c8156f04b6749c8b6a8f405bbf91413ba088359f60d/cffi-2.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:d68b6cef7827e8641e8ef16f4494edda8b36104d79773a334beaa1e3521430f6", size = 191726, upload-time = "2025-09-08T23:23:41.742Z" }, + { url = "https://files.pythonhosted.org/packages/ae/3a/dbeec9d1ee0844c679f6bb5d6ad4e9f198b1224f4e7a32825f47f6192b0c/cffi-2.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0a1527a803f0a659de1af2e1fd700213caba79377e27e4693648c2923da066f9", size = 184195, upload-time = "2025-09-08T23:23:43.004Z" }, +] + +[[package]] +name = "cfgv" +version = "3.5.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/4e/b5/721b8799b04bf9afe054a3899c6cf4e880fcf8563cc71c15610242490a0c/cfgv-3.5.0.tar.gz", hash = "sha256:d5b1034354820651caa73ede66a6294d6e95c1b00acc5e9b098e917404669132", size = 7334, upload-time = "2025-11-19T20:55:51.612Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/db/3c/33bac158f8ab7f89b2e59426d5fe2e4f63f7ed25df84c036890172b412b5/cfgv-3.5.0-py2.py3-none-any.whl", hash = "sha256:a8dc6b26ad22ff227d2634a65cb388215ce6cc96bbcc5cfde7641ae87e8dacc0", size = 7445, upload-time = "2025-11-19T20:55:50.744Z" }, +] + +[[package]] +name = "chardet" +version = "5.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz", hash = "sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7", size = 2069618, upload-time = "2023-08-01T19:23:02.662Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/38/6f/f5fbc992a329ee4e0f288c1fe0e2ad9485ed064cac731ed2fe47dcc38cbf/chardet-5.2.0-py3-none-any.whl", hash = "sha256:e1cf59446890a00105fe7b7912492ea04b6e6f06d4b742b2c788469e34c82970", size = 199385, upload-time = "2023-08-01T19:23:00.661Z" }, +] + +[[package]] +name = "charset-normalizer" +version = "3.4.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz", hash = "sha256:94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a", size = 129418, upload-time = "2025-10-14T04:42:32.879Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ed/27/c6491ff4954e58a10f69ad90aca8a1b6fe9c5d3c6f380907af3c37435b59/charset_normalizer-3.4.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6e1fcf0720908f200cd21aa4e6750a48ff6ce4afe7ff5a79a90d5ed8a08296f8", size = 206988, upload-time = "2025-10-14T04:40:33.79Z" }, + { url = "https://files.pythonhosted.org/packages/94/59/2e87300fe67ab820b5428580a53cad894272dbb97f38a7a814a2a1ac1011/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f819d5fe9234f9f82d75bdfa9aef3a3d72c4d24a6e57aeaebba32a704553aa0", size = 147324, upload-time = "2025-10-14T04:40:34.961Z" }, + { url = "https://files.pythonhosted.org/packages/07/fb/0cf61dc84b2b088391830f6274cb57c82e4da8bbc2efeac8c025edb88772/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a59cb51917aa591b1c4e6a43c132f0cdc3c76dbad6155df4e28ee626cc77a0a3", size = 142742, upload-time = "2025-10-14T04:40:36.105Z" }, + { url = "https://files.pythonhosted.org/packages/62/8b/171935adf2312cd745d290ed93cf16cf0dfe320863ab7cbeeae1dcd6535f/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8ef3c867360f88ac904fd3f5e1f902f13307af9052646963ee08ff4f131adafc", size = 160863, upload-time = "2025-10-14T04:40:37.188Z" }, + { url = "https://files.pythonhosted.org/packages/09/73/ad875b192bda14f2173bfc1bc9a55e009808484a4b256748d931b6948442/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d9e45d7faa48ee908174d8fe84854479ef838fc6a705c9315372eacbc2f02897", size = 157837, upload-time = "2025-10-14T04:40:38.435Z" }, + { url = "https://files.pythonhosted.org/packages/6d/fc/de9cce525b2c5b94b47c70a4b4fb19f871b24995c728e957ee68ab1671ea/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:840c25fb618a231545cbab0564a799f101b63b9901f2569faecd6b222ac72381", size = 151550, upload-time = "2025-10-14T04:40:40.053Z" }, + { url = "https://files.pythonhosted.org/packages/55/c2/43edd615fdfba8c6f2dfbd459b25a6b3b551f24ea21981e23fb768503ce1/charset_normalizer-3.4.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ca5862d5b3928c4940729dacc329aa9102900382fea192fc5e52eb69d6093815", size = 149162, upload-time = "2025-10-14T04:40:41.163Z" }, + { url = "https://files.pythonhosted.org/packages/03/86/bde4ad8b4d0e9429a4e82c1e8f5c659993a9a863ad62c7df05cf7b678d75/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9c7f57c3d666a53421049053eaacdd14bbd0a528e2186fcb2e672effd053bb0", size = 150019, upload-time = "2025-10-14T04:40:42.276Z" }, + { url = "https://files.pythonhosted.org/packages/1f/86/a151eb2af293a7e7bac3a739b81072585ce36ccfb4493039f49f1d3cae8c/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:277e970e750505ed74c832b4bf75dac7476262ee2a013f5574dd49075879e161", size = 143310, upload-time = "2025-10-14T04:40:43.439Z" }, + { url = "https://files.pythonhosted.org/packages/b5/fe/43dae6144a7e07b87478fdfc4dbe9efd5defb0e7ec29f5f58a55aeef7bf7/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:31fd66405eaf47bb62e8cd575dc621c56c668f27d46a61d975a249930dd5e2a4", size = 162022, upload-time = "2025-10-14T04:40:44.547Z" }, + { url = "https://files.pythonhosted.org/packages/80/e6/7aab83774f5d2bca81f42ac58d04caf44f0cc2b65fc6db2b3b2e8a05f3b3/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:0d3d8f15c07f86e9ff82319b3d9ef6f4bf907608f53fe9d92b28ea9ae3d1fd89", size = 149383, upload-time = "2025-10-14T04:40:46.018Z" }, + { url = "https://files.pythonhosted.org/packages/4f/e8/b289173b4edae05c0dde07f69f8db476a0b511eac556dfe0d6bda3c43384/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9f7fcd74d410a36883701fafa2482a6af2ff5ba96b9a620e9e0721e28ead5569", size = 159098, upload-time = "2025-10-14T04:40:47.081Z" }, + { url = "https://files.pythonhosted.org/packages/d8/df/fe699727754cae3f8478493c7f45f777b17c3ef0600e28abfec8619eb49c/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ebf3e58c7ec8a8bed6d66a75d7fb37b55e5015b03ceae72a8e7c74495551e224", size = 152991, upload-time = "2025-10-14T04:40:48.246Z" }, + { url = "https://files.pythonhosted.org/packages/1a/86/584869fe4ddb6ffa3bd9f491b87a01568797fb9bd8933f557dba9771beaf/charset_normalizer-3.4.4-cp311-cp311-win32.whl", hash = "sha256:eecbc200c7fd5ddb9a7f16c7decb07b566c29fa2161a16cf67b8d068bd21690a", size = 99456, upload-time = "2025-10-14T04:40:49.376Z" }, + { url = "https://files.pythonhosted.org/packages/65/f6/62fdd5feb60530f50f7e38b4f6a1d5203f4d16ff4f9f0952962c044e919a/charset_normalizer-3.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:5ae497466c7901d54b639cf42d5b8c1b6a4fead55215500d2f486d34db48d016", size = 106978, upload-time = "2025-10-14T04:40:50.844Z" }, + { url = "https://files.pythonhosted.org/packages/7a/9d/0710916e6c82948b3be62d9d398cb4fcf4e97b56d6a6aeccd66c4b2f2bd5/charset_normalizer-3.4.4-cp311-cp311-win_arm64.whl", hash = "sha256:65e2befcd84bc6f37095f5961e68a6f077bf44946771354a28ad434c2cce0ae1", size = 99969, upload-time = "2025-10-14T04:40:52.272Z" }, + { url = "https://files.pythonhosted.org/packages/f3/85/1637cd4af66fa687396e757dec650f28025f2a2f5a5531a3208dc0ec43f2/charset_normalizer-3.4.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0a98e6759f854bd25a58a73fa88833fba3b7c491169f86ce1180c948ab3fd394", size = 208425, upload-time = "2025-10-14T04:40:53.353Z" }, + { url = "https://files.pythonhosted.org/packages/9d/6a/04130023fef2a0d9c62d0bae2649b69f7b7d8d24ea5536feef50551029df/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b5b290ccc2a263e8d185130284f8501e3e36c5e02750fc6b6bdeb2e9e96f1e25", size = 148162, upload-time = "2025-10-14T04:40:54.558Z" }, + { url = "https://files.pythonhosted.org/packages/78/29/62328d79aa60da22c9e0b9a66539feae06ca0f5a4171ac4f7dc285b83688/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74bb723680f9f7a6234dcf67aea57e708ec1fbdf5699fb91dfd6f511b0a320ef", size = 144558, upload-time = "2025-10-14T04:40:55.677Z" }, + { url = "https://files.pythonhosted.org/packages/86/bb/b32194a4bf15b88403537c2e120b817c61cd4ecffa9b6876e941c3ee38fe/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f1e34719c6ed0b92f418c7c780480b26b5d9c50349e9a9af7d76bf757530350d", size = 161497, upload-time = "2025-10-14T04:40:57.217Z" }, + { url = "https://files.pythonhosted.org/packages/19/89/a54c82b253d5b9b111dc74aca196ba5ccfcca8242d0fb64146d4d3183ff1/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2437418e20515acec67d86e12bf70056a33abdacb5cb1655042f6538d6b085a8", size = 159240, upload-time = "2025-10-14T04:40:58.358Z" }, + { url = "https://files.pythonhosted.org/packages/c0/10/d20b513afe03acc89ec33948320a5544d31f21b05368436d580dec4e234d/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11d694519d7f29d6cd09f6ac70028dba10f92f6cdd059096db198c283794ac86", size = 153471, upload-time = "2025-10-14T04:40:59.468Z" }, + { url = "https://files.pythonhosted.org/packages/61/fa/fbf177b55bdd727010f9c0a3c49eefa1d10f960e5f09d1d887bf93c2e698/charset_normalizer-3.4.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ac1c4a689edcc530fc9d9aa11f5774b9e2f33f9a0c6a57864e90908f5208d30a", size = 150864, upload-time = "2025-10-14T04:41:00.623Z" }, + { url = "https://files.pythonhosted.org/packages/05/12/9fbc6a4d39c0198adeebbde20b619790e9236557ca59fc40e0e3cebe6f40/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:21d142cc6c0ec30d2efee5068ca36c128a30b0f2c53c1c07bd78cb6bc1d3be5f", size = 150647, upload-time = "2025-10-14T04:41:01.754Z" }, + { url = "https://files.pythonhosted.org/packages/ad/1f/6a9a593d52e3e8c5d2b167daf8c6b968808efb57ef4c210acb907c365bc4/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:5dbe56a36425d26d6cfb40ce79c314a2e4dd6211d51d6d2191c00bed34f354cc", size = 145110, upload-time = "2025-10-14T04:41:03.231Z" }, + { url = "https://files.pythonhosted.org/packages/30/42/9a52c609e72471b0fc54386dc63c3781a387bb4fe61c20231a4ebcd58bdd/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:5bfbb1b9acf3334612667b61bd3002196fe2a1eb4dd74d247e0f2a4d50ec9bbf", size = 162839, upload-time = "2025-10-14T04:41:04.715Z" }, + { url = "https://files.pythonhosted.org/packages/c4/5b/c0682bbf9f11597073052628ddd38344a3d673fda35a36773f7d19344b23/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d055ec1e26e441f6187acf818b73564e6e6282709e9bcb5b63f5b23068356a15", size = 150667, upload-time = "2025-10-14T04:41:05.827Z" }, + { url = "https://files.pythonhosted.org/packages/e4/24/a41afeab6f990cf2daf6cb8c67419b63b48cf518e4f56022230840c9bfb2/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:af2d8c67d8e573d6de5bc30cdb27e9b95e49115cd9baad5ddbd1a6207aaa82a9", size = 160535, upload-time = "2025-10-14T04:41:06.938Z" }, + { url = "https://files.pythonhosted.org/packages/2a/e5/6a4ce77ed243c4a50a1fecca6aaaab419628c818a49434be428fe24c9957/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:780236ac706e66881f3b7f2f32dfe90507a09e67d1d454c762cf642e6e1586e0", size = 154816, upload-time = "2025-10-14T04:41:08.101Z" }, + { url = "https://files.pythonhosted.org/packages/a8/ef/89297262b8092b312d29cdb2517cb1237e51db8ecef2e9af5edbe7b683b1/charset_normalizer-3.4.4-cp312-cp312-win32.whl", hash = "sha256:5833d2c39d8896e4e19b689ffc198f08ea58116bee26dea51e362ecc7cd3ed26", size = 99694, upload-time = "2025-10-14T04:41:09.23Z" }, + { url = "https://files.pythonhosted.org/packages/3d/2d/1e5ed9dd3b3803994c155cd9aacb60c82c331bad84daf75bcb9c91b3295e/charset_normalizer-3.4.4-cp312-cp312-win_amd64.whl", hash = "sha256:a79cfe37875f822425b89a82333404539ae63dbdddf97f84dcbc3d339aae9525", size = 107131, upload-time = "2025-10-14T04:41:10.467Z" }, + { url = "https://files.pythonhosted.org/packages/d0/d9/0ed4c7098a861482a7b6a95603edce4c0d9db2311af23da1fb2b75ec26fc/charset_normalizer-3.4.4-cp312-cp312-win_arm64.whl", hash = "sha256:376bec83a63b8021bb5c8ea75e21c4ccb86e7e45ca4eb81146091b56599b80c3", size = 100390, upload-time = "2025-10-14T04:41:11.915Z" }, + { url = "https://files.pythonhosted.org/packages/97/45/4b3a1239bbacd321068ea6e7ac28875b03ab8bc0aa0966452db17cd36714/charset_normalizer-3.4.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:e1f185f86a6f3403aa2420e815904c67b2f9ebc443f045edd0de921108345794", size = 208091, upload-time = "2025-10-14T04:41:13.346Z" }, + { url = "https://files.pythonhosted.org/packages/7d/62/73a6d7450829655a35bb88a88fca7d736f9882a27eacdca2c6d505b57e2e/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b39f987ae8ccdf0d2642338faf2abb1862340facc796048b604ef14919e55ed", size = 147936, upload-time = "2025-10-14T04:41:14.461Z" }, + { url = "https://files.pythonhosted.org/packages/89/c5/adb8c8b3d6625bef6d88b251bbb0d95f8205831b987631ab0c8bb5d937c2/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3162d5d8ce1bb98dd51af660f2121c55d0fa541b46dff7bb9b9f86ea1d87de72", size = 144180, upload-time = "2025-10-14T04:41:15.588Z" }, + { url = "https://files.pythonhosted.org/packages/91/ed/9706e4070682d1cc219050b6048bfd293ccf67b3d4f5a4f39207453d4b99/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:81d5eb2a312700f4ecaa977a8235b634ce853200e828fbadf3a9c50bab278328", size = 161346, upload-time = "2025-10-14T04:41:16.738Z" }, + { url = "https://files.pythonhosted.org/packages/d5/0d/031f0d95e4972901a2f6f09ef055751805ff541511dc1252ba3ca1f80cf5/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5bd2293095d766545ec1a8f612559f6b40abc0eb18bb2f5d1171872d34036ede", size = 158874, upload-time = "2025-10-14T04:41:17.923Z" }, + { url = "https://files.pythonhosted.org/packages/f5/83/6ab5883f57c9c801ce5e5677242328aa45592be8a00644310a008d04f922/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a8a8b89589086a25749f471e6a900d3f662d1d3b6e2e59dcecf787b1cc3a1894", size = 153076, upload-time = "2025-10-14T04:41:19.106Z" }, + { url = "https://files.pythonhosted.org/packages/75/1e/5ff781ddf5260e387d6419959ee89ef13878229732732ee73cdae01800f2/charset_normalizer-3.4.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc7637e2f80d8530ee4a78e878bce464f70087ce73cf7c1caf142416923b98f1", size = 150601, upload-time = "2025-10-14T04:41:20.245Z" }, + { url = "https://files.pythonhosted.org/packages/d7/57/71be810965493d3510a6ca79b90c19e48696fb1ff964da319334b12677f0/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f8bf04158c6b607d747e93949aa60618b61312fe647a6369f88ce2ff16043490", size = 150376, upload-time = "2025-10-14T04:41:21.398Z" }, + { url = "https://files.pythonhosted.org/packages/e5/d5/c3d057a78c181d007014feb7e9f2e65905a6c4ef182c0ddf0de2924edd65/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:554af85e960429cf30784dd47447d5125aaa3b99a6f0683589dbd27e2f45da44", size = 144825, upload-time = "2025-10-14T04:41:22.583Z" }, + { url = "https://files.pythonhosted.org/packages/e6/8c/d0406294828d4976f275ffbe66f00266c4b3136b7506941d87c00cab5272/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:74018750915ee7ad843a774364e13a3db91682f26142baddf775342c3f5b1133", size = 162583, upload-time = "2025-10-14T04:41:23.754Z" }, + { url = "https://files.pythonhosted.org/packages/d7/24/e2aa1f18c8f15c4c0e932d9287b8609dd30ad56dbe41d926bd846e22fb8d/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:c0463276121fdee9c49b98908b3a89c39be45d86d1dbaa22957e38f6321d4ce3", size = 150366, upload-time = "2025-10-14T04:41:25.27Z" }, + { url = "https://files.pythonhosted.org/packages/e4/5b/1e6160c7739aad1e2df054300cc618b06bf784a7a164b0f238360721ab86/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:362d61fd13843997c1c446760ef36f240cf81d3ebf74ac62652aebaf7838561e", size = 160300, upload-time = "2025-10-14T04:41:26.725Z" }, + { url = "https://files.pythonhosted.org/packages/7a/10/f882167cd207fbdd743e55534d5d9620e095089d176d55cb22d5322f2afd/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a26f18905b8dd5d685d6d07b0cdf98a79f3c7a918906af7cc143ea2e164c8bc", size = 154465, upload-time = "2025-10-14T04:41:28.322Z" }, + { url = "https://files.pythonhosted.org/packages/89/66/c7a9e1b7429be72123441bfdbaf2bc13faab3f90b933f664db506dea5915/charset_normalizer-3.4.4-cp313-cp313-win32.whl", hash = "sha256:9b35f4c90079ff2e2edc5b26c0c77925e5d2d255c42c74fdb70fb49b172726ac", size = 99404, upload-time = "2025-10-14T04:41:29.95Z" }, + { url = "https://files.pythonhosted.org/packages/c4/26/b9924fa27db384bdcd97ab83b4f0a8058d96ad9626ead570674d5e737d90/charset_normalizer-3.4.4-cp313-cp313-win_amd64.whl", hash = "sha256:b435cba5f4f750aa6c0a0d92c541fb79f69a387c91e61f1795227e4ed9cece14", size = 107092, upload-time = "2025-10-14T04:41:31.188Z" }, + { url = "https://files.pythonhosted.org/packages/af/8f/3ed4bfa0c0c72a7ca17f0380cd9e4dd842b09f664e780c13cff1dcf2ef1b/charset_normalizer-3.4.4-cp313-cp313-win_arm64.whl", hash = "sha256:542d2cee80be6f80247095cc36c418f7bddd14f4a6de45af91dfad36d817bba2", size = 100408, upload-time = "2025-10-14T04:41:32.624Z" }, + { url = "https://files.pythonhosted.org/packages/2a/35/7051599bd493e62411d6ede36fd5af83a38f37c4767b92884df7301db25d/charset_normalizer-3.4.4-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:da3326d9e65ef63a817ecbcc0df6e94463713b754fe293eaa03da99befb9a5bd", size = 207746, upload-time = "2025-10-14T04:41:33.773Z" }, + { url = "https://files.pythonhosted.org/packages/10/9a/97c8d48ef10d6cd4fcead2415523221624bf58bcf68a802721a6bc807c8f/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8af65f14dc14a79b924524b1e7fffe304517b2bff5a58bf64f30b98bbc5079eb", size = 147889, upload-time = "2025-10-14T04:41:34.897Z" }, + { url = "https://files.pythonhosted.org/packages/10/bf/979224a919a1b606c82bd2c5fa49b5c6d5727aa47b4312bb27b1734f53cd/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74664978bb272435107de04e36db5a9735e78232b85b77d45cfb38f758efd33e", size = 143641, upload-time = "2025-10-14T04:41:36.116Z" }, + { url = "https://files.pythonhosted.org/packages/ba/33/0ad65587441fc730dc7bd90e9716b30b4702dc7b617e6ba4997dc8651495/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:752944c7ffbfdd10c074dc58ec2d5a8a4cd9493b314d367c14d24c17684ddd14", size = 160779, upload-time = "2025-10-14T04:41:37.229Z" }, + { url = "https://files.pythonhosted.org/packages/67/ed/331d6b249259ee71ddea93f6f2f0a56cfebd46938bde6fcc6f7b9a3d0e09/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1f13550535ad8cff21b8d757a3257963e951d96e20ec82ab44bc64aeb62a191", size = 159035, upload-time = "2025-10-14T04:41:38.368Z" }, + { url = "https://files.pythonhosted.org/packages/67/ff/f6b948ca32e4f2a4576aa129d8bed61f2e0543bf9f5f2b7fc3758ed005c9/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ecaae4149d99b1c9e7b88bb03e3221956f68fd6d50be2ef061b2381b61d20838", size = 152542, upload-time = "2025-10-14T04:41:39.862Z" }, + { url = "https://files.pythonhosted.org/packages/16/85/276033dcbcc369eb176594de22728541a925b2632f9716428c851b149e83/charset_normalizer-3.4.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cb6254dc36b47a990e59e1068afacdcd02958bdcce30bb50cc1700a8b9d624a6", size = 149524, upload-time = "2025-10-14T04:41:41.319Z" }, + { url = "https://files.pythonhosted.org/packages/9e/f2/6a2a1f722b6aba37050e626530a46a68f74e63683947a8acff92569f979a/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c8ae8a0f02f57a6e61203a31428fa1d677cbe50c93622b4149d5c0f319c1d19e", size = 150395, upload-time = "2025-10-14T04:41:42.539Z" }, + { url = "https://files.pythonhosted.org/packages/60/bb/2186cb2f2bbaea6338cad15ce23a67f9b0672929744381e28b0592676824/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:47cc91b2f4dd2833fddaedd2893006b0106129d4b94fdb6af1f4ce5a9965577c", size = 143680, upload-time = "2025-10-14T04:41:43.661Z" }, + { url = "https://files.pythonhosted.org/packages/7d/a5/bf6f13b772fbb2a90360eb620d52ed8f796f3c5caee8398c3b2eb7b1c60d/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:82004af6c302b5d3ab2cfc4cc5f29db16123b1a8417f2e25f9066f91d4411090", size = 162045, upload-time = "2025-10-14T04:41:44.821Z" }, + { url = "https://files.pythonhosted.org/packages/df/c5/d1be898bf0dc3ef9030c3825e5d3b83f2c528d207d246cbabe245966808d/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b7d8f6c26245217bd2ad053761201e9f9680f8ce52f0fcd8d0755aeae5b2152", size = 149687, upload-time = "2025-10-14T04:41:46.442Z" }, + { url = "https://files.pythonhosted.org/packages/a5/42/90c1f7b9341eef50c8a1cb3f098ac43b0508413f33affd762855f67a410e/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:799a7a5e4fb2d5898c60b640fd4981d6a25f1c11790935a44ce38c54e985f828", size = 160014, upload-time = "2025-10-14T04:41:47.631Z" }, + { url = "https://files.pythonhosted.org/packages/76/be/4d3ee471e8145d12795ab655ece37baed0929462a86e72372fd25859047c/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:99ae2cffebb06e6c22bdc25801d7b30f503cc87dbd283479e7b606f70aff57ec", size = 154044, upload-time = "2025-10-14T04:41:48.81Z" }, + { url = "https://files.pythonhosted.org/packages/b0/6f/8f7af07237c34a1defe7defc565a9bc1807762f672c0fde711a4b22bf9c0/charset_normalizer-3.4.4-cp314-cp314-win32.whl", hash = "sha256:f9d332f8c2a2fcbffe1378594431458ddbef721c1769d78e2cbc06280d8155f9", size = 99940, upload-time = "2025-10-14T04:41:49.946Z" }, + { url = "https://files.pythonhosted.org/packages/4b/51/8ade005e5ca5b0d80fb4aff72a3775b325bdc3d27408c8113811a7cbe640/charset_normalizer-3.4.4-cp314-cp314-win_amd64.whl", hash = "sha256:8a6562c3700cce886c5be75ade4a5db4214fda19fede41d9792d100288d8f94c", size = 107104, upload-time = "2025-10-14T04:41:51.051Z" }, + { url = "https://files.pythonhosted.org/packages/da/5f/6b8f83a55bb8278772c5ae54a577f3099025f9ade59d0136ac24a0df4bde/charset_normalizer-3.4.4-cp314-cp314-win_arm64.whl", hash = "sha256:de00632ca48df9daf77a2c65a484531649261ec9f25489917f09e455cb09ddb2", size = 100743, upload-time = "2025-10-14T04:41:52.122Z" }, + { url = "https://files.pythonhosted.org/packages/0a/4c/925909008ed5a988ccbb72dcc897407e5d6d3bd72410d69e051fc0c14647/charset_normalizer-3.4.4-py3-none-any.whl", hash = "sha256:7a32c560861a02ff789ad905a2fe94e3f840803362c84fecf1851cb4cf3dc37f", size = 53402, upload-time = "2025-10-14T04:42:31.76Z" }, +] + +[[package]] +name = "click" +version = "8.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz", hash = "sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a", size = 295065, upload-time = "2025-11-15T20:45:42.706Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl", hash = "sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6", size = 108274, upload-time = "2025-11-15T20:45:41.139Z" }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + +[[package]] +name = "cryptography" +version = "46.0.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cffi", marker = "platform_python_implementation != 'PyPy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9f/33/c00162f49c0e2fe8064a62cb92b93e50c74a72bc370ab92f86112b33ff62/cryptography-46.0.3.tar.gz", hash = "sha256:a8b17438104fed022ce745b362294d9ce35b4c2e45c1d958ad4a4b019285f4a1", size = 749258, upload-time = "2025-10-15T23:18:31.74Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1d/42/9c391dd801d6cf0d561b5890549d4b27bafcc53b39c31a817e69d87c625b/cryptography-46.0.3-cp311-abi3-macosx_10_9_universal2.whl", hash = "sha256:109d4ddfadf17e8e7779c39f9b18111a09efb969a301a31e987416a0191ed93a", size = 7225004, upload-time = "2025-10-15T23:16:52.239Z" }, + { url = "https://files.pythonhosted.org/packages/1c/67/38769ca6b65f07461eb200e85fc1639b438bdc667be02cf7f2cd6a64601c/cryptography-46.0.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:09859af8466b69bc3c27bdf4f5d84a665e0f7ab5088412e9e2ec49758eca5cbc", size = 4296667, upload-time = "2025-10-15T23:16:54.369Z" }, + { url = "https://files.pythonhosted.org/packages/5c/49/498c86566a1d80e978b42f0d702795f69887005548c041636df6ae1ca64c/cryptography-46.0.3-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:01ca9ff2885f3acc98c29f1860552e37f6d7c7d013d7334ff2a9de43a449315d", size = 4450807, upload-time = "2025-10-15T23:16:56.414Z" }, + { url = "https://files.pythonhosted.org/packages/4b/0a/863a3604112174c8624a2ac3c038662d9e59970c7f926acdcfaed8d61142/cryptography-46.0.3-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:6eae65d4c3d33da080cff9c4ab1f711b15c1d9760809dad6ea763f3812d254cb", size = 4299615, upload-time = "2025-10-15T23:16:58.442Z" }, + { url = "https://files.pythonhosted.org/packages/64/02/b73a533f6b64a69f3cd3872acb6ebc12aef924d8d103133bb3ea750dc703/cryptography-46.0.3-cp311-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e5bf0ed4490068a2e72ac03d786693adeb909981cc596425d09032d372bcc849", size = 4016800, upload-time = "2025-10-15T23:17:00.378Z" }, + { url = "https://files.pythonhosted.org/packages/25/d5/16e41afbfa450cde85a3b7ec599bebefaef16b5c6ba4ec49a3532336ed72/cryptography-46.0.3-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:5ecfccd2329e37e9b7112a888e76d9feca2347f12f37918facbb893d7bb88ee8", size = 4984707, upload-time = "2025-10-15T23:17:01.98Z" }, + { url = "https://files.pythonhosted.org/packages/c9/56/e7e69b427c3878352c2fb9b450bd0e19ed552753491d39d7d0a2f5226d41/cryptography-46.0.3-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:a2c0cd47381a3229c403062f764160d57d4d175e022c1df84e168c6251a22eec", size = 4482541, upload-time = "2025-10-15T23:17:04.078Z" }, + { url = "https://files.pythonhosted.org/packages/78/f6/50736d40d97e8483172f1bb6e698895b92a223dba513b0ca6f06b2365339/cryptography-46.0.3-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:549e234ff32571b1f4076ac269fcce7a808d3bf98b76c8dd560e42dbc66d7d91", size = 4299464, upload-time = "2025-10-15T23:17:05.483Z" }, + { url = "https://files.pythonhosted.org/packages/00/de/d8e26b1a855f19d9994a19c702fa2e93b0456beccbcfe437eda00e0701f2/cryptography-46.0.3-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:c0a7bb1a68a5d3471880e264621346c48665b3bf1c3759d682fc0864c540bd9e", size = 4950838, upload-time = "2025-10-15T23:17:07.425Z" }, + { url = "https://files.pythonhosted.org/packages/8f/29/798fc4ec461a1c9e9f735f2fc58741b0daae30688f41b2497dcbc9ed1355/cryptography-46.0.3-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:10b01676fc208c3e6feeb25a8b83d81767e8059e1fe86e1dc62d10a3018fa926", size = 4481596, upload-time = "2025-10-15T23:17:09.343Z" }, + { url = "https://files.pythonhosted.org/packages/15/8d/03cd48b20a573adfff7652b76271078e3045b9f49387920e7f1f631d125e/cryptography-46.0.3-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:0abf1ffd6e57c67e92af68330d05760b7b7efb243aab8377e583284dbab72c71", size = 4426782, upload-time = "2025-10-15T23:17:11.22Z" }, + { url = "https://files.pythonhosted.org/packages/fa/b1/ebacbfe53317d55cf33165bda24c86523497a6881f339f9aae5c2e13e57b/cryptography-46.0.3-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a04bee9ab6a4da801eb9b51f1b708a1b5b5c9eb48c03f74198464c66f0d344ac", size = 4698381, upload-time = "2025-10-15T23:17:12.829Z" }, + { url = "https://files.pythonhosted.org/packages/96/92/8a6a9525893325fc057a01f654d7efc2c64b9de90413adcf605a85744ff4/cryptography-46.0.3-cp311-abi3-win32.whl", hash = "sha256:f260d0d41e9b4da1ed1e0f1ce571f97fe370b152ab18778e9e8f67d6af432018", size = 3055988, upload-time = "2025-10-15T23:17:14.65Z" }, + { url = "https://files.pythonhosted.org/packages/7e/bf/80fbf45253ea585a1e492a6a17efcb93467701fa79e71550a430c5e60df0/cryptography-46.0.3-cp311-abi3-win_amd64.whl", hash = "sha256:a9a3008438615669153eb86b26b61e09993921ebdd75385ddd748702c5adfddb", size = 3514451, upload-time = "2025-10-15T23:17:16.142Z" }, + { url = "https://files.pythonhosted.org/packages/2e/af/9b302da4c87b0beb9db4e756386a7c6c5b8003cd0e742277888d352ae91d/cryptography-46.0.3-cp311-abi3-win_arm64.whl", hash = "sha256:5d7f93296ee28f68447397bf5198428c9aeeab45705a55d53a6343455dcb2c3c", size = 2928007, upload-time = "2025-10-15T23:17:18.04Z" }, + { url = "https://files.pythonhosted.org/packages/f5/e2/a510aa736755bffa9d2f75029c229111a1d02f8ecd5de03078f4c18d91a3/cryptography-46.0.3-cp314-cp314t-macosx_10_9_universal2.whl", hash = "sha256:00a5e7e87938e5ff9ff5447ab086a5706a957137e6e433841e9d24f38a065217", size = 7158012, upload-time = "2025-10-15T23:17:19.982Z" }, + { url = "https://files.pythonhosted.org/packages/73/dc/9aa866fbdbb95b02e7f9d086f1fccfeebf8953509b87e3f28fff927ff8a0/cryptography-46.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c8daeb2d2174beb4575b77482320303f3d39b8e81153da4f0fb08eb5fe86a6c5", size = 4288728, upload-time = "2025-10-15T23:17:21.527Z" }, + { url = "https://files.pythonhosted.org/packages/c5/fd/bc1daf8230eaa075184cbbf5f8cd00ba9db4fd32d63fb83da4671b72ed8a/cryptography-46.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:39b6755623145ad5eff1dab323f4eae2a32a77a7abef2c5089a04a3d04366715", size = 4435078, upload-time = "2025-10-15T23:17:23.042Z" }, + { url = "https://files.pythonhosted.org/packages/82/98/d3bd5407ce4c60017f8ff9e63ffee4200ab3e23fe05b765cab805a7db008/cryptography-46.0.3-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:db391fa7c66df6762ee3f00c95a89e6d428f4d60e7abc8328f4fe155b5ac6e54", size = 4293460, upload-time = "2025-10-15T23:17:24.885Z" }, + { url = "https://files.pythonhosted.org/packages/26/e9/e23e7900983c2b8af7a08098db406cf989d7f09caea7897e347598d4cd5b/cryptography-46.0.3-cp314-cp314t-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:78a97cf6a8839a48c49271cdcbd5cf37ca2c1d6b7fdd86cc864f302b5e9bf459", size = 3995237, upload-time = "2025-10-15T23:17:26.449Z" }, + { url = "https://files.pythonhosted.org/packages/91/15/af68c509d4a138cfe299d0d7ddb14afba15233223ebd933b4bbdbc7155d3/cryptography-46.0.3-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:dfb781ff7eaa91a6f7fd41776ec37c5853c795d3b358d4896fdbb5df168af422", size = 4967344, upload-time = "2025-10-15T23:17:28.06Z" }, + { url = "https://files.pythonhosted.org/packages/ca/e3/8643d077c53868b681af077edf6b3cb58288b5423610f21c62aadcbe99f4/cryptography-46.0.3-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:6f61efb26e76c45c4a227835ddeae96d83624fb0d29eb5df5b96e14ed1a0afb7", size = 4466564, upload-time = "2025-10-15T23:17:29.665Z" }, + { url = "https://files.pythonhosted.org/packages/0e/43/c1e8726fa59c236ff477ff2b5dc071e54b21e5a1e51aa2cee1676f1c986f/cryptography-46.0.3-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:23b1a8f26e43f47ceb6d6a43115f33a5a37d57df4ea0ca295b780ae8546e8044", size = 4292415, upload-time = "2025-10-15T23:17:31.686Z" }, + { url = "https://files.pythonhosted.org/packages/42/f9/2f8fefdb1aee8a8e3256a0568cffc4e6d517b256a2fe97a029b3f1b9fe7e/cryptography-46.0.3-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:b419ae593c86b87014b9be7396b385491ad7f320bde96826d0dd174459e54665", size = 4931457, upload-time = "2025-10-15T23:17:33.478Z" }, + { url = "https://files.pythonhosted.org/packages/79/30/9b54127a9a778ccd6d27c3da7563e9f2d341826075ceab89ae3b41bf5be2/cryptography-46.0.3-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:50fc3343ac490c6b08c0cf0d704e881d0d660be923fd3076db3e932007e726e3", size = 4466074, upload-time = "2025-10-15T23:17:35.158Z" }, + { url = "https://files.pythonhosted.org/packages/ac/68/b4f4a10928e26c941b1b6a179143af9f4d27d88fe84a6a3c53592d2e76bf/cryptography-46.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:22d7e97932f511d6b0b04f2bfd818d73dcd5928db509460aaf48384778eb6d20", size = 4420569, upload-time = "2025-10-15T23:17:37.188Z" }, + { url = "https://files.pythonhosted.org/packages/a3/49/3746dab4c0d1979888f125226357d3262a6dd40e114ac29e3d2abdf1ec55/cryptography-46.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:d55f3dffadd674514ad19451161118fd010988540cee43d8bc20675e775925de", size = 4681941, upload-time = "2025-10-15T23:17:39.236Z" }, + { url = "https://files.pythonhosted.org/packages/fd/30/27654c1dbaf7e4a3531fa1fc77986d04aefa4d6d78259a62c9dc13d7ad36/cryptography-46.0.3-cp314-cp314t-win32.whl", hash = "sha256:8a6e050cb6164d3f830453754094c086ff2d0b2f3a897a1d9820f6139a1f0914", size = 3022339, upload-time = "2025-10-15T23:17:40.888Z" }, + { url = "https://files.pythonhosted.org/packages/f6/30/640f34ccd4d2a1bc88367b54b926b781b5a018d65f404d409aba76a84b1c/cryptography-46.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:760f83faa07f8b64e9c33fc963d790a2edb24efb479e3520c14a45741cd9b2db", size = 3494315, upload-time = "2025-10-15T23:17:42.769Z" }, + { url = "https://files.pythonhosted.org/packages/ba/8b/88cc7e3bd0a8e7b861f26981f7b820e1f46aa9d26cc482d0feba0ecb4919/cryptography-46.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:516ea134e703e9fe26bcd1277a4b59ad30586ea90c365a87781d7887a646fe21", size = 2919331, upload-time = "2025-10-15T23:17:44.468Z" }, + { url = "https://files.pythonhosted.org/packages/fd/23/45fe7f376a7df8daf6da3556603b36f53475a99ce4faacb6ba2cf3d82021/cryptography-46.0.3-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:cb3d760a6117f621261d662bccc8ef5bc32ca673e037c83fbe565324f5c46936", size = 7218248, upload-time = "2025-10-15T23:17:46.294Z" }, + { url = "https://files.pythonhosted.org/packages/27/32/b68d27471372737054cbd34c84981f9edbc24fe67ca225d389799614e27f/cryptography-46.0.3-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:4b7387121ac7d15e550f5cb4a43aef2559ed759c35df7336c402bb8275ac9683", size = 4294089, upload-time = "2025-10-15T23:17:48.269Z" }, + { url = "https://files.pythonhosted.org/packages/26/42/fa8389d4478368743e24e61eea78846a0006caffaf72ea24a15159215a14/cryptography-46.0.3-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:15ab9b093e8f09daab0f2159bb7e47532596075139dd74365da52ecc9cb46c5d", size = 4440029, upload-time = "2025-10-15T23:17:49.837Z" }, + { url = "https://files.pythonhosted.org/packages/5f/eb/f483db0ec5ac040824f269e93dd2bd8a21ecd1027e77ad7bdf6914f2fd80/cryptography-46.0.3-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:46acf53b40ea38f9c6c229599a4a13f0d46a6c3fa9ef19fc1a124d62e338dfa0", size = 4297222, upload-time = "2025-10-15T23:17:51.357Z" }, + { url = "https://files.pythonhosted.org/packages/fd/cf/da9502c4e1912cb1da3807ea3618a6829bee8207456fbbeebc361ec38ba3/cryptography-46.0.3-cp38-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:10ca84c4668d066a9878890047f03546f3ae0a6b8b39b697457b7757aaf18dbc", size = 4012280, upload-time = "2025-10-15T23:17:52.964Z" }, + { url = "https://files.pythonhosted.org/packages/6b/8f/9adb86b93330e0df8b3dcf03eae67c33ba89958fc2e03862ef1ac2b42465/cryptography-46.0.3-cp38-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:36e627112085bb3b81b19fed209c05ce2a52ee8b15d161b7c643a7d5a88491f3", size = 4978958, upload-time = "2025-10-15T23:17:54.965Z" }, + { url = "https://files.pythonhosted.org/packages/d1/a0/5fa77988289c34bdb9f913f5606ecc9ada1adb5ae870bd0d1054a7021cc4/cryptography-46.0.3-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:1000713389b75c449a6e979ffc7dcc8ac90b437048766cef052d4d30b8220971", size = 4473714, upload-time = "2025-10-15T23:17:56.754Z" }, + { url = "https://files.pythonhosted.org/packages/14/e5/fc82d72a58d41c393697aa18c9abe5ae1214ff6f2a5c18ac470f92777895/cryptography-46.0.3-cp38-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:b02cf04496f6576afffef5ddd04a0cb7d49cf6be16a9059d793a30b035f6b6ac", size = 4296970, upload-time = "2025-10-15T23:17:58.588Z" }, + { url = "https://files.pythonhosted.org/packages/78/06/5663ed35438d0b09056973994f1aec467492b33bd31da36e468b01ec1097/cryptography-46.0.3-cp38-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:71e842ec9bc7abf543b47cf86b9a743baa95f4677d22baa4c7d5c69e49e9bc04", size = 4940236, upload-time = "2025-10-15T23:18:00.897Z" }, + { url = "https://files.pythonhosted.org/packages/fc/59/873633f3f2dcd8a053b8dd1d38f783043b5fce589c0f6988bf55ef57e43e/cryptography-46.0.3-cp38-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:402b58fc32614f00980b66d6e56a5b4118e6cb362ae8f3fda141ba4689bd4506", size = 4472642, upload-time = "2025-10-15T23:18:02.749Z" }, + { url = "https://files.pythonhosted.org/packages/3d/39/8e71f3930e40f6877737d6f69248cf74d4e34b886a3967d32f919cc50d3b/cryptography-46.0.3-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ef639cb3372f69ec44915fafcd6698b6cc78fbe0c2ea41be867f6ed612811963", size = 4423126, upload-time = "2025-10-15T23:18:04.85Z" }, + { url = "https://files.pythonhosted.org/packages/cd/c7/f65027c2810e14c3e7268353b1681932b87e5a48e65505d8cc17c99e36ae/cryptography-46.0.3-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:3b51b8ca4f1c6453d8829e1eb7299499ca7f313900dd4d89a24b8b87c0a780d4", size = 4686573, upload-time = "2025-10-15T23:18:06.908Z" }, + { url = "https://files.pythonhosted.org/packages/0a/6e/1c8331ddf91ca4730ab3086a0f1be19c65510a33b5a441cb334e7a2d2560/cryptography-46.0.3-cp38-abi3-win32.whl", hash = "sha256:6276eb85ef938dc035d59b87c8a7dc559a232f954962520137529d77b18ff1df", size = 3036695, upload-time = "2025-10-15T23:18:08.672Z" }, + { url = "https://files.pythonhosted.org/packages/90/45/b0d691df20633eff80955a0fc7695ff9051ffce8b69741444bd9ed7bd0db/cryptography-46.0.3-cp38-abi3-win_amd64.whl", hash = "sha256:416260257577718c05135c55958b674000baef9a1c7d9e8f306ec60d71db850f", size = 3501720, upload-time = "2025-10-15T23:18:10.632Z" }, + { url = "https://files.pythonhosted.org/packages/e8/cb/2da4cc83f5edb9c3257d09e1e7ab7b23f049c7962cae8d842bbef0a9cec9/cryptography-46.0.3-cp38-abi3-win_arm64.whl", hash = "sha256:d89c3468de4cdc4f08a57e214384d0471911a3830fcdaf7a8cc587e42a866372", size = 2918740, upload-time = "2025-10-15T23:18:12.277Z" }, + { url = "https://files.pythonhosted.org/packages/06/8a/e60e46adab4362a682cf142c7dcb5bf79b782ab2199b0dcb81f55970807f/cryptography-46.0.3-pp311-pypy311_pp73-macosx_10_9_x86_64.whl", hash = "sha256:7ce938a99998ed3c8aa7e7272dca1a610401ede816d36d0693907d863b10d9ea", size = 3698132, upload-time = "2025-10-15T23:18:17.056Z" }, + { url = "https://files.pythonhosted.org/packages/da/38/f59940ec4ee91e93d3311f7532671a5cef5570eb04a144bf203b58552d11/cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:191bb60a7be5e6f54e30ba16fdfae78ad3a342a0599eb4193ba88e3f3d6e185b", size = 4243992, upload-time = "2025-10-15T23:18:18.695Z" }, + { url = "https://files.pythonhosted.org/packages/b0/0c/35b3d92ddebfdfda76bb485738306545817253d0a3ded0bfe80ef8e67aa5/cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c70cc23f12726be8f8bc72e41d5065d77e4515efae3690326764ea1b07845cfb", size = 4409944, upload-time = "2025-10-15T23:18:20.597Z" }, + { url = "https://files.pythonhosted.org/packages/99/55/181022996c4063fc0e7666a47049a1ca705abb9c8a13830f074edb347495/cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:9394673a9f4de09e28b5356e7fff97d778f8abad85c9d5ac4a4b7e25a0de7717", size = 4242957, upload-time = "2025-10-15T23:18:22.18Z" }, + { url = "https://files.pythonhosted.org/packages/ba/af/72cd6ef29f9c5f731251acadaeb821559fe25f10852f44a63374c9ca08c1/cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:94cd0549accc38d1494e1f8de71eca837d0509d0d44bf11d158524b0e12cebf9", size = 4409447, upload-time = "2025-10-15T23:18:24.209Z" }, + { url = "https://files.pythonhosted.org/packages/0d/c3/e90f4a4feae6410f914f8ebac129b9ae7a8c92eb60a638012dde42030a9d/cryptography-46.0.3-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:6b5063083824e5509fdba180721d55909ffacccc8adbec85268b48439423d78c", size = 3438528, upload-time = "2025-10-15T23:18:26.227Z" }, +] + +[[package]] +name = "dataclasses-json" +version = "0.6.7" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "marshmallow" }, + { name = "typing-inspect" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/64/a4/f71d9cf3a5ac257c993b5ca3f93df5f7fb395c725e7f1e6479d2514173c3/dataclasses_json-0.6.7.tar.gz", hash = "sha256:b6b3e528266ea45b9535223bc53ca645f5208833c29229e847b3f26a1cc55fc0", size = 32227, upload-time = "2024-06-09T16:20:19.103Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c3/be/d0d44e092656fe7a06b55e6103cbce807cdbdee17884a5367c68c9860853/dataclasses_json-0.6.7-py3-none-any.whl", hash = "sha256:0dbf33f26c8d5305befd61b39d2b3414e8a407bedc2834dea9b8d642666fb40a", size = 28686, upload-time = "2024-06-09T16:20:16.715Z" }, +] + +[[package]] +name = "decorator" +version = "5.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/43/fa/6d96a0978d19e17b68d634497769987b16c8f4cd0a7a05048bec693caa6b/decorator-5.2.1.tar.gz", hash = "sha256:65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360", size = 56711, upload-time = "2025-02-24T04:41:34.073Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4e/8c/f3147f5c4b73e7550fe5f9352eaa956ae838d5c51eb58e7a25b9f3e2643b/decorator-5.2.1-py3-none-any.whl", hash = "sha256:d316bb415a2d9e2d2b3abcc4084c6502fc09240e292cd76a76afc106a1c8e04a", size = 9190, upload-time = "2025-02-24T04:41:32.565Z" }, +] + +[[package]] +name = "defusedxml" +version = "0.7.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz", hash = "sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69", size = 75520, upload-time = "2021-03-08T10:59:26.269Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/07/6c/aa3f2f849e01cb6a001cd8554a88d4c77c5c1a31c95bdf1cf9301e6d9ef4/defusedxml-0.7.1-py2.py3-none-any.whl", hash = "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61", size = 25604, upload-time = "2021-03-08T10:59:24.45Z" }, +] + +[[package]] +name = "distlib" +version = "0.4.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz", hash = "sha256:feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d", size = 614605, upload-time = "2025-07-17T16:52:00.465Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/33/6b/e0547afaf41bf2c42e52430072fa5658766e3d65bd4b03a563d1b6336f57/distlib-0.4.0-py2.py3-none-any.whl", hash = "sha256:9659f7d87e46584a30b5780e43ac7a2143098441670ff0a49d5f9034c54a6c16", size = 469047, upload-time = "2025-07-17T16:51:58.613Z" }, +] + +[[package]] +name = "distro" +version = "1.9.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed", size = 60722, upload-time = "2023-12-24T09:54:32.31Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/12/b3/231ffd4ab1fc9d679809f356cebee130ac7daa00d6d6f3206dd4fd137e9e/distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2", size = 20277, upload-time = "2023-12-24T09:54:30.421Z" }, +] + +[[package]] +name = "docopt" +version = "0.6.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz", hash = "sha256:49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491", size = 25901, upload-time = "2014-06-16T11:18:57.406Z" } + +[[package]] +name = "docstring-parser" +version = "0.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b2/9d/c3b43da9515bd270df0f80548d9944e389870713cc1fe2b8fb35fe2bcefd/docstring_parser-0.17.0.tar.gz", hash = "sha256:583de4a309722b3315439bb31d64ba3eebada841f2e2cee23b99df001434c912", size = 27442, upload-time = "2025-07-21T07:35:01.868Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/55/e2/2537ebcff11c1ee1ff17d8d0b6f4db75873e3b0fb32c2d4a2ee31ecb310a/docstring_parser-0.17.0-py3-none-any.whl", hash = "sha256:cf2569abd23dce8099b300f9b4fa8191e9582dda731fd533daf54c4551658708", size = 36896, upload-time = "2025-07-21T07:35:00.684Z" }, +] + +[[package]] +name = "emoji" +version = "2.15.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a2/78/0d2db9382c92a163d7095fc08efff7800880f830a152cfced40161e7638d/emoji-2.15.0.tar.gz", hash = "sha256:eae4ab7d86456a70a00a985125a03263a5eac54cd55e51d7e184b1ed3b6757e4", size = 615483, upload-time = "2025-09-21T12:13:02.755Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e1/5e/4b5aaaabddfacfe36ba7768817bd1f71a7a810a43705e531f3ae4c690767/emoji-2.15.0-py3-none-any.whl", hash = "sha256:205296793d66a89d88af4688fa57fd6496732eb48917a87175a023c8138995eb", size = 608433, upload-time = "2025-09-21T12:13:01.197Z" }, +] + +[[package]] +name = "executing" +version = "2.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/cc/28/c14e053b6762b1044f34a13aab6859bbf40456d37d23aa286ac24cfd9a5d/executing-2.2.1.tar.gz", hash = "sha256:3632cc370565f6648cc328b32435bd120a1e4ebb20c77e3fdde9a13cd1e533c4", size = 1129488, upload-time = "2025-09-01T09:48:10.866Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c1/ea/53f2148663b321f21b5a606bd5f191517cf40b7072c0497d3c92c4a13b1e/executing-2.2.1-py2.py3-none-any.whl", hash = "sha256:760643d3452b4d777d295bb167ccc74c64a81df23fb5e08eff250c425a4b2017", size = 28317, upload-time = "2025-09-01T09:48:08.5Z" }, +] + +[[package]] +name = "fastjsonschema" +version = "2.21.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/20/b5/23b216d9d985a956623b6bd12d4086b60f0059b27799f23016af04a74ea1/fastjsonschema-2.21.2.tar.gz", hash = "sha256:b1eb43748041c880796cd077f1a07c3d94e93ae84bba5ed36800a33554ae05de", size = 374130, upload-time = "2025-08-14T18:49:36.666Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/a8/20d0723294217e47de6d9e2e40fd4a9d2f7c4b6ef974babd482a59743694/fastjsonschema-2.21.2-py3-none-any.whl", hash = "sha256:1c797122d0a86c5cace2e54bf4e819c36223b552017172f32c5c024a6b77e463", size = 24024, upload-time = "2025-08-14T18:49:34.776Z" }, +] + +[[package]] +name = "filelock" +version = "3.20.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a7/23/ce7a1126827cedeb958fc043d61745754464eb56c5937c35bbf2b8e26f34/filelock-3.20.1.tar.gz", hash = "sha256:b8360948b351b80f420878d8516519a2204b07aefcdcfd24912a5d33127f188c", size = 19476, upload-time = "2025-12-15T23:54:28.027Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e3/7f/a1a97644e39e7316d850784c642093c99df1290a460df4ede27659056834/filelock-3.20.1-py3-none-any.whl", hash = "sha256:15d9e9a67306188a44baa72f569d2bfd803076269365fdea0934385da4dc361a", size = 16666, upload-time = "2025-12-15T23:54:26.874Z" }, +] + +[[package]] +name = "filetype" +version = "1.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/bb/29/745f7d30d47fe0f251d3ad3dc2978a23141917661998763bebb6da007eb1/filetype-1.2.0.tar.gz", hash = "sha256:66b56cd6474bf41d8c54660347d37afcc3f7d1970648de365c102ef77548aadb", size = 998020, upload-time = "2022-11-02T17:34:04.141Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/18/79/1b8fa1bb3568781e84c9200f951c735f3f157429f44be0495da55894d620/filetype-1.2.0-py2.py3-none-any.whl", hash = "sha256:7ce71b6880181241cf7ac8697a2f1eb6a8bd9b429f7ad6d27b8db9ba5f1c2d25", size = 19970, upload-time = "2022-11-02T17:34:01.425Z" }, +] + +[[package]] +name = "flask" +version = "3.1.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "blinker" }, + { name = "click" }, + { name = "itsdangerous" }, + { name = "jinja2" }, + { name = "markupsafe" }, + { name = "werkzeug" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/dc/6d/cfe3c0fcc5e477df242b98bfe186a4c34357b4847e87ecaef04507332dab/flask-3.1.2.tar.gz", hash = "sha256:bf656c15c80190ed628ad08cdfd3aaa35beb087855e2f494910aa3774cc4fd87", size = 720160, upload-time = "2025-08-19T21:03:21.205Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ec/f9/7f9263c5695f4bd0023734af91bedb2ff8209e8de6ead162f35d8dc762fd/flask-3.1.2-py3-none-any.whl", hash = "sha256:ca1d8112ec8a6158cc29ea4858963350011b5c846a414cdb7a954aa9e967d03c", size = 103308, upload-time = "2025-08-19T21:03:19.499Z" }, +] + +[[package]] +name = "flask-cors" +version = "6.0.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "flask" }, + { name = "werkzeug" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/70/74/0fc0fa68d62f21daef41017dafab19ef4b36551521260987eb3a5394c7ba/flask_cors-6.0.2.tar.gz", hash = "sha256:6e118f3698249ae33e429760db98ce032a8bf9913638d085ca0f4c5534ad2423", size = 13472, upload-time = "2025-12-12T20:31:42.861Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4f/af/72ad54402e599152de6d067324c46fe6a4f531c7c65baf7e96c63db55eaf/flask_cors-6.0.2-py3-none-any.whl", hash = "sha256:e57544d415dfd7da89a9564e1e3a9e515042df76e12130641ca6f3f2f03b699a", size = 13257, upload-time = "2025-12-12T20:31:41.3Z" }, +] + +[[package]] +name = "fsspec" +version = "2025.12.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b6/27/954057b0d1f53f086f681755207dda6de6c660ce133c829158e8e8fe7895/fsspec-2025.12.0.tar.gz", hash = "sha256:c505de011584597b1060ff778bb664c1bc022e87921b0e4f10cc9c44f9635973", size = 309748, upload-time = "2025-12-03T15:23:42.687Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/51/c7/b64cae5dba3a1b138d7123ec36bb5ccd39d39939f18454407e5468f4763f/fsspec-2025.12.0-py3-none-any.whl", hash = "sha256:8bf1fe301b7d8acfa6e8571e3b1c3d158f909666642431cc78a1b7b4dbc5ec5b", size = 201422, upload-time = "2025-12-03T15:23:41.434Z" }, +] + +[[package]] +name = "h11" +version = "0.16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" }, +] + +[[package]] +name = "hf-xet" +version = "1.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5e/6e/0f11bacf08a67f7fb5ee09740f2ca54163863b07b70d579356e9222ce5d8/hf_xet-1.2.0.tar.gz", hash = "sha256:a8c27070ca547293b6890c4bf389f713f80e8c478631432962bb7f4bc0bd7d7f", size = 506020, upload-time = "2025-10-24T19:04:32.129Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9e/a5/85ef910a0aa034a2abcfadc360ab5ac6f6bc4e9112349bd40ca97551cff0/hf_xet-1.2.0-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:ceeefcd1b7aed4956ae8499e2199607765fbd1c60510752003b6cc0b8413b649", size = 2861870, upload-time = "2025-10-24T19:04:11.422Z" }, + { url = "https://files.pythonhosted.org/packages/ea/40/e2e0a7eb9a51fe8828ba2d47fe22a7e74914ea8a0db68a18c3aa7449c767/hf_xet-1.2.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:b70218dd548e9840224df5638fdc94bd033552963cfa97f9170829381179c813", size = 2717584, upload-time = "2025-10-24T19:04:09.586Z" }, + { url = "https://files.pythonhosted.org/packages/a5/7d/daf7f8bc4594fdd59a8a596f9e3886133fdc68e675292218a5e4c1b7e834/hf_xet-1.2.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d40b18769bb9a8bc82a9ede575ce1a44c75eb80e7375a01d76259089529b5dc", size = 3315004, upload-time = "2025-10-24T19:04:00.314Z" }, + { url = "https://files.pythonhosted.org/packages/b1/ba/45ea2f605fbf6d81c8b21e4d970b168b18a53515923010c312c06cd83164/hf_xet-1.2.0-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:cd3a6027d59cfb60177c12d6424e31f4b5ff13d8e3a1247b3a584bf8977e6df5", size = 3222636, upload-time = "2025-10-24T19:03:58.111Z" }, + { url = "https://files.pythonhosted.org/packages/4a/1d/04513e3cab8f29ab8c109d309ddd21a2705afab9d52f2ba1151e0c14f086/hf_xet-1.2.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6de1fc44f58f6dd937956c8d304d8c2dea264c80680bcfa61ca4a15e7b76780f", size = 3408448, upload-time = "2025-10-24T19:04:20.951Z" }, + { url = "https://files.pythonhosted.org/packages/f0/7c/60a2756d7feec7387db3a1176c632357632fbe7849fce576c5559d4520c7/hf_xet-1.2.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:f182f264ed2acd566c514e45da9f2119110e48a87a327ca271027904c70c5832", size = 3503401, upload-time = "2025-10-24T19:04:22.549Z" }, + { url = "https://files.pythonhosted.org/packages/4e/64/48fffbd67fb418ab07451e4ce641a70de1c40c10a13e25325e24858ebe5a/hf_xet-1.2.0-cp313-cp313t-win_amd64.whl", hash = "sha256:293a7a3787e5c95d7be1857358a9130694a9c6021de3f27fa233f37267174382", size = 2900866, upload-time = "2025-10-24T19:04:33.461Z" }, + { url = "https://files.pythonhosted.org/packages/e2/51/f7e2caae42f80af886db414d4e9885fac959330509089f97cccb339c6b87/hf_xet-1.2.0-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:10bfab528b968c70e062607f663e21e34e2bba349e8038db546646875495179e", size = 2861861, upload-time = "2025-10-24T19:04:19.01Z" }, + { url = "https://files.pythonhosted.org/packages/6e/1d/a641a88b69994f9371bd347f1dd35e5d1e2e2460a2e350c8d5165fc62005/hf_xet-1.2.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2a212e842647b02eb6a911187dc878e79c4aa0aa397e88dd3b26761676e8c1f8", size = 2717699, upload-time = "2025-10-24T19:04:17.306Z" }, + { url = "https://files.pythonhosted.org/packages/df/e0/e5e9bba7d15f0318955f7ec3f4af13f92e773fbb368c0b8008a5acbcb12f/hf_xet-1.2.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:30e06daccb3a7d4c065f34fc26c14c74f4653069bb2b194e7f18f17cbe9939c0", size = 3314885, upload-time = "2025-10-24T19:04:07.642Z" }, + { url = "https://files.pythonhosted.org/packages/21/90/b7fe5ff6f2b7b8cbdf1bd56145f863c90a5807d9758a549bf3d916aa4dec/hf_xet-1.2.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:29c8fc913a529ec0a91867ce3d119ac1aac966e098cf49501800c870328cc090", size = 3221550, upload-time = "2025-10-24T19:04:05.55Z" }, + { url = "https://files.pythonhosted.org/packages/6f/cb/73f276f0a7ce46cc6a6ec7d6c7d61cbfe5f2e107123d9bbd0193c355f106/hf_xet-1.2.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e159cbfcfbb29f920db2c09ed8b660eb894640d284f102ada929b6e3dc410a", size = 3408010, upload-time = "2025-10-24T19:04:28.598Z" }, + { url = "https://files.pythonhosted.org/packages/b8/1e/d642a12caa78171f4be64f7cd9c40e3ca5279d055d0873188a58c0f5fbb9/hf_xet-1.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:9c91d5ae931510107f148874e9e2de8a16052b6f1b3ca3c1b12f15ccb491390f", size = 3503264, upload-time = "2025-10-24T19:04:30.397Z" }, + { url = "https://files.pythonhosted.org/packages/17/b5/33764714923fa1ff922770f7ed18c2daae034d21ae6e10dbf4347c854154/hf_xet-1.2.0-cp314-cp314t-win_amd64.whl", hash = "sha256:210d577732b519ac6ede149d2f2f34049d44e8622bf14eb3d63bbcd2d4b332dc", size = 2901071, upload-time = "2025-10-24T19:04:37.463Z" }, + { url = "https://files.pythonhosted.org/packages/96/2d/22338486473df5923a9ab7107d375dbef9173c338ebef5098ef593d2b560/hf_xet-1.2.0-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:46740d4ac024a7ca9b22bebf77460ff43332868b661186a8e46c227fdae01848", size = 2866099, upload-time = "2025-10-24T19:04:15.366Z" }, + { url = "https://files.pythonhosted.org/packages/7f/8c/c5becfa53234299bc2210ba314eaaae36c2875e0045809b82e40a9544f0c/hf_xet-1.2.0-cp37-abi3-macosx_11_0_arm64.whl", hash = "sha256:27df617a076420d8845bea087f59303da8be17ed7ec0cd7ee3b9b9f579dff0e4", size = 2722178, upload-time = "2025-10-24T19:04:13.695Z" }, + { url = "https://files.pythonhosted.org/packages/9a/92/cf3ab0b652b082e66876d08da57fcc6fa2f0e6c70dfbbafbd470bb73eb47/hf_xet-1.2.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3651fd5bfe0281951b988c0facbe726aa5e347b103a675f49a3fa8144c7968fd", size = 3320214, upload-time = "2025-10-24T19:04:03.596Z" }, + { url = "https://files.pythonhosted.org/packages/46/92/3f7ec4a1b6a65bf45b059b6d4a5d38988f63e193056de2f420137e3c3244/hf_xet-1.2.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:d06fa97c8562fb3ee7a378dd9b51e343bc5bc8190254202c9771029152f5e08c", size = 3229054, upload-time = "2025-10-24T19:04:01.949Z" }, + { url = "https://files.pythonhosted.org/packages/0b/dd/7ac658d54b9fb7999a0ccb07ad863b413cbaf5cf172f48ebcd9497ec7263/hf_xet-1.2.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:4c1428c9ae73ec0939410ec73023c4f842927f39db09b063b9482dac5a3bb737", size = 3413812, upload-time = "2025-10-24T19:04:24.585Z" }, + { url = "https://files.pythonhosted.org/packages/92/68/89ac4e5b12a9ff6286a12174c8538a5930e2ed662091dd2572bbe0a18c8a/hf_xet-1.2.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a55558084c16b09b5ed32ab9ed38421e2d87cf3f1f89815764d1177081b99865", size = 3508920, upload-time = "2025-10-24T19:04:26.927Z" }, + { url = "https://files.pythonhosted.org/packages/cb/44/870d44b30e1dcfb6a65932e3e1506c103a8a5aea9103c337e7a53180322c/hf_xet-1.2.0-cp37-abi3-win_amd64.whl", hash = "sha256:e6584a52253f72c9f52f9e549d5895ca7a471608495c4ecaa6cc73dba2b24d69", size = 2905735, upload-time = "2025-10-24T19:04:35.928Z" }, +] + +[[package]] +name = "httpcore" +version = "1.0.9" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "certifi" }, + { name = "h11" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8", size = 85484, upload-time = "2025-04-24T22:06:22.219Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", size = 78784, upload-time = "2025-04-24T22:06:20.566Z" }, +] + +[[package]] +name = "httpx" +version = "0.28.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "certifi" }, + { name = "httpcore" }, + { name = "idna" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc", size = 141406, upload-time = "2024-12-06T15:37:23.222Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517, upload-time = "2024-12-06T15:37:21.509Z" }, +] + +[[package]] +name = "httpx-sse" +version = "0.4.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0f/4c/751061ffa58615a32c31b2d82e8482be8dd4a89154f003147acee90f2be9/httpx_sse-0.4.3.tar.gz", hash = "sha256:9b1ed0127459a66014aec3c56bebd93da3c1bc8bb6618c8082039a44889a755d", size = 15943, upload-time = "2025-10-10T21:48:22.271Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d2/fd/6668e5aec43ab844de6fc74927e155a3b37bf40d7c3790e49fc0406b6578/httpx_sse-0.4.3-py3-none-any.whl", hash = "sha256:0ac1c9fe3c0afad2e0ebb25a934a59f4c7823b60792691f779fad2c5568830fc", size = 8960, upload-time = "2025-10-10T21:48:21.158Z" }, +] + +[[package]] +name = "huggingface-hub" +version = "0.36.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "filelock" }, + { name = "fsspec" }, + { name = "hf-xet", marker = "platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'arm64' or platform_machine == 'x86_64'" }, + { name = "packaging" }, + { name = "pyyaml" }, + { name = "requests" }, + { name = "tqdm" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/98/63/4910c5fa9128fdadf6a9c5ac138e8b1b6cee4ca44bf7915bbfbce4e355ee/huggingface_hub-0.36.0.tar.gz", hash = "sha256:47b3f0e2539c39bf5cde015d63b72ec49baff67b6931c3d97f3f84532e2b8d25", size = 463358, upload-time = "2025-10-23T12:12:01.413Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/bd/1a875e0d592d447cbc02805fd3fe0f497714d6a2583f59d14fa9ebad96eb/huggingface_hub-0.36.0-py3-none-any.whl", hash = "sha256:7bcc9ad17d5b3f07b57c78e79d527102d08313caa278a641993acddcb894548d", size = 566094, upload-time = "2025-10-23T12:11:59.557Z" }, +] + +[[package]] +name = "identify" +version = "2.6.15" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ff/e7/685de97986c916a6d93b3876139e00eef26ad5bbbd61925d670ae8013449/identify-2.6.15.tar.gz", hash = "sha256:e4f4864b96c6557ef2a1e1c951771838f4edc9df3a72ec7118b338801b11c7bf", size = 99311, upload-time = "2025-10-02T17:43:40.631Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0f/1c/e5fd8f973d4f375adb21565739498e2e9a1e54c858a97b9a8ccfdc81da9b/identify-2.6.15-py2.py3-none-any.whl", hash = "sha256:1181ef7608e00704db228516541eb83a88a9f94433a8c80bb9b5bd54b1d81757", size = 99183, upload-time = "2025-10-02T17:43:39.137Z" }, +] + +[[package]] +name = "idna" +version = "3.11" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902", size = 194582, upload-time = "2025-10-12T14:55:20.501Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0e/61/66938bbb5fc52dbdf84594873d5b51fb1f7c7794e9c0f5bd885f30bc507b/idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", size = 71008, upload-time = "2025-10-12T14:55:18.883Z" }, +] + +[[package]] +name = "igraph" +version = "0.11.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "texttable" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/5f/a0/1f70c34a96dcb0acf428319e83655e92ab2955d73a33f711852a5fb79681/igraph-0.11.6.tar.gz", hash = "sha256:837f233256c3319f2a35a6a80d94eafe47b43791ef4c6f9e9871061341ac8e28", size = 4559252, upload-time = "2024-07-08T23:38:32.722Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a9/f5/2de2ff541a014c3387c0c570a91e51b80643d9a2a3e0dec8030bcec3083d/igraph-0.11.6-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:8aabef03d787b519d1075dfc0da4a1109fb113b941334883e3e7947ac30a459e", size = 1945799, upload-time = "2024-07-08T23:37:32.692Z" }, + { url = "https://files.pythonhosted.org/packages/e4/3b/5cf3b131d433dea61608ea2c27bebf74de9cc7a50ced0b26311d6288294e/igraph-0.11.6-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:1f2cc4a518d99cdf6cae514f85e93e56852bc8c325b3abb96037d1d690b5975f", size = 1751328, upload-time = "2024-07-08T23:37:34.415Z" }, + { url = "https://files.pythonhosted.org/packages/fc/71/71cd93c1b26e6051ef5dfad94333690188e663942e54bea6bbfff79d2dbe/igraph-0.11.6-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c1e859238be52ab8ccc614d18f9362942bc88ce543afc12548f81ae99b10801d", size = 2974608, upload-time = "2024-07-08T23:37:36.076Z" }, + { url = "https://files.pythonhosted.org/packages/19/ec/02e596595776367f5fd07c65a56ff1593680273f935c481975fe6a55e67f/igraph-0.11.6-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d61fbe5e85eb4ae9efe08c461f9bdeedb02a2b5739fbc223d324a71f40a28be2", size = 3054685, upload-time = "2024-07-08T23:37:38.121Z" }, + { url = "https://files.pythonhosted.org/packages/02/f2/70849b7ff0fbfd3e7c964ac737ea973d0121d30a32a18894df6d0843bd0c/igraph-0.11.6-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b6620ba39df29fd42151becf82309b54e57148233c9c3ef890eed62e25eed8a5", size = 3134936, upload-time = "2024-07-08T23:37:40.497Z" }, + { url = "https://files.pythonhosted.org/packages/ef/49/579f3a5daea1a672f05c95ead488e779f1479a8efb78715c1508f7dae58a/igraph-0.11.6-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:59666589bb3d07f310cda2c5106a8adeeb77c2ef27fecf1c6438b6091f4ca69d", size = 3887705, upload-time = "2024-07-08T23:37:42.914Z" }, + { url = "https://files.pythonhosted.org/packages/ef/d2/66203ba13f90ea77f541c0f5b5ae095a7ced0a564486f576e5adce0d0bd7/igraph-0.11.6-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:8750b6d6caebf199cf7dc41c931f58e330153779707391e30f0a29f02666fb6e", size = 4158876, upload-time = "2024-07-08T23:37:45.708Z" }, + { url = "https://files.pythonhosted.org/packages/53/e7/3fbe83625efb1dd5f387a9da9ec0ac779a2dc42e6db0ac7eb54c44943b2f/igraph-0.11.6-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:967d6f2c30fe94317da15e459374d0fb8ca3e56020412f201ecd07dd5b5352f2", size = 4050715, upload-time = "2024-07-08T23:37:48.478Z" }, + { url = "https://files.pythonhosted.org/packages/ab/91/2535aa81a1de36f5b21df129b3434a18710d31ea56efbf0ec6e1f1958fda/igraph-0.11.6-cp39-abi3-win32.whl", hash = "sha256:9744f95a67319eb6cb487ceabf30f5d7940de34bada51f0ba63adbd23e0f94ad", size = 1589990, upload-time = "2024-07-08T23:37:50.825Z" }, + { url = "https://files.pythonhosted.org/packages/08/4a/e781867fa2fb41d823a8f1978ac464aef3d78bb73c6f40589a74cc47bf42/igraph-0.11.6-cp39-abi3-win_amd64.whl", hash = "sha256:b80e69eb11faa9c57330a9ffebdde5808966efe1c1f638d4d4827ea04df7aca8", size = 1965492, upload-time = "2024-07-08T23:37:53.203Z" }, +] + +[[package]] +name = "iniconfig" +version = "2.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" }, +] + +[[package]] +name = "ipython" +version = "8.12.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "appnope", marker = "sys_platform == 'darwin'" }, + { name = "backcall" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "decorator" }, + { name = "jedi" }, + { name = "matplotlib-inline" }, + { name = "pexpect", marker = "sys_platform != 'win32'" }, + { name = "pickleshare" }, + { name = "prompt-toolkit" }, + { name = "pygments" }, + { name = "stack-data" }, + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9e/6a/44ef299b1762f5a73841e87fae8a73a8cc8aee538d6dc8c77a5afe1fd2ce/ipython-8.12.3.tar.gz", hash = "sha256:3910c4b54543c2ad73d06579aa771041b7d5707b033bd488669b4cf544e3b363", size = 5470171, upload-time = "2023-09-29T09:14:37.468Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8d/97/8fe103906cd81bc42d3b0175b5534a9f67dccae47d6451131cf8d0d70bb2/ipython-8.12.3-py3-none-any.whl", hash = "sha256:b0340d46a933d27c657b211a329d0be23793c36595acf9e6ef4164bc01a1804c", size = 798307, upload-time = "2023-09-29T09:14:34.431Z" }, +] + +[[package]] +name = "itsdangerous" +version = "2.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz", hash = "sha256:e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173", size = 54410, upload-time = "2024-04-16T21:28:15.614Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/96/92447566d16df59b2a776c0fb82dbc4d9e07cd95062562af01e408583fc4/itsdangerous-2.2.0-py3-none-any.whl", hash = "sha256:c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef", size = 16234, upload-time = "2024-04-16T21:28:14.499Z" }, +] + +[[package]] +name = "jedi" +version = "0.19.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "parso" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/72/3a/79a912fbd4d8dd6fbb02bf69afd3bb72cf0c729bb3063c6f4498603db17a/jedi-0.19.2.tar.gz", hash = "sha256:4770dc3de41bde3966b02eb84fbcf557fb33cce26ad23da12c742fb50ecb11f0", size = 1231287, upload-time = "2024-11-11T01:41:42.873Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c0/5a/9cac0c82afec3d09ccd97c8b6502d48f165f9124db81b4bcb90b4af974ee/jedi-0.19.2-py2.py3-none-any.whl", hash = "sha256:a8ef22bde8490f57fe5c7681a3c83cb58874daf72b4784de3cce5b6ef6edb5b9", size = 1572278, upload-time = "2024-11-11T01:41:40.175Z" }, +] + +[[package]] +name = "jinja2" +version = "3.1.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, +] + +[[package]] +name = "jiter" +version = "0.12.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/45/9d/e0660989c1370e25848bb4c52d061c71837239738ad937e83edca174c273/jiter-0.12.0.tar.gz", hash = "sha256:64dfcd7d5c168b38d3f9f8bba7fc639edb3418abcc74f22fdbe6b8938293f30b", size = 168294, upload-time = "2025-11-09T20:49:23.302Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/32/f9/eaca4633486b527ebe7e681c431f529b63fe2709e7c5242fc0f43f77ce63/jiter-0.12.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d8f8a7e317190b2c2d60eb2e8aa835270b008139562d70fe732e1c0020ec53c9", size = 316435, upload-time = "2025-11-09T20:47:02.087Z" }, + { url = "https://files.pythonhosted.org/packages/10/c1/40c9f7c22f5e6ff715f28113ebaba27ab85f9af2660ad6e1dd6425d14c19/jiter-0.12.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2218228a077e784c6c8f1a8e5d6b8cb1dea62ce25811c356364848554b2056cd", size = 320548, upload-time = "2025-11-09T20:47:03.409Z" }, + { url = "https://files.pythonhosted.org/packages/6b/1b/efbb68fe87e7711b00d2cfd1f26bb4bfc25a10539aefeaa7727329ffb9cb/jiter-0.12.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9354ccaa2982bf2188fd5f57f79f800ef622ec67beb8329903abf6b10da7d423", size = 351915, upload-time = "2025-11-09T20:47:05.171Z" }, + { url = "https://files.pythonhosted.org/packages/15/2d/c06e659888c128ad1e838123d0638f0efad90cc30860cb5f74dd3f2fc0b3/jiter-0.12.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8f2607185ea89b4af9a604d4c7ec40e45d3ad03ee66998b031134bc510232bb7", size = 368966, upload-time = "2025-11-09T20:47:06.508Z" }, + { url = "https://files.pythonhosted.org/packages/6b/20/058db4ae5fb07cf6a4ab2e9b9294416f606d8e467fb74c2184b2a1eeacba/jiter-0.12.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3a585a5e42d25f2e71db5f10b171f5e5ea641d3aa44f7df745aa965606111cc2", size = 482047, upload-time = "2025-11-09T20:47:08.382Z" }, + { url = "https://files.pythonhosted.org/packages/49/bb/dc2b1c122275e1de2eb12905015d61e8316b2f888bdaac34221c301495d6/jiter-0.12.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd9e21d34edff5a663c631f850edcb786719c960ce887a5661e9c828a53a95d9", size = 380835, upload-time = "2025-11-09T20:47:09.81Z" }, + { url = "https://files.pythonhosted.org/packages/23/7d/38f9cd337575349de16da575ee57ddb2d5a64d425c9367f5ef9e4612e32e/jiter-0.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a612534770470686cd5431478dc5a1b660eceb410abade6b1b74e320ca98de6", size = 364587, upload-time = "2025-11-09T20:47:11.529Z" }, + { url = "https://files.pythonhosted.org/packages/f0/a3/b13e8e61e70f0bb06085099c4e2462647f53cc2ca97614f7fedcaa2bb9f3/jiter-0.12.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3985aea37d40a908f887b34d05111e0aae822943796ebf8338877fee2ab67725", size = 390492, upload-time = "2025-11-09T20:47:12.993Z" }, + { url = "https://files.pythonhosted.org/packages/07/71/e0d11422ed027e21422f7bc1883c61deba2d9752b720538430c1deadfbca/jiter-0.12.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b1207af186495f48f72529f8d86671903c8c10127cac6381b11dddc4aaa52df6", size = 522046, upload-time = "2025-11-09T20:47:14.6Z" }, + { url = "https://files.pythonhosted.org/packages/9f/59/b968a9aa7102a8375dbbdfbd2aeebe563c7e5dddf0f47c9ef1588a97e224/jiter-0.12.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ef2fb241de583934c9915a33120ecc06d94aa3381a134570f59eed784e87001e", size = 513392, upload-time = "2025-11-09T20:47:16.011Z" }, + { url = "https://files.pythonhosted.org/packages/ca/e4/7df62002499080dbd61b505c5cb351aa09e9959d176cac2aa8da6f93b13b/jiter-0.12.0-cp311-cp311-win32.whl", hash = "sha256:453b6035672fecce8007465896a25b28a6b59cfe8fbc974b2563a92f5a92a67c", size = 206096, upload-time = "2025-11-09T20:47:17.344Z" }, + { url = "https://files.pythonhosted.org/packages/bb/60/1032b30ae0572196b0de0e87dce3b6c26a1eff71aad5fe43dee3082d32e0/jiter-0.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:ca264b9603973c2ad9435c71a8ec8b49f8f715ab5ba421c85a51cde9887e421f", size = 204899, upload-time = "2025-11-09T20:47:19.365Z" }, + { url = "https://files.pythonhosted.org/packages/49/d5/c145e526fccdb834063fb45c071df78b0cc426bbaf6de38b0781f45d956f/jiter-0.12.0-cp311-cp311-win_arm64.whl", hash = "sha256:cb00ef392e7d684f2754598c02c409f376ddcef857aae796d559e6cacc2d78a5", size = 188070, upload-time = "2025-11-09T20:47:20.75Z" }, + { url = "https://files.pythonhosted.org/packages/92/c9/5b9f7b4983f1b542c64e84165075335e8a236fa9e2ea03a0c79780062be8/jiter-0.12.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:305e061fa82f4680607a775b2e8e0bcb071cd2205ac38e6ef48c8dd5ebe1cf37", size = 314449, upload-time = "2025-11-09T20:47:22.999Z" }, + { url = "https://files.pythonhosted.org/packages/98/6e/e8efa0e78de00db0aee82c0cf9e8b3f2027efd7f8a71f859d8f4be8e98ef/jiter-0.12.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5c1860627048e302a528333c9307c818c547f214d8659b0705d2195e1a94b274", size = 319855, upload-time = "2025-11-09T20:47:24.779Z" }, + { url = "https://files.pythonhosted.org/packages/20/26/894cd88e60b5d58af53bec5c6759d1292bd0b37a8b5f60f07abf7a63ae5f/jiter-0.12.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df37577a4f8408f7e0ec3205d2a8f87672af8f17008358063a4d6425b6081ce3", size = 350171, upload-time = "2025-11-09T20:47:26.469Z" }, + { url = "https://files.pythonhosted.org/packages/f5/27/a7b818b9979ac31b3763d25f3653ec3a954044d5e9f5d87f2f247d679fd1/jiter-0.12.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:75fdd787356c1c13a4f40b43c2156276ef7a71eb487d98472476476d803fb2cf", size = 365590, upload-time = "2025-11-09T20:47:27.918Z" }, + { url = "https://files.pythonhosted.org/packages/ba/7e/e46195801a97673a83746170b17984aa8ac4a455746354516d02ca5541b4/jiter-0.12.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1eb5db8d9c65b112aacf14fcd0faae9913d07a8afea5ed06ccdd12b724e966a1", size = 479462, upload-time = "2025-11-09T20:47:29.654Z" }, + { url = "https://files.pythonhosted.org/packages/ca/75/f833bfb009ab4bd11b1c9406d333e3b4357709ed0570bb48c7c06d78c7dd/jiter-0.12.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:73c568cc27c473f82480abc15d1301adf333a7ea4f2e813d6a2c7d8b6ba8d0df", size = 378983, upload-time = "2025-11-09T20:47:31.026Z" }, + { url = "https://files.pythonhosted.org/packages/71/b3/7a69d77943cc837d30165643db753471aff5df39692d598da880a6e51c24/jiter-0.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4321e8a3d868919bcb1abb1db550d41f2b5b326f72df29e53b2df8b006eb9403", size = 361328, upload-time = "2025-11-09T20:47:33.286Z" }, + { url = "https://files.pythonhosted.org/packages/b0/ac/a78f90caf48d65ba70d8c6efc6f23150bc39dc3389d65bbec2a95c7bc628/jiter-0.12.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0a51bad79f8cc9cac2b4b705039f814049142e0050f30d91695a2d9a6611f126", size = 386740, upload-time = "2025-11-09T20:47:34.703Z" }, + { url = "https://files.pythonhosted.org/packages/39/b6/5d31c2cc8e1b6a6bcf3c5721e4ca0a3633d1ab4754b09bc7084f6c4f5327/jiter-0.12.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:2a67b678f6a5f1dd6c36d642d7db83e456bc8b104788262aaefc11a22339f5a9", size = 520875, upload-time = "2025-11-09T20:47:36.058Z" }, + { url = "https://files.pythonhosted.org/packages/30/b5/4df540fae4e9f68c54b8dab004bd8c943a752f0b00efd6e7d64aa3850339/jiter-0.12.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efe1a211fe1fd14762adea941e3cfd6c611a136e28da6c39272dbb7a1bbe6a86", size = 511457, upload-time = "2025-11-09T20:47:37.932Z" }, + { url = "https://files.pythonhosted.org/packages/07/65/86b74010e450a1a77b2c1aabb91d4a91dd3cd5afce99f34d75fd1ac64b19/jiter-0.12.0-cp312-cp312-win32.whl", hash = "sha256:d779d97c834b4278276ec703dc3fc1735fca50af63eb7262f05bdb4e62203d44", size = 204546, upload-time = "2025-11-09T20:47:40.47Z" }, + { url = "https://files.pythonhosted.org/packages/1c/c7/6659f537f9562d963488e3e55573498a442503ced01f7e169e96a6110383/jiter-0.12.0-cp312-cp312-win_amd64.whl", hash = "sha256:e8269062060212b373316fe69236096aaf4c49022d267c6736eebd66bbbc60bb", size = 205196, upload-time = "2025-11-09T20:47:41.794Z" }, + { url = "https://files.pythonhosted.org/packages/21/f4/935304f5169edadfec7f9c01eacbce4c90bb9a82035ac1de1f3bd2d40be6/jiter-0.12.0-cp312-cp312-win_arm64.whl", hash = "sha256:06cb970936c65de926d648af0ed3d21857f026b1cf5525cb2947aa5e01e05789", size = 186100, upload-time = "2025-11-09T20:47:43.007Z" }, + { url = "https://files.pythonhosted.org/packages/3d/a6/97209693b177716e22576ee1161674d1d58029eb178e01866a0422b69224/jiter-0.12.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:6cc49d5130a14b732e0612bc76ae8db3b49898732223ef8b7599aa8d9810683e", size = 313658, upload-time = "2025-11-09T20:47:44.424Z" }, + { url = "https://files.pythonhosted.org/packages/06/4d/125c5c1537c7d8ee73ad3d530a442d6c619714b95027143f1b61c0b4dfe0/jiter-0.12.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:37f27a32ce36364d2fa4f7fdc507279db604d27d239ea2e044c8f148410defe1", size = 318605, upload-time = "2025-11-09T20:47:45.973Z" }, + { url = "https://files.pythonhosted.org/packages/99/bf/a840b89847885064c41a5f52de6e312e91fa84a520848ee56c97e4fa0205/jiter-0.12.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bbc0944aa3d4b4773e348cda635252824a78f4ba44328e042ef1ff3f6080d1cf", size = 349803, upload-time = "2025-11-09T20:47:47.535Z" }, + { url = "https://files.pythonhosted.org/packages/8a/88/e63441c28e0db50e305ae23e19c1d8fae012d78ed55365da392c1f34b09c/jiter-0.12.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:da25c62d4ee1ffbacb97fac6dfe4dcd6759ebdc9015991e92a6eae5816287f44", size = 365120, upload-time = "2025-11-09T20:47:49.284Z" }, + { url = "https://files.pythonhosted.org/packages/0a/7c/49b02714af4343970eb8aca63396bc1c82fa01197dbb1e9b0d274b550d4e/jiter-0.12.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:048485c654b838140b007390b8182ba9774621103bd4d77c9c3f6f117474ba45", size = 479918, upload-time = "2025-11-09T20:47:50.807Z" }, + { url = "https://files.pythonhosted.org/packages/69/ba/0a809817fdd5a1db80490b9150645f3aae16afad166960bcd562be194f3b/jiter-0.12.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:635e737fbb7315bef0037c19b88b799143d2d7d3507e61a76751025226b3ac87", size = 379008, upload-time = "2025-11-09T20:47:52.211Z" }, + { url = "https://files.pythonhosted.org/packages/5f/c3/c9fc0232e736c8877d9e6d83d6eeb0ba4e90c6c073835cc2e8f73fdeef51/jiter-0.12.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e017c417b1ebda911bd13b1e40612704b1f5420e30695112efdbed8a4b389ed", size = 361785, upload-time = "2025-11-09T20:47:53.512Z" }, + { url = "https://files.pythonhosted.org/packages/96/61/61f69b7e442e97ca6cd53086ddc1cf59fb830549bc72c0a293713a60c525/jiter-0.12.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:89b0bfb8b2bf2351fba36bb211ef8bfceba73ef58e7f0c68fb67b5a2795ca2f9", size = 386108, upload-time = "2025-11-09T20:47:54.893Z" }, + { url = "https://files.pythonhosted.org/packages/e9/2e/76bb3332f28550c8f1eba3bf6e5efe211efda0ddbbaf24976bc7078d42a5/jiter-0.12.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:f5aa5427a629a824a543672778c9ce0c5e556550d1569bb6ea28a85015287626", size = 519937, upload-time = "2025-11-09T20:47:56.253Z" }, + { url = "https://files.pythonhosted.org/packages/84/d6/fa96efa87dc8bff2094fb947f51f66368fa56d8d4fc9e77b25d7fbb23375/jiter-0.12.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ed53b3d6acbcb0fd0b90f20c7cb3b24c357fe82a3518934d4edfa8c6898e498c", size = 510853, upload-time = "2025-11-09T20:47:58.32Z" }, + { url = "https://files.pythonhosted.org/packages/8a/28/93f67fdb4d5904a708119a6ab58a8f1ec226ff10a94a282e0215402a8462/jiter-0.12.0-cp313-cp313-win32.whl", hash = "sha256:4747de73d6b8c78f2e253a2787930f4fffc68da7fa319739f57437f95963c4de", size = 204699, upload-time = "2025-11-09T20:47:59.686Z" }, + { url = "https://files.pythonhosted.org/packages/c4/1f/30b0eb087045a0abe2a5c9c0c0c8da110875a1d3be83afd4a9a4e548be3c/jiter-0.12.0-cp313-cp313-win_amd64.whl", hash = "sha256:e25012eb0c456fcc13354255d0338cd5397cce26c77b2832b3c4e2e255ea5d9a", size = 204258, upload-time = "2025-11-09T20:48:01.01Z" }, + { url = "https://files.pythonhosted.org/packages/2c/f4/2b4daf99b96bce6fc47971890b14b2a36aef88d7beb9f057fafa032c6141/jiter-0.12.0-cp313-cp313-win_arm64.whl", hash = "sha256:c97b92c54fe6110138c872add030a1f99aea2401ddcdaa21edf74705a646dd60", size = 185503, upload-time = "2025-11-09T20:48:02.35Z" }, + { url = "https://files.pythonhosted.org/packages/39/ca/67bb15a7061d6fe20b9b2a2fd783e296a1e0f93468252c093481a2f00efa/jiter-0.12.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:53839b35a38f56b8be26a7851a48b89bc47e5d88e900929df10ed93b95fea3d6", size = 317965, upload-time = "2025-11-09T20:48:03.783Z" }, + { url = "https://files.pythonhosted.org/packages/18/af/1788031cd22e29c3b14bc6ca80b16a39a0b10e611367ffd480c06a259831/jiter-0.12.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94f669548e55c91ab47fef8bddd9c954dab1938644e715ea49d7e117015110a4", size = 345831, upload-time = "2025-11-09T20:48:05.55Z" }, + { url = "https://files.pythonhosted.org/packages/05/17/710bf8472d1dff0d3caf4ced6031060091c1320f84ee7d5dcbed1f352417/jiter-0.12.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:351d54f2b09a41600ffea43d081522d792e81dcfb915f6d2d242744c1cc48beb", size = 361272, upload-time = "2025-11-09T20:48:06.951Z" }, + { url = "https://files.pythonhosted.org/packages/fb/f1/1dcc4618b59761fef92d10bcbb0b038b5160be653b003651566a185f1a5c/jiter-0.12.0-cp313-cp313t-win_amd64.whl", hash = "sha256:2a5e90604620f94bf62264e7c2c038704d38217b7465b863896c6d7c902b06c7", size = 204604, upload-time = "2025-11-09T20:48:08.328Z" }, + { url = "https://files.pythonhosted.org/packages/d9/32/63cb1d9f1c5c6632a783c0052cde9ef7ba82688f7065e2f0d5f10a7e3edb/jiter-0.12.0-cp313-cp313t-win_arm64.whl", hash = "sha256:88ef757017e78d2860f96250f9393b7b577b06a956ad102c29c8237554380db3", size = 185628, upload-time = "2025-11-09T20:48:09.572Z" }, + { url = "https://files.pythonhosted.org/packages/a8/99/45c9f0dbe4a1416b2b9a8a6d1236459540f43d7fb8883cff769a8db0612d/jiter-0.12.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:c46d927acd09c67a9fb1416df45c5a04c27e83aae969267e98fba35b74e99525", size = 312478, upload-time = "2025-11-09T20:48:10.898Z" }, + { url = "https://files.pythonhosted.org/packages/4c/a7/54ae75613ba9e0f55fcb0bc5d1f807823b5167cc944e9333ff322e9f07dd/jiter-0.12.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:774ff60b27a84a85b27b88cd5583899c59940bcc126caca97eb2a9df6aa00c49", size = 318706, upload-time = "2025-11-09T20:48:12.266Z" }, + { url = "https://files.pythonhosted.org/packages/59/31/2aa241ad2c10774baf6c37f8b8e1f39c07db358f1329f4eb40eba179c2a2/jiter-0.12.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5433fab222fb072237df3f637d01b81f040a07dcac1cb4a5c75c7aa9ed0bef1", size = 351894, upload-time = "2025-11-09T20:48:13.673Z" }, + { url = "https://files.pythonhosted.org/packages/54/4f/0f2759522719133a9042781b18cc94e335b6d290f5e2d3e6899d6af933e3/jiter-0.12.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f8c593c6e71c07866ec6bfb790e202a833eeec885022296aff6b9e0b92d6a70e", size = 365714, upload-time = "2025-11-09T20:48:15.083Z" }, + { url = "https://files.pythonhosted.org/packages/dc/6f/806b895f476582c62a2f52c453151edd8a0fde5411b0497baaa41018e878/jiter-0.12.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:90d32894d4c6877a87ae00c6b915b609406819dce8bc0d4e962e4de2784e567e", size = 478989, upload-time = "2025-11-09T20:48:16.706Z" }, + { url = "https://files.pythonhosted.org/packages/86/6c/012d894dc6e1033acd8db2b8346add33e413ec1c7c002598915278a37f79/jiter-0.12.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:798e46eed9eb10c3adbbacbd3bdb5ecd4cf7064e453d00dbef08802dae6937ff", size = 378615, upload-time = "2025-11-09T20:48:18.614Z" }, + { url = "https://files.pythonhosted.org/packages/87/30/d718d599f6700163e28e2c71c0bbaf6dace692e7df2592fd793ac9276717/jiter-0.12.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b3f1368f0a6719ea80013a4eb90ba72e75d7ea67cfc7846db2ca504f3df0169a", size = 364745, upload-time = "2025-11-09T20:48:20.117Z" }, + { url = "https://files.pythonhosted.org/packages/8f/85/315b45ce4b6ddc7d7fceca24068543b02bdc8782942f4ee49d652e2cc89f/jiter-0.12.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:65f04a9d0b4406f7e51279710b27484af411896246200e461d80d3ba0caa901a", size = 386502, upload-time = "2025-11-09T20:48:21.543Z" }, + { url = "https://files.pythonhosted.org/packages/74/0b/ce0434fb40c5b24b368fe81b17074d2840748b4952256bab451b72290a49/jiter-0.12.0-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:fd990541982a24281d12b67a335e44f117e4c6cbad3c3b75c7dea68bf4ce3a67", size = 519845, upload-time = "2025-11-09T20:48:22.964Z" }, + { url = "https://files.pythonhosted.org/packages/e8/a3/7a7a4488ba052767846b9c916d208b3ed114e3eb670ee984e4c565b9cf0d/jiter-0.12.0-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:b111b0e9152fa7df870ecaebb0bd30240d9f7fff1f2003bcb4ed0f519941820b", size = 510701, upload-time = "2025-11-09T20:48:24.483Z" }, + { url = "https://files.pythonhosted.org/packages/c3/16/052ffbf9d0467b70af24e30f91e0579e13ded0c17bb4a8eb2aed3cb60131/jiter-0.12.0-cp314-cp314-win32.whl", hash = "sha256:a78befb9cc0a45b5a5a0d537b06f8544c2ebb60d19d02c41ff15da28a9e22d42", size = 205029, upload-time = "2025-11-09T20:48:25.749Z" }, + { url = "https://files.pythonhosted.org/packages/e4/18/3cf1f3f0ccc789f76b9a754bdb7a6977e5d1d671ee97a9e14f7eb728d80e/jiter-0.12.0-cp314-cp314-win_amd64.whl", hash = "sha256:e1fe01c082f6aafbe5c8faf0ff074f38dfb911d53f07ec333ca03f8f6226debf", size = 204960, upload-time = "2025-11-09T20:48:27.415Z" }, + { url = "https://files.pythonhosted.org/packages/02/68/736821e52ecfdeeb0f024b8ab01b5a229f6b9293bbdb444c27efade50b0f/jiter-0.12.0-cp314-cp314-win_arm64.whl", hash = "sha256:d72f3b5a432a4c546ea4bedc84cce0c3404874f1d1676260b9c7f048a9855451", size = 185529, upload-time = "2025-11-09T20:48:29.125Z" }, + { url = "https://files.pythonhosted.org/packages/30/61/12ed8ee7a643cce29ac97c2281f9ce3956eb76b037e88d290f4ed0d41480/jiter-0.12.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:e6ded41aeba3603f9728ed2b6196e4df875348ab97b28fc8afff115ed42ba7a7", size = 318974, upload-time = "2025-11-09T20:48:30.87Z" }, + { url = "https://files.pythonhosted.org/packages/2d/c6/f3041ede6d0ed5e0e79ff0de4c8f14f401bbf196f2ef3971cdbe5fd08d1d/jiter-0.12.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a947920902420a6ada6ad51892082521978e9dd44a802663b001436e4b771684", size = 345932, upload-time = "2025-11-09T20:48:32.658Z" }, + { url = "https://files.pythonhosted.org/packages/d5/5d/4d94835889edd01ad0e2dbfc05f7bdfaed46292e7b504a6ac7839aa00edb/jiter-0.12.0-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:add5e227e0554d3a52cf390a7635edaffdf4f8fce4fdbcef3cc2055bb396a30c", size = 367243, upload-time = "2025-11-09T20:48:34.093Z" }, + { url = "https://files.pythonhosted.org/packages/fd/76/0051b0ac2816253a99d27baf3dda198663aff882fa6ea7deeb94046da24e/jiter-0.12.0-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f9b1cda8fcb736250d7e8711d4580ebf004a46771432be0ae4796944b5dfa5d", size = 479315, upload-time = "2025-11-09T20:48:35.507Z" }, + { url = "https://files.pythonhosted.org/packages/70/ae/83f793acd68e5cb24e483f44f482a1a15601848b9b6f199dacb970098f77/jiter-0.12.0-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:deeb12a2223fe0135c7ff1356a143d57f95bbf1f4a66584f1fc74df21d86b993", size = 380714, upload-time = "2025-11-09T20:48:40.014Z" }, + { url = "https://files.pythonhosted.org/packages/b1/5e/4808a88338ad2c228b1126b93fcd8ba145e919e886fe910d578230dabe3b/jiter-0.12.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c596cc0f4cb574877550ce4ecd51f8037469146addd676d7c1a30ebe6391923f", size = 365168, upload-time = "2025-11-09T20:48:41.462Z" }, + { url = "https://files.pythonhosted.org/packages/0c/d4/04619a9e8095b42aef436b5aeb4c0282b4ff1b27d1db1508df9f5dc82750/jiter-0.12.0-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5ab4c823b216a4aeab3fdbf579c5843165756bd9ad87cc6b1c65919c4715f783", size = 387893, upload-time = "2025-11-09T20:48:42.921Z" }, + { url = "https://files.pythonhosted.org/packages/17/ea/d3c7e62e4546fdc39197fa4a4315a563a89b95b6d54c0d25373842a59cbe/jiter-0.12.0-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:e427eee51149edf962203ff8db75a7514ab89be5cb623fb9cea1f20b54f1107b", size = 520828, upload-time = "2025-11-09T20:48:44.278Z" }, + { url = "https://files.pythonhosted.org/packages/cc/0b/c6d3562a03fd767e31cb119d9041ea7958c3c80cb3d753eafb19b3b18349/jiter-0.12.0-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:edb868841f84c111255ba5e80339d386d937ec1fdce419518ce1bd9370fac5b6", size = 511009, upload-time = "2025-11-09T20:48:45.726Z" }, + { url = "https://files.pythonhosted.org/packages/aa/51/2cb4468b3448a8385ebcd15059d325c9ce67df4e2758d133ab9442b19834/jiter-0.12.0-cp314-cp314t-win32.whl", hash = "sha256:8bbcfe2791dfdb7c5e48baf646d37a6a3dcb5a97a032017741dea9f817dca183", size = 205110, upload-time = "2025-11-09T20:48:47.033Z" }, + { url = "https://files.pythonhosted.org/packages/b2/c5/ae5ec83dec9c2d1af805fd5fe8f74ebded9c8670c5210ec7820ce0dbeb1e/jiter-0.12.0-cp314-cp314t-win_amd64.whl", hash = "sha256:2fa940963bf02e1d8226027ef461e36af472dea85d36054ff835aeed944dd873", size = 205223, upload-time = "2025-11-09T20:48:49.076Z" }, + { url = "https://files.pythonhosted.org/packages/97/9a/3c5391907277f0e55195550cf3fa8e293ae9ee0c00fb402fec1e38c0c82f/jiter-0.12.0-cp314-cp314t-win_arm64.whl", hash = "sha256:506c9708dd29b27288f9f8f1140c3cb0e3d8ddb045956d7757b1fa0e0f39a473", size = 185564, upload-time = "2025-11-09T20:48:50.376Z" }, + { url = "https://files.pythonhosted.org/packages/fe/54/5339ef1ecaa881c6948669956567a64d2670941925f245c434f494ffb0e5/jiter-0.12.0-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:4739a4657179ebf08f85914ce50332495811004cc1747852e8b2041ed2aab9b8", size = 311144, upload-time = "2025-11-09T20:49:10.503Z" }, + { url = "https://files.pythonhosted.org/packages/27/74/3446c652bffbd5e81ab354e388b1b5fc1d20daac34ee0ed11ff096b1b01a/jiter-0.12.0-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:41da8def934bf7bec16cb24bd33c0ca62126d2d45d81d17b864bd5ad721393c3", size = 305877, upload-time = "2025-11-09T20:49:12.269Z" }, + { url = "https://files.pythonhosted.org/packages/a1/f4/ed76ef9043450f57aac2d4fbeb27175aa0eb9c38f833be6ef6379b3b9a86/jiter-0.12.0-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c44ee814f499c082e69872d426b624987dbc5943ab06e9bbaa4f81989fdb79e", size = 340419, upload-time = "2025-11-09T20:49:13.803Z" }, + { url = "https://files.pythonhosted.org/packages/21/01/857d4608f5edb0664aa791a3d45702e1a5bcfff9934da74035e7b9803846/jiter-0.12.0-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cd2097de91cf03eaa27b3cbdb969addf83f0179c6afc41bbc4513705e013c65d", size = 347212, upload-time = "2025-11-09T20:49:15.643Z" }, + { url = "https://files.pythonhosted.org/packages/cb/f5/12efb8ada5f5c9edc1d4555fe383c1fb2eac05ac5859258a72d61981d999/jiter-0.12.0-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:e8547883d7b96ef2e5fe22b88f8a4c8725a56e7f4abafff20fd5272d634c7ecb", size = 309974, upload-time = "2025-11-09T20:49:17.187Z" }, + { url = "https://files.pythonhosted.org/packages/85/15/d6eb3b770f6a0d332675141ab3962fd4a7c270ede3515d9f3583e1d28276/jiter-0.12.0-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:89163163c0934854a668ed783a2546a0617f71706a2551a4a0666d91ab365d6b", size = 304233, upload-time = "2025-11-09T20:49:18.734Z" }, + { url = "https://files.pythonhosted.org/packages/8c/3e/e7e06743294eea2cf02ced6aa0ff2ad237367394e37a0e2b4a1108c67a36/jiter-0.12.0-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d96b264ab7d34bbb2312dedc47ce07cd53f06835eacbc16dde3761f47c3a9e7f", size = 338537, upload-time = "2025-11-09T20:49:20.317Z" }, + { url = "https://files.pythonhosted.org/packages/2f/9c/6753e6522b8d0ef07d3a3d239426669e984fb0eba15a315cdbc1253904e4/jiter-0.12.0-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c24e864cb30ab82311c6425655b0cdab0a98c5d973b065c66a3f020740c2324c", size = 346110, upload-time = "2025-11-09T20:49:21.817Z" }, +] + +[[package]] +name = "joblib" +version = "1.5.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/41/f2/d34e8b3a08a9cc79a50b2208a93dce981fe615b64d5a4d4abee421d898df/joblib-1.5.3.tar.gz", hash = "sha256:8561a3269e6801106863fd0d6d84bb737be9e7631e33aaed3fb9ce5953688da3", size = 331603, upload-time = "2025-12-15T08:41:46.427Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7b/91/984aca2ec129e2757d1e4e3c81c3fcda9d0f85b74670a094cc443d9ee949/joblib-1.5.3-py3-none-any.whl", hash = "sha256:5fc3c5039fc5ca8c0276333a188bbd59d6b7ab37fe6632daa76bc7f9ec18e713", size = 309071, upload-time = "2025-12-15T08:41:44.973Z" }, +] + +[[package]] +name = "jsonschema" +version = "4.25.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "attrs" }, + { name = "jsonschema-specifications" }, + { name = "referencing" }, + { name = "rpds-py" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz", hash = "sha256:e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85", size = 357342, upload-time = "2025-08-18T17:03:50.038Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bf/9c/8c95d856233c1f82500c2450b8c68576b4cf1c871db3afac5c34ff84e6fd/jsonschema-4.25.1-py3-none-any.whl", hash = "sha256:3fba0169e345c7175110351d456342c364814cfcf3b964ba4587f22915230a63", size = 90040, upload-time = "2025-08-18T17:03:48.373Z" }, +] + +[[package]] +name = "jsonschema-path" +version = "0.3.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pathable" }, + { name = "pyyaml" }, + { name = "referencing" }, + { name = "requests" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/6e/45/41ebc679c2a4fced6a722f624c18d658dee42612b83ea24c1caf7c0eb3a8/jsonschema_path-0.3.4.tar.gz", hash = "sha256:8365356039f16cc65fddffafda5f58766e34bebab7d6d105616ab52bc4297001", size = 11159, upload-time = "2025-01-24T14:33:16.547Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/58/3485da8cb93d2f393bce453adeef16896751f14ba3e2024bc21dc9597646/jsonschema_path-0.3.4-py3-none-any.whl", hash = "sha256:f502191fdc2b22050f9a81c9237be9d27145b9001c55842bece5e94e382e52f8", size = 14810, upload-time = "2025-01-24T14:33:14.652Z" }, +] + +[[package]] +name = "jsonschema-specifications" +version = "2025.9.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "referencing" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz", hash = "sha256:b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d", size = 32855, upload-time = "2025-09-08T01:34:59.186Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl", hash = "sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe", size = 18437, upload-time = "2025-09-08T01:34:57.871Z" }, +] + +[[package]] +name = "jupyter-client" +version = "8.7.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jupyter-core" }, + { name = "python-dateutil" }, + { name = "pyzmq" }, + { name = "tornado" }, + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a6/27/d10de45e8ad4ce872372c4a3a37b7b35b6b064f6f023a5c14ffcced4d59d/jupyter_client-8.7.0.tar.gz", hash = "sha256:3357212d9cbe01209e59190f67a3a7e1f387a4f4e88d1e0433ad84d7b262531d", size = 344691, upload-time = "2025-12-09T18:37:01.953Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bb/f5/fddaec430367be9d62a7ed125530e133bfd4a1c0350fe221149ee0f2b526/jupyter_client-8.7.0-py3-none-any.whl", hash = "sha256:3671a94fd25e62f5f2f554f5e95389c2294d89822378a5f2dd24353e1494a9e0", size = 106215, upload-time = "2025-12-09T18:37:00.024Z" }, +] + +[[package]] +name = "jupyter-core" +version = "5.9.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "platformdirs" }, + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/02/49/9d1284d0dc65e2c757b74c6687b6d319b02f822ad039e5c512df9194d9dd/jupyter_core-5.9.1.tar.gz", hash = "sha256:4d09aaff303b9566c3ce657f580bd089ff5c91f5f89cf7d8846c3cdf465b5508", size = 89814, upload-time = "2025-10-16T19:19:18.444Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e7/e7/80988e32bf6f73919a113473a604f5a8f09094de312b9d52b79c2df7612b/jupyter_core-5.9.1-py3-none-any.whl", hash = "sha256:ebf87fdc6073d142e114c72c9e29a9d7ca03fad818c5d300ce2adc1fb0743407", size = 29032, upload-time = "2025-10-16T19:19:16.783Z" }, +] + +[[package]] +name = "jupyterlab-pygments" +version = "0.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/90/51/9187be60d989df97f5f0aba133fa54e7300f17616e065d1ada7d7646b6d6/jupyterlab_pygments-0.3.0.tar.gz", hash = "sha256:721aca4d9029252b11cfa9d185e5b5af4d54772bb8072f9b7036f4170054d35d", size = 512900, upload-time = "2023-11-23T09:26:37.44Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b1/dd/ead9d8ea85bf202d90cc513b533f9c363121c7792674f78e0d8a854b63b4/jupyterlab_pygments-0.3.0-py3-none-any.whl", hash = "sha256:841a89020971da1d8693f1a99997aefc5dc424bb1b251fd6322462a1b8842780", size = 15884, upload-time = "2023-11-23T09:26:34.325Z" }, +] + +[[package]] +name = "langdetect" +version = "1.0.9" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/0e/72/a3add0e4eec4eb9e2569554f7c70f4a3c27712f40e3284d483e88094cc0e/langdetect-1.0.9.tar.gz", hash = "sha256:cbc1fef89f8d062739774bd51eda3da3274006b3661d199c2655f6b3f6d605a0", size = 981474, upload-time = "2021-05-07T07:54:13.562Z" } + +[[package]] +name = "lazy-object-proxy" +version = "1.12.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/08/a2/69df9c6ba6d316cfd81fe2381e464db3e6de5db45f8c43c6a23504abf8cb/lazy_object_proxy-1.12.0.tar.gz", hash = "sha256:1f5a462d92fd0cfb82f1fab28b51bfb209fabbe6aabf7f0d51472c0c124c0c61", size = 43681, upload-time = "2025-08-22T13:50:06.783Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/01/b3/4684b1e128a87821e485f5a901b179790e6b5bc02f89b7ee19c23be36ef3/lazy_object_proxy-1.12.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1cf69cd1a6c7fe2dbcc3edaa017cf010f4192e53796538cc7d5e1fedbfa4bcff", size = 26656, upload-time = "2025-08-22T13:42:30.605Z" }, + { url = "https://files.pythonhosted.org/packages/3a/03/1bdc21d9a6df9ff72d70b2ff17d8609321bea4b0d3cffd2cea92fb2ef738/lazy_object_proxy-1.12.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:efff4375a8c52f55a145dc8487a2108c2140f0bec4151ab4e1843e52eb9987ad", size = 68832, upload-time = "2025-08-22T13:42:31.675Z" }, + { url = "https://files.pythonhosted.org/packages/3d/4b/5788e5e8bd01d19af71e50077ab020bc5cce67e935066cd65e1215a09ff9/lazy_object_proxy-1.12.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1192e8c2f1031a6ff453ee40213afa01ba765b3dc861302cd91dbdb2e2660b00", size = 69148, upload-time = "2025-08-22T13:42:32.876Z" }, + { url = "https://files.pythonhosted.org/packages/79/0e/090bf070f7a0de44c61659cb7f74c2fe02309a77ca8c4b43adfe0b695f66/lazy_object_proxy-1.12.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:3605b632e82a1cbc32a1e5034278a64db555b3496e0795723ee697006b980508", size = 67800, upload-time = "2025-08-22T13:42:34.054Z" }, + { url = "https://files.pythonhosted.org/packages/cf/d2/b320325adbb2d119156f7c506a5fbfa37fcab15c26d13cf789a90a6de04e/lazy_object_proxy-1.12.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a61095f5d9d1a743e1e20ec6d6db6c2ca511961777257ebd9b288951b23b44fa", size = 68085, upload-time = "2025-08-22T13:42:35.197Z" }, + { url = "https://files.pythonhosted.org/packages/6a/48/4b718c937004bf71cd82af3713874656bcb8d0cc78600bf33bb9619adc6c/lazy_object_proxy-1.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:997b1d6e10ecc6fb6fe0f2c959791ae59599f41da61d652f6c903d1ee58b7370", size = 26535, upload-time = "2025-08-22T13:42:36.521Z" }, + { url = "https://files.pythonhosted.org/packages/0d/1b/b5f5bd6bda26f1e15cd3232b223892e4498e34ec70a7f4f11c401ac969f1/lazy_object_proxy-1.12.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8ee0d6027b760a11cc18281e702c0309dd92da458a74b4c15025d7fc490deede", size = 26746, upload-time = "2025-08-22T13:42:37.572Z" }, + { url = "https://files.pythonhosted.org/packages/55/64/314889b618075c2bfc19293ffa9153ce880ac6153aacfd0a52fcabf21a66/lazy_object_proxy-1.12.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:4ab2c584e3cc8be0dfca422e05ad30a9abe3555ce63e9ab7a559f62f8dbc6ff9", size = 71457, upload-time = "2025-08-22T13:42:38.743Z" }, + { url = "https://files.pythonhosted.org/packages/11/53/857fc2827fc1e13fbdfc0ba2629a7d2579645a06192d5461809540b78913/lazy_object_proxy-1.12.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:14e348185adbd03ec17d051e169ec45686dcd840a3779c9d4c10aabe2ca6e1c0", size = 71036, upload-time = "2025-08-22T13:42:40.184Z" }, + { url = "https://files.pythonhosted.org/packages/2b/24/e581ffed864cd33c1b445b5763d617448ebb880f48675fc9de0471a95cbc/lazy_object_proxy-1.12.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c4fcbe74fb85df8ba7825fa05eddca764138da752904b378f0ae5ab33a36c308", size = 69329, upload-time = "2025-08-22T13:42:41.311Z" }, + { url = "https://files.pythonhosted.org/packages/78/be/15f8f5a0b0b2e668e756a152257d26370132c97f2f1943329b08f057eff0/lazy_object_proxy-1.12.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:563d2ec8e4d4b68ee7848c5ab4d6057a6d703cb7963b342968bb8758dda33a23", size = 70690, upload-time = "2025-08-22T13:42:42.51Z" }, + { url = "https://files.pythonhosted.org/packages/5d/aa/f02be9bbfb270e13ee608c2b28b8771f20a5f64356c6d9317b20043c6129/lazy_object_proxy-1.12.0-cp312-cp312-win_amd64.whl", hash = "sha256:53c7fd99eb156bbb82cbc5d5188891d8fdd805ba6c1e3b92b90092da2a837073", size = 26563, upload-time = "2025-08-22T13:42:43.685Z" }, + { url = "https://files.pythonhosted.org/packages/f4/26/b74c791008841f8ad896c7f293415136c66cc27e7c7577de4ee68040c110/lazy_object_proxy-1.12.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:86fd61cb2ba249b9f436d789d1356deae69ad3231dc3c0f17293ac535162672e", size = 26745, upload-time = "2025-08-22T13:42:44.982Z" }, + { url = "https://files.pythonhosted.org/packages/9b/52/641870d309e5d1fb1ea7d462a818ca727e43bfa431d8c34b173eb090348c/lazy_object_proxy-1.12.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:81d1852fb30fab81696f93db1b1e55a5d1ff7940838191062f5f56987d5fcc3e", size = 71537, upload-time = "2025-08-22T13:42:46.141Z" }, + { url = "https://files.pythonhosted.org/packages/47/b6/919118e99d51c5e76e8bf5a27df406884921c0acf2c7b8a3b38d847ab3e9/lazy_object_proxy-1.12.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:be9045646d83f6c2664c1330904b245ae2371b5c57a3195e4028aedc9f999655", size = 71141, upload-time = "2025-08-22T13:42:47.375Z" }, + { url = "https://files.pythonhosted.org/packages/e5/47/1d20e626567b41de085cf4d4fb3661a56c159feaa73c825917b3b4d4f806/lazy_object_proxy-1.12.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:67f07ab742f1adfb3966c40f630baaa7902be4222a17941f3d85fd1dae5565ff", size = 69449, upload-time = "2025-08-22T13:42:48.49Z" }, + { url = "https://files.pythonhosted.org/packages/58/8d/25c20ff1a1a8426d9af2d0b6f29f6388005fc8cd10d6ee71f48bff86fdd0/lazy_object_proxy-1.12.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:75ba769017b944fcacbf6a80c18b2761a1795b03f8899acdad1f1c39db4409be", size = 70744, upload-time = "2025-08-22T13:42:49.608Z" }, + { url = "https://files.pythonhosted.org/packages/c0/67/8ec9abe15c4f8a4bcc6e65160a2c667240d025cbb6591b879bea55625263/lazy_object_proxy-1.12.0-cp313-cp313-win_amd64.whl", hash = "sha256:7b22c2bbfb155706b928ac4d74c1a63ac8552a55ba7fff4445155523ea4067e1", size = 26568, upload-time = "2025-08-22T13:42:57.719Z" }, + { url = "https://files.pythonhosted.org/packages/23/12/cd2235463f3469fd6c62d41d92b7f120e8134f76e52421413a0ad16d493e/lazy_object_proxy-1.12.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4a79b909aa16bde8ae606f06e6bbc9d3219d2e57fb3e0076e17879072b742c65", size = 27391, upload-time = "2025-08-22T13:42:50.62Z" }, + { url = "https://files.pythonhosted.org/packages/60/9e/f1c53e39bbebad2e8609c67d0830cc275f694d0ea23d78e8f6db526c12d3/lazy_object_proxy-1.12.0-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:338ab2f132276203e404951205fe80c3fd59429b3a724e7b662b2eb539bb1be9", size = 80552, upload-time = "2025-08-22T13:42:51.731Z" }, + { url = "https://files.pythonhosted.org/packages/4c/b6/6c513693448dcb317d9d8c91d91f47addc09553613379e504435b4cc8b3e/lazy_object_proxy-1.12.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8c40b3c9faee2e32bfce0df4ae63f4e73529766893258eca78548bac801c8f66", size = 82857, upload-time = "2025-08-22T13:42:53.225Z" }, + { url = "https://files.pythonhosted.org/packages/12/1c/d9c4aaa4c75da11eb7c22c43d7c90a53b4fca0e27784a5ab207768debea7/lazy_object_proxy-1.12.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:717484c309df78cedf48396e420fa57fc8a2b1f06ea889df7248fdd156e58847", size = 80833, upload-time = "2025-08-22T13:42:54.391Z" }, + { url = "https://files.pythonhosted.org/packages/0b/ae/29117275aac7d7d78ae4f5a4787f36ff33262499d486ac0bf3e0b97889f6/lazy_object_proxy-1.12.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:a6b7ea5ea1ffe15059eb44bcbcb258f97bcb40e139b88152c40d07b1a1dfc9ac", size = 79516, upload-time = "2025-08-22T13:42:55.812Z" }, + { url = "https://files.pythonhosted.org/packages/19/40/b4e48b2c38c69392ae702ae7afa7b6551e0ca5d38263198b7c79de8b3bdf/lazy_object_proxy-1.12.0-cp313-cp313t-win_amd64.whl", hash = "sha256:08c465fb5cd23527512f9bd7b4c7ba6cec33e28aad36fbbe46bf7b858f9f3f7f", size = 27656, upload-time = "2025-08-22T13:42:56.793Z" }, + { url = "https://files.pythonhosted.org/packages/ef/3a/277857b51ae419a1574557c0b12e0d06bf327b758ba94cafc664cb1e2f66/lazy_object_proxy-1.12.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c9defba70ab943f1df98a656247966d7729da2fe9c2d5d85346464bf320820a3", size = 26582, upload-time = "2025-08-22T13:49:49.366Z" }, + { url = "https://files.pythonhosted.org/packages/1a/b6/c5e0fa43535bb9c87880e0ba037cdb1c50e01850b0831e80eb4f4762f270/lazy_object_proxy-1.12.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:6763941dbf97eea6b90f5b06eb4da9418cc088fce0e3883f5816090f9afcde4a", size = 71059, upload-time = "2025-08-22T13:49:50.488Z" }, + { url = "https://files.pythonhosted.org/packages/06/8a/7dcad19c685963c652624702f1a968ff10220b16bfcc442257038216bf55/lazy_object_proxy-1.12.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fdc70d81235fc586b9e3d1aeef7d1553259b62ecaae9db2167a5d2550dcc391a", size = 71034, upload-time = "2025-08-22T13:49:54.224Z" }, + { url = "https://files.pythonhosted.org/packages/12/ac/34cbfb433a10e28c7fd830f91c5a348462ba748413cbb950c7f259e67aa7/lazy_object_proxy-1.12.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:0a83c6f7a6b2bfc11ef3ed67f8cbe99f8ff500b05655d8e7df9aab993a6abc95", size = 69529, upload-time = "2025-08-22T13:49:55.29Z" }, + { url = "https://files.pythonhosted.org/packages/6f/6a/11ad7e349307c3ca4c0175db7a77d60ce42a41c60bcb11800aabd6a8acb8/lazy_object_proxy-1.12.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:256262384ebd2a77b023ad02fbcc9326282bcfd16484d5531154b02bc304f4c5", size = 70391, upload-time = "2025-08-22T13:49:56.35Z" }, + { url = "https://files.pythonhosted.org/packages/59/97/9b410ed8fbc6e79c1ee8b13f8777a80137d4bc189caf2c6202358e66192c/lazy_object_proxy-1.12.0-cp314-cp314-win_amd64.whl", hash = "sha256:7601ec171c7e8584f8ff3f4e440aa2eebf93e854f04639263875b8c2971f819f", size = 26988, upload-time = "2025-08-22T13:49:57.302Z" }, + { url = "https://files.pythonhosted.org/packages/41/a0/b91504515c1f9a299fc157967ffbd2f0321bce0516a3d5b89f6f4cad0355/lazy_object_proxy-1.12.0-pp39.pp310.pp311.graalpy311-none-any.whl", hash = "sha256:c3b2e0af1f7f77c4263759c4824316ce458fabe0fceadcd24ef8ca08b2d1e402", size = 15072, upload-time = "2025-08-22T13:50:05.498Z" }, +] + +[[package]] +name = "lxml" +version = "6.0.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/aa/88/262177de60548e5a2bfc46ad28232c9e9cbde697bd94132aeb80364675cb/lxml-6.0.2.tar.gz", hash = "sha256:cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62", size = 4073426, upload-time = "2025-09-22T04:04:59.287Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/77/d5/becbe1e2569b474a23f0c672ead8a29ac50b2dc1d5b9de184831bda8d14c/lxml-6.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:13e35cbc684aadf05d8711a5d1b5857c92e5e580efa9a0d2be197199c8def607", size = 8634365, upload-time = "2025-09-22T04:00:45.672Z" }, + { url = "https://files.pythonhosted.org/packages/28/66/1ced58f12e804644426b85d0bb8a4478ca77bc1761455da310505f1a3526/lxml-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3b1675e096e17c6fe9c0e8c81434f5736c0739ff9ac6123c87c2d452f48fc938", size = 4650793, upload-time = "2025-09-22T04:00:47.783Z" }, + { url = "https://files.pythonhosted.org/packages/11/84/549098ffea39dfd167e3f174b4ce983d0eed61f9d8d25b7bf2a57c3247fc/lxml-6.0.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8ac6e5811ae2870953390452e3476694196f98d447573234592d30488147404d", size = 4944362, upload-time = "2025-09-22T04:00:49.845Z" }, + { url = "https://files.pythonhosted.org/packages/ac/bd/f207f16abf9749d2037453d56b643a7471d8fde855a231a12d1e095c4f01/lxml-6.0.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5aa0fc67ae19d7a64c3fe725dc9a1bb11f80e01f78289d05c6f62545affec438", size = 5083152, upload-time = "2025-09-22T04:00:51.709Z" }, + { url = "https://files.pythonhosted.org/packages/15/ae/bd813e87d8941d52ad5b65071b1affb48da01c4ed3c9c99e40abb266fbff/lxml-6.0.2-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:de496365750cc472b4e7902a485d3f152ecf57bd3ba03ddd5578ed8ceb4c5964", size = 5023539, upload-time = "2025-09-22T04:00:53.593Z" }, + { url = "https://files.pythonhosted.org/packages/02/cd/9bfef16bd1d874fbe0cb51afb00329540f30a3283beb9f0780adbb7eec03/lxml-6.0.2-cp311-cp311-manylinux_2_26_i686.manylinux_2_28_i686.whl", hash = "sha256:200069a593c5e40b8f6fc0d84d86d970ba43138c3e68619ffa234bc9bb806a4d", size = 5344853, upload-time = "2025-09-22T04:00:55.524Z" }, + { url = "https://files.pythonhosted.org/packages/b8/89/ea8f91594bc5dbb879734d35a6f2b0ad50605d7fb419de2b63d4211765cc/lxml-6.0.2-cp311-cp311-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7d2de809c2ee3b888b59f995625385f74629707c9355e0ff856445cdcae682b7", size = 5225133, upload-time = "2025-09-22T04:00:57.269Z" }, + { url = "https://files.pythonhosted.org/packages/b9/37/9c735274f5dbec726b2db99b98a43950395ba3d4a1043083dba2ad814170/lxml-6.0.2-cp311-cp311-manylinux_2_31_armv7l.whl", hash = "sha256:b2c3da8d93cf5db60e8858c17684c47d01fee6405e554fb55018dd85fc23b178", size = 4677944, upload-time = "2025-09-22T04:00:59.052Z" }, + { url = "https://files.pythonhosted.org/packages/20/28/7dfe1ba3475d8bfca3878365075abe002e05d40dfaaeb7ec01b4c587d533/lxml-6.0.2-cp311-cp311-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:442de7530296ef5e188373a1ea5789a46ce90c4847e597856570439621d9c553", size = 5284535, upload-time = "2025-09-22T04:01:01.335Z" }, + { url = "https://files.pythonhosted.org/packages/e7/cf/5f14bc0de763498fc29510e3532bf2b4b3a1c1d5d0dff2e900c16ba021ef/lxml-6.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2593c77efde7bfea7f6389f1ab249b15ed4aa5bc5cb5131faa3b843c429fbedb", size = 5067343, upload-time = "2025-09-22T04:01:03.13Z" }, + { url = "https://files.pythonhosted.org/packages/1c/b0/bb8275ab5472f32b28cfbbcc6db7c9d092482d3439ca279d8d6fa02f7025/lxml-6.0.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:3e3cb08855967a20f553ff32d147e14329b3ae70ced6edc2f282b94afbc74b2a", size = 4725419, upload-time = "2025-09-22T04:01:05.013Z" }, + { url = "https://files.pythonhosted.org/packages/25/4c/7c222753bc72edca3b99dbadba1b064209bc8ed4ad448af990e60dcce462/lxml-6.0.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:2ed6c667fcbb8c19c6791bbf40b7268ef8ddf5a96940ba9404b9f9a304832f6c", size = 5275008, upload-time = "2025-09-22T04:01:07.327Z" }, + { url = "https://files.pythonhosted.org/packages/6c/8c/478a0dc6b6ed661451379447cdbec77c05741a75736d97e5b2b729687828/lxml-6.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b8f18914faec94132e5b91e69d76a5c1d7b0c73e2489ea8929c4aaa10b76bbf7", size = 5248906, upload-time = "2025-09-22T04:01:09.452Z" }, + { url = "https://files.pythonhosted.org/packages/2d/d9/5be3a6ab2784cdf9accb0703b65e1b64fcdd9311c9f007630c7db0cfcce1/lxml-6.0.2-cp311-cp311-win32.whl", hash = "sha256:6605c604e6daa9e0d7f0a2137bdc47a2e93b59c60a65466353e37f8272f47c46", size = 3610357, upload-time = "2025-09-22T04:01:11.102Z" }, + { url = "https://files.pythonhosted.org/packages/e2/7d/ca6fb13349b473d5732fb0ee3eec8f6c80fc0688e76b7d79c1008481bf1f/lxml-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e5867f2651016a3afd8dd2c8238baa66f1e2802f44bc17e236f547ace6647078", size = 4036583, upload-time = "2025-09-22T04:01:12.766Z" }, + { url = "https://files.pythonhosted.org/packages/ab/a2/51363b5ecd3eab46563645f3a2c3836a2fc67d01a1b87c5017040f39f567/lxml-6.0.2-cp311-cp311-win_arm64.whl", hash = "sha256:4197fb2534ee05fd3e7afaab5d8bfd6c2e186f65ea7f9cd6a82809c887bd1285", size = 3680591, upload-time = "2025-09-22T04:01:14.874Z" }, + { url = "https://files.pythonhosted.org/packages/f3/c8/8ff2bc6b920c84355146cd1ab7d181bc543b89241cfb1ebee824a7c81457/lxml-6.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:a59f5448ba2ceccd06995c95ea59a7674a10de0810f2ce90c9006f3cbc044456", size = 8661887, upload-time = "2025-09-22T04:01:17.265Z" }, + { url = "https://files.pythonhosted.org/packages/37/6f/9aae1008083bb501ef63284220ce81638332f9ccbfa53765b2b7502203cf/lxml-6.0.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:e8113639f3296706fbac34a30813929e29247718e88173ad849f57ca59754924", size = 4667818, upload-time = "2025-09-22T04:01:19.688Z" }, + { url = "https://files.pythonhosted.org/packages/f1/ca/31fb37f99f37f1536c133476674c10b577e409c0a624384147653e38baf2/lxml-6.0.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:a8bef9b9825fa8bc816a6e641bb67219489229ebc648be422af695f6e7a4fa7f", size = 4950807, upload-time = "2025-09-22T04:01:21.487Z" }, + { url = "https://files.pythonhosted.org/packages/da/87/f6cb9442e4bada8aab5ae7e1046264f62fdbeaa6e3f6211b93f4c0dd97f1/lxml-6.0.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:65ea18d710fd14e0186c2f973dc60bb52039a275f82d3c44a0e42b43440ea534", size = 5109179, upload-time = "2025-09-22T04:01:23.32Z" }, + { url = "https://files.pythonhosted.org/packages/c8/20/a7760713e65888db79bbae4f6146a6ae5c04e4a204a3c48896c408cd6ed2/lxml-6.0.2-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c371aa98126a0d4c739ca93ceffa0fd7a5d732e3ac66a46e74339acd4d334564", size = 5023044, upload-time = "2025-09-22T04:01:25.118Z" }, + { url = "https://files.pythonhosted.org/packages/a2/b0/7e64e0460fcb36471899f75831509098f3fd7cd02a3833ac517433cb4f8f/lxml-6.0.2-cp312-cp312-manylinux_2_26_i686.manylinux_2_28_i686.whl", hash = "sha256:700efd30c0fa1a3581d80a748157397559396090a51d306ea59a70020223d16f", size = 5359685, upload-time = "2025-09-22T04:01:27.398Z" }, + { url = "https://files.pythonhosted.org/packages/b9/e1/e5df362e9ca4e2f48ed6411bd4b3a0ae737cc842e96877f5bf9428055ab4/lxml-6.0.2-cp312-cp312-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c33e66d44fe60e72397b487ee92e01da0d09ba2d66df8eae42d77b6d06e5eba0", size = 5654127, upload-time = "2025-09-22T04:01:29.629Z" }, + { url = "https://files.pythonhosted.org/packages/c6/d1/232b3309a02d60f11e71857778bfcd4acbdb86c07db8260caf7d008b08f8/lxml-6.0.2-cp312-cp312-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:90a345bbeaf9d0587a3aaffb7006aa39ccb6ff0e96a57286c0cb2fd1520ea192", size = 5253958, upload-time = "2025-09-22T04:01:31.535Z" }, + { url = "https://files.pythonhosted.org/packages/35/35/d955a070994725c4f7d80583a96cab9c107c57a125b20bb5f708fe941011/lxml-6.0.2-cp312-cp312-manylinux_2_31_armv7l.whl", hash = "sha256:064fdadaf7a21af3ed1dcaa106b854077fbeada827c18f72aec9346847cd65d0", size = 4711541, upload-time = "2025-09-22T04:01:33.801Z" }, + { url = "https://files.pythonhosted.org/packages/1e/be/667d17363b38a78c4bd63cfd4b4632029fd68d2c2dc81f25ce9eb5224dd5/lxml-6.0.2-cp312-cp312-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:fbc74f42c3525ac4ffa4b89cbdd00057b6196bcefe8bce794abd42d33a018092", size = 5267426, upload-time = "2025-09-22T04:01:35.639Z" }, + { url = "https://files.pythonhosted.org/packages/ea/47/62c70aa4a1c26569bc958c9ca86af2bb4e1f614e8c04fb2989833874f7ae/lxml-6.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6ddff43f702905a4e32bc24f3f2e2edfe0f8fde3277d481bffb709a4cced7a1f", size = 5064917, upload-time = "2025-09-22T04:01:37.448Z" }, + { url = "https://files.pythonhosted.org/packages/bd/55/6ceddaca353ebd0f1908ef712c597f8570cc9c58130dbb89903198e441fd/lxml-6.0.2-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:6da5185951d72e6f5352166e3da7b0dc27aa70bd1090b0eb3f7f7212b53f1bb8", size = 4788795, upload-time = "2025-09-22T04:01:39.165Z" }, + { url = "https://files.pythonhosted.org/packages/cf/e8/fd63e15da5e3fd4c2146f8bbb3c14e94ab850589beab88e547b2dbce22e1/lxml-6.0.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:57a86e1ebb4020a38d295c04fc79603c7899e0df71588043eb218722dabc087f", size = 5676759, upload-time = "2025-09-22T04:01:41.506Z" }, + { url = "https://files.pythonhosted.org/packages/76/47/b3ec58dc5c374697f5ba37412cd2728f427d056315d124dd4b61da381877/lxml-6.0.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:2047d8234fe735ab77802ce5f2297e410ff40f5238aec569ad7c8e163d7b19a6", size = 5255666, upload-time = "2025-09-22T04:01:43.363Z" }, + { url = "https://files.pythonhosted.org/packages/19/93/03ba725df4c3d72afd9596eef4a37a837ce8e4806010569bedfcd2cb68fd/lxml-6.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:6f91fd2b2ea15a6800c8e24418c0775a1694eefc011392da73bc6cef2623b322", size = 5277989, upload-time = "2025-09-22T04:01:45.215Z" }, + { url = "https://files.pythonhosted.org/packages/c6/80/c06de80bfce881d0ad738576f243911fccf992687ae09fd80b734712b39c/lxml-6.0.2-cp312-cp312-win32.whl", hash = "sha256:3ae2ce7d6fedfb3414a2b6c5e20b249c4c607f72cb8d2bb7cc9c6ec7c6f4e849", size = 3611456, upload-time = "2025-09-22T04:01:48.243Z" }, + { url = "https://files.pythonhosted.org/packages/f7/d7/0cdfb6c3e30893463fb3d1e52bc5f5f99684a03c29a0b6b605cfae879cd5/lxml-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:72c87e5ee4e58a8354fb9c7c84cbf95a1c8236c127a5d1b7683f04bed8361e1f", size = 4011793, upload-time = "2025-09-22T04:01:50.042Z" }, + { url = "https://files.pythonhosted.org/packages/ea/7b/93c73c67db235931527301ed3785f849c78991e2e34f3fd9a6663ffda4c5/lxml-6.0.2-cp312-cp312-win_arm64.whl", hash = "sha256:61cb10eeb95570153e0c0e554f58df92ecf5109f75eacad4a95baa709e26c3d6", size = 3672836, upload-time = "2025-09-22T04:01:52.145Z" }, + { url = "https://files.pythonhosted.org/packages/53/fd/4e8f0540608977aea078bf6d79f128e0e2c2bba8af1acf775c30baa70460/lxml-6.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:9b33d21594afab46f37ae58dfadd06636f154923c4e8a4d754b0127554eb2e77", size = 8648494, upload-time = "2025-09-22T04:01:54.242Z" }, + { url = "https://files.pythonhosted.org/packages/5d/f4/2a94a3d3dfd6c6b433501b8d470a1960a20ecce93245cf2db1706adf6c19/lxml-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:6c8963287d7a4c5c9a432ff487c52e9c5618667179c18a204bdedb27310f022f", size = 4661146, upload-time = "2025-09-22T04:01:56.282Z" }, + { url = "https://files.pythonhosted.org/packages/25/2e/4efa677fa6b322013035d38016f6ae859d06cac67437ca7dc708a6af7028/lxml-6.0.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1941354d92699fb5ffe6ed7b32f9649e43c2feb4b97205f75866f7d21aa91452", size = 4946932, upload-time = "2025-09-22T04:01:58.989Z" }, + { url = "https://files.pythonhosted.org/packages/ce/0f/526e78a6d38d109fdbaa5049c62e1d32fdd70c75fb61c4eadf3045d3d124/lxml-6.0.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bb2f6ca0ae2d983ded09357b84af659c954722bbf04dea98030064996d156048", size = 5100060, upload-time = "2025-09-22T04:02:00.812Z" }, + { url = "https://files.pythonhosted.org/packages/81/76/99de58d81fa702cc0ea7edae4f4640416c2062813a00ff24bd70ac1d9c9b/lxml-6.0.2-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eb2a12d704f180a902d7fa778c6d71f36ceb7b0d317f34cdc76a5d05aa1dd1df", size = 5019000, upload-time = "2025-09-22T04:02:02.671Z" }, + { url = "https://files.pythonhosted.org/packages/b5/35/9e57d25482bc9a9882cb0037fdb9cc18f4b79d85df94fa9d2a89562f1d25/lxml-6.0.2-cp313-cp313-manylinux_2_26_i686.manylinux_2_28_i686.whl", hash = "sha256:6ec0e3f745021bfed19c456647f0298d60a24c9ff86d9d051f52b509663feeb1", size = 5348496, upload-time = "2025-09-22T04:02:04.904Z" }, + { url = "https://files.pythonhosted.org/packages/a6/8e/cb99bd0b83ccc3e8f0f528e9aa1f7a9965dfec08c617070c5db8d63a87ce/lxml-6.0.2-cp313-cp313-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:846ae9a12d54e368933b9759052d6206a9e8b250291109c48e350c1f1f49d916", size = 5643779, upload-time = "2025-09-22T04:02:06.689Z" }, + { url = "https://files.pythonhosted.org/packages/d0/34/9e591954939276bb679b73773836c6684c22e56d05980e31d52a9a8deb18/lxml-6.0.2-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ef9266d2aa545d7374938fb5c484531ef5a2ec7f2d573e62f8ce722c735685fd", size = 5244072, upload-time = "2025-09-22T04:02:08.587Z" }, + { url = "https://files.pythonhosted.org/packages/8d/27/b29ff065f9aaca443ee377aff699714fcbffb371b4fce5ac4ca759e436d5/lxml-6.0.2-cp313-cp313-manylinux_2_31_armv7l.whl", hash = "sha256:4077b7c79f31755df33b795dc12119cb557a0106bfdab0d2c2d97bd3cf3dffa6", size = 4718675, upload-time = "2025-09-22T04:02:10.783Z" }, + { url = "https://files.pythonhosted.org/packages/2b/9f/f756f9c2cd27caa1a6ef8c32ae47aadea697f5c2c6d07b0dae133c244fbe/lxml-6.0.2-cp313-cp313-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a7c5d5e5f1081955358533be077166ee97ed2571d6a66bdba6ec2f609a715d1a", size = 5255171, upload-time = "2025-09-22T04:02:12.631Z" }, + { url = "https://files.pythonhosted.org/packages/61/46/bb85ea42d2cb1bd8395484fd72f38e3389611aa496ac7772da9205bbda0e/lxml-6.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:8f8d0cbd0674ee89863a523e6994ac25fd5be9c8486acfc3e5ccea679bad2679", size = 5057175, upload-time = "2025-09-22T04:02:14.718Z" }, + { url = "https://files.pythonhosted.org/packages/95/0c/443fc476dcc8e41577f0af70458c50fe299a97bb6b7505bb1ae09aa7f9ac/lxml-6.0.2-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:2cbcbf6d6e924c28f04a43f3b6f6e272312a090f269eff68a2982e13e5d57659", size = 4785688, upload-time = "2025-09-22T04:02:16.957Z" }, + { url = "https://files.pythonhosted.org/packages/48/78/6ef0b359d45bb9697bc5a626e1992fa5d27aa3f8004b137b2314793b50a0/lxml-6.0.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:dfb874cfa53340009af6bdd7e54ebc0d21012a60a4e65d927c2e477112e63484", size = 5660655, upload-time = "2025-09-22T04:02:18.815Z" }, + { url = "https://files.pythonhosted.org/packages/ff/ea/e1d33808f386bc1339d08c0dcada6e4712d4ed8e93fcad5f057070b7988a/lxml-6.0.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:fb8dae0b6b8b7f9e96c26fdd8121522ce5de9bb5538010870bd538683d30e9a2", size = 5247695, upload-time = "2025-09-22T04:02:20.593Z" }, + { url = "https://files.pythonhosted.org/packages/4f/47/eba75dfd8183673725255247a603b4ad606f4ae657b60c6c145b381697da/lxml-6.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:358d9adae670b63e95bc59747c72f4dc97c9ec58881d4627fe0120da0f90d314", size = 5269841, upload-time = "2025-09-22T04:02:22.489Z" }, + { url = "https://files.pythonhosted.org/packages/76/04/5c5e2b8577bc936e219becb2e98cdb1aca14a4921a12995b9d0c523502ae/lxml-6.0.2-cp313-cp313-win32.whl", hash = "sha256:e8cd2415f372e7e5a789d743d133ae474290a90b9023197fd78f32e2dc6873e2", size = 3610700, upload-time = "2025-09-22T04:02:24.465Z" }, + { url = "https://files.pythonhosted.org/packages/fe/0a/4643ccc6bb8b143e9f9640aa54e38255f9d3b45feb2cbe7ae2ca47e8782e/lxml-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:b30d46379644fbfc3ab81f8f82ae4de55179414651f110a1514f0b1f8f6cb2d7", size = 4010347, upload-time = "2025-09-22T04:02:26.286Z" }, + { url = "https://files.pythonhosted.org/packages/31/ef/dcf1d29c3f530577f61e5fe2f1bd72929acf779953668a8a47a479ae6f26/lxml-6.0.2-cp313-cp313-win_arm64.whl", hash = "sha256:13dcecc9946dca97b11b7c40d29fba63b55ab4170d3c0cf8c0c164343b9bfdcf", size = 3671248, upload-time = "2025-09-22T04:02:27.918Z" }, + { url = "https://files.pythonhosted.org/packages/03/15/d4a377b385ab693ce97b472fe0c77c2b16ec79590e688b3ccc71fba19884/lxml-6.0.2-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:b0c732aa23de8f8aec23f4b580d1e52905ef468afb4abeafd3fec77042abb6fe", size = 8659801, upload-time = "2025-09-22T04:02:30.113Z" }, + { url = "https://files.pythonhosted.org/packages/c8/e8/c128e37589463668794d503afaeb003987373c5f94d667124ffd8078bbd9/lxml-6.0.2-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:4468e3b83e10e0317a89a33d28f7aeba1caa4d1a6fd457d115dd4ffe90c5931d", size = 4659403, upload-time = "2025-09-22T04:02:32.119Z" }, + { url = "https://files.pythonhosted.org/packages/00/ce/74903904339decdf7da7847bb5741fc98a5451b42fc419a86c0c13d26fe2/lxml-6.0.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:abd44571493973bad4598a3be7e1d807ed45aa2adaf7ab92ab7c62609569b17d", size = 4966974, upload-time = "2025-09-22T04:02:34.155Z" }, + { url = "https://files.pythonhosted.org/packages/1f/d3/131dec79ce61c5567fecf82515bd9bc36395df42501b50f7f7f3bd065df0/lxml-6.0.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:370cd78d5855cfbffd57c422851f7d3864e6ae72d0da615fca4dad8c45d375a5", size = 5102953, upload-time = "2025-09-22T04:02:36.054Z" }, + { url = "https://files.pythonhosted.org/packages/3a/ea/a43ba9bb750d4ffdd885f2cd333572f5bb900cd2408b67fdda07e85978a0/lxml-6.0.2-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:901e3b4219fa04ef766885fb40fa516a71662a4c61b80c94d25336b4934b71c0", size = 5055054, upload-time = "2025-09-22T04:02:38.154Z" }, + { url = "https://files.pythonhosted.org/packages/60/23/6885b451636ae286c34628f70a7ed1fcc759f8d9ad382d132e1c8d3d9bfd/lxml-6.0.2-cp314-cp314-manylinux_2_26_i686.manylinux_2_28_i686.whl", hash = "sha256:a4bf42d2e4cf52c28cc1812d62426b9503cdb0c87a6de81442626aa7d69707ba", size = 5352421, upload-time = "2025-09-22T04:02:40.413Z" }, + { url = "https://files.pythonhosted.org/packages/48/5b/fc2ddfc94ddbe3eebb8e9af6e3fd65e2feba4967f6a4e9683875c394c2d8/lxml-6.0.2-cp314-cp314-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b2c7fdaa4d7c3d886a42534adec7cfac73860b89b4e5298752f60aa5984641a0", size = 5673684, upload-time = "2025-09-22T04:02:42.288Z" }, + { url = "https://files.pythonhosted.org/packages/29/9c/47293c58cc91769130fbf85531280e8cc7868f7fbb6d92f4670071b9cb3e/lxml-6.0.2-cp314-cp314-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:98a5e1660dc7de2200b00d53fa00bcd3c35a3608c305d45a7bbcaf29fa16e83d", size = 5252463, upload-time = "2025-09-22T04:02:44.165Z" }, + { url = "https://files.pythonhosted.org/packages/9b/da/ba6eceb830c762b48e711ded880d7e3e89fc6c7323e587c36540b6b23c6b/lxml-6.0.2-cp314-cp314-manylinux_2_31_armv7l.whl", hash = "sha256:dc051506c30b609238d79eda75ee9cab3e520570ec8219844a72a46020901e37", size = 4698437, upload-time = "2025-09-22T04:02:46.524Z" }, + { url = "https://files.pythonhosted.org/packages/a5/24/7be3f82cb7990b89118d944b619e53c656c97dc89c28cfb143fdb7cd6f4d/lxml-6.0.2-cp314-cp314-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8799481bbdd212470d17513a54d568f44416db01250f49449647b5ab5b5dccb9", size = 5269890, upload-time = "2025-09-22T04:02:48.812Z" }, + { url = "https://files.pythonhosted.org/packages/1b/bd/dcfb9ea1e16c665efd7538fc5d5c34071276ce9220e234217682e7d2c4a5/lxml-6.0.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:9261bb77c2dab42f3ecd9103951aeca2c40277701eb7e912c545c1b16e0e4917", size = 5097185, upload-time = "2025-09-22T04:02:50.746Z" }, + { url = "https://files.pythonhosted.org/packages/21/04/a60b0ff9314736316f28316b694bccbbabe100f8483ad83852d77fc7468e/lxml-6.0.2-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:65ac4a01aba353cfa6d5725b95d7aed6356ddc0a3cd734de00124d285b04b64f", size = 4745895, upload-time = "2025-09-22T04:02:52.968Z" }, + { url = "https://files.pythonhosted.org/packages/d6/bd/7d54bd1846e5a310d9c715921c5faa71cf5c0853372adf78aee70c8d7aa2/lxml-6.0.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:b22a07cbb82fea98f8a2fd814f3d1811ff9ed76d0fc6abc84eb21527596e7cc8", size = 5695246, upload-time = "2025-09-22T04:02:54.798Z" }, + { url = "https://files.pythonhosted.org/packages/fd/32/5643d6ab947bc371da21323acb2a6e603cedbe71cb4c99c8254289ab6f4e/lxml-6.0.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:d759cdd7f3e055d6bc8d9bec3ad905227b2e4c785dc16c372eb5b5e83123f48a", size = 5260797, upload-time = "2025-09-22T04:02:57.058Z" }, + { url = "https://files.pythonhosted.org/packages/33/da/34c1ec4cff1eea7d0b4cd44af8411806ed943141804ac9c5d565302afb78/lxml-6.0.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:945da35a48d193d27c188037a05fec5492937f66fb1958c24fc761fb9d40d43c", size = 5277404, upload-time = "2025-09-22T04:02:58.966Z" }, + { url = "https://files.pythonhosted.org/packages/82/57/4eca3e31e54dc89e2c3507e1cd411074a17565fa5ffc437c4ae0a00d439e/lxml-6.0.2-cp314-cp314-win32.whl", hash = "sha256:be3aaa60da67e6153eb15715cc2e19091af5dc75faef8b8a585aea372507384b", size = 3670072, upload-time = "2025-09-22T04:03:38.05Z" }, + { url = "https://files.pythonhosted.org/packages/e3/e0/c96cf13eccd20c9421ba910304dae0f619724dcf1702864fd59dd386404d/lxml-6.0.2-cp314-cp314-win_amd64.whl", hash = "sha256:fa25afbadead523f7001caf0c2382afd272c315a033a7b06336da2637d92d6ed", size = 4080617, upload-time = "2025-09-22T04:03:39.835Z" }, + { url = "https://files.pythonhosted.org/packages/d5/5d/b3f03e22b3d38d6f188ef044900a9b29b2fe0aebb94625ce9fe244011d34/lxml-6.0.2-cp314-cp314-win_arm64.whl", hash = "sha256:063eccf89df5b24e361b123e257e437f9e9878f425ee9aae3144c77faf6da6d8", size = 3754930, upload-time = "2025-09-22T04:03:41.565Z" }, + { url = "https://files.pythonhosted.org/packages/5e/5c/42c2c4c03554580708fc738d13414801f340c04c3eff90d8d2d227145275/lxml-6.0.2-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:6162a86d86893d63084faaf4ff937b3daea233e3682fb4474db07395794fa80d", size = 8910380, upload-time = "2025-09-22T04:03:01.645Z" }, + { url = "https://files.pythonhosted.org/packages/bf/4f/12df843e3e10d18d468a7557058f8d3733e8b6e12401f30b1ef29360740f/lxml-6.0.2-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:414aaa94e974e23a3e92e7ca5b97d10c0cf37b6481f50911032c69eeb3991bba", size = 4775632, upload-time = "2025-09-22T04:03:03.814Z" }, + { url = "https://files.pythonhosted.org/packages/e4/0c/9dc31e6c2d0d418483cbcb469d1f5a582a1cd00a1f4081953d44051f3c50/lxml-6.0.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:48461bd21625458dd01e14e2c38dd0aea69addc3c4f960c30d9f59d7f93be601", size = 4975171, upload-time = "2025-09-22T04:03:05.651Z" }, + { url = "https://files.pythonhosted.org/packages/e7/2b/9b870c6ca24c841bdd887504808f0417aa9d8d564114689266f19ddf29c8/lxml-6.0.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:25fcc59afc57d527cfc78a58f40ab4c9b8fd096a9a3f964d2781ffb6eb33f4ed", size = 5110109, upload-time = "2025-09-22T04:03:07.452Z" }, + { url = "https://files.pythonhosted.org/packages/bf/0c/4f5f2a4dd319a178912751564471355d9019e220c20d7db3fb8307ed8582/lxml-6.0.2-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5179c60288204e6ddde3f774a93350177e08876eaf3ab78aa3a3649d43eb7d37", size = 5041061, upload-time = "2025-09-22T04:03:09.297Z" }, + { url = "https://files.pythonhosted.org/packages/12/64/554eed290365267671fe001a20d72d14f468ae4e6acef1e179b039436967/lxml-6.0.2-cp314-cp314t-manylinux_2_26_i686.manylinux_2_28_i686.whl", hash = "sha256:967aab75434de148ec80597b75062d8123cadf2943fb4281f385141e18b21338", size = 5306233, upload-time = "2025-09-22T04:03:11.651Z" }, + { url = "https://files.pythonhosted.org/packages/7a/31/1d748aa275e71802ad9722df32a7a35034246b42c0ecdd8235412c3396ef/lxml-6.0.2-cp314-cp314t-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d100fcc8930d697c6561156c6810ab4a508fb264c8b6779e6e61e2ed5e7558f9", size = 5604739, upload-time = "2025-09-22T04:03:13.592Z" }, + { url = "https://files.pythonhosted.org/packages/8f/41/2c11916bcac09ed561adccacceaedd2bf0e0b25b297ea92aab99fd03d0fa/lxml-6.0.2-cp314-cp314t-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2ca59e7e13e5981175b8b3e4ab84d7da57993eeff53c07764dcebda0d0e64ecd", size = 5225119, upload-time = "2025-09-22T04:03:15.408Z" }, + { url = "https://files.pythonhosted.org/packages/99/05/4e5c2873d8f17aa018e6afde417c80cc5d0c33be4854cce3ef5670c49367/lxml-6.0.2-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:957448ac63a42e2e49531b9d6c0fa449a1970dbc32467aaad46f11545be9af1d", size = 4633665, upload-time = "2025-09-22T04:03:17.262Z" }, + { url = "https://files.pythonhosted.org/packages/0f/c9/dcc2da1bebd6275cdc723b515f93edf548b82f36a5458cca3578bc899332/lxml-6.0.2-cp314-cp314t-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b7fc49c37f1786284b12af63152fe1d0990722497e2d5817acfe7a877522f9a9", size = 5234997, upload-time = "2025-09-22T04:03:19.14Z" }, + { url = "https://files.pythonhosted.org/packages/9c/e2/5172e4e7468afca64a37b81dba152fc5d90e30f9c83c7c3213d6a02a5ce4/lxml-6.0.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e19e0643cc936a22e837f79d01a550678da8377d7d801a14487c10c34ee49c7e", size = 5090957, upload-time = "2025-09-22T04:03:21.436Z" }, + { url = "https://files.pythonhosted.org/packages/a5/b3/15461fd3e5cd4ddcb7938b87fc20b14ab113b92312fc97afe65cd7c85de1/lxml-6.0.2-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:1db01e5cf14345628e0cbe71067204db658e2fb8e51e7f33631f5f4735fefd8d", size = 4764372, upload-time = "2025-09-22T04:03:23.27Z" }, + { url = "https://files.pythonhosted.org/packages/05/33/f310b987c8bf9e61c4dd8e8035c416bd3230098f5e3cfa69fc4232de7059/lxml-6.0.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:875c6b5ab39ad5291588aed6925fac99d0097af0dd62f33c7b43736043d4a2ec", size = 5634653, upload-time = "2025-09-22T04:03:25.767Z" }, + { url = "https://files.pythonhosted.org/packages/70/ff/51c80e75e0bc9382158133bdcf4e339b5886c6ee2418b5199b3f1a61ed6d/lxml-6.0.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:cdcbed9ad19da81c480dfd6dd161886db6096083c9938ead313d94b30aadf272", size = 5233795, upload-time = "2025-09-22T04:03:27.62Z" }, + { url = "https://files.pythonhosted.org/packages/56/4d/4856e897df0d588789dd844dbed9d91782c4ef0b327f96ce53c807e13128/lxml-6.0.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:80dadc234ebc532e09be1975ff538d154a7fa61ea5031c03d25178855544728f", size = 5257023, upload-time = "2025-09-22T04:03:30.056Z" }, + { url = "https://files.pythonhosted.org/packages/0f/85/86766dfebfa87bea0ab78e9ff7a4b4b45225df4b4d3b8cc3c03c5cd68464/lxml-6.0.2-cp314-cp314t-win32.whl", hash = "sha256:da08e7bb297b04e893d91087df19638dc7a6bb858a954b0cc2b9f5053c922312", size = 3911420, upload-time = "2025-09-22T04:03:32.198Z" }, + { url = "https://files.pythonhosted.org/packages/fe/1a/b248b355834c8e32614650b8008c69ffeb0ceb149c793961dd8c0b991bb3/lxml-6.0.2-cp314-cp314t-win_amd64.whl", hash = "sha256:252a22982dca42f6155125ac76d3432e548a7625d56f5a273ee78a5057216eca", size = 4406837, upload-time = "2025-09-22T04:03:34.027Z" }, + { url = "https://files.pythonhosted.org/packages/92/aa/df863bcc39c5e0946263454aba394de8a9084dbaff8ad143846b0d844739/lxml-6.0.2-cp314-cp314t-win_arm64.whl", hash = "sha256:bb4c1847b303835d89d785a18801a883436cdfd5dc3d62947f9c49e24f0f5a2c", size = 3822205, upload-time = "2025-09-22T04:03:36.249Z" }, + { url = "https://files.pythonhosted.org/packages/0b/11/29d08bc103a62c0eba8016e7ed5aeebbf1e4312e83b0b1648dd203b0e87d/lxml-6.0.2-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:1c06035eafa8404b5cf475bb37a9f6088b0aca288d4ccc9d69389750d5543700", size = 3949829, upload-time = "2025-09-22T04:04:45.608Z" }, + { url = "https://files.pythonhosted.org/packages/12/b3/52ab9a3b31e5ab8238da241baa19eec44d2ab426532441ee607165aebb52/lxml-6.0.2-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c7d13103045de1bdd6fe5d61802565f1a3537d70cd3abf596aa0af62761921ee", size = 4226277, upload-time = "2025-09-22T04:04:47.754Z" }, + { url = "https://files.pythonhosted.org/packages/a0/33/1eaf780c1baad88224611df13b1c2a9dfa460b526cacfe769103ff50d845/lxml-6.0.2-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0a3c150a95fbe5ac91de323aa756219ef9cf7fde5a3f00e2281e30f33fa5fa4f", size = 4330433, upload-time = "2025-09-22T04:04:49.907Z" }, + { url = "https://files.pythonhosted.org/packages/7a/c1/27428a2ff348e994ab4f8777d3a0ad510b6b92d37718e5887d2da99952a2/lxml-6.0.2-pp311-pypy311_pp73-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:60fa43be34f78bebb27812ed90f1925ec99560b0fa1decdb7d12b84d857d31e9", size = 4272119, upload-time = "2025-09-22T04:04:51.801Z" }, + { url = "https://files.pythonhosted.org/packages/f0/d0/3020fa12bcec4ab62f97aab026d57c2f0cfd480a558758d9ca233bb6a79d/lxml-6.0.2-pp311-pypy311_pp73-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:21c73b476d3cfe836be731225ec3421fa2f048d84f6df6a8e70433dff1376d5a", size = 4417314, upload-time = "2025-09-22T04:04:55.024Z" }, + { url = "https://files.pythonhosted.org/packages/6c/77/d7f491cbc05303ac6801651aabeb262d43f319288c1ea96c66b1d2692ff3/lxml-6.0.2-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:27220da5be049e936c3aca06f174e8827ca6445a4353a1995584311487fc4e3e", size = 3518768, upload-time = "2025-09-22T04:04:57.097Z" }, +] + +[[package]] +name = "markupsafe" +version = "3.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698", size = 80313, upload-time = "2025-09-27T18:37:40.426Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/08/db/fefacb2136439fc8dd20e797950e749aa1f4997ed584c62cfb8ef7c2be0e/markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad", size = 11631, upload-time = "2025-09-27T18:36:18.185Z" }, + { url = "https://files.pythonhosted.org/packages/e1/2e/5898933336b61975ce9dc04decbc0a7f2fee78c30353c5efba7f2d6ff27a/markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a", size = 12058, upload-time = "2025-09-27T18:36:19.444Z" }, + { url = "https://files.pythonhosted.org/packages/1d/09/adf2df3699d87d1d8184038df46a9c80d78c0148492323f4693df54e17bb/markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50", size = 24287, upload-time = "2025-09-27T18:36:20.768Z" }, + { url = "https://files.pythonhosted.org/packages/30/ac/0273f6fcb5f42e314c6d8cd99effae6a5354604d461b8d392b5ec9530a54/markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf", size = 22940, upload-time = "2025-09-27T18:36:22.249Z" }, + { url = "https://files.pythonhosted.org/packages/19/ae/31c1be199ef767124c042c6c3e904da327a2f7f0cd63a0337e1eca2967a8/markupsafe-3.0.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f", size = 21887, upload-time = "2025-09-27T18:36:23.535Z" }, + { url = "https://files.pythonhosted.org/packages/b2/76/7edcab99d5349a4532a459e1fe64f0b0467a3365056ae550d3bcf3f79e1e/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a", size = 23692, upload-time = "2025-09-27T18:36:24.823Z" }, + { url = "https://files.pythonhosted.org/packages/a4/28/6e74cdd26d7514849143d69f0bf2399f929c37dc2b31e6829fd2045b2765/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115", size = 21471, upload-time = "2025-09-27T18:36:25.95Z" }, + { url = "https://files.pythonhosted.org/packages/62/7e/a145f36a5c2945673e590850a6f8014318d5577ed7e5920a4b3448e0865d/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a", size = 22923, upload-time = "2025-09-27T18:36:27.109Z" }, + { url = "https://files.pythonhosted.org/packages/0f/62/d9c46a7f5c9adbeeeda52f5b8d802e1094e9717705a645efc71b0913a0a8/markupsafe-3.0.3-cp311-cp311-win32.whl", hash = "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19", size = 14572, upload-time = "2025-09-27T18:36:28.045Z" }, + { url = "https://files.pythonhosted.org/packages/83/8a/4414c03d3f891739326e1783338e48fb49781cc915b2e0ee052aa490d586/markupsafe-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01", size = 15077, upload-time = "2025-09-27T18:36:29.025Z" }, + { url = "https://files.pythonhosted.org/packages/35/73/893072b42e6862f319b5207adc9ae06070f095b358655f077f69a35601f0/markupsafe-3.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c", size = 13876, upload-time = "2025-09-27T18:36:29.954Z" }, + { url = "https://files.pythonhosted.org/packages/5a/72/147da192e38635ada20e0a2e1a51cf8823d2119ce8883f7053879c2199b5/markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e", size = 11615, upload-time = "2025-09-27T18:36:30.854Z" }, + { url = "https://files.pythonhosted.org/packages/9a/81/7e4e08678a1f98521201c3079f77db69fb552acd56067661f8c2f534a718/markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce", size = 12020, upload-time = "2025-09-27T18:36:31.971Z" }, + { url = "https://files.pythonhosted.org/packages/1e/2c/799f4742efc39633a1b54a92eec4082e4f815314869865d876824c257c1e/markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d", size = 24332, upload-time = "2025-09-27T18:36:32.813Z" }, + { url = "https://files.pythonhosted.org/packages/3c/2e/8d0c2ab90a8c1d9a24f0399058ab8519a3279d1bd4289511d74e909f060e/markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d", size = 22947, upload-time = "2025-09-27T18:36:33.86Z" }, + { url = "https://files.pythonhosted.org/packages/2c/54/887f3092a85238093a0b2154bd629c89444f395618842e8b0c41783898ea/markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a", size = 21962, upload-time = "2025-09-27T18:36:35.099Z" }, + { url = "https://files.pythonhosted.org/packages/c9/2f/336b8c7b6f4a4d95e91119dc8521402461b74a485558d8f238a68312f11c/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b", size = 23760, upload-time = "2025-09-27T18:36:36.001Z" }, + { url = "https://files.pythonhosted.org/packages/32/43/67935f2b7e4982ffb50a4d169b724d74b62a3964bc1a9a527f5ac4f1ee2b/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f", size = 21529, upload-time = "2025-09-27T18:36:36.906Z" }, + { url = "https://files.pythonhosted.org/packages/89/e0/4486f11e51bbba8b0c041098859e869e304d1c261e59244baa3d295d47b7/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b", size = 23015, upload-time = "2025-09-27T18:36:37.868Z" }, + { url = "https://files.pythonhosted.org/packages/2f/e1/78ee7a023dac597a5825441ebd17170785a9dab23de95d2c7508ade94e0e/markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d", size = 14540, upload-time = "2025-09-27T18:36:38.761Z" }, + { url = "https://files.pythonhosted.org/packages/aa/5b/bec5aa9bbbb2c946ca2733ef9c4ca91c91b6a24580193e891b5f7dbe8e1e/markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c", size = 15105, upload-time = "2025-09-27T18:36:39.701Z" }, + { url = "https://files.pythonhosted.org/packages/e5/f1/216fc1bbfd74011693a4fd837e7026152e89c4bcf3e77b6692fba9923123/markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f", size = 13906, upload-time = "2025-09-27T18:36:40.689Z" }, + { url = "https://files.pythonhosted.org/packages/38/2f/907b9c7bbba283e68f20259574b13d005c121a0fa4c175f9bed27c4597ff/markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795", size = 11622, upload-time = "2025-09-27T18:36:41.777Z" }, + { url = "https://files.pythonhosted.org/packages/9c/d9/5f7756922cdd676869eca1c4e3c0cd0df60ed30199ffd775e319089cb3ed/markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219", size = 12029, upload-time = "2025-09-27T18:36:43.257Z" }, + { url = "https://files.pythonhosted.org/packages/00/07/575a68c754943058c78f30db02ee03a64b3c638586fba6a6dd56830b30a3/markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6", size = 24374, upload-time = "2025-09-27T18:36:44.508Z" }, + { url = "https://files.pythonhosted.org/packages/a9/21/9b05698b46f218fc0e118e1f8168395c65c8a2c750ae2bab54fc4bd4e0e8/markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676", size = 22980, upload-time = "2025-09-27T18:36:45.385Z" }, + { url = "https://files.pythonhosted.org/packages/7f/71/544260864f893f18b6827315b988c146b559391e6e7e8f7252839b1b846a/markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9", size = 21990, upload-time = "2025-09-27T18:36:46.916Z" }, + { url = "https://files.pythonhosted.org/packages/c2/28/b50fc2f74d1ad761af2f5dcce7492648b983d00a65b8c0e0cb457c82ebbe/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1", size = 23784, upload-time = "2025-09-27T18:36:47.884Z" }, + { url = "https://files.pythonhosted.org/packages/ed/76/104b2aa106a208da8b17a2fb72e033a5a9d7073c68f7e508b94916ed47a9/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc", size = 21588, upload-time = "2025-09-27T18:36:48.82Z" }, + { url = "https://files.pythonhosted.org/packages/b5/99/16a5eb2d140087ebd97180d95249b00a03aa87e29cc224056274f2e45fd6/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12", size = 23041, upload-time = "2025-09-27T18:36:49.797Z" }, + { url = "https://files.pythonhosted.org/packages/19/bc/e7140ed90c5d61d77cea142eed9f9c303f4c4806f60a1044c13e3f1471d0/markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed", size = 14543, upload-time = "2025-09-27T18:36:51.584Z" }, + { url = "https://files.pythonhosted.org/packages/05/73/c4abe620b841b6b791f2edc248f556900667a5a1cf023a6646967ae98335/markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5", size = 15113, upload-time = "2025-09-27T18:36:52.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/3a/fa34a0f7cfef23cf9500d68cb7c32dd64ffd58a12b09225fb03dd37d5b80/markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485", size = 13911, upload-time = "2025-09-27T18:36:53.513Z" }, + { url = "https://files.pythonhosted.org/packages/e4/d7/e05cd7efe43a88a17a37b3ae96e79a19e846f3f456fe79c57ca61356ef01/markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73", size = 11658, upload-time = "2025-09-27T18:36:54.819Z" }, + { url = "https://files.pythonhosted.org/packages/99/9e/e412117548182ce2148bdeacdda3bb494260c0b0184360fe0d56389b523b/markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37", size = 12066, upload-time = "2025-09-27T18:36:55.714Z" }, + { url = "https://files.pythonhosted.org/packages/bc/e6/fa0ffcda717ef64a5108eaa7b4f5ed28d56122c9a6d70ab8b72f9f715c80/markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19", size = 25639, upload-time = "2025-09-27T18:36:56.908Z" }, + { url = "https://files.pythonhosted.org/packages/96/ec/2102e881fe9d25fc16cb4b25d5f5cde50970967ffa5dddafdb771237062d/markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025", size = 23569, upload-time = "2025-09-27T18:36:57.913Z" }, + { url = "https://files.pythonhosted.org/packages/4b/30/6f2fce1f1f205fc9323255b216ca8a235b15860c34b6798f810f05828e32/markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6", size = 23284, upload-time = "2025-09-27T18:36:58.833Z" }, + { url = "https://files.pythonhosted.org/packages/58/47/4a0ccea4ab9f5dcb6f79c0236d954acb382202721e704223a8aafa38b5c8/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f", size = 24801, upload-time = "2025-09-27T18:36:59.739Z" }, + { url = "https://files.pythonhosted.org/packages/6a/70/3780e9b72180b6fecb83a4814d84c3bf4b4ae4bf0b19c27196104149734c/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb", size = 22769, upload-time = "2025-09-27T18:37:00.719Z" }, + { url = "https://files.pythonhosted.org/packages/98/c5/c03c7f4125180fc215220c035beac6b9cb684bc7a067c84fc69414d315f5/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009", size = 23642, upload-time = "2025-09-27T18:37:01.673Z" }, + { url = "https://files.pythonhosted.org/packages/80/d6/2d1b89f6ca4bff1036499b1e29a1d02d282259f3681540e16563f27ebc23/markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354", size = 14612, upload-time = "2025-09-27T18:37:02.639Z" }, + { url = "https://files.pythonhosted.org/packages/2b/98/e48a4bfba0a0ffcf9925fe2d69240bfaa19c6f7507b8cd09c70684a53c1e/markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218", size = 15200, upload-time = "2025-09-27T18:37:03.582Z" }, + { url = "https://files.pythonhosted.org/packages/0e/72/e3cc540f351f316e9ed0f092757459afbc595824ca724cbc5a5d4263713f/markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287", size = 13973, upload-time = "2025-09-27T18:37:04.929Z" }, + { url = "https://files.pythonhosted.org/packages/33/8a/8e42d4838cd89b7dde187011e97fe6c3af66d8c044997d2183fbd6d31352/markupsafe-3.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe", size = 11619, upload-time = "2025-09-27T18:37:06.342Z" }, + { url = "https://files.pythonhosted.org/packages/b5/64/7660f8a4a8e53c924d0fa05dc3a55c9cee10bbd82b11c5afb27d44b096ce/markupsafe-3.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026", size = 12029, upload-time = "2025-09-27T18:37:07.213Z" }, + { url = "https://files.pythonhosted.org/packages/da/ef/e648bfd021127bef5fa12e1720ffed0c6cbb8310c8d9bea7266337ff06de/markupsafe-3.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737", size = 24408, upload-time = "2025-09-27T18:37:09.572Z" }, + { url = "https://files.pythonhosted.org/packages/41/3c/a36c2450754618e62008bf7435ccb0f88053e07592e6028a34776213d877/markupsafe-3.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97", size = 23005, upload-time = "2025-09-27T18:37:10.58Z" }, + { url = "https://files.pythonhosted.org/packages/bc/20/b7fdf89a8456b099837cd1dc21974632a02a999ec9bf7ca3e490aacd98e7/markupsafe-3.0.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d", size = 22048, upload-time = "2025-09-27T18:37:11.547Z" }, + { url = "https://files.pythonhosted.org/packages/9a/a7/591f592afdc734f47db08a75793a55d7fbcc6902a723ae4cfbab61010cc5/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda", size = 23821, upload-time = "2025-09-27T18:37:12.48Z" }, + { url = "https://files.pythonhosted.org/packages/7d/33/45b24e4f44195b26521bc6f1a82197118f74df348556594bd2262bda1038/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf", size = 21606, upload-time = "2025-09-27T18:37:13.485Z" }, + { url = "https://files.pythonhosted.org/packages/ff/0e/53dfaca23a69fbfbbf17a4b64072090e70717344c52eaaaa9c5ddff1e5f0/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe", size = 23043, upload-time = "2025-09-27T18:37:14.408Z" }, + { url = "https://files.pythonhosted.org/packages/46/11/f333a06fc16236d5238bfe74daccbca41459dcd8d1fa952e8fbd5dccfb70/markupsafe-3.0.3-cp314-cp314-win32.whl", hash = "sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9", size = 14747, upload-time = "2025-09-27T18:37:15.36Z" }, + { url = "https://files.pythonhosted.org/packages/28/52/182836104b33b444e400b14f797212f720cbc9ed6ba34c800639d154e821/markupsafe-3.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581", size = 15341, upload-time = "2025-09-27T18:37:16.496Z" }, + { url = "https://files.pythonhosted.org/packages/6f/18/acf23e91bd94fd7b3031558b1f013adfa21a8e407a3fdb32745538730382/markupsafe-3.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4", size = 14073, upload-time = "2025-09-27T18:37:17.476Z" }, + { url = "https://files.pythonhosted.org/packages/3c/f0/57689aa4076e1b43b15fdfa646b04653969d50cf30c32a102762be2485da/markupsafe-3.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab", size = 11661, upload-time = "2025-09-27T18:37:18.453Z" }, + { url = "https://files.pythonhosted.org/packages/89/c3/2e67a7ca217c6912985ec766c6393b636fb0c2344443ff9d91404dc4c79f/markupsafe-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175", size = 12069, upload-time = "2025-09-27T18:37:19.332Z" }, + { url = "https://files.pythonhosted.org/packages/f0/00/be561dce4e6ca66b15276e184ce4b8aec61fe83662cce2f7d72bd3249d28/markupsafe-3.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634", size = 25670, upload-time = "2025-09-27T18:37:20.245Z" }, + { url = "https://files.pythonhosted.org/packages/50/09/c419f6f5a92e5fadde27efd190eca90f05e1261b10dbd8cbcb39cd8ea1dc/markupsafe-3.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50", size = 23598, upload-time = "2025-09-27T18:37:21.177Z" }, + { url = "https://files.pythonhosted.org/packages/22/44/a0681611106e0b2921b3033fc19bc53323e0b50bc70cffdd19f7d679bb66/markupsafe-3.0.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e", size = 23261, upload-time = "2025-09-27T18:37:22.167Z" }, + { url = "https://files.pythonhosted.org/packages/5f/57/1b0b3f100259dc9fffe780cfb60d4be71375510e435efec3d116b6436d43/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5", size = 24835, upload-time = "2025-09-27T18:37:23.296Z" }, + { url = "https://files.pythonhosted.org/packages/26/6a/4bf6d0c97c4920f1597cc14dd720705eca0bf7c787aebc6bb4d1bead5388/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523", size = 22733, upload-time = "2025-09-27T18:37:24.237Z" }, + { url = "https://files.pythonhosted.org/packages/14/c7/ca723101509b518797fedc2fdf79ba57f886b4aca8a7d31857ba3ee8281f/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc", size = 23672, upload-time = "2025-09-27T18:37:25.271Z" }, + { url = "https://files.pythonhosted.org/packages/fb/df/5bd7a48c256faecd1d36edc13133e51397e41b73bb77e1a69deab746ebac/markupsafe-3.0.3-cp314-cp314t-win32.whl", hash = "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d", size = 14819, upload-time = "2025-09-27T18:37:26.285Z" }, + { url = "https://files.pythonhosted.org/packages/1a/8a/0402ba61a2f16038b48b39bccca271134be00c5c9f0f623208399333c448/markupsafe-3.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9", size = 15426, upload-time = "2025-09-27T18:37:27.316Z" }, + { url = "https://files.pythonhosted.org/packages/70/bc/6f1c2f612465f5fa89b95bead1f44dcb607670fd42891d8fdcd5d039f4f4/markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa", size = 14146, upload-time = "2025-09-27T18:37:28.327Z" }, +] + +[[package]] +name = "marshmallow" +version = "3.26.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "packaging" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ab/5e/5e53d26b42ab75491cda89b871dab9e97c840bf12c63ec58a1919710cd06/marshmallow-3.26.1.tar.gz", hash = "sha256:e6d8affb6cb61d39d26402096dc0aee12d5a26d490a121f118d2e81dc0719dc6", size = 221825, upload-time = "2025-02-03T15:32:25.093Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/34/75/51952c7b2d3873b44a0028b1bd26a25078c18f92f256608e8d1dc61b39fd/marshmallow-3.26.1-py3-none-any.whl", hash = "sha256:3350409f20a70a7e4e11a27661187b77cdcaeb20abca41c1454fe33636bea09c", size = 50878, upload-time = "2025-02-03T15:32:22.295Z" }, +] + +[[package]] +name = "matplotlib-inline" +version = "0.2.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c7/74/97e72a36efd4ae2bccb3463284300f8953f199b5ffbc04cbbb0ec78f74b1/matplotlib_inline-0.2.1.tar.gz", hash = "sha256:e1ee949c340d771fc39e241ea75683deb94762c8fa5f2927ec57c83c4dffa9fe", size = 8110, upload-time = "2025-10-23T09:00:22.126Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/af/33/ee4519fa02ed11a94aef9559552f3b17bb863f2ecfe1a35dc7f548cde231/matplotlib_inline-0.2.1-py3-none-any.whl", hash = "sha256:d56ce5156ba6085e00a9d54fead6ed29a9c47e215cd1bba2e976ef39f5710a76", size = 9516, upload-time = "2025-10-23T09:00:20.675Z" }, +] + +[[package]] +name = "mcp" +version = "1.24.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "httpx" }, + { name = "httpx-sse" }, + { name = "jsonschema" }, + { name = "pydantic" }, + { name = "pydantic-settings" }, + { name = "pyjwt", extra = ["crypto"] }, + { name = "python-multipart" }, + { name = "pywin32", marker = "sys_platform == 'win32'" }, + { name = "sse-starlette" }, + { name = "starlette" }, + { name = "typing-extensions" }, + { name = "typing-inspection" }, + { name = "uvicorn", marker = "sys_platform != 'emscripten'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d6/2c/db9ae5ab1fcdd9cd2bcc7ca3b7361b712e30590b64d5151a31563af8f82d/mcp-1.24.0.tar.gz", hash = "sha256:aeaad134664ce56f2721d1abf300666a1e8348563f4d3baff361c3b652448efc", size = 604375, upload-time = "2025-12-12T14:19:38.205Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/61/0d/5cf14e177c8ae655a2fd9324a6ef657ca4cafd3fc2201c87716055e29641/mcp-1.24.0-py3-none-any.whl", hash = "sha256:db130e103cc50ddc3dffc928382f33ba3eaef0b711f7a87c05e7ded65b1ca062", size = 232896, upload-time = "2025-12-12T14:19:36.14Z" }, +] + +[[package]] +name = "mirofish-backend" +version = "0.1.0" +source = { editable = "." } +dependencies = [ + { name = "camel-ai" }, + { name = "camel-oasis" }, + { name = "chardet" }, + { name = "charset-normalizer" }, + { name = "flask" }, + { name = "flask-cors" }, + { name = "openai" }, + { name = "pydantic" }, + { name = "pymupdf" }, + { name = "python-dotenv" }, + { name = "zep-cloud" }, +] + +[package.optional-dependencies] +dev = [ + { name = "pipreqs" }, + { name = "pytest" }, + { name = "pytest-asyncio" }, +] + +[package.dev-dependencies] +dev = [ + { name = "pytest" }, + { name = "pytest-asyncio" }, +] + +[package.metadata] +requires-dist = [ + { name = "camel-ai", specifier = "==0.2.78" }, + { name = "camel-oasis", specifier = "==0.2.5" }, + { name = "chardet", specifier = ">=5.0.0" }, + { name = "charset-normalizer", specifier = ">=3.0.0" }, + { name = "flask", specifier = ">=3.0.0" }, + { name = "flask-cors", specifier = ">=6.0.0" }, + { name = "openai", specifier = ">=1.0.0" }, + { name = "pipreqs", marker = "extra == 'dev'", specifier = ">=0.5.0" }, + { name = "pydantic", specifier = ">=2.0.0" }, + { name = "pymupdf", specifier = ">=1.24.0" }, + { name = "pytest", marker = "extra == 'dev'", specifier = ">=8.0.0" }, + { name = "pytest-asyncio", marker = "extra == 'dev'", specifier = ">=0.23.0" }, + { name = "python-dotenv", specifier = ">=1.0.0" }, + { name = "zep-cloud", specifier = "==3.13.0" }, +] +provides-extras = ["dev"] + +[package.metadata.requires-dev] +dev = [ + { name = "pytest", specifier = ">=8.0.0" }, + { name = "pytest-asyncio", specifier = ">=0.23.0" }, +] + +[[package]] +name = "mistune" +version = "3.1.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d7/02/a7fb8b21d4d55ac93cdcde9d3638da5dd0ebdd3a4fed76c7725e10b81cbe/mistune-3.1.4.tar.gz", hash = "sha256:b5a7f801d389f724ec702840c11d8fc48f2b33519102fc7ee739e8177b672164", size = 94588, upload-time = "2025-08-29T07:20:43.594Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7a/f0/8282d9641415e9e33df173516226b404d367a0fc55e1a60424a152913abc/mistune-3.1.4-py3-none-any.whl", hash = "sha256:93691da911e5d9d2e23bc54472892aff676df27a75274962ff9edc210364266d", size = 53481, upload-time = "2025-08-29T07:20:42.218Z" }, +] + +[[package]] +name = "mpmath" +version = "1.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e0/47/dd32fa426cc72114383ac549964eecb20ecfd886d1e5ccf5340b55b02f57/mpmath-1.3.0.tar.gz", hash = "sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f", size = 508106, upload-time = "2023-03-07T16:47:11.061Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/43/e3/7d92a15f894aa0c9c4b49b8ee9ac9850d6e63b03c9c32c0367a13ae62209/mpmath-1.3.0-py3-none-any.whl", hash = "sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c", size = 536198, upload-time = "2023-03-07T16:47:09.197Z" }, +] + +[[package]] +name = "mypy-extensions" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343, upload-time = "2025-04-22T14:54:24.164Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" }, +] + +[[package]] +name = "nbclient" +version = "0.10.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jupyter-client" }, + { name = "jupyter-core" }, + { name = "nbformat" }, + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/87/66/7ffd18d58eae90d5721f9f39212327695b749e23ad44b3881744eaf4d9e8/nbclient-0.10.2.tar.gz", hash = "sha256:90b7fc6b810630db87a6d0c2250b1f0ab4cf4d3c27a299b0cde78a4ed3fd9193", size = 62424, upload-time = "2024-12-19T10:32:27.164Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/34/6d/e7fa07f03a4a7b221d94b4d586edb754a9b0dc3c9e2c93353e9fa4e0d117/nbclient-0.10.2-py3-none-any.whl", hash = "sha256:4ffee11e788b4a27fabeb7955547e4318a5298f34342a4bfd01f2e1faaeadc3d", size = 25434, upload-time = "2024-12-19T10:32:24.139Z" }, +] + +[[package]] +name = "nbconvert" +version = "7.16.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "beautifulsoup4" }, + { name = "bleach", extra = ["css"] }, + { name = "defusedxml" }, + { name = "jinja2" }, + { name = "jupyter-core" }, + { name = "jupyterlab-pygments" }, + { name = "markupsafe" }, + { name = "mistune" }, + { name = "nbclient" }, + { name = "nbformat" }, + { name = "packaging" }, + { name = "pandocfilters" }, + { name = "pygments" }, + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a3/59/f28e15fc47ffb73af68a8d9b47367a8630d76e97ae85ad18271b9db96fdf/nbconvert-7.16.6.tar.gz", hash = "sha256:576a7e37c6480da7b8465eefa66c17844243816ce1ccc372633c6b71c3c0f582", size = 857715, upload-time = "2025-01-28T09:29:14.724Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cc/9a/cd673b2f773a12c992f41309ef81b99da1690426bd2f96957a7ade0d3ed7/nbconvert-7.16.6-py3-none-any.whl", hash = "sha256:1375a7b67e0c2883678c48e506dc320febb57685e5ee67faa51b18a90f3a712b", size = 258525, upload-time = "2025-01-28T09:29:12.551Z" }, +] + +[[package]] +name = "nbformat" +version = "5.10.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "fastjsonschema" }, + { name = "jsonschema" }, + { name = "jupyter-core" }, + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/6d/fd/91545e604bc3dad7dca9ed03284086039b294c6b3d75c0d2fa45f9e9caf3/nbformat-5.10.4.tar.gz", hash = "sha256:322168b14f937a5d11362988ecac2a4952d3d8e3a2cbeb2319584631226d5b3a", size = 142749, upload-time = "2024-04-04T11:20:37.371Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a9/82/0340caa499416c78e5d8f5f05947ae4bc3cba53c9f038ab6e9ed964e22f1/nbformat-5.10.4-py3-none-any.whl", hash = "sha256:3b48d6c8fbca4b299bf3982ea7db1af21580e4fec269ad087b9e81588891200b", size = 78454, upload-time = "2024-04-04T11:20:34.895Z" }, +] + +[[package]] +name = "neo4j" +version = "5.23.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pytz" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e1/14/86f149430f2e6ffe63f5726951720b7cf4136ee1676eb077c4ade94959df/neo4j-5.23.0.tar.gz", hash = "sha256:26b06dac3a4b93d882a61714c5ca8d06fe68f697cbdfe113ab840d651a2d46a2", size = 215255, upload-time = "2024-07-29T10:22:29.973Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6f/10/0feaa10a342f5c06ffc5bfe3e5e52a9950094186889208251de39092237b/neo4j-5.23.0-py3-none-any.whl", hash = "sha256:5d8d2f45227c12d6ba564720cbc3e2f57aac472e4fa14fe69270e4f952791020", size = 293671, upload-time = "2024-07-29T10:22:24.874Z" }, +] + +[[package]] +name = "networkx" +version = "3.6.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/6a/51/63fe664f3908c97be9d2e4f1158eb633317598cfa6e1fc14af5383f17512/networkx-3.6.1.tar.gz", hash = "sha256:26b7c357accc0c8cde558ad486283728b65b6a95d85ee1cd66bafab4c8168509", size = 2517025, upload-time = "2025-12-08T17:02:39.908Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9e/c9/b2622292ea83fbb4ec318f5b9ab867d0a28ab43c5717bb85b0a5f6b3b0a4/networkx-3.6.1-py3-none-any.whl", hash = "sha256:d47fbf302e7d9cbbb9e2555a0d267983d2aa476bac30e90dfbe5669bd57f3762", size = 2068504, upload-time = "2025-12-08T17:02:38.159Z" }, +] + +[[package]] +name = "nltk" +version = "3.9.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "joblib" }, + { name = "regex" }, + { name = "tqdm" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f9/76/3a5e4312c19a028770f86fd7c058cf9f4ec4321c6cf7526bab998a5b683c/nltk-3.9.2.tar.gz", hash = "sha256:0f409e9b069ca4177c1903c3e843eef90c7e92992fa4931ae607da6de49e1419", size = 2887629, upload-time = "2025-10-01T07:19:23.764Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/60/90/81ac364ef94209c100e12579629dc92bf7a709a84af32f8c551b02c07e94/nltk-3.9.2-py3-none-any.whl", hash = "sha256:1e209d2b3009110635ed9709a67a1a3e33a10f799490fa71cf4bec218c11c88a", size = 1513404, upload-time = "2025-10-01T07:19:21.648Z" }, +] + +[[package]] +name = "nodeenv" +version = "1.9.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/43/16/fc88b08840de0e0a72a2f9d8c6bae36be573e475a6326ae854bcc549fc45/nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f", size = 47437, upload-time = "2024-06-04T18:44:11.171Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d2/1d/1b658dbd2b9fa9c4c9f32accbfc0205d532c8c6194dc0f2a4c0428e7128a/nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9", size = 22314, upload-time = "2024-06-04T18:44:08.352Z" }, +] + +[[package]] +name = "numpy" +version = "2.3.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/76/65/21b3bc86aac7b8f2862db1e808f1ea22b028e30a225a34a5ede9bf8678f2/numpy-2.3.5.tar.gz", hash = "sha256:784db1dcdab56bf0517743e746dfb0f885fc68d948aba86eeec2cba234bdf1c0", size = 20584950, upload-time = "2025-11-16T22:52:42.067Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/43/77/84dd1d2e34d7e2792a236ba180b5e8fcc1e3e414e761ce0253f63d7f572e/numpy-2.3.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:de5672f4a7b200c15a4127042170a694d4df43c992948f5e1af57f0174beed10", size = 17034641, upload-time = "2025-11-16T22:49:19.336Z" }, + { url = "https://files.pythonhosted.org/packages/2a/ea/25e26fa5837106cde46ae7d0b667e20f69cbbc0efd64cba8221411ab26ae/numpy-2.3.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:acfd89508504a19ed06ef963ad544ec6664518c863436306153e13e94605c218", size = 12528324, upload-time = "2025-11-16T22:49:22.582Z" }, + { url = "https://files.pythonhosted.org/packages/4d/1a/e85f0eea4cf03d6a0228f5c0256b53f2df4bc794706e7df019fc622e47f1/numpy-2.3.5-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:ffe22d2b05504f786c867c8395de703937f934272eb67586817b46188b4ded6d", size = 5356872, upload-time = "2025-11-16T22:49:25.408Z" }, + { url = "https://files.pythonhosted.org/packages/5c/bb/35ef04afd567f4c989c2060cde39211e4ac5357155c1833bcd1166055c61/numpy-2.3.5-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:872a5cf366aec6bb1147336480fef14c9164b154aeb6542327de4970282cd2f5", size = 6893148, upload-time = "2025-11-16T22:49:27.549Z" }, + { url = "https://files.pythonhosted.org/packages/f2/2b/05bbeb06e2dff5eab512dfc678b1cc5ee94d8ac5956a0885c64b6b26252b/numpy-2.3.5-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3095bdb8dd297e5920b010e96134ed91d852d81d490e787beca7e35ae1d89cf7", size = 14557282, upload-time = "2025-11-16T22:49:30.964Z" }, + { url = "https://files.pythonhosted.org/packages/65/fb/2b23769462b34398d9326081fad5655198fcf18966fcb1f1e49db44fbf31/numpy-2.3.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8cba086a43d54ca804ce711b2a940b16e452807acebe7852ff327f1ecd49b0d4", size = 16897903, upload-time = "2025-11-16T22:49:34.191Z" }, + { url = "https://files.pythonhosted.org/packages/ac/14/085f4cf05fc3f1e8aa95e85404e984ffca9b2275a5dc2b1aae18a67538b8/numpy-2.3.5-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6cf9b429b21df6b99f4dee7a1218b8b7ffbbe7df8764dc0bd60ce8a0708fed1e", size = 16341672, upload-time = "2025-11-16T22:49:37.2Z" }, + { url = "https://files.pythonhosted.org/packages/6f/3b/1f73994904142b2aa290449b3bb99772477b5fd94d787093e4f24f5af763/numpy-2.3.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:396084a36abdb603546b119d96528c2f6263921c50df3c8fd7cb28873a237748", size = 18838896, upload-time = "2025-11-16T22:49:39.727Z" }, + { url = "https://files.pythonhosted.org/packages/cd/b9/cf6649b2124f288309ffc353070792caf42ad69047dcc60da85ee85fea58/numpy-2.3.5-cp311-cp311-win32.whl", hash = "sha256:b0c7088a73aef3d687c4deef8452a3ac7c1be4e29ed8bf3b366c8111128ac60c", size = 6563608, upload-time = "2025-11-16T22:49:42.079Z" }, + { url = "https://files.pythonhosted.org/packages/aa/44/9fe81ae1dcc29c531843852e2874080dc441338574ccc4306b39e2ff6e59/numpy-2.3.5-cp311-cp311-win_amd64.whl", hash = "sha256:a414504bef8945eae5f2d7cb7be2d4af77c5d1cb5e20b296c2c25b61dff2900c", size = 13078442, upload-time = "2025-11-16T22:49:43.99Z" }, + { url = "https://files.pythonhosted.org/packages/6d/a7/f99a41553d2da82a20a2f22e93c94f928e4490bb447c9ff3c4ff230581d3/numpy-2.3.5-cp311-cp311-win_arm64.whl", hash = "sha256:0cd00b7b36e35398fa2d16af7b907b65304ef8bb4817a550e06e5012929830fa", size = 10458555, upload-time = "2025-11-16T22:49:47.092Z" }, + { url = "https://files.pythonhosted.org/packages/44/37/e669fe6cbb2b96c62f6bbedc6a81c0f3b7362f6a59230b23caa673a85721/numpy-2.3.5-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:74ae7b798248fe62021dbf3c914245ad45d1a6b0cb4a29ecb4b31d0bfbc4cc3e", size = 16733873, upload-time = "2025-11-16T22:49:49.84Z" }, + { url = "https://files.pythonhosted.org/packages/c5/65/df0db6c097892c9380851ab9e44b52d4f7ba576b833996e0080181c0c439/numpy-2.3.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ee3888d9ff7c14604052b2ca5535a30216aa0a58e948cdd3eeb8d3415f638769", size = 12259838, upload-time = "2025-11-16T22:49:52.863Z" }, + { url = "https://files.pythonhosted.org/packages/5b/e1/1ee06e70eb2136797abe847d386e7c0e830b67ad1d43f364dd04fa50d338/numpy-2.3.5-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:612a95a17655e213502f60cfb9bf9408efdc9eb1d5f50535cc6eb365d11b42b5", size = 5088378, upload-time = "2025-11-16T22:49:55.055Z" }, + { url = "https://files.pythonhosted.org/packages/6d/9c/1ca85fb86708724275103b81ec4cf1ac1d08f465368acfc8da7ab545bdae/numpy-2.3.5-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:3101e5177d114a593d79dd79658650fe28b5a0d8abeb8ce6f437c0e6df5be1a4", size = 6628559, upload-time = "2025-11-16T22:49:57.371Z" }, + { url = "https://files.pythonhosted.org/packages/74/78/fcd41e5a0ce4f3f7b003da85825acddae6d7ecb60cf25194741b036ca7d6/numpy-2.3.5-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8b973c57ff8e184109db042c842423ff4f60446239bd585a5131cc47f06f789d", size = 14250702, upload-time = "2025-11-16T22:49:59.632Z" }, + { url = "https://files.pythonhosted.org/packages/b6/23/2a1b231b8ff672b4c450dac27164a8b2ca7d9b7144f9c02d2396518352eb/numpy-2.3.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0d8163f43acde9a73c2a33605353a4f1bc4798745a8b1d73183b28e5b435ae28", size = 16606086, upload-time = "2025-11-16T22:50:02.127Z" }, + { url = "https://files.pythonhosted.org/packages/a0/c5/5ad26fbfbe2012e190cc7d5003e4d874b88bb18861d0829edc140a713021/numpy-2.3.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:51c1e14eb1e154ebd80e860722f9e6ed6ec89714ad2db2d3aa33c31d7c12179b", size = 16025985, upload-time = "2025-11-16T22:50:04.536Z" }, + { url = "https://files.pythonhosted.org/packages/d2/fa/dd48e225c46c819288148d9d060b047fd2a6fb1eb37eae25112ee4cb4453/numpy-2.3.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b46b4ec24f7293f23adcd2d146960559aaf8020213de8ad1909dba6c013bf89c", size = 18542976, upload-time = "2025-11-16T22:50:07.557Z" }, + { url = "https://files.pythonhosted.org/packages/05/79/ccbd23a75862d95af03d28b5c6901a1b7da4803181513d52f3b86ed9446e/numpy-2.3.5-cp312-cp312-win32.whl", hash = "sha256:3997b5b3c9a771e157f9aae01dd579ee35ad7109be18db0e85dbdbe1de06e952", size = 6285274, upload-time = "2025-11-16T22:50:10.746Z" }, + { url = "https://files.pythonhosted.org/packages/2d/57/8aeaf160312f7f489dea47ab61e430b5cb051f59a98ae68b7133ce8fa06a/numpy-2.3.5-cp312-cp312-win_amd64.whl", hash = "sha256:86945f2ee6d10cdfd67bcb4069c1662dd711f7e2a4343db5cecec06b87cf31aa", size = 12782922, upload-time = "2025-11-16T22:50:12.811Z" }, + { url = "https://files.pythonhosted.org/packages/78/a6/aae5cc2ca78c45e64b9ef22f089141d661516856cf7c8a54ba434576900d/numpy-2.3.5-cp312-cp312-win_arm64.whl", hash = "sha256:f28620fe26bee16243be2b7b874da327312240a7cdc38b769a697578d2100013", size = 10194667, upload-time = "2025-11-16T22:50:16.16Z" }, + { url = "https://files.pythonhosted.org/packages/db/69/9cde09f36da4b5a505341180a3f2e6fadc352fd4d2b7096ce9778db83f1a/numpy-2.3.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:d0f23b44f57077c1ede8c5f26b30f706498b4862d3ff0a7298b8411dd2f043ff", size = 16728251, upload-time = "2025-11-16T22:50:19.013Z" }, + { url = "https://files.pythonhosted.org/packages/79/fb/f505c95ceddd7027347b067689db71ca80bd5ecc926f913f1a23e65cf09b/numpy-2.3.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:aa5bc7c5d59d831d9773d1170acac7893ce3a5e130540605770ade83280e7188", size = 12254652, upload-time = "2025-11-16T22:50:21.487Z" }, + { url = "https://files.pythonhosted.org/packages/78/da/8c7738060ca9c31b30e9301ee0cf6c5ffdbf889d9593285a1cead337f9a5/numpy-2.3.5-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:ccc933afd4d20aad3c00bcef049cb40049f7f196e0397f1109dba6fed63267b0", size = 5083172, upload-time = "2025-11-16T22:50:24.562Z" }, + { url = "https://files.pythonhosted.org/packages/a4/b4/ee5bb2537fb9430fd2ef30a616c3672b991a4129bb1c7dcc42aa0abbe5d7/numpy-2.3.5-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:afaffc4393205524af9dfa400fa250143a6c3bc646c08c9f5e25a9f4b4d6a903", size = 6622990, upload-time = "2025-11-16T22:50:26.47Z" }, + { url = "https://files.pythonhosted.org/packages/95/03/dc0723a013c7d7c19de5ef29e932c3081df1c14ba582b8b86b5de9db7f0f/numpy-2.3.5-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9c75442b2209b8470d6d5d8b1c25714270686f14c749028d2199c54e29f20b4d", size = 14248902, upload-time = "2025-11-16T22:50:28.861Z" }, + { url = "https://files.pythonhosted.org/packages/f5/10/ca162f45a102738958dcec8023062dad0cbc17d1ab99d68c4e4a6c45fb2b/numpy-2.3.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11e06aa0af8c0f05104d56450d6093ee639e15f24ecf62d417329d06e522e017", size = 16597430, upload-time = "2025-11-16T22:50:31.56Z" }, + { url = "https://files.pythonhosted.org/packages/2a/51/c1e29be863588db58175175f057286900b4b3327a1351e706d5e0f8dd679/numpy-2.3.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ed89927b86296067b4f81f108a2271d8926467a8868e554eaf370fc27fa3ccaf", size = 16024551, upload-time = "2025-11-16T22:50:34.242Z" }, + { url = "https://files.pythonhosted.org/packages/83/68/8236589d4dbb87253d28259d04d9b814ec0ecce7cb1c7fed29729f4c3a78/numpy-2.3.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:51c55fe3451421f3a6ef9a9c1439e82101c57a2c9eab9feb196a62b1a10b58ce", size = 18533275, upload-time = "2025-11-16T22:50:37.651Z" }, + { url = "https://files.pythonhosted.org/packages/40/56/2932d75b6f13465239e3b7b7e511be27f1b8161ca2510854f0b6e521c395/numpy-2.3.5-cp313-cp313-win32.whl", hash = "sha256:1978155dd49972084bd6ef388d66ab70f0c323ddee6f693d539376498720fb7e", size = 6277637, upload-time = "2025-11-16T22:50:40.11Z" }, + { url = "https://files.pythonhosted.org/packages/0c/88/e2eaa6cffb115b85ed7c7c87775cb8bcf0816816bc98ca8dbfa2ee33fe6e/numpy-2.3.5-cp313-cp313-win_amd64.whl", hash = "sha256:00dc4e846108a382c5869e77c6ed514394bdeb3403461d25a829711041217d5b", size = 12779090, upload-time = "2025-11-16T22:50:42.503Z" }, + { url = "https://files.pythonhosted.org/packages/8f/88/3f41e13a44ebd4034ee17baa384acac29ba6a4fcc2aca95f6f08ca0447d1/numpy-2.3.5-cp313-cp313-win_arm64.whl", hash = "sha256:0472f11f6ec23a74a906a00b48a4dcf3849209696dff7c189714511268d103ae", size = 10194710, upload-time = "2025-11-16T22:50:44.971Z" }, + { url = "https://files.pythonhosted.org/packages/13/cb/71744144e13389d577f867f745b7df2d8489463654a918eea2eeb166dfc9/numpy-2.3.5-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:414802f3b97f3c1eef41e530aaba3b3c1620649871d8cb38c6eaff034c2e16bd", size = 16827292, upload-time = "2025-11-16T22:50:47.715Z" }, + { url = "https://files.pythonhosted.org/packages/71/80/ba9dc6f2a4398e7f42b708a7fdc841bb638d353be255655498edbf9a15a8/numpy-2.3.5-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5ee6609ac3604fa7780e30a03e5e241a7956f8e2fcfe547d51e3afa5247ac47f", size = 12378897, upload-time = "2025-11-16T22:50:51.327Z" }, + { url = "https://files.pythonhosted.org/packages/2e/6d/db2151b9f64264bcceccd51741aa39b50150de9b602d98ecfe7e0c4bff39/numpy-2.3.5-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:86d835afea1eaa143012a2d7a3f45a3adce2d7adc8b4961f0b362214d800846a", size = 5207391, upload-time = "2025-11-16T22:50:54.542Z" }, + { url = "https://files.pythonhosted.org/packages/80/ae/429bacace5ccad48a14c4ae5332f6aa8ab9f69524193511d60ccdfdc65fa/numpy-2.3.5-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:30bc11310e8153ca664b14c5f1b73e94bd0503681fcf136a163de856f3a50139", size = 6721275, upload-time = "2025-11-16T22:50:56.794Z" }, + { url = "https://files.pythonhosted.org/packages/74/5b/1919abf32d8722646a38cd527bc3771eb229a32724ee6ba340ead9b92249/numpy-2.3.5-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1062fde1dcf469571705945b0f221b73928f34a20c904ffb45db101907c3454e", size = 14306855, upload-time = "2025-11-16T22:50:59.208Z" }, + { url = "https://files.pythonhosted.org/packages/a5/87/6831980559434973bebc30cd9c1f21e541a0f2b0c280d43d3afd909b66d0/numpy-2.3.5-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ce581db493ea1a96c0556360ede6607496e8bf9b3a8efa66e06477267bc831e9", size = 16657359, upload-time = "2025-11-16T22:51:01.991Z" }, + { url = "https://files.pythonhosted.org/packages/dd/91/c797f544491ee99fd00495f12ebb7802c440c1915811d72ac5b4479a3356/numpy-2.3.5-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:cc8920d2ec5fa99875b670bb86ddeb21e295cb07aa331810d9e486e0b969d946", size = 16093374, upload-time = "2025-11-16T22:51:05.291Z" }, + { url = "https://files.pythonhosted.org/packages/74/a6/54da03253afcbe7a72785ec4da9c69fb7a17710141ff9ac5fcb2e32dbe64/numpy-2.3.5-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:9ee2197ef8c4f0dfe405d835f3b6a14f5fee7782b5de51ba06fb65fc9b36e9f1", size = 18594587, upload-time = "2025-11-16T22:51:08.585Z" }, + { url = "https://files.pythonhosted.org/packages/80/e9/aff53abbdd41b0ecca94285f325aff42357c6b5abc482a3fcb4994290b18/numpy-2.3.5-cp313-cp313t-win32.whl", hash = "sha256:70b37199913c1bd300ff6e2693316c6f869c7ee16378faf10e4f5e3275b299c3", size = 6405940, upload-time = "2025-11-16T22:51:11.541Z" }, + { url = "https://files.pythonhosted.org/packages/d5/81/50613fec9d4de5480de18d4f8ef59ad7e344d497edbef3cfd80f24f98461/numpy-2.3.5-cp313-cp313t-win_amd64.whl", hash = "sha256:b501b5fa195cc9e24fe102f21ec0a44dffc231d2af79950b451e0d99cea02234", size = 12920341, upload-time = "2025-11-16T22:51:14.312Z" }, + { url = "https://files.pythonhosted.org/packages/bb/ab/08fd63b9a74303947f34f0bd7c5903b9c5532c2d287bead5bdf4c556c486/numpy-2.3.5-cp313-cp313t-win_arm64.whl", hash = "sha256:a80afd79f45f3c4a7d341f13acbe058d1ca8ac017c165d3fa0d3de6bc1a079d7", size = 10262507, upload-time = "2025-11-16T22:51:16.846Z" }, + { url = "https://files.pythonhosted.org/packages/ba/97/1a914559c19e32d6b2e233cf9a6a114e67c856d35b1d6babca571a3e880f/numpy-2.3.5-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:bf06bc2af43fa8d32d30fae16ad965663e966b1a3202ed407b84c989c3221e82", size = 16735706, upload-time = "2025-11-16T22:51:19.558Z" }, + { url = "https://files.pythonhosted.org/packages/57/d4/51233b1c1b13ecd796311216ae417796b88b0616cfd8a33ae4536330748a/numpy-2.3.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:052e8c42e0c49d2575621c158934920524f6c5da05a1d3b9bab5d8e259e045f0", size = 12264507, upload-time = "2025-11-16T22:51:22.492Z" }, + { url = "https://files.pythonhosted.org/packages/45/98/2fe46c5c2675b8306d0b4a3ec3494273e93e1226a490f766e84298576956/numpy-2.3.5-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:1ed1ec893cff7040a02c8aa1c8611b94d395590d553f6b53629a4461dc7f7b63", size = 5093049, upload-time = "2025-11-16T22:51:25.171Z" }, + { url = "https://files.pythonhosted.org/packages/ce/0e/0698378989bb0ac5f1660c81c78ab1fe5476c1a521ca9ee9d0710ce54099/numpy-2.3.5-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:2dcd0808a421a482a080f89859a18beb0b3d1e905b81e617a188bd80422d62e9", size = 6626603, upload-time = "2025-11-16T22:51:27Z" }, + { url = "https://files.pythonhosted.org/packages/5e/a6/9ca0eecc489640615642a6cbc0ca9e10df70df38c4d43f5a928ff18d8827/numpy-2.3.5-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:727fd05b57df37dc0bcf1a27767a3d9a78cbbc92822445f32cc3436ba797337b", size = 14262696, upload-time = "2025-11-16T22:51:29.402Z" }, + { url = "https://files.pythonhosted.org/packages/c8/f6/07ec185b90ec9d7217a00eeeed7383b73d7e709dae2a9a021b051542a708/numpy-2.3.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fffe29a1ef00883599d1dc2c51aa2e5d80afe49523c261a74933df395c15c520", size = 16597350, upload-time = "2025-11-16T22:51:32.167Z" }, + { url = "https://files.pythonhosted.org/packages/75/37/164071d1dde6a1a84c9b8e5b414fa127981bad47adf3a6b7e23917e52190/numpy-2.3.5-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:8f7f0e05112916223d3f438f293abf0727e1181b5983f413dfa2fefc4098245c", size = 16040190, upload-time = "2025-11-16T22:51:35.403Z" }, + { url = "https://files.pythonhosted.org/packages/08/3c/f18b82a406b04859eb026d204e4e1773eb41c5be58410f41ffa511d114ae/numpy-2.3.5-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2e2eb32ddb9ccb817d620ac1d8dae7c3f641c1e5f55f531a33e8ab97960a75b8", size = 18536749, upload-time = "2025-11-16T22:51:39.698Z" }, + { url = "https://files.pythonhosted.org/packages/40/79/f82f572bf44cf0023a2fe8588768e23e1592585020d638999f15158609e1/numpy-2.3.5-cp314-cp314-win32.whl", hash = "sha256:66f85ce62c70b843bab1fb14a05d5737741e74e28c7b8b5a064de10142fad248", size = 6335432, upload-time = "2025-11-16T22:51:42.476Z" }, + { url = "https://files.pythonhosted.org/packages/a3/2e/235b4d96619931192c91660805e5e49242389742a7a82c27665021db690c/numpy-2.3.5-cp314-cp314-win_amd64.whl", hash = "sha256:e6a0bc88393d65807d751a614207b7129a310ca4fe76a74e5c7da5fa5671417e", size = 12919388, upload-time = "2025-11-16T22:51:45.275Z" }, + { url = "https://files.pythonhosted.org/packages/07/2b/29fd75ce45d22a39c61aad74f3d718e7ab67ccf839ca8b60866054eb15f8/numpy-2.3.5-cp314-cp314-win_arm64.whl", hash = "sha256:aeffcab3d4b43712bb7a60b65f6044d444e75e563ff6180af8f98dd4b905dfd2", size = 10476651, upload-time = "2025-11-16T22:51:47.749Z" }, + { url = "https://files.pythonhosted.org/packages/17/e1/f6a721234ebd4d87084cfa68d081bcba2f5cfe1974f7de4e0e8b9b2a2ba1/numpy-2.3.5-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:17531366a2e3a9e30762c000f2c43a9aaa05728712e25c11ce1dbe700c53ad41", size = 16834503, upload-time = "2025-11-16T22:51:50.443Z" }, + { url = "https://files.pythonhosted.org/packages/5c/1c/baf7ffdc3af9c356e1c135e57ab7cf8d247931b9554f55c467efe2c69eff/numpy-2.3.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:d21644de1b609825ede2f48be98dfde4656aefc713654eeee280e37cadc4e0ad", size = 12381612, upload-time = "2025-11-16T22:51:53.609Z" }, + { url = "https://files.pythonhosted.org/packages/74/91/f7f0295151407ddc9ba34e699013c32c3c91944f9b35fcf9281163dc1468/numpy-2.3.5-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:c804e3a5aba5460c73955c955bdbd5c08c354954e9270a2c1565f62e866bdc39", size = 5210042, upload-time = "2025-11-16T22:51:56.213Z" }, + { url = "https://files.pythonhosted.org/packages/2e/3b/78aebf345104ec50dd50a4d06ddeb46a9ff5261c33bcc58b1c4f12f85ec2/numpy-2.3.5-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:cc0a57f895b96ec78969c34f682c602bf8da1a0270b09bc65673df2e7638ec20", size = 6724502, upload-time = "2025-11-16T22:51:58.584Z" }, + { url = "https://files.pythonhosted.org/packages/02/c6/7c34b528740512e57ef1b7c8337ab0b4f0bddf34c723b8996c675bc2bc91/numpy-2.3.5-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:900218e456384ea676e24ea6a0417f030a3b07306d29d7ad843957b40a9d8d52", size = 14308962, upload-time = "2025-11-16T22:52:01.698Z" }, + { url = "https://files.pythonhosted.org/packages/80/35/09d433c5262bc32d725bafc619e095b6a6651caf94027a03da624146f655/numpy-2.3.5-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:09a1bea522b25109bf8e6f3027bd810f7c1085c64a0c7ce050c1676ad0ba010b", size = 16655054, upload-time = "2025-11-16T22:52:04.267Z" }, + { url = "https://files.pythonhosted.org/packages/7a/ab/6a7b259703c09a88804fa2430b43d6457b692378f6b74b356155283566ac/numpy-2.3.5-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:04822c00b5fd0323c8166d66c701dc31b7fbd252c100acd708c48f763968d6a3", size = 16091613, upload-time = "2025-11-16T22:52:08.651Z" }, + { url = "https://files.pythonhosted.org/packages/c2/88/330da2071e8771e60d1038166ff9d73f29da37b01ec3eb43cb1427464e10/numpy-2.3.5-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:d6889ec4ec662a1a37eb4b4fb26b6100841804dac55bd9df579e326cdc146227", size = 18591147, upload-time = "2025-11-16T22:52:11.453Z" }, + { url = "https://files.pythonhosted.org/packages/51/41/851c4b4082402d9ea860c3626db5d5df47164a712cb23b54be028b184c1c/numpy-2.3.5-cp314-cp314t-win32.whl", hash = "sha256:93eebbcf1aafdf7e2ddd44c2923e2672e1010bddc014138b229e49725b4d6be5", size = 6479806, upload-time = "2025-11-16T22:52:14.641Z" }, + { url = "https://files.pythonhosted.org/packages/90/30/d48bde1dfd93332fa557cff1972fbc039e055a52021fbef4c2c4b1eefd17/numpy-2.3.5-cp314-cp314t-win_amd64.whl", hash = "sha256:c8a9958e88b65c3b27e22ca2a076311636850b612d6bbfb76e8d156aacde2aaf", size = 13105760, upload-time = "2025-11-16T22:52:17.975Z" }, + { url = "https://files.pythonhosted.org/packages/2d/fd/4b5eb0b3e888d86aee4d198c23acec7d214baaf17ea93c1adec94c9518b9/numpy-2.3.5-cp314-cp314t-win_arm64.whl", hash = "sha256:6203fdf9f3dc5bdaed7319ad8698e685c7a3be10819f41d32a0723e611733b42", size = 10545459, upload-time = "2025-11-16T22:52:20.55Z" }, + { url = "https://files.pythonhosted.org/packages/c6/65/f9dea8e109371ade9c782b4e4756a82edf9d3366bca495d84d79859a0b79/numpy-2.3.5-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:f0963b55cdd70fad460fa4c1341f12f976bb26cb66021a5580329bd498988310", size = 16910689, upload-time = "2025-11-16T22:52:23.247Z" }, + { url = "https://files.pythonhosted.org/packages/00/4f/edb00032a8fb92ec0a679d3830368355da91a69cab6f3e9c21b64d0bb986/numpy-2.3.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:f4255143f5160d0de972d28c8f9665d882b5f61309d8362fdd3e103cf7bf010c", size = 12457053, upload-time = "2025-11-16T22:52:26.367Z" }, + { url = "https://files.pythonhosted.org/packages/16/a4/e8a53b5abd500a63836a29ebe145fc1ab1f2eefe1cfe59276020373ae0aa/numpy-2.3.5-pp311-pypy311_pp73-macosx_14_0_arm64.whl", hash = "sha256:a4b9159734b326535f4dd01d947f919c6eefd2d9827466a696c44ced82dfbc18", size = 5285635, upload-time = "2025-11-16T22:52:29.266Z" }, + { url = "https://files.pythonhosted.org/packages/a3/2f/37eeb9014d9c8b3e9c55bc599c68263ca44fdbc12a93e45a21d1d56df737/numpy-2.3.5-pp311-pypy311_pp73-macosx_14_0_x86_64.whl", hash = "sha256:2feae0d2c91d46e59fcd62784a3a83b3fb677fead592ce51b5a6fbb4f95965ff", size = 6801770, upload-time = "2025-11-16T22:52:31.421Z" }, + { url = "https://files.pythonhosted.org/packages/7d/e4/68d2f474df2cb671b2b6c2986a02e520671295647dad82484cde80ca427b/numpy-2.3.5-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ffac52f28a7849ad7576293c0cb7b9f08304e8f7d738a8cb8a90ec4c55a998eb", size = 14391768, upload-time = "2025-11-16T22:52:33.593Z" }, + { url = "https://files.pythonhosted.org/packages/b8/50/94ccd8a2b141cb50651fddd4f6a48874acb3c91c8f0842b08a6afc4b0b21/numpy-2.3.5-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:63c0e9e7eea69588479ebf4a8a270d5ac22763cc5854e9a7eae952a3908103f7", size = 16729263, upload-time = "2025-11-16T22:52:36.369Z" }, + { url = "https://files.pythonhosted.org/packages/2d/ee/346fa473e666fe14c52fcdd19ec2424157290a032d4c41f98127bfb31ac7/numpy-2.3.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:f16417ec91f12f814b10bafe79ef77e70113a2f5f7018640e7425ff979253425", size = 12967213, upload-time = "2025-11-16T22:52:39.38Z" }, +] + +[[package]] +name = "nvidia-cublas-cu12" +version = "12.8.4.1" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/dc/61/e24b560ab2e2eaeb3c839129175fb330dfcfc29e5203196e5541a4c44682/nvidia_cublas_cu12-12.8.4.1-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:8ac4e771d5a348c551b2a426eda6193c19aa630236b418086020df5ba9667142", size = 594346921, upload-time = "2025-03-07T01:44:31.254Z" }, +] + +[[package]] +name = "nvidia-cuda-cupti-cu12" +version = "12.8.90" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f8/02/2adcaa145158bf1a8295d83591d22e4103dbfd821bcaf6f3f53151ca4ffa/nvidia_cuda_cupti_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ea0cb07ebda26bb9b29ba82cda34849e73c166c18162d3913575b0c9db9a6182", size = 10248621, upload-time = "2025-03-07T01:40:21.213Z" }, +] + +[[package]] +name = "nvidia-cuda-nvrtc-cu12" +version = "12.8.93" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/05/6b/32f747947df2da6994e999492ab306a903659555dddc0fbdeb9d71f75e52/nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:a7756528852ef889772a84c6cd89d41dfa74667e24cca16bb31f8f061e3e9994", size = 88040029, upload-time = "2025-03-07T01:42:13.562Z" }, +] + +[[package]] +name = "nvidia-cuda-runtime-cu12" +version = "12.8.90" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0d/9b/a997b638fcd068ad6e4d53b8551a7d30fe8b404d6f1804abf1df69838932/nvidia_cuda_runtime_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:adade8dcbd0edf427b7204d480d6066d33902cab2a4707dcfc48a2d0fd44ab90", size = 954765, upload-time = "2025-03-07T01:40:01.615Z" }, +] + +[[package]] +name = "nvidia-cudnn-cu12" +version = "9.10.2.21" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "nvidia-cublas-cu12" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/ba/51/e123d997aa098c61d029f76663dedbfb9bc8dcf8c60cbd6adbe42f76d049/nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:949452be657fa16687d0930933f032835951ef0892b37d2d53824d1a84dc97a8", size = 706758467, upload-time = "2025-06-06T21:54:08.597Z" }, +] + +[[package]] +name = "nvidia-cufft-cu12" +version = "11.3.3.83" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "nvidia-nvjitlink-cu12" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/1f/13/ee4e00f30e676b66ae65b4f08cb5bcbb8392c03f54f2d5413ea99a5d1c80/nvidia_cufft_cu12-11.3.3.83-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4d2dd21ec0b88cf61b62e6b43564355e5222e4a3fb394cac0db101f2dd0d4f74", size = 193118695, upload-time = "2025-03-07T01:45:27.821Z" }, +] + +[[package]] +name = "nvidia-cufile-cu12" +version = "1.13.1.3" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bb/fe/1bcba1dfbfb8d01be8d93f07bfc502c93fa23afa6fd5ab3fc7c1df71038a/nvidia_cufile_cu12-1.13.1.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1d069003be650e131b21c932ec3d8969c1715379251f8d23a1860554b1cb24fc", size = 1197834, upload-time = "2025-03-07T01:45:50.723Z" }, +] + +[[package]] +name = "nvidia-curand-cu12" +version = "10.3.9.90" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fb/aa/6584b56dc84ebe9cf93226a5cde4d99080c8e90ab40f0c27bda7a0f29aa1/nvidia_curand_cu12-10.3.9.90-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:b32331d4f4df5d6eefa0554c565b626c7216f87a06a4f56fab27c3b68a830ec9", size = 63619976, upload-time = "2025-03-07T01:46:23.323Z" }, +] + +[[package]] +name = "nvidia-cusolver-cu12" +version = "11.7.3.90" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "nvidia-cublas-cu12" }, + { name = "nvidia-cusparse-cu12" }, + { name = "nvidia-nvjitlink-cu12" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/85/48/9a13d2975803e8cf2777d5ed57b87a0b6ca2cc795f9a4f59796a910bfb80/nvidia_cusolver_cu12-11.7.3.90-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:4376c11ad263152bd50ea295c05370360776f8c3427b30991df774f9fb26c450", size = 267506905, upload-time = "2025-03-07T01:47:16.273Z" }, +] + +[[package]] +name = "nvidia-cusparse-cu12" +version = "12.5.8.93" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "nvidia-nvjitlink-cu12" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/c2/f5/e1854cb2f2bcd4280c44736c93550cc300ff4b8c95ebe370d0aa7d2b473d/nvidia_cusparse_cu12-12.5.8.93-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1ec05d76bbbd8b61b06a80e1eaf8cf4959c3d4ce8e711b65ebd0443bb0ebb13b", size = 288216466, upload-time = "2025-03-07T01:48:13.779Z" }, +] + +[[package]] +name = "nvidia-cusparselt-cu12" +version = "0.7.1" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/56/79/12978b96bd44274fe38b5dde5cfb660b1d114f70a65ef962bcbbed99b549/nvidia_cusparselt_cu12-0.7.1-py3-none-manylinux2014_x86_64.whl", hash = "sha256:f1bb701d6b930d5a7cea44c19ceb973311500847f81b634d802b7b539dc55623", size = 287193691, upload-time = "2025-02-26T00:15:44.104Z" }, +] + +[[package]] +name = "nvidia-nccl-cu12" +version = "2.27.5" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6e/89/f7a07dc961b60645dbbf42e80f2bc85ade7feb9a491b11a1e973aa00071f/nvidia_nccl_cu12-2.27.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ad730cf15cb5d25fe849c6e6ca9eb5b76db16a80f13f425ac68d8e2e55624457", size = 322348229, upload-time = "2025-06-26T04:11:28.385Z" }, +] + +[[package]] +name = "nvidia-nvjitlink-cu12" +version = "12.8.93" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f6/74/86a07f1d0f42998ca31312f998bd3b9a7eff7f52378f4f270c8679c77fb9/nvidia_nvjitlink_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:81ff63371a7ebd6e6451970684f916be2eab07321b73c9d244dc2b4da7f73b88", size = 39254836, upload-time = "2025-03-07T01:49:55.661Z" }, +] + +[[package]] +name = "nvidia-nvshmem-cu12" +version = "3.3.20" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3b/6c/99acb2f9eb85c29fc6f3a7ac4dccfd992e22666dd08a642b303311326a97/nvidia_nvshmem_cu12-3.3.20-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d00f26d3f9b2e3c3065be895e3059d6479ea5c638a3f38c9fec49b1b9dd7c1e5", size = 124657145, upload-time = "2025-08-04T20:25:19.995Z" }, +] + +[[package]] +name = "nvidia-nvtx-cu12" +version = "12.8.90" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a2/eb/86626c1bbc2edb86323022371c39aa48df6fd8b0a1647bc274577f72e90b/nvidia_nvtx_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5b17e2001cc0d751a5bc2c6ec6d26ad95913324a4adb86788c944f8ce9ba441f", size = 89954, upload-time = "2025-03-07T01:42:44.131Z" }, +] + +[[package]] +name = "oauthlib" +version = "3.3.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0b/5f/19930f824ffeb0ad4372da4812c50edbd1434f678c90c2733e1188edfc63/oauthlib-3.3.1.tar.gz", hash = "sha256:0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9", size = 185918, upload-time = "2025-06-19T22:48:08.269Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/be/9c/92789c596b8df838baa98fa71844d84283302f7604ed565dafe5a6b5041a/oauthlib-3.3.1-py3-none-any.whl", hash = "sha256:88119c938d2b8fb88561af5f6ee0eec8cc8d552b7bb1f712743136eb7523b7a1", size = 160065, upload-time = "2025-06-19T22:48:06.508Z" }, +] + +[[package]] +name = "openai" +version = "1.109.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "distro" }, + { name = "httpx" }, + { name = "jiter" }, + { name = "pydantic" }, + { name = "sniffio" }, + { name = "tqdm" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c6/a1/a303104dc55fc546a3f6914c842d3da471c64eec92043aef8f652eb6c524/openai-1.109.1.tar.gz", hash = "sha256:d173ed8dbca665892a6db099b4a2dfac624f94d20a93f46eb0b56aae940ed869", size = 564133, upload-time = "2025-09-24T13:00:53.075Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1d/2a/7dd3d207ec669cacc1f186fd856a0f61dbc255d24f6fdc1a6715d6051b0f/openai-1.109.1-py3-none-any.whl", hash = "sha256:6bcaf57086cf59159b8e27447e4e7dd019db5d29a438072fbd49c290c7e65315", size = 948627, upload-time = "2025-09-24T13:00:50.754Z" }, +] + +[[package]] +name = "openapi-schema-validator" +version = "0.6.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jsonschema" }, + { name = "jsonschema-specifications" }, + { name = "rfc3339-validator" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/8b/f3/5507ad3325169347cd8ced61c232ff3df70e2b250c49f0fe140edb4973c6/openapi_schema_validator-0.6.3.tar.gz", hash = "sha256:f37bace4fc2a5d96692f4f8b31dc0f8d7400fd04f3a937798eaf880d425de6ee", size = 11550, upload-time = "2025-01-10T18:08:22.268Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/21/c6/ad0fba32775ae749016829dace42ed80f4407b171da41313d1a3a5f102e4/openapi_schema_validator-0.6.3-py3-none-any.whl", hash = "sha256:f3b9870f4e556b5a62a1c39da72a6b4b16f3ad9c73dc80084b1b11e74ba148a3", size = 8755, upload-time = "2025-01-10T18:08:19.758Z" }, +] + +[[package]] +name = "openapi-spec-validator" +version = "0.7.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jsonschema" }, + { name = "jsonschema-path" }, + { name = "lazy-object-proxy" }, + { name = "openapi-schema-validator" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/67/fe/21954ff978239dc29ebb313f5c87eeb4ec929b694b9667323086730998e2/openapi_spec_validator-0.7.1.tar.gz", hash = "sha256:8577b85a8268685da6f8aa30990b83b7960d4d1117e901d451b5d572605e5ec7", size = 37985, upload-time = "2023-10-13T11:43:40.53Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2b/4d/e744fff95aaf3aeafc968d5ba7297c8cda0d1ecb8e3acd21b25adae4d835/openapi_spec_validator-0.7.1-py3-none-any.whl", hash = "sha256:3c81825043f24ccbcd2f4b149b11e8231abce5ba84f37065e14ec947d8f4e959", size = 38998, upload-time = "2023-10-13T11:43:38.371Z" }, +] + +[[package]] +name = "packaging" +version = "25.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" }, +] + +[[package]] +name = "pandas" +version = "2.2.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, + { name = "python-dateutil" }, + { name = "pytz" }, + { name = "tzdata" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/88/d9/ecf715f34c73ccb1d8ceb82fc01cd1028a65a5f6dbc57bfa6ea155119058/pandas-2.2.2.tar.gz", hash = "sha256:9e79019aba43cb4fda9e4d983f8e88ca0373adbb697ae9c6c43093218de28b54", size = 4398391, upload-time = "2024-04-10T19:45:48.342Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1b/70/61704497903d43043e288017cb2b82155c0d41e15f5c17807920877b45c2/pandas-2.2.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:696039430f7a562b74fa45f540aca068ea85fa34c244d0deee539cb6d70aa288", size = 12574808, upload-time = "2024-04-10T19:44:35.516Z" }, + { url = "https://files.pythonhosted.org/packages/16/c6/75231fd47afd6b3f89011e7077f1a3958441264aca7ae9ff596e3276a5d0/pandas-2.2.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8e90497254aacacbc4ea6ae5e7a8cd75629d6ad2b30025a4a8b09aa4faf55151", size = 11304876, upload-time = "2024-04-10T19:44:39.37Z" }, + { url = "https://files.pythonhosted.org/packages/97/2d/7b54f80b93379ff94afb3bd9b0cd1d17b48183a0d6f98045bc01ce1e06a7/pandas-2.2.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:58b84b91b0b9f4bafac2a0ac55002280c094dfc6402402332c0913a59654ab2b", size = 15602548, upload-time = "2024-04-10T19:44:42.902Z" }, + { url = "https://files.pythonhosted.org/packages/fc/a5/4d82be566f069d7a9a702dcdf6f9106df0e0b042e738043c0cc7ddd7e3f6/pandas-2.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d2123dc9ad6a814bcdea0f099885276b31b24f7edf40f6cdbc0912672e22eee", size = 13031332, upload-time = "2024-04-10T19:44:46.98Z" }, + { url = "https://files.pythonhosted.org/packages/92/a2/b79c48f530673567805e607712b29814b47dcaf0d167e87145eb4b0118c6/pandas-2.2.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:2925720037f06e89af896c70bca73459d7e6a4be96f9de79e2d440bd499fe0db", size = 16286054, upload-time = "2024-04-10T19:44:50.51Z" }, + { url = "https://files.pythonhosted.org/packages/40/c7/47e94907f1d8fdb4868d61bd6c93d57b3784a964d52691b77ebfdb062842/pandas-2.2.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0cace394b6ea70c01ca1595f839cf193df35d1575986e484ad35c4aeae7266c1", size = 13879507, upload-time = "2024-04-10T19:44:54.412Z" }, + { url = "https://files.pythonhosted.org/packages/ab/63/966db1321a0ad55df1d1fe51505d2cdae191b84c907974873817b0a6e849/pandas-2.2.2-cp311-cp311-win_amd64.whl", hash = "sha256:873d13d177501a28b2756375d59816c365e42ed8417b41665f346289adc68d24", size = 11634249, upload-time = "2024-04-10T19:44:58.183Z" }, + { url = "https://files.pythonhosted.org/packages/dd/49/de869130028fb8d90e25da3b7d8fb13e40f5afa4c4af1781583eb1ff3839/pandas-2.2.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:9dfde2a0ddef507a631dc9dc4af6a9489d5e2e740e226ad426a05cabfbd7c8ef", size = 12500886, upload-time = "2024-04-10T19:45:01.808Z" }, + { url = "https://files.pythonhosted.org/packages/db/7c/9a60add21b96140e22465d9adf09832feade45235cd22f4cb1668a25e443/pandas-2.2.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e9b79011ff7a0f4b1d6da6a61aa1aa604fb312d6647de5bad20013682d1429ce", size = 11340320, upload-time = "2024-04-11T18:36:14.398Z" }, + { url = "https://files.pythonhosted.org/packages/b0/85/f95b5f322e1ae13b7ed7e97bd999160fa003424711ab4dc8344b8772c270/pandas-2.2.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1cb51fe389360f3b5a4d57dbd2848a5f033350336ca3b340d1c53a1fad33bcad", size = 15204346, upload-time = "2024-04-10T19:45:05.903Z" }, + { url = "https://files.pythonhosted.org/packages/40/10/79e52ef01dfeb1c1ca47a109a01a248754ebe990e159a844ece12914de83/pandas-2.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eee3a87076c0756de40b05c5e9a6069c035ba43e8dd71c379e68cab2c20f16ad", size = 12733396, upload-time = "2024-04-10T19:45:09.282Z" }, + { url = "https://files.pythonhosted.org/packages/35/9d/208febf8c4eb5c1d9ea3314d52d8bd415fd0ef0dd66bb24cc5bdbc8fa71a/pandas-2.2.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:3e374f59e440d4ab45ca2fffde54b81ac3834cf5ae2cdfa69c90bc03bde04d76", size = 15858913, upload-time = "2024-04-10T19:45:12.514Z" }, + { url = "https://files.pythonhosted.org/packages/99/d1/2d9bd05def7a9e08a92ec929b5a4c8d5556ec76fae22b0fa486cbf33ea63/pandas-2.2.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:43498c0bdb43d55cb162cdc8c06fac328ccb5d2eabe3cadeb3529ae6f0517c32", size = 13417786, upload-time = "2024-04-10T19:45:16.275Z" }, + { url = "https://files.pythonhosted.org/packages/22/a5/a0b255295406ed54269814bc93723cfd1a0da63fb9aaf99e1364f07923e5/pandas-2.2.2-cp312-cp312-win_amd64.whl", hash = "sha256:d187d355ecec3629624fccb01d104da7d7f391db0311145817525281e2804d23", size = 11498828, upload-time = "2024-04-10T19:45:19.85Z" }, +] + +[[package]] +name = "pandocfilters" +version = "1.5.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/70/6f/3dd4940bbe001c06a65f88e36bad298bc7a0de5036115639926b0c5c0458/pandocfilters-1.5.1.tar.gz", hash = "sha256:002b4a555ee4ebc03f8b66307e287fa492e4a77b4ea14d3f934328297bb4939e", size = 8454, upload-time = "2024-01-18T20:08:13.726Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/af/4fbc8cab944db5d21b7e2a5b8e9211a03a79852b1157e2c102fcc61ac440/pandocfilters-1.5.1-py2.py3-none-any.whl", hash = "sha256:93be382804a9cdb0a7267585f157e5d1731bbe5545a85b268d6f5fe6232de2bc", size = 8663, upload-time = "2024-01-18T20:08:11.28Z" }, +] + +[[package]] +name = "parso" +version = "0.8.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d4/de/53e0bcf53d13e005bd8c92e7855142494f41171b34c2536b86187474184d/parso-0.8.5.tar.gz", hash = "sha256:034d7354a9a018bdce352f48b2a8a450f05e9d6ee85db84764e9b6bd96dafe5a", size = 401205, upload-time = "2025-08-23T15:15:28.028Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/16/32/f8e3c85d1d5250232a5d3477a2a28cc291968ff175caeadaf3cc19ce0e4a/parso-0.8.5-py2.py3-none-any.whl", hash = "sha256:646204b5ee239c396d040b90f9e272e9a8017c630092bf59980beb62fd033887", size = 106668, upload-time = "2025-08-23T15:15:25.663Z" }, +] + +[[package]] +name = "pathable" +version = "0.4.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/67/93/8f2c2075b180c12c1e9f6a09d1a985bc2036906b13dff1d8917e395f2048/pathable-0.4.4.tar.gz", hash = "sha256:6905a3cd17804edfac7875b5f6c9142a218c7caef78693c2dbbbfbac186d88b2", size = 8124, upload-time = "2025-01-10T18:43:13.247Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7d/eb/b6260b31b1a96386c0a880edebe26f89669098acea8e0318bff6adb378fd/pathable-0.4.4-py3-none-any.whl", hash = "sha256:5ae9e94793b6ef5a4cbe0a7ce9dbbefc1eec38df253763fd0aeeacf2762dbbc2", size = 9592, upload-time = "2025-01-10T18:43:11.88Z" }, +] + +[[package]] +name = "pexpect" +version = "4.9.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "ptyprocess" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f", size = 166450, upload-time = "2023-11-25T09:07:26.339Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9e/c3/059298687310d527a58bb01f3b1965787ee3b40dce76752eda8b44e9a2c5/pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523", size = 63772, upload-time = "2023-11-25T06:56:14.81Z" }, +] + +[[package]] +name = "pickleshare" +version = "0.7.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/b6/df3c1c9b616e9c0edbc4fbab6ddd09df9535849c64ba51fcb6531c32d4d8/pickleshare-0.7.5.tar.gz", hash = "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca", size = 6161, upload-time = "2018-09-25T19:17:37.249Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9a/41/220f49aaea88bc6fa6cba8d05ecf24676326156c23b991e80b3f2fc24c77/pickleshare-0.7.5-py2.py3-none-any.whl", hash = "sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56", size = 6877, upload-time = "2018-09-25T19:17:35.817Z" }, +] + +[[package]] +name = "pillow" +version = "10.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ef/43/c50c17c5f7d438e836c169e343695534c38c77f60e7c90389bd77981bc21/pillow-10.3.0.tar.gz", hash = "sha256:9d2455fbf44c914840c793e89aa82d0e1763a14253a000743719ae5946814b2d", size = 46572854, upload-time = "2024-04-01T12:19:40.048Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e5/51/e4b35e394b4e5ca24983e50361a1db3d7da05b1758074f9c4f5b4be4b22a/pillow-10.3.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:5f77cf66e96ae734717d341c145c5949c63180842a545c47a0ce7ae52ca83795", size = 3528936, upload-time = "2024-04-01T12:17:29.322Z" }, + { url = "https://files.pythonhosted.org/packages/00/5c/7633f291def20082bad31b844fe5ed07742aae8504e4cfe2f331ee727178/pillow-10.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e4b878386c4bf293578b48fc570b84ecfe477d3b77ba39a6e87150af77f40c57", size = 3352899, upload-time = "2024-04-01T12:17:31.843Z" }, + { url = "https://files.pythonhosted.org/packages/1d/29/abda81a079cccd1840b0b7b13ad67ffac87cc66395ae20973027280e9f9f/pillow-10.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fdcbb4068117dfd9ce0138d068ac512843c52295ed996ae6dd1faf537b6dbc27", size = 4317733, upload-time = "2024-04-01T12:17:34.494Z" }, + { url = "https://files.pythonhosted.org/packages/77/cd/5205fb43a6000d424291b0525b8201004700d9a34e034517ac4dfdc6eed5/pillow-10.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9797a6c8fe16f25749b371c02e2ade0efb51155e767a971c61734b1bf6293994", size = 4429430, upload-time = "2024-04-01T12:17:37.112Z" }, + { url = "https://files.pythonhosted.org/packages/8c/bb/9e8d2b1b54235bd44139ee387beeb65ad9d8d755b5c01f817070c6dabea7/pillow-10.3.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:9e91179a242bbc99be65e139e30690e081fe6cb91a8e77faf4c409653de39451", size = 4341711, upload-time = "2024-04-01T12:17:39.151Z" }, + { url = "https://files.pythonhosted.org/packages/81/ff/ad3c942d865f9e45ce84eeb31795e6d4d94e1f1eea51026d5154028510d7/pillow-10.3.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:1b87bd9d81d179bd8ab871603bd80d8645729939f90b71e62914e816a76fc6bd", size = 4507469, upload-time = "2024-04-01T12:17:41.159Z" }, + { url = "https://files.pythonhosted.org/packages/ab/ab/30cd50a12d9afa2c412efcb8b37dd3f5f1da4bc77b984ddfbc776d96cf5b/pillow-10.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:81d09caa7b27ef4e61cb7d8fbf1714f5aec1c6b6c5270ee53504981e6e9121ad", size = 4533491, upload-time = "2024-04-01T12:17:43.813Z" }, + { url = "https://files.pythonhosted.org/packages/1f/f0/07419615ffa852cded35dfa3337bf70788f232a3dfe622b97d5eb0c32674/pillow-10.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:048ad577748b9fa4a99a0548c64f2cb8d672d5bf2e643a739ac8faff1164238c", size = 4598334, upload-time = "2024-04-01T12:17:46.271Z" }, + { url = "https://files.pythonhosted.org/packages/9c/f3/6e923786f2b2d167d16783fc079c003aadbcedc4995f54e8429d91aabfc4/pillow-10.3.0-cp311-cp311-win32.whl", hash = "sha256:7161ec49ef0800947dc5570f86568a7bb36fa97dd09e9827dc02b718c5643f09", size = 2217293, upload-time = "2024-04-01T12:17:48.292Z" }, + { url = "https://files.pythonhosted.org/packages/0a/16/c83877524c47976f16703d2e05c363244bc1e60ab439e078b3cd046d07db/pillow-10.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:8eb0908e954d093b02a543dc963984d6e99ad2b5e36503d8a0aaf040505f747d", size = 2531332, upload-time = "2024-04-01T12:17:50.844Z" }, + { url = "https://files.pythonhosted.org/packages/a8/3b/f64454549af90818774c3210b48987c3aeca5285787dbd69869d9a05b58f/pillow-10.3.0-cp311-cp311-win_arm64.whl", hash = "sha256:4e6f7d1c414191c1199f8996d3f2282b9ebea0945693fb67392c75a3a320941f", size = 2229546, upload-time = "2024-04-01T12:17:53.237Z" }, + { url = "https://files.pythonhosted.org/packages/cc/5d/b7fcd38cba0f7706f64c1674fc9f018e4c64f791770598c44affadea7c2f/pillow-10.3.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:e46f38133e5a060d46bd630faa4d9fa0202377495df1f068a8299fd78c84de84", size = 3528535, upload-time = "2024-04-01T12:17:55.891Z" }, + { url = "https://files.pythonhosted.org/packages/5e/77/4cf407e7b033b4d8e5fcaac295b6e159cf1c70fa105d769f01ea2e1e5eca/pillow-10.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:50b8eae8f7334ec826d6eeffaeeb00e36b5e24aa0b9df322c247539714c6df19", size = 3352281, upload-time = "2024-04-01T12:17:58.527Z" }, + { url = "https://files.pythonhosted.org/packages/53/7b/4f7b153a776725a87797d744ea1c73b83ac0b723f5e379297605dee118eb/pillow-10.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9d3bea1c75f8c53ee4d505c3e67d8c158ad4df0d83170605b50b64025917f338", size = 4321427, upload-time = "2024-04-01T12:18:00.809Z" }, + { url = "https://files.pythonhosted.org/packages/45/08/d2cc751b790e77464f8648aa707e2327d6da5d95cf236a532e99c2e7a499/pillow-10.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:19aeb96d43902f0a783946a0a87dbdad5c84c936025b8419da0a0cd7724356b1", size = 4435915, upload-time = "2024-04-01T12:18:03.084Z" }, + { url = "https://files.pythonhosted.org/packages/ef/97/f69d1932cf45bf5bd9fa1e2ae57bdf716524faa4fa9fb7dc62cdb1a19113/pillow-10.3.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:74d28c17412d9caa1066f7a31df8403ec23d5268ba46cd0ad2c50fb82ae40462", size = 4347392, upload-time = "2024-04-01T12:18:05.319Z" }, + { url = "https://files.pythonhosted.org/packages/c6/c1/3521ddb9c1f3ac106af3e4512a98c785b6ed8a39e0f778480b8a4d340165/pillow-10.3.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:ff61bfd9253c3915e6d41c651d5f962da23eda633cf02262990094a18a55371a", size = 4514536, upload-time = "2024-04-01T12:18:08.039Z" }, + { url = "https://files.pythonhosted.org/packages/c0/6f/347c241904a6514e59515284b01ba6f61765269a0d1a19fd2e6cbe331c8a/pillow-10.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d886f5d353333b4771d21267c7ecc75b710f1a73d72d03ca06df49b09015a9ef", size = 4555987, upload-time = "2024-04-01T12:18:10.106Z" }, + { url = "https://files.pythonhosted.org/packages/c3/e2/3cc490c6b2e262713da82ce849c34bd8e6c31242afb53be8595d820b9877/pillow-10.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4b5ec25d8b17217d635f8935dbc1b9aa5907962fae29dff220f2659487891cd3", size = 4623526, upload-time = "2024-04-01T12:18:12.172Z" }, + { url = "https://files.pythonhosted.org/packages/c1/b3/0209f70fa29b383e7618e47db95712a45788dea03bb960601753262a2883/pillow-10.3.0-cp312-cp312-win32.whl", hash = "sha256:51243f1ed5161b9945011a7360e997729776f6e5d7005ba0c6879267d4c5139d", size = 2217547, upload-time = "2024-04-01T12:18:14.188Z" }, + { url = "https://files.pythonhosted.org/packages/d3/23/3927d888481ff7c44fdbca3bc2a2e97588c933db46723bf115201377c436/pillow-10.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:412444afb8c4c7a6cc11a47dade32982439925537e483be7c0ae0cf96c4f6a0b", size = 2531641, upload-time = "2024-04-01T12:18:16.081Z" }, + { url = "https://files.pythonhosted.org/packages/db/36/1ecaa0541d3a1b1362f937d386eeb1875847bfa06d5225f1b0e1588d1007/pillow-10.3.0-cp312-cp312-win_arm64.whl", hash = "sha256:798232c92e7665fe82ac085f9d8e8ca98826f8e27859d9a96b41d519ecd2e49a", size = 2229746, upload-time = "2024-04-01T12:18:18.174Z" }, +] + +[[package]] +name = "pipreqs" +version = "0.5.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "docopt" }, + { name = "ipython" }, + { name = "nbconvert" }, + { name = "yarg" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/12/4c/0a335b1b70c7e1821140ac6f884b51d47f049bcb600fa19bb374922f73aa/pipreqs-0.5.0.tar.gz", hash = "sha256:f33298d235ff76def369cb9a3594d084d9badc70cebba1e8cb271fcd4fdc0183", size = 35240, upload-time = "2024-02-18T17:49:36.607Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/36/38/cc1343c3a63655e18328e51e00c6e6851be648f1b8babffc5131f1b9f226/pipreqs-0.5.0-py3-none-any.whl", hash = "sha256:0809f6217028e35785f80e90217e18043e58c99ba28175e28320f9074dd03874", size = 33496, upload-time = "2024-02-18T17:49:34.148Z" }, +] + +[[package]] +name = "platformdirs" +version = "4.5.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/cf/86/0248f086a84f01b37aaec0fa567b397df1a119f73c16f6c7a9aac73ea309/platformdirs-4.5.1.tar.gz", hash = "sha256:61d5cdcc6065745cdd94f0f878977f8de9437be93de97c1c12f853c9c0cdcbda", size = 21715, upload-time = "2025-12-05T13:52:58.638Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/28/3bfe2fa5a7b9c46fe7e13c97bda14c895fb10fa2ebf1d0abb90e0cea7ee1/platformdirs-4.5.1-py3-none-any.whl", hash = "sha256:d03afa3963c806a9bed9d5125c8f4cb2fdaf74a55ab60e5d59b3fde758104d31", size = 18731, upload-time = "2025-12-05T13:52:56.823Z" }, +] + +[[package]] +name = "pluggy" +version = "1.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, +] + +[[package]] +name = "prance" +version = "23.6.21.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "chardet" }, + { name = "packaging" }, + { name = "requests" }, + { name = "ruamel-yaml" }, + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/73/f0/bcb5ffc8b7ab8e3d02dbef3bd945cf8fd6e12c146774f900659406b9fce1/prance-23.6.21.0.tar.gz", hash = "sha256:d8c15f8ac34019751cc4945f866d8d964d7888016d10de3592e339567177cabe", size = 2798776, upload-time = "2023-06-21T20:01:57.142Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c9/db/4fb4901ee61274d0ab97746461fc5f2637e5d73aa73f34ee28e941a699a1/prance-23.6.21.0-py3-none-any.whl", hash = "sha256:6a4276fa07ed9f22feda4331097d7503c4adc3097e46ffae97425f2c1026bd9f", size = 36279, upload-time = "2023-06-21T20:01:54.936Z" }, +] + +[[package]] +name = "pre-commit" +version = "3.7.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cfgv" }, + { name = "identify" }, + { name = "nodeenv" }, + { name = "pyyaml" }, + { name = "virtualenv" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/aa/46/cc214ef6514270328910083d0119d0a80a6d2c4ec8c6608c0219db0b74cf/pre_commit-3.7.1.tar.gz", hash = "sha256:8ca3ad567bc78a4972a3f1a477e94a79d4597e8140a6e0b651c5e33899c3654a", size = 177317, upload-time = "2024-05-11T01:25:19.473Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b9/0f/d6d0b4e2f5b2933a557087fc0560371aa545a18232d4d3427eb3bb3af12e/pre_commit-3.7.1-py2.py3-none-any.whl", hash = "sha256:fae36fd1d7ad7d6a5a1c0b0d5adb2ed1a3bda5a21bf6c3e5372073d7a11cd4c5", size = 204268, upload-time = "2024-05-11T01:25:16.845Z" }, +] + +[[package]] +name = "prompt-toolkit" +version = "3.0.52" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "wcwidth" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz", hash = "sha256:28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855", size = 434198, upload-time = "2025-08-27T15:24:02.057Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/84/03/0d3ce49e2505ae70cf43bc5bb3033955d2fc9f932163e84dc0779cc47f48/prompt_toolkit-3.0.52-py3-none-any.whl", hash = "sha256:9aac639a3bbd33284347de5ad8d68ecc044b91a762dc39b7c21095fcd6a19955", size = 391431, upload-time = "2025-08-27T15:23:59.498Z" }, +] + +[[package]] +name = "psutil" +version = "5.9.8" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/90/c7/6dc0a455d111f68ee43f27793971cf03fe29b6ef972042549db29eec39a2/psutil-5.9.8.tar.gz", hash = "sha256:6be126e3225486dff286a8fb9a06246a5253f4c7c53b475ea5f5ac934e64194c", size = 503247, upload-time = "2024-01-19T20:47:09.517Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e7/e3/07ae864a636d70a8a6f58da27cb1179192f1140d5d1da10886ade9405797/psutil-5.9.8-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:aee678c8720623dc456fa20659af736241f575d79429a0e5e9cf88ae0605cc81", size = 248702, upload-time = "2024-01-19T20:47:36.303Z" }, + { url = "https://files.pythonhosted.org/packages/b3/bd/28c5f553667116b2598b9cc55908ec435cb7f77a34f2bff3e3ca765b0f78/psutil-5.9.8-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8cb6403ce6d8e047495a701dc7c5bd788add903f8986d523e3e20b98b733e421", size = 285242, upload-time = "2024-01-19T20:47:39.65Z" }, + { url = "https://files.pythonhosted.org/packages/c5/4f/0e22aaa246f96d6ac87fe5ebb9c5a693fbe8877f537a1022527c47ca43c5/psutil-5.9.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d06016f7f8625a1825ba3732081d77c94589dca78b7a3fc072194851e88461a4", size = 288191, upload-time = "2024-01-19T20:47:43.078Z" }, + { url = "https://files.pythonhosted.org/packages/6e/f5/2aa3a4acdc1e5940b59d421742356f133185667dd190b166dbcfcf5d7b43/psutil-5.9.8-cp37-abi3-win32.whl", hash = "sha256:bc56c2a1b0d15aa3eaa5a60c9f3f8e3e565303b465dbf57a1b730e7a2b9844e0", size = 251252, upload-time = "2024-01-19T20:47:52.88Z" }, + { url = "https://files.pythonhosted.org/packages/93/52/3e39d26feae7df0aa0fd510b14012c3678b36ed068f7d78b8d8784d61f0e/psutil-5.9.8-cp37-abi3-win_amd64.whl", hash = "sha256:8db4c1b57507eef143a15a6884ca10f7c73876cdf5d51e713151c1236a0e68cf", size = 255090, upload-time = "2024-01-19T20:47:56.019Z" }, + { url = "https://files.pythonhosted.org/packages/05/33/2d74d588408caedd065c2497bdb5ef83ce6082db01289a1e1147f6639802/psutil-5.9.8-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:d16bbddf0693323b8c6123dd804100241da461e41d6e332fb0ba6058f630f8c8", size = 249898, upload-time = "2024-01-19T20:47:59.238Z" }, +] + +[[package]] +name = "ptyprocess" +version = "0.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220", size = 70762, upload-time = "2020-12-28T15:15:30.155Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/22/a6/858897256d0deac81a172289110f31629fc4cee19b6f01283303e18c8db3/ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", size = 13993, upload-time = "2020-12-28T15:15:28.35Z" }, +] + +[[package]] +name = "pure-eval" +version = "0.2.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/cd/05/0a34433a064256a578f1783a10da6df098ceaa4a57bbeaa96a6c0352786b/pure_eval-0.2.3.tar.gz", hash = "sha256:5f4e983f40564c576c7c8635ae88db5956bb2229d7e9237d03b3c0b0190eaf42", size = 19752, upload-time = "2024-07-21T12:58:21.801Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8e/37/efad0257dc6e593a18957422533ff0f87ede7c9c6ea010a2177d738fb82f/pure_eval-0.2.3-py3-none-any.whl", hash = "sha256:1db8e35b67b3d218d818ae653e27f06c3aa420901fa7b081ca98cbedc874e0d0", size = 11842, upload-time = "2024-07-21T12:58:20.04Z" }, +] + +[[package]] +name = "pycparser" +version = "2.23" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fe/cf/d2d3b9f5699fb1e4615c8e32ff220203e43b248e1dfcc6736ad9057731ca/pycparser-2.23.tar.gz", hash = "sha256:78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2", size = 173734, upload-time = "2025-09-09T13:23:47.91Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a0/e3/59cd50310fc9b59512193629e1984c1f95e5c8ae6e5d8c69532ccc65a7fe/pycparser-2.23-py3-none-any.whl", hash = "sha256:e5c6e8d3fbad53479cab09ac03729e0a9faf2bee3db8208a550daf5af81a5934", size = 118140, upload-time = "2025-09-09T13:23:46.651Z" }, +] + +[[package]] +name = "pydantic" +version = "2.12.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "annotated-types" }, + { name = "pydantic-core" }, + { name = "typing-extensions" }, + { name = "typing-inspection" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/69/44/36f1a6e523abc58ae5f928898e4aca2e0ea509b5aa6f6f392a5d882be928/pydantic-2.12.5.tar.gz", hash = "sha256:4d351024c75c0f085a9febbb665ce8c0c6ec5d30e903bdb6394b7ede26aebb49", size = 821591, upload-time = "2025-11-26T15:11:46.471Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5a/87/b70ad306ebb6f9b585f114d0ac2137d792b48be34d732d60e597c2f8465a/pydantic-2.12.5-py3-none-any.whl", hash = "sha256:e561593fccf61e8a20fc46dfc2dfe075b8be7d0188df33f221ad1f0139180f9d", size = 463580, upload-time = "2025-11-26T15:11:44.605Z" }, +] + +[[package]] +name = "pydantic-core" +version = "2.41.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/71/70/23b021c950c2addd24ec408e9ab05d59b035b39d97cdc1130e1bce647bb6/pydantic_core-2.41.5.tar.gz", hash = "sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e", size = 460952, upload-time = "2025-11-04T13:43:49.098Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e8/72/74a989dd9f2084b3d9530b0915fdda64ac48831c30dbf7c72a41a5232db8/pydantic_core-2.41.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a3a52f6156e73e7ccb0f8cced536adccb7042be67cb45f9562e12b319c119da6", size = 2105873, upload-time = "2025-11-04T13:39:31.373Z" }, + { url = "https://files.pythonhosted.org/packages/12/44/37e403fd9455708b3b942949e1d7febc02167662bf1a7da5b78ee1ea2842/pydantic_core-2.41.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7f3bf998340c6d4b0c9a2f02d6a400e51f123b59565d74dc60d252ce888c260b", size = 1899826, upload-time = "2025-11-04T13:39:32.897Z" }, + { url = "https://files.pythonhosted.org/packages/33/7f/1d5cab3ccf44c1935a359d51a8a2a9e1a654b744b5e7f80d41b88d501eec/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:378bec5c66998815d224c9ca994f1e14c0c21cb95d2f52b6021cc0b2a58f2a5a", size = 1917869, upload-time = "2025-11-04T13:39:34.469Z" }, + { url = "https://files.pythonhosted.org/packages/6e/6a/30d94a9674a7fe4f4744052ed6c5e083424510be1e93da5bc47569d11810/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e7b576130c69225432866fe2f4a469a85a54ade141d96fd396dffcf607b558f8", size = 2063890, upload-time = "2025-11-04T13:39:36.053Z" }, + { url = "https://files.pythonhosted.org/packages/50/be/76e5d46203fcb2750e542f32e6c371ffa9b8ad17364cf94bb0818dbfb50c/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6cb58b9c66f7e4179a2d5e0f849c48eff5c1fca560994d6eb6543abf955a149e", size = 2229740, upload-time = "2025-11-04T13:39:37.753Z" }, + { url = "https://files.pythonhosted.org/packages/d3/ee/fed784df0144793489f87db310a6bbf8118d7b630ed07aa180d6067e653a/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:88942d3a3dff3afc8288c21e565e476fc278902ae4d6d134f1eeda118cc830b1", size = 2350021, upload-time = "2025-11-04T13:39:40.94Z" }, + { url = "https://files.pythonhosted.org/packages/c8/be/8fed28dd0a180dca19e72c233cbf58efa36df055e5b9d90d64fd1740b828/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f31d95a179f8d64d90f6831d71fa93290893a33148d890ba15de25642c5d075b", size = 2066378, upload-time = "2025-11-04T13:39:42.523Z" }, + { url = "https://files.pythonhosted.org/packages/b0/3b/698cf8ae1d536a010e05121b4958b1257f0b5522085e335360e53a6b1c8b/pydantic_core-2.41.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c1df3d34aced70add6f867a8cf413e299177e0c22660cc767218373d0779487b", size = 2175761, upload-time = "2025-11-04T13:39:44.553Z" }, + { url = "https://files.pythonhosted.org/packages/b8/ba/15d537423939553116dea94ce02f9c31be0fa9d0b806d427e0308ec17145/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4009935984bd36bd2c774e13f9a09563ce8de4abaa7226f5108262fa3e637284", size = 2146303, upload-time = "2025-11-04T13:39:46.238Z" }, + { url = "https://files.pythonhosted.org/packages/58/7f/0de669bf37d206723795f9c90c82966726a2ab06c336deba4735b55af431/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:34a64bc3441dc1213096a20fe27e8e128bd3ff89921706e83c0b1ac971276594", size = 2340355, upload-time = "2025-11-04T13:39:48.002Z" }, + { url = "https://files.pythonhosted.org/packages/e5/de/e7482c435b83d7e3c3ee5ee4451f6e8973cff0eb6007d2872ce6383f6398/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c9e19dd6e28fdcaa5a1de679aec4141f691023916427ef9bae8584f9c2fb3b0e", size = 2319875, upload-time = "2025-11-04T13:39:49.705Z" }, + { url = "https://files.pythonhosted.org/packages/fe/e6/8c9e81bb6dd7560e33b9053351c29f30c8194b72f2d6932888581f503482/pydantic_core-2.41.5-cp311-cp311-win32.whl", hash = "sha256:2c010c6ded393148374c0f6f0bf89d206bf3217f201faa0635dcd56bd1520f6b", size = 1987549, upload-time = "2025-11-04T13:39:51.842Z" }, + { url = "https://files.pythonhosted.org/packages/11/66/f14d1d978ea94d1bc21fc98fcf570f9542fe55bfcc40269d4e1a21c19bf7/pydantic_core-2.41.5-cp311-cp311-win_amd64.whl", hash = "sha256:76ee27c6e9c7f16f47db7a94157112a2f3a00e958bc626e2f4ee8bec5c328fbe", size = 2011305, upload-time = "2025-11-04T13:39:53.485Z" }, + { url = "https://files.pythonhosted.org/packages/56/d8/0e271434e8efd03186c5386671328154ee349ff0354d83c74f5caaf096ed/pydantic_core-2.41.5-cp311-cp311-win_arm64.whl", hash = "sha256:4bc36bbc0b7584de96561184ad7f012478987882ebf9f9c389b23f432ea3d90f", size = 1972902, upload-time = "2025-11-04T13:39:56.488Z" }, + { url = "https://files.pythonhosted.org/packages/5f/5d/5f6c63eebb5afee93bcaae4ce9a898f3373ca23df3ccaef086d0233a35a7/pydantic_core-2.41.5-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f41a7489d32336dbf2199c8c0a215390a751c5b014c2c1c5366e817202e9cdf7", size = 2110990, upload-time = "2025-11-04T13:39:58.079Z" }, + { url = "https://files.pythonhosted.org/packages/aa/32/9c2e8ccb57c01111e0fd091f236c7b371c1bccea0fa85247ac55b1e2b6b6/pydantic_core-2.41.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:070259a8818988b9a84a449a2a7337c7f430a22acc0859c6b110aa7212a6d9c0", size = 1896003, upload-time = "2025-11-04T13:39:59.956Z" }, + { url = "https://files.pythonhosted.org/packages/68/b8/a01b53cb0e59139fbc9e4fda3e9724ede8de279097179be4ff31f1abb65a/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e96cea19e34778f8d59fe40775a7a574d95816eb150850a85a7a4c8f4b94ac69", size = 1919200, upload-time = "2025-11-04T13:40:02.241Z" }, + { url = "https://files.pythonhosted.org/packages/38/de/8c36b5198a29bdaade07b5985e80a233a5ac27137846f3bc2d3b40a47360/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed2e99c456e3fadd05c991f8f437ef902e00eedf34320ba2b0842bd1c3ca3a75", size = 2052578, upload-time = "2025-11-04T13:40:04.401Z" }, + { url = "https://files.pythonhosted.org/packages/00/b5/0e8e4b5b081eac6cb3dbb7e60a65907549a1ce035a724368c330112adfdd/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:65840751b72fbfd82c3c640cff9284545342a4f1eb1586ad0636955b261b0b05", size = 2208504, upload-time = "2025-11-04T13:40:06.072Z" }, + { url = "https://files.pythonhosted.org/packages/77/56/87a61aad59c7c5b9dc8caad5a41a5545cba3810c3e828708b3d7404f6cef/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e536c98a7626a98feb2d3eaf75944ef6f3dbee447e1f841eae16f2f0a72d8ddc", size = 2335816, upload-time = "2025-11-04T13:40:07.835Z" }, + { url = "https://files.pythonhosted.org/packages/0d/76/941cc9f73529988688a665a5c0ecff1112b3d95ab48f81db5f7606f522d3/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eceb81a8d74f9267ef4081e246ffd6d129da5d87e37a77c9bde550cb04870c1c", size = 2075366, upload-time = "2025-11-04T13:40:09.804Z" }, + { url = "https://files.pythonhosted.org/packages/d3/43/ebef01f69baa07a482844faaa0a591bad1ef129253ffd0cdaa9d8a7f72d3/pydantic_core-2.41.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d38548150c39b74aeeb0ce8ee1d8e82696f4a4e16ddc6de7b1d8823f7de4b9b5", size = 2171698, upload-time = "2025-11-04T13:40:12.004Z" }, + { url = "https://files.pythonhosted.org/packages/b1/87/41f3202e4193e3bacfc2c065fab7706ebe81af46a83d3e27605029c1f5a6/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c23e27686783f60290e36827f9c626e63154b82b116d7fe9adba1fda36da706c", size = 2132603, upload-time = "2025-11-04T13:40:13.868Z" }, + { url = "https://files.pythonhosted.org/packages/49/7d/4c00df99cb12070b6bccdef4a195255e6020a550d572768d92cc54dba91a/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:482c982f814460eabe1d3bb0adfdc583387bd4691ef00b90575ca0d2b6fe2294", size = 2329591, upload-time = "2025-11-04T13:40:15.672Z" }, + { url = "https://files.pythonhosted.org/packages/cc/6a/ebf4b1d65d458f3cda6a7335d141305dfa19bdc61140a884d165a8a1bbc7/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:bfea2a5f0b4d8d43adf9d7b8bf019fb46fdd10a2e5cde477fbcb9d1fa08c68e1", size = 2319068, upload-time = "2025-11-04T13:40:17.532Z" }, + { url = "https://files.pythonhosted.org/packages/49/3b/774f2b5cd4192d5ab75870ce4381fd89cf218af999515baf07e7206753f0/pydantic_core-2.41.5-cp312-cp312-win32.whl", hash = "sha256:b74557b16e390ec12dca509bce9264c3bbd128f8a2c376eaa68003d7f327276d", size = 1985908, upload-time = "2025-11-04T13:40:19.309Z" }, + { url = "https://files.pythonhosted.org/packages/86/45/00173a033c801cacf67c190fef088789394feaf88a98a7035b0e40d53dc9/pydantic_core-2.41.5-cp312-cp312-win_amd64.whl", hash = "sha256:1962293292865bca8e54702b08a4f26da73adc83dd1fcf26fbc875b35d81c815", size = 2020145, upload-time = "2025-11-04T13:40:21.548Z" }, + { url = "https://files.pythonhosted.org/packages/f9/22/91fbc821fa6d261b376a3f73809f907cec5ca6025642c463d3488aad22fb/pydantic_core-2.41.5-cp312-cp312-win_arm64.whl", hash = "sha256:1746d4a3d9a794cacae06a5eaaccb4b8643a131d45fbc9af23e353dc0a5ba5c3", size = 1976179, upload-time = "2025-11-04T13:40:23.393Z" }, + { url = "https://files.pythonhosted.org/packages/87/06/8806241ff1f70d9939f9af039c6c35f2360cf16e93c2ca76f184e76b1564/pydantic_core-2.41.5-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:941103c9be18ac8daf7b7adca8228f8ed6bb7a1849020f643b3a14d15b1924d9", size = 2120403, upload-time = "2025-11-04T13:40:25.248Z" }, + { url = "https://files.pythonhosted.org/packages/94/02/abfa0e0bda67faa65fef1c84971c7e45928e108fe24333c81f3bfe35d5f5/pydantic_core-2.41.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:112e305c3314f40c93998e567879e887a3160bb8689ef3d2c04b6cc62c33ac34", size = 1896206, upload-time = "2025-11-04T13:40:27.099Z" }, + { url = "https://files.pythonhosted.org/packages/15/df/a4c740c0943e93e6500f9eb23f4ca7ec9bf71b19e608ae5b579678c8d02f/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cbaad15cb0c90aa221d43c00e77bb33c93e8d36e0bf74760cd00e732d10a6a0", size = 1919307, upload-time = "2025-11-04T13:40:29.806Z" }, + { url = "https://files.pythonhosted.org/packages/9a/e3/6324802931ae1d123528988e0e86587c2072ac2e5394b4bc2bc34b61ff6e/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:03ca43e12fab6023fc79d28ca6b39b05f794ad08ec2feccc59a339b02f2b3d33", size = 2063258, upload-time = "2025-11-04T13:40:33.544Z" }, + { url = "https://files.pythonhosted.org/packages/c9/d4/2230d7151d4957dd79c3044ea26346c148c98fbf0ee6ebd41056f2d62ab5/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dc799088c08fa04e43144b164feb0c13f9a0bc40503f8df3e9fde58a3c0c101e", size = 2214917, upload-time = "2025-11-04T13:40:35.479Z" }, + { url = "https://files.pythonhosted.org/packages/e6/9f/eaac5df17a3672fef0081b6c1bb0b82b33ee89aa5cec0d7b05f52fd4a1fa/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:97aeba56665b4c3235a0e52b2c2f5ae9cd071b8a8310ad27bddb3f7fb30e9aa2", size = 2332186, upload-time = "2025-11-04T13:40:37.436Z" }, + { url = "https://files.pythonhosted.org/packages/cf/4e/35a80cae583a37cf15604b44240e45c05e04e86f9cfd766623149297e971/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:406bf18d345822d6c21366031003612b9c77b3e29ffdb0f612367352aab7d586", size = 2073164, upload-time = "2025-11-04T13:40:40.289Z" }, + { url = "https://files.pythonhosted.org/packages/bf/e3/f6e262673c6140dd3305d144d032f7bd5f7497d3871c1428521f19f9efa2/pydantic_core-2.41.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b93590ae81f7010dbe380cdeab6f515902ebcbefe0b9327cc4804d74e93ae69d", size = 2179146, upload-time = "2025-11-04T13:40:42.809Z" }, + { url = "https://files.pythonhosted.org/packages/75/c7/20bd7fc05f0c6ea2056a4565c6f36f8968c0924f19b7d97bbfea55780e73/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:01a3d0ab748ee531f4ea6c3e48ad9dac84ddba4b0d82291f87248f2f9de8d740", size = 2137788, upload-time = "2025-11-04T13:40:44.752Z" }, + { url = "https://files.pythonhosted.org/packages/3a/8d/34318ef985c45196e004bc46c6eab2eda437e744c124ef0dbe1ff2c9d06b/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:6561e94ba9dacc9c61bce40e2d6bdc3bfaa0259d3ff36ace3b1e6901936d2e3e", size = 2340133, upload-time = "2025-11-04T13:40:46.66Z" }, + { url = "https://files.pythonhosted.org/packages/9c/59/013626bf8c78a5a5d9350d12e7697d3d4de951a75565496abd40ccd46bee/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:915c3d10f81bec3a74fbd4faebe8391013ba61e5a1a8d48c4455b923bdda7858", size = 2324852, upload-time = "2025-11-04T13:40:48.575Z" }, + { url = "https://files.pythonhosted.org/packages/1a/d9/c248c103856f807ef70c18a4f986693a46a8ffe1602e5d361485da502d20/pydantic_core-2.41.5-cp313-cp313-win32.whl", hash = "sha256:650ae77860b45cfa6e2cdafc42618ceafab3a2d9a3811fcfbd3bbf8ac3c40d36", size = 1994679, upload-time = "2025-11-04T13:40:50.619Z" }, + { url = "https://files.pythonhosted.org/packages/9e/8b/341991b158ddab181cff136acd2552c9f35bd30380422a639c0671e99a91/pydantic_core-2.41.5-cp313-cp313-win_amd64.whl", hash = "sha256:79ec52ec461e99e13791ec6508c722742ad745571f234ea6255bed38c6480f11", size = 2019766, upload-time = "2025-11-04T13:40:52.631Z" }, + { url = "https://files.pythonhosted.org/packages/73/7d/f2f9db34af103bea3e09735bb40b021788a5e834c81eedb541991badf8f5/pydantic_core-2.41.5-cp313-cp313-win_arm64.whl", hash = "sha256:3f84d5c1b4ab906093bdc1ff10484838aca54ef08de4afa9de0f5f14d69639cd", size = 1981005, upload-time = "2025-11-04T13:40:54.734Z" }, + { url = "https://files.pythonhosted.org/packages/ea/28/46b7c5c9635ae96ea0fbb779e271a38129df2550f763937659ee6c5dbc65/pydantic_core-2.41.5-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:3f37a19d7ebcdd20b96485056ba9e8b304e27d9904d233d7b1015db320e51f0a", size = 2119622, upload-time = "2025-11-04T13:40:56.68Z" }, + { url = "https://files.pythonhosted.org/packages/74/1a/145646e5687e8d9a1e8d09acb278c8535ebe9e972e1f162ed338a622f193/pydantic_core-2.41.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1d1d9764366c73f996edd17abb6d9d7649a7eb690006ab6adbda117717099b14", size = 1891725, upload-time = "2025-11-04T13:40:58.807Z" }, + { url = "https://files.pythonhosted.org/packages/23/04/e89c29e267b8060b40dca97bfc64a19b2a3cf99018167ea1677d96368273/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25e1c2af0fce638d5f1988b686f3b3ea8cd7de5f244ca147c777769e798a9cd1", size = 1915040, upload-time = "2025-11-04T13:41:00.853Z" }, + { url = "https://files.pythonhosted.org/packages/84/a3/15a82ac7bd97992a82257f777b3583d3e84bdb06ba6858f745daa2ec8a85/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:506d766a8727beef16b7adaeb8ee6217c64fc813646b424d0804d67c16eddb66", size = 2063691, upload-time = "2025-11-04T13:41:03.504Z" }, + { url = "https://files.pythonhosted.org/packages/74/9b/0046701313c6ef08c0c1cf0e028c67c770a4e1275ca73131563c5f2a310a/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4819fa52133c9aa3c387b3328f25c1facc356491e6135b459f1de698ff64d869", size = 2213897, upload-time = "2025-11-04T13:41:05.804Z" }, + { url = "https://files.pythonhosted.org/packages/8a/cd/6bac76ecd1b27e75a95ca3a9a559c643b3afcd2dd62086d4b7a32a18b169/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b761d210c9ea91feda40d25b4efe82a1707da2ef62901466a42492c028553a2", size = 2333302, upload-time = "2025-11-04T13:41:07.809Z" }, + { url = "https://files.pythonhosted.org/packages/4c/d2/ef2074dc020dd6e109611a8be4449b98cd25e1b9b8a303c2f0fca2f2bcf7/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22f0fb8c1c583a3b6f24df2470833b40207e907b90c928cc8d3594b76f874375", size = 2064877, upload-time = "2025-11-04T13:41:09.827Z" }, + { url = "https://files.pythonhosted.org/packages/18/66/e9db17a9a763d72f03de903883c057b2592c09509ccfe468187f2a2eef29/pydantic_core-2.41.5-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2782c870e99878c634505236d81e5443092fba820f0373997ff75f90f68cd553", size = 2180680, upload-time = "2025-11-04T13:41:12.379Z" }, + { url = "https://files.pythonhosted.org/packages/d3/9e/3ce66cebb929f3ced22be85d4c2399b8e85b622db77dad36b73c5387f8f8/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:0177272f88ab8312479336e1d777f6b124537d47f2123f89cb37e0accea97f90", size = 2138960, upload-time = "2025-11-04T13:41:14.627Z" }, + { url = "https://files.pythonhosted.org/packages/a6/62/205a998f4327d2079326b01abee48e502ea739d174f0a89295c481a2272e/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:63510af5e38f8955b8ee5687740d6ebf7c2a0886d15a6d65c32814613681bc07", size = 2339102, upload-time = "2025-11-04T13:41:16.868Z" }, + { url = "https://files.pythonhosted.org/packages/3c/0d/f05e79471e889d74d3d88f5bd20d0ed189ad94c2423d81ff8d0000aab4ff/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:e56ba91f47764cc14f1daacd723e3e82d1a89d783f0f5afe9c364b8bb491ccdb", size = 2326039, upload-time = "2025-11-04T13:41:18.934Z" }, + { url = "https://files.pythonhosted.org/packages/ec/e1/e08a6208bb100da7e0c4b288eed624a703f4d129bde2da475721a80cab32/pydantic_core-2.41.5-cp314-cp314-win32.whl", hash = "sha256:aec5cf2fd867b4ff45b9959f8b20ea3993fc93e63c7363fe6851424c8a7e7c23", size = 1995126, upload-time = "2025-11-04T13:41:21.418Z" }, + { url = "https://files.pythonhosted.org/packages/48/5d/56ba7b24e9557f99c9237e29f5c09913c81eeb2f3217e40e922353668092/pydantic_core-2.41.5-cp314-cp314-win_amd64.whl", hash = "sha256:8e7c86f27c585ef37c35e56a96363ab8de4e549a95512445b85c96d3e2f7c1bf", size = 2015489, upload-time = "2025-11-04T13:41:24.076Z" }, + { url = "https://files.pythonhosted.org/packages/4e/bb/f7a190991ec9e3e0ba22e4993d8755bbc4a32925c0b5b42775c03e8148f9/pydantic_core-2.41.5-cp314-cp314-win_arm64.whl", hash = "sha256:e672ba74fbc2dc8eea59fb6d4aed6845e6905fc2a8afe93175d94a83ba2a01a0", size = 1977288, upload-time = "2025-11-04T13:41:26.33Z" }, + { url = "https://files.pythonhosted.org/packages/92/ed/77542d0c51538e32e15afe7899d79efce4b81eee631d99850edc2f5e9349/pydantic_core-2.41.5-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:8566def80554c3faa0e65ac30ab0932b9e3a5cd7f8323764303d468e5c37595a", size = 2120255, upload-time = "2025-11-04T13:41:28.569Z" }, + { url = "https://files.pythonhosted.org/packages/bb/3d/6913dde84d5be21e284439676168b28d8bbba5600d838b9dca99de0fad71/pydantic_core-2.41.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b80aa5095cd3109962a298ce14110ae16b8c1aece8b72f9dafe81cf597ad80b3", size = 1863760, upload-time = "2025-11-04T13:41:31.055Z" }, + { url = "https://files.pythonhosted.org/packages/5a/f0/e5e6b99d4191da102f2b0eb9687aaa7f5bea5d9964071a84effc3e40f997/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3006c3dd9ba34b0c094c544c6006cc79e87d8612999f1a5d43b769b89181f23c", size = 1878092, upload-time = "2025-11-04T13:41:33.21Z" }, + { url = "https://files.pythonhosted.org/packages/71/48/36fb760642d568925953bcc8116455513d6e34c4beaa37544118c36aba6d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72f6c8b11857a856bcfa48c86f5368439f74453563f951e473514579d44aa612", size = 2053385, upload-time = "2025-11-04T13:41:35.508Z" }, + { url = "https://files.pythonhosted.org/packages/20/25/92dc684dd8eb75a234bc1c764b4210cf2646479d54b47bf46061657292a8/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cb1b2f9742240e4bb26b652a5aeb840aa4b417c7748b6f8387927bc6e45e40d", size = 2218832, upload-time = "2025-11-04T13:41:37.732Z" }, + { url = "https://files.pythonhosted.org/packages/e2/09/f53e0b05023d3e30357d82eb35835d0f6340ca344720a4599cd663dca599/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd3d54f38609ff308209bd43acea66061494157703364ae40c951f83ba99a1a9", size = 2327585, upload-time = "2025-11-04T13:41:40Z" }, + { url = "https://files.pythonhosted.org/packages/aa/4e/2ae1aa85d6af35a39b236b1b1641de73f5a6ac4d5a7509f77b814885760c/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ff4321e56e879ee8d2a879501c8e469414d948f4aba74a2d4593184eb326660", size = 2041078, upload-time = "2025-11-04T13:41:42.323Z" }, + { url = "https://files.pythonhosted.org/packages/cd/13/2e215f17f0ef326fc72afe94776edb77525142c693767fc347ed6288728d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d0d2568a8c11bf8225044aa94409e21da0cb09dcdafe9ecd10250b2baad531a9", size = 2173914, upload-time = "2025-11-04T13:41:45.221Z" }, + { url = "https://files.pythonhosted.org/packages/02/7a/f999a6dcbcd0e5660bc348a3991c8915ce6599f4f2c6ac22f01d7a10816c/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:a39455728aabd58ceabb03c90e12f71fd30fa69615760a075b9fec596456ccc3", size = 2129560, upload-time = "2025-11-04T13:41:47.474Z" }, + { url = "https://files.pythonhosted.org/packages/3a/b1/6c990ac65e3b4c079a4fb9f5b05f5b013afa0f4ed6780a3dd236d2cbdc64/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:239edca560d05757817c13dc17c50766136d21f7cd0fac50295499ae24f90fdf", size = 2329244, upload-time = "2025-11-04T13:41:49.992Z" }, + { url = "https://files.pythonhosted.org/packages/d9/02/3c562f3a51afd4d88fff8dffb1771b30cfdfd79befd9883ee094f5b6c0d8/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:2a5e06546e19f24c6a96a129142a75cee553cc018ffee48a460059b1185f4470", size = 2331955, upload-time = "2025-11-04T13:41:54.079Z" }, + { url = "https://files.pythonhosted.org/packages/5c/96/5fb7d8c3c17bc8c62fdb031c47d77a1af698f1d7a406b0f79aaa1338f9ad/pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa", size = 1988906, upload-time = "2025-11-04T13:41:56.606Z" }, + { url = "https://files.pythonhosted.org/packages/22/ed/182129d83032702912c2e2d8bbe33c036f342cc735737064668585dac28f/pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c", size = 1981607, upload-time = "2025-11-04T13:41:58.889Z" }, + { url = "https://files.pythonhosted.org/packages/9f/ed/068e41660b832bb0b1aa5b58011dea2a3fe0ba7861ff38c4d4904c1c1a99/pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008", size = 1974769, upload-time = "2025-11-04T13:42:01.186Z" }, + { url = "https://files.pythonhosted.org/packages/11/72/90fda5ee3b97e51c494938a4a44c3a35a9c96c19bba12372fb9c634d6f57/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b96d5f26b05d03cc60f11a7761a5ded1741da411e7fe0909e27a5e6a0cb7b034", size = 2115441, upload-time = "2025-11-04T13:42:39.557Z" }, + { url = "https://files.pythonhosted.org/packages/1f/53/8942f884fa33f50794f119012dc6a1a02ac43a56407adaac20463df8e98f/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:634e8609e89ceecea15e2d61bc9ac3718caaaa71963717bf3c8f38bfde64242c", size = 1930291, upload-time = "2025-11-04T13:42:42.169Z" }, + { url = "https://files.pythonhosted.org/packages/79/c8/ecb9ed9cd942bce09fc888ee960b52654fbdbede4ba6c2d6e0d3b1d8b49c/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:93e8740d7503eb008aa2df04d3b9735f845d43ae845e6dcd2be0b55a2da43cd2", size = 1948632, upload-time = "2025-11-04T13:42:44.564Z" }, + { url = "https://files.pythonhosted.org/packages/2e/1b/687711069de7efa6af934e74f601e2a4307365e8fdc404703afc453eab26/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f15489ba13d61f670dcc96772e733aad1a6f9c429cc27574c6cdaed82d0146ad", size = 2138905, upload-time = "2025-11-04T13:42:47.156Z" }, + { url = "https://files.pythonhosted.org/packages/09/32/59b0c7e63e277fa7911c2fc70ccfb45ce4b98991e7ef37110663437005af/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:7da7087d756b19037bc2c06edc6c170eeef3c3bafcb8f532ff17d64dc427adfd", size = 2110495, upload-time = "2025-11-04T13:42:49.689Z" }, + { url = "https://files.pythonhosted.org/packages/aa/81/05e400037eaf55ad400bcd318c05bb345b57e708887f07ddb2d20e3f0e98/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:aabf5777b5c8ca26f7824cb4a120a740c9588ed58df9b2d196ce92fba42ff8dc", size = 1915388, upload-time = "2025-11-04T13:42:52.215Z" }, + { url = "https://files.pythonhosted.org/packages/6e/0d/e3549b2399f71d56476b77dbf3cf8937cec5cd70536bdc0e374a421d0599/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c007fe8a43d43b3969e8469004e9845944f1a80e6acd47c150856bb87f230c56", size = 1942879, upload-time = "2025-11-04T13:42:56.483Z" }, + { url = "https://files.pythonhosted.org/packages/f7/07/34573da085946b6a313d7c42f82f16e8920bfd730665de2d11c0c37a74b5/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76d0819de158cd855d1cbb8fcafdf6f5cf1eb8e470abe056d5d161106e38062b", size = 2139017, upload-time = "2025-11-04T13:42:59.471Z" }, + { url = "https://files.pythonhosted.org/packages/5f/9b/1b3f0e9f9305839d7e84912f9e8bfbd191ed1b1ef48083609f0dabde978c/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2379fa7ed44ddecb5bfe4e48577d752db9fc10be00a6b7446e9663ba143de26", size = 2101980, upload-time = "2025-11-04T13:43:25.97Z" }, + { url = "https://files.pythonhosted.org/packages/a4/ed/d71fefcb4263df0da6a85b5d8a7508360f2f2e9b3bf5814be9c8bccdccc1/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:266fb4cbf5e3cbd0b53669a6d1b039c45e3ce651fd5442eff4d07c2cc8d66808", size = 1923865, upload-time = "2025-11-04T13:43:28.763Z" }, + { url = "https://files.pythonhosted.org/packages/ce/3a/626b38db460d675f873e4444b4bb030453bbe7b4ba55df821d026a0493c4/pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58133647260ea01e4d0500089a8c4f07bd7aa6ce109682b1426394988d8aaacc", size = 2134256, upload-time = "2025-11-04T13:43:31.71Z" }, + { url = "https://files.pythonhosted.org/packages/83/d9/8412d7f06f616bbc053d30cb4e5f76786af3221462ad5eee1f202021eb4e/pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:287dad91cfb551c363dc62899a80e9e14da1f0e2b6ebde82c806612ca2a13ef1", size = 2174762, upload-time = "2025-11-04T13:43:34.744Z" }, + { url = "https://files.pythonhosted.org/packages/55/4c/162d906b8e3ba3a99354e20faa1b49a85206c47de97a639510a0e673f5da/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:03b77d184b9eb40240ae9fd676ca364ce1085f203e1b1256f8ab9984dca80a84", size = 2143141, upload-time = "2025-11-04T13:43:37.701Z" }, + { url = "https://files.pythonhosted.org/packages/1f/f2/f11dd73284122713f5f89fc940f370d035fa8e1e078d446b3313955157fe/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:a668ce24de96165bb239160b3d854943128f4334822900534f2fe947930e5770", size = 2330317, upload-time = "2025-11-04T13:43:40.406Z" }, + { url = "https://files.pythonhosted.org/packages/88/9d/b06ca6acfe4abb296110fb1273a4d848a0bfb2ff65f3ee92127b3244e16b/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f14f8f046c14563f8eb3f45f499cc658ab8d10072961e07225e507adb700e93f", size = 2316992, upload-time = "2025-11-04T13:43:43.602Z" }, + { url = "https://files.pythonhosted.org/packages/36/c7/cfc8e811f061c841d7990b0201912c3556bfeb99cdcb7ed24adc8d6f8704/pydantic_core-2.41.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:56121965f7a4dc965bff783d70b907ddf3d57f6eba29b6d2e5dabfaf07799c51", size = 2145302, upload-time = "2025-11-04T13:43:46.64Z" }, +] + +[[package]] +name = "pydantic-settings" +version = "2.12.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pydantic" }, + { name = "python-dotenv" }, + { name = "typing-inspection" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/43/4b/ac7e0aae12027748076d72a8764ff1c9d82ca75a7a52622e67ed3f765c54/pydantic_settings-2.12.0.tar.gz", hash = "sha256:005538ef951e3c2a68e1c08b292b5f2e71490def8589d4221b95dab00dafcfd0", size = 194184, upload-time = "2025-11-10T14:25:47.013Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c1/60/5d4751ba3f4a40a6891f24eec885f51afd78d208498268c734e256fb13c4/pydantic_settings-2.12.0-py3-none-any.whl", hash = "sha256:fddb9fd99a5b18da837b29710391e945b1e30c135477f484084ee513adb93809", size = 51880, upload-time = "2025-11-10T14:25:45.546Z" }, +] + +[[package]] +name = "pygments" +version = "2.19.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", size = 4968631, upload-time = "2025-06-21T13:39:12.283Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c7/21/705964c7812476f378728bdf590ca4b771ec72385c533964653c68e86bdc/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b", size = 1225217, upload-time = "2025-06-21T13:39:07.939Z" }, +] + +[[package]] +name = "pyjwt" +version = "2.10.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e7/46/bd74733ff231675599650d3e47f361794b22ef3e3770998dda30d3b63726/pyjwt-2.10.1.tar.gz", hash = "sha256:3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953", size = 87785, upload-time = "2024-11-28T03:43:29.933Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/61/ad/689f02752eeec26aed679477e80e632ef1b682313be70793d798c1d5fc8f/PyJWT-2.10.1-py3-none-any.whl", hash = "sha256:dcdd193e30abefd5debf142f9adfcdd2b58004e644f25406ffaebd50bd98dacb", size = 22997, upload-time = "2024-11-28T03:43:27.893Z" }, +] + +[package.optional-dependencies] +crypto = [ + { name = "cryptography" }, +] + +[[package]] +name = "pymupdf" +version = "1.26.7" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/48/d6/09b28f027b510838559f7748807192149c419b30cb90e6d5f0cf916dc9dc/pymupdf-1.26.7.tar.gz", hash = "sha256:71add8bdc8eb1aaa207c69a13400693f06ad9b927bea976f5d5ab9df0bb489c3", size = 84327033, upload-time = "2025-12-11T21:48:50.694Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/94/35/cd74cea1787b2247702ef8522186bdef32e9cb30a099e6bb864627ef6045/pymupdf-1.26.7-cp310-abi3-macosx_10_9_x86_64.whl", hash = "sha256:07085718dfdae5ab83b05eb5eb397f863bcc538fe05135318a01ea353e7a1353", size = 23179369, upload-time = "2025-12-11T21:47:21.587Z" }, + { url = "https://files.pythonhosted.org/packages/72/74/448b6172927c829c6a3fba80078d7b0a016ebbe2c9ee528821f5ea21677a/pymupdf-1.26.7-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:31aa9c8377ea1eea02934b92f4dcf79fb2abba0bf41f8a46d64c3e31546a3c02", size = 22470101, upload-time = "2025-12-11T21:47:37.105Z" }, + { url = "https://files.pythonhosted.org/packages/65/e7/47af26f3ac76be7ac3dd4d6cc7ee105948a8355d774e5ca39857bf91c11c/pymupdf-1.26.7-cp310-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:e419b609996434a14a80fa060adec72c434a1cca6a511ec54db9841bc5d51b3c", size = 23502486, upload-time = "2025-12-12T09:51:25.824Z" }, + { url = "https://files.pythonhosted.org/packages/2a/6b/3de1714d734ff949be1e90a22375d0598d3540b22ae73eb85c2d7d1f36a9/pymupdf-1.26.7-cp310-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:69dfc78f206a96e5b3ac22741263ebab945fdf51f0dbe7c5757c3511b23d9d72", size = 24115727, upload-time = "2025-12-11T21:47:51.274Z" }, + { url = "https://files.pythonhosted.org/packages/62/9b/f86224847949577a523be2207315ae0fd3155b5d909cd66c274d095349a3/pymupdf-1.26.7-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:1d5106f46e1ca0d64d46bd51892372a4f82076bdc14a9678d33d630702abca36", size = 24324386, upload-time = "2025-12-12T14:58:45.483Z" }, + { url = "https://files.pythonhosted.org/packages/85/8e/a117d39092ca645fde8b903f4a941d9aa75b370a67b4f1f435f56393dc5a/pymupdf-1.26.7-cp310-abi3-win32.whl", hash = "sha256:7c9645b6f5452629c747690190350213d3e5bbdb6b2eca227d82702b327f6eee", size = 17203888, upload-time = "2025-12-12T13:59:57.613Z" }, + { url = "https://files.pythonhosted.org/packages/dd/c3/d0047678146c294469c33bae167c8ace337deafb736b0bf97b9bc481aa65/pymupdf-1.26.7-cp310-abi3-win_amd64.whl", hash = "sha256:425b1befe40d41b72eb0fe211711c7ae334db5eb60307e9dd09066ed060cceba", size = 18405952, upload-time = "2025-12-11T21:48:02.947Z" }, +] + +[[package]] +name = "pypdf" +version = "6.4.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/bd/c2/b59b02ff7f2dc006799d2c5dc3a8877686890abdd915176ef799070edf17/pypdf-6.4.2.tar.gz", hash = "sha256:c466ff1272ffb4712c2348d2bbc3019bc93f1c62ccfaf50808e3b9f13c3dc527", size = 5275502, upload-time = "2025-12-14T14:30:58.58Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/38/99/3147435e15ccd97c0451efc3d13495dc22602e9887f81e64f1b135bae821/pypdf-6.4.2-py3-none-any.whl", hash = "sha256:014dcff867fd99fc0b6fc90ed1f7e1347ef2317ae038a489c2caa64106d268f4", size = 328212, upload-time = "2025-12-14T14:30:56.701Z" }, +] + +[[package]] +name = "pytest" +version = "8.2.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/09/9d/78b3785134306efe9329f40815af45b9215068d6ae4747ec0bc91ff1f4aa/pytest-8.2.0.tar.gz", hash = "sha256:d507d4482197eac0ba2bae2e9babf0672eb333017bcedaa5fb1a3d42c1174b3f", size = 1422883, upload-time = "2024-04-27T23:34:55.027Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c4/43/6b1debd95ecdf001bc46789a933f658da3f9738c65f32db3f4e8f2a4ca97/pytest-8.2.0-py3-none-any.whl", hash = "sha256:1733f0620f6cda4095bbf0d9ff8022486e91892245bb9e7d5542c018f612f233", size = 339229, upload-time = "2024-04-27T23:34:52.413Z" }, +] + +[[package]] +name = "pytest-asyncio" +version = "0.23.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/cd/ef/80107b9e939875ad613c705d99d91e4510dcf5fed29613ac9aecbcba0a8d/pytest-asyncio-0.23.6.tar.gz", hash = "sha256:ffe523a89c1c222598c76856e76852b787504ddb72dd5d9b6617ffa8aa2cde5f", size = 46203, upload-time = "2024-03-19T07:17:34.888Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e0/c9/de22c040d4c821c6c797ca1d720f1f4b2f4293d5757e811c62ae544496c4/pytest_asyncio-0.23.6-py3-none-any.whl", hash = "sha256:68516fdd1018ac57b846c9846b954f0393b26f094764a28c955eabb0536a4e8a", size = 17552, upload-time = "2024-03-19T07:17:32.951Z" }, +] + +[[package]] +name = "python-dateutil" +version = "2.9.0.post0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432, upload-time = "2024-03-01T18:36:20.211Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" }, +] + +[[package]] +name = "python-dotenv" +version = "1.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz", hash = "sha256:42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6", size = 44221, upload-time = "2025-10-26T15:12:10.434Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/14/1b/a298b06749107c305e1fe0f814c6c74aea7b2f1e10989cb30f544a1b3253/python_dotenv-1.2.1-py3-none-any.whl", hash = "sha256:b81ee9561e9ca4004139c6cbba3a238c32b03e4894671e181b671e8cb8425d61", size = 21230, upload-time = "2025-10-26T15:12:09.109Z" }, +] + +[[package]] +name = "python-iso639" +version = "2025.11.16" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a1/3b/3e07aadeeb7bbb2574d6aa6ccacbc58b17bd2b1fb6c7196bf96ab0e45129/python_iso639-2025.11.16.tar.gz", hash = "sha256:aabe941267898384415a509f5236d7cfc191198c84c5c6f73dac73d9783f5169", size = 174186, upload-time = "2025-11-16T21:53:37.031Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b5/2d/563849c31e58eb2e273fa0c391a7d9987db32f4d9152fe6ecdac0a8ffe93/python_iso639-2025.11.16-py3-none-any.whl", hash = "sha256:65f6ac6c6d8e8207f6175f8bf7fff7db486c6dc5c1d8866c2b77d2a923370896", size = 167818, upload-time = "2025-11-16T21:53:35.36Z" }, +] + +[[package]] +name = "python-magic" +version = "0.4.27" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/da/db/0b3e28ac047452d079d375ec6798bf76a036a08182dbb39ed38116a49130/python-magic-0.4.27.tar.gz", hash = "sha256:c1ba14b08e4a5f5c31a302b7721239695b2f0f058d125bd5ce1ee36b9d9d3c3b", size = 14677, upload-time = "2022-06-07T20:16:59.508Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6c/73/9f872cb81fc5c3bb48f7227872c28975f998f3e7c2b1c16e95e6432bbb90/python_magic-0.4.27-py2.py3-none-any.whl", hash = "sha256:c212960ad306f700aa0d01e5d7a325d20548ff97eb9920dcd29513174f0294d3", size = 13840, upload-time = "2022-06-07T20:16:57.763Z" }, +] + +[[package]] +name = "python-multipart" +version = "0.0.21" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/78/96/804520d0850c7db98e5ccb70282e29208723f0964e88ffd9d0da2f52ea09/python_multipart-0.0.21.tar.gz", hash = "sha256:7137ebd4d3bbf70ea1622998f902b97a29434a9e8dc40eb203bbcf7c2a2cba92", size = 37196, upload-time = "2025-12-17T09:24:22.446Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/aa/76/03af049af4dcee5d27442f71b6924f01f3efb5d2bd34f23fcd563f2cc5f5/python_multipart-0.0.21-py3-none-any.whl", hash = "sha256:cf7a6713e01c87aa35387f4774e812c4361150938d20d232800f75ffcf266090", size = 24541, upload-time = "2025-12-17T09:24:21.153Z" }, +] + +[[package]] +name = "pytz" +version = "2025.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz", hash = "sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3", size = 320884, upload-time = "2025-03-25T02:25:00.538Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl", hash = "sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00", size = 509225, upload-time = "2025-03-25T02:24:58.468Z" }, +] + +[[package]] +name = "pywin32" +version = "311" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7c/af/449a6a91e5d6db51420875c54f6aff7c97a86a3b13a0b4f1a5c13b988de3/pywin32-311-cp311-cp311-win32.whl", hash = "sha256:184eb5e436dea364dcd3d2316d577d625c0351bf237c4e9a5fabbcfa5a58b151", size = 8697031, upload-time = "2025-07-14T20:13:13.266Z" }, + { url = "https://files.pythonhosted.org/packages/51/8f/9bb81dd5bb77d22243d33c8397f09377056d5c687aa6d4042bea7fbf8364/pywin32-311-cp311-cp311-win_amd64.whl", hash = "sha256:3ce80b34b22b17ccbd937a6e78e7225d80c52f5ab9940fe0506a1a16f3dab503", size = 9508308, upload-time = "2025-07-14T20:13:15.147Z" }, + { url = "https://files.pythonhosted.org/packages/44/7b/9c2ab54f74a138c491aba1b1cd0795ba61f144c711daea84a88b63dc0f6c/pywin32-311-cp311-cp311-win_arm64.whl", hash = "sha256:a733f1388e1a842abb67ffa8e7aad0e70ac519e09b0f6a784e65a136ec7cefd2", size = 8703930, upload-time = "2025-07-14T20:13:16.945Z" }, + { url = "https://files.pythonhosted.org/packages/e7/ab/01ea1943d4eba0f850c3c61e78e8dd59757ff815ff3ccd0a84de5f541f42/pywin32-311-cp312-cp312-win32.whl", hash = "sha256:750ec6e621af2b948540032557b10a2d43b0cee2ae9758c54154d711cc852d31", size = 8706543, upload-time = "2025-07-14T20:13:20.765Z" }, + { url = "https://files.pythonhosted.org/packages/d1/a8/a0e8d07d4d051ec7502cd58b291ec98dcc0c3fff027caad0470b72cfcc2f/pywin32-311-cp312-cp312-win_amd64.whl", hash = "sha256:b8c095edad5c211ff31c05223658e71bf7116daa0ecf3ad85f3201ea3190d067", size = 9495040, upload-time = "2025-07-14T20:13:22.543Z" }, + { url = "https://files.pythonhosted.org/packages/ba/3a/2ae996277b4b50f17d61f0603efd8253cb2d79cc7ae159468007b586396d/pywin32-311-cp312-cp312-win_arm64.whl", hash = "sha256:e286f46a9a39c4a18b319c28f59b61de793654af2f395c102b4f819e584b5852", size = 8710102, upload-time = "2025-07-14T20:13:24.682Z" }, + { url = "https://files.pythonhosted.org/packages/a5/be/3fd5de0979fcb3994bfee0d65ed8ca9506a8a1260651b86174f6a86f52b3/pywin32-311-cp313-cp313-win32.whl", hash = "sha256:f95ba5a847cba10dd8c4d8fefa9f2a6cf283b8b88ed6178fa8a6c1ab16054d0d", size = 8705700, upload-time = "2025-07-14T20:13:26.471Z" }, + { url = "https://files.pythonhosted.org/packages/e3/28/e0a1909523c6890208295a29e05c2adb2126364e289826c0a8bc7297bd5c/pywin32-311-cp313-cp313-win_amd64.whl", hash = "sha256:718a38f7e5b058e76aee1c56ddd06908116d35147e133427e59a3983f703a20d", size = 9494700, upload-time = "2025-07-14T20:13:28.243Z" }, + { url = "https://files.pythonhosted.org/packages/04/bf/90339ac0f55726dce7d794e6d79a18a91265bdf3aa70b6b9ca52f35e022a/pywin32-311-cp313-cp313-win_arm64.whl", hash = "sha256:7b4075d959648406202d92a2310cb990fea19b535c7f4a78d3f5e10b926eeb8a", size = 8709318, upload-time = "2025-07-14T20:13:30.348Z" }, + { url = "https://files.pythonhosted.org/packages/c9/31/097f2e132c4f16d99a22bfb777e0fd88bd8e1c634304e102f313af69ace5/pywin32-311-cp314-cp314-win32.whl", hash = "sha256:b7a2c10b93f8986666d0c803ee19b5990885872a7de910fc460f9b0c2fbf92ee", size = 8840714, upload-time = "2025-07-14T20:13:32.449Z" }, + { url = "https://files.pythonhosted.org/packages/90/4b/07c77d8ba0e01349358082713400435347df8426208171ce297da32c313d/pywin32-311-cp314-cp314-win_amd64.whl", hash = "sha256:3aca44c046bd2ed8c90de9cb8427f581c479e594e99b5c0bb19b29c10fd6cb87", size = 9656800, upload-time = "2025-07-14T20:13:34.312Z" }, + { url = "https://files.pythonhosted.org/packages/c0/d2/21af5c535501a7233e734b8af901574572da66fcc254cb35d0609c9080dd/pywin32-311-cp314-cp314-win_arm64.whl", hash = "sha256:a508e2d9025764a8270f93111a970e1d0fbfc33f4153b388bb649b7eec4f9b42", size = 8932540, upload-time = "2025-07-14T20:13:36.379Z" }, +] + +[[package]] +name = "pyyaml" +version = "6.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e", size = 185826, upload-time = "2025-09-25T21:31:58.655Z" }, + { url = "https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824", size = 175577, upload-time = "2025-09-25T21:32:00.088Z" }, + { url = "https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c", size = 775556, upload-time = "2025-09-25T21:32:01.31Z" }, + { url = "https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00", size = 882114, upload-time = "2025-09-25T21:32:03.376Z" }, + { url = "https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d", size = 806638, upload-time = "2025-09-25T21:32:04.553Z" }, + { url = "https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a", size = 767463, upload-time = "2025-09-25T21:32:06.152Z" }, + { url = "https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4", size = 794986, upload-time = "2025-09-25T21:32:07.367Z" }, + { url = "https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b", size = 142543, upload-time = "2025-09-25T21:32:08.95Z" }, + { url = "https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf", size = 158763, upload-time = "2025-09-25T21:32:09.96Z" }, + { url = "https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196", size = 182063, upload-time = "2025-09-25T21:32:11.445Z" }, + { url = "https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0", size = 173973, upload-time = "2025-09-25T21:32:12.492Z" }, + { url = "https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28", size = 775116, upload-time = "2025-09-25T21:32:13.652Z" }, + { url = "https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c", size = 844011, upload-time = "2025-09-25T21:32:15.21Z" }, + { url = "https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc", size = 807870, upload-time = "2025-09-25T21:32:16.431Z" }, + { url = "https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e", size = 761089, upload-time = "2025-09-25T21:32:17.56Z" }, + { url = "https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea", size = 790181, upload-time = "2025-09-25T21:32:18.834Z" }, + { url = "https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5", size = 137658, upload-time = "2025-09-25T21:32:20.209Z" }, + { url = "https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b", size = 154003, upload-time = "2025-09-25T21:32:21.167Z" }, + { url = "https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd", size = 140344, upload-time = "2025-09-25T21:32:22.617Z" }, + { url = "https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8", size = 181669, upload-time = "2025-09-25T21:32:23.673Z" }, + { url = "https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1", size = 173252, upload-time = "2025-09-25T21:32:25.149Z" }, + { url = "https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c", size = 767081, upload-time = "2025-09-25T21:32:26.575Z" }, + { url = "https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5", size = 841159, upload-time = "2025-09-25T21:32:27.727Z" }, + { url = "https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6", size = 801626, upload-time = "2025-09-25T21:32:28.878Z" }, + { url = "https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6", size = 753613, upload-time = "2025-09-25T21:32:30.178Z" }, + { url = "https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be", size = 794115, upload-time = "2025-09-25T21:32:31.353Z" }, + { url = "https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26", size = 137427, upload-time = "2025-09-25T21:32:32.58Z" }, + { url = "https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c", size = 154090, upload-time = "2025-09-25T21:32:33.659Z" }, + { url = "https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb", size = 140246, upload-time = "2025-09-25T21:32:34.663Z" }, + { url = "https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac", size = 181814, upload-time = "2025-09-25T21:32:35.712Z" }, + { url = "https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310", size = 173809, upload-time = "2025-09-25T21:32:36.789Z" }, + { url = "https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7", size = 766454, upload-time = "2025-09-25T21:32:37.966Z" }, + { url = "https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788", size = 836355, upload-time = "2025-09-25T21:32:39.178Z" }, + { url = "https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5", size = 794175, upload-time = "2025-09-25T21:32:40.865Z" }, + { url = "https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764", size = 755228, upload-time = "2025-09-25T21:32:42.084Z" }, + { url = "https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35", size = 789194, upload-time = "2025-09-25T21:32:43.362Z" }, + { url = "https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac", size = 156429, upload-time = "2025-09-25T21:32:57.844Z" }, + { url = "https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3", size = 143912, upload-time = "2025-09-25T21:32:59.247Z" }, + { url = "https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3", size = 189108, upload-time = "2025-09-25T21:32:44.377Z" }, + { url = "https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba", size = 183641, upload-time = "2025-09-25T21:32:45.407Z" }, + { url = "https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c", size = 831901, upload-time = "2025-09-25T21:32:48.83Z" }, + { url = "https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702", size = 861132, upload-time = "2025-09-25T21:32:50.149Z" }, + { url = "https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c", size = 839261, upload-time = "2025-09-25T21:32:51.808Z" }, + { url = "https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065", size = 805272, upload-time = "2025-09-25T21:32:52.941Z" }, + { url = "https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65", size = 829923, upload-time = "2025-09-25T21:32:54.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9", size = 174062, upload-time = "2025-09-25T21:32:55.767Z" }, + { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" }, +] + +[[package]] +name = "pyzmq" +version = "27.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cffi", marker = "implementation_name == 'pypy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/04/0b/3c9baedbdf613ecaa7aa07027780b8867f57b6293b6ee50de316c9f3222b/pyzmq-27.1.0.tar.gz", hash = "sha256:ac0765e3d44455adb6ddbf4417dcce460fc40a05978c08efdf2948072f6db540", size = 281750, upload-time = "2025-09-08T23:10:18.157Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/06/5d/305323ba86b284e6fcb0d842d6adaa2999035f70f8c38a9b6d21ad28c3d4/pyzmq-27.1.0-cp311-cp311-macosx_10_15_universal2.whl", hash = "sha256:226b091818d461a3bef763805e75685e478ac17e9008f49fce2d3e52b3d58b86", size = 1333328, upload-time = "2025-09-08T23:07:45.946Z" }, + { url = "https://files.pythonhosted.org/packages/bd/a0/fc7e78a23748ad5443ac3275943457e8452da67fda347e05260261108cbc/pyzmq-27.1.0-cp311-cp311-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:0790a0161c281ca9723f804871b4027f2e8b5a528d357c8952d08cd1a9c15581", size = 908803, upload-time = "2025-09-08T23:07:47.551Z" }, + { url = "https://files.pythonhosted.org/packages/7e/22/37d15eb05f3bdfa4abea6f6d96eb3bb58585fbd3e4e0ded4e743bc650c97/pyzmq-27.1.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c895a6f35476b0c3a54e3eb6ccf41bf3018de937016e6e18748317f25d4e925f", size = 668836, upload-time = "2025-09-08T23:07:49.436Z" }, + { url = "https://files.pythonhosted.org/packages/b1/c4/2a6fe5111a01005fc7af3878259ce17684fabb8852815eda6225620f3c59/pyzmq-27.1.0-cp311-cp311-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5bbf8d3630bf96550b3be8e1fc0fea5cbdc8d5466c1192887bd94869da17a63e", size = 857038, upload-time = "2025-09-08T23:07:51.234Z" }, + { url = "https://files.pythonhosted.org/packages/cb/eb/bfdcb41d0db9cd233d6fb22dc131583774135505ada800ebf14dfb0a7c40/pyzmq-27.1.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:15c8bd0fe0dabf808e2d7a681398c4e5ded70a551ab47482067a572c054c8e2e", size = 1657531, upload-time = "2025-09-08T23:07:52.795Z" }, + { url = "https://files.pythonhosted.org/packages/ab/21/e3180ca269ed4a0de5c34417dfe71a8ae80421198be83ee619a8a485b0c7/pyzmq-27.1.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:bafcb3dd171b4ae9f19ee6380dfc71ce0390fefaf26b504c0e5f628d7c8c54f2", size = 2034786, upload-time = "2025-09-08T23:07:55.047Z" }, + { url = "https://files.pythonhosted.org/packages/3b/b1/5e21d0b517434b7f33588ff76c177c5a167858cc38ef740608898cd329f2/pyzmq-27.1.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:e829529fcaa09937189178115c49c504e69289abd39967cd8a4c215761373394", size = 1894220, upload-time = "2025-09-08T23:07:57.172Z" }, + { url = "https://files.pythonhosted.org/packages/03/f2/44913a6ff6941905efc24a1acf3d3cb6146b636c546c7406c38c49c403d4/pyzmq-27.1.0-cp311-cp311-win32.whl", hash = "sha256:6df079c47d5902af6db298ec92151db82ecb557af663098b92f2508c398bb54f", size = 567155, upload-time = "2025-09-08T23:07:59.05Z" }, + { url = "https://files.pythonhosted.org/packages/23/6d/d8d92a0eb270a925c9b4dd039c0b4dc10abc2fcbc48331788824ef113935/pyzmq-27.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:190cbf120fbc0fc4957b56866830def56628934a9d112aec0e2507aa6a032b97", size = 633428, upload-time = "2025-09-08T23:08:00.663Z" }, + { url = "https://files.pythonhosted.org/packages/ae/14/01afebc96c5abbbd713ecfc7469cfb1bc801c819a74ed5c9fad9a48801cb/pyzmq-27.1.0-cp311-cp311-win_arm64.whl", hash = "sha256:eca6b47df11a132d1745eb3b5b5e557a7dae2c303277aa0e69c6ba91b8736e07", size = 559497, upload-time = "2025-09-08T23:08:02.15Z" }, + { url = "https://files.pythonhosted.org/packages/92/e7/038aab64a946d535901103da16b953c8c9cc9c961dadcbf3609ed6428d23/pyzmq-27.1.0-cp312-abi3-macosx_10_15_universal2.whl", hash = "sha256:452631b640340c928fa343801b0d07eb0c3789a5ffa843f6e1a9cee0ba4eb4fc", size = 1306279, upload-time = "2025-09-08T23:08:03.807Z" }, + { url = "https://files.pythonhosted.org/packages/e8/5e/c3c49fdd0f535ef45eefcc16934648e9e59dace4a37ee88fc53f6cd8e641/pyzmq-27.1.0-cp312-abi3-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:1c179799b118e554b66da67d88ed66cd37a169f1f23b5d9f0a231b4e8d44a113", size = 895645, upload-time = "2025-09-08T23:08:05.301Z" }, + { url = "https://files.pythonhosted.org/packages/f8/e5/b0b2504cb4e903a74dcf1ebae157f9e20ebb6ea76095f6cfffea28c42ecd/pyzmq-27.1.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3837439b7f99e60312f0c926a6ad437b067356dc2bc2ec96eb395fd0fe804233", size = 652574, upload-time = "2025-09-08T23:08:06.828Z" }, + { url = "https://files.pythonhosted.org/packages/f8/9b/c108cdb55560eaf253f0cbdb61b29971e9fb34d9c3499b0e96e4e60ed8a5/pyzmq-27.1.0-cp312-abi3-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:43ad9a73e3da1fab5b0e7e13402f0b2fb934ae1c876c51d0afff0e7c052eca31", size = 840995, upload-time = "2025-09-08T23:08:08.396Z" }, + { url = "https://files.pythonhosted.org/packages/c2/bb/b79798ca177b9eb0825b4c9998c6af8cd2a7f15a6a1a4272c1d1a21d382f/pyzmq-27.1.0-cp312-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:0de3028d69d4cdc475bfe47a6128eb38d8bc0e8f4d69646adfbcd840facbac28", size = 1642070, upload-time = "2025-09-08T23:08:09.989Z" }, + { url = "https://files.pythonhosted.org/packages/9c/80/2df2e7977c4ede24c79ae39dcef3899bfc5f34d1ca7a5b24f182c9b7a9ca/pyzmq-27.1.0-cp312-abi3-musllinux_1_2_i686.whl", hash = "sha256:cf44a7763aea9298c0aa7dbf859f87ed7012de8bda0f3977b6fb1d96745df856", size = 2021121, upload-time = "2025-09-08T23:08:11.907Z" }, + { url = "https://files.pythonhosted.org/packages/46/bd/2d45ad24f5f5ae7e8d01525eb76786fa7557136555cac7d929880519e33a/pyzmq-27.1.0-cp312-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:f30f395a9e6fbca195400ce833c731e7b64c3919aa481af4d88c3759e0cb7496", size = 1878550, upload-time = "2025-09-08T23:08:13.513Z" }, + { url = "https://files.pythonhosted.org/packages/e6/2f/104c0a3c778d7c2ab8190e9db4f62f0b6957b53c9d87db77c284b69f33ea/pyzmq-27.1.0-cp312-abi3-win32.whl", hash = "sha256:250e5436a4ba13885494412b3da5d518cd0d3a278a1ae640e113c073a5f88edd", size = 559184, upload-time = "2025-09-08T23:08:15.163Z" }, + { url = "https://files.pythonhosted.org/packages/fc/7f/a21b20d577e4100c6a41795842028235998a643b1ad406a6d4163ea8f53e/pyzmq-27.1.0-cp312-abi3-win_amd64.whl", hash = "sha256:9ce490cf1d2ca2ad84733aa1d69ce6855372cb5ce9223802450c9b2a7cba0ccf", size = 619480, upload-time = "2025-09-08T23:08:17.192Z" }, + { url = "https://files.pythonhosted.org/packages/78/c2/c012beae5f76b72f007a9e91ee9401cb88c51d0f83c6257a03e785c81cc2/pyzmq-27.1.0-cp312-abi3-win_arm64.whl", hash = "sha256:75a2f36223f0d535a0c919e23615fc85a1e23b71f40c7eb43d7b1dedb4d8f15f", size = 552993, upload-time = "2025-09-08T23:08:18.926Z" }, + { url = "https://files.pythonhosted.org/packages/60/cb/84a13459c51da6cec1b7b1dc1a47e6db6da50b77ad7fd9c145842750a011/pyzmq-27.1.0-cp313-cp313-android_24_arm64_v8a.whl", hash = "sha256:93ad4b0855a664229559e45c8d23797ceac03183c7b6f5b4428152a6b06684a5", size = 1122436, upload-time = "2025-09-08T23:08:20.801Z" }, + { url = "https://files.pythonhosted.org/packages/dc/b6/94414759a69a26c3dd674570a81813c46a078767d931a6c70ad29fc585cb/pyzmq-27.1.0-cp313-cp313-android_24_x86_64.whl", hash = "sha256:fbb4f2400bfda24f12f009cba62ad5734148569ff4949b1b6ec3b519444342e6", size = 1156301, upload-time = "2025-09-08T23:08:22.47Z" }, + { url = "https://files.pythonhosted.org/packages/a5/ad/15906493fd40c316377fd8a8f6b1f93104f97a752667763c9b9c1b71d42d/pyzmq-27.1.0-cp313-cp313t-macosx_10_15_universal2.whl", hash = "sha256:e343d067f7b151cfe4eb3bb796a7752c9d369eed007b91231e817071d2c2fec7", size = 1341197, upload-time = "2025-09-08T23:08:24.286Z" }, + { url = "https://files.pythonhosted.org/packages/14/1d/d343f3ce13db53a54cb8946594e567410b2125394dafcc0268d8dda027e0/pyzmq-27.1.0-cp313-cp313t-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:08363b2011dec81c354d694bdecaef4770e0ae96b9afea70b3f47b973655cc05", size = 897275, upload-time = "2025-09-08T23:08:26.063Z" }, + { url = "https://files.pythonhosted.org/packages/69/2d/d83dd6d7ca929a2fc67d2c3005415cdf322af7751d773524809f9e585129/pyzmq-27.1.0-cp313-cp313t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d54530c8c8b5b8ddb3318f481297441af102517602b569146185fa10b63f4fa9", size = 660469, upload-time = "2025-09-08T23:08:27.623Z" }, + { url = "https://files.pythonhosted.org/packages/3e/cd/9822a7af117f4bc0f1952dbe9ef8358eb50a24928efd5edf54210b850259/pyzmq-27.1.0-cp313-cp313t-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6f3afa12c392f0a44a2414056d730eebc33ec0926aae92b5ad5cf26ebb6cc128", size = 847961, upload-time = "2025-09-08T23:08:29.672Z" }, + { url = "https://files.pythonhosted.org/packages/9a/12/f003e824a19ed73be15542f172fd0ec4ad0b60cf37436652c93b9df7c585/pyzmq-27.1.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:c65047adafe573ff023b3187bb93faa583151627bc9c51fc4fb2c561ed689d39", size = 1650282, upload-time = "2025-09-08T23:08:31.349Z" }, + { url = "https://files.pythonhosted.org/packages/d5/4a/e82d788ed58e9a23995cee70dbc20c9aded3d13a92d30d57ec2291f1e8a3/pyzmq-27.1.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:90e6e9441c946a8b0a667356f7078d96411391a3b8f80980315455574177ec97", size = 2024468, upload-time = "2025-09-08T23:08:33.543Z" }, + { url = "https://files.pythonhosted.org/packages/d9/94/2da0a60841f757481e402b34bf4c8bf57fa54a5466b965de791b1e6f747d/pyzmq-27.1.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:add071b2d25f84e8189aaf0882d39a285b42fa3853016ebab234a5e78c7a43db", size = 1885394, upload-time = "2025-09-08T23:08:35.51Z" }, + { url = "https://files.pythonhosted.org/packages/4f/6f/55c10e2e49ad52d080dc24e37adb215e5b0d64990b57598abc2e3f01725b/pyzmq-27.1.0-cp313-cp313t-win32.whl", hash = "sha256:7ccc0700cfdf7bd487bea8d850ec38f204478681ea02a582a8da8171b7f90a1c", size = 574964, upload-time = "2025-09-08T23:08:37.178Z" }, + { url = "https://files.pythonhosted.org/packages/87/4d/2534970ba63dd7c522d8ca80fb92777f362c0f321900667c615e2067cb29/pyzmq-27.1.0-cp313-cp313t-win_amd64.whl", hash = "sha256:8085a9fba668216b9b4323be338ee5437a235fe275b9d1610e422ccc279733e2", size = 641029, upload-time = "2025-09-08T23:08:40.595Z" }, + { url = "https://files.pythonhosted.org/packages/f6/fa/f8aea7a28b0641f31d40dea42d7ef003fded31e184ef47db696bc74cd610/pyzmq-27.1.0-cp313-cp313t-win_arm64.whl", hash = "sha256:6bb54ca21bcfe361e445256c15eedf083f153811c37be87e0514934d6913061e", size = 561541, upload-time = "2025-09-08T23:08:42.668Z" }, + { url = "https://files.pythonhosted.org/packages/87/45/19efbb3000956e82d0331bafca5d9ac19ea2857722fa2caacefb6042f39d/pyzmq-27.1.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:ce980af330231615756acd5154f29813d553ea555485ae712c491cd483df6b7a", size = 1341197, upload-time = "2025-09-08T23:08:44.973Z" }, + { url = "https://files.pythonhosted.org/packages/48/43/d72ccdbf0d73d1343936296665826350cb1e825f92f2db9db3e61c2162a2/pyzmq-27.1.0-cp314-cp314t-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:1779be8c549e54a1c38f805e56d2a2e5c009d26de10921d7d51cfd1c8d4632ea", size = 897175, upload-time = "2025-09-08T23:08:46.601Z" }, + { url = "https://files.pythonhosted.org/packages/2f/2e/a483f73a10b65a9ef0161e817321d39a770b2acf8bcf3004a28d90d14a94/pyzmq-27.1.0-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7200bb0f03345515df50d99d3db206a0a6bee1955fbb8c453c76f5bf0e08fb96", size = 660427, upload-time = "2025-09-08T23:08:48.187Z" }, + { url = "https://files.pythonhosted.org/packages/f5/d2/5f36552c2d3e5685abe60dfa56f91169f7a2d99bbaf67c5271022ab40863/pyzmq-27.1.0-cp314-cp314t-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:01c0e07d558b06a60773744ea6251f769cd79a41a97d11b8bf4ab8f034b0424d", size = 847929, upload-time = "2025-09-08T23:08:49.76Z" }, + { url = "https://files.pythonhosted.org/packages/c4/2a/404b331f2b7bf3198e9945f75c4c521f0c6a3a23b51f7a4a401b94a13833/pyzmq-27.1.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:80d834abee71f65253c91540445d37c4c561e293ba6e741b992f20a105d69146", size = 1650193, upload-time = "2025-09-08T23:08:51.7Z" }, + { url = "https://files.pythonhosted.org/packages/1c/0b/f4107e33f62a5acf60e3ded67ed33d79b4ce18de432625ce2fc5093d6388/pyzmq-27.1.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:544b4e3b7198dde4a62b8ff6685e9802a9a1ebf47e77478a5eb88eca2a82f2fd", size = 2024388, upload-time = "2025-09-08T23:08:53.393Z" }, + { url = "https://files.pythonhosted.org/packages/0d/01/add31fe76512642fd6e40e3a3bd21f4b47e242c8ba33efb6809e37076d9b/pyzmq-27.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:cedc4c68178e59a4046f97eca31b148ddcf51e88677de1ef4e78cf06c5376c9a", size = 1885316, upload-time = "2025-09-08T23:08:55.702Z" }, + { url = "https://files.pythonhosted.org/packages/c4/59/a5f38970f9bf07cee96128de79590bb354917914a9be11272cfc7ff26af0/pyzmq-27.1.0-cp314-cp314t-win32.whl", hash = "sha256:1f0b2a577fd770aa6f053211a55d1c47901f4d537389a034c690291485e5fe92", size = 587472, upload-time = "2025-09-08T23:08:58.18Z" }, + { url = "https://files.pythonhosted.org/packages/70/d8/78b1bad170f93fcf5e3536e70e8fadac55030002275c9a29e8f5719185de/pyzmq-27.1.0-cp314-cp314t-win_amd64.whl", hash = "sha256:19c9468ae0437f8074af379e986c5d3d7d7bfe033506af442e8c879732bedbe0", size = 661401, upload-time = "2025-09-08T23:08:59.802Z" }, + { url = "https://files.pythonhosted.org/packages/81/d6/4bfbb40c9a0b42fc53c7cf442f6385db70b40f74a783130c5d0a5aa62228/pyzmq-27.1.0-cp314-cp314t-win_arm64.whl", hash = "sha256:dc5dbf68a7857b59473f7df42650c621d7e8923fb03fa74a526890f4d33cc4d7", size = 575170, upload-time = "2025-09-08T23:09:01.418Z" }, + { url = "https://files.pythonhosted.org/packages/4c/c6/c4dcdecdbaa70969ee1fdced6d7b8f60cfabe64d25361f27ac4665a70620/pyzmq-27.1.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:18770c8d3563715387139060d37859c02ce40718d1faf299abddcdcc6a649066", size = 836265, upload-time = "2025-09-08T23:09:49.376Z" }, + { url = "https://files.pythonhosted.org/packages/3e/79/f38c92eeaeb03a2ccc2ba9866f0439593bb08c5e3b714ac1d553e5c96e25/pyzmq-27.1.0-pp311-pypy311_pp73-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:ac25465d42f92e990f8d8b0546b01c391ad431c3bf447683fdc40565941d0604", size = 800208, upload-time = "2025-09-08T23:09:51.073Z" }, + { url = "https://files.pythonhosted.org/packages/49/0e/3f0d0d335c6b3abb9b7b723776d0b21fa7f3a6c819a0db6097059aada160/pyzmq-27.1.0-pp311-pypy311_pp73-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:53b40f8ae006f2734ee7608d59ed661419f087521edbfc2149c3932e9c14808c", size = 567747, upload-time = "2025-09-08T23:09:52.698Z" }, + { url = "https://files.pythonhosted.org/packages/a1/cf/f2b3784d536250ffd4be70e049f3b60981235d70c6e8ce7e3ef21e1adb25/pyzmq-27.1.0-pp311-pypy311_pp73-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f605d884e7c8be8fe1aa94e0a783bf3f591b84c24e4bc4f3e7564c82ac25e271", size = 747371, upload-time = "2025-09-08T23:09:54.563Z" }, + { url = "https://files.pythonhosted.org/packages/01/1b/5dbe84eefc86f48473947e2f41711aded97eecef1231f4558f1f02713c12/pyzmq-27.1.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:c9f7f6e13dff2e44a6afeaf2cf54cee5929ad64afaf4d40b50f93c58fc687355", size = 544862, upload-time = "2025-09-08T23:09:56.509Z" }, +] + +[[package]] +name = "rapidfuzz" +version = "3.14.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d3/28/9d808fe62375b9aab5ba92fa9b29371297b067c2790b2d7cda648b1e2f8d/rapidfuzz-3.14.3.tar.gz", hash = "sha256:2491937177868bc4b1e469087601d53f925e8d270ccc21e07404b4b5814b7b5f", size = 57863900, upload-time = "2025-11-01T11:54:52.321Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/76/25/5b0a33ad3332ee1213068c66f7c14e9e221be90bab434f0cb4defa9d6660/rapidfuzz-3.14.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:dea2d113e260a5da0c4003e0a5e9fdf24a9dc2bb9eaa43abd030a1e46ce7837d", size = 1953885, upload-time = "2025-11-01T11:52:47.75Z" }, + { url = "https://files.pythonhosted.org/packages/2d/ab/f1181f500c32c8fcf7c966f5920c7e56b9b1d03193386d19c956505c312d/rapidfuzz-3.14.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e6c31a4aa68cfa75d7eede8b0ed24b9e458447db604c2db53f358be9843d81d3", size = 1390200, upload-time = "2025-11-01T11:52:49.491Z" }, + { url = "https://files.pythonhosted.org/packages/14/2a/0f2de974ececad873865c6bb3ea3ad07c976ac293d5025b2d73325aac1d4/rapidfuzz-3.14.3-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:02821366d928e68ddcb567fed8723dad7ea3a979fada6283e6914d5858674850", size = 1389319, upload-time = "2025-11-01T11:52:51.224Z" }, + { url = "https://files.pythonhosted.org/packages/ed/69/309d8f3a0bb3031fd9b667174cc4af56000645298af7c2931be5c3d14bb4/rapidfuzz-3.14.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cfe8df315ab4e6db4e1be72c5170f8e66021acde22cd2f9d04d2058a9fd8162e", size = 3178495, upload-time = "2025-11-01T11:52:53.005Z" }, + { url = "https://files.pythonhosted.org/packages/10/b7/f9c44a99269ea5bf6fd6a40b84e858414b6e241288b9f2b74af470d222b1/rapidfuzz-3.14.3-cp311-cp311-manylinux_2_31_armv7l.whl", hash = "sha256:769f31c60cd79420188fcdb3c823227fc4a6deb35cafec9d14045c7f6743acae", size = 1228443, upload-time = "2025-11-01T11:52:54.991Z" }, + { url = "https://files.pythonhosted.org/packages/f2/0a/3b3137abac7f19c9220e14cd7ce993e35071a7655e7ef697785a3edfea1a/rapidfuzz-3.14.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:54fa03062124e73086dae66a3451c553c1e20a39c077fd704dc7154092c34c63", size = 2411998, upload-time = "2025-11-01T11:52:56.629Z" }, + { url = "https://files.pythonhosted.org/packages/f3/b6/983805a844d44670eaae63831024cdc97ada4e9c62abc6b20703e81e7f9b/rapidfuzz-3.14.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:834d1e818005ed0d4ae38f6b87b86fad9b0a74085467ece0727d20e15077c094", size = 2530120, upload-time = "2025-11-01T11:52:58.298Z" }, + { url = "https://files.pythonhosted.org/packages/b4/cc/2c97beb2b1be2d7595d805682472f1b1b844111027d5ad89b65e16bdbaaa/rapidfuzz-3.14.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:948b00e8476a91f510dd1ec07272efc7d78c275d83b630455559671d4e33b678", size = 4283129, upload-time = "2025-11-01T11:53:00.188Z" }, + { url = "https://files.pythonhosted.org/packages/4d/03/2f0e5e94941045aefe7eafab72320e61285c07b752df9884ce88d6b8b835/rapidfuzz-3.14.3-cp311-cp311-win32.whl", hash = "sha256:43d0305c36f504232f18ea04e55f2059bb89f169d3119c4ea96a0e15b59e2a91", size = 1724224, upload-time = "2025-11-01T11:53:02.149Z" }, + { url = "https://files.pythonhosted.org/packages/cf/99/5fa23e204435803875daefda73fd61baeabc3c36b8fc0e34c1705aab8c7b/rapidfuzz-3.14.3-cp311-cp311-win_amd64.whl", hash = "sha256:ef6bf930b947bd0735c550683939a032090f1d688dfd8861d6b45307b96fd5c5", size = 1544259, upload-time = "2025-11-01T11:53:03.66Z" }, + { url = "https://files.pythonhosted.org/packages/48/35/d657b85fcc615a42661b98ac90ce8e95bd32af474603a105643963749886/rapidfuzz-3.14.3-cp311-cp311-win_arm64.whl", hash = "sha256:f3eb0ff3b75d6fdccd40b55e7414bb859a1cda77c52762c9c82b85569f5088e7", size = 814734, upload-time = "2025-11-01T11:53:05.008Z" }, + { url = "https://files.pythonhosted.org/packages/fa/8e/3c215e860b458cfbedb3ed73bc72e98eb7e0ed72f6b48099604a7a3260c2/rapidfuzz-3.14.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:685c93ea961d135893b5984a5a9851637d23767feabe414ec974f43babbd8226", size = 1945306, upload-time = "2025-11-01T11:53:06.452Z" }, + { url = "https://files.pythonhosted.org/packages/36/d9/31b33512015c899f4a6e6af64df8dfe8acddf4c8b40a4b3e0e6e1bcd00e5/rapidfuzz-3.14.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fa7c8f26f009f8c673fbfb443792f0cf8cf50c4e18121ff1e285b5e08a94fbdb", size = 1390788, upload-time = "2025-11-01T11:53:08.721Z" }, + { url = "https://files.pythonhosted.org/packages/a9/67/2ee6f8de6e2081ccd560a571d9c9063184fe467f484a17fa90311a7f4a2e/rapidfuzz-3.14.3-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:57f878330c8d361b2ce76cebb8e3e1dc827293b6abf404e67d53260d27b5d941", size = 1374580, upload-time = "2025-11-01T11:53:10.164Z" }, + { url = "https://files.pythonhosted.org/packages/30/83/80d22997acd928eda7deadc19ccd15883904622396d6571e935993e0453a/rapidfuzz-3.14.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6c5f545f454871e6af05753a0172849c82feaf0f521c5ca62ba09e1b382d6382", size = 3154947, upload-time = "2025-11-01T11:53:12.093Z" }, + { url = "https://files.pythonhosted.org/packages/5b/cf/9f49831085a16384695f9fb096b99662f589e30b89b4a589a1ebc1a19d34/rapidfuzz-3.14.3-cp312-cp312-manylinux_2_31_armv7l.whl", hash = "sha256:07aa0b5d8863e3151e05026a28e0d924accf0a7a3b605da978f0359bb804df43", size = 1223872, upload-time = "2025-11-01T11:53:13.664Z" }, + { url = "https://files.pythonhosted.org/packages/c8/0f/41ee8034e744b871c2e071ef0d360686f5ccfe5659f4fd96c3ec406b3c8b/rapidfuzz-3.14.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:73b07566bc7e010e7b5bd490fb04bb312e820970180df6b5655e9e6224c137db", size = 2392512, upload-time = "2025-11-01T11:53:15.109Z" }, + { url = "https://files.pythonhosted.org/packages/da/86/280038b6b0c2ccec54fb957c732ad6b41cc1fd03b288d76545b9cf98343f/rapidfuzz-3.14.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:6de00eb84c71476af7d3110cf25d8fe7c792d7f5fa86764ef0b4ca97e78ca3ed", size = 2521398, upload-time = "2025-11-01T11:53:17.146Z" }, + { url = "https://files.pythonhosted.org/packages/fa/7b/05c26f939607dca0006505e3216248ae2de631e39ef94dd63dbbf0860021/rapidfuzz-3.14.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d7843a1abf0091773a530636fdd2a49a41bcae22f9910b86b4f903e76ddc82dc", size = 4259416, upload-time = "2025-11-01T11:53:19.34Z" }, + { url = "https://files.pythonhosted.org/packages/40/eb/9e3af4103d91788f81111af1b54a28de347cdbed8eaa6c91d5e98a889aab/rapidfuzz-3.14.3-cp312-cp312-win32.whl", hash = "sha256:dea97ac3ca18cd3ba8f3d04b5c1fe4aa60e58e8d9b7793d3bd595fdb04128d7a", size = 1709527, upload-time = "2025-11-01T11:53:20.949Z" }, + { url = "https://files.pythonhosted.org/packages/b8/63/d06ecce90e2cf1747e29aeab9f823d21e5877a4c51b79720b2d3be7848f8/rapidfuzz-3.14.3-cp312-cp312-win_amd64.whl", hash = "sha256:b5100fd6bcee4d27f28f4e0a1c6b5127bc8ba7c2a9959cad9eab0bf4a7ab3329", size = 1538989, upload-time = "2025-11-01T11:53:22.428Z" }, + { url = "https://files.pythonhosted.org/packages/fc/6d/beee32dcda64af8128aab3ace2ccb33d797ed58c434c6419eea015fec779/rapidfuzz-3.14.3-cp312-cp312-win_arm64.whl", hash = "sha256:4e49c9e992bc5fc873bd0fff7ef16a4405130ec42f2ce3d2b735ba5d3d4eb70f", size = 811161, upload-time = "2025-11-01T11:53:23.811Z" }, + { url = "https://files.pythonhosted.org/packages/e4/4f/0d94d09646853bd26978cb3a7541b6233c5760687777fa97da8de0d9a6ac/rapidfuzz-3.14.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dbcb726064b12f356bf10fffdb6db4b6dce5390b23627c08652b3f6e49aa56ae", size = 1939646, upload-time = "2025-11-01T11:53:25.292Z" }, + { url = "https://files.pythonhosted.org/packages/b6/eb/f96aefc00f3bbdbab9c0657363ea8437a207d7545ac1c3789673e05d80bd/rapidfuzz-3.14.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1704fc70d214294e554a2421b473779bcdeef715881c5e927dc0f11e1692a0ff", size = 1385512, upload-time = "2025-11-01T11:53:27.594Z" }, + { url = "https://files.pythonhosted.org/packages/26/34/71c4f7749c12ee223dba90017a5947e8f03731a7cc9f489b662a8e9e643d/rapidfuzz-3.14.3-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cc65e72790ddfd310c2c8912b45106e3800fefe160b0c2ef4d6b6fec4e826457", size = 1373571, upload-time = "2025-11-01T11:53:29.096Z" }, + { url = "https://files.pythonhosted.org/packages/32/00/ec8597a64f2be301ce1ee3290d067f49f6a7afb226b67d5f15b56d772ba5/rapidfuzz-3.14.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:43e38c1305cffae8472572a0584d4ffc2f130865586a81038ca3965301f7c97c", size = 3156759, upload-time = "2025-11-01T11:53:30.777Z" }, + { url = "https://files.pythonhosted.org/packages/61/d5/b41eeb4930501cc899d5a9a7b5c9a33d85a670200d7e81658626dcc0ecc0/rapidfuzz-3.14.3-cp313-cp313-manylinux_2_31_armv7l.whl", hash = "sha256:e195a77d06c03c98b3fc06b8a28576ba824392ce40de8c708f96ce04849a052e", size = 1222067, upload-time = "2025-11-01T11:53:32.334Z" }, + { url = "https://files.pythonhosted.org/packages/2a/7d/6d9abb4ffd1027c6ed837b425834f3bed8344472eb3a503ab55b3407c721/rapidfuzz-3.14.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1b7ef2f4b8583a744338a18f12c69693c194fb6777c0e9ada98cd4d9e8f09d10", size = 2394775, upload-time = "2025-11-01T11:53:34.24Z" }, + { url = "https://files.pythonhosted.org/packages/15/ce/4f3ab4c401c5a55364da1ffff8cc879fc97b4e5f4fa96033827da491a973/rapidfuzz-3.14.3-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:a2135b138bcdcb4c3742d417f215ac2d8c2b87bde15b0feede231ae95f09ec41", size = 2526123, upload-time = "2025-11-01T11:53:35.779Z" }, + { url = "https://files.pythonhosted.org/packages/c1/4b/54f804975376a328f57293bd817c12c9036171d15cf7292032e3f5820b2d/rapidfuzz-3.14.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:33a325ed0e8e1aa20c3e75f8ab057a7b248fdea7843c2a19ade0008906c14af0", size = 4262874, upload-time = "2025-11-01T11:53:37.866Z" }, + { url = "https://files.pythonhosted.org/packages/e9/b6/958db27d8a29a50ee6edd45d33debd3ce732e7209183a72f57544cd5fe22/rapidfuzz-3.14.3-cp313-cp313-win32.whl", hash = "sha256:8383b6d0d92f6cd008f3c9216535be215a064b2cc890398a678b56e6d280cb63", size = 1707972, upload-time = "2025-11-01T11:53:39.442Z" }, + { url = "https://files.pythonhosted.org/packages/07/75/fde1f334b0cec15b5946d9f84d73250fbfcc73c236b4bc1b25129d90876b/rapidfuzz-3.14.3-cp313-cp313-win_amd64.whl", hash = "sha256:e6b5e3036976f0fde888687d91be86d81f9ac5f7b02e218913c38285b756be6c", size = 1537011, upload-time = "2025-11-01T11:53:40.92Z" }, + { url = "https://files.pythonhosted.org/packages/2e/d7/d83fe001ce599dc7ead57ba1debf923dc961b6bdce522b741e6b8c82f55c/rapidfuzz-3.14.3-cp313-cp313-win_arm64.whl", hash = "sha256:7ba009977601d8b0828bfac9a110b195b3e4e79b350dcfa48c11269a9f1918a0", size = 810744, upload-time = "2025-11-01T11:53:42.723Z" }, + { url = "https://files.pythonhosted.org/packages/92/13/a486369e63ff3c1a58444d16b15c5feb943edd0e6c28a1d7d67cb8946b8f/rapidfuzz-3.14.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:a0a28add871425c2fe94358c6300bbeb0bc2ed828ca003420ac6825408f5a424", size = 1967702, upload-time = "2025-11-01T11:53:44.554Z" }, + { url = "https://files.pythonhosted.org/packages/f1/82/efad25e260b7810f01d6b69122685e355bed78c94a12784bac4e0beb2afb/rapidfuzz-3.14.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:010e12e2411a4854b0434f920e72b717c43f8ec48d57e7affe5c42ecfa05dd0e", size = 1410702, upload-time = "2025-11-01T11:53:46.066Z" }, + { url = "https://files.pythonhosted.org/packages/ba/1a/34c977b860cde91082eae4a97ae503f43e0d84d4af301d857679b66f9869/rapidfuzz-3.14.3-cp313-cp313t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5cfc3d57abd83c734d1714ec39c88a34dd69c85474918ebc21296f1e61eb5ca8", size = 1382337, upload-time = "2025-11-01T11:53:47.62Z" }, + { url = "https://files.pythonhosted.org/packages/88/74/f50ea0e24a5880a9159e8fd256b84d8f4634c2f6b4f98028bdd31891d907/rapidfuzz-3.14.3-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:89acb8cbb52904f763e5ac238083b9fc193bed8d1f03c80568b20e4cef43a519", size = 3165563, upload-time = "2025-11-01T11:53:49.216Z" }, + { url = "https://files.pythonhosted.org/packages/e8/7a/e744359404d7737049c26099423fc54bcbf303de5d870d07d2fb1410f567/rapidfuzz-3.14.3-cp313-cp313t-manylinux_2_31_armv7l.whl", hash = "sha256:7d9af908c2f371bfb9c985bd134e295038e3031e666e4b2ade1e7cb7f5af2f1a", size = 1214727, upload-time = "2025-11-01T11:53:50.883Z" }, + { url = "https://files.pythonhosted.org/packages/d3/2e/87adfe14ce75768ec6c2b8acd0e05e85e84be4be5e3d283cdae360afc4fe/rapidfuzz-3.14.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:1f1925619627f8798f8c3a391d81071336942e5fe8467bc3c567f982e7ce2897", size = 2403349, upload-time = "2025-11-01T11:53:52.322Z" }, + { url = "https://files.pythonhosted.org/packages/70/17/6c0b2b2bff9c8b12e12624c07aa22e922b0c72a490f180fa9183d1ef2c75/rapidfuzz-3.14.3-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:152555187360978119e98ce3e8263d70dd0c40c7541193fc302e9b7125cf8f58", size = 2507596, upload-time = "2025-11-01T11:53:53.835Z" }, + { url = "https://files.pythonhosted.org/packages/c3/d1/87852a7cbe4da7b962174c749a47433881a63a817d04f3e385ea9babcd9e/rapidfuzz-3.14.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:52619d25a09546b8db078981ca88939d72caa6b8701edd8b22e16482a38e799f", size = 4273595, upload-time = "2025-11-01T11:53:55.961Z" }, + { url = "https://files.pythonhosted.org/packages/c1/ab/1d0354b7d1771a28fa7fe089bc23acec2bdd3756efa2419f463e3ed80e16/rapidfuzz-3.14.3-cp313-cp313t-win32.whl", hash = "sha256:489ce98a895c98cad284f0a47960c3e264c724cb4cfd47a1430fa091c0c25204", size = 1757773, upload-time = "2025-11-01T11:53:57.628Z" }, + { url = "https://files.pythonhosted.org/packages/0b/0c/71ef356adc29e2bdf74cd284317b34a16b80258fa0e7e242dd92cc1e6d10/rapidfuzz-3.14.3-cp313-cp313t-win_amd64.whl", hash = "sha256:656e52b054d5b5c2524169240e50cfa080b04b1c613c5f90a2465e84888d6f15", size = 1576797, upload-time = "2025-11-01T11:53:59.455Z" }, + { url = "https://files.pythonhosted.org/packages/fe/d2/0e64fc27bb08d4304aa3d11154eb5480bcf5d62d60140a7ee984dc07468a/rapidfuzz-3.14.3-cp313-cp313t-win_arm64.whl", hash = "sha256:c7e40c0a0af02ad6e57e89f62bef8604f55a04ecae90b0ceeda591bbf5923317", size = 829940, upload-time = "2025-11-01T11:54:01.1Z" }, + { url = "https://files.pythonhosted.org/packages/32/6f/1b88aaeade83abc5418788f9e6b01efefcd1a69d65ded37d89cd1662be41/rapidfuzz-3.14.3-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:442125473b247227d3f2de807a11da6c08ccf536572d1be943f8e262bae7e4ea", size = 1942086, upload-time = "2025-11-01T11:54:02.592Z" }, + { url = "https://files.pythonhosted.org/packages/a0/2c/b23861347436cb10f46c2bd425489ec462790faaa360a54a7ede5f78de88/rapidfuzz-3.14.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1ec0c8c0c3d4f97ced46b2e191e883f8c82dbbf6d5ebc1842366d7eff13cd5a6", size = 1386993, upload-time = "2025-11-01T11:54:04.12Z" }, + { url = "https://files.pythonhosted.org/packages/83/86/5d72e2c060aa1fbdc1f7362d938f6b237dff91f5b9fc5dd7cc297e112250/rapidfuzz-3.14.3-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2dc37bc20272f388b8c3a4eba4febc6e77e50a8f450c472def4751e7678f55e4", size = 1379126, upload-time = "2025-11-01T11:54:05.777Z" }, + { url = "https://files.pythonhosted.org/packages/c9/bc/ef2cee3e4d8b3fc22705ff519f0d487eecc756abdc7c25d53686689d6cf2/rapidfuzz-3.14.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dee362e7e79bae940a5e2b3f6d09c6554db6a4e301cc68343886c08be99844f1", size = 3159304, upload-time = "2025-11-01T11:54:07.351Z" }, + { url = "https://files.pythonhosted.org/packages/a0/36/dc5f2f62bbc7bc90be1f75eeaf49ed9502094bb19290dfb4747317b17f12/rapidfuzz-3.14.3-cp314-cp314-manylinux_2_31_armv7l.whl", hash = "sha256:4b39921df948388a863f0e267edf2c36302983459b021ab928d4b801cbe6a421", size = 1218207, upload-time = "2025-11-01T11:54:09.641Z" }, + { url = "https://files.pythonhosted.org/packages/df/7e/8f4be75c1bc62f47edf2bbbe2370ee482fae655ebcc4718ac3827ead3904/rapidfuzz-3.14.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:beda6aa9bc44d1d81242e7b291b446be352d3451f8217fcb068fc2933927d53b", size = 2401245, upload-time = "2025-11-01T11:54:11.543Z" }, + { url = "https://files.pythonhosted.org/packages/05/38/f7c92759e1bb188dd05b80d11c630ba59b8d7856657baf454ff56059c2ab/rapidfuzz-3.14.3-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:6a014ba09657abfcfeed64b7d09407acb29af436d7fc075b23a298a7e4a6b41c", size = 2518308, upload-time = "2025-11-01T11:54:13.134Z" }, + { url = "https://files.pythonhosted.org/packages/c7/ac/85820f70fed5ecb5f1d9a55f1e1e2090ef62985ef41db289b5ac5ec56e28/rapidfuzz-3.14.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:32eeafa3abce138bb725550c0e228fc7eaeec7059aa8093d9cbbec2b58c2371a", size = 4265011, upload-time = "2025-11-01T11:54:15.087Z" }, + { url = "https://files.pythonhosted.org/packages/46/a9/616930721ea9835c918af7cde22bff17f9db3639b0c1a7f96684be7f5630/rapidfuzz-3.14.3-cp314-cp314-win32.whl", hash = "sha256:adb44d996fc610c7da8c5048775b21db60dd63b1548f078e95858c05c86876a3", size = 1742245, upload-time = "2025-11-01T11:54:17.19Z" }, + { url = "https://files.pythonhosted.org/packages/06/8a/f2fa5e9635b1ccafda4accf0e38246003f69982d7c81f2faa150014525a4/rapidfuzz-3.14.3-cp314-cp314-win_amd64.whl", hash = "sha256:f3d15d8527e2b293e38ce6e437631af0708df29eafd7c9fc48210854c94472f9", size = 1584856, upload-time = "2025-11-01T11:54:18.764Z" }, + { url = "https://files.pythonhosted.org/packages/ef/97/09e20663917678a6d60d8e0e29796db175b1165e2079830430342d5298be/rapidfuzz-3.14.3-cp314-cp314-win_arm64.whl", hash = "sha256:576e4b9012a67e0bf54fccb69a7b6c94d4e86a9540a62f1a5144977359133583", size = 833490, upload-time = "2025-11-01T11:54:20.753Z" }, + { url = "https://files.pythonhosted.org/packages/03/1b/6b6084576ba87bf21877c77218a0c97ba98cb285b0c02eaaee3acd7c4513/rapidfuzz-3.14.3-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:cec3c0da88562727dd5a5a364bd9efeb535400ff0bfb1443156dd139a1dd7b50", size = 1968658, upload-time = "2025-11-01T11:54:22.25Z" }, + { url = "https://files.pythonhosted.org/packages/38/c0/fb02a0db80d95704b0a6469cc394e8c38501abf7e1c0b2afe3261d1510c2/rapidfuzz-3.14.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:d1fa009f8b1100e4880868137e7bf0501422898f7674f2adcd85d5a67f041296", size = 1410742, upload-time = "2025-11-01T11:54:23.863Z" }, + { url = "https://files.pythonhosted.org/packages/a4/72/3fbf12819fc6afc8ec75a45204013b40979d068971e535a7f3512b05e765/rapidfuzz-3.14.3-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b86daa7419b5e8b180690efd1fdbac43ff19230803282521c5b5a9c83977655", size = 1382810, upload-time = "2025-11-01T11:54:25.571Z" }, + { url = "https://files.pythonhosted.org/packages/0f/18/0f1991d59bb7eee28922a00f79d83eafa8c7bfb4e8edebf4af2a160e7196/rapidfuzz-3.14.3-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c7bd1816db05d6c5ffb3a4df0a2b7b56fb8c81ef584d08e37058afa217da91b1", size = 3166349, upload-time = "2025-11-01T11:54:27.195Z" }, + { url = "https://files.pythonhosted.org/packages/0d/f0/baa958b1989c8f88c78bbb329e969440cf330b5a01a982669986495bb980/rapidfuzz-3.14.3-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:33da4bbaf44e9755b0ce192597f3bde7372fe2e381ab305f41b707a95ac57aa7", size = 1214994, upload-time = "2025-11-01T11:54:28.821Z" }, + { url = "https://files.pythonhosted.org/packages/e4/a0/cd12ec71f9b2519a3954febc5740291cceabc64c87bc6433afcb36259f3b/rapidfuzz-3.14.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:3fecce764cf5a991ee2195a844196da840aba72029b2612f95ac68a8b74946bf", size = 2403919, upload-time = "2025-11-01T11:54:30.393Z" }, + { url = "https://files.pythonhosted.org/packages/0b/ce/019bd2176c1644098eced4f0595cb4b3ef52e4941ac9a5854f209d0a6e16/rapidfuzz-3.14.3-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:ecd7453e02cf072258c3a6b8e930230d789d5d46cc849503729f9ce475d0e785", size = 2508346, upload-time = "2025-11-01T11:54:32.048Z" }, + { url = "https://files.pythonhosted.org/packages/23/f8/be16c68e2c9e6c4f23e8f4adbb7bccc9483200087ed28ff76c5312da9b14/rapidfuzz-3.14.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:ea188aa00e9bcae8c8411f006a5f2f06c4607a02f24eab0d8dc58566aa911f35", size = 4274105, upload-time = "2025-11-01T11:54:33.701Z" }, + { url = "https://files.pythonhosted.org/packages/a1/d1/5ab148e03f7e6ec8cd220ccf7af74d3aaa4de26dd96df58936beb7cba820/rapidfuzz-3.14.3-cp314-cp314t-win32.whl", hash = "sha256:7ccbf68100c170e9a0581accbe9291850936711548c6688ce3bfb897b8c589ad", size = 1793465, upload-time = "2025-11-01T11:54:35.331Z" }, + { url = "https://files.pythonhosted.org/packages/cd/97/433b2d98e97abd9fff1c470a109b311669f44cdec8d0d5aa250aceaed1fb/rapidfuzz-3.14.3-cp314-cp314t-win_amd64.whl", hash = "sha256:9ec02e62ae765a318d6de38df609c57fc6dacc65c0ed1fd489036834fd8a620c", size = 1623491, upload-time = "2025-11-01T11:54:38.085Z" }, + { url = "https://files.pythonhosted.org/packages/e2/f6/e2176eb94f94892441bce3ddc514c179facb65db245e7ce3356965595b19/rapidfuzz-3.14.3-cp314-cp314t-win_arm64.whl", hash = "sha256:e805e52322ae29aa945baf7168b6c898120fbc16d2b8f940b658a5e9e3999253", size = 851487, upload-time = "2025-11-01T11:54:40.176Z" }, + { url = "https://files.pythonhosted.org/packages/c9/33/b5bd6475c7c27164b5becc9b0e3eb978f1e3640fea590dd3dced6006ee83/rapidfuzz-3.14.3-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7cf174b52cb3ef5d49e45d0a1133b7e7d0ecf770ed01f97ae9962c5c91d97d23", size = 1888499, upload-time = "2025-11-01T11:54:42.094Z" }, + { url = "https://files.pythonhosted.org/packages/30/d2/89d65d4db4bb931beade9121bc71ad916b5fa9396e807d11b33731494e8e/rapidfuzz-3.14.3-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:442cba39957a008dfc5bdef21a9c3f4379e30ffb4e41b8555dbaf4887eca9300", size = 1336747, upload-time = "2025-11-01T11:54:43.957Z" }, + { url = "https://files.pythonhosted.org/packages/85/33/cd87d92b23f0b06e8914a61cea6850c6d495ca027f669fab7a379041827a/rapidfuzz-3.14.3-pp311-pypy311_pp73-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1faa0f8f76ba75fd7b142c984947c280ef6558b5067af2ae9b8729b0a0f99ede", size = 1352187, upload-time = "2025-11-01T11:54:45.518Z" }, + { url = "https://files.pythonhosted.org/packages/22/20/9d30b4a1ab26aac22fff17d21dec7e9089ccddfe25151d0a8bb57001dc3d/rapidfuzz-3.14.3-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1e6eefec45625c634926a9fd46c9e4f31118ac8f3156fff9494422cee45207e6", size = 3101472, upload-time = "2025-11-01T11:54:47.255Z" }, + { url = "https://files.pythonhosted.org/packages/b1/ad/fa2d3e5c29a04ead7eaa731c7cd1f30f9ec3c77b3a578fdf90280797cbcb/rapidfuzz-3.14.3-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:56fefb4382bb12250f164250240b9dd7772e41c5c8ae976fd598a32292449cc5", size = 1511361, upload-time = "2025-11-01T11:54:49.057Z" }, +] + +[[package]] +name = "referencing" +version = "0.36.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "attrs" }, + { name = "rpds-py" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/2f/db/98b5c277be99dd18bfd91dd04e1b759cad18d1a338188c936e92f921c7e2/referencing-0.36.2.tar.gz", hash = "sha256:df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa", size = 74744, upload-time = "2025-01-25T08:48:16.138Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c1/b1/3baf80dc6d2b7bc27a95a67752d0208e410351e3feb4eb78de5f77454d8d/referencing-0.36.2-py3-none-any.whl", hash = "sha256:e8699adbbf8b5c7de96d8ffa0eb5c158b3beafce084968e2ea8bb08c6794dcd0", size = 26775, upload-time = "2025-01-25T08:48:14.241Z" }, +] + +[[package]] +name = "regex" +version = "2025.11.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/cc/a9/546676f25e573a4cf00fe8e119b78a37b6a8fe2dc95cda877b30889c9c45/regex-2025.11.3.tar.gz", hash = "sha256:1fedc720f9bb2494ce31a58a1631f9c82df6a09b49c19517ea5cc280b4541e01", size = 414669, upload-time = "2025-11-03T21:34:22.089Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f7/90/4fb5056e5f03a7048abd2b11f598d464f0c167de4f2a51aa868c376b8c70/regex-2025.11.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:eadade04221641516fa25139273505a1c19f9bf97589a05bc4cfcd8b4a618031", size = 488081, upload-time = "2025-11-03T21:31:11.946Z" }, + { url = "https://files.pythonhosted.org/packages/85/23/63e481293fac8b069d84fba0299b6666df720d875110efd0338406b5d360/regex-2025.11.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:feff9e54ec0dd3833d659257f5c3f5322a12eee58ffa360984b716f8b92983f4", size = 290554, upload-time = "2025-11-03T21:31:13.387Z" }, + { url = "https://files.pythonhosted.org/packages/2b/9d/b101d0262ea293a0066b4522dfb722eb6a8785a8c3e084396a5f2c431a46/regex-2025.11.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3b30bc921d50365775c09a7ed446359e5c0179e9e2512beec4a60cbcef6ddd50", size = 288407, upload-time = "2025-11-03T21:31:14.809Z" }, + { url = "https://files.pythonhosted.org/packages/0c/64/79241c8209d5b7e00577ec9dca35cd493cc6be35b7d147eda367d6179f6d/regex-2025.11.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f99be08cfead2020c7ca6e396c13543baea32343b7a9a5780c462e323bd8872f", size = 793418, upload-time = "2025-11-03T21:31:16.556Z" }, + { url = "https://files.pythonhosted.org/packages/3d/e2/23cd5d3573901ce8f9757c92ca4db4d09600b865919b6d3e7f69f03b1afd/regex-2025.11.3-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6dd329a1b61c0ee95ba95385fb0c07ea0d3fe1a21e1349fa2bec272636217118", size = 860448, upload-time = "2025-11-03T21:31:18.12Z" }, + { url = "https://files.pythonhosted.org/packages/2a/4c/aecf31beeaa416d0ae4ecb852148d38db35391aac19c687b5d56aedf3a8b/regex-2025.11.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4c5238d32f3c5269d9e87be0cf096437b7622b6920f5eac4fd202468aaeb34d2", size = 907139, upload-time = "2025-11-03T21:31:20.753Z" }, + { url = "https://files.pythonhosted.org/packages/61/22/b8cb00df7d2b5e0875f60628594d44dba283e951b1ae17c12f99e332cc0a/regex-2025.11.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:10483eefbfb0adb18ee9474498c9a32fcf4e594fbca0543bb94c48bac6183e2e", size = 800439, upload-time = "2025-11-03T21:31:22.069Z" }, + { url = "https://files.pythonhosted.org/packages/02/a8/c4b20330a5cdc7a8eb265f9ce593f389a6a88a0c5f280cf4d978f33966bc/regex-2025.11.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:78c2d02bb6e1da0720eedc0bad578049cad3f71050ef8cd065ecc87691bed2b0", size = 782965, upload-time = "2025-11-03T21:31:23.598Z" }, + { url = "https://files.pythonhosted.org/packages/b4/4c/ae3e52988ae74af4b04d2af32fee4e8077f26e51b62ec2d12d246876bea2/regex-2025.11.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e6b49cd2aad93a1790ce9cffb18964f6d3a4b0b3dbdbd5de094b65296fce6e58", size = 854398, upload-time = "2025-11-03T21:31:25.008Z" }, + { url = "https://files.pythonhosted.org/packages/06/d1/a8b9cf45874eda14b2e275157ce3b304c87e10fb38d9fc26a6e14eb18227/regex-2025.11.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:885b26aa3ee56433b630502dc3d36ba78d186a00cc535d3806e6bfd9ed3c70ab", size = 845897, upload-time = "2025-11-03T21:31:26.427Z" }, + { url = "https://files.pythonhosted.org/packages/ea/fe/1830eb0236be93d9b145e0bd8ab499f31602fe0999b1f19e99955aa8fe20/regex-2025.11.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ddd76a9f58e6a00f8772e72cff8ebcff78e022be95edf018766707c730593e1e", size = 788906, upload-time = "2025-11-03T21:31:28.078Z" }, + { url = "https://files.pythonhosted.org/packages/66/47/dc2577c1f95f188c1e13e2e69d8825a5ac582ac709942f8a03af42ed6e93/regex-2025.11.3-cp311-cp311-win32.whl", hash = "sha256:3e816cc9aac1cd3cc9a4ec4d860f06d40f994b5c7b4d03b93345f44e08cc68bf", size = 265812, upload-time = "2025-11-03T21:31:29.72Z" }, + { url = "https://files.pythonhosted.org/packages/50/1e/15f08b2f82a9bbb510621ec9042547b54d11e83cb620643ebb54e4eb7d71/regex-2025.11.3-cp311-cp311-win_amd64.whl", hash = "sha256:087511f5c8b7dfbe3a03f5d5ad0c2a33861b1fc387f21f6f60825a44865a385a", size = 277737, upload-time = "2025-11-03T21:31:31.422Z" }, + { url = "https://files.pythonhosted.org/packages/f4/fc/6500eb39f5f76c5e47a398df82e6b535a5e345f839581012a418b16f9cc3/regex-2025.11.3-cp311-cp311-win_arm64.whl", hash = "sha256:1ff0d190c7f68ae7769cd0313fe45820ba07ffebfddfaa89cc1eb70827ba0ddc", size = 270290, upload-time = "2025-11-03T21:31:33.041Z" }, + { url = "https://files.pythonhosted.org/packages/e8/74/18f04cb53e58e3fb107439699bd8375cf5a835eec81084e0bddbd122e4c2/regex-2025.11.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:bc8ab71e2e31b16e40868a40a69007bc305e1109bd4658eb6cad007e0bf67c41", size = 489312, upload-time = "2025-11-03T21:31:34.343Z" }, + { url = "https://files.pythonhosted.org/packages/78/3f/37fcdd0d2b1e78909108a876580485ea37c91e1acf66d3bb8e736348f441/regex-2025.11.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:22b29dda7e1f7062a52359fca6e58e548e28c6686f205e780b02ad8ef710de36", size = 291256, upload-time = "2025-11-03T21:31:35.675Z" }, + { url = "https://files.pythonhosted.org/packages/bf/26/0a575f58eb23b7ebd67a45fccbc02ac030b737b896b7e7a909ffe43ffd6a/regex-2025.11.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3a91e4a29938bc1a082cc28fdea44be420bf2bebe2665343029723892eb073e1", size = 288921, upload-time = "2025-11-03T21:31:37.07Z" }, + { url = "https://files.pythonhosted.org/packages/ea/98/6a8dff667d1af907150432cf5abc05a17ccd32c72a3615410d5365ac167a/regex-2025.11.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:08b884f4226602ad40c5d55f52bf91a9df30f513864e0054bad40c0e9cf1afb7", size = 798568, upload-time = "2025-11-03T21:31:38.784Z" }, + { url = "https://files.pythonhosted.org/packages/64/15/92c1db4fa4e12733dd5a526c2dd2b6edcbfe13257e135fc0f6c57f34c173/regex-2025.11.3-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3e0b11b2b2433d1c39c7c7a30e3f3d0aeeea44c2a8d0bae28f6b95f639927a69", size = 864165, upload-time = "2025-11-03T21:31:40.559Z" }, + { url = "https://files.pythonhosted.org/packages/f9/e7/3ad7da8cdee1ce66c7cd37ab5ab05c463a86ffeb52b1a25fe7bd9293b36c/regex-2025.11.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:87eb52a81ef58c7ba4d45c3ca74e12aa4b4e77816f72ca25258a85b3ea96cb48", size = 912182, upload-time = "2025-11-03T21:31:42.002Z" }, + { url = "https://files.pythonhosted.org/packages/84/bd/9ce9f629fcb714ffc2c3faf62b6766ecb7a585e1e885eb699bcf130a5209/regex-2025.11.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a12ab1f5c29b4e93db518f5e3872116b7e9b1646c9f9f426f777b50d44a09e8c", size = 803501, upload-time = "2025-11-03T21:31:43.815Z" }, + { url = "https://files.pythonhosted.org/packages/7c/0f/8dc2e4349d8e877283e6edd6c12bdcebc20f03744e86f197ab6e4492bf08/regex-2025.11.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:7521684c8c7c4f6e88e35ec89680ee1aa8358d3f09d27dfbdf62c446f5d4c695", size = 787842, upload-time = "2025-11-03T21:31:45.353Z" }, + { url = "https://files.pythonhosted.org/packages/f9/73/cff02702960bc185164d5619c0c62a2f598a6abff6695d391b096237d4ab/regex-2025.11.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:7fe6e5440584e94cc4b3f5f4d98a25e29ca12dccf8873679a635638349831b98", size = 858519, upload-time = "2025-11-03T21:31:46.814Z" }, + { url = "https://files.pythonhosted.org/packages/61/83/0e8d1ae71e15bc1dc36231c90b46ee35f9d52fab2e226b0e039e7ea9c10a/regex-2025.11.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:8e026094aa12b43f4fd74576714e987803a315c76edb6b098b9809db5de58f74", size = 850611, upload-time = "2025-11-03T21:31:48.289Z" }, + { url = "https://files.pythonhosted.org/packages/c8/f5/70a5cdd781dcfaa12556f2955bf170cd603cb1c96a1827479f8faea2df97/regex-2025.11.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:435bbad13e57eb5606a68443af62bed3556de2f46deb9f7d4237bc2f1c9fb3a0", size = 789759, upload-time = "2025-11-03T21:31:49.759Z" }, + { url = "https://files.pythonhosted.org/packages/59/9b/7c29be7903c318488983e7d97abcf8ebd3830e4c956c4c540005fcfb0462/regex-2025.11.3-cp312-cp312-win32.whl", hash = "sha256:3839967cf4dc4b985e1570fd8d91078f0c519f30491c60f9ac42a8db039be204", size = 266194, upload-time = "2025-11-03T21:31:51.53Z" }, + { url = "https://files.pythonhosted.org/packages/1a/67/3b92df89f179d7c367be654ab5626ae311cb28f7d5c237b6bb976cd5fbbb/regex-2025.11.3-cp312-cp312-win_amd64.whl", hash = "sha256:e721d1b46e25c481dc5ded6f4b3f66c897c58d2e8cfdf77bbced84339108b0b9", size = 277069, upload-time = "2025-11-03T21:31:53.151Z" }, + { url = "https://files.pythonhosted.org/packages/d7/55/85ba4c066fe5094d35b249c3ce8df0ba623cfd35afb22d6764f23a52a1c5/regex-2025.11.3-cp312-cp312-win_arm64.whl", hash = "sha256:64350685ff08b1d3a6fff33f45a9ca183dc1d58bbfe4981604e70ec9801bbc26", size = 270330, upload-time = "2025-11-03T21:31:54.514Z" }, + { url = "https://files.pythonhosted.org/packages/e1/a7/dda24ebd49da46a197436ad96378f17df30ceb40e52e859fc42cac45b850/regex-2025.11.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:c1e448051717a334891f2b9a620fe36776ebf3dd8ec46a0b877c8ae69575feb4", size = 489081, upload-time = "2025-11-03T21:31:55.9Z" }, + { url = "https://files.pythonhosted.org/packages/19/22/af2dc751aacf88089836aa088a1a11c4f21a04707eb1b0478e8e8fb32847/regex-2025.11.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:9b5aca4d5dfd7fbfbfbdaf44850fcc7709a01146a797536a8f84952e940cca76", size = 291123, upload-time = "2025-11-03T21:31:57.758Z" }, + { url = "https://files.pythonhosted.org/packages/a3/88/1a3ea5672f4b0a84802ee9891b86743438e7c04eb0b8f8c4e16a42375327/regex-2025.11.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:04d2765516395cf7dda331a244a3282c0f5ae96075f728629287dfa6f76ba70a", size = 288814, upload-time = "2025-11-03T21:32:01.12Z" }, + { url = "https://files.pythonhosted.org/packages/fb/8c/f5987895bf42b8ddeea1b315c9fedcfe07cadee28b9c98cf50d00adcb14d/regex-2025.11.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5d9903ca42bfeec4cebedba8022a7c97ad2aab22e09573ce9976ba01b65e4361", size = 798592, upload-time = "2025-11-03T21:32:03.006Z" }, + { url = "https://files.pythonhosted.org/packages/99/2a/6591ebeede78203fa77ee46a1c36649e02df9eaa77a033d1ccdf2fcd5d4e/regex-2025.11.3-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:639431bdc89d6429f6721625e8129413980ccd62e9d3f496be618a41d205f160", size = 864122, upload-time = "2025-11-03T21:32:04.553Z" }, + { url = "https://files.pythonhosted.org/packages/94/d6/be32a87cf28cf8ed064ff281cfbd49aefd90242a83e4b08b5a86b38e8eb4/regex-2025.11.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f117efad42068f9715677c8523ed2be1518116d1c49b1dd17987716695181efe", size = 912272, upload-time = "2025-11-03T21:32:06.148Z" }, + { url = "https://files.pythonhosted.org/packages/62/11/9bcef2d1445665b180ac7f230406ad80671f0fc2a6ffb93493b5dd8cd64c/regex-2025.11.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4aecb6f461316adf9f1f0f6a4a1a3d79e045f9b71ec76055a791affa3b285850", size = 803497, upload-time = "2025-11-03T21:32:08.162Z" }, + { url = "https://files.pythonhosted.org/packages/e5/a7/da0dc273d57f560399aa16d8a68ae7f9b57679476fc7ace46501d455fe84/regex-2025.11.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:3b3a5f320136873cc5561098dfab677eea139521cb9a9e8db98b7e64aef44cbc", size = 787892, upload-time = "2025-11-03T21:32:09.769Z" }, + { url = "https://files.pythonhosted.org/packages/da/4b/732a0c5a9736a0b8d6d720d4945a2f1e6f38f87f48f3173559f53e8d5d82/regex-2025.11.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:75fa6f0056e7efb1f42a1c34e58be24072cb9e61a601340cc1196ae92326a4f9", size = 858462, upload-time = "2025-11-03T21:32:11.769Z" }, + { url = "https://files.pythonhosted.org/packages/0c/f5/a2a03df27dc4c2d0c769220f5110ba8c4084b0bfa9ab0f9b4fcfa3d2b0fc/regex-2025.11.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:dbe6095001465294f13f1adcd3311e50dd84e5a71525f20a10bd16689c61ce0b", size = 850528, upload-time = "2025-11-03T21:32:13.906Z" }, + { url = "https://files.pythonhosted.org/packages/d6/09/e1cd5bee3841c7f6eb37d95ca91cdee7100b8f88b81e41c2ef426910891a/regex-2025.11.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:454d9b4ae7881afbc25015b8627c16d88a597479b9dea82b8c6e7e2e07240dc7", size = 789866, upload-time = "2025-11-03T21:32:15.748Z" }, + { url = "https://files.pythonhosted.org/packages/eb/51/702f5ea74e2a9c13d855a6a85b7f80c30f9e72a95493260193c07f3f8d74/regex-2025.11.3-cp313-cp313-win32.whl", hash = "sha256:28ba4d69171fc6e9896337d4fc63a43660002b7da53fc15ac992abcf3410917c", size = 266189, upload-time = "2025-11-03T21:32:17.493Z" }, + { url = "https://files.pythonhosted.org/packages/8b/00/6e29bb314e271a743170e53649db0fdb8e8ff0b64b4f425f5602f4eb9014/regex-2025.11.3-cp313-cp313-win_amd64.whl", hash = "sha256:bac4200befe50c670c405dc33af26dad5a3b6b255dd6c000d92fe4629f9ed6a5", size = 277054, upload-time = "2025-11-03T21:32:19.042Z" }, + { url = "https://files.pythonhosted.org/packages/25/f1/b156ff9f2ec9ac441710764dda95e4edaf5f36aca48246d1eea3f1fd96ec/regex-2025.11.3-cp313-cp313-win_arm64.whl", hash = "sha256:2292cd5a90dab247f9abe892ac584cb24f0f54680c73fcb4a7493c66c2bf2467", size = 270325, upload-time = "2025-11-03T21:32:21.338Z" }, + { url = "https://files.pythonhosted.org/packages/20/28/fd0c63357caefe5680b8ea052131acbd7f456893b69cc2a90cc3e0dc90d4/regex-2025.11.3-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:1eb1ebf6822b756c723e09f5186473d93236c06c579d2cc0671a722d2ab14281", size = 491984, upload-time = "2025-11-03T21:32:23.466Z" }, + { url = "https://files.pythonhosted.org/packages/df/ec/7014c15626ab46b902b3bcc4b28a7bae46d8f281fc7ea9c95e22fcaaa917/regex-2025.11.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:1e00ec2970aab10dc5db34af535f21fcf32b4a31d99e34963419636e2f85ae39", size = 292673, upload-time = "2025-11-03T21:32:25.034Z" }, + { url = "https://files.pythonhosted.org/packages/23/ab/3b952ff7239f20d05f1f99e9e20188513905f218c81d52fb5e78d2bf7634/regex-2025.11.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a4cb042b615245d5ff9b3794f56be4138b5adc35a4166014d31d1814744148c7", size = 291029, upload-time = "2025-11-03T21:32:26.528Z" }, + { url = "https://files.pythonhosted.org/packages/21/7e/3dc2749fc684f455f162dcafb8a187b559e2614f3826877d3844a131f37b/regex-2025.11.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:44f264d4bf02f3176467d90b294d59bf1db9fe53c141ff772f27a8b456b2a9ed", size = 807437, upload-time = "2025-11-03T21:32:28.363Z" }, + { url = "https://files.pythonhosted.org/packages/1b/0b/d529a85ab349c6a25d1ca783235b6e3eedf187247eab536797021f7126c6/regex-2025.11.3-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7be0277469bf3bd7a34a9c57c1b6a724532a0d235cd0dc4e7f4316f982c28b19", size = 873368, upload-time = "2025-11-03T21:32:30.4Z" }, + { url = "https://files.pythonhosted.org/packages/7d/18/2d868155f8c9e3e9d8f9e10c64e9a9f496bb8f7e037a88a8bed26b435af6/regex-2025.11.3-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0d31e08426ff4b5b650f68839f5af51a92a5b51abd8554a60c2fbc7c71f25d0b", size = 914921, upload-time = "2025-11-03T21:32:32.123Z" }, + { url = "https://files.pythonhosted.org/packages/2d/71/9d72ff0f354fa783fe2ba913c8734c3b433b86406117a8db4ea2bf1c7a2f/regex-2025.11.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e43586ce5bd28f9f285a6e729466841368c4a0353f6fd08d4ce4630843d3648a", size = 812708, upload-time = "2025-11-03T21:32:34.305Z" }, + { url = "https://files.pythonhosted.org/packages/e7/19/ce4bf7f5575c97f82b6e804ffb5c4e940c62609ab2a0d9538d47a7fdf7d4/regex-2025.11.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:0f9397d561a4c16829d4e6ff75202c1c08b68a3bdbfe29dbfcdb31c9830907c6", size = 795472, upload-time = "2025-11-03T21:32:36.364Z" }, + { url = "https://files.pythonhosted.org/packages/03/86/fd1063a176ffb7b2315f9a1b08d17b18118b28d9df163132615b835a26ee/regex-2025.11.3-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:dd16e78eb18ffdb25ee33a0682d17912e8cc8a770e885aeee95020046128f1ce", size = 868341, upload-time = "2025-11-03T21:32:38.042Z" }, + { url = "https://files.pythonhosted.org/packages/12/43/103fb2e9811205e7386366501bc866a164a0430c79dd59eac886a2822950/regex-2025.11.3-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:ffcca5b9efe948ba0661e9df0fa50d2bc4b097c70b9810212d6b62f05d83b2dd", size = 854666, upload-time = "2025-11-03T21:32:40.079Z" }, + { url = "https://files.pythonhosted.org/packages/7d/22/e392e53f3869b75804762c7c848bd2dd2abf2b70fb0e526f58724638bd35/regex-2025.11.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:c56b4d162ca2b43318ac671c65bd4d563e841a694ac70e1a976ac38fcf4ca1d2", size = 799473, upload-time = "2025-11-03T21:32:42.148Z" }, + { url = "https://files.pythonhosted.org/packages/4f/f9/8bd6b656592f925b6845fcbb4d57603a3ac2fb2373344ffa1ed70aa6820a/regex-2025.11.3-cp313-cp313t-win32.whl", hash = "sha256:9ddc42e68114e161e51e272f667d640f97e84a2b9ef14b7477c53aac20c2d59a", size = 268792, upload-time = "2025-11-03T21:32:44.13Z" }, + { url = "https://files.pythonhosted.org/packages/e5/87/0e7d603467775ff65cd2aeabf1b5b50cc1c3708556a8b849a2fa4dd1542b/regex-2025.11.3-cp313-cp313t-win_amd64.whl", hash = "sha256:7a7c7fdf755032ffdd72c77e3d8096bdcb0eb92e89e17571a196f03d88b11b3c", size = 280214, upload-time = "2025-11-03T21:32:45.853Z" }, + { url = "https://files.pythonhosted.org/packages/8d/d0/2afc6f8e94e2b64bfb738a7c2b6387ac1699f09f032d363ed9447fd2bb57/regex-2025.11.3-cp313-cp313t-win_arm64.whl", hash = "sha256:df9eb838c44f570283712e7cff14c16329a9f0fb19ca492d21d4b7528ee6821e", size = 271469, upload-time = "2025-11-03T21:32:48.026Z" }, + { url = "https://files.pythonhosted.org/packages/31/e9/f6e13de7e0983837f7b6d238ad9458800a874bf37c264f7923e63409944c/regex-2025.11.3-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:9697a52e57576c83139d7c6f213d64485d3df5bf84807c35fa409e6c970801c6", size = 489089, upload-time = "2025-11-03T21:32:50.027Z" }, + { url = "https://files.pythonhosted.org/packages/a3/5c/261f4a262f1fa65141c1b74b255988bd2fa020cc599e53b080667d591cfc/regex-2025.11.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:e18bc3f73bd41243c9b38a6d9f2366cd0e0137a9aebe2d8ff76c5b67d4c0a3f4", size = 291059, upload-time = "2025-11-03T21:32:51.682Z" }, + { url = "https://files.pythonhosted.org/packages/8e/57/f14eeb7f072b0e9a5a090d1712741fd8f214ec193dba773cf5410108bb7d/regex-2025.11.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:61a08bcb0ec14ff4e0ed2044aad948d0659604f824cbd50b55e30b0ec6f09c73", size = 288900, upload-time = "2025-11-03T21:32:53.569Z" }, + { url = "https://files.pythonhosted.org/packages/3c/6b/1d650c45e99a9b327586739d926a1cd4e94666b1bd4af90428b36af66dc7/regex-2025.11.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c9c30003b9347c24bcc210958c5d167b9e4f9be786cb380a7d32f14f9b84674f", size = 799010, upload-time = "2025-11-03T21:32:55.222Z" }, + { url = "https://files.pythonhosted.org/packages/99/ee/d66dcbc6b628ce4e3f7f0cbbb84603aa2fc0ffc878babc857726b8aab2e9/regex-2025.11.3-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4e1e592789704459900728d88d41a46fe3969b82ab62945560a31732ffc19a6d", size = 864893, upload-time = "2025-11-03T21:32:57.239Z" }, + { url = "https://files.pythonhosted.org/packages/bf/2d/f238229f1caba7ac87a6c4153d79947fb0261415827ae0f77c304260c7d3/regex-2025.11.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6538241f45eb5a25aa575dbba1069ad786f68a4f2773a29a2bd3dd1f9de787be", size = 911522, upload-time = "2025-11-03T21:32:59.274Z" }, + { url = "https://files.pythonhosted.org/packages/bd/3d/22a4eaba214a917c80e04f6025d26143690f0419511e0116508e24b11c9b/regex-2025.11.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bce22519c989bb72a7e6b36a199384c53db7722fe669ba891da75907fe3587db", size = 803272, upload-time = "2025-11-03T21:33:01.393Z" }, + { url = "https://files.pythonhosted.org/packages/84/b1/03188f634a409353a84b5ef49754b97dbcc0c0f6fd6c8ede505a8960a0a4/regex-2025.11.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:66d559b21d3640203ab9075797a55165d79017520685fb407b9234d72ab63c62", size = 787958, upload-time = "2025-11-03T21:33:03.379Z" }, + { url = "https://files.pythonhosted.org/packages/99/6a/27d072f7fbf6fadd59c64d210305e1ff865cc3b78b526fd147db768c553b/regex-2025.11.3-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:669dcfb2e38f9e8c69507bace46f4889e3abbfd9b0c29719202883c0a603598f", size = 859289, upload-time = "2025-11-03T21:33:05.374Z" }, + { url = "https://files.pythonhosted.org/packages/9a/70/1b3878f648e0b6abe023172dacb02157e685564853cc363d9961bcccde4e/regex-2025.11.3-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:32f74f35ff0f25a5021373ac61442edcb150731fbaa28286bbc8bb1582c89d02", size = 850026, upload-time = "2025-11-03T21:33:07.131Z" }, + { url = "https://files.pythonhosted.org/packages/dd/d5/68e25559b526b8baab8e66839304ede68ff6727237a47727d240006bd0ff/regex-2025.11.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:e6c7a21dffba883234baefe91bc3388e629779582038f75d2a5be918e250f0ed", size = 789499, upload-time = "2025-11-03T21:33:09.141Z" }, + { url = "https://files.pythonhosted.org/packages/fc/df/43971264857140a350910d4e33df725e8c94dd9dee8d2e4729fa0d63d49e/regex-2025.11.3-cp314-cp314-win32.whl", hash = "sha256:795ea137b1d809eb6836b43748b12634291c0ed55ad50a7d72d21edf1cd565c4", size = 271604, upload-time = "2025-11-03T21:33:10.9Z" }, + { url = "https://files.pythonhosted.org/packages/01/6f/9711b57dc6894a55faf80a4c1b5aa4f8649805cb9c7aef46f7d27e2b9206/regex-2025.11.3-cp314-cp314-win_amd64.whl", hash = "sha256:9f95fbaa0ee1610ec0fc6b26668e9917a582ba80c52cc6d9ada15e30aa9ab9ad", size = 280320, upload-time = "2025-11-03T21:33:12.572Z" }, + { url = "https://files.pythonhosted.org/packages/f1/7e/f6eaa207d4377481f5e1775cdeb5a443b5a59b392d0065f3417d31d80f87/regex-2025.11.3-cp314-cp314-win_arm64.whl", hash = "sha256:dfec44d532be4c07088c3de2876130ff0fbeeacaa89a137decbbb5f665855a0f", size = 273372, upload-time = "2025-11-03T21:33:14.219Z" }, + { url = "https://files.pythonhosted.org/packages/c3/06/49b198550ee0f5e4184271cee87ba4dfd9692c91ec55289e6282f0f86ccf/regex-2025.11.3-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:ba0d8a5d7f04f73ee7d01d974d47c5834f8a1b0224390e4fe7c12a3a92a78ecc", size = 491985, upload-time = "2025-11-03T21:33:16.555Z" }, + { url = "https://files.pythonhosted.org/packages/ce/bf/abdafade008f0b1c9da10d934034cb670432d6cf6cbe38bbb53a1cfd6cf8/regex-2025.11.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:442d86cf1cfe4faabf97db7d901ef58347efd004934da045c745e7b5bd57ac49", size = 292669, upload-time = "2025-11-03T21:33:18.32Z" }, + { url = "https://files.pythonhosted.org/packages/f9/ef/0c357bb8edbd2ad8e273fcb9e1761bc37b8acbc6e1be050bebd6475f19c1/regex-2025.11.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:fd0a5e563c756de210bb964789b5abe4f114dacae9104a47e1a649b910361536", size = 291030, upload-time = "2025-11-03T21:33:20.048Z" }, + { url = "https://files.pythonhosted.org/packages/79/06/edbb67257596649b8fb088d6aeacbcb248ac195714b18a65e018bf4c0b50/regex-2025.11.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bf3490bcbb985a1ae97b2ce9ad1c0f06a852d5b19dde9b07bdf25bf224248c95", size = 807674, upload-time = "2025-11-03T21:33:21.797Z" }, + { url = "https://files.pythonhosted.org/packages/f4/d9/ad4deccfce0ea336296bd087f1a191543bb99ee1c53093dcd4c64d951d00/regex-2025.11.3-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3809988f0a8b8c9dcc0f92478d6501fac7200b9ec56aecf0ec21f4a2ec4b6009", size = 873451, upload-time = "2025-11-03T21:33:23.741Z" }, + { url = "https://files.pythonhosted.org/packages/13/75/a55a4724c56ef13e3e04acaab29df26582f6978c000ac9cd6810ad1f341f/regex-2025.11.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f4ff94e58e84aedb9c9fce66d4ef9f27a190285b451420f297c9a09f2b9abee9", size = 914980, upload-time = "2025-11-03T21:33:25.999Z" }, + { url = "https://files.pythonhosted.org/packages/67/1e/a1657ee15bd9116f70d4a530c736983eed997b361e20ecd8f5ca3759d5c5/regex-2025.11.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7eb542fd347ce61e1321b0a6b945d5701528dca0cd9759c2e3bb8bd57e47964d", size = 812852, upload-time = "2025-11-03T21:33:27.852Z" }, + { url = "https://files.pythonhosted.org/packages/b8/6f/f7516dde5506a588a561d296b2d0044839de06035bb486b326065b4c101e/regex-2025.11.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:d6c2d5919075a1f2e413c00b056ea0c2f065b3f5fe83c3d07d325ab92dce51d6", size = 795566, upload-time = "2025-11-03T21:33:32.364Z" }, + { url = "https://files.pythonhosted.org/packages/d9/dd/3d10b9e170cc16fb34cb2cef91513cf3df65f440b3366030631b2984a264/regex-2025.11.3-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:3f8bf11a4827cc7ce5a53d4ef6cddd5ad25595d3c1435ef08f76825851343154", size = 868463, upload-time = "2025-11-03T21:33:34.459Z" }, + { url = "https://files.pythonhosted.org/packages/f5/8e/935e6beff1695aa9085ff83195daccd72acc82c81793df480f34569330de/regex-2025.11.3-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:22c12d837298651e5550ac1d964e4ff57c3f56965fc1812c90c9fb2028eaf267", size = 854694, upload-time = "2025-11-03T21:33:36.793Z" }, + { url = "https://files.pythonhosted.org/packages/92/12/10650181a040978b2f5720a6a74d44f841371a3d984c2083fc1752e4acf6/regex-2025.11.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:62ba394a3dda9ad41c7c780f60f6e4a70988741415ae96f6d1bf6c239cf01379", size = 799691, upload-time = "2025-11-03T21:33:39.079Z" }, + { url = "https://files.pythonhosted.org/packages/67/90/8f37138181c9a7690e7e4cb388debbd389342db3c7381d636d2875940752/regex-2025.11.3-cp314-cp314t-win32.whl", hash = "sha256:4bf146dca15cdd53224a1bf46d628bd7590e4a07fbb69e720d561aea43a32b38", size = 274583, upload-time = "2025-11-03T21:33:41.302Z" }, + { url = "https://files.pythonhosted.org/packages/8f/cd/867f5ec442d56beb56f5f854f40abcfc75e11d10b11fdb1869dd39c63aaf/regex-2025.11.3-cp314-cp314t-win_amd64.whl", hash = "sha256:adad1a1bcf1c9e76346e091d22d23ac54ef28e1365117d99521631078dfec9de", size = 284286, upload-time = "2025-11-03T21:33:43.324Z" }, + { url = "https://files.pythonhosted.org/packages/20/31/32c0c4610cbc070362bf1d2e4ea86d1ea29014d400a6d6c2486fcfd57766/regex-2025.11.3-cp314-cp314t-win_arm64.whl", hash = "sha256:c54f768482cef41e219720013cd05933b6f971d9562544d691c68699bf2b6801", size = 274741, upload-time = "2025-11-03T21:33:45.557Z" }, +] + +[[package]] +name = "requests" +version = "2.32.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "certifi" }, + { name = "charset-normalizer" }, + { name = "idna" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf", size = 134517, upload-time = "2025-08-18T20:46:02.573Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6", size = 64738, upload-time = "2025-08-18T20:46:00.542Z" }, +] + +[[package]] +name = "requests-oauthlib" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "oauthlib" }, + { name = "requests" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz", hash = "sha256:b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9", size = 55650, upload-time = "2024-03-22T20:32:29.939Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3b/5d/63d4ae3b9daea098d5d6f5da83984853c1bbacd5dc826764b249fe119d24/requests_oauthlib-2.0.0-py2.py3-none-any.whl", hash = "sha256:7dd8a5c40426b779b0868c404bdef9768deccf22749cde15852df527e6269b36", size = 24179, upload-time = "2024-03-22T20:32:28.055Z" }, +] + +[[package]] +name = "requests-toolbelt" +version = "1.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "requests" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f3/61/d7545dafb7ac2230c70d38d31cbfe4cc64f7144dc41f6e4e4b78ecd9f5bb/requests-toolbelt-1.0.0.tar.gz", hash = "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6", size = 206888, upload-time = "2023-05-01T04:11:33.229Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3f/51/d4db610ef29373b879047326cbf6fa98b6c1969d6f6dc423279de2b1be2c/requests_toolbelt-1.0.0-py2.py3-none-any.whl", hash = "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06", size = 54481, upload-time = "2023-05-01T04:11:28.427Z" }, +] + +[[package]] +name = "rfc3339-validator" +version = "0.1.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/28/ea/a9387748e2d111c3c2b275ba970b735e04e15cdb1eb30693b6b5708c4dbd/rfc3339_validator-0.1.4.tar.gz", hash = "sha256:138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b", size = 5513, upload-time = "2021-05-12T16:37:54.178Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7b/44/4e421b96b67b2daff264473f7465db72fbdf36a07e05494f50300cc7b0c6/rfc3339_validator-0.1.4-py2.py3-none-any.whl", hash = "sha256:24f6ec1eda14ef823da9e36ec7113124b39c04d50a4d3d3a3c2859577e7791fa", size = 3490, upload-time = "2021-05-12T16:37:52.536Z" }, +] + +[[package]] +name = "rpds-py" +version = "0.30.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/20/af/3f2f423103f1113b36230496629986e0ef7e199d2aa8392452b484b38ced/rpds_py-0.30.0.tar.gz", hash = "sha256:dd8ff7cf90014af0c0f787eea34794ebf6415242ee1d6fa91eaba725cc441e84", size = 69469, upload-time = "2025-11-30T20:24:38.837Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4d/6e/f964e88b3d2abee2a82c1ac8366da848fce1c6d834dc2132c3fda3970290/rpds_py-0.30.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a2bffea6a4ca9f01b3f8e548302470306689684e61602aa3d141e34da06cf425", size = 370157, upload-time = "2025-11-30T20:21:53.789Z" }, + { url = "https://files.pythonhosted.org/packages/94/ba/24e5ebb7c1c82e74c4e4f33b2112a5573ddc703915b13a073737b59b86e0/rpds_py-0.30.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dc4f992dfe1e2bc3ebc7444f6c7051b4bc13cd8e33e43511e8ffd13bf407010d", size = 359676, upload-time = "2025-11-30T20:21:55.475Z" }, + { url = "https://files.pythonhosted.org/packages/84/86/04dbba1b087227747d64d80c3b74df946b986c57af0a9f0c98726d4d7a3b/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:422c3cb9856d80b09d30d2eb255d0754b23e090034e1deb4083f8004bd0761e4", size = 389938, upload-time = "2025-11-30T20:21:57.079Z" }, + { url = "https://files.pythonhosted.org/packages/42/bb/1463f0b1722b7f45431bdd468301991d1328b16cffe0b1c2918eba2c4eee/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:07ae8a593e1c3c6b82ca3292efbe73c30b61332fd612e05abee07c79359f292f", size = 402932, upload-time = "2025-11-30T20:21:58.47Z" }, + { url = "https://files.pythonhosted.org/packages/99/ee/2520700a5c1f2d76631f948b0736cdf9b0acb25abd0ca8e889b5c62ac2e3/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12f90dd7557b6bd57f40abe7747e81e0c0b119bef015ea7726e69fe550e394a4", size = 525830, upload-time = "2025-11-30T20:21:59.699Z" }, + { url = "https://files.pythonhosted.org/packages/e0/ad/bd0331f740f5705cc555a5e17fdf334671262160270962e69a2bdef3bf76/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:99b47d6ad9a6da00bec6aabe5a6279ecd3c06a329d4aa4771034a21e335c3a97", size = 412033, upload-time = "2025-11-30T20:22:00.991Z" }, + { url = "https://files.pythonhosted.org/packages/f8/1e/372195d326549bb51f0ba0f2ecb9874579906b97e08880e7a65c3bef1a99/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:33f559f3104504506a44bb666b93a33f5d33133765b0c216a5bf2f1e1503af89", size = 390828, upload-time = "2025-11-30T20:22:02.723Z" }, + { url = "https://files.pythonhosted.org/packages/ab/2b/d88bb33294e3e0c76bc8f351a3721212713629ffca1700fa94979cb3eae8/rpds_py-0.30.0-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:946fe926af6e44f3697abbc305ea168c2c31d3e3ef1058cf68f379bf0335a78d", size = 404683, upload-time = "2025-11-30T20:22:04.367Z" }, + { url = "https://files.pythonhosted.org/packages/50/32/c759a8d42bcb5289c1fac697cd92f6fe01a018dd937e62ae77e0e7f15702/rpds_py-0.30.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:495aeca4b93d465efde585977365187149e75383ad2684f81519f504f5c13038", size = 421583, upload-time = "2025-11-30T20:22:05.814Z" }, + { url = "https://files.pythonhosted.org/packages/2b/81/e729761dbd55ddf5d84ec4ff1f47857f4374b0f19bdabfcf929164da3e24/rpds_py-0.30.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9a0ca5da0386dee0655b4ccdf46119df60e0f10da268d04fe7cc87886872ba7", size = 572496, upload-time = "2025-11-30T20:22:07.713Z" }, + { url = "https://files.pythonhosted.org/packages/14/f6/69066a924c3557c9c30baa6ec3a0aa07526305684c6f86c696b08860726c/rpds_py-0.30.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8d6d1cc13664ec13c1b84241204ff3b12f9bb82464b8ad6e7a5d3486975c2eed", size = 598669, upload-time = "2025-11-30T20:22:09.312Z" }, + { url = "https://files.pythonhosted.org/packages/5f/48/905896b1eb8a05630d20333d1d8ffd162394127b74ce0b0784ae04498d32/rpds_py-0.30.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3896fa1be39912cf0757753826bc8bdc8ca331a28a7c4ae46b7a21280b06bb85", size = 561011, upload-time = "2025-11-30T20:22:11.309Z" }, + { url = "https://files.pythonhosted.org/packages/22/16/cd3027c7e279d22e5eb431dd3c0fbc677bed58797fe7581e148f3f68818b/rpds_py-0.30.0-cp311-cp311-win32.whl", hash = "sha256:55f66022632205940f1827effeff17c4fa7ae1953d2b74a8581baaefb7d16f8c", size = 221406, upload-time = "2025-11-30T20:22:13.101Z" }, + { url = "https://files.pythonhosted.org/packages/fa/5b/e7b7aa136f28462b344e652ee010d4de26ee9fd16f1bfd5811f5153ccf89/rpds_py-0.30.0-cp311-cp311-win_amd64.whl", hash = "sha256:a51033ff701fca756439d641c0ad09a41d9242fa69121c7d8769604a0a629825", size = 236024, upload-time = "2025-11-30T20:22:14.853Z" }, + { url = "https://files.pythonhosted.org/packages/14/a6/364bba985e4c13658edb156640608f2c9e1d3ea3c81b27aa9d889fff0e31/rpds_py-0.30.0-cp311-cp311-win_arm64.whl", hash = "sha256:47b0ef6231c58f506ef0b74d44e330405caa8428e770fec25329ed2cb971a229", size = 229069, upload-time = "2025-11-30T20:22:16.577Z" }, + { url = "https://files.pythonhosted.org/packages/03/e7/98a2f4ac921d82f33e03f3835f5bf3a4a40aa1bfdc57975e74a97b2b4bdd/rpds_py-0.30.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a161f20d9a43006833cd7068375a94d035714d73a172b681d8881820600abfad", size = 375086, upload-time = "2025-11-30T20:22:17.93Z" }, + { url = "https://files.pythonhosted.org/packages/4d/a1/bca7fd3d452b272e13335db8d6b0b3ecde0f90ad6f16f3328c6fb150c889/rpds_py-0.30.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6abc8880d9d036ecaafe709079969f56e876fcf107f7a8e9920ba6d5a3878d05", size = 359053, upload-time = "2025-11-30T20:22:19.297Z" }, + { url = "https://files.pythonhosted.org/packages/65/1c/ae157e83a6357eceff62ba7e52113e3ec4834a84cfe07fa4b0757a7d105f/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca28829ae5f5d569bb62a79512c842a03a12576375d5ece7d2cadf8abe96ec28", size = 390763, upload-time = "2025-11-30T20:22:21.661Z" }, + { url = "https://files.pythonhosted.org/packages/d4/36/eb2eb8515e2ad24c0bd43c3ee9cd74c33f7ca6430755ccdb240fd3144c44/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a1010ed9524c73b94d15919ca4d41d8780980e1765babf85f9a2f90d247153dd", size = 408951, upload-time = "2025-11-30T20:22:23.408Z" }, + { url = "https://files.pythonhosted.org/packages/d6/65/ad8dc1784a331fabbd740ef6f71ce2198c7ed0890dab595adb9ea2d775a1/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f8d1736cfb49381ba528cd5baa46f82fdc65c06e843dab24dd70b63d09121b3f", size = 514622, upload-time = "2025-11-30T20:22:25.16Z" }, + { url = "https://files.pythonhosted.org/packages/63/8e/0cfa7ae158e15e143fe03993b5bcd743a59f541f5952e1546b1ac1b5fd45/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d948b135c4693daff7bc2dcfc4ec57237a29bd37e60c2fabf5aff2bbacf3e2f1", size = 414492, upload-time = "2025-11-30T20:22:26.505Z" }, + { url = "https://files.pythonhosted.org/packages/60/1b/6f8f29f3f995c7ffdde46a626ddccd7c63aefc0efae881dc13b6e5d5bb16/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47f236970bccb2233267d89173d3ad2703cd36a0e2a6e92d0560d333871a3d23", size = 394080, upload-time = "2025-11-30T20:22:27.934Z" }, + { url = "https://files.pythonhosted.org/packages/6d/d5/a266341051a7a3ca2f4b750a3aa4abc986378431fc2da508c5034d081b70/rpds_py-0.30.0-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:2e6ecb5a5bcacf59c3f912155044479af1d0b6681280048b338b28e364aca1f6", size = 408680, upload-time = "2025-11-30T20:22:29.341Z" }, + { url = "https://files.pythonhosted.org/packages/10/3b/71b725851df9ab7a7a4e33cf36d241933da66040d195a84781f49c50490c/rpds_py-0.30.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a8fa71a2e078c527c3e9dc9fc5a98c9db40bcc8a92b4e8858e36d329f8684b51", size = 423589, upload-time = "2025-11-30T20:22:31.469Z" }, + { url = "https://files.pythonhosted.org/packages/00/2b/e59e58c544dc9bd8bd8384ecdb8ea91f6727f0e37a7131baeff8d6f51661/rpds_py-0.30.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:73c67f2db7bc334e518d097c6d1e6fed021bbc9b7d678d6cc433478365d1d5f5", size = 573289, upload-time = "2025-11-30T20:22:32.997Z" }, + { url = "https://files.pythonhosted.org/packages/da/3e/a18e6f5b460893172a7d6a680e86d3b6bc87a54c1f0b03446a3c8c7b588f/rpds_py-0.30.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:5ba103fb455be00f3b1c2076c9d4264bfcb037c976167a6047ed82f23153f02e", size = 599737, upload-time = "2025-11-30T20:22:34.419Z" }, + { url = "https://files.pythonhosted.org/packages/5c/e2/714694e4b87b85a18e2c243614974413c60aa107fd815b8cbc42b873d1d7/rpds_py-0.30.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7cee9c752c0364588353e627da8a7e808a66873672bcb5f52890c33fd965b394", size = 563120, upload-time = "2025-11-30T20:22:35.903Z" }, + { url = "https://files.pythonhosted.org/packages/6f/ab/d5d5e3bcedb0a77f4f613706b750e50a5a3ba1c15ccd3665ecc636c968fd/rpds_py-0.30.0-cp312-cp312-win32.whl", hash = "sha256:1ab5b83dbcf55acc8b08fc62b796ef672c457b17dbd7820a11d6c52c06839bdf", size = 223782, upload-time = "2025-11-30T20:22:37.271Z" }, + { url = "https://files.pythonhosted.org/packages/39/3b/f786af9957306fdc38a74cef405b7b93180f481fb48453a114bb6465744a/rpds_py-0.30.0-cp312-cp312-win_amd64.whl", hash = "sha256:a090322ca841abd453d43456ac34db46e8b05fd9b3b4ac0c78bcde8b089f959b", size = 240463, upload-time = "2025-11-30T20:22:39.021Z" }, + { url = "https://files.pythonhosted.org/packages/f3/d2/b91dc748126c1559042cfe41990deb92c4ee3e2b415f6b5234969ffaf0cc/rpds_py-0.30.0-cp312-cp312-win_arm64.whl", hash = "sha256:669b1805bd639dd2989b281be2cfd951c6121b65e729d9b843e9639ef1fd555e", size = 230868, upload-time = "2025-11-30T20:22:40.493Z" }, + { url = "https://files.pythonhosted.org/packages/ed/dc/d61221eb88ff410de3c49143407f6f3147acf2538c86f2ab7ce65ae7d5f9/rpds_py-0.30.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f83424d738204d9770830d35290ff3273fbb02b41f919870479fab14b9d303b2", size = 374887, upload-time = "2025-11-30T20:22:41.812Z" }, + { url = "https://files.pythonhosted.org/packages/fd/32/55fb50ae104061dbc564ef15cc43c013dc4a9f4527a1f4d99baddf56fe5f/rpds_py-0.30.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e7536cd91353c5273434b4e003cbda89034d67e7710eab8761fd918ec6c69cf8", size = 358904, upload-time = "2025-11-30T20:22:43.479Z" }, + { url = "https://files.pythonhosted.org/packages/58/70/faed8186300e3b9bdd138d0273109784eea2396c68458ed580f885dfe7ad/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2771c6c15973347f50fece41fc447c054b7ac2ae0502388ce3b6738cd366e3d4", size = 389945, upload-time = "2025-11-30T20:22:44.819Z" }, + { url = "https://files.pythonhosted.org/packages/bd/a8/073cac3ed2c6387df38f71296d002ab43496a96b92c823e76f46b8af0543/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0a59119fc6e3f460315fe9d08149f8102aa322299deaa5cab5b40092345c2136", size = 407783, upload-time = "2025-11-30T20:22:46.103Z" }, + { url = "https://files.pythonhosted.org/packages/77/57/5999eb8c58671f1c11eba084115e77a8899d6e694d2a18f69f0ba471ec8b/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:76fec018282b4ead0364022e3c54b60bf368b9d926877957a8624b58419169b7", size = 515021, upload-time = "2025-11-30T20:22:47.458Z" }, + { url = "https://files.pythonhosted.org/packages/e0/af/5ab4833eadc36c0a8ed2bc5c0de0493c04f6c06de223170bd0798ff98ced/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:692bef75a5525db97318e8cd061542b5a79812d711ea03dbc1f6f8dbb0c5f0d2", size = 414589, upload-time = "2025-11-30T20:22:48.872Z" }, + { url = "https://files.pythonhosted.org/packages/b7/de/f7192e12b21b9e9a68a6d0f249b4af3fdcdff8418be0767a627564afa1f1/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9027da1ce107104c50c81383cae773ef5c24d296dd11c99e2629dbd7967a20c6", size = 394025, upload-time = "2025-11-30T20:22:50.196Z" }, + { url = "https://files.pythonhosted.org/packages/91/c4/fc70cd0249496493500e7cc2de87504f5aa6509de1e88623431fec76d4b6/rpds_py-0.30.0-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:9cf69cdda1f5968a30a359aba2f7f9aa648a9ce4b580d6826437f2b291cfc86e", size = 408895, upload-time = "2025-11-30T20:22:51.87Z" }, + { url = "https://files.pythonhosted.org/packages/58/95/d9275b05ab96556fefff73a385813eb66032e4c99f411d0795372d9abcea/rpds_py-0.30.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a4796a717bf12b9da9d3ad002519a86063dcac8988b030e405704ef7d74d2d9d", size = 422799, upload-time = "2025-11-30T20:22:53.341Z" }, + { url = "https://files.pythonhosted.org/packages/06/c1/3088fc04b6624eb12a57eb814f0d4997a44b0d208d6cace713033ff1a6ba/rpds_py-0.30.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5d4c2aa7c50ad4728a094ebd5eb46c452e9cb7edbfdb18f9e1221f597a73e1e7", size = 572731, upload-time = "2025-11-30T20:22:54.778Z" }, + { url = "https://files.pythonhosted.org/packages/d8/42/c612a833183b39774e8ac8fecae81263a68b9583ee343db33ab571a7ce55/rpds_py-0.30.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ba81a9203d07805435eb06f536d95a266c21e5b2dfbf6517748ca40c98d19e31", size = 599027, upload-time = "2025-11-30T20:22:56.212Z" }, + { url = "https://files.pythonhosted.org/packages/5f/60/525a50f45b01d70005403ae0e25f43c0384369ad24ffe46e8d9068b50086/rpds_py-0.30.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:945dccface01af02675628334f7cf49c2af4c1c904748efc5cf7bbdf0b579f95", size = 563020, upload-time = "2025-11-30T20:22:58.2Z" }, + { url = "https://files.pythonhosted.org/packages/0b/5d/47c4655e9bcd5ca907148535c10e7d489044243cc9941c16ed7cd53be91d/rpds_py-0.30.0-cp313-cp313-win32.whl", hash = "sha256:b40fb160a2db369a194cb27943582b38f79fc4887291417685f3ad693c5a1d5d", size = 223139, upload-time = "2025-11-30T20:23:00.209Z" }, + { url = "https://files.pythonhosted.org/packages/f2/e1/485132437d20aa4d3e1d8b3fb5a5e65aa8139f1e097080c2a8443201742c/rpds_py-0.30.0-cp313-cp313-win_amd64.whl", hash = "sha256:806f36b1b605e2d6a72716f321f20036b9489d29c51c91f4dd29a3e3afb73b15", size = 240224, upload-time = "2025-11-30T20:23:02.008Z" }, + { url = "https://files.pythonhosted.org/packages/24/95/ffd128ed1146a153d928617b0ef673960130be0009c77d8fbf0abe306713/rpds_py-0.30.0-cp313-cp313-win_arm64.whl", hash = "sha256:d96c2086587c7c30d44f31f42eae4eac89b60dabbac18c7669be3700f13c3ce1", size = 230645, upload-time = "2025-11-30T20:23:03.43Z" }, + { url = "https://files.pythonhosted.org/packages/ff/1b/b10de890a0def2a319a2626334a7f0ae388215eb60914dbac8a3bae54435/rpds_py-0.30.0-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:eb0b93f2e5c2189ee831ee43f156ed34e2a89a78a66b98cadad955972548be5a", size = 364443, upload-time = "2025-11-30T20:23:04.878Z" }, + { url = "https://files.pythonhosted.org/packages/0d/bf/27e39f5971dc4f305a4fb9c672ca06f290f7c4e261c568f3dea16a410d47/rpds_py-0.30.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:922e10f31f303c7c920da8981051ff6d8c1a56207dbdf330d9047f6d30b70e5e", size = 353375, upload-time = "2025-11-30T20:23:06.342Z" }, + { url = "https://files.pythonhosted.org/packages/40/58/442ada3bba6e8e6615fc00483135c14a7538d2ffac30e2d933ccf6852232/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cdc62c8286ba9bf7f47befdcea13ea0e26bf294bda99758fd90535cbaf408000", size = 383850, upload-time = "2025-11-30T20:23:07.825Z" }, + { url = "https://files.pythonhosted.org/packages/14/14/f59b0127409a33c6ef6f5c1ebd5ad8e32d7861c9c7adfa9a624fc3889f6c/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:47f9a91efc418b54fb8190a6b4aa7813a23fb79c51f4bb84e418f5476c38b8db", size = 392812, upload-time = "2025-11-30T20:23:09.228Z" }, + { url = "https://files.pythonhosted.org/packages/b3/66/e0be3e162ac299b3a22527e8913767d869e6cc75c46bd844aa43fb81ab62/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1f3587eb9b17f3789ad50824084fa6f81921bbf9a795826570bda82cb3ed91f2", size = 517841, upload-time = "2025-11-30T20:23:11.186Z" }, + { url = "https://files.pythonhosted.org/packages/3d/55/fa3b9cf31d0c963ecf1ba777f7cf4b2a2c976795ac430d24a1f43d25a6ba/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:39c02563fc592411c2c61d26b6c5fe1e51eaa44a75aa2c8735ca88b0d9599daa", size = 408149, upload-time = "2025-11-30T20:23:12.864Z" }, + { url = "https://files.pythonhosted.org/packages/60/ca/780cf3b1a32b18c0f05c441958d3758f02544f1d613abf9488cd78876378/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:51a1234d8febafdfd33a42d97da7a43f5dcb120c1060e352a3fbc0c6d36e2083", size = 383843, upload-time = "2025-11-30T20:23:14.638Z" }, + { url = "https://files.pythonhosted.org/packages/82/86/d5f2e04f2aa6247c613da0c1dd87fcd08fa17107e858193566048a1e2f0a/rpds_py-0.30.0-cp313-cp313t-manylinux_2_31_riscv64.whl", hash = "sha256:eb2c4071ab598733724c08221091e8d80e89064cd472819285a9ab0f24bcedb9", size = 396507, upload-time = "2025-11-30T20:23:16.105Z" }, + { url = "https://files.pythonhosted.org/packages/4b/9a/453255d2f769fe44e07ea9785c8347edaf867f7026872e76c1ad9f7bed92/rpds_py-0.30.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6bdfdb946967d816e6adf9a3d8201bfad269c67efe6cefd7093ef959683c8de0", size = 414949, upload-time = "2025-11-30T20:23:17.539Z" }, + { url = "https://files.pythonhosted.org/packages/a3/31/622a86cdc0c45d6df0e9ccb6becdba5074735e7033c20e401a6d9d0e2ca0/rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:c77afbd5f5250bf27bf516c7c4a016813eb2d3e116139aed0096940c5982da94", size = 565790, upload-time = "2025-11-30T20:23:19.029Z" }, + { url = "https://files.pythonhosted.org/packages/1c/5d/15bbf0fb4a3f58a3b1c67855ec1efcc4ceaef4e86644665fff03e1b66d8d/rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:61046904275472a76c8c90c9ccee9013d70a6d0f73eecefd38c1ae7c39045a08", size = 590217, upload-time = "2025-11-30T20:23:20.885Z" }, + { url = "https://files.pythonhosted.org/packages/6d/61/21b8c41f68e60c8cc3b2e25644f0e3681926020f11d06ab0b78e3c6bbff1/rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:4c5f36a861bc4b7da6516dbdf302c55313afa09b81931e8280361a4f6c9a2d27", size = 555806, upload-time = "2025-11-30T20:23:22.488Z" }, + { url = "https://files.pythonhosted.org/packages/f9/39/7e067bb06c31de48de3eb200f9fc7c58982a4d3db44b07e73963e10d3be9/rpds_py-0.30.0-cp313-cp313t-win32.whl", hash = "sha256:3d4a69de7a3e50ffc214ae16d79d8fbb0922972da0356dcf4d0fdca2878559c6", size = 211341, upload-time = "2025-11-30T20:23:24.449Z" }, + { url = "https://files.pythonhosted.org/packages/0a/4d/222ef0b46443cf4cf46764d9c630f3fe4abaa7245be9417e56e9f52b8f65/rpds_py-0.30.0-cp313-cp313t-win_amd64.whl", hash = "sha256:f14fc5df50a716f7ece6a80b6c78bb35ea2ca47c499e422aa4463455dd96d56d", size = 225768, upload-time = "2025-11-30T20:23:25.908Z" }, + { url = "https://files.pythonhosted.org/packages/86/81/dad16382ebbd3d0e0328776d8fd7ca94220e4fa0798d1dc5e7da48cb3201/rpds_py-0.30.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:68f19c879420aa08f61203801423f6cd5ac5f0ac4ac82a2368a9fcd6a9a075e0", size = 362099, upload-time = "2025-11-30T20:23:27.316Z" }, + { url = "https://files.pythonhosted.org/packages/2b/60/19f7884db5d5603edf3c6bce35408f45ad3e97e10007df0e17dd57af18f8/rpds_py-0.30.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:ec7c4490c672c1a0389d319b3a9cfcd098dcdc4783991553c332a15acf7249be", size = 353192, upload-time = "2025-11-30T20:23:29.151Z" }, + { url = "https://files.pythonhosted.org/packages/bf/c4/76eb0e1e72d1a9c4703c69607cec123c29028bff28ce41588792417098ac/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f251c812357a3fed308d684a5079ddfb9d933860fc6de89f2b7ab00da481e65f", size = 384080, upload-time = "2025-11-30T20:23:30.785Z" }, + { url = "https://files.pythonhosted.org/packages/72/87/87ea665e92f3298d1b26d78814721dc39ed8d2c74b86e83348d6b48a6f31/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ac98b175585ecf4c0348fd7b29c3864bda53b805c773cbf7bfdaffc8070c976f", size = 394841, upload-time = "2025-11-30T20:23:32.209Z" }, + { url = "https://files.pythonhosted.org/packages/77/ad/7783a89ca0587c15dcbf139b4a8364a872a25f861bdb88ed99f9b0dec985/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3e62880792319dbeb7eb866547f2e35973289e7d5696c6e295476448f5b63c87", size = 516670, upload-time = "2025-11-30T20:23:33.742Z" }, + { url = "https://files.pythonhosted.org/packages/5b/3c/2882bdac942bd2172f3da574eab16f309ae10a3925644e969536553cb4ee/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4e7fc54e0900ab35d041b0601431b0a0eb495f0851a0639b6ef90f7741b39a18", size = 408005, upload-time = "2025-11-30T20:23:35.253Z" }, + { url = "https://files.pythonhosted.org/packages/ce/81/9a91c0111ce1758c92516a3e44776920b579d9a7c09b2b06b642d4de3f0f/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47e77dc9822d3ad616c3d5759ea5631a75e5809d5a28707744ef79d7a1bcfcad", size = 382112, upload-time = "2025-11-30T20:23:36.842Z" }, + { url = "https://files.pythonhosted.org/packages/cf/8e/1da49d4a107027e5fbc64daeab96a0706361a2918da10cb41769244b805d/rpds_py-0.30.0-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:b4dc1a6ff022ff85ecafef7979a2c6eb423430e05f1165d6688234e62ba99a07", size = 399049, upload-time = "2025-11-30T20:23:38.343Z" }, + { url = "https://files.pythonhosted.org/packages/df/5a/7ee239b1aa48a127570ec03becbb29c9d5a9eb092febbd1699d567cae859/rpds_py-0.30.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4559c972db3a360808309e06a74628b95eaccbf961c335c8fe0d590cf587456f", size = 415661, upload-time = "2025-11-30T20:23:40.263Z" }, + { url = "https://files.pythonhosted.org/packages/70/ea/caa143cf6b772f823bc7929a45da1fa83569ee49b11d18d0ada7f5ee6fd6/rpds_py-0.30.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:0ed177ed9bded28f8deb6ab40c183cd1192aa0de40c12f38be4d59cd33cb5c65", size = 565606, upload-time = "2025-11-30T20:23:42.186Z" }, + { url = "https://files.pythonhosted.org/packages/64/91/ac20ba2d69303f961ad8cf55bf7dbdb4763f627291ba3d0d7d67333cced9/rpds_py-0.30.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:ad1fa8db769b76ea911cb4e10f049d80bf518c104f15b3edb2371cc65375c46f", size = 591126, upload-time = "2025-11-30T20:23:44.086Z" }, + { url = "https://files.pythonhosted.org/packages/21/20/7ff5f3c8b00c8a95f75985128c26ba44503fb35b8e0259d812766ea966c7/rpds_py-0.30.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:46e83c697b1f1c72b50e5ee5adb4353eef7406fb3f2043d64c33f20ad1c2fc53", size = 553371, upload-time = "2025-11-30T20:23:46.004Z" }, + { url = "https://files.pythonhosted.org/packages/72/c7/81dadd7b27c8ee391c132a6b192111ca58d866577ce2d9b0ca157552cce0/rpds_py-0.30.0-cp314-cp314-win32.whl", hash = "sha256:ee454b2a007d57363c2dfd5b6ca4a5d7e2c518938f8ed3b706e37e5d470801ed", size = 215298, upload-time = "2025-11-30T20:23:47.696Z" }, + { url = "https://files.pythonhosted.org/packages/3e/d2/1aaac33287e8cfb07aab2e6b8ac1deca62f6f65411344f1433c55e6f3eb8/rpds_py-0.30.0-cp314-cp314-win_amd64.whl", hash = "sha256:95f0802447ac2d10bcc69f6dc28fe95fdf17940367b21d34e34c737870758950", size = 228604, upload-time = "2025-11-30T20:23:49.501Z" }, + { url = "https://files.pythonhosted.org/packages/e8/95/ab005315818cc519ad074cb7784dae60d939163108bd2b394e60dc7b5461/rpds_py-0.30.0-cp314-cp314-win_arm64.whl", hash = "sha256:613aa4771c99f03346e54c3f038e4cc574ac09a3ddfb0e8878487335e96dead6", size = 222391, upload-time = "2025-11-30T20:23:50.96Z" }, + { url = "https://files.pythonhosted.org/packages/9e/68/154fe0194d83b973cdedcdcc88947a2752411165930182ae41d983dcefa6/rpds_py-0.30.0-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:7e6ecfcb62edfd632e56983964e6884851786443739dbfe3582947e87274f7cb", size = 364868, upload-time = "2025-11-30T20:23:52.494Z" }, + { url = "https://files.pythonhosted.org/packages/83/69/8bbc8b07ec854d92a8b75668c24d2abcb1719ebf890f5604c61c9369a16f/rpds_py-0.30.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:a1d0bc22a7cdc173fedebb73ef81e07faef93692b8c1ad3733b67e31e1b6e1b8", size = 353747, upload-time = "2025-11-30T20:23:54.036Z" }, + { url = "https://files.pythonhosted.org/packages/ab/00/ba2e50183dbd9abcce9497fa5149c62b4ff3e22d338a30d690f9af970561/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d08f00679177226c4cb8c5265012eea897c8ca3b93f429e546600c971bcbae7", size = 383795, upload-time = "2025-11-30T20:23:55.556Z" }, + { url = "https://files.pythonhosted.org/packages/05/6f/86f0272b84926bcb0e4c972262f54223e8ecc556b3224d281e6598fc9268/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5965af57d5848192c13534f90f9dd16464f3c37aaf166cc1da1cae1fd5a34898", size = 393330, upload-time = "2025-11-30T20:23:57.033Z" }, + { url = "https://files.pythonhosted.org/packages/cb/e9/0e02bb2e6dc63d212641da45df2b0bf29699d01715913e0d0f017ee29438/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a4e86e34e9ab6b667c27f3211ca48f73dba7cd3d90f8d5b11be56e5dbc3fb4e", size = 518194, upload-time = "2025-11-30T20:23:58.637Z" }, + { url = "https://files.pythonhosted.org/packages/ee/ca/be7bca14cf21513bdf9c0606aba17d1f389ea2b6987035eb4f62bd923f25/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e5d3e6b26f2c785d65cc25ef1e5267ccbe1b069c5c21b8cc724efee290554419", size = 408340, upload-time = "2025-11-30T20:24:00.2Z" }, + { url = "https://files.pythonhosted.org/packages/c2/c7/736e00ebf39ed81d75544c0da6ef7b0998f8201b369acf842f9a90dc8fce/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:626a7433c34566535b6e56a1b39a7b17ba961e97ce3b80ec62e6f1312c025551", size = 383765, upload-time = "2025-11-30T20:24:01.759Z" }, + { url = "https://files.pythonhosted.org/packages/4a/3f/da50dfde9956aaf365c4adc9533b100008ed31aea635f2b8d7b627e25b49/rpds_py-0.30.0-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:acd7eb3f4471577b9b5a41baf02a978e8bdeb08b4b355273994f8b87032000a8", size = 396834, upload-time = "2025-11-30T20:24:03.687Z" }, + { url = "https://files.pythonhosted.org/packages/4e/00/34bcc2565b6020eab2623349efbdec810676ad571995911f1abdae62a3a0/rpds_py-0.30.0-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fe5fa731a1fa8a0a56b0977413f8cacac1768dad38d16b3a296712709476fbd5", size = 415470, upload-time = "2025-11-30T20:24:05.232Z" }, + { url = "https://files.pythonhosted.org/packages/8c/28/882e72b5b3e6f718d5453bd4d0d9cf8df36fddeb4ddbbab17869d5868616/rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:74a3243a411126362712ee1524dfc90c650a503502f135d54d1b352bd01f2404", size = 565630, upload-time = "2025-11-30T20:24:06.878Z" }, + { url = "https://files.pythonhosted.org/packages/3b/97/04a65539c17692de5b85c6e293520fd01317fd878ea1995f0367d4532fb1/rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:3e8eeb0544f2eb0d2581774be4c3410356eba189529a6b3e36bbbf9696175856", size = 591148, upload-time = "2025-11-30T20:24:08.445Z" }, + { url = "https://files.pythonhosted.org/packages/85/70/92482ccffb96f5441aab93e26c4d66489eb599efdcf96fad90c14bbfb976/rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:dbd936cde57abfee19ab3213cf9c26be06d60750e60a8e4dd85d1ab12c8b1f40", size = 556030, upload-time = "2025-11-30T20:24:10.956Z" }, + { url = "https://files.pythonhosted.org/packages/20/53/7c7e784abfa500a2b6b583b147ee4bb5a2b3747a9166bab52fec4b5b5e7d/rpds_py-0.30.0-cp314-cp314t-win32.whl", hash = "sha256:dc824125c72246d924f7f796b4f63c1e9dc810c7d9e2355864b3c3a73d59ade0", size = 211570, upload-time = "2025-11-30T20:24:12.735Z" }, + { url = "https://files.pythonhosted.org/packages/d0/02/fa464cdfbe6b26e0600b62c528b72d8608f5cc49f96b8d6e38c95d60c676/rpds_py-0.30.0-cp314-cp314t-win_amd64.whl", hash = "sha256:27f4b0e92de5bfbc6f86e43959e6edd1425c33b5e69aab0984a72047f2bcf1e3", size = 226532, upload-time = "2025-11-30T20:24:14.634Z" }, + { url = "https://files.pythonhosted.org/packages/69/71/3f34339ee70521864411f8b6992e7ab13ac30d8e4e3309e07c7361767d91/rpds_py-0.30.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c2262bdba0ad4fc6fb5545660673925c2d2a5d9e2e0fb603aad545427be0fc58", size = 372292, upload-time = "2025-11-30T20:24:16.537Z" }, + { url = "https://files.pythonhosted.org/packages/57/09/f183df9b8f2d66720d2ef71075c59f7e1b336bec7ee4c48f0a2b06857653/rpds_py-0.30.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:ee6af14263f25eedc3bb918a3c04245106a42dfd4f5c2285ea6f997b1fc3f89a", size = 362128, upload-time = "2025-11-30T20:24:18.086Z" }, + { url = "https://files.pythonhosted.org/packages/7a/68/5c2594e937253457342e078f0cc1ded3dd7b2ad59afdbf2d354869110a02/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3adbb8179ce342d235c31ab8ec511e66c73faa27a47e076ccc92421add53e2bb", size = 391542, upload-time = "2025-11-30T20:24:20.092Z" }, + { url = "https://files.pythonhosted.org/packages/49/5c/31ef1afd70b4b4fbdb2800249f34c57c64beb687495b10aec0365f53dfc4/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:250fa00e9543ac9b97ac258bd37367ff5256666122c2d0f2bc97577c60a1818c", size = 404004, upload-time = "2025-11-30T20:24:22.231Z" }, + { url = "https://files.pythonhosted.org/packages/e3/63/0cfbea38d05756f3440ce6534d51a491d26176ac045e2707adc99bb6e60a/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9854cf4f488b3d57b9aaeb105f06d78e5529d3145b1e4a41750167e8c213c6d3", size = 527063, upload-time = "2025-11-30T20:24:24.302Z" }, + { url = "https://files.pythonhosted.org/packages/42/e6/01e1f72a2456678b0f618fc9a1a13f882061690893c192fcad9f2926553a/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:993914b8e560023bc0a8bf742c5f303551992dcb85e247b1e5c7f4a7d145bda5", size = 413099, upload-time = "2025-11-30T20:24:25.916Z" }, + { url = "https://files.pythonhosted.org/packages/b8/25/8df56677f209003dcbb180765520c544525e3ef21ea72279c98b9aa7c7fb/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58edca431fb9b29950807e301826586e5bbf24163677732429770a697ffe6738", size = 392177, upload-time = "2025-11-30T20:24:27.834Z" }, + { url = "https://files.pythonhosted.org/packages/4a/b4/0a771378c5f16f8115f796d1f437950158679bcd2a7c68cf251cfb00ed5b/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl", hash = "sha256:dea5b552272a944763b34394d04577cf0f9bd013207bc32323b5a89a53cf9c2f", size = 406015, upload-time = "2025-11-30T20:24:29.457Z" }, + { url = "https://files.pythonhosted.org/packages/36/d8/456dbba0af75049dc6f63ff295a2f92766b9d521fa00de67a2bd6427d57a/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ba3af48635eb83d03f6c9735dfb21785303e73d22ad03d489e88adae6eab8877", size = 423736, upload-time = "2025-11-30T20:24:31.22Z" }, + { url = "https://files.pythonhosted.org/packages/13/64/b4d76f227d5c45a7e0b796c674fd81b0a6c4fbd48dc29271857d8219571c/rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:dff13836529b921e22f15cb099751209a60009731a68519630a24d61f0b1b30a", size = 573981, upload-time = "2025-11-30T20:24:32.934Z" }, + { url = "https://files.pythonhosted.org/packages/20/91/092bacadeda3edf92bf743cc96a7be133e13a39cdbfd7b5082e7ab638406/rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:1b151685b23929ab7beec71080a8889d4d6d9fa9a983d213f07121205d48e2c4", size = 599782, upload-time = "2025-11-30T20:24:35.169Z" }, + { url = "https://files.pythonhosted.org/packages/d1/b7/b95708304cd49b7b6f82fdd039f1748b66ec2b21d6a45180910802f1abf1/rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:ac37f9f516c51e5753f27dfdef11a88330f04de2d564be3991384b2f3535d02e", size = 562191, upload-time = "2025-11-30T20:24:36.853Z" }, +] + +[[package]] +name = "ruamel-yaml" +version = "0.18.17" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "ruamel-yaml-clib", marker = "python_full_version < '3.15' and platform_python_implementation == 'CPython'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3a/2b/7a1f1ebcd6b3f14febdc003e658778d81e76b40df2267904ee6b13f0c5c6/ruamel_yaml-0.18.17.tar.gz", hash = "sha256:9091cd6e2d93a3a4b157ddb8fabf348c3de7f1fb1381346d985b6b247dcd8d3c", size = 149602, upload-time = "2025-12-17T20:02:55.757Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/af/fe/b6045c782f1fd1ae317d2a6ca1884857ce5c20f59befe6ab25a8603c43a7/ruamel_yaml-0.18.17-py3-none-any.whl", hash = "sha256:9c8ba9eb3e793efdf924b60d521820869d5bf0cb9c6f1b82d82de8295e290b9d", size = 121594, upload-time = "2025-12-17T20:02:07.657Z" }, +] + +[[package]] +name = "ruamel-yaml-clib" +version = "0.2.15" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ea/97/60fda20e2fb54b83a61ae14648b0817c8f5d84a3821e40bfbdae1437026a/ruamel_yaml_clib-0.2.15.tar.gz", hash = "sha256:46e4cc8c43ef6a94885f72512094e482114a8a706d3c555a34ed4b0d20200600", size = 225794, upload-time = "2025-11-16T16:12:59.761Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2c/80/8ce7b9af532aa94dd83360f01ce4716264db73de6bc8efd22c32341f6658/ruamel_yaml_clib-0.2.15-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c583229f336682b7212a43d2fa32c30e643d3076178fb9f7a6a14dde85a2d8bd", size = 147998, upload-time = "2025-11-16T16:13:13.241Z" }, + { url = "https://files.pythonhosted.org/packages/53/09/de9d3f6b6701ced5f276d082ad0f980edf08ca67114523d1b9264cd5e2e0/ruamel_yaml_clib-0.2.15-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:56ea19c157ed8c74b6be51b5fa1c3aff6e289a041575f0556f66e5fb848bb137", size = 132743, upload-time = "2025-11-16T16:13:14.265Z" }, + { url = "https://files.pythonhosted.org/packages/0e/f7/73a9b517571e214fe5c246698ff3ed232f1ef863c8ae1667486625ec688a/ruamel_yaml_clib-0.2.15-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:5fea0932358e18293407feb921d4f4457db837b67ec1837f87074667449f9401", size = 731459, upload-time = "2025-11-16T20:22:44.338Z" }, + { url = "https://files.pythonhosted.org/packages/9b/a2/0dc0013169800f1c331a6f55b1282c1f4492a6d32660a0cf7b89e6684919/ruamel_yaml_clib-0.2.15-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ef71831bd61fbdb7aa0399d5c4da06bea37107ab5c79ff884cc07f2450910262", size = 749289, upload-time = "2025-11-16T16:13:15.633Z" }, + { url = "https://files.pythonhosted.org/packages/aa/ed/3fb20a1a96b8dc645d88c4072df481fe06e0289e4d528ebbdcc044ebc8b3/ruamel_yaml_clib-0.2.15-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:617d35dc765715fa86f8c3ccdae1e4229055832c452d4ec20856136acc75053f", size = 777630, upload-time = "2025-11-16T16:13:16.898Z" }, + { url = "https://files.pythonhosted.org/packages/60/50/6842f4628bc98b7aa4733ab2378346e1441e150935ad3b9f3c3c429d9408/ruamel_yaml_clib-0.2.15-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1b45498cc81a4724a2d42273d6cfc243c0547ad7c6b87b4f774cb7bcc131c98d", size = 744368, upload-time = "2025-11-16T16:13:18.117Z" }, + { url = "https://files.pythonhosted.org/packages/d3/b0/128ae8e19a7d794c2e36130a72b3bb650ce1dd13fb7def6cf10656437dcf/ruamel_yaml_clib-0.2.15-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:def5663361f6771b18646620fca12968aae730132e104688766cf8a3b1d65922", size = 745233, upload-time = "2025-11-16T20:22:45.833Z" }, + { url = "https://files.pythonhosted.org/packages/75/05/91130633602d6ba7ce3e07f8fc865b40d2a09efd4751c740df89eed5caf9/ruamel_yaml_clib-0.2.15-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:014181cdec565c8745b7cbc4de3bf2cc8ced05183d986e6d1200168e5bb59490", size = 770963, upload-time = "2025-11-16T16:13:19.344Z" }, + { url = "https://files.pythonhosted.org/packages/fd/4b/fd4542e7f33d7d1bc64cc9ac9ba574ce8cf145569d21f5f20133336cdc8c/ruamel_yaml_clib-0.2.15-cp311-cp311-win32.whl", hash = "sha256:d290eda8f6ada19e1771b54e5706b8f9807e6bb08e873900d5ba114ced13e02c", size = 102640, upload-time = "2025-11-16T16:13:20.498Z" }, + { url = "https://files.pythonhosted.org/packages/bb/eb/00ff6032c19c7537371e3119287999570867a0eafb0154fccc80e74bf57a/ruamel_yaml_clib-0.2.15-cp311-cp311-win_amd64.whl", hash = "sha256:bdc06ad71173b915167702f55d0f3f027fc61abd975bd308a0968c02db4a4c3e", size = 121996, upload-time = "2025-11-16T16:13:21.855Z" }, + { url = "https://files.pythonhosted.org/packages/72/4b/5fde11a0722d676e469d3d6f78c6a17591b9c7e0072ca359801c4bd17eee/ruamel_yaml_clib-0.2.15-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:cb15a2e2a90c8475df45c0949793af1ff413acfb0a716b8b94e488ea95ce7cff", size = 149088, upload-time = "2025-11-16T16:13:22.836Z" }, + { url = "https://files.pythonhosted.org/packages/85/82/4d08ac65ecf0ef3b046421985e66301a242804eb9a62c93ca3437dc94ee0/ruamel_yaml_clib-0.2.15-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:64da03cbe93c1e91af133f5bec37fd24d0d4ba2418eaf970d7166b0a26a148a2", size = 134553, upload-time = "2025-11-16T16:13:24.151Z" }, + { url = "https://files.pythonhosted.org/packages/b9/cb/22366d68b280e281a932403b76da7a988108287adff2bfa5ce881200107a/ruamel_yaml_clib-0.2.15-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f6d3655e95a80325b84c4e14c080b2470fe4f33b6846f288379ce36154993fb1", size = 737468, upload-time = "2025-11-16T20:22:47.335Z" }, + { url = "https://files.pythonhosted.org/packages/71/73/81230babf8c9e33770d43ed9056f603f6f5f9665aea4177a2c30ae48e3f3/ruamel_yaml_clib-0.2.15-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:71845d377c7a47afc6592aacfea738cc8a7e876d586dfba814501d8c53c1ba60", size = 753349, upload-time = "2025-11-16T16:13:26.269Z" }, + { url = "https://files.pythonhosted.org/packages/61/62/150c841f24cda9e30f588ef396ed83f64cfdc13b92d2f925bb96df337ba9/ruamel_yaml_clib-0.2.15-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11e5499db1ccbc7f4b41f0565e4f799d863ea720e01d3e99fa0b7b5fcd7802c9", size = 788211, upload-time = "2025-11-16T16:13:27.441Z" }, + { url = "https://files.pythonhosted.org/packages/30/93/e79bd9cbecc3267499d9ead919bd61f7ddf55d793fb5ef2b1d7d92444f35/ruamel_yaml_clib-0.2.15-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4b293a37dc97e2b1e8a1aec62792d1e52027087c8eea4fc7b5abd2bdafdd6642", size = 743203, upload-time = "2025-11-16T16:13:28.671Z" }, + { url = "https://files.pythonhosted.org/packages/8d/06/1eb640065c3a27ce92d76157f8efddb184bd484ed2639b712396a20d6dce/ruamel_yaml_clib-0.2.15-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:512571ad41bba04eac7268fe33f7f4742210ca26a81fe0c75357fa682636c690", size = 747292, upload-time = "2025-11-16T20:22:48.584Z" }, + { url = "https://files.pythonhosted.org/packages/a5/21/ee353e882350beab65fcc47a91b6bdc512cace4358ee327af2962892ff16/ruamel_yaml_clib-0.2.15-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e5e9f630c73a490b758bf14d859a39f375e6999aea5ddd2e2e9da89b9953486a", size = 771624, upload-time = "2025-11-16T16:13:29.853Z" }, + { url = "https://files.pythonhosted.org/packages/57/34/cc1b94057aa867c963ecf9ea92ac59198ec2ee3a8d22a126af0b4d4be712/ruamel_yaml_clib-0.2.15-cp312-cp312-win32.whl", hash = "sha256:f4421ab780c37210a07d138e56dd4b51f8642187cdfb433eb687fe8c11de0144", size = 100342, upload-time = "2025-11-16T16:13:31.067Z" }, + { url = "https://files.pythonhosted.org/packages/b3/e5/8925a4208f131b218f9a7e459c0d6fcac8324ae35da269cb437894576366/ruamel_yaml_clib-0.2.15-cp312-cp312-win_amd64.whl", hash = "sha256:2b216904750889133d9222b7b873c199d48ecbb12912aca78970f84a5aa1a4bc", size = 119013, upload-time = "2025-11-16T16:13:32.164Z" }, + { url = "https://files.pythonhosted.org/packages/17/5e/2f970ce4c573dc30c2f95825f2691c96d55560268ddc67603dc6ea2dd08e/ruamel_yaml_clib-0.2.15-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4dcec721fddbb62e60c2801ba08c87010bd6b700054a09998c4d09c08147b8fb", size = 147450, upload-time = "2025-11-16T16:13:33.542Z" }, + { url = "https://files.pythonhosted.org/packages/d6/03/a1baa5b94f71383913f21b96172fb3a2eb5576a4637729adbf7cd9f797f8/ruamel_yaml_clib-0.2.15-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:65f48245279f9bb301d1276f9679b82e4c080a1ae25e679f682ac62446fac471", size = 133139, upload-time = "2025-11-16T16:13:34.587Z" }, + { url = "https://files.pythonhosted.org/packages/dc/19/40d676802390f85784235a05788fd28940923382e3f8b943d25febbb98b7/ruamel_yaml_clib-0.2.15-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:46895c17ead5e22bea5e576f1db7e41cb273e8d062c04a6a49013d9f60996c25", size = 731474, upload-time = "2025-11-16T20:22:49.934Z" }, + { url = "https://files.pythonhosted.org/packages/ce/bb/6ef5abfa43b48dd55c30d53e997f8f978722f02add61efba31380d73e42e/ruamel_yaml_clib-0.2.15-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3eb199178b08956e5be6288ee0b05b2fb0b5c1f309725ad25d9c6ea7e27f962a", size = 748047, upload-time = "2025-11-16T16:13:35.633Z" }, + { url = "https://files.pythonhosted.org/packages/ff/5d/e4f84c9c448613e12bd62e90b23aa127ea4c46b697f3d760acc32cb94f25/ruamel_yaml_clib-0.2.15-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4d1032919280ebc04a80e4fb1e93f7a738129857eaec9448310e638c8bccefcf", size = 782129, upload-time = "2025-11-16T16:13:36.781Z" }, + { url = "https://files.pythonhosted.org/packages/de/4b/e98086e88f76c00c88a6bcf15eae27a1454f661a9eb72b111e6bbb69024d/ruamel_yaml_clib-0.2.15-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ab0df0648d86a7ecbd9c632e8f8d6b21bb21b5fc9d9e095c796cacf32a728d2d", size = 736848, upload-time = "2025-11-16T16:13:37.952Z" }, + { url = "https://files.pythonhosted.org/packages/0c/5c/5964fcd1fd9acc53b7a3a5d9a05ea4f95ead9495d980003a557deb9769c7/ruamel_yaml_clib-0.2.15-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:331fb180858dd8534f0e61aa243b944f25e73a4dae9962bd44c46d1761126bbf", size = 741630, upload-time = "2025-11-16T20:22:51.718Z" }, + { url = "https://files.pythonhosted.org/packages/07/1e/99660f5a30fceb58494598e7d15df883a07292346ef5696f0c0ae5dee8c6/ruamel_yaml_clib-0.2.15-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fd4c928ddf6bce586285daa6d90680b9c291cfd045fc40aad34e445d57b1bf51", size = 766619, upload-time = "2025-11-16T16:13:39.178Z" }, + { url = "https://files.pythonhosted.org/packages/36/2f/fa0344a9327b58b54970e56a27b32416ffbcfe4dcc0700605516708579b2/ruamel_yaml_clib-0.2.15-cp313-cp313-win32.whl", hash = "sha256:bf0846d629e160223805db9fe8cc7aec16aaa11a07310c50c8c7164efa440aec", size = 100171, upload-time = "2025-11-16T16:13:40.456Z" }, + { url = "https://files.pythonhosted.org/packages/06/c4/c124fbcef0684fcf3c9b72374c2a8c35c94464d8694c50f37eef27f5a145/ruamel_yaml_clib-0.2.15-cp313-cp313-win_amd64.whl", hash = "sha256:45702dfbea1420ba3450bb3dd9a80b33f0badd57539c6aac09f42584303e0db6", size = 118845, upload-time = "2025-11-16T16:13:41.481Z" }, + { url = "https://files.pythonhosted.org/packages/3e/bd/ab8459c8bb759c14a146990bf07f632c1cbec0910d4853feeee4be2ab8bb/ruamel_yaml_clib-0.2.15-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:753faf20b3a5906faf1fc50e4ddb8c074cb9b251e00b14c18b28492f933ac8ef", size = 147248, upload-time = "2025-11-16T16:13:42.872Z" }, + { url = "https://files.pythonhosted.org/packages/69/f2/c4cec0a30f1955510fde498aac451d2e52b24afdbcb00204d3a951b772c3/ruamel_yaml_clib-0.2.15-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:480894aee0b29752560a9de46c0e5f84a82602f2bc5c6cde8db9a345319acfdf", size = 133764, upload-time = "2025-11-16T16:13:43.932Z" }, + { url = "https://files.pythonhosted.org/packages/82/c7/2480d062281385a2ea4f7cc9476712446e0c548cd74090bff92b4b49e898/ruamel_yaml_clib-0.2.15-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:4d3b58ab2454b4747442ac76fab66739c72b1e2bb9bd173d7694b9f9dbc9c000", size = 730537, upload-time = "2025-11-16T20:22:52.918Z" }, + { url = "https://files.pythonhosted.org/packages/75/08/e365ee305367559f57ba6179d836ecc3d31c7d3fdff2a40ebf6c32823a1f/ruamel_yaml_clib-0.2.15-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bfd309b316228acecfa30670c3887dcedf9b7a44ea39e2101e75d2654522acd4", size = 746944, upload-time = "2025-11-16T16:13:45.338Z" }, + { url = "https://files.pythonhosted.org/packages/a1/5c/8b56b08db91e569d0a4fbfa3e492ed2026081bdd7e892f63ba1c88a2f548/ruamel_yaml_clib-0.2.15-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2812ff359ec1f30129b62372e5f22a52936fac13d5d21e70373dbca5d64bb97c", size = 778249, upload-time = "2025-11-16T16:13:46.871Z" }, + { url = "https://files.pythonhosted.org/packages/6a/1d/70dbda370bd0e1a92942754c873bd28f513da6198127d1736fa98bb2a16f/ruamel_yaml_clib-0.2.15-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7e74ea87307303ba91073b63e67f2c667e93f05a8c63079ee5b7a5c8d0d7b043", size = 737140, upload-time = "2025-11-16T16:13:48.349Z" }, + { url = "https://files.pythonhosted.org/packages/5b/87/822d95874216922e1120afb9d3fafa795a18fdd0c444f5c4c382f6dac761/ruamel_yaml_clib-0.2.15-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:713cd68af9dfbe0bb588e144a61aad8dcc00ef92a82d2e87183ca662d242f524", size = 741070, upload-time = "2025-11-16T20:22:54.151Z" }, + { url = "https://files.pythonhosted.org/packages/b9/17/4e01a602693b572149f92c983c1f25bd608df02c3f5cf50fd1f94e124a59/ruamel_yaml_clib-0.2.15-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:542d77b72786a35563f97069b9379ce762944e67055bea293480f7734b2c7e5e", size = 765882, upload-time = "2025-11-16T16:13:49.526Z" }, + { url = "https://files.pythonhosted.org/packages/9f/17/7999399081d39ebb79e807314de6b611e1d1374458924eb2a489c01fc5ad/ruamel_yaml_clib-0.2.15-cp314-cp314-win32.whl", hash = "sha256:424ead8cef3939d690c4b5c85ef5b52155a231ff8b252961b6516ed7cf05f6aa", size = 102567, upload-time = "2025-11-16T16:13:50.78Z" }, + { url = "https://files.pythonhosted.org/packages/d2/67/be582a7370fdc9e6846c5be4888a530dcadd055eef5b932e0e85c33c7d73/ruamel_yaml_clib-0.2.15-cp314-cp314-win_amd64.whl", hash = "sha256:ac9b8d5fa4bb7fd2917ab5027f60d4234345fd366fe39aa711d5dca090aa1467", size = 122847, upload-time = "2025-11-16T16:13:51.807Z" }, +] + +[[package]] +name = "safetensors" +version = "0.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/29/9c/6e74567782559a63bd040a236edca26fd71bc7ba88de2ef35d75df3bca5e/safetensors-0.7.0.tar.gz", hash = "sha256:07663963b67e8bd9f0b8ad15bb9163606cd27cc5a1b96235a50d8369803b96b0", size = 200878, upload-time = "2025-11-19T15:18:43.199Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fa/47/aef6c06649039accf914afef490268e1067ed82be62bcfa5b7e886ad15e8/safetensors-0.7.0-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:c82f4d474cf725255d9e6acf17252991c3c8aac038d6ef363a4bf8be2f6db517", size = 467781, upload-time = "2025-11-19T15:18:35.84Z" }, + { url = "https://files.pythonhosted.org/packages/e8/00/374c0c068e30cd31f1e1b46b4b5738168ec79e7689ca82ee93ddfea05109/safetensors-0.7.0-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:94fd4858284736bb67a897a41608b5b0c2496c9bdb3bf2af1fa3409127f20d57", size = 447058, upload-time = "2025-11-19T15:18:34.416Z" }, + { url = "https://files.pythonhosted.org/packages/f1/06/578ffed52c2296f93d7fd2d844cabfa92be51a587c38c8afbb8ae449ca89/safetensors-0.7.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e07d91d0c92a31200f25351f4acb2bc6aff7f48094e13ebb1d0fb995b54b6542", size = 491748, upload-time = "2025-11-19T15:18:09.79Z" }, + { url = "https://files.pythonhosted.org/packages/ae/33/1debbbb70e4791dde185edb9413d1fe01619255abb64b300157d7f15dddd/safetensors-0.7.0-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8469155f4cb518bafb4acf4865e8bb9d6804110d2d9bdcaa78564b9fd841e104", size = 503881, upload-time = "2025-11-19T15:18:16.145Z" }, + { url = "https://files.pythonhosted.org/packages/8e/1c/40c2ca924d60792c3be509833df711b553c60effbd91da6f5284a83f7122/safetensors-0.7.0-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:54bef08bf00a2bff599982f6b08e8770e09cc012d7bba00783fc7ea38f1fb37d", size = 623463, upload-time = "2025-11-19T15:18:21.11Z" }, + { url = "https://files.pythonhosted.org/packages/9b/3a/13784a9364bd43b0d61eef4bea2845039bc2030458b16594a1bd787ae26e/safetensors-0.7.0-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:42cb091236206bb2016d245c377ed383aa7f78691748f3bb6ee1bfa51ae2ce6a", size = 532855, upload-time = "2025-11-19T15:18:25.719Z" }, + { url = "https://files.pythonhosted.org/packages/a0/60/429e9b1cb3fc651937727befe258ea24122d9663e4d5709a48c9cbfceecb/safetensors-0.7.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dac7252938f0696ddea46f5e855dd3138444e82236e3be475f54929f0c510d48", size = 507152, upload-time = "2025-11-19T15:18:33.023Z" }, + { url = "https://files.pythonhosted.org/packages/3c/a8/4b45e4e059270d17af60359713ffd83f97900d45a6afa73aaa0d737d48b6/safetensors-0.7.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1d060c70284127fa805085d8f10fbd0962792aed71879d00864acda69dbab981", size = 541856, upload-time = "2025-11-19T15:18:31.075Z" }, + { url = "https://files.pythonhosted.org/packages/06/87/d26d8407c44175d8ae164a95b5a62707fcc445f3c0c56108e37d98070a3d/safetensors-0.7.0-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:cdab83a366799fa730f90a4ebb563e494f28e9e92c4819e556152ad55e43591b", size = 674060, upload-time = "2025-11-19T15:18:37.211Z" }, + { url = "https://files.pythonhosted.org/packages/11/f5/57644a2ff08dc6325816ba7217e5095f17269dada2554b658442c66aed51/safetensors-0.7.0-cp38-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:672132907fcad9f2aedcb705b2d7b3b93354a2aec1b2f706c4db852abe338f85", size = 771715, upload-time = "2025-11-19T15:18:38.689Z" }, + { url = "https://files.pythonhosted.org/packages/86/31/17883e13a814bd278ae6e266b13282a01049b0c81341da7fd0e3e71a80a3/safetensors-0.7.0-cp38-abi3-musllinux_1_2_i686.whl", hash = "sha256:5d72abdb8a4d56d4020713724ba81dac065fedb7f3667151c4a637f1d3fb26c0", size = 714377, upload-time = "2025-11-19T15:18:40.162Z" }, + { url = "https://files.pythonhosted.org/packages/4a/d8/0c8a7dc9b41dcac53c4cbf9df2b9c83e0e0097203de8b37a712b345c0be5/safetensors-0.7.0-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b0f6d66c1c538d5a94a73aa9ddca8ccc4227e6c9ff555322ea40bdd142391dd4", size = 677368, upload-time = "2025-11-19T15:18:41.627Z" }, + { url = "https://files.pythonhosted.org/packages/05/e5/cb4b713c8a93469e3c5be7c3f8d77d307e65fe89673e731f5c2bfd0a9237/safetensors-0.7.0-cp38-abi3-win32.whl", hash = "sha256:c74af94bf3ac15ac4d0f2a7c7b4663a15f8c2ab15ed0fc7531ca61d0835eccba", size = 326423, upload-time = "2025-11-19T15:18:45.74Z" }, + { url = "https://files.pythonhosted.org/packages/5d/e6/ec8471c8072382cb91233ba7267fd931219753bb43814cbc71757bfd4dab/safetensors-0.7.0-cp38-abi3-win_amd64.whl", hash = "sha256:d1239932053f56f3456f32eb9625590cc7582e905021f94636202a864d470755", size = 341380, upload-time = "2025-11-19T15:18:44.427Z" }, +] + +[[package]] +name = "scikit-learn" +version = "1.8.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "joblib" }, + { name = "numpy" }, + { name = "scipy" }, + { name = "threadpoolctl" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/0e/d4/40988bf3b8e34feec1d0e6a051446b1f66225f8529b9309becaeef62b6c4/scikit_learn-1.8.0.tar.gz", hash = "sha256:9bccbb3b40e3de10351f8f5068e105d0f4083b1a65fa07b6634fbc401a6287fd", size = 7335585, upload-time = "2025-12-10T07:08:53.618Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c9/92/53ea2181da8ac6bf27170191028aee7251f8f841f8d3edbfdcaf2008fde9/scikit_learn-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:146b4d36f800c013d267b29168813f7a03a43ecd2895d04861f1240b564421da", size = 8595835, upload-time = "2025-12-10T07:07:39.385Z" }, + { url = "https://files.pythonhosted.org/packages/01/18/d154dc1638803adf987910cdd07097d9c526663a55666a97c124d09fb96a/scikit_learn-1.8.0-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:f984ca4b14914e6b4094c5d52a32ea16b49832c03bd17a110f004db3c223e8e1", size = 8080381, upload-time = "2025-12-10T07:07:41.93Z" }, + { url = "https://files.pythonhosted.org/packages/8a/44/226142fcb7b7101e64fdee5f49dbe6288d4c7af8abf593237b70fca080a4/scikit_learn-1.8.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5e30adb87f0cc81c7690a84f7932dd66be5bac57cfe16b91cb9151683a4a2d3b", size = 8799632, upload-time = "2025-12-10T07:07:43.899Z" }, + { url = "https://files.pythonhosted.org/packages/36/4d/4a67f30778a45d542bbea5db2dbfa1e9e100bf9ba64aefe34215ba9f11f6/scikit_learn-1.8.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ada8121bcb4dac28d930febc791a69f7cb1673c8495e5eee274190b73a4559c1", size = 9103788, upload-time = "2025-12-10T07:07:45.982Z" }, + { url = "https://files.pythonhosted.org/packages/89/3c/45c352094cfa60050bcbb967b1faf246b22e93cb459f2f907b600f2ceda5/scikit_learn-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:c57b1b610bd1f40ba43970e11ce62821c2e6569e4d74023db19c6b26f246cb3b", size = 8081706, upload-time = "2025-12-10T07:07:48.111Z" }, + { url = "https://files.pythonhosted.org/packages/3d/46/5416595bb395757f754feb20c3d776553a386b661658fb21b7c814e89efe/scikit_learn-1.8.0-cp311-cp311-win_arm64.whl", hash = "sha256:2838551e011a64e3053ad7618dda9310175f7515f1742fa2d756f7c874c05961", size = 7688451, upload-time = "2025-12-10T07:07:49.873Z" }, + { url = "https://files.pythonhosted.org/packages/90/74/e6a7cc4b820e95cc38cf36cd74d5aa2b42e8ffc2d21fe5a9a9c45c1c7630/scikit_learn-1.8.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:5fb63362b5a7ddab88e52b6dbb47dac3fd7dafeee740dc6c8d8a446ddedade8e", size = 8548242, upload-time = "2025-12-10T07:07:51.568Z" }, + { url = "https://files.pythonhosted.org/packages/49/d8/9be608c6024d021041c7f0b3928d4749a706f4e2c3832bbede4fb4f58c95/scikit_learn-1.8.0-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:5025ce924beccb28298246e589c691fe1b8c1c96507e6d27d12c5fadd85bfd76", size = 8079075, upload-time = "2025-12-10T07:07:53.697Z" }, + { url = "https://files.pythonhosted.org/packages/dd/47/f187b4636ff80cc63f21cd40b7b2d177134acaa10f6bb73746130ee8c2e5/scikit_learn-1.8.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4496bb2cf7a43ce1a2d7524a79e40bc5da45cf598dbf9545b7e8316ccba47bb4", size = 8660492, upload-time = "2025-12-10T07:07:55.574Z" }, + { url = "https://files.pythonhosted.org/packages/97/74/b7a304feb2b49df9fafa9382d4d09061a96ee9a9449a7cbea7988dda0828/scikit_learn-1.8.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a0bcfe4d0d14aec44921545fd2af2338c7471de9cb701f1da4c9d85906ab847a", size = 8931904, upload-time = "2025-12-10T07:07:57.666Z" }, + { url = "https://files.pythonhosted.org/packages/9f/c4/0ab22726a04ede56f689476b760f98f8f46607caecff993017ac1b64aa5d/scikit_learn-1.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:35c007dedb2ffe38fe3ee7d201ebac4a2deccd2408e8621d53067733e3c74809", size = 8019359, upload-time = "2025-12-10T07:07:59.838Z" }, + { url = "https://files.pythonhosted.org/packages/24/90/344a67811cfd561d7335c1b96ca21455e7e472d281c3c279c4d3f2300236/scikit_learn-1.8.0-cp312-cp312-win_arm64.whl", hash = "sha256:8c497fff237d7b4e07e9ef1a640887fa4fb765647f86fbe00f969ff6280ce2bb", size = 7641898, upload-time = "2025-12-10T07:08:01.36Z" }, + { url = "https://files.pythonhosted.org/packages/03/aa/e22e0768512ce9255eba34775be2e85c2048da73da1193e841707f8f039c/scikit_learn-1.8.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0d6ae97234d5d7079dc0040990a6f7aeb97cb7fa7e8945f1999a429b23569e0a", size = 8513770, upload-time = "2025-12-10T07:08:03.251Z" }, + { url = "https://files.pythonhosted.org/packages/58/37/31b83b2594105f61a381fc74ca19e8780ee923be2d496fcd8d2e1147bd99/scikit_learn-1.8.0-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:edec98c5e7c128328124a029bceb09eda2d526997780fef8d65e9a69eead963e", size = 8044458, upload-time = "2025-12-10T07:08:05.336Z" }, + { url = "https://files.pythonhosted.org/packages/2d/5a/3f1caed8765f33eabb723596666da4ebbf43d11e96550fb18bdec42b467b/scikit_learn-1.8.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:74b66d8689d52ed04c271e1329f0c61635bcaf5b926db9b12d58914cdc01fe57", size = 8610341, upload-time = "2025-12-10T07:08:07.732Z" }, + { url = "https://files.pythonhosted.org/packages/38/cf/06896db3f71c75902a8e9943b444a56e727418f6b4b4a90c98c934f51ed4/scikit_learn-1.8.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8fdf95767f989b0cfedb85f7ed8ca215d4be728031f56ff5a519ee1e3276dc2e", size = 8900022, upload-time = "2025-12-10T07:08:09.862Z" }, + { url = "https://files.pythonhosted.org/packages/1c/f9/9b7563caf3ec8873e17a31401858efab6b39a882daf6c1bfa88879c0aa11/scikit_learn-1.8.0-cp313-cp313-win_amd64.whl", hash = "sha256:2de443b9373b3b615aec1bb57f9baa6bb3a9bd093f1269ba95c17d870422b271", size = 7989409, upload-time = "2025-12-10T07:08:12.028Z" }, + { url = "https://files.pythonhosted.org/packages/49/bd/1f4001503650e72c4f6009ac0c4413cb17d2d601cef6f71c0453da2732fc/scikit_learn-1.8.0-cp313-cp313-win_arm64.whl", hash = "sha256:eddde82a035681427cbedded4e6eff5e57fa59216c2e3e90b10b19ab1d0a65c3", size = 7619760, upload-time = "2025-12-10T07:08:13.688Z" }, + { url = "https://files.pythonhosted.org/packages/d2/7d/a630359fc9dcc95496588c8d8e3245cc8fd81980251079bc09c70d41d951/scikit_learn-1.8.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:7cc267b6108f0a1499a734167282c00c4ebf61328566b55ef262d48e9849c735", size = 8826045, upload-time = "2025-12-10T07:08:15.215Z" }, + { url = "https://files.pythonhosted.org/packages/cc/56/a0c86f6930cfcd1c7054a2bc417e26960bb88d32444fe7f71d5c2cfae891/scikit_learn-1.8.0-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:fe1c011a640a9f0791146011dfd3c7d9669785f9fed2b2a5f9e207536cf5c2fd", size = 8420324, upload-time = "2025-12-10T07:08:17.561Z" }, + { url = "https://files.pythonhosted.org/packages/46/1e/05962ea1cebc1cf3876667ecb14c283ef755bf409993c5946ade3b77e303/scikit_learn-1.8.0-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:72358cce49465d140cc4e7792015bb1f0296a9742d5622c67e31399b75468b9e", size = 8680651, upload-time = "2025-12-10T07:08:19.952Z" }, + { url = "https://files.pythonhosted.org/packages/fe/56/a85473cd75f200c9759e3a5f0bcab2d116c92a8a02ee08ccd73b870f8bb4/scikit_learn-1.8.0-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:80832434a6cc114f5219211eec13dcbc16c2bac0e31ef64c6d346cde3cf054cb", size = 8925045, upload-time = "2025-12-10T07:08:22.11Z" }, + { url = "https://files.pythonhosted.org/packages/cc/b7/64d8cfa896c64435ae57f4917a548d7ac7a44762ff9802f75a79b77cb633/scikit_learn-1.8.0-cp313-cp313t-win_amd64.whl", hash = "sha256:ee787491dbfe082d9c3013f01f5991658b0f38aa8177e4cd4bf434c58f551702", size = 8507994, upload-time = "2025-12-10T07:08:23.943Z" }, + { url = "https://files.pythonhosted.org/packages/5e/37/e192ea709551799379958b4c4771ec507347027bb7c942662c7fbeba31cb/scikit_learn-1.8.0-cp313-cp313t-win_arm64.whl", hash = "sha256:bf97c10a3f5a7543f9b88cbf488d33d175e9146115a451ae34568597ba33dcde", size = 7869518, upload-time = "2025-12-10T07:08:25.71Z" }, + { url = "https://files.pythonhosted.org/packages/24/05/1af2c186174cc92dcab2233f327336058c077d38f6fe2aceb08e6ab4d509/scikit_learn-1.8.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:c22a2da7a198c28dd1a6e1136f19c830beab7fdca5b3e5c8bba8394f8a5c45b3", size = 8528667, upload-time = "2025-12-10T07:08:27.541Z" }, + { url = "https://files.pythonhosted.org/packages/a8/25/01c0af38fe969473fb292bba9dc2b8f9b451f3112ff242c647fee3d0dfe7/scikit_learn-1.8.0-cp314-cp314-macosx_12_0_arm64.whl", hash = "sha256:6b595b07a03069a2b1740dc08c2299993850ea81cce4fe19b2421e0c970de6b7", size = 8066524, upload-time = "2025-12-10T07:08:29.822Z" }, + { url = "https://files.pythonhosted.org/packages/be/ce/a0623350aa0b68647333940ee46fe45086c6060ec604874e38e9ab7d8e6c/scikit_learn-1.8.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:29ffc74089f3d5e87dfca4c2c8450f88bdc61b0fc6ed5d267f3988f19a1309f6", size = 8657133, upload-time = "2025-12-10T07:08:31.865Z" }, + { url = "https://files.pythonhosted.org/packages/b8/cb/861b41341d6f1245e6ca80b1c1a8c4dfce43255b03df034429089ca2a2c5/scikit_learn-1.8.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fb65db5d7531bccf3a4f6bec3462223bea71384e2cda41da0f10b7c292b9e7c4", size = 8923223, upload-time = "2025-12-10T07:08:34.166Z" }, + { url = "https://files.pythonhosted.org/packages/76/18/a8def8f91b18cd1ba6e05dbe02540168cb24d47e8dcf69e8d00b7da42a08/scikit_learn-1.8.0-cp314-cp314-win_amd64.whl", hash = "sha256:56079a99c20d230e873ea40753102102734c5953366972a71d5cb39a32bc40c6", size = 8096518, upload-time = "2025-12-10T07:08:36.339Z" }, + { url = "https://files.pythonhosted.org/packages/d1/77/482076a678458307f0deb44e29891d6022617b2a64c840c725495bee343f/scikit_learn-1.8.0-cp314-cp314-win_arm64.whl", hash = "sha256:3bad7565bc9cf37ce19a7c0d107742b320c1285df7aab1a6e2d28780df167242", size = 7754546, upload-time = "2025-12-10T07:08:38.128Z" }, + { url = "https://files.pythonhosted.org/packages/2d/d1/ef294ca754826daa043b2a104e59960abfab4cf653891037d19dd5b6f3cf/scikit_learn-1.8.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:4511be56637e46c25721e83d1a9cea9614e7badc7040c4d573d75fbe257d6fd7", size = 8848305, upload-time = "2025-12-10T07:08:41.013Z" }, + { url = "https://files.pythonhosted.org/packages/5b/e2/b1f8b05138ee813b8e1a4149f2f0d289547e60851fd1bb268886915adbda/scikit_learn-1.8.0-cp314-cp314t-macosx_12_0_arm64.whl", hash = "sha256:a69525355a641bf8ef136a7fa447672fb54fe8d60cab5538d9eb7c6438543fb9", size = 8432257, upload-time = "2025-12-10T07:08:42.873Z" }, + { url = "https://files.pythonhosted.org/packages/26/11/c32b2138a85dcb0c99f6afd13a70a951bfdff8a6ab42d8160522542fb647/scikit_learn-1.8.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c2656924ec73e5939c76ac4c8b026fc203b83d8900362eb2599d8aee80e4880f", size = 8678673, upload-time = "2025-12-10T07:08:45.362Z" }, + { url = "https://files.pythonhosted.org/packages/c7/57/51f2384575bdec454f4fe4e7a919d696c9ebce914590abf3e52d47607ab8/scikit_learn-1.8.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:15fc3b5d19cc2be65404786857f2e13c70c83dd4782676dd6814e3b89dc8f5b9", size = 8922467, upload-time = "2025-12-10T07:08:47.408Z" }, + { url = "https://files.pythonhosted.org/packages/35/4d/748c9e2872637a57981a04adc038dacaa16ba8ca887b23e34953f0b3f742/scikit_learn-1.8.0-cp314-cp314t-win_amd64.whl", hash = "sha256:00d6f1d66fbcf4eba6e356e1420d33cc06c70a45bb1363cd6f6a8e4ebbbdece2", size = 8774395, upload-time = "2025-12-10T07:08:49.337Z" }, + { url = "https://files.pythonhosted.org/packages/60/22/d7b2ebe4704a5e50790ba089d5c2ae308ab6bb852719e6c3bd4f04c3a363/scikit_learn-1.8.0-cp314-cp314t-win_arm64.whl", hash = "sha256:f28dd15c6bb0b66ba09728cf09fd8736c304be29409bd8445a080c1280619e8c", size = 8002647, upload-time = "2025-12-10T07:08:51.601Z" }, +] + +[[package]] +name = "scipy" +version = "1.16.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/0a/ca/d8ace4f98322d01abcd52d381134344bf7b431eba7ed8b42bdea5a3c2ac9/scipy-1.16.3.tar.gz", hash = "sha256:01e87659402762f43bd2fee13370553a17ada367d42e7487800bf2916535aecb", size = 30597883, upload-time = "2025-10-28T17:38:54.068Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9b/5f/6f37d7439de1455ce9c5a556b8d1db0979f03a796c030bafdf08d35b7bf9/scipy-1.16.3-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:40be6cf99e68b6c4321e9f8782e7d5ff8265af28ef2cd56e9c9b2638fa08ad97", size = 36630881, upload-time = "2025-10-28T17:31:47.104Z" }, + { url = "https://files.pythonhosted.org/packages/7c/89/d70e9f628749b7e4db2aa4cd89735502ff3f08f7b9b27d2e799485987cd9/scipy-1.16.3-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:8be1ca9170fcb6223cc7c27f4305d680ded114a1567c0bd2bfcbf947d1b17511", size = 28941012, upload-time = "2025-10-28T17:31:53.411Z" }, + { url = "https://files.pythonhosted.org/packages/a8/a8/0e7a9a6872a923505dbdf6bb93451edcac120363131c19013044a1e7cb0c/scipy-1.16.3-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:bea0a62734d20d67608660f69dcda23e7f90fb4ca20974ab80b6ed40df87a005", size = 20931935, upload-time = "2025-10-28T17:31:57.361Z" }, + { url = "https://files.pythonhosted.org/packages/bd/c7/020fb72bd79ad798e4dbe53938543ecb96b3a9ac3fe274b7189e23e27353/scipy-1.16.3-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:2a207a6ce9c24f1951241f4693ede2d393f59c07abc159b2cb2be980820e01fb", size = 23534466, upload-time = "2025-10-28T17:32:01.875Z" }, + { url = "https://files.pythonhosted.org/packages/be/a0/668c4609ce6dbf2f948e167836ccaf897f95fb63fa231c87da7558a374cd/scipy-1.16.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:532fb5ad6a87e9e9cd9c959b106b73145a03f04c7d57ea3e6f6bb60b86ab0876", size = 33593618, upload-time = "2025-10-28T17:32:06.902Z" }, + { url = "https://files.pythonhosted.org/packages/ca/6e/8942461cf2636cdae083e3eb72622a7fbbfa5cf559c7d13ab250a5dbdc01/scipy-1.16.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0151a0749efeaaab78711c78422d413c583b8cdd2011a3c1d6c794938ee9fdb2", size = 35899798, upload-time = "2025-10-28T17:32:12.665Z" }, + { url = "https://files.pythonhosted.org/packages/79/e8/d0f33590364cdbd67f28ce79368b373889faa4ee959588beddf6daef9abe/scipy-1.16.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:b7180967113560cca57418a7bc719e30366b47959dd845a93206fbed693c867e", size = 36226154, upload-time = "2025-10-28T17:32:17.961Z" }, + { url = "https://files.pythonhosted.org/packages/39/c1/1903de608c0c924a1749c590064e65810f8046e437aba6be365abc4f7557/scipy-1.16.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:deb3841c925eeddb6afc1e4e4a45e418d19ec7b87c5df177695224078e8ec733", size = 38878540, upload-time = "2025-10-28T17:32:23.907Z" }, + { url = "https://files.pythonhosted.org/packages/f1/d0/22ec7036ba0b0a35bccb7f25ab407382ed34af0b111475eb301c16f8a2e5/scipy-1.16.3-cp311-cp311-win_amd64.whl", hash = "sha256:53c3844d527213631e886621df5695d35e4f6a75f620dca412bcd292f6b87d78", size = 38722107, upload-time = "2025-10-28T17:32:29.921Z" }, + { url = "https://files.pythonhosted.org/packages/7b/60/8a00e5a524bb3bf8898db1650d350f50e6cffb9d7a491c561dc9826c7515/scipy-1.16.3-cp311-cp311-win_arm64.whl", hash = "sha256:9452781bd879b14b6f055b26643703551320aa8d79ae064a71df55c00286a184", size = 25506272, upload-time = "2025-10-28T17:32:34.577Z" }, + { url = "https://files.pythonhosted.org/packages/40/41/5bf55c3f386b1643812f3a5674edf74b26184378ef0f3e7c7a09a7e2ca7f/scipy-1.16.3-cp312-cp312-macosx_10_14_x86_64.whl", hash = "sha256:81fc5827606858cf71446a5e98715ba0e11f0dbc83d71c7409d05486592a45d6", size = 36659043, upload-time = "2025-10-28T17:32:40.285Z" }, + { url = "https://files.pythonhosted.org/packages/1e/0f/65582071948cfc45d43e9870bf7ca5f0e0684e165d7c9ef4e50d783073eb/scipy-1.16.3-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:c97176013d404c7346bf57874eaac5187d969293bf40497140b0a2b2b7482e07", size = 28898986, upload-time = "2025-10-28T17:32:45.325Z" }, + { url = "https://files.pythonhosted.org/packages/96/5e/36bf3f0ac298187d1ceadde9051177d6a4fe4d507e8f59067dc9dd39e650/scipy-1.16.3-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:2b71d93c8a9936046866acebc915e2af2e292b883ed6e2cbe5c34beb094b82d9", size = 20889814, upload-time = "2025-10-28T17:32:49.277Z" }, + { url = "https://files.pythonhosted.org/packages/80/35/178d9d0c35394d5d5211bbff7ac4f2986c5488b59506fef9e1de13ea28d3/scipy-1.16.3-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:3d4a07a8e785d80289dfe66b7c27d8634a773020742ec7187b85ccc4b0e7b686", size = 23565795, upload-time = "2025-10-28T17:32:53.337Z" }, + { url = "https://files.pythonhosted.org/packages/fa/46/d1146ff536d034d02f83c8afc3c4bab2eddb634624d6529a8512f3afc9da/scipy-1.16.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0553371015692a898e1aa858fed67a3576c34edefa6b7ebdb4e9dde49ce5c203", size = 33349476, upload-time = "2025-10-28T17:32:58.353Z" }, + { url = "https://files.pythonhosted.org/packages/79/2e/415119c9ab3e62249e18c2b082c07aff907a273741b3f8160414b0e9193c/scipy-1.16.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:72d1717fd3b5e6ec747327ce9bda32d5463f472c9dce9f54499e81fbd50245a1", size = 35676692, upload-time = "2025-10-28T17:33:03.88Z" }, + { url = "https://files.pythonhosted.org/packages/27/82/df26e44da78bf8d2aeaf7566082260cfa15955a5a6e96e6a29935b64132f/scipy-1.16.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1fb2472e72e24d1530debe6ae078db70fb1605350c88a3d14bc401d6306dbffe", size = 36019345, upload-time = "2025-10-28T17:33:09.773Z" }, + { url = "https://files.pythonhosted.org/packages/82/31/006cbb4b648ba379a95c87262c2855cd0d09453e500937f78b30f02fa1cd/scipy-1.16.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c5192722cffe15f9329a3948c4b1db789fbb1f05c97899187dcf009b283aea70", size = 38678975, upload-time = "2025-10-28T17:33:15.809Z" }, + { url = "https://files.pythonhosted.org/packages/c2/7f/acbd28c97e990b421af7d6d6cd416358c9c293fc958b8529e0bd5d2a2a19/scipy-1.16.3-cp312-cp312-win_amd64.whl", hash = "sha256:56edc65510d1331dae01ef9b658d428e33ed48b4f77b1d51caf479a0253f96dc", size = 38555926, upload-time = "2025-10-28T17:33:21.388Z" }, + { url = "https://files.pythonhosted.org/packages/ce/69/c5c7807fd007dad4f48e0a5f2153038dc96e8725d3345b9ee31b2b7bed46/scipy-1.16.3-cp312-cp312-win_arm64.whl", hash = "sha256:a8a26c78ef223d3e30920ef759e25625a0ecdd0d60e5a8818b7513c3e5384cf2", size = 25463014, upload-time = "2025-10-28T17:33:25.975Z" }, + { url = "https://files.pythonhosted.org/packages/72/f1/57e8327ab1508272029e27eeef34f2302ffc156b69e7e233e906c2a5c379/scipy-1.16.3-cp313-cp313-macosx_10_14_x86_64.whl", hash = "sha256:d2ec56337675e61b312179a1ad124f5f570c00f920cc75e1000025451b88241c", size = 36617856, upload-time = "2025-10-28T17:33:31.375Z" }, + { url = "https://files.pythonhosted.org/packages/44/13/7e63cfba8a7452eb756306aa2fd9b37a29a323b672b964b4fdeded9a3f21/scipy-1.16.3-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:16b8bc35a4cc24db80a0ec836a9286d0e31b2503cb2fd7ff7fb0e0374a97081d", size = 28874306, upload-time = "2025-10-28T17:33:36.516Z" }, + { url = "https://files.pythonhosted.org/packages/15/65/3a9400efd0228a176e6ec3454b1fa998fbbb5a8defa1672c3f65706987db/scipy-1.16.3-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:5803c5fadd29de0cf27fa08ccbfe7a9e5d741bf63e4ab1085437266f12460ff9", size = 20865371, upload-time = "2025-10-28T17:33:42.094Z" }, + { url = "https://files.pythonhosted.org/packages/33/d7/eda09adf009a9fb81827194d4dd02d2e4bc752cef16737cc4ef065234031/scipy-1.16.3-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:b81c27fc41954319a943d43b20e07c40bdcd3ff7cf013f4fb86286faefe546c4", size = 23524877, upload-time = "2025-10-28T17:33:48.483Z" }, + { url = "https://files.pythonhosted.org/packages/7d/6b/3f911e1ebc364cb81320223a3422aab7d26c9c7973109a9cd0f27c64c6c0/scipy-1.16.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0c3b4dd3d9b08dbce0f3440032c52e9e2ab9f96ade2d3943313dfe51a7056959", size = 33342103, upload-time = "2025-10-28T17:33:56.495Z" }, + { url = "https://files.pythonhosted.org/packages/21/f6/4bfb5695d8941e5c570a04d9fcd0d36bce7511b7d78e6e75c8f9791f82d0/scipy-1.16.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7dc1360c06535ea6116a2220f760ae572db9f661aba2d88074fe30ec2aa1ff88", size = 35697297, upload-time = "2025-10-28T17:34:04.722Z" }, + { url = "https://files.pythonhosted.org/packages/04/e1/6496dadbc80d8d896ff72511ecfe2316b50313bfc3ebf07a3f580f08bd8c/scipy-1.16.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:663b8d66a8748051c3ee9c96465fb417509315b99c71550fda2591d7dd634234", size = 36021756, upload-time = "2025-10-28T17:34:13.482Z" }, + { url = "https://files.pythonhosted.org/packages/fe/bd/a8c7799e0136b987bda3e1b23d155bcb31aec68a4a472554df5f0937eef7/scipy-1.16.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eab43fae33a0c39006a88096cd7b4f4ef545ea0447d250d5ac18202d40b6611d", size = 38696566, upload-time = "2025-10-28T17:34:22.384Z" }, + { url = "https://files.pythonhosted.org/packages/cd/01/1204382461fcbfeb05b6161b594f4007e78b6eba9b375382f79153172b4d/scipy-1.16.3-cp313-cp313-win_amd64.whl", hash = "sha256:062246acacbe9f8210de8e751b16fc37458213f124bef161a5a02c7a39284304", size = 38529877, upload-time = "2025-10-28T17:35:51.076Z" }, + { url = "https://files.pythonhosted.org/packages/7f/14/9d9fbcaa1260a94f4bb5b64ba9213ceb5d03cd88841fe9fd1ffd47a45b73/scipy-1.16.3-cp313-cp313-win_arm64.whl", hash = "sha256:50a3dbf286dbc7d84f176f9a1574c705f277cb6565069f88f60db9eafdbe3ee2", size = 25455366, upload-time = "2025-10-28T17:35:59.014Z" }, + { url = "https://files.pythonhosted.org/packages/e2/a3/9ec205bd49f42d45d77f1730dbad9ccf146244c1647605cf834b3a8c4f36/scipy-1.16.3-cp313-cp313t-macosx_10_14_x86_64.whl", hash = "sha256:fb4b29f4cf8cc5a8d628bc8d8e26d12d7278cd1f219f22698a378c3d67db5e4b", size = 37027931, upload-time = "2025-10-28T17:34:31.451Z" }, + { url = "https://files.pythonhosted.org/packages/25/06/ca9fd1f3a4589cbd825b1447e5db3a8ebb969c1eaf22c8579bd286f51b6d/scipy-1.16.3-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:8d09d72dc92742988b0e7750bddb8060b0c7079606c0d24a8cc8e9c9c11f9079", size = 29400081, upload-time = "2025-10-28T17:34:39.087Z" }, + { url = "https://files.pythonhosted.org/packages/6a/56/933e68210d92657d93fb0e381683bc0e53a965048d7358ff5fbf9e6a1b17/scipy-1.16.3-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:03192a35e661470197556de24e7cb1330d84b35b94ead65c46ad6f16f6b28f2a", size = 21391244, upload-time = "2025-10-28T17:34:45.234Z" }, + { url = "https://files.pythonhosted.org/packages/a8/7e/779845db03dc1418e215726329674b40576879b91814568757ff0014ad65/scipy-1.16.3-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:57d01cb6f85e34f0946b33caa66e892aae072b64b034183f3d87c4025802a119", size = 23929753, upload-time = "2025-10-28T17:34:51.793Z" }, + { url = "https://files.pythonhosted.org/packages/4c/4b/f756cf8161d5365dcdef9e5f460ab226c068211030a175d2fc7f3f41ca64/scipy-1.16.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:96491a6a54e995f00a28a3c3badfff58fd093bf26cd5fb34a2188c8c756a3a2c", size = 33496912, upload-time = "2025-10-28T17:34:59.8Z" }, + { url = "https://files.pythonhosted.org/packages/09/b5/222b1e49a58668f23839ca1542a6322bb095ab8d6590d4f71723869a6c2c/scipy-1.16.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:cd13e354df9938598af2be05822c323e97132d5e6306b83a3b4ee6724c6e522e", size = 35802371, upload-time = "2025-10-28T17:35:08.173Z" }, + { url = "https://files.pythonhosted.org/packages/c1/8d/5964ef68bb31829bde27611f8c9deeac13764589fe74a75390242b64ca44/scipy-1.16.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:63d3cdacb8a824a295191a723ee5e4ea7768ca5ca5f2838532d9f2e2b3ce2135", size = 36190477, upload-time = "2025-10-28T17:35:16.7Z" }, + { url = "https://files.pythonhosted.org/packages/ab/f2/b31d75cb9b5fa4dd39a0a931ee9b33e7f6f36f23be5ef560bf72e0f92f32/scipy-1.16.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:e7efa2681ea410b10dde31a52b18b0154d66f2485328830e45fdf183af5aefc6", size = 38796678, upload-time = "2025-10-28T17:35:26.354Z" }, + { url = "https://files.pythonhosted.org/packages/b4/1e/b3723d8ff64ab548c38d87055483714fefe6ee20e0189b62352b5e015bb1/scipy-1.16.3-cp313-cp313t-win_amd64.whl", hash = "sha256:2d1ae2cf0c350e7705168ff2429962a89ad90c2d49d1dd300686d8b2a5af22fc", size = 38640178, upload-time = "2025-10-28T17:35:35.304Z" }, + { url = "https://files.pythonhosted.org/packages/8e/f3/d854ff38789aca9b0cc23008d607ced9de4f7ab14fa1ca4329f86b3758ca/scipy-1.16.3-cp313-cp313t-win_arm64.whl", hash = "sha256:0c623a54f7b79dd88ef56da19bc2873afec9673a48f3b85b18e4d402bdd29a5a", size = 25803246, upload-time = "2025-10-28T17:35:42.155Z" }, + { url = "https://files.pythonhosted.org/packages/99/f6/99b10fd70f2d864c1e29a28bbcaa0c6340f9d8518396542d9ea3b4aaae15/scipy-1.16.3-cp314-cp314-macosx_10_14_x86_64.whl", hash = "sha256:875555ce62743e1d54f06cdf22c1e0bc47b91130ac40fe5d783b6dfa114beeb6", size = 36606469, upload-time = "2025-10-28T17:36:08.741Z" }, + { url = "https://files.pythonhosted.org/packages/4d/74/043b54f2319f48ea940dd025779fa28ee360e6b95acb7cd188fad4391c6b/scipy-1.16.3-cp314-cp314-macosx_12_0_arm64.whl", hash = "sha256:bb61878c18a470021fb515a843dc7a76961a8daceaaaa8bad1332f1bf4b54657", size = 28872043, upload-time = "2025-10-28T17:36:16.599Z" }, + { url = "https://files.pythonhosted.org/packages/4d/e1/24b7e50cc1c4ee6ffbcb1f27fe9f4c8b40e7911675f6d2d20955f41c6348/scipy-1.16.3-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:f2622206f5559784fa5c4b53a950c3c7c1cf3e84ca1b9c4b6c03f062f289ca26", size = 20862952, upload-time = "2025-10-28T17:36:22.966Z" }, + { url = "https://files.pythonhosted.org/packages/dd/3a/3e8c01a4d742b730df368e063787c6808597ccb38636ed821d10b39ca51b/scipy-1.16.3-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:7f68154688c515cdb541a31ef8eb66d8cd1050605be9dcd74199cbd22ac739bc", size = 23508512, upload-time = "2025-10-28T17:36:29.731Z" }, + { url = "https://files.pythonhosted.org/packages/1f/60/c45a12b98ad591536bfe5330cb3cfe1850d7570259303563b1721564d458/scipy-1.16.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8b3c820ddb80029fe9f43d61b81d8b488d3ef8ca010d15122b152db77dc94c22", size = 33413639, upload-time = "2025-10-28T17:36:37.982Z" }, + { url = "https://files.pythonhosted.org/packages/71/bc/35957d88645476307e4839712642896689df442f3e53b0fa016ecf8a3357/scipy-1.16.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d3837938ae715fc0fe3c39c0202de3a8853aff22ca66781ddc2ade7554b7e2cc", size = 35704729, upload-time = "2025-10-28T17:36:46.547Z" }, + { url = "https://files.pythonhosted.org/packages/3b/15/89105e659041b1ca11c386e9995aefacd513a78493656e57789f9d9eab61/scipy-1.16.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:aadd23f98f9cb069b3bd64ddc900c4d277778242e961751f77a8cb5c4b946fb0", size = 36086251, upload-time = "2025-10-28T17:36:55.161Z" }, + { url = "https://files.pythonhosted.org/packages/1a/87/c0ea673ac9c6cc50b3da2196d860273bc7389aa69b64efa8493bdd25b093/scipy-1.16.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b7c5f1bda1354d6a19bc6af73a649f8285ca63ac6b52e64e658a5a11d4d69800", size = 38716681, upload-time = "2025-10-28T17:37:04.1Z" }, + { url = "https://files.pythonhosted.org/packages/91/06/837893227b043fb9b0d13e4bd7586982d8136cb249ffb3492930dab905b8/scipy-1.16.3-cp314-cp314-win_amd64.whl", hash = "sha256:e5d42a9472e7579e473879a1990327830493a7047506d58d73fc429b84c1d49d", size = 39358423, upload-time = "2025-10-28T17:38:20.005Z" }, + { url = "https://files.pythonhosted.org/packages/95/03/28bce0355e4d34a7c034727505a02d19548549e190bedd13a721e35380b7/scipy-1.16.3-cp314-cp314-win_arm64.whl", hash = "sha256:6020470b9d00245926f2d5bb93b119ca0340f0d564eb6fbaad843eaebf9d690f", size = 26135027, upload-time = "2025-10-28T17:38:24.966Z" }, + { url = "https://files.pythonhosted.org/packages/b2/6f/69f1e2b682efe9de8fe9f91040f0cd32f13cfccba690512ba4c582b0bc29/scipy-1.16.3-cp314-cp314t-macosx_10_14_x86_64.whl", hash = "sha256:e1d27cbcb4602680a49d787d90664fa4974063ac9d4134813332a8c53dbe667c", size = 37028379, upload-time = "2025-10-28T17:37:14.061Z" }, + { url = "https://files.pythonhosted.org/packages/7c/2d/e826f31624a5ebbab1cd93d30fd74349914753076ed0593e1d56a98c4fb4/scipy-1.16.3-cp314-cp314t-macosx_12_0_arm64.whl", hash = "sha256:9b9c9c07b6d56a35777a1b4cc8966118fb16cfd8daf6743867d17d36cfad2d40", size = 29400052, upload-time = "2025-10-28T17:37:21.709Z" }, + { url = "https://files.pythonhosted.org/packages/69/27/d24feb80155f41fd1f156bf144e7e049b4e2b9dd06261a242905e3bc7a03/scipy-1.16.3-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:3a4c460301fb2cffb7f88528f30b3127742cff583603aa7dc964a52c463b385d", size = 21391183, upload-time = "2025-10-28T17:37:29.559Z" }, + { url = "https://files.pythonhosted.org/packages/f8/d3/1b229e433074c5738a24277eca520a2319aac7465eea7310ea6ae0e98ae2/scipy-1.16.3-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:f667a4542cc8917af1db06366d3f78a5c8e83badd56409f94d1eac8d8d9133fa", size = 23930174, upload-time = "2025-10-28T17:37:36.306Z" }, + { url = "https://files.pythonhosted.org/packages/16/9d/d9e148b0ec680c0f042581a2be79a28a7ab66c0c4946697f9e7553ead337/scipy-1.16.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f379b54b77a597aa7ee5e697df0d66903e41b9c85a6dd7946159e356319158e8", size = 33497852, upload-time = "2025-10-28T17:37:42.228Z" }, + { url = "https://files.pythonhosted.org/packages/2f/22/4e5f7561e4f98b7bea63cf3fd7934bff1e3182e9f1626b089a679914d5c8/scipy-1.16.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4aff59800a3b7f786b70bfd6ab551001cb553244988d7d6b8299cb1ea653b353", size = 35798595, upload-time = "2025-10-28T17:37:48.102Z" }, + { url = "https://files.pythonhosted.org/packages/83/42/6644d714c179429fc7196857866f219fef25238319b650bb32dde7bf7a48/scipy-1.16.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:da7763f55885045036fabcebd80144b757d3db06ab0861415d1c3b7c69042146", size = 36186269, upload-time = "2025-10-28T17:37:53.72Z" }, + { url = "https://files.pythonhosted.org/packages/ac/70/64b4d7ca92f9cf2e6fc6aaa2eecf80bb9b6b985043a9583f32f8177ea122/scipy-1.16.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:ffa6eea95283b2b8079b821dc11f50a17d0571c92b43e2b5b12764dc5f9b285d", size = 38802779, upload-time = "2025-10-28T17:37:59.393Z" }, + { url = "https://files.pythonhosted.org/packages/61/82/8d0e39f62764cce5ffd5284131e109f07cf8955aef9ab8ed4e3aa5e30539/scipy-1.16.3-cp314-cp314t-win_amd64.whl", hash = "sha256:d9f48cafc7ce94cf9b15c6bffdc443a81a27bf7075cf2dcd5c8b40f85d10c4e7", size = 39471128, upload-time = "2025-10-28T17:38:05.259Z" }, + { url = "https://files.pythonhosted.org/packages/64/47/a494741db7280eae6dc033510c319e34d42dd41b7ac0c7ead39354d1a2b5/scipy-1.16.3-cp314-cp314t-win_arm64.whl", hash = "sha256:21d9d6b197227a12dcbf9633320a4e34c6b0e51c57268df255a0942983bac562", size = 26464127, upload-time = "2025-10-28T17:38:11.34Z" }, +] + +[[package]] +name = "sentence-transformers" +version = "3.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "huggingface-hub" }, + { name = "numpy" }, + { name = "pillow" }, + { name = "scikit-learn" }, + { name = "scipy" }, + { name = "torch" }, + { name = "tqdm" }, + { name = "transformers" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/19/c0/7051c672a48fe561decf7208cc18bbbdd4efa3323873aa1c86a3fb77fd97/sentence_transformers-3.0.0.tar.gz", hash = "sha256:52d4101654ed107a28e9fa5110fce399084b55e7838fd8256471353ddc299033", size = 174658, upload-time = "2024-05-28T11:53:39.129Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f8/c4/99a9386808025d5a546576243bfd3b1eb669f978b8a0e05a1253eaf89bf0/sentence_transformers-3.0.0-py3-none-any.whl", hash = "sha256:9bf851b688b796e5fb06c920921efd5e5e05ee616e85cb3026fbdfe4dcf15bf3", size = 224681, upload-time = "2024-05-28T11:53:37.037Z" }, +] + +[[package]] +name = "setuptools" +version = "80.9.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz", hash = "sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c", size = 1319958, upload-time = "2025-05-27T00:56:51.443Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a3/dc/17031897dae0efacfea57dfd3a82fdd2a2aeb58e0ff71b77b87e44edc772/setuptools-80.9.0-py3-none-any.whl", hash = "sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922", size = 1201486, upload-time = "2025-05-27T00:56:49.664Z" }, +] + +[[package]] +name = "six" +version = "1.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031, upload-time = "2024-12-04T17:35:28.174Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" }, +] + +[[package]] +name = "slack-sdk" +version = "3.31.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a5/e3/4a2491cbf793bb8da8a51120207df8c097faeda42bf720f7acf7c40e4ca8/slack_sdk-3.31.0.tar.gz", hash = "sha256:740d2f9c49cbfcbd46fca56b4be9d527934c225312aac18fd2c0fca0ef6bc935", size = 230928, upload-time = "2024-07-04T16:40:39.019Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/57/04/f4517d8403c49910f45ad91205de352f2eccf12ae28865a27da7d7d05bf6/slack_sdk-3.31.0-py2.py3-none-any.whl", hash = "sha256:a120cc461e8ebb7d9175f171dbe0ded37a6878d9f7b96b28e4bad1227399047b", size = 289845, upload-time = "2024-07-04T16:40:36.34Z" }, +] + +[[package]] +name = "sniffio" +version = "1.3.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc", size = 20372, upload-time = "2024-02-25T23:20:04.057Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", size = 10235, upload-time = "2024-02-25T23:20:01.196Z" }, +] + +[[package]] +name = "soupsieve" +version = "2.8" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz", hash = "sha256:e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f", size = 103472, upload-time = "2025-08-27T15:39:51.78Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/14/a0/bb38d3b76b8cae341dad93a2dd83ab7462e6dbcdd84d43f54ee60a8dc167/soupsieve-2.8-py3-none-any.whl", hash = "sha256:0cc76456a30e20f5d7f2e14a98a4ae2ee4e5abdc7c5ea0aafe795f344bc7984c", size = 36679, upload-time = "2025-08-27T15:39:50.179Z" }, +] + +[[package]] +name = "sse-starlette" +version = "3.0.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "starlette" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/17/8b/54651ad49bce99a50fd61a7f19c2b6a79fbb072e693101fbb1194c362054/sse_starlette-3.0.4.tar.gz", hash = "sha256:5e34286862e96ead0eb70f5ddd0bd21ab1f6473a8f44419dd267f431611383dd", size = 22576, upload-time = "2025-12-14T16:22:52.493Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/71/22/8ab1066358601163e1ac732837adba3672f703818f693e179b24e0d3b65c/sse_starlette-3.0.4-py3-none-any.whl", hash = "sha256:32c80ef0d04506ced4b0b6ab8fe300925edc37d26f666afb1874c754895f5dc3", size = 11764, upload-time = "2025-12-14T16:22:51.453Z" }, +] + +[[package]] +name = "stack-data" +version = "0.6.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "asttokens" }, + { name = "executing" }, + { name = "pure-eval" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/28/e3/55dcc2cfbc3ca9c29519eb6884dd1415ecb53b0e934862d3559ddcb7e20b/stack_data-0.6.3.tar.gz", hash = "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9", size = 44707, upload-time = "2023-09-30T13:58:05.479Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f1/7b/ce1eafaf1a76852e2ec9b22edecf1daa58175c090266e9f6c64afcd81d91/stack_data-0.6.3-py3-none-any.whl", hash = "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695", size = 24521, upload-time = "2023-09-30T13:58:03.53Z" }, +] + +[[package]] +name = "starlette" +version = "0.50.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ba/b8/73a0e6a6e079a9d9cfa64113d771e421640b6f679a52eeb9b32f72d871a1/starlette-0.50.0.tar.gz", hash = "sha256:a2a17b22203254bcbc2e1f926d2d55f3f9497f769416b3190768befe598fa3ca", size = 2646985, upload-time = "2025-11-01T15:25:27.516Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d9/52/1064f510b141bd54025f9b55105e26d1fa970b9be67ad766380a3c9b74b0/starlette-0.50.0-py3-none-any.whl", hash = "sha256:9e5391843ec9b6e472eed1365a78c8098cfceb7a74bfd4d6b1c0c0095efb3bca", size = 74033, upload-time = "2025-11-01T15:25:25.461Z" }, +] + +[[package]] +name = "sympy" +version = "1.14.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mpmath" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/83/d3/803453b36afefb7c2bb238361cd4ae6125a569b4db67cd9e79846ba2d68c/sympy-1.14.0.tar.gz", hash = "sha256:d3d3fe8df1e5a0b42f0e7bdf50541697dbe7d23746e894990c030e2b05e72517", size = 7793921, upload-time = "2025-04-27T18:05:01.611Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a2/09/77d55d46fd61b4a135c444fc97158ef34a095e5681d0a6c10b75bf356191/sympy-1.14.0-py3-none-any.whl", hash = "sha256:e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5", size = 6299353, upload-time = "2025-04-27T18:04:59.103Z" }, +] + +[[package]] +name = "tabulate" +version = "0.9.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz", hash = "sha256:0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c", size = 81090, upload-time = "2022-10-06T17:21:48.54Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/40/44/4a5f08c96eb108af5cb50b41f76142f0afa346dfa99d5296fe7202a11854/tabulate-0.9.0-py3-none-any.whl", hash = "sha256:024ca478df22e9340661486f85298cff5f6dcdba14f3813e8830015b9ed1948f", size = 35252, upload-time = "2022-10-06T17:21:44.262Z" }, +] + +[[package]] +name = "texttable" +version = "1.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/1c/dc/0aff23d6036a4d3bf4f1d8c8204c5c79c4437e25e0ae94ffe4bbb55ee3c2/texttable-1.7.0.tar.gz", hash = "sha256:2d2068fb55115807d3ac77a4ca68fa48803e84ebb0ee2340f858107a36522638", size = 12831, upload-time = "2023-10-03T09:48:12.272Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/24/99/4772b8e00a136f3e01236de33b0efda31ee7077203ba5967fcc76da94d65/texttable-1.7.0-py2.py3-none-any.whl", hash = "sha256:72227d592c82b3d7f672731ae73e4d1f88cd8e2ef5b075a7a7f01a23a3743917", size = 10768, upload-time = "2023-10-03T09:48:10.434Z" }, +] + +[[package]] +name = "threadpoolctl" +version = "3.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b7/4d/08c89e34946fce2aec4fbb45c9016efd5f4d7f24af8e5d93296e935631d8/threadpoolctl-3.6.0.tar.gz", hash = "sha256:8ab8b4aa3491d812b623328249fab5302a68d2d71745c8a4c719a2fcaba9f44e", size = 21274, upload-time = "2025-03-13T13:49:23.031Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/32/d5/f9a850d79b0851d1d4ef6456097579a9005b31fea68726a4ae5f2d82ddd9/threadpoolctl-3.6.0-py3-none-any.whl", hash = "sha256:43a0b8fd5a2928500110039e43a5eed8480b918967083ea48dc3ab9f13c4a7fb", size = 18638, upload-time = "2025-03-13T13:49:21.846Z" }, +] + +[[package]] +name = "tiktoken" +version = "0.7.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "regex" }, + { name = "requests" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c4/4a/abaec53e93e3ef37224a4dd9e2fc6bb871e7a538c2b6b9d2a6397271daf4/tiktoken-0.7.0.tar.gz", hash = "sha256:1077266e949c24e0291f6c350433c6f0971365ece2b173a23bc3b9f9defef6b6", size = 33437, upload-time = "2024-05-13T18:03:28.793Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/22/eb/57492b2568eea1d546da5cc1ae7559d924275280db80ba07e6f9b89a914b/tiktoken-0.7.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:10c7674f81e6e350fcbed7c09a65bca9356eaab27fb2dac65a1e440f2bcfe30f", size = 961468, upload-time = "2024-05-13T18:02:43.788Z" }, + { url = "https://files.pythonhosted.org/packages/30/ef/e07dbfcb2f85c84abaa1b035a9279575a8da0236305491dc22ae099327f7/tiktoken-0.7.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:084cec29713bc9d4189a937f8a35dbdfa785bd1235a34c1124fe2323821ee93f", size = 907005, upload-time = "2024-05-13T18:02:45.327Z" }, + { url = "https://files.pythonhosted.org/packages/ea/9b/f36db825b1e9904c3a2646439cb9923fc1e09208e2e071c6d9dd64ead131/tiktoken-0.7.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:811229fde1652fedcca7c6dfe76724d0908775b353556d8a71ed74d866f73f7b", size = 1049183, upload-time = "2024-05-13T18:02:46.574Z" }, + { url = "https://files.pythonhosted.org/packages/61/b4/b80d1fe33015e782074e96bbbf4108ccd283b8deea86fb43c15d18b7c351/tiktoken-0.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86b6e7dc2e7ad1b3757e8a24597415bafcfb454cebf9a33a01f2e6ba2e663992", size = 1080830, upload-time = "2024-05-13T18:02:48.444Z" }, + { url = "https://files.pythonhosted.org/packages/2a/40/c66ff3a21af6d62a7e0ff428d12002c4e0389f776d3ff96dcaa0bb354eee/tiktoken-0.7.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1063c5748be36344c7e18c7913c53e2cca116764c2080177e57d62c7ad4576d1", size = 1092967, upload-time = "2024-05-13T18:02:50.006Z" }, + { url = "https://files.pythonhosted.org/packages/2e/80/f4c9e255ff236e6a69ce44b927629cefc1b63d3a00e2d1c9ed540c9492d2/tiktoken-0.7.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:20295d21419bfcca092644f7e2f2138ff947a6eb8cfc732c09cc7d76988d4a89", size = 1142682, upload-time = "2024-05-13T18:02:51.814Z" }, + { url = "https://files.pythonhosted.org/packages/b1/10/c04b4ff592a5f46b28ebf4c2353f735c02ae7f0ce1b165d00748ced6467e/tiktoken-0.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:959d993749b083acc57a317cbc643fb85c014d055b2119b739487288f4e5d1cb", size = 799009, upload-time = "2024-05-13T18:02:53.057Z" }, + { url = "https://files.pythonhosted.org/packages/1d/46/4cdda4186ce900608f522da34acf442363346688c71b938a90a52d7b84cc/tiktoken-0.7.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:71c55d066388c55a9c00f61d2c456a6086673ab7dec22dd739c23f77195b1908", size = 960446, upload-time = "2024-05-13T18:02:54.409Z" }, + { url = "https://files.pythonhosted.org/packages/b6/30/09ced367d280072d7a3e21f34263dfbbf6378661e7a0f6414e7c18971083/tiktoken-0.7.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:09ed925bccaa8043e34c519fbb2f99110bd07c6fd67714793c21ac298e449410", size = 906652, upload-time = "2024-05-13T18:02:56.25Z" }, + { url = "https://files.pythonhosted.org/packages/e6/7b/c949e4954441a879a67626963dff69096e3c774758b9f2bb0853f7b4e1e7/tiktoken-0.7.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:03c6c40ff1db0f48a7b4d2dafeae73a5607aacb472fa11f125e7baf9dce73704", size = 1047904, upload-time = "2024-05-13T18:02:57.707Z" }, + { url = "https://files.pythonhosted.org/packages/50/81/1842a22f15586072280364c2ab1e40835adaf64e42fe80e52aff921ee021/tiktoken-0.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d20b5c6af30e621b4aca094ee61777a44118f52d886dbe4f02b70dfe05c15350", size = 1079836, upload-time = "2024-05-13T18:02:59.009Z" }, + { url = "https://files.pythonhosted.org/packages/6d/87/51a133a3d5307cf7ae3754249b0faaa91d3414b85c3d36f80b54d6817aa6/tiktoken-0.7.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d427614c3e074004efa2f2411e16c826f9df427d3c70a54725cae860f09e4bf4", size = 1092472, upload-time = "2024-05-13T18:03:00.597Z" }, + { url = "https://files.pythonhosted.org/packages/a5/1f/c93517dc6d3b2c9e988b8e24f87a8b2d4a4ab28920a3a3f3ea338397ae0c/tiktoken-0.7.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8c46d7af7b8c6987fac9b9f61041b452afe92eb087d29c9ce54951280f899a97", size = 1141881, upload-time = "2024-05-13T18:03:02.743Z" }, + { url = "https://files.pythonhosted.org/packages/bf/4b/48ca098cb580c099b5058bf62c4cb5e90ca6130fa43ef4df27088536245b/tiktoken-0.7.0-cp312-cp312-win_amd64.whl", hash = "sha256:0bc603c30b9e371e7c4c7935aba02af5994a909fc3c0fe66e7004070858d3f8f", size = 799281, upload-time = "2024-05-13T18:03:04.036Z" }, +] + +[[package]] +name = "tinycss2" +version = "1.4.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "webencodings" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/7a/fd/7a5ee21fd08ff70d3d33a5781c255cbe779659bd03278feb98b19ee550f4/tinycss2-1.4.0.tar.gz", hash = "sha256:10c0972f6fc0fbee87c3edb76549357415e94548c1ae10ebccdea16fb404a9b7", size = 87085, upload-time = "2024-10-24T14:58:29.895Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e6/34/ebdc18bae6aa14fbee1a08b63c015c72b64868ff7dae68808ab500c492e2/tinycss2-1.4.0-py3-none-any.whl", hash = "sha256:3a49cf47b7675da0b15d0c6e1df8df4ebd96e9394bb905a5775adb0d884c5289", size = 26610, upload-time = "2024-10-24T14:58:28.029Z" }, +] + +[[package]] +name = "tokenizers" +version = "0.22.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "huggingface-hub" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/1c/46/fb6854cec3278fbfa4a75b50232c77622bc517ac886156e6afbfa4d8fc6e/tokenizers-0.22.1.tar.gz", hash = "sha256:61de6522785310a309b3407bac22d99c4db5dba349935e99e4d15ea2226af2d9", size = 363123, upload-time = "2025-09-19T09:49:23.424Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bf/33/f4b2d94ada7ab297328fc671fed209368ddb82f965ec2224eb1892674c3a/tokenizers-0.22.1-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:59fdb013df17455e5f950b4b834a7b3ee2e0271e6378ccb33aa74d178b513c73", size = 3069318, upload-time = "2025-09-19T09:49:11.848Z" }, + { url = "https://files.pythonhosted.org/packages/1c/58/2aa8c874d02b974990e89ff95826a4852a8b2a273c7d1b4411cdd45a4565/tokenizers-0.22.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:8d4e484f7b0827021ac5f9f71d4794aaef62b979ab7608593da22b1d2e3c4edc", size = 2926478, upload-time = "2025-09-19T09:49:09.759Z" }, + { url = "https://files.pythonhosted.org/packages/1e/3b/55e64befa1e7bfea963cf4b787b2cea1011362c4193f5477047532ce127e/tokenizers-0.22.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:19d2962dd28bc67c1f205ab180578a78eef89ac60ca7ef7cbe9635a46a56422a", size = 3256994, upload-time = "2025-09-19T09:48:56.701Z" }, + { url = "https://files.pythonhosted.org/packages/71/0b/fbfecf42f67d9b7b80fde4aabb2b3110a97fac6585c9470b5bff103a80cb/tokenizers-0.22.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:38201f15cdb1f8a6843e6563e6e79f4abd053394992b9bbdf5213ea3469b4ae7", size = 3153141, upload-time = "2025-09-19T09:48:59.749Z" }, + { url = "https://files.pythonhosted.org/packages/17/a9/b38f4e74e0817af8f8ef925507c63c6ae8171e3c4cb2d5d4624bf58fca69/tokenizers-0.22.1-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d1cbe5454c9a15df1b3443c726063d930c16f047a3cc724b9e6e1a91140e5a21", size = 3508049, upload-time = "2025-09-19T09:49:05.868Z" }, + { url = "https://files.pythonhosted.org/packages/d2/48/dd2b3dac46bb9134a88e35d72e1aa4869579eacc1a27238f1577270773ff/tokenizers-0.22.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e7d094ae6312d69cc2a872b54b91b309f4f6fbce871ef28eb27b52a98e4d0214", size = 3710730, upload-time = "2025-09-19T09:49:01.832Z" }, + { url = "https://files.pythonhosted.org/packages/93/0e/ccabc8d16ae4ba84a55d41345207c1e2ea88784651a5a487547d80851398/tokenizers-0.22.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:afd7594a56656ace95cdd6df4cca2e4059d294c5cfb1679c57824b605556cb2f", size = 3412560, upload-time = "2025-09-19T09:49:03.867Z" }, + { url = "https://files.pythonhosted.org/packages/d0/c6/dc3a0db5a6766416c32c034286d7c2d406da1f498e4de04ab1b8959edd00/tokenizers-0.22.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2ef6063d7a84994129732b47e7915e8710f27f99f3a3260b8a38fc7ccd083f4", size = 3250221, upload-time = "2025-09-19T09:49:07.664Z" }, + { url = "https://files.pythonhosted.org/packages/d7/a6/2c8486eef79671601ff57b093889a345dd3d576713ef047776015dc66de7/tokenizers-0.22.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ba0a64f450b9ef412c98f6bcd2a50c6df6e2443b560024a09fa6a03189726879", size = 9345569, upload-time = "2025-09-19T09:49:14.214Z" }, + { url = "https://files.pythonhosted.org/packages/6b/16/32ce667f14c35537f5f605fe9bea3e415ea1b0a646389d2295ec348d5657/tokenizers-0.22.1-cp39-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:331d6d149fa9c7d632cde4490fb8bbb12337fa3a0232e77892be656464f4b446", size = 9271599, upload-time = "2025-09-19T09:49:16.639Z" }, + { url = "https://files.pythonhosted.org/packages/51/7c/a5f7898a3f6baa3fc2685c705e04c98c1094c523051c805cdd9306b8f87e/tokenizers-0.22.1-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:607989f2ea68a46cb1dfbaf3e3aabdf3f21d8748312dbeb6263d1b3b66c5010a", size = 9533862, upload-time = "2025-09-19T09:49:19.146Z" }, + { url = "https://files.pythonhosted.org/packages/36/65/7e75caea90bc73c1dd8d40438adf1a7bc26af3b8d0a6705ea190462506e1/tokenizers-0.22.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a0f307d490295717726598ef6fa4f24af9d484809223bbc253b201c740a06390", size = 9681250, upload-time = "2025-09-19T09:49:21.501Z" }, + { url = "https://files.pythonhosted.org/packages/30/2c/959dddef581b46e6209da82df3b78471e96260e2bc463f89d23b1bf0e52a/tokenizers-0.22.1-cp39-abi3-win32.whl", hash = "sha256:b5120eed1442765cd90b903bb6cfef781fd8fe64e34ccaecbae4c619b7b12a82", size = 2472003, upload-time = "2025-09-19T09:49:27.089Z" }, + { url = "https://files.pythonhosted.org/packages/b3/46/e33a8c93907b631a99377ef4c5f817ab453d0b34f93529421f42ff559671/tokenizers-0.22.1-cp39-abi3-win_amd64.whl", hash = "sha256:65fd6e3fb11ca1e78a6a93602490f134d1fdeb13bcef99389d5102ea318ed138", size = 2674684, upload-time = "2025-09-19T09:49:24.953Z" }, +] + +[[package]] +name = "torch" +version = "2.9.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "filelock" }, + { name = "fsspec" }, + { name = "jinja2" }, + { name = "networkx" }, + { name = "nvidia-cublas-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cuda-cupti-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cuda-nvrtc-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cuda-runtime-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cudnn-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cufft-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cufile-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-curand-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cusolver-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cusparse-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cusparselt-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-nccl-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-nvjitlink-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-nvshmem-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-nvtx-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "setuptools", marker = "python_full_version >= '3.12'" }, + { name = "sympy" }, + { name = "triton", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "typing-extensions" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/15/db/c064112ac0089af3d2f7a2b5bfbabf4aa407a78b74f87889e524b91c5402/torch-2.9.1-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:62b3fd888277946918cba4478cf849303da5359f0fb4e3bfb86b0533ba2eaf8d", size = 104220430, upload-time = "2025-11-12T15:20:31.705Z" }, + { url = "https://files.pythonhosted.org/packages/56/be/76eaa36c9cd032d3b01b001e2c5a05943df75f26211f68fae79e62f87734/torch-2.9.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:d033ff0ac3f5400df862a51bdde9bad83561f3739ea0046e68f5401ebfa67c1b", size = 899821446, upload-time = "2025-11-12T15:20:15.544Z" }, + { url = "https://files.pythonhosted.org/packages/47/cc/7a2949e38dfe3244c4df21f0e1c27bce8aedd6c604a587dd44fc21017cb4/torch-2.9.1-cp311-cp311-win_amd64.whl", hash = "sha256:0d06b30a9207b7c3516a9e0102114024755a07045f0c1d2f2a56b1819ac06bcb", size = 110973074, upload-time = "2025-11-12T15:21:39.958Z" }, + { url = "https://files.pythonhosted.org/packages/1e/ce/7d251155a783fb2c1bb6837b2b7023c622a2070a0a72726ca1df47e7ea34/torch-2.9.1-cp311-none-macosx_11_0_arm64.whl", hash = "sha256:52347912d868653e1528b47cafaf79b285b98be3f4f35d5955389b1b95224475", size = 74463887, upload-time = "2025-11-12T15:20:36.611Z" }, + { url = "https://files.pythonhosted.org/packages/0f/27/07c645c7673e73e53ded71705045d6cb5bae94c4b021b03aa8d03eee90ab/torch-2.9.1-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:da5f6f4d7f4940a173e5572791af238cb0b9e21b1aab592bd8b26da4c99f1cd6", size = 104126592, upload-time = "2025-11-12T15:20:41.62Z" }, + { url = "https://files.pythonhosted.org/packages/19/17/e377a460603132b00760511299fceba4102bd95db1a0ee788da21298ccff/torch-2.9.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:27331cd902fb4322252657f3902adf1c4f6acad9dcad81d8df3ae14c7c4f07c4", size = 899742281, upload-time = "2025-11-12T15:22:17.602Z" }, + { url = "https://files.pythonhosted.org/packages/b1/1a/64f5769025db846a82567fa5b7d21dba4558a7234ee631712ee4771c436c/torch-2.9.1-cp312-cp312-win_amd64.whl", hash = "sha256:81a285002d7b8cfd3fdf1b98aa8df138d41f1a8334fd9ea37511517cedf43083", size = 110940568, upload-time = "2025-11-12T15:21:18.689Z" }, + { url = "https://files.pythonhosted.org/packages/6e/ab/07739fd776618e5882661d04c43f5b5586323e2f6a2d7d84aac20d8f20bd/torch-2.9.1-cp312-none-macosx_11_0_arm64.whl", hash = "sha256:c0d25d1d8e531b8343bea0ed811d5d528958f1dcbd37e7245bc686273177ad7e", size = 74479191, upload-time = "2025-11-12T15:21:25.816Z" }, + { url = "https://files.pythonhosted.org/packages/20/60/8fc5e828d050bddfab469b3fe78e5ab9a7e53dda9c3bdc6a43d17ce99e63/torch-2.9.1-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:c29455d2b910b98738131990394da3e50eea8291dfeb4b12de71ecf1fdeb21cb", size = 104135743, upload-time = "2025-11-12T15:21:34.936Z" }, + { url = "https://files.pythonhosted.org/packages/f2/b7/6d3f80e6918213babddb2a37b46dbb14c15b14c5f473e347869a51f40e1f/torch-2.9.1-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:524de44cd13931208ba2c4bde9ec7741fd4ae6bfd06409a604fc32f6520c2bc9", size = 899749493, upload-time = "2025-11-12T15:24:36.356Z" }, + { url = "https://files.pythonhosted.org/packages/a6/47/c7843d69d6de8938c1cbb1eba426b1d48ddf375f101473d3e31a5fc52b74/torch-2.9.1-cp313-cp313-win_amd64.whl", hash = "sha256:545844cc16b3f91e08ce3b40e9c2d77012dd33a48d505aed34b7740ed627a1b2", size = 110944162, upload-time = "2025-11-12T15:21:53.151Z" }, + { url = "https://files.pythonhosted.org/packages/28/0e/2a37247957e72c12151b33a01e4df651d9d155dd74d8cfcbfad15a79b44a/torch-2.9.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5be4bf7496f1e3ffb1dd44b672adb1ac3f081f204c5ca81eba6442f5f634df8e", size = 74830751, upload-time = "2025-11-12T15:21:43.792Z" }, + { url = "https://files.pythonhosted.org/packages/4b/f7/7a18745edcd7b9ca2381aa03353647bca8aace91683c4975f19ac233809d/torch-2.9.1-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:30a3e170a84894f3652434b56d59a64a2c11366b0ed5776fab33c2439396bf9a", size = 104142929, upload-time = "2025-11-12T15:21:48.319Z" }, + { url = "https://files.pythonhosted.org/packages/f4/dd/f1c0d879f2863ef209e18823a988dc7a1bf40470750e3ebe927efdb9407f/torch-2.9.1-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:8301a7b431e51764629208d0edaa4f9e4c33e6df0f2f90b90e261d623df6a4e2", size = 899748978, upload-time = "2025-11-12T15:23:04.568Z" }, + { url = "https://files.pythonhosted.org/packages/1f/9f/6986b83a53b4d043e36f3f898b798ab51f7f20fdf1a9b01a2720f445043d/torch-2.9.1-cp313-cp313t-win_amd64.whl", hash = "sha256:2e1c42c0ae92bf803a4b2409fdfed85e30f9027a66887f5e7dcdbc014c7531db", size = 111176995, upload-time = "2025-11-12T15:22:01.618Z" }, + { url = "https://files.pythonhosted.org/packages/40/60/71c698b466dd01e65d0e9514b5405faae200c52a76901baf6906856f17e4/torch-2.9.1-cp313-none-macosx_11_0_arm64.whl", hash = "sha256:2c14b3da5df416cf9cb5efab83aa3056f5b8cd8620b8fde81b4987ecab730587", size = 74480347, upload-time = "2025-11-12T15:21:57.648Z" }, + { url = "https://files.pythonhosted.org/packages/48/50/c4b5112546d0d13cc9eaa1c732b823d676a9f49ae8b6f97772f795874a03/torch-2.9.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1edee27a7c9897f4e0b7c14cfc2f3008c571921134522d5b9b5ec4ebbc69041a", size = 74433245, upload-time = "2025-11-12T15:22:39.027Z" }, + { url = "https://files.pythonhosted.org/packages/81/c9/2628f408f0518b3bae49c95f5af3728b6ab498c8624ab1e03a43dd53d650/torch-2.9.1-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:19d144d6b3e29921f1fc70503e9f2fc572cde6a5115c0c0de2f7ca8b1483e8b6", size = 104134804, upload-time = "2025-11-12T15:22:35.222Z" }, + { url = "https://files.pythonhosted.org/packages/28/fc/5bc91d6d831ae41bf6e9e6da6468f25330522e92347c9156eb3f1cb95956/torch-2.9.1-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:c432d04376f6d9767a9852ea0def7b47a7bbc8e7af3b16ac9cf9ce02b12851c9", size = 899747132, upload-time = "2025-11-12T15:23:36.068Z" }, + { url = "https://files.pythonhosted.org/packages/63/5d/e8d4e009e52b6b2cf1684bde2a6be157b96fb873732542fb2a9a99e85a83/torch-2.9.1-cp314-cp314-win_amd64.whl", hash = "sha256:d187566a2cdc726fc80138c3cdb260970fab1c27e99f85452721f7759bbd554d", size = 110934845, upload-time = "2025-11-12T15:22:48.367Z" }, + { url = "https://files.pythonhosted.org/packages/bd/b2/2d15a52516b2ea3f414643b8de68fa4cb220d3877ac8b1028c83dc8ca1c4/torch-2.9.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:cb10896a1f7fedaddbccc2017ce6ca9ecaaf990f0973bdfcf405439750118d2c", size = 74823558, upload-time = "2025-11-12T15:22:43.392Z" }, + { url = "https://files.pythonhosted.org/packages/86/5c/5b2e5d84f5b9850cd1e71af07524d8cbb74cba19379800f1f9f7c997fc70/torch-2.9.1-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:0a2bd769944991c74acf0c4ef23603b9c777fdf7637f115605a4b2d8023110c7", size = 104145788, upload-time = "2025-11-12T15:23:52.109Z" }, + { url = "https://files.pythonhosted.org/packages/a9/8c/3da60787bcf70add986c4ad485993026ac0ca74f2fc21410bc4eb1bb7695/torch-2.9.1-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:07c8a9660bc9414c39cac530ac83b1fb1b679d7155824144a40a54f4a47bfa73", size = 899735500, upload-time = "2025-11-12T15:24:08.788Z" }, + { url = "https://files.pythonhosted.org/packages/db/2b/f7818f6ec88758dfd21da46b6cd46af9d1b3433e53ddbb19ad1e0da17f9b/torch-2.9.1-cp314-cp314t-win_amd64.whl", hash = "sha256:c88d3299ddeb2b35dcc31753305612db485ab6f1823e37fb29451c8b2732b87e", size = 111163659, upload-time = "2025-11-12T15:23:20.009Z" }, +] + +[[package]] +name = "tornado" +version = "6.5.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/37/1d/0a336abf618272d53f62ebe274f712e213f5a03c0b2339575430b8362ef2/tornado-6.5.4.tar.gz", hash = "sha256:a22fa9047405d03260b483980635f0b041989d8bcc9a313f8fe18b411d84b1d7", size = 513632, upload-time = "2025-12-15T19:21:03.836Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ab/a9/e94a9d5224107d7ce3cc1fab8d5dc97f5ea351ccc6322ee4fb661da94e35/tornado-6.5.4-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:d6241c1a16b1c9e4cc28148b1cda97dd1c6cb4fb7068ac1bedc610768dff0ba9", size = 443909, upload-time = "2025-12-15T19:20:48.382Z" }, + { url = "https://files.pythonhosted.org/packages/db/7e/f7b8d8c4453f305a51f80dbb49014257bb7d28ccb4bbb8dd328ea995ecad/tornado-6.5.4-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:2d50f63dda1d2cac3ae1fa23d254e16b5e38153758470e9956cbc3d813d40843", size = 442163, upload-time = "2025-12-15T19:20:49.791Z" }, + { url = "https://files.pythonhosted.org/packages/ba/b5/206f82d51e1bfa940ba366a8d2f83904b15942c45a78dd978b599870ab44/tornado-6.5.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d1cf66105dc6acb5af613c054955b8137e34a03698aa53272dbda4afe252be17", size = 445746, upload-time = "2025-12-15T19:20:51.491Z" }, + { url = "https://files.pythonhosted.org/packages/8e/9d/1a3338e0bd30ada6ad4356c13a0a6c35fbc859063fa7eddb309183364ac1/tornado-6.5.4-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:50ff0a58b0dc97939d29da29cd624da010e7f804746621c78d14b80238669335", size = 445083, upload-time = "2025-12-15T19:20:52.778Z" }, + { url = "https://files.pythonhosted.org/packages/50/d4/e51d52047e7eb9a582da59f32125d17c0482d065afd5d3bc435ff2120dc5/tornado-6.5.4-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5fb5e04efa54cf0baabdd10061eb4148e0be137166146fff835745f59ab9f7f", size = 445315, upload-time = "2025-12-15T19:20:53.996Z" }, + { url = "https://files.pythonhosted.org/packages/27/07/2273972f69ca63dbc139694a3fc4684edec3ea3f9efabf77ed32483b875c/tornado-6.5.4-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:9c86b1643b33a4cd415f8d0fe53045f913bf07b4a3ef646b735a6a86047dda84", size = 446003, upload-time = "2025-12-15T19:20:56.101Z" }, + { url = "https://files.pythonhosted.org/packages/d1/83/41c52e47502bf7260044413b6770d1a48dda2f0246f95ee1384a3cd9c44a/tornado-6.5.4-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:6eb82872335a53dd063a4f10917b3efd28270b56a33db69009606a0312660a6f", size = 445412, upload-time = "2025-12-15T19:20:57.398Z" }, + { url = "https://files.pythonhosted.org/packages/10/c7/bc96917f06cbee182d44735d4ecde9c432e25b84f4c2086143013e7b9e52/tornado-6.5.4-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:6076d5dda368c9328ff41ab5d9dd3608e695e8225d1cd0fd1e006f05da3635a8", size = 445392, upload-time = "2025-12-15T19:20:58.692Z" }, + { url = "https://files.pythonhosted.org/packages/0c/1a/d7592328d037d36f2d2462f4bc1fbb383eec9278bc786c1b111cbbd44cfa/tornado-6.5.4-cp39-abi3-win32.whl", hash = "sha256:1768110f2411d5cd281bac0a090f707223ce77fd110424361092859e089b38d1", size = 446481, upload-time = "2025-12-15T19:21:00.008Z" }, + { url = "https://files.pythonhosted.org/packages/d6/6d/c69be695a0a64fd37a97db12355a035a6d90f79067a3cf936ec2b1dc38cd/tornado-6.5.4-cp39-abi3-win_amd64.whl", hash = "sha256:fa07d31e0cd85c60713f2b995da613588aa03e1303d75705dca6af8babc18ddc", size = 446886, upload-time = "2025-12-15T19:21:01.287Z" }, + { url = "https://files.pythonhosted.org/packages/50/49/8dc3fd90902f70084bd2cd059d576ddb4f8bb44c2c7c0e33a11422acb17e/tornado-6.5.4-cp39-abi3-win_arm64.whl", hash = "sha256:053e6e16701eb6cbe641f308f4c1a9541f91b6261991160391bfc342e8a551a1", size = 445910, upload-time = "2025-12-15T19:21:02.571Z" }, +] + +[[package]] +name = "tqdm" +version = "4.67.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz", hash = "sha256:f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2", size = 169737, upload-time = "2024-11-24T20:12:22.481Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d0/30/dc54f88dd4a2b5dc8a0279bdd7270e735851848b762aeb1c1184ed1f6b14/tqdm-4.67.1-py3-none-any.whl", hash = "sha256:26445eca388f82e72884e0d580d5464cd801a3ea01e63e5601bdff9ba6a48de2", size = 78540, upload-time = "2024-11-24T20:12:19.698Z" }, +] + +[[package]] +name = "traitlets" +version = "5.14.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/eb/79/72064e6a701c2183016abbbfedaba506d81e30e232a68c9f0d6f6fcd1574/traitlets-5.14.3.tar.gz", hash = "sha256:9ed0579d3502c94b4b3732ac120375cda96f923114522847de4b3bb98b96b6b7", size = 161621, upload-time = "2024-04-19T11:11:49.746Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/00/c0/8f5d070730d7836adc9c9b6408dec68c6ced86b304a9b26a14df072a6e8c/traitlets-5.14.3-py3-none-any.whl", hash = "sha256:b74e89e397b1ed28cc831db7aea759ba6640cb3de13090ca145426688ff1ac4f", size = 85359, upload-time = "2024-04-19T11:11:46.763Z" }, +] + +[[package]] +name = "transformers" +version = "4.57.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "filelock" }, + { name = "huggingface-hub" }, + { name = "numpy" }, + { name = "packaging" }, + { name = "pyyaml" }, + { name = "regex" }, + { name = "requests" }, + { name = "safetensors" }, + { name = "tokenizers" }, + { name = "tqdm" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/dd/70/d42a739e8dfde3d92bb2fff5819cbf331fe9657323221e79415cd5eb65ee/transformers-4.57.3.tar.gz", hash = "sha256:df4945029aaddd7c09eec5cad851f30662f8bd1746721b34cc031d70c65afebc", size = 10139680, upload-time = "2025-11-25T15:51:30.139Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6a/6b/2f416568b3c4c91c96e5a365d164f8a4a4a88030aa8ab4644181fdadce97/transformers-4.57.3-py3-none-any.whl", hash = "sha256:c77d353a4851b1880191603d36acb313411d3577f6e2897814f333841f7003f4", size = 11993463, upload-time = "2025-11-25T15:51:26.493Z" }, +] + +[[package]] +name = "triton" +version = "3.5.1" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b0/72/ec90c3519eaf168f22cb1757ad412f3a2add4782ad3a92861c9ad135d886/triton-3.5.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:61413522a48add32302353fdbaaf92daaaab06f6b5e3229940d21b5207f47579", size = 170425802, upload-time = "2025-11-11T17:40:53.209Z" }, + { url = "https://files.pythonhosted.org/packages/f2/50/9a8358d3ef58162c0a415d173cfb45b67de60176e1024f71fbc4d24c0b6d/triton-3.5.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d2c6b915a03888ab931a9fd3e55ba36785e1fe70cbea0b40c6ef93b20fc85232", size = 170470207, upload-time = "2025-11-11T17:41:00.253Z" }, + { url = "https://files.pythonhosted.org/packages/27/46/8c3bbb5b0a19313f50edcaa363b599e5a1a5ac9683ead82b9b80fe497c8d/triton-3.5.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f3f4346b6ebbd4fad18773f5ba839114f4826037c9f2f34e0148894cd5dd3dba", size = 170470410, upload-time = "2025-11-11T17:41:06.319Z" }, + { url = "https://files.pythonhosted.org/packages/37/92/e97fcc6b2c27cdb87ce5ee063d77f8f26f19f06916aa680464c8104ef0f6/triton-3.5.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0b4d2c70127fca6a23e247f9348b8adde979d2e7a20391bfbabaac6aebc7e6a8", size = 170579924, upload-time = "2025-11-11T17:41:12.455Z" }, + { url = "https://files.pythonhosted.org/packages/a4/e6/c595c35e5c50c4bc56a7bac96493dad321e9e29b953b526bbbe20f9911d0/triton-3.5.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d0637b1efb1db599a8e9dc960d53ab6e4637db7d4ab6630a0974705d77b14b60", size = 170480488, upload-time = "2025-11-11T17:41:18.222Z" }, + { url = "https://files.pythonhosted.org/packages/16/b5/b0d3d8b901b6a04ca38df5e24c27e53afb15b93624d7fd7d658c7cd9352a/triton-3.5.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bac7f7d959ad0f48c0e97d6643a1cc0fd5786fe61cb1f83b537c6b2d54776478", size = 170582192, upload-time = "2025-11-11T17:41:23.963Z" }, +] + +[[package]] +name = "typing-extensions" +version = "4.15.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" }, +] + +[[package]] +name = "typing-inspect" +version = "0.9.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mypy-extensions" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/dc/74/1789779d91f1961fa9438e9a8710cdae6bd138c80d7303996933d117264a/typing_inspect-0.9.0.tar.gz", hash = "sha256:b23fc42ff6f6ef6954e4852c1fb512cdd18dbea03134f91f856a95ccc9461f78", size = 13825, upload-time = "2023-05-24T20:25:47.612Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/65/f3/107a22063bf27bdccf2024833d3445f4eea42b2e598abfbd46f6a63b6cb0/typing_inspect-0.9.0-py3-none-any.whl", hash = "sha256:9ee6fc59062311ef8547596ab6b955e1b8aa46242d854bfc78f4f6b0eff35f9f", size = 8827, upload-time = "2023-05-24T20:25:45.287Z" }, +] + +[[package]] +name = "typing-inspection" +version = "0.4.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464", size = 75949, upload-time = "2025-10-01T02:14:41.687Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" }, +] + +[[package]] +name = "tzdata" +version = "2025.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5e/a7/c202b344c5ca7daf398f3b8a477eeb205cf3b6f32e7ec3a6bac0629ca975/tzdata-2025.3.tar.gz", hash = "sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7", size = 196772, upload-time = "2025-12-13T17:45:35.667Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c7/b0/003792df09decd6849a5e39c28b513c06e84436a54440380862b5aeff25d/tzdata-2025.3-py2.py3-none-any.whl", hash = "sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1", size = 348521, upload-time = "2025-12-13T17:45:33.889Z" }, +] + +[[package]] +name = "unstructured" +version = "0.13.7" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "backoff" }, + { name = "beautifulsoup4" }, + { name = "chardet" }, + { name = "dataclasses-json" }, + { name = "emoji" }, + { name = "filetype" }, + { name = "langdetect" }, + { name = "lxml" }, + { name = "nltk" }, + { name = "numpy" }, + { name = "python-iso639" }, + { name = "python-magic" }, + { name = "rapidfuzz" }, + { name = "requests" }, + { name = "tabulate" }, + { name = "typing-extensions" }, + { name = "unstructured-client" }, + { name = "wrapt" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a1/e7/f3ff63814226e349a434dec7ede51f0e5af14eed325b3fd1c48be6fb8ff1/unstructured-0.13.7.tar.gz", hash = "sha256:5d59161d353b7006d8c6ee6f1a39154a5a11a5aaa258aac3fe90a8d44016aa6c", size = 1714285, upload-time = "2024-05-08T18:36:49.562Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f5/48/9bdd8aff34c507750a347545bcf26c025b1335c021ac0b9af5a542a8acd5/unstructured-0.13.7-py3-none-any.whl", hash = "sha256:a3d8f3037cb3063661531c6ecc04aca6df93c293ba06e36d67ffc70857a6f208", size = 1915733, upload-time = "2024-05-08T18:36:45.4Z" }, +] + +[[package]] +name = "unstructured-client" +version = "0.42.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiofiles" }, + { name = "cryptography" }, + { name = "httpcore" }, + { name = "httpx" }, + { name = "pydantic" }, + { name = "pypdf" }, + { name = "requests-toolbelt" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ff/fe/c6d334d4fb9a4a006125a1a8a3918be643c268290707d48e9cd060b71f7f/unstructured_client-0.42.6.tar.gz", hash = "sha256:ea54f2c4ca3e7a1330f9e77cbc96f88f829518beeec5e1b797b5352f4d76a73a", size = 94179, upload-time = "2025-12-17T03:49:58.38Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5e/12/5aa5d051b32d0c09077a8e83920e794b9bf2315739add4ab821e71fbca58/unstructured_client-0.42.6-py3-none-any.whl", hash = "sha256:c93b1d9d1b9f63a8e961729d00224b3659ef9ef3e14996ea4e53ddc95df671a9", size = 219563, upload-time = "2025-12-17T03:49:56.993Z" }, +] + +[[package]] +name = "urllib3" +version = "2.6.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/1e/24/a2a2ed9addd907787d7aa0355ba36a6cadf1768b934c652ea78acbd59dcd/urllib3-2.6.2.tar.gz", hash = "sha256:016f9c98bb7e98085cb2b4b17b87d2c702975664e4f060c6532e64d1c1a5e797", size = 432930, upload-time = "2025-12-11T15:56:40.252Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6d/b9/4095b668ea3678bf6a0af005527f39de12fb026516fb3df17495a733b7f8/urllib3-2.6.2-py3-none-any.whl", hash = "sha256:ec21cddfe7724fc7cb4ba4bea7aa8e2ef36f607a4bab81aa6ce42a13dc3f03dd", size = 131182, upload-time = "2025-12-11T15:56:38.584Z" }, +] + +[[package]] +name = "uvicorn" +version = "0.38.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "h11" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/cb/ce/f06b84e2697fef4688ca63bdb2fdf113ca0a3be33f94488f2cadb690b0cf/uvicorn-0.38.0.tar.gz", hash = "sha256:fd97093bdd120a2609fc0d3afe931d4d4ad688b6e75f0f929fde1bc36fe0e91d", size = 80605, upload-time = "2025-10-18T13:46:44.63Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ee/d9/d88e73ca598f4f6ff671fb5fde8a32925c2e08a637303a1d12883c7305fa/uvicorn-0.38.0-py3-none-any.whl", hash = "sha256:48c0afd214ceb59340075b4a052ea1ee91c16fbc2a9b1469cca0e54566977b02", size = 68109, upload-time = "2025-10-18T13:46:42.958Z" }, +] + +[[package]] +name = "virtualenv" +version = "20.35.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "distlib" }, + { name = "filelock" }, + { name = "platformdirs" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/20/28/e6f1a6f655d620846bd9df527390ecc26b3805a0c5989048c210e22c5ca9/virtualenv-20.35.4.tar.gz", hash = "sha256:643d3914d73d3eeb0c552cbb12d7e82adf0e504dbf86a3182f8771a153a1971c", size = 6028799, upload-time = "2025-10-29T06:57:40.511Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/79/0c/c05523fa3181fdf0c9c52a6ba91a23fbf3246cc095f26f6516f9c60e6771/virtualenv-20.35.4-py3-none-any.whl", hash = "sha256:c21c9cede36c9753eeade68ba7d523529f228a403463376cf821eaae2b650f1b", size = 6005095, upload-time = "2025-10-29T06:57:37.598Z" }, +] + +[[package]] +name = "wcwidth" +version = "0.2.14" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/24/30/6b0809f4510673dc723187aeaf24c7f5459922d01e2f794277a3dfb90345/wcwidth-0.2.14.tar.gz", hash = "sha256:4d478375d31bc5395a3c55c40ccdf3354688364cd61c4f6adacaa9215d0b3605", size = 102293, upload-time = "2025-09-22T16:29:53.023Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/af/b5/123f13c975e9f27ab9c0770f514345bd406d0e8d3b7a0723af9d43f710af/wcwidth-0.2.14-py2.py3-none-any.whl", hash = "sha256:a7bb560c8aee30f9957e5f9895805edd20602f2d7f720186dfd906e82b4982e1", size = 37286, upload-time = "2025-09-22T16:29:51.641Z" }, +] + +[[package]] +name = "webencodings" +version = "0.5.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923", size = 9721, upload-time = "2017-04-05T20:21:34.189Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f4/24/2a3e3df732393fed8b3ebf2ec078f05546de641fe1b667ee316ec1dcf3b7/webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78", size = 11774, upload-time = "2017-04-05T20:21:32.581Z" }, +] + +[[package]] +name = "websockets" +version = "15.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz", hash = "sha256:82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee", size = 177016, upload-time = "2025-03-05T20:03:41.606Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9f/32/18fcd5919c293a398db67443acd33fde142f283853076049824fc58e6f75/websockets-15.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:823c248b690b2fd9303ba00c4f66cd5e2d8c3ba4aa968b2779be9532a4dad431", size = 175423, upload-time = "2025-03-05T20:01:56.276Z" }, + { url = "https://files.pythonhosted.org/packages/76/70/ba1ad96b07869275ef42e2ce21f07a5b0148936688c2baf7e4a1f60d5058/websockets-15.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678999709e68425ae2593acf2e3ebcbcf2e69885a5ee78f9eb80e6e371f1bf57", size = 173082, upload-time = "2025-03-05T20:01:57.563Z" }, + { url = "https://files.pythonhosted.org/packages/86/f2/10b55821dd40eb696ce4704a87d57774696f9451108cff0d2824c97e0f97/websockets-15.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d50fd1ee42388dcfb2b3676132c78116490976f1300da28eb629272d5d93e905", size = 173330, upload-time = "2025-03-05T20:01:59.063Z" }, + { url = "https://files.pythonhosted.org/packages/a5/90/1c37ae8b8a113d3daf1065222b6af61cc44102da95388ac0018fcb7d93d9/websockets-15.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d99e5546bf73dbad5bf3547174cd6cb8ba7273062a23808ffea025ecb1cf8562", size = 182878, upload-time = "2025-03-05T20:02:00.305Z" }, + { url = "https://files.pythonhosted.org/packages/8e/8d/96e8e288b2a41dffafb78e8904ea7367ee4f891dafc2ab8d87e2124cb3d3/websockets-15.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66dd88c918e3287efc22409d426c8f729688d89a0c587c88971a0faa2c2f3792", size = 181883, upload-time = "2025-03-05T20:02:03.148Z" }, + { url = "https://files.pythonhosted.org/packages/93/1f/5d6dbf551766308f6f50f8baf8e9860be6182911e8106da7a7f73785f4c4/websockets-15.0.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8dd8327c795b3e3f219760fa603dcae1dcc148172290a8ab15158cf85a953413", size = 182252, upload-time = "2025-03-05T20:02:05.29Z" }, + { url = "https://files.pythonhosted.org/packages/d4/78/2d4fed9123e6620cbf1706c0de8a1632e1a28e7774d94346d7de1bba2ca3/websockets-15.0.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8fdc51055e6ff4adeb88d58a11042ec9a5eae317a0a53d12c062c8a8865909e8", size = 182521, upload-time = "2025-03-05T20:02:07.458Z" }, + { url = "https://files.pythonhosted.org/packages/e7/3b/66d4c1b444dd1a9823c4a81f50231b921bab54eee2f69e70319b4e21f1ca/websockets-15.0.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:693f0192126df6c2327cce3baa7c06f2a117575e32ab2308f7f8216c29d9e2e3", size = 181958, upload-time = "2025-03-05T20:02:09.842Z" }, + { url = "https://files.pythonhosted.org/packages/08/ff/e9eed2ee5fed6f76fdd6032ca5cd38c57ca9661430bb3d5fb2872dc8703c/websockets-15.0.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:54479983bd5fb469c38f2f5c7e3a24f9a4e70594cd68cd1fa6b9340dadaff7cf", size = 181918, upload-time = "2025-03-05T20:02:11.968Z" }, + { url = "https://files.pythonhosted.org/packages/d8/75/994634a49b7e12532be6a42103597b71098fd25900f7437d6055ed39930a/websockets-15.0.1-cp311-cp311-win32.whl", hash = "sha256:16b6c1b3e57799b9d38427dda63edcbe4926352c47cf88588c0be4ace18dac85", size = 176388, upload-time = "2025-03-05T20:02:13.32Z" }, + { url = "https://files.pythonhosted.org/packages/98/93/e36c73f78400a65f5e236cd376713c34182e6663f6889cd45a4a04d8f203/websockets-15.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:27ccee0071a0e75d22cb35849b1db43f2ecd3e161041ac1ee9d2352ddf72f065", size = 176828, upload-time = "2025-03-05T20:02:14.585Z" }, + { url = "https://files.pythonhosted.org/packages/51/6b/4545a0d843594f5d0771e86463606a3988b5a09ca5123136f8a76580dd63/websockets-15.0.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:3e90baa811a5d73f3ca0bcbf32064d663ed81318ab225ee4f427ad4e26e5aff3", size = 175437, upload-time = "2025-03-05T20:02:16.706Z" }, + { url = "https://files.pythonhosted.org/packages/f4/71/809a0f5f6a06522af902e0f2ea2757f71ead94610010cf570ab5c98e99ed/websockets-15.0.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:592f1a9fe869c778694f0aa806ba0374e97648ab57936f092fd9d87f8bc03665", size = 173096, upload-time = "2025-03-05T20:02:18.832Z" }, + { url = "https://files.pythonhosted.org/packages/3d/69/1a681dd6f02180916f116894181eab8b2e25b31e484c5d0eae637ec01f7c/websockets-15.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0701bc3cfcb9164d04a14b149fd74be7347a530ad3bbf15ab2c678a2cd3dd9a2", size = 173332, upload-time = "2025-03-05T20:02:20.187Z" }, + { url = "https://files.pythonhosted.org/packages/a6/02/0073b3952f5bce97eafbb35757f8d0d54812b6174ed8dd952aa08429bcc3/websockets-15.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8b56bdcdb4505c8078cb6c7157d9811a85790f2f2b3632c7d1462ab5783d215", size = 183152, upload-time = "2025-03-05T20:02:22.286Z" }, + { url = "https://files.pythonhosted.org/packages/74/45/c205c8480eafd114b428284840da0b1be9ffd0e4f87338dc95dc6ff961a1/websockets-15.0.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0af68c55afbd5f07986df82831c7bff04846928ea8d1fd7f30052638788bc9b5", size = 182096, upload-time = "2025-03-05T20:02:24.368Z" }, + { url = "https://files.pythonhosted.org/packages/14/8f/aa61f528fba38578ec553c145857a181384c72b98156f858ca5c8e82d9d3/websockets-15.0.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64dee438fed052b52e4f98f76c5790513235efaa1ef7f3f2192c392cd7c91b65", size = 182523, upload-time = "2025-03-05T20:02:25.669Z" }, + { url = "https://files.pythonhosted.org/packages/ec/6d/0267396610add5bc0d0d3e77f546d4cd287200804fe02323797de77dbce9/websockets-15.0.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d5f6b181bb38171a8ad1d6aa58a67a6aa9d4b38d0f8c5f496b9e42561dfc62fe", size = 182790, upload-time = "2025-03-05T20:02:26.99Z" }, + { url = "https://files.pythonhosted.org/packages/02/05/c68c5adbf679cf610ae2f74a9b871ae84564462955d991178f95a1ddb7dd/websockets-15.0.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:5d54b09eba2bada6011aea5375542a157637b91029687eb4fdb2dab11059c1b4", size = 182165, upload-time = "2025-03-05T20:02:30.291Z" }, + { url = "https://files.pythonhosted.org/packages/29/93/bb672df7b2f5faac89761cb5fa34f5cec45a4026c383a4b5761c6cea5c16/websockets-15.0.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3be571a8b5afed347da347bfcf27ba12b069d9d7f42cb8c7028b5e98bbb12597", size = 182160, upload-time = "2025-03-05T20:02:31.634Z" }, + { url = "https://files.pythonhosted.org/packages/ff/83/de1f7709376dc3ca9b7eeb4b9a07b4526b14876b6d372a4dc62312bebee0/websockets-15.0.1-cp312-cp312-win32.whl", hash = "sha256:c338ffa0520bdb12fbc527265235639fb76e7bc7faafbb93f6ba80d9c06578a9", size = 176395, upload-time = "2025-03-05T20:02:33.017Z" }, + { url = "https://files.pythonhosted.org/packages/7d/71/abf2ebc3bbfa40f391ce1428c7168fb20582d0ff57019b69ea20fa698043/websockets-15.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:fcd5cf9e305d7b8338754470cf69cf81f420459dbae8a3b40cee57417f4614a7", size = 176841, upload-time = "2025-03-05T20:02:34.498Z" }, + { url = "https://files.pythonhosted.org/packages/cb/9f/51f0cf64471a9d2b4d0fc6c534f323b664e7095640c34562f5182e5a7195/websockets-15.0.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ee443ef070bb3b6ed74514f5efaa37a252af57c90eb33b956d35c8e9c10a1931", size = 175440, upload-time = "2025-03-05T20:02:36.695Z" }, + { url = "https://files.pythonhosted.org/packages/8a/05/aa116ec9943c718905997412c5989f7ed671bc0188ee2ba89520e8765d7b/websockets-15.0.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5a939de6b7b4e18ca683218320fc67ea886038265fd1ed30173f5ce3f8e85675", size = 173098, upload-time = "2025-03-05T20:02:37.985Z" }, + { url = "https://files.pythonhosted.org/packages/ff/0b/33cef55ff24f2d92924923c99926dcce78e7bd922d649467f0eda8368923/websockets-15.0.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:746ee8dba912cd6fc889a8147168991d50ed70447bf18bcda7039f7d2e3d9151", size = 173329, upload-time = "2025-03-05T20:02:39.298Z" }, + { url = "https://files.pythonhosted.org/packages/31/1d/063b25dcc01faa8fada1469bdf769de3768b7044eac9d41f734fd7b6ad6d/websockets-15.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:595b6c3969023ecf9041b2936ac3827e4623bfa3ccf007575f04c5a6aa318c22", size = 183111, upload-time = "2025-03-05T20:02:40.595Z" }, + { url = "https://files.pythonhosted.org/packages/93/53/9a87ee494a51bf63e4ec9241c1ccc4f7c2f45fff85d5bde2ff74fcb68b9e/websockets-15.0.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c714d2fc58b5ca3e285461a4cc0c9a66bd0e24c5da9911e30158286c9b5be7f", size = 182054, upload-time = "2025-03-05T20:02:41.926Z" }, + { url = "https://files.pythonhosted.org/packages/ff/b2/83a6ddf56cdcbad4e3d841fcc55d6ba7d19aeb89c50f24dd7e859ec0805f/websockets-15.0.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f3c1e2ab208db911594ae5b4f79addeb3501604a165019dd221c0bdcabe4db8", size = 182496, upload-time = "2025-03-05T20:02:43.304Z" }, + { url = "https://files.pythonhosted.org/packages/98/41/e7038944ed0abf34c45aa4635ba28136f06052e08fc2168520bb8b25149f/websockets-15.0.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:229cf1d3ca6c1804400b0a9790dc66528e08a6a1feec0d5040e8b9eb14422375", size = 182829, upload-time = "2025-03-05T20:02:48.812Z" }, + { url = "https://files.pythonhosted.org/packages/e0/17/de15b6158680c7623c6ef0db361da965ab25d813ae54fcfeae2e5b9ef910/websockets-15.0.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:756c56e867a90fb00177d530dca4b097dd753cde348448a1012ed6c5131f8b7d", size = 182217, upload-time = "2025-03-05T20:02:50.14Z" }, + { url = "https://files.pythonhosted.org/packages/33/2b/1f168cb6041853eef0362fb9554c3824367c5560cbdaad89ac40f8c2edfc/websockets-15.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:558d023b3df0bffe50a04e710bc87742de35060580a293c2a984299ed83bc4e4", size = 182195, upload-time = "2025-03-05T20:02:51.561Z" }, + { url = "https://files.pythonhosted.org/packages/86/eb/20b6cdf273913d0ad05a6a14aed4b9a85591c18a987a3d47f20fa13dcc47/websockets-15.0.1-cp313-cp313-win32.whl", hash = "sha256:ba9e56e8ceeeedb2e080147ba85ffcd5cd0711b89576b83784d8605a7df455fa", size = 176393, upload-time = "2025-03-05T20:02:53.814Z" }, + { url = "https://files.pythonhosted.org/packages/1b/6c/c65773d6cab416a64d191d6ee8a8b1c68a09970ea6909d16965d26bfed1e/websockets-15.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:e09473f095a819042ecb2ab9465aee615bd9c2028e4ef7d933600a8401c79561", size = 176837, upload-time = "2025-03-05T20:02:55.237Z" }, + { url = "https://files.pythonhosted.org/packages/fa/a8/5b41e0da817d64113292ab1f8247140aac61cbf6cfd085d6a0fa77f4984f/websockets-15.0.1-py3-none-any.whl", hash = "sha256:f7a866fbc1e97b5c617ee4116daaa09b722101d4a3c170c787450ba409f9736f", size = 169743, upload-time = "2025-03-05T20:03:39.41Z" }, +] + +[[package]] +name = "werkzeug" +version = "3.1.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/45/ea/b0f8eeb287f8df9066e56e831c7824ac6bab645dd6c7a8f4b2d767944f9b/werkzeug-3.1.4.tar.gz", hash = "sha256:cd3cd98b1b92dc3b7b3995038826c68097dcb16f9baa63abe35f20eafeb9fe5e", size = 864687, upload-time = "2025-11-29T02:15:22.841Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2f/f9/9e082990c2585c744734f85bec79b5dae5df9c974ffee58fe421652c8e91/werkzeug-3.1.4-py3-none-any.whl", hash = "sha256:2ad50fb9ed09cc3af22c54698351027ace879a0b60a3b5edf5730b2f7d876905", size = 224960, upload-time = "2025-11-29T02:15:21.13Z" }, +] + +[[package]] +name = "wrapt" +version = "2.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/49/2a/6de8a50cb435b7f42c46126cf1a54b2aab81784e74c8595c8e025e8f36d3/wrapt-2.0.1.tar.gz", hash = "sha256:9c9c635e78497cacb81e84f8b11b23e0aacac7a136e73b8e5b2109a1d9fc468f", size = 82040, upload-time = "2025-11-07T00:45:33.312Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/98/60/553997acf3939079dab022e37b67b1904b5b0cc235503226898ba573b10c/wrapt-2.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0e17283f533a0d24d6e5429a7d11f250a58d28b4ae5186f8f47853e3e70d2590", size = 77480, upload-time = "2025-11-07T00:43:30.573Z" }, + { url = "https://files.pythonhosted.org/packages/2d/50/e5b3d30895d77c52105c6d5cbf94d5b38e2a3dd4a53d22d246670da98f7c/wrapt-2.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:85df8d92158cb8f3965aecc27cf821461bb5f40b450b03facc5d9f0d4d6ddec6", size = 60690, upload-time = "2025-11-07T00:43:31.594Z" }, + { url = "https://files.pythonhosted.org/packages/f0/40/660b2898703e5cbbb43db10cdefcc294274458c3ca4c68637c2b99371507/wrapt-2.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c1be685ac7700c966b8610ccc63c3187a72e33cab53526a27b2a285a662cd4f7", size = 61578, upload-time = "2025-11-07T00:43:32.918Z" }, + { url = "https://files.pythonhosted.org/packages/5b/36/825b44c8a10556957bc0c1d84c7b29a40e05fcf1873b6c40aa9dbe0bd972/wrapt-2.0.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:df0b6d3b95932809c5b3fecc18fda0f1e07452d05e2662a0b35548985f256e28", size = 114115, upload-time = "2025-11-07T00:43:35.605Z" }, + { url = "https://files.pythonhosted.org/packages/83/73/0a5d14bb1599677304d3c613a55457d34c344e9b60eda8a737c2ead7619e/wrapt-2.0.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4da7384b0e5d4cae05c97cd6f94faaf78cc8b0f791fc63af43436d98c4ab37bb", size = 116157, upload-time = "2025-11-07T00:43:37.058Z" }, + { url = "https://files.pythonhosted.org/packages/01/22/1c158fe763dbf0a119f985d945711d288994fe5514c0646ebe0eb18b016d/wrapt-2.0.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ec65a78fbd9d6f083a15d7613b2800d5663dbb6bb96003899c834beaa68b242c", size = 112535, upload-time = "2025-11-07T00:43:34.138Z" }, + { url = "https://files.pythonhosted.org/packages/5c/28/4f16861af67d6de4eae9927799b559c20ebdd4fe432e89ea7fe6fcd9d709/wrapt-2.0.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7de3cc939be0e1174969f943f3b44e0d79b6f9a82198133a5b7fc6cc92882f16", size = 115404, upload-time = "2025-11-07T00:43:39.214Z" }, + { url = "https://files.pythonhosted.org/packages/a0/8b/7960122e625fad908f189b59c4aae2d50916eb4098b0fb2819c5a177414f/wrapt-2.0.1-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:fb1a5b72cbd751813adc02ef01ada0b0d05d3dcbc32976ce189a1279d80ad4a2", size = 111802, upload-time = "2025-11-07T00:43:40.476Z" }, + { url = "https://files.pythonhosted.org/packages/3e/73/7881eee5ac31132a713ab19a22c9e5f1f7365c8b1df50abba5d45b781312/wrapt-2.0.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3fa272ca34332581e00bf7773e993d4f632594eb2d1b0b162a9038df0fd971dd", size = 113837, upload-time = "2025-11-07T00:43:42.921Z" }, + { url = "https://files.pythonhosted.org/packages/45/00/9499a3d14e636d1f7089339f96c4409bbc7544d0889f12264efa25502ae8/wrapt-2.0.1-cp311-cp311-win32.whl", hash = "sha256:fc007fdf480c77301ab1afdbb6ab22a5deee8885f3b1ed7afcb7e5e84a0e27be", size = 58028, upload-time = "2025-11-07T00:43:47.369Z" }, + { url = "https://files.pythonhosted.org/packages/70/5d/8f3d7eea52f22638748f74b102e38fdf88cb57d08ddeb7827c476a20b01b/wrapt-2.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:47434236c396d04875180171ee1f3815ca1eada05e24a1ee99546320d54d1d1b", size = 60385, upload-time = "2025-11-07T00:43:44.34Z" }, + { url = "https://files.pythonhosted.org/packages/14/e2/32195e57a8209003587bbbad44d5922f13e0ced2a493bb46ca882c5b123d/wrapt-2.0.1-cp311-cp311-win_arm64.whl", hash = "sha256:837e31620e06b16030b1d126ed78e9383815cbac914693f54926d816d35d8edf", size = 58893, upload-time = "2025-11-07T00:43:46.161Z" }, + { url = "https://files.pythonhosted.org/packages/cb/73/8cb252858dc8254baa0ce58ce382858e3a1cf616acebc497cb13374c95c6/wrapt-2.0.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1fdbb34da15450f2b1d735a0e969c24bdb8d8924892380126e2a293d9902078c", size = 78129, upload-time = "2025-11-07T00:43:48.852Z" }, + { url = "https://files.pythonhosted.org/packages/19/42/44a0db2108526ee6e17a5ab72478061158f34b08b793df251d9fbb9a7eb4/wrapt-2.0.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3d32794fe940b7000f0519904e247f902f0149edbe6316c710a8562fb6738841", size = 61205, upload-time = "2025-11-07T00:43:50.402Z" }, + { url = "https://files.pythonhosted.org/packages/4d/8a/5b4b1e44b791c22046e90d9b175f9a7581a8cc7a0debbb930f81e6ae8e25/wrapt-2.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:386fb54d9cd903ee0012c09291336469eb7b244f7183d40dc3e86a16a4bace62", size = 61692, upload-time = "2025-11-07T00:43:51.678Z" }, + { url = "https://files.pythonhosted.org/packages/11/53/3e794346c39f462bcf1f58ac0487ff9bdad02f9b6d5ee2dc84c72e0243b2/wrapt-2.0.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:7b219cb2182f230676308cdcacd428fa837987b89e4b7c5c9025088b8a6c9faf", size = 121492, upload-time = "2025-11-07T00:43:55.017Z" }, + { url = "https://files.pythonhosted.org/packages/c6/7e/10b7b0e8841e684c8ca76b462a9091c45d62e8f2de9c4b1390b690eadf16/wrapt-2.0.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:641e94e789b5f6b4822bb8d8ebbdfc10f4e4eae7756d648b717d980f657a9eb9", size = 123064, upload-time = "2025-11-07T00:43:56.323Z" }, + { url = "https://files.pythonhosted.org/packages/0e/d1/3c1e4321fc2f5ee7fd866b2d822aa89b84495f28676fd976c47327c5b6aa/wrapt-2.0.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:fe21b118b9f58859b5ebaa4b130dee18669df4bd111daad082b7beb8799ad16b", size = 117403, upload-time = "2025-11-07T00:43:53.258Z" }, + { url = "https://files.pythonhosted.org/packages/a4/b0/d2f0a413cf201c8c2466de08414a15420a25aa83f53e647b7255cc2fab5d/wrapt-2.0.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:17fb85fa4abc26a5184d93b3efd2dcc14deb4b09edcdb3535a536ad34f0b4dba", size = 121500, upload-time = "2025-11-07T00:43:57.468Z" }, + { url = "https://files.pythonhosted.org/packages/bd/45/bddb11d28ca39970a41ed48a26d210505120f925918592283369219f83cc/wrapt-2.0.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:b89ef9223d665ab255ae42cc282d27d69704d94be0deffc8b9d919179a609684", size = 116299, upload-time = "2025-11-07T00:43:58.877Z" }, + { url = "https://files.pythonhosted.org/packages/81/af/34ba6dd570ef7a534e7eec0c25e2615c355602c52aba59413411c025a0cb/wrapt-2.0.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a453257f19c31b31ba593c30d997d6e5be39e3b5ad9148c2af5a7314061c63eb", size = 120622, upload-time = "2025-11-07T00:43:59.962Z" }, + { url = "https://files.pythonhosted.org/packages/e2/3e/693a13b4146646fb03254636f8bafd20c621955d27d65b15de07ab886187/wrapt-2.0.1-cp312-cp312-win32.whl", hash = "sha256:3e271346f01e9c8b1130a6a3b0e11908049fe5be2d365a5f402778049147e7e9", size = 58246, upload-time = "2025-11-07T00:44:03.169Z" }, + { url = "https://files.pythonhosted.org/packages/a7/36/715ec5076f925a6be95f37917b66ebbeaa1372d1862c2ccd7a751574b068/wrapt-2.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:2da620b31a90cdefa9cd0c2b661882329e2e19d1d7b9b920189956b76c564d75", size = 60492, upload-time = "2025-11-07T00:44:01.027Z" }, + { url = "https://files.pythonhosted.org/packages/ef/3e/62451cd7d80f65cc125f2b426b25fbb6c514bf6f7011a0c3904fc8c8df90/wrapt-2.0.1-cp312-cp312-win_arm64.whl", hash = "sha256:aea9c7224c302bc8bfc892b908537f56c430802560e827b75ecbde81b604598b", size = 58987, upload-time = "2025-11-07T00:44:02.095Z" }, + { url = "https://files.pythonhosted.org/packages/ad/fe/41af4c46b5e498c90fc87981ab2972fbd9f0bccda597adb99d3d3441b94b/wrapt-2.0.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:47b0f8bafe90f7736151f61482c583c86b0693d80f075a58701dd1549b0010a9", size = 78132, upload-time = "2025-11-07T00:44:04.628Z" }, + { url = "https://files.pythonhosted.org/packages/1c/92/d68895a984a5ebbbfb175512b0c0aad872354a4a2484fbd5552e9f275316/wrapt-2.0.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:cbeb0971e13b4bd81d34169ed57a6dda017328d1a22b62fda45e1d21dd06148f", size = 61211, upload-time = "2025-11-07T00:44:05.626Z" }, + { url = "https://files.pythonhosted.org/packages/e8/26/ba83dc5ae7cf5aa2b02364a3d9cf74374b86169906a1f3ade9a2d03cf21c/wrapt-2.0.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:eb7cffe572ad0a141a7886a1d2efa5bef0bf7fe021deeea76b3ab334d2c38218", size = 61689, upload-time = "2025-11-07T00:44:06.719Z" }, + { url = "https://files.pythonhosted.org/packages/cf/67/d7a7c276d874e5d26738c22444d466a3a64ed541f6ef35f740dbd865bab4/wrapt-2.0.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:c8d60527d1ecfc131426b10d93ab5d53e08a09c5fa0175f6b21b3252080c70a9", size = 121502, upload-time = "2025-11-07T00:44:09.557Z" }, + { url = "https://files.pythonhosted.org/packages/0f/6b/806dbf6dd9579556aab22fc92908a876636e250f063f71548a8660382184/wrapt-2.0.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c654eafb01afac55246053d67a4b9a984a3567c3808bb7df2f8de1c1caba2e1c", size = 123110, upload-time = "2025-11-07T00:44:10.64Z" }, + { url = "https://files.pythonhosted.org/packages/e5/08/cdbb965fbe4c02c5233d185d070cabed2ecc1f1e47662854f95d77613f57/wrapt-2.0.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:98d873ed6c8b4ee2418f7afce666751854d6d03e3c0ec2a399bb039cd2ae89db", size = 117434, upload-time = "2025-11-07T00:44:08.138Z" }, + { url = "https://files.pythonhosted.org/packages/2d/d1/6aae2ce39db4cb5216302fa2e9577ad74424dfbe315bd6669725569e048c/wrapt-2.0.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c9e850f5b7fc67af856ff054c71690d54fa940c3ef74209ad9f935b4f66a0233", size = 121533, upload-time = "2025-11-07T00:44:12.142Z" }, + { url = "https://files.pythonhosted.org/packages/79/35/565abf57559fbe0a9155c29879ff43ce8bd28d2ca61033a3a3dd67b70794/wrapt-2.0.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:e505629359cb5f751e16e30cf3f91a1d3ddb4552480c205947da415d597f7ac2", size = 116324, upload-time = "2025-11-07T00:44:13.28Z" }, + { url = "https://files.pythonhosted.org/packages/e1/e0/53ff5e76587822ee33e560ad55876d858e384158272cd9947abdd4ad42ca/wrapt-2.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:2879af909312d0baf35f08edeea918ee3af7ab57c37fe47cb6a373c9f2749c7b", size = 120627, upload-time = "2025-11-07T00:44:14.431Z" }, + { url = "https://files.pythonhosted.org/packages/7c/7b/38df30fd629fbd7612c407643c63e80e1c60bcc982e30ceeae163a9800e7/wrapt-2.0.1-cp313-cp313-win32.whl", hash = "sha256:d67956c676be5a24102c7407a71f4126d30de2a569a1c7871c9f3cabc94225d7", size = 58252, upload-time = "2025-11-07T00:44:17.814Z" }, + { url = "https://files.pythonhosted.org/packages/85/64/d3954e836ea67c4d3ad5285e5c8fd9d362fd0a189a2db622df457b0f4f6a/wrapt-2.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:9ca66b38dd642bf90c59b6738af8070747b610115a39af2498535f62b5cdc1c3", size = 60500, upload-time = "2025-11-07T00:44:15.561Z" }, + { url = "https://files.pythonhosted.org/packages/89/4e/3c8b99ac93527cfab7f116089db120fef16aac96e5f6cdb724ddf286086d/wrapt-2.0.1-cp313-cp313-win_arm64.whl", hash = "sha256:5a4939eae35db6b6cec8e7aa0e833dcca0acad8231672c26c2a9ab7a0f8ac9c8", size = 58993, upload-time = "2025-11-07T00:44:16.65Z" }, + { url = "https://files.pythonhosted.org/packages/f9/f4/eff2b7d711cae20d220780b9300faa05558660afb93f2ff5db61fe725b9a/wrapt-2.0.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:a52f93d95c8d38fed0669da2ebdb0b0376e895d84596a976c15a9eb45e3eccb3", size = 82028, upload-time = "2025-11-07T00:44:18.944Z" }, + { url = "https://files.pythonhosted.org/packages/0c/67/cb945563f66fd0f61a999339460d950f4735c69f18f0a87ca586319b1778/wrapt-2.0.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:4e54bbf554ee29fcceee24fa41c4d091398b911da6e7f5d7bffda963c9aed2e1", size = 62949, upload-time = "2025-11-07T00:44:20.074Z" }, + { url = "https://files.pythonhosted.org/packages/ec/ca/f63e177f0bbe1e5cf5e8d9b74a286537cd709724384ff20860f8f6065904/wrapt-2.0.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:908f8c6c71557f4deaa280f55d0728c3bca0960e8c3dd5ceeeafb3c19942719d", size = 63681, upload-time = "2025-11-07T00:44:21.345Z" }, + { url = "https://files.pythonhosted.org/packages/39/a1/1b88fcd21fd835dca48b556daef750952e917a2794fa20c025489e2e1f0f/wrapt-2.0.1-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:e2f84e9af2060e3904a32cea9bb6db23ce3f91cfd90c6b426757cf7cc01c45c7", size = 152696, upload-time = "2025-11-07T00:44:24.318Z" }, + { url = "https://files.pythonhosted.org/packages/62/1c/d9185500c1960d9f5f77b9c0b890b7fc62282b53af7ad1b6bd779157f714/wrapt-2.0.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e3612dc06b436968dfb9142c62e5dfa9eb5924f91120b3c8ff501ad878f90eb3", size = 158859, upload-time = "2025-11-07T00:44:25.494Z" }, + { url = "https://files.pythonhosted.org/packages/91/60/5d796ed0f481ec003220c7878a1d6894652efe089853a208ea0838c13086/wrapt-2.0.1-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6d2d947d266d99a1477cd005b23cbd09465276e302515e122df56bb9511aca1b", size = 146068, upload-time = "2025-11-07T00:44:22.81Z" }, + { url = "https://files.pythonhosted.org/packages/04/f8/75282dd72f102ddbfba137e1e15ecba47b40acff32c08ae97edbf53f469e/wrapt-2.0.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:7d539241e87b650cbc4c3ac9f32c8d1ac8a54e510f6dca3f6ab60dcfd48c9b10", size = 155724, upload-time = "2025-11-07T00:44:26.634Z" }, + { url = "https://files.pythonhosted.org/packages/5a/27/fe39c51d1b344caebb4a6a9372157bdb8d25b194b3561b52c8ffc40ac7d1/wrapt-2.0.1-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:4811e15d88ee62dbf5c77f2c3ff3932b1e3ac92323ba3912f51fc4016ce81ecf", size = 144413, upload-time = "2025-11-07T00:44:27.939Z" }, + { url = "https://files.pythonhosted.org/packages/83/2b/9f6b643fe39d4505c7bf926d7c2595b7cb4b607c8c6b500e56c6b36ac238/wrapt-2.0.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:c1c91405fcf1d501fa5d55df21e58ea49e6b879ae829f1039faaf7e5e509b41e", size = 150325, upload-time = "2025-11-07T00:44:29.29Z" }, + { url = "https://files.pythonhosted.org/packages/bb/b6/20ffcf2558596a7f58a2e69c89597128781f0b88e124bf5a4cadc05b8139/wrapt-2.0.1-cp313-cp313t-win32.whl", hash = "sha256:e76e3f91f864e89db8b8d2a8311d57df93f01ad6bb1e9b9976d1f2e83e18315c", size = 59943, upload-time = "2025-11-07T00:44:33.211Z" }, + { url = "https://files.pythonhosted.org/packages/87/6a/0e56111cbb3320151eed5d3821ee1373be13e05b376ea0870711f18810c3/wrapt-2.0.1-cp313-cp313t-win_amd64.whl", hash = "sha256:83ce30937f0ba0d28818807b303a412440c4b63e39d3d8fc036a94764b728c92", size = 63240, upload-time = "2025-11-07T00:44:30.935Z" }, + { url = "https://files.pythonhosted.org/packages/1d/54/5ab4c53ea1f7f7e5c3e7c1095db92932cc32fd62359d285486d00c2884c3/wrapt-2.0.1-cp313-cp313t-win_arm64.whl", hash = "sha256:4b55cacc57e1dc2d0991dbe74c6419ffd415fb66474a02335cb10efd1aa3f84f", size = 60416, upload-time = "2025-11-07T00:44:32.002Z" }, + { url = "https://files.pythonhosted.org/packages/73/81/d08d83c102709258e7730d3cd25befd114c60e43ef3891d7e6877971c514/wrapt-2.0.1-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:5e53b428f65ece6d9dad23cb87e64506392b720a0b45076c05354d27a13351a1", size = 78290, upload-time = "2025-11-07T00:44:34.691Z" }, + { url = "https://files.pythonhosted.org/packages/f6/14/393afba2abb65677f313aa680ff0981e829626fed39b6a7e3ec807487790/wrapt-2.0.1-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:ad3ee9d0f254851c71780966eb417ef8e72117155cff04821ab9b60549694a55", size = 61255, upload-time = "2025-11-07T00:44:35.762Z" }, + { url = "https://files.pythonhosted.org/packages/c4/10/a4a1f2fba205a9462e36e708ba37e5ac95f4987a0f1f8fd23f0bf1fc3b0f/wrapt-2.0.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:d7b822c61ed04ee6ad64bc90d13368ad6eb094db54883b5dde2182f67a7f22c0", size = 61797, upload-time = "2025-11-07T00:44:37.22Z" }, + { url = "https://files.pythonhosted.org/packages/12/db/99ba5c37cf1c4fad35349174f1e38bd8d992340afc1ff27f526729b98986/wrapt-2.0.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:7164a55f5e83a9a0b031d3ffab4d4e36bbec42e7025db560f225489fa929e509", size = 120470, upload-time = "2025-11-07T00:44:39.425Z" }, + { url = "https://files.pythonhosted.org/packages/30/3f/a1c8d2411eb826d695fc3395a431757331582907a0ec59afce8fe8712473/wrapt-2.0.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e60690ba71a57424c8d9ff28f8d006b7ad7772c22a4af432188572cd7fa004a1", size = 122851, upload-time = "2025-11-07T00:44:40.582Z" }, + { url = "https://files.pythonhosted.org/packages/b3/8d/72c74a63f201768d6a04a8845c7976f86be6f5ff4d74996c272cefc8dafc/wrapt-2.0.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:3cd1a4bd9a7a619922a8557e1318232e7269b5fb69d4ba97b04d20450a6bf970", size = 117433, upload-time = "2025-11-07T00:44:38.313Z" }, + { url = "https://files.pythonhosted.org/packages/c7/5a/df37cf4042cb13b08256f8e27023e2f9b3d471d553376616591bb99bcb31/wrapt-2.0.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b4c2e3d777e38e913b8ce3a6257af72fb608f86a1df471cb1d4339755d0a807c", size = 121280, upload-time = "2025-11-07T00:44:41.69Z" }, + { url = "https://files.pythonhosted.org/packages/54/34/40d6bc89349f9931e1186ceb3e5fbd61d307fef814f09fbbac98ada6a0c8/wrapt-2.0.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:3d366aa598d69416b5afedf1faa539fac40c1d80a42f6b236c88c73a3c8f2d41", size = 116343, upload-time = "2025-11-07T00:44:43.013Z" }, + { url = "https://files.pythonhosted.org/packages/70/66/81c3461adece09d20781dee17c2366fdf0cb8754738b521d221ca056d596/wrapt-2.0.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:c235095d6d090aa903f1db61f892fffb779c1eaeb2a50e566b52001f7a0f66ed", size = 119650, upload-time = "2025-11-07T00:44:44.523Z" }, + { url = "https://files.pythonhosted.org/packages/46/3a/d0146db8be8761a9e388cc9cc1c312b36d583950ec91696f19bbbb44af5a/wrapt-2.0.1-cp314-cp314-win32.whl", hash = "sha256:bfb5539005259f8127ea9c885bdc231978c06b7a980e63a8a61c8c4c979719d0", size = 58701, upload-time = "2025-11-07T00:44:48.277Z" }, + { url = "https://files.pythonhosted.org/packages/1a/38/5359da9af7d64554be63e9046164bd4d8ff289a2dd365677d25ba3342c08/wrapt-2.0.1-cp314-cp314-win_amd64.whl", hash = "sha256:4ae879acc449caa9ed43fc36ba08392b9412ee67941748d31d94e3cedb36628c", size = 60947, upload-time = "2025-11-07T00:44:46.086Z" }, + { url = "https://files.pythonhosted.org/packages/aa/3f/96db0619276a833842bf36343685fa04f987dd6e3037f314531a1e00492b/wrapt-2.0.1-cp314-cp314-win_arm64.whl", hash = "sha256:8639b843c9efd84675f1e100ed9e99538ebea7297b62c4b45a7042edb84db03e", size = 59359, upload-time = "2025-11-07T00:44:47.164Z" }, + { url = "https://files.pythonhosted.org/packages/71/49/5f5d1e867bf2064bf3933bc6cf36ade23505f3902390e175e392173d36a2/wrapt-2.0.1-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:9219a1d946a9b32bb23ccae66bdb61e35c62773ce7ca6509ceea70f344656b7b", size = 82031, upload-time = "2025-11-07T00:44:49.4Z" }, + { url = "https://files.pythonhosted.org/packages/2b/89/0009a218d88db66ceb83921e5685e820e2c61b59bbbb1324ba65342668bc/wrapt-2.0.1-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:fa4184e74197af3adad3c889a1af95b53bb0466bced92ea99a0c014e48323eec", size = 62952, upload-time = "2025-11-07T00:44:50.74Z" }, + { url = "https://files.pythonhosted.org/packages/ae/18/9b968e920dd05d6e44bcc918a046d02afea0fb31b2f1c80ee4020f377cbe/wrapt-2.0.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c5ef2f2b8a53b7caee2f797ef166a390fef73979b15778a4a153e4b5fedce8fa", size = 63688, upload-time = "2025-11-07T00:44:52.248Z" }, + { url = "https://files.pythonhosted.org/packages/a6/7d/78bdcb75826725885d9ea26c49a03071b10c4c92da93edda612910f150e4/wrapt-2.0.1-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:e042d653a4745be832d5aa190ff80ee4f02c34b21f4b785745eceacd0907b815", size = 152706, upload-time = "2025-11-07T00:44:54.613Z" }, + { url = "https://files.pythonhosted.org/packages/dd/77/cac1d46f47d32084a703df0d2d29d47e7eb2a7d19fa5cbca0e529ef57659/wrapt-2.0.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2afa23318136709c4b23d87d543b425c399887b4057936cd20386d5b1422b6fa", size = 158866, upload-time = "2025-11-07T00:44:55.79Z" }, + { url = "https://files.pythonhosted.org/packages/8a/11/b521406daa2421508903bf8d5e8b929216ec2af04839db31c0a2c525eee0/wrapt-2.0.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6c72328f668cf4c503ffcf9434c2b71fdd624345ced7941bc6693e61bbe36bef", size = 146148, upload-time = "2025-11-07T00:44:53.388Z" }, + { url = "https://files.pythonhosted.org/packages/0c/c0/340b272bed297baa7c9ce0c98ef7017d9c035a17a6a71dce3184b8382da2/wrapt-2.0.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:3793ac154afb0e5b45d1233cb94d354ef7a983708cc3bb12563853b1d8d53747", size = 155737, upload-time = "2025-11-07T00:44:56.971Z" }, + { url = "https://files.pythonhosted.org/packages/f3/93/bfcb1fb2bdf186e9c2883a4d1ab45ab099c79cbf8f4e70ea453811fa3ea7/wrapt-2.0.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:fec0d993ecba3991645b4857837277469c8cc4c554a7e24d064d1ca291cfb81f", size = 144451, upload-time = "2025-11-07T00:44:58.515Z" }, + { url = "https://files.pythonhosted.org/packages/d2/6b/dca504fb18d971139d232652656180e3bd57120e1193d9a5899c3c0b7cdd/wrapt-2.0.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:949520bccc1fa227274da7d03bf238be15389cd94e32e4297b92337df9b7a349", size = 150353, upload-time = "2025-11-07T00:44:59.753Z" }, + { url = "https://files.pythonhosted.org/packages/1d/f6/a1de4bd3653afdf91d250ca5c721ee51195df2b61a4603d4b373aa804d1d/wrapt-2.0.1-cp314-cp314t-win32.whl", hash = "sha256:be9e84e91d6497ba62594158d3d31ec0486c60055c49179edc51ee43d095f79c", size = 60609, upload-time = "2025-11-07T00:45:03.315Z" }, + { url = "https://files.pythonhosted.org/packages/01/3a/07cd60a9d26fe73efead61c7830af975dfdba8537632d410462672e4432b/wrapt-2.0.1-cp314-cp314t-win_amd64.whl", hash = "sha256:61c4956171c7434634401db448371277d07032a81cc21c599c22953374781395", size = 64038, upload-time = "2025-11-07T00:45:00.948Z" }, + { url = "https://files.pythonhosted.org/packages/41/99/8a06b8e17dddbf321325ae4eb12465804120f699cd1b8a355718300c62da/wrapt-2.0.1-cp314-cp314t-win_arm64.whl", hash = "sha256:35cdbd478607036fee40273be8ed54a451f5f23121bd9d4be515158f9498f7ad", size = 60634, upload-time = "2025-11-07T00:45:02.087Z" }, + { url = "https://files.pythonhosted.org/packages/15/d1/b51471c11592ff9c012bd3e2f7334a6ff2f42a7aed2caffcf0bdddc9cb89/wrapt-2.0.1-py3-none-any.whl", hash = "sha256:4d2ce1bf1a48c5277d7969259232b57645aae5686dba1eaeade39442277afbca", size = 44046, upload-time = "2025-11-07T00:45:32.116Z" }, +] + +[[package]] +name = "yarg" +version = "0.1.9" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "requests" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d4/c8/cc640404a0981e6c14e2044fc64e43b4c1ddf69e7dddc8f2a02638ba5ae8/yarg-0.1.9.tar.gz", hash = "sha256:55695bf4d1e3e7f756496c36a69ba32c40d18f821e38f61d028f6049e5e15911", size = 11988, upload-time = "2014-08-11T22:01:37.243Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8b/90/89a2ff242ccab6a24fbab18dbbabc67c51a6f0ed01f9a0f41689dc177419/yarg-0.1.9-py2.py3-none-any.whl", hash = "sha256:4f9cebdc00fac946c9bf2783d634e538a71c7d280a4d806d45fd4dc0ef441492", size = 19162, upload-time = "2014-08-11T22:01:41.104Z" }, +] + +[[package]] +name = "zep-cloud" +version = "3.13.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "httpx" }, + { name = "pydantic" }, + { name = "pydantic-core" }, + { name = "python-dateutil" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/32/c7/c835debf13302f8aaf8d0561ac6ff5a9bc15cc140cd692a1330fb1900c55/zep_cloud-3.13.0.tar.gz", hash = "sha256:c55d9c511773bb2177ae8e08546141404f87d2099affafabd7ec4b4505763e48", size = 63116, upload-time = "2025-11-20T15:25:40.745Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f7/e1/bbf03c6c8007c0cb238780e7fc6d8e1a52633893933a41aa09678618985a/zep_cloud-3.13.0-py3-none-any.whl", hash = "sha256:b2fbdeef73e262194c8f67b58f76471de6ee87e1a629541a09d8f7bbf475f12b", size = 110601, upload-time = "2025-11-20T15:25:38.484Z" }, +] diff --git a/app/wsgi.py b/app/wsgi.py new file mode 100644 index 0000000000000000000000000000000000000000..0426d445f901974babf7062d3ce30f39b800c64f --- /dev/null +++ b/app/wsgi.py @@ -0,0 +1,7 @@ +""" +WSGI entry for production (e.g. Gunicorn on Render). +""" + +from app import create_app + +app = create_app()