htmlgen-mcp 0.3.9__py3-none-any.whl → 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of htmlgen-mcp might be problematic. Click here for more details.
- htmlgen_mcp/web_agent_server.py +14 -16
- {htmlgen_mcp-0.3.9.dist-info → htmlgen_mcp-0.4.0.dist-info}/METADATA +1 -1
- {htmlgen_mcp-0.3.9.dist-info → htmlgen_mcp-0.4.0.dist-info}/RECORD +6 -6
- {htmlgen_mcp-0.3.9.dist-info → htmlgen_mcp-0.4.0.dist-info}/WHEEL +0 -0
- {htmlgen_mcp-0.3.9.dist-info → htmlgen_mcp-0.4.0.dist-info}/entry_points.txt +0 -0
- {htmlgen_mcp-0.3.9.dist-info → htmlgen_mcp-0.4.0.dist-info}/top_level.txt +0 -0
htmlgen_mcp/web_agent_server.py
CHANGED
|
@@ -464,7 +464,7 @@ async def execute_plan(
|
|
|
464
464
|
# confirm_each_step: bool = False, # 后台执行模式下用户无法交互确认
|
|
465
465
|
# show_code: bool = False, # 后台执行时用户看不到输出
|
|
466
466
|
# verbose: bool = False, # 后台执行时详细日志意义不大
|
|
467
|
-
save_output: bool =
|
|
467
|
+
# save_output: bool = True, # 已固定为 True,始终创建进度日志
|
|
468
468
|
progress_log: Optional[str] = None,
|
|
469
469
|
) -> Dict[str, Any]:
|
|
470
470
|
"""执行网页构建计划,始终以后台模式运行。
|
|
@@ -474,26 +474,23 @@ async def execute_plan(
|
|
|
474
474
|
由 plan_site 工具返回的计划ID,用于从缓存或文件系统中查找对应的执行计划。
|
|
475
475
|
例如:"a1b2c3d4e5f6..." 这样的32位十六进制字符串。
|
|
476
476
|
|
|
477
|
-
- project_root:
|
|
477
|
+
- project_root: 网站文件生成的目标目录路径(可选)
|
|
478
478
|
指定项目文件的输出位置,可以是绝对路径或相对路径。
|
|
479
479
|
例如:"/path/to/my/website" 或 "./my-project"
|
|
480
480
|
如果目录不存在,系统会自动创建。
|
|
481
|
-
|
|
482
|
-
- save_output: 是否保存执行过程的详细输出到文件
|
|
483
|
-
True: 会自动创建进度日志文件,记录所有执行步骤和结果
|
|
484
|
-
False: 不创建进度日志文件,只保留基本的任务状态信息
|
|
485
|
-
建议在调试或需要详细追踪时设置为 True
|
|
481
|
+
如果未指定,将使用计划中保存的项目目录。
|
|
486
482
|
|
|
487
483
|
- progress_log: 自定义进度日志文件的保存路径(可选)
|
|
488
484
|
如果指定:使用该路径保存进度日志(JSONL格式)
|
|
489
|
-
|
|
490
|
-
如果都未指定:不记录进度日志
|
|
485
|
+
如果未指定:自动在 ~/.mcp/make_web/progress_logs 目录创建时间戳命名的日志文件(可通过环境变量覆盖)
|
|
491
486
|
路径可以是绝对路径或相对于 project_root 的相对路径
|
|
492
487
|
|
|
488
|
+
注意:进度日志始终会被创建,以便使用 get_progress 工具查询任务进度。
|
|
489
|
+
|
|
493
490
|
执行流程:
|
|
494
491
|
- 任务始终在后台异步执行,立即返回 job_id 和 progress_log 路径
|
|
495
492
|
- 使用 get_progress(job_id=..., limit=...) 可以实时查询执行状态和进度
|
|
496
|
-
-
|
|
493
|
+
- 系统会自动记录详细的执行步骤和结果到进度日志文件
|
|
497
494
|
- 执行完成后可以获取完整的执行报告、生成文件列表,以及自动上传结果
|
|
498
495
|
"""
|
|
499
496
|
try:
|
|
@@ -532,21 +529,21 @@ async def execute_plan(
|
|
|
532
529
|
|
|
533
530
|
project_dir = _resolve_project_directory(project_root, project_name)
|
|
534
531
|
|
|
535
|
-
#
|
|
536
|
-
|
|
532
|
+
# 进度日志始终启用
|
|
537
533
|
if progress_log:
|
|
534
|
+
# 用户指定了自定义日志路径
|
|
538
535
|
progress_log_path = (
|
|
539
536
|
progress_log
|
|
540
537
|
if os.path.isabs(progress_log)
|
|
541
538
|
else os.path.join(project_dir, progress_log)
|
|
542
539
|
)
|
|
543
|
-
|
|
540
|
+
else:
|
|
541
|
+
# 自动生成日志文件
|
|
544
542
|
progress_log_path = os.path.join(
|
|
545
543
|
PROGRESS_LOG_DIR, f"agent_progress_{int(time.time())}.jsonl"
|
|
546
544
|
)
|
|
547
|
-
else:
|
|
548
|
-
progress_log_path = None
|
|
549
545
|
|
|
546
|
+
# 尝试创建日志文件
|
|
550
547
|
if progress_log_path:
|
|
551
548
|
try:
|
|
552
549
|
Path(progress_log_path).parent.mkdir(parents=True, exist_ok=True)
|
|
@@ -554,9 +551,10 @@ async def execute_plan(
|
|
|
554
551
|
except Exception:
|
|
555
552
|
progress_log_path = None
|
|
556
553
|
|
|
554
|
+
# save_output 固定为 True
|
|
557
555
|
agent = _build_agent(
|
|
558
556
|
project_dir,
|
|
559
|
-
save_output=
|
|
557
|
+
save_output=True,
|
|
560
558
|
)
|
|
561
559
|
|
|
562
560
|
# 通过 plan_id 查询计划
|
|
@@ -8,7 +8,7 @@ htmlgen_mcp/progress_tools.py,sha256=SOScPSr3hEv4rvGzqvwUcomEFiPhhNxJ7CbWURlFpBs
|
|
|
8
8
|
htmlgen_mcp/progress_tracker.py,sha256=2TVduWNJJH08EQ7Vf9EpiwPjtp61JX7muSCdbGHZAfM,12210
|
|
9
9
|
htmlgen_mcp/prompt_enhancer.py,sha256=8UIxt45vSNarS5uqfxC5thOfnGY7luDs2YjHZRx1GAM,7976
|
|
10
10
|
htmlgen_mcp/sse_optimizations.py,sha256=_UTpgLtxgNAiiEkO5lPihOi1-eEQk6R4ejNParufrrc,6932
|
|
11
|
-
htmlgen_mcp/web_agent_server.py,sha256=
|
|
11
|
+
htmlgen_mcp/web_agent_server.py,sha256=HCOKIAG3Jr201nsxR53_hJG_5miJaKvrjR9KDm4HnI0,50787
|
|
12
12
|
htmlgen_mcp/agents/__init__.py,sha256=Xydfjzw9s9O6I5Ixx6EmsTdXu26136NDPUAqt9B1hzE,121
|
|
13
13
|
htmlgen_mcp/agents/ai_content_generator.py,sha256=tWGC9cY6Wp7MB1P9J7uCv8LUdiS02rgS6vxaNHD7KQk,10311
|
|
14
14
|
htmlgen_mcp/agents/quick_generator.py,sha256=2wV4PCRugV0suTedLDV91_etHy_2Fiw4J0MraT7MQjw,34201
|
|
@@ -31,8 +31,8 @@ htmlgen_mcp/agents/web_tools/simple_css.py,sha256=kj9X3sHHhj1wGwBVL20j6w2qIHXRdx
|
|
|
31
31
|
htmlgen_mcp/agents/web_tools/simple_js.py,sha256=xMiuF-u-h_IIkUONZIa4Xf8vKB5mcXxwQf5b_BIcpoE,12174
|
|
32
32
|
htmlgen_mcp/agents/web_tools/simple_templates.py,sha256=-Rs-SsWpGZT2hiwa3jZNVDHOMZOo1vV2pWbmBdR30os,6471
|
|
33
33
|
htmlgen_mcp/agents/web_tools/validation.py,sha256=bNA6aWXrCSi7sPqQw5bBR3XF69gRf85D5jSMi996CtI,2069
|
|
34
|
-
htmlgen_mcp-0.
|
|
35
|
-
htmlgen_mcp-0.
|
|
36
|
-
htmlgen_mcp-0.
|
|
37
|
-
htmlgen_mcp-0.
|
|
38
|
-
htmlgen_mcp-0.
|
|
34
|
+
htmlgen_mcp-0.4.0.dist-info/METADATA,sha256=CKfyLT9XvtOV8j1TSObj5S4beyhmOEWRAG5ke9Tl3vc,5161
|
|
35
|
+
htmlgen_mcp-0.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
36
|
+
htmlgen_mcp-0.4.0.dist-info/entry_points.txt,sha256=w7ufTQJobIxT3FYI24yKsCEwEQvBOWhNjckUd9Amu_k,66
|
|
37
|
+
htmlgen_mcp-0.4.0.dist-info/top_level.txt,sha256=KnglzX4ekV8SQkHTsJg2_nTBXz2TxaYLdvoMMovHLNk,12
|
|
38
|
+
htmlgen_mcp-0.4.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|