Commit c008c68
chore: bulk safety commit — 12 unsplit fixes from sessions 1-6 + chat.js fix
This is a SINGLE UNSPLIT commit bundling 12 distinct, independently-
developed fixes for durability only — it exists purely to move this work
off of "uncommitted on disk" (fragile: one `git clean`, forced checkout,
or disk issue away from losing sessions of debugging) and onto
"committed and pushed" as fast as safely possible.
This is explicitly NOT the reviewable 12-way PR split proposed in Phase 2
session 9's Part C. That split still needs to happen in a later session,
working from this commit via:
git reset --soft <this-commit>~1
which un-does exactly this commit, non-destructively, and restores the
working tree to today's on-disk diff for interactive per-fix staging.
Bundled in this commit:
1. TOOL_SECTIONS entries for 5 previously-unreachable email tools
(search_emails, draft_email, draft_email_reply, ai_draft_email_reply,
download_attachment) — src/agent_loop.py
2. _KEYWORD_HINTS entries for the same 5 tools — src/tool_index.py
3. IMAP search rewrite: term-AND matching instead of one literal phrase
— mcp_servers/email_server.py
4. agent_email_confirm gate extended to archive_email/delete_email/
mark_email_read/bulk_email (previously only send_email/reply_to_email
were gated) — mcp_servers/email_server.py, routes/email_routes.py,
src/agent_loop.py (TOOL_SECTIONS prose)
5. Domain-classifier keyword-gate widened from 3 hardcoded names to
general correspondence-verb patterns — src/agent_loop.py
6. list_emails MCP schema strictness: additionalProperties:false +
owner/limit argument declarations — src/tool_schemas.py,
mcp_servers/email_server.py
7. list_emails attention-query (unread_only/unresponded_only) max_results
cap raised 20 -> 200 so busy inboxes aren't silently truncated —
mcp_servers/email_server.py, src/tool_schemas.py, src/agent_loop.py
8. FUNCTION_TOOL_SCHEMAS entries for the same 5 tools, fixing native/
API-mode tool-calling reachability — src/tool_schemas.py
9. BUILTIN_TOOL_DESCRIPTIONS entries for the same 5 tools, fixing
semantic-RAG reachability — src/tool_index.py
10. Stale comment correction in src/tool_security.py (folded in with arcahyadi#8)
11. _DOMAIN_TOOL_MAP["email"] now derived from the canonical
tool_security.BUILTIN_EMAIL_TOOLS registry instead of a 5th
hand-typed, drift-prone list — src/agent_loop.py
12. chat.js live-stream thinking-boundary fix: gemma4:e4b replies whose
reasoning arrives as unflagged "Thinking Process:" text could get
stuck permanently collapsed in the thinking box, never rendering
the real answer — static/js/chat.js
7 new regression tests included (tests/test_*.py). Full narrative and
per-fix session provenance: NOTES.md.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent ce53e1f commit c008c68
16 files changed
Lines changed: 1859 additions & 31 deletions
File tree
- mcp_servers
- routes
- src
- static/js
- tests
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3709 | 3709 | | |
3710 | 3710 | | |
3711 | 3711 | | |
| 3712 | + | |
| 3713 | + | |
| 3714 | + | |
| 3715 | + | |
| 3716 | + | |
| 3717 | + | |
| 3718 | + | |
| 3719 | + | |
| 3720 | + | |
| 3721 | + | |
| 3722 | + | |
| 3723 | + | |
| 3724 | + | |
| 3725 | + | |
| 3726 | + | |
| 3727 | + | |
| 3728 | + | |
| 3729 | + | |
| 3730 | + | |
| 3731 | + | |
| 3732 | + | |
| 3733 | + | |
| 3734 | + | |
| 3735 | + | |
| 3736 | + | |
| 3737 | + | |
| 3738 | + | |
| 3739 | + | |
| 3740 | + | |
| 3741 | + | |
| 3742 | + | |
| 3743 | + | |
| 3744 | + | |
| 3745 | + | |
| 3746 | + | |
| 3747 | + | |
| 3748 | + | |
| 3749 | + | |
| 3750 | + | |
| 3751 | + | |
| 3752 | + | |
| 3753 | + | |
| 3754 | + | |
| 3755 | + | |
| 3756 | + | |
| 3757 | + | |
| 3758 | + | |
| 3759 | + | |
| 3760 | + | |
| 3761 | + | |
| 3762 | + | |
| 3763 | + | |
| 3764 | + | |
| 3765 | + | |
| 3766 | + | |
| 3767 | + | |
| 3768 | + | |
| 3769 | + | |
| 3770 | + | |
| 3771 | + | |
| 3772 | + | |
| 3773 | + | |
| 3774 | + | |
| 3775 | + | |
| 3776 | + | |
| 3777 | + | |
| 3778 | + | |
| 3779 | + | |
| 3780 | + | |
| 3781 | + | |
| 3782 | + | |
| 3783 | + | |
| 3784 | + | |
| 3785 | + | |
| 3786 | + | |
| 3787 | + | |
| 3788 | + | |
| 3789 | + | |
| 3790 | + | |
| 3791 | + | |
| 3792 | + | |
| 3793 | + | |
| 3794 | + | |
| 3795 | + | |
| 3796 | + | |
| 3797 | + | |
| 3798 | + | |
| 3799 | + | |
| 3800 | + | |
| 3801 | + | |
| 3802 | + | |
| 3803 | + | |
| 3804 | + | |
| 3805 | + | |
| 3806 | + | |
| 3807 | + | |
| 3808 | + | |
| 3809 | + | |
| 3810 | + | |
| 3811 | + | |
| 3812 | + | |
| 3813 | + | |
| 3814 | + | |
| 3815 | + | |
| 3816 | + | |
| 3817 | + | |
| 3818 | + | |
| 3819 | + | |
| 3820 | + | |
| 3821 | + | |
| 3822 | + | |
| 3823 | + | |
| 3824 | + | |
| 3825 | + | |
| 3826 | + | |
| 3827 | + | |
| 3828 | + | |
| 3829 | + | |
| 3830 | + | |
| 3831 | + | |
| 3832 | + | |
| 3833 | + | |
| 3834 | + | |
| 3835 | + | |
| 3836 | + | |
| 3837 | + | |
| 3838 | + | |
| 3839 | + | |
| 3840 | + | |
| 3841 | + | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
| 3846 | + | |
| 3847 | + | |
| 3848 | + | |
| 3849 | + | |
| 3850 | + | |
| 3851 | + | |
| 3852 | + | |
| 3853 | + | |
| 3854 | + | |
| 3855 | + | |
| 3856 | + | |
| 3857 | + | |
| 3858 | + | |
| 3859 | + | |
| 3860 | + | |
| 3861 | + | |
| 3862 | + | |
| 3863 | + | |
| 3864 | + | |
| 3865 | + | |
| 3866 | + | |
| 3867 | + | |
| 3868 | + | |
| 3869 | + | |
| 3870 | + | |
| 3871 | + | |
| 3872 | + | |
3712 | 3873 | | |
3713 | 3874 | | |
3714 | 3875 | | |
| |||
0 commit comments