Commit Graph

29 Commits

Author SHA1 Message Date
cc1226defe fix(ci): use git -C instead of cd to avoid breaking working directory
All checks were successful
Build and Push Docker Image / build (push) Successful in 42s
The previous cd vendor/schwab-scraper caused the subsequent echo to write
mcp-server-commit.txt into the wrong path, which made the CI build fail.
2026-05-04 14:36:52 +00:00
4982b7d09f feat: log schwab-scraper and mcp-server commit SHAs at container startup
Some checks failed
Build and Push Docker Image / build (push) Failing after 39s
Bake commit SHAs into the Docker image via CI and log them on server
startup so it's easy to verify which version of schwab-scraper is running.
2026-05-04 14:31:01 +00:00
8c196b7f65 fix(server): repair login tool and harden upload_cookies
All checks were successful
Build and Push Docker Image / build (push) Successful in 38s
- login tool was calling api.login() which did not exist in unified_api,
  causing AttributeError on every invocation. Now calls login_to_schwab
  directly with proper credential fallback to config.json.
- upload_cookies hardcoded 'cookies.json' instead of get_cookies_path(),
  and did not handle wrapped export formats ({cookies: [...]}). Both fixed.
- Result envelopes now match the standard {success, data, error, error_type,
  retryable} shape used by other tools.
2026-04-28 04:15:18 +00:00
9f799ee264 feat(logging): trace credential source and config path in login tool
All checks were successful
Build and Push Docker Image / build (push) Successful in 39s
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.
2026-04-28 02:52:09 +00:00
d28b9d32f6 test(option-a): point SCHWAB_PLAYWRIGHT_URL to CLI's browserless endpoint
All checks were successful
Build and Push Docker Image / build (push) Successful in 38s
Temporarily switch from the local schwab-browser sidecar to the
browserless endpoint used by the working CLI (browser.local.ben.io).
This tests whether /assert 403 is caused by browser environment drift.
2026-04-28 02:39:20 +00:00
f51e61b8d7 fix(logging): configure stderr logging + tee capture, add debug confirmation
All checks were successful
Build and Push Docker Image / build (push) Successful in 37s
- 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
2026-04-28 02:16:31 +00:00
1999392df7 fix(mcp): capture scraper logs and return them in tool responses
All checks were successful
Build and Push Docker Image / build (push) Successful in 38s
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.
2026-04-28 02:04:58 +00:00
0c23b0e261 fix(ci): use CRT_READ_ONLY for cross-repo clone
All checks were successful
Build and Push Docker Image / build (push) Successful in 41s
actions/checkout@v3's Basic auth header pattern fails with 403 when
accessing a different private repository. Switch to a plain git clone
with the CRT_READ_ONLY token embedded in the HTTPS URL.
2026-04-28 01:40:42 +00:00
89bb29e563 v0.2.0 — remove vendored fork, upstream login feature
Some checks failed
Build and Push Docker Image / build (push) Failing after 39s
- Delete vendor/schwab-scraper/ (now fetched at CI build time)
- Delete schwab_mcp_custom/ package (LoginManager moved into server.py)
- server.py: add inline LoginManager with env-configurable rate limits
- server.py: orchestrate login safety checks at MCP layer, not in scraper
- Dockerfile: restore vendor-based build with fresh upstream checkout
- pyproject.toml: bump mcp>=1.27.0, playwright>=1.54.0
2026-04-28 00:36:46 +00:00
2de3b709d8 feat: expose automated login and session refresh with safety status tool 2026-04-27 19:47:55 +00:00
3d0352384b fix: monkey-patch mcp cancellation race crash (SDK issue #2416)
Some checks failed
Build and Push Docker Image / build (push) Failing after 28s
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.
2026-04-25 05:20:20 +00:00
61073b2b69 fix: vendor-based Docker build, playwright upgrade, and CI cross-repo checkout
Some checks failed
Build and Push Docker Image / build (push) Failing after 34s
- Dockerfile now installs schwab-scraper from vendor/ dir (no git needed)
- Upgrade playwright to latest to match browserless chromium container
- CI workflow checks out schwab-scraper into vendor/ before build
- Add scripts/build.sh for local builds via docker-test
- Add curl to runtime image for compose healthcheck
- Increase memory limit to 512M for large account position scraping
2026-04-25 01:16:55 +00:00
9b453e5bb6 fix(ci): use .netrc for HTTPS git auth instead of URL-embedded token
Some checks failed
Build and Push Docker Image / build (push) Failing after 9s
2026-04-25 01:03:42 +00:00
5a961a3f28 fix(ci): use username:token format for HTTPS git auth
Some checks failed
Build and Push Docker Image / build (push) Failing after 9s
2026-04-25 01:00:47 +00:00
d212078420 fix(ci): install git in builder and pass token for private dependency
Some checks failed
Build and Push Docker Image / build (push) Failing after 19s
The builder image needs git to clone the schwab-scraper SSH dependency.
Uses git insteadOf to redirect SSH URLs to HTTPS with CR_PAT in CI.
2026-04-25 00:58:43 +00:00
8a73226523 fix: update scraper dep, add curl for healthcheck, remove stale source
Some checks failed
Build and Push Docker Image / build (push) Failing after 34s
- Update schwab-scraper to f52774b (optimized lot extraction polling,
  faster account switching with selector-based waits)
- Install curl in Docker image so compose healthcheck works
- Remove bundled schwab_scraper/ source (now installed via git dep)
- Increase memory limit to 512M for large account position scraping
2026-04-25 00:54:50 +00:00
04087ee6f9 chore: use git repository for schwab-scraper dependency
Some checks failed
Build and Push Docker Image / build (push) Failing after 9s
2026-04-24 22:48:25 +00:00
005162ce0e fix(positions): further improve lot extraction robustness for large accounts
All checks were successful
Build and Push Docker Image / build (push) Successful in 29s
2026-04-24 21:35:26 +00:00
a05ba3b8a8 fix(positions): sync latest scraper fixes from main repository
All checks were successful
Build and Push Docker Image / build (push) Successful in 36s
2026-04-24 21:34:38 +00:00
429a2832fd Fix TypeError: Object of type MorningstarData is not JSON serializable
All checks were successful
Build and Push Docker Image / build (push) Successful in 29s
2026-04-24 05:09:45 +00:00
3fbabfff16 Update Playwright to 1.58.0 and pyee to >=13.0.0 to fix version mismatch
All checks were successful
Build and Push Docker Image / build (push) Successful in 36s
2026-04-24 05:02:23 +00:00
ad4d7317f4 Downgrade playwright to 1.50.0 to fix version mismatch with browserless server
All checks were successful
Build and Push Docker Image / build (push) Successful in 34s
2026-04-24 04:48:07 +00:00
342167e788 Add local helper script for cookie uploading
All checks were successful
Build and Push Docker Image / build (push) Successful in 30s
2026-04-24 02:28:56 +00:00
e14e060576 Add local helper script for cookie uploading
All checks were successful
Build and Push Docker Image / build (push) Successful in 34s
2026-04-24 02:01:38 +00:00
5f038b753f Add upload_cookies tool for manual session provision
All checks were successful
Build and Push Docker Image / build (push) Successful in 30s
2026-04-24 01:54:45 +00:00
650ea2d087 Fix build: Bundle schwab_scraper source and use local dependencies
All checks were successful
Build and Push Docker Image / build (push) Successful in 34s
2026-04-24 01:50:20 +00:00
02ac293692 Fix build: Try token-only URL format for Gitea dependency
Some checks failed
Build and Push Docker Image / build (push) Failing after 11s
2026-04-24 01:48:17 +00:00
76e19a82dc Fix build: Switch to HTTPS for private dependency using CR_PAT
Some checks failed
Build and Push Docker Image / build (push) Failing after 16s
2026-04-24 01:42:12 +00:00
299b1bbc5e Initial commit: Hybrid MCP Light setup for Schwab
Some checks failed
Build and Push Docker Image / build (push) Failing after 48s
2026-04-24 01:31:55 +00:00