The proxy path (llm_http_via_proxy) stripped HTTP headers but did not
decode chunked transfer-encoding, leaving hex size prefixes in the body
and causing cJSON_Parse to fail with 0 bytes text.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the ui/ directory containing config_screen stubs that were
left over from the display removal. This code was not compiled
(not listed in CMakeLists.txt) and had no callers.
Signed-off-by: Asklv <boironic@gmail.com>
Remove button and IMU source files from the build. Drop the 'driver'
component dependency which was only needed for GPIO/I2C used by the
removed peripherals.
Signed-off-by: Asklv <boironic@gmail.com>
Remove button_Init(), imu_manager_init(), and
imu_manager_set_shake_callback() calls from mimi.c along with
their corresponding include directives.
Signed-off-by: Asklv <boironic@gmail.com>
Remove the buttons/ directory including multi_button library and
button_driver. Physical button input is not needed for the current
headless Telegram/WebSocket interaction model.
Signed-off-by: Asklv <boironic@gmail.com>
Remove the entire imu/ directory including I2C_Driver, QMI8658
accelerometer/gyroscope driver, and imu_manager. These hardware
peripherals are not used in the current mimiclaw product scope.
Signed-off-by: Asklv <boironic@gmail.com>
Adds a heartbeat timer that reads /spiffs/config/HEARTBEAT.md every 30
minutes and sends a prompt to the agent if actionable tasks are found.
Skips empty lines, headers, and completed checkboxes. Includes a
heartbeat_trigger CLI command for manual testing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bring back two-layer configuration: build-time defaults from mimi_secrets.h
with runtime NVS overrides via serial CLI. NVS values take highest priority
so a pre-flashed board can be reconfigured anywhere with just a USB cable.
Restored CLI commands: wifi_set, set_tg_token, set_api_key, set_model,
set_proxy, clear_proxy, set_search_key. Added new commands: config_show
(displays all config with sensitive fields masked), config_reset (clears
all NVS overrides), and help (lists all commands).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All configuration is now done exclusively through mimi_secrets.h at build time.
Removed NVS read/write logic, CLI config commands (wifi_set, set_tg_token,
set_api_key, set_model, set_proxy, clear_proxy, set_search_key), and setter
functions from all modules. CLI retains debug/maintenance commands only.
Updated all documentation to reflect the change.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move working indicator into ReAct loop so it fires before every
llm_chat_tools call (including tool-use iterations), and randomly
select from 5 cute phrases using esp_random().
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enable the agent to persist memories by adding 4 SPIFFS file tools
(read_file, write_file, edit_file, list_dir) with path validation,
and update the system prompt with memory guidelines pointing to
/spiffs/memory/MEMORY.md and daily notes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Send "mimi😗is working..." to user when processing starts.
List get_current_time in system prompt available tools so the agent
knows to call it for time/date queries. Remove auto time fetch from
system prompt builder — agent calls the tool on demand.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fetches real time via HTTP Date header (works through proxy),
sets system clock, and returns formatted local time to the agent.
Also adds MIMI_TIMEZONE config and updates default model to claude-opus-4-5.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrite agent_loop.c with ReAct tool use loop: LLM call → tool
execution → repeat until end_turn (max 10 iterations). Add tool
guidance to system prompt. Add set_search_key CLI command.
Add mimi_secrets.h for build-time credentials with highest priority
over NVS/CLI values. All modules (wifi, telegram, llm, proxy,
web_search) check build-time secrets first, fall back to NVS.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace SSE streaming with non-streaming JSON for Anthropic API.
Add llm_chat_tools() returning structured llm_response_t with text
and tool_use blocks. Implement tool registry with dispatch-by-name
and web_search tool via Brave Search API (direct + proxy support).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CLI task stack is 4KB; the 4096-byte stack buffer in cmd_memory_read
was overflowing and corrupting the heap. Use malloc instead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enable ESP32-S3 to reach api.telegram.org and api.anthropic.com through
an HTTP CONNECT proxy (e.g. Clash Verge), required in regions where
these services are blocked.
- New proxy module (http_proxy.c/h): CONNECT tunnel + TLS via esp_tls
with pre-connected socket injection (esp_tls_set_conn_sockfd)
- Telegram and LLM modules split into direct/proxy paths
- CLI commands: set_proxy <host> <port>, clear_proxy
- Proxy config persisted in NVS
- Fix TLS buffer: MBEDTLS_SSL_IN_CONTENT_LEN 4096 → 16384
- Increase task stacks for TLS overhead (poll 12KB, agent 12KB, outbound 8KB)
- Default model changed to claude-opus-4-6
- Capture raw error body for non-200 API responses
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All HTTP clients (Telegram, Claude API, OTA) were missing
crt_bundle_attach, causing TLS handshake failures. Add esp-tls
dependency to CMakeLists.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add app_update component to CMakeLists REQUIRES for OTA version
reporting. Add sdkconfig.defaults scaffold and gitignore nanobot
reference repo.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>