vibego 0.2.23__py3-none-any.whl → 0.2.25__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 vibego might be problematic. Click here for more details.
- bot.py +32 -3
- scripts/start.sh +4 -4
- {vibego-0.2.23.dist-info → vibego-0.2.25.dist-info}/METADATA +1 -1
- {vibego-0.2.23.dist-info → vibego-0.2.25.dist-info}/RECORD +8 -8
- vibego_cli/__init__.py +1 -1
- {vibego-0.2.23.dist-info → vibego-0.2.25.dist-info}/WHEEL +0 -0
- {vibego-0.2.23.dist-info → vibego-0.2.25.dist-info}/entry_points.txt +0 -0
- {vibego-0.2.23.dist-info → vibego-0.2.25.dist-info}/top_level.txt +0 -0
bot.py
CHANGED
|
@@ -124,6 +124,8 @@ AGENTS_PHASE_SUFFIX = ",最后列出当前所触发的 agents.md 的阶段、
|
|
|
124
124
|
# 推送到模型的阶段提示(vibe 与测试),合并统一后缀确保输出一致。
|
|
125
125
|
VIBE_PHASE_PROMPT = f"进入vibe阶段{AGENTS_PHASE_SUFFIX}"
|
|
126
126
|
TEST_PHASE_PROMPT = f"进入测试阶段{AGENTS_PHASE_SUFFIX}"
|
|
127
|
+
# 报告缺陷时的专用前缀,插入在统一提示语之前
|
|
128
|
+
BUG_REPORT_PREFIX = "报告一个缺陷,详见底部最新的缺陷描述。"
|
|
127
129
|
|
|
128
130
|
_parse_mode_env = (os.environ.get("TELEGRAM_PARSE_MODE") or "MarkdownV2").strip()
|
|
129
131
|
_parse_mode_key = _parse_mode_env.replace("-", "").replace("_", "").lower()
|
|
@@ -1176,8 +1178,18 @@ async def _push_task_to_model(
|
|
|
1176
1178
|
reply_to: Optional[Message],
|
|
1177
1179
|
supplement: Optional[str],
|
|
1178
1180
|
actor: Optional[str],
|
|
1181
|
+
is_bug_report: bool = False,
|
|
1179
1182
|
) -> tuple[bool, str, Optional[Path]]:
|
|
1180
|
-
"""推送任务信息到模型,并附带补充描述。
|
|
1183
|
+
"""推送任务信息到模型,并附带补充描述。
|
|
1184
|
+
|
|
1185
|
+
Args:
|
|
1186
|
+
task: 任务记录
|
|
1187
|
+
chat_id: 聊天 ID
|
|
1188
|
+
reply_to: 回复的消息
|
|
1189
|
+
supplement: 补充描述
|
|
1190
|
+
actor: 操作者
|
|
1191
|
+
is_bug_report: 是否为缺陷报告推送
|
|
1192
|
+
"""
|
|
1181
1193
|
|
|
1182
1194
|
history_text, history_count = await _build_history_context_for_model(task.id)
|
|
1183
1195
|
notes = await TASK_SERVICE.list_notes(task.id)
|
|
@@ -1186,6 +1198,7 @@ async def _push_task_to_model(
|
|
|
1186
1198
|
supplement=supplement,
|
|
1187
1199
|
history=history_text,
|
|
1188
1200
|
notes=notes,
|
|
1201
|
+
is_bug_report=is_bug_report,
|
|
1189
1202
|
)
|
|
1190
1203
|
success, session_path = await _dispatch_prompt_to_model(
|
|
1191
1204
|
chat_id,
|
|
@@ -1884,8 +1897,17 @@ def _build_model_push_payload(
|
|
|
1884
1897
|
supplement: Optional[str] = None,
|
|
1885
1898
|
history: Optional[str] = None,
|
|
1886
1899
|
notes: Optional[Sequence[TaskNoteRecord]] = None,
|
|
1900
|
+
is_bug_report: bool = False,
|
|
1887
1901
|
) -> str:
|
|
1888
|
-
"""根据任务状态构造推送到 tmux 的指令。
|
|
1902
|
+
"""根据任务状态构造推送到 tmux 的指令。
|
|
1903
|
+
|
|
1904
|
+
Args:
|
|
1905
|
+
task: 任务记录
|
|
1906
|
+
supplement: 补充描述
|
|
1907
|
+
history: 历史记录文本
|
|
1908
|
+
notes: 任务备注列表
|
|
1909
|
+
is_bug_report: 是否为缺陷报告推送,True 时会在提示词前添加缺陷前缀
|
|
1910
|
+
"""
|
|
1889
1911
|
|
|
1890
1912
|
config = MODEL_PUSH_CONFIG.get(task.status)
|
|
1891
1913
|
if config is None:
|
|
@@ -1925,6 +1947,9 @@ def _build_model_push_payload(
|
|
|
1925
1947
|
|
|
1926
1948
|
if include_task and status in {"research", "test"}:
|
|
1927
1949
|
phase_line = VIBE_PHASE_PROMPT
|
|
1950
|
+
# 如果是缺陷报告推送,在阶段提示前添加缺陷前缀
|
|
1951
|
+
if is_bug_report:
|
|
1952
|
+
phase_line = f"{BUG_REPORT_PREFIX}\n{phase_line}"
|
|
1928
1953
|
title = (task.title or "").strip() or "-"
|
|
1929
1954
|
description = (task.description or "").strip() or "-"
|
|
1930
1955
|
supplement_value = supplement_text or "-"
|
|
@@ -2033,7 +2058,10 @@ def _wrap_text_in_code_block(text: str) -> tuple[str, str]:
|
|
|
2033
2058
|
escaped = html.escape(text, quote=False)
|
|
2034
2059
|
return f"<pre><code>{escaped}</code></pre>", ParseMode.HTML.value
|
|
2035
2060
|
if MODEL_OUTPUT_PARSE_MODE == ParseMode.MARKDOWN_V2:
|
|
2036
|
-
|
|
2061
|
+
# 先清理已有的 MarkdownV2 转义字符,避免重复转义导致显示反斜杠
|
|
2062
|
+
cleaned = _unescape_if_already_escaped(text)
|
|
2063
|
+
# 在代码块中只需要转义反引号和反斜杠
|
|
2064
|
+
escaped = cleaned.replace("\\", "\\\\").replace("`", "\\`")
|
|
2037
2065
|
return f"```\n{escaped}\n```", ParseMode.MARKDOWN_V2.value
|
|
2038
2066
|
# 默认退回 Telegram Markdown,保证代码块高亮可用
|
|
2039
2067
|
return f"```\n{text}\n```", ParseMode.MARKDOWN.value
|
|
@@ -2570,6 +2598,7 @@ async def _auto_push_after_bug_report(task: TaskRecord, *, message: Message, act
|
|
|
2570
2598
|
reply_to=message,
|
|
2571
2599
|
supplement=None,
|
|
2572
2600
|
actor=actor,
|
|
2601
|
+
is_bug_report=True,
|
|
2573
2602
|
)
|
|
2574
2603
|
except ValueError as exc:
|
|
2575
2604
|
worker_log.error(
|
scripts/start.sh
CHANGED
|
@@ -129,19 +129,19 @@ select_python_binary() {
|
|
|
129
129
|
local major="${version_raw%%.*}"
|
|
130
130
|
local minor="${version_raw#*.}"
|
|
131
131
|
if [[ "$major" != "3" ]]; then
|
|
132
|
-
|
|
132
|
+
log_line "跳过 ${name} (版本 ${version_raw}):非 CPython 3.x" >&2
|
|
133
133
|
continue
|
|
134
134
|
fi
|
|
135
135
|
if [[ "$minor" =~ ^[0-9]+$ ]] && (( minor > 13 )); then
|
|
136
|
-
|
|
136
|
+
log_line "跳过 ${name} (版本 ${version_raw}):高于 3.13" >&2
|
|
137
137
|
continue
|
|
138
138
|
fi
|
|
139
139
|
if [[ "$minor" =~ ^[0-9]+$ ]] && (( minor < 9 )); then
|
|
140
|
-
|
|
140
|
+
log_line "跳过 ${name} (版本 ${version_raw}):低于 3.9,可能缺少官方轮子" >&2
|
|
141
141
|
continue
|
|
142
142
|
fi
|
|
143
143
|
chosen="$name"
|
|
144
|
-
|
|
144
|
+
log_line "使用 Python 解释器:${chosen} (版本 ${version_raw})" >&2
|
|
145
145
|
break
|
|
146
146
|
done
|
|
147
147
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
bot.py,sha256=
|
|
1
|
+
bot.py,sha256=2CYEIkjH4DKxqa26WEYdFfYc6DttFRLX7buh3acSrKE,271931
|
|
2
2
|
logging_setup.py,sha256=gvxHi8mUwK3IhXJrsGNTDo-DR6ngkyav1X-tvlBF_IE,4613
|
|
3
3
|
master.py,sha256=mA8eXtTGHrtqZ3MB4u56unHnq8NEMm3HZ2GikxRFeYY,108225
|
|
4
4
|
project_repository.py,sha256=UcthtSGOJK0cTE5bQCneo3xkomRG-kyc1N1QVqxeHIs,17577
|
|
@@ -9,7 +9,7 @@ scripts/master_healthcheck.py,sha256=-X0VVsZ0AXaOb7izxTO_oyu23g_1jsirNdGIcP8nrSI
|
|
|
9
9
|
scripts/publish.sh,sha256=ehLfMedcXuGKJ87jpZy3kuiFszG9Cpavp3zXPfR4h-g,3511
|
|
10
10
|
scripts/requirements.txt,sha256=QSt30DSSSHtfucTFPpc7twk9kLS5rVLNTcvDiagxrZg,62
|
|
11
11
|
scripts/run_bot.sh,sha256=rN4K1nz041XBaUJmnBBKHS2cHmQf11vPNX8wf1hbVR4,4596
|
|
12
|
-
scripts/start.sh,sha256=
|
|
12
|
+
scripts/start.sh,sha256=7MUNlhY4edkUF9yptankqJBLoawczLXi12BvSePWWO8,7978
|
|
13
13
|
scripts/start_tmux_codex.sh,sha256=xyLv29p924q-ysxvZYAP3T6VrqLPBPMBWo9QP7cuL50,4438
|
|
14
14
|
scripts/stop_all.sh,sha256=FOz07gi2CI9sMHxBb8XkqHtxRYs3jt1RYgGrEi-htVg,4086
|
|
15
15
|
scripts/stop_bot.sh,sha256=ot6Sm0IYoXuRNslUVEflQmJKu5Agm-5xIUXXudJWyTM,5588
|
|
@@ -426,14 +426,14 @@ tasks/constants.py,sha256=tS1kZxBIUm3JJUMHm25XI-KHNUZl5NhbbuzjzL_rF-c,299
|
|
|
426
426
|
tasks/fsm.py,sha256=rKXXLEieQQU4r2z_CZUvn1_70FXiZXBBugF40gpe_tQ,1476
|
|
427
427
|
tasks/models.py,sha256=N_qqRBo9xMSV0vbn4k6bLBXT8C_dp_oTFUxvdx16ZQM,2459
|
|
428
428
|
tasks/service.py,sha256=w_S_aWiVqRXzXEpimLDsuCCCX2lB5uDkff9aKThBw9c,41916
|
|
429
|
-
vibego_cli/__init__.py,sha256=
|
|
429
|
+
vibego_cli/__init__.py,sha256=303B8KuMcb9GFRPTrGgkoMPfsA8_tpbgAP7XJf7P1EE,311
|
|
430
430
|
vibego_cli/__main__.py,sha256=qqTrYmRRLe4361fMzbI3-CqpZ7AhTofIHmfp4ykrrBY,158
|
|
431
431
|
vibego_cli/config.py,sha256=33WSORCfUIxrDtgASPEbVqVLBVNHh-RSFLpNy7tfc0s,2992
|
|
432
432
|
vibego_cli/deps.py,sha256=1nRXI7Dd-S1hYE8DligzK5fIluQWETRUj4_OKL0DikQ,1419
|
|
433
433
|
vibego_cli/main.py,sha256=e2W5Pb9U9rfmF-jNX9uIA3222lhM0GgcvSdFTDBZd2s,12086
|
|
434
434
|
vibego_cli/data/worker_requirements.txt,sha256=QSt30DSSSHtfucTFPpc7twk9kLS5rVLNTcvDiagxrZg,62
|
|
435
|
-
vibego-0.2.
|
|
436
|
-
vibego-0.2.
|
|
437
|
-
vibego-0.2.
|
|
438
|
-
vibego-0.2.
|
|
439
|
-
vibego-0.2.
|
|
435
|
+
vibego-0.2.25.dist-info/METADATA,sha256=ETHyLPlJYU59sVMAyQeMAcDJ7xDNghg7ns9E-3rX2Xc,10475
|
|
436
|
+
vibego-0.2.25.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
437
|
+
vibego-0.2.25.dist-info/entry_points.txt,sha256=Lsy_zm-dlyxt8-9DL9blBReIwU2k22c8-kifr46ND1M,48
|
|
438
|
+
vibego-0.2.25.dist-info/top_level.txt,sha256=R56CT3nW5H5v3ce0l3QDN4-C4qxTrNWzRTwrxnkDX4U,69
|
|
439
|
+
vibego-0.2.25.dist-info/RECORD,,
|
vibego_cli/__init__.py
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|