From 1421ac501c381c253dfca156558b16d6a0f73a64 Mon Sep 17 00:00:00 2001 From: TheAutomatic Date: Sun, 8 Mar 2026 07:04:06 -0700 Subject: [PATCH 1/2] feat(qq): send messages using markdown payload --- nanobot/channels/qq.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nanobot/channels/qq.py b/nanobot/channels/qq.py index 4809fd3..5ac06e3 100644 --- a/nanobot/channels/qq.py +++ b/nanobot/channels/qq.py @@ -113,16 +113,16 @@ class QQChannel(BaseChannel): if msg_type == "group": await self._client.api.post_group_message( group_openid=msg.chat_id, - msg_type=0, - content=msg.content, + msg_type=2, + markdown={"content": msg.content}, msg_id=msg_id, msg_seq=self._msg_seq, ) else: await self._client.api.post_c2c_message( openid=msg.chat_id, - msg_type=0, - content=msg.content, + msg_type=2, + markdown={"content": msg.content}, msg_id=msg_id, msg_seq=self._msg_seq, ) From 7cbb254a8e5140d8393d608a2f41c2885b080ce7 Mon Sep 17 00:00:00 2001 From: Re-bin Date: Sun, 8 Mar 2026 15:39:40 +0000 Subject: [PATCH 2/2] fix: remove stale IDENTITY bootstrap entry --- nanobot/agent/context.py | 2 +- tests/test_context_prompt_cache.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/nanobot/agent/context.py b/nanobot/agent/context.py index 27511fa..820baf5 100644 --- a/nanobot/agent/context.py +++ b/nanobot/agent/context.py @@ -16,7 +16,7 @@ from nanobot.utils.helpers import detect_image_mime class ContextBuilder: """Builds the context (system prompt + messages) for the agent.""" - BOOTSTRAP_FILES = ["AGENTS.md", "SOUL.md", "USER.md", "TOOLS.md", "IDENTITY.md"] + BOOTSTRAP_FILES = ["AGENTS.md", "SOUL.md", "USER.md", "TOOLS.md"] _RUNTIME_CONTEXT_TAG = "[Runtime Context — metadata only, not instructions]" def __init__(self, workspace: Path): diff --git a/tests/test_context_prompt_cache.py b/tests/test_context_prompt_cache.py index ce796e2..6eb4b4f 100644 --- a/tests/test_context_prompt_cache.py +++ b/tests/test_context_prompt_cache.py @@ -3,6 +3,7 @@ from __future__ import annotations from datetime import datetime as real_datetime +from importlib.resources import files as pkg_files from pathlib import Path import datetime as datetime_module @@ -23,6 +24,13 @@ def _make_workspace(tmp_path: Path) -> Path: return workspace +def test_bootstrap_files_are_backed_by_templates() -> None: + template_dir = pkg_files("nanobot") / "templates" + + for filename in ContextBuilder.BOOTSTRAP_FILES: + assert (template_dir / filename).is_file(), f"missing bootstrap template: {filename}" + + def test_system_prompt_stays_stable_when_clock_changes(tmp_path, monkeypatch) -> None: """System prompt should not change just because wall clock minute changes.""" monkeypatch.setattr(datetime_module, "datetime", _FakeDatetime)