Add diagnostic logging to the MCP login tool handler:
- Log whether username/password were provided explicitly
- If falling back to config, log the resolved config path and whether it exists
- This complements upstream scraper v0.6.18 credential diagnostics
Bumps version to 0.2.1.
- Set up logging.basicConfig() at module load so scraper logs reach stderr
(visible in docker logs instead of silently dropped)
- Replace StringIO-only capture with TeeHandler that writes to BOTH stderr
and the StringIO buffer, so logs remain visible in docker while also
being returned in tool responses
- Add explicit 'LOGIN TOOL CALLED' and 'DEBUG MODE ENABLED' log lines
at the start of the login tool so users can verify logging is active
Scraper debug output goes to stderr which is invisible in MCP stdio mode.
Add capture_logs context manager that attaches a StringIO handler to the
schwab_scraper logger during tool execution, then includes captured logs
in the response envelope when debug=True or on failure.
Applied to login() and refresh_session() which are the critical paths
for authentication diagnostics.
Patch RequestResponder.respond() and cancel() at startup to handle
the race where a notifications/cancelled arrives between handler
return and respond(), which crashes the session with
"AssertionError: Request already responded to".
Also improve build.sh to handle registry push failures gracefully
and auto-restart the container after building.