Files
nanobot/AGENTS.md
T
chengyongru 1046a37be1 fix(webui): correlate chat requests and cancel stale reconnects (#6617)
* fix(webui): correlate chat requests and cancel stale reconnects

* refactor(webui): remove chat request capability negotiation

* docs(webui): clarify version pairing and cover HTTP startup

* test(webui): focus lifecycle coverage and clarify support policy
2026-11-12 14:44:38 +08:00

2.5 KiB

Working on nanobot

The Python gateway owns agent execution, sessions, tools, memory, and security policy. WebUI and TUI share that runtime; keep execution and policy out of the clients.

WebUI/gateway support and test coverage are limited to same-version combinations, including remote gateways. Cross-version combinations may work but have no compatibility guarantee, even when protocol checks pass; align versions first when troubleshooting. Do not reject connections solely because package versions differ, or add compatibility fallbacks or negotiation solely to support older gateways.

Task-specific guidance

When working on Read
Finding the owning code and focused tests .agent/navigation.md
Core boundaries, extensions, or internal types .agent/design.md
Refactoring, fallbacks, or test selection .agent/simplify.md
User-facing copy, feature naming, or localization .agent/copywriting.md
Path permissions, HTTP/MCP, or shell isolation .agent/security.md
Dependency setup, WebUI transport, config, Windows, prompts, or persistence .agent/gotchas.md
Reusing verification evidence .agent/workflow.md
WebUI/host compatibility .agent/review-guide.md
Contribution or publication CONTRIBUTING.md, docs/releasing.md

Development constraints

  • Analyze the required behavior, state ownership, and root cause before extending existing code. Refactor when the structure causes the problem; a smaller diff does not justify another fallback.
  • Do not add defensive tests for hypothetical internal states or unsupported combinations. Each new test needs a reachable path and a meaningful contract to protect.
  • Do not add tests merely to prove that nonexistent behavior, removed code, or obsolete symbols are absent. Negative assertions must exercise a concrete, reachable risk and protect an observable behavioral contract; prefer testing supported actions and their results.
  • Do not run ruff format; mechanical formatting obscures git blame and creates unrelated diffs. This constraint takes precedence over the optional touched-file formatting in CONTRIBUTING.md.
  • Do not manually wrap prose in Markdown files. Keep each paragraph on one source line; use line breaks only for Markdown structure.