Commit Graph

63 Commits

Author SHA1 Message Date
Patrick Plate 38d26adb1f Merge branch 'fix/mcp-image-gen/heretic-flux2-bugfixes' 2026-04-10 19:21:51 +02:00
Patrick Plate ea0c5d39c4 fix(mcp-image-gen): fix Heretic/FLUX2 integration bugs
- Fix syntax error in server.py (dangling docstring lines)
- Correct model filename: flux-2-klein-4b.safetensors (without -fp8)
- Fix _WORKFLOW_REGISTRY key to match actual downloaded filename
- Update get_models() to always include registry models as fallback
- Fix test expectations to match corrected model names
- All 37 tests passing
2026-04-10 19:21:51 +02:00
Patrick Plate 8f24168dcd fix(bigmind): fix FTS sync in delete_chunks_before — use rowid DELETE not rebuild
conversation_chunks_fts is a standalone FTS5 table (no content= option).
The old INSERT ... VALUES('rebuild') is a no-op on standalone tables and
left deleted chunks searchable in the FTS shadow tables.

Fix: collect IDs before deletion, explicitly DELETE FROM conversation_chunks_fts
WHERE rowid IN (...) before removing from the main table. This keeps FTS
in sync after every vacuum call.

Tests: 303/303 passing. Vacuum tests now pass for the right reason.
2026-04-07 23:41:13 +02:00
Patrick Plate cda8946c75 docs(cannamanage): add CannaManage wiki pages and mockup images
- 11 wiki pages: CannaManage-Home + 01-10 covering full Phase 0 docs
- 5 mockup images in docs/wiki/images/
- Updated _Sidebar.md with CannaManage section
2026-04-06 11:21:35 +02:00
Patrick Plate 97ccafc0d7 Merge branch 'docs/cannamanage/phase0-docs' 2026-04-06 11:07:44 +02:00
Patrick Plate c25a97c37b docs(cannamanage): add complete Phase 0 documentation suite
- 01-PROJECT-CHARTER.md: project charter with Gantt chart and risk register
- 02-USER-STORIES.md: 25 user stories with MoSCoW priorities and ACs
- 03-ARCHITECTURE.md: system architecture, ERD (8 entities), multi-tenancy design
- 04-FLOWCHARTS.md: 5 business logic flow charts (distribution, recall, etc)
- 05-API-SPEC.md: REST API spec (7 controllers, 30+ endpoints)
- 06-WIREFRAMES.md: 6 screen wireframes with AI-generated mockup images
- 07-CODING-STANDARDS.md: Java 21 standards, Git strategy, compliance rules
- 08-TEST-PLAN.md: 26 test cases, JaCoCo coverage gates
- 09-DEPLOYMENT-GUIDE.md: Hetzner Docker Compose + Gitea CI/CD pipeline
- README.md + CHANGELOG.md + 10-RETROSPECTIVE.md
- 5 AI-generated UI mockup images (Flux Schnell/ComfyUI)
2026-04-06 11:07:35 +02:00
Patrick Plate a72a2efceb feat(mcp-image-gen): merge ComfyUI auto-start health check + systemd service 2026-04-06 10:43:44 +02:00
Patrick Plate c662a5237b feat(mcp-image-gen): add ComfyUI auto-start health check + systemd service
Option A: Add lifespan context manager to server.py
- _ping_comfyui(): async health check against /system_stats
- check_and_start_comfyui(): ping on startup; if down, launches ComfyUI
  via subprocess.Popen from COMFYUI_DIR (.venv/bin/python main.py)
  with HSA_OVERRIDE_GFX_VERSION=11.0.0 injected for AMD ROCm
- Polls up to 30s for readiness after auto-start
- New env var: COMFYUI_DIR (default ~/ComfyUI)
- FastMCP lifespan= wired in; 34/34 tests still passing

Option B: Add comfyui.service systemd user service file
- Install: cp mcp/mcp-image-gen/comfyui.service ~/.config/systemd/user/
- Enable: systemctl --user enable --now comfyui
- Sets HSA_OVERRIDE_GFX_VERSION=11.0.0, WorkingDirectory=%h/ComfyUI
- Restart=on-failure, logs via journald

docs: Update mcp-image-gen-ComfyUI-Setup.md
- New Step 4: systemd service install + linger instructions
- Step 5: manual start (moved from old Step 4)
- Step 6/7 renumbered; COMFYUI_DIR env var documented
- Architecture diagram added; troubleshooting rows updated
2026-04-06 10:43:36 +02:00
Patrick Plate 0ff3f20589 feat(mcp-image-gen): merge name and count params into main 2026-04-06 07:45:45 +02:00
Patrick Plate 79f1e6d65f feat(mcp-image-gen): add name and count params to generate_image
- Add name (str) param: filename prefix saved as {name}_{timestamp}_{seed}.png
- Add count (int, 1-10) param: generate N images in one call
- Extract _sanitize_name() helper: strips special chars, collapses underscores, caps at 64 chars
- Extract _build_filename() helper: pure function for testable filename construction
- Extract _generate_single() coroutine: clean loop body for batch generation
- Fixed seed batches increment seed per image (seed+i-1) for deterministic variation
- random seed (-1) batches give independent random seeds per image
- Partial batch failures continue (error TextContent in slot, remaining images proceed)
- Returns flat interleaved [Text1, Image1, Text2, Image2, ...] list
- 34/34 tests passing (was 19, added 15 new tests)
2026-04-06 07:45:37 +02:00
Patrick Plate 79a2e1d10a Merge branch 'feat/roo/ollama-backed-modes' 2026-04-05 10:27:37 +02:00
Patrick Plate 78de59243c feat(roo): add Ollama-backed doc-writer and ask-lite modes 2026-04-05 10:27:26 +02:00
Patrick Plate db8505fef1 merge: docs/wiki/promote-webscraper-search-hint → main 2026-04-05 10:11:37 +02:00
Patrick Plate 4107b8ede2 docs: promote webscraper_search_hint in wiki and mode rules 2026-04-05 10:11:33 +02:00
Patrick Plate 4202094f01 merge: fix/webscraper/search-hint-quality → main 2026-04-05 09:57:47 +02:00
Patrick Plate 62c3b67e66 fix(mcp-webscraper): improve search_hint quality — quote_plus, richer hint, dedup, result_count
- Use urllib.parse.quote_plus instead of str.replace(' ', '+') for correct
  URL encoding of special chars (&, %, +, #, =)
- Add search_url field to return dict so caller can verify/debug the query
- Add result_count field for quick summary without len(results)
- Deduplicate results by URL via seen_urls set
- Filter cards with both empty title AND empty snippet
- Richer hint string: 'Title (url): snippet[:120]' pipe-separated
- Max-results guard now breaks early (no over-fetching)
- 5 new tests (23→28): URL encoding, result_count, dedup, empty filter, hint format
2026-04-05 09:57:43 +02:00
Patrick Plate c2dd262727 chore(roo): document git-based wiki workflow in rules, skill, and README 2026-04-05 09:53:08 +02:00
Patrick Plate 9c2422d0a7 chore(roo): document git-based wiki workflow in rules, skill, and README
- mcp-builder rules: add wiki/ to structure diagram, add Wiki Update
  Workflow section (MANDATORY), update After Building a Server checklist
- gitea-push skill: add wiki deploy as a valid use case
- README.md: add wiki section with deploy_wiki.sh pointer, add
  mcp-image-gen to MCP servers table
2026-04-05 09:53:05 +02:00
Patrick Plate 9a8403ad57 docs(wiki): migrate to git-based workflow with persistent wiki/ clone 2026-04-05 09:48:22 +02:00
Patrick Plate dabdda167f docs(wiki): migrate to git-based workflow with persistent wiki/ clone
- Extract all wiki content from create_wiki_pages.py into docs/wiki/pages/*.md
- Add docs/wiki/deploy_wiki.sh: copies pages to wiki/ repo, commits, pushes
- Add /wiki/ to .gitignore (anchored — does not affect docs/wiki/)
- 12 pages: Home, MCP-Servers-Overview, mcp-image-gen, ComfyUI-Setup,
  mcp-webscraper (8 tools incl. search_hint), BigMind (schema v8),
  Development-Conventions, Java-Projects, Java-wellmann-shop,
  Java-mss-failsafe, Java-Architecture, _Sidebar
- Workflow: edit docs/wiki/pages/*.md → ./docs/wiki/deploy_wiki.sh
2026-04-05 09:48:19 +02:00
Patrick Plate da90781cad Merge feat/webscraper/brave-search-hint into main 2026-04-05 09:37:38 +02:00
Patrick Plate 2ab847f51d feat(webscraper): add Brave Search hint tool and User-Agent header
- Add webscraper_search_hint() tool using Brave Search as backend
  (no CAPTCHA/GDPR consent wall, works with plain httpx)
- Add User-Agent header to _fetch_page() — fixes 403 on Wikipedia,
  Feynman Lectures, and other sites that block headless requests
- Add 5 new tests for search hint (23 total, 90% coverage)

Brave Search URL: https://search.brave.com/search?q={query}&source=web
Use sparingly — once per research task as orientation, not in loops
2026-04-05 09:37:30 +02:00
Patrick Plate d5510f590e Added new picture for bigmind page 2026-04-04 20:03:59 +02:00
Patrick Plate cf102e8b3e fix(bigmind): render achievement card background images via inline style 2026-04-04 19:29:15 +02:00
Patrick Plate 13659fd414 fix(bigmind): add background-image inline style to achievement card ach-image divs
The .ach-image div had correct CSS dimensions (64x64) and background-size:cover
but was missing the inline style="background-image: url(...)" — so the div
rendered as an empty circle. Fixed by extracting img_url variable and applying
it as style attribute in the f-string. All 39 achievement PNGs now load.

303/303 tests passing.
2026-04-04 19:27:24 +02:00
pplate c68acdd030 chore(bigmind): rename timestamp badge PNGs to achievement IDs
- Renamed 19 timestamp-named PNGs (20260404_*) to match original
  achievement IDs in profile_builder.py compute_achievements() order:
  first_breath, first_thought, eureka, honest_mind, scholar,
  deep_knowledge, scientist, veteran, on_fire, storyteller,
  night_owl, speed_thinker, first_handshake, birthday, shared_mind,
  frugal_mind, quarter_million, token_millionaire, sniper
- Deleted 2 duplicate/excess timestamp PNGs
- Added image= field to all 19 original _add() calls in
  profile_builder.py so every achievement now has a PNG path
- All 39 achievements (19 original + 20 tiered) now have image fields
- 303/303 tests pass
2026-04-04 19:09:01 +02:00
pplate e61c9c98f5 fix(bigmind): fix static image path, JS string concat in achievements; add networker badge PNGs 2026-04-04 19:01:56 +02:00
Patrick Plate 50488109aa Merge branch 'feat/bigmind/achievements-rework' 2026-04-04 18:50:55 +02:00
pplate dd244a8e6c feat(bigmind): add tiered AI-generated achievement badges with image rendering 2026-04-04 18:50:45 +02:00
Patrick Plate ee07dec4d3 Merge feat/bigmind/profile-image-gallery into main 2026-04-04 14:52:36 +02:00
Patrick Plate 67b8b44408 feat(bigmind): profile image + AI image gallery (schema v8)
- web.py: add /profile-image route (serves most-recent gallery PNG)
  add /gallery/image/<filename> route (per-image serving)
  add /gallery route (renders gallery page from DB)
  add _get_profile_image_path() helper
- web_render.py: replace emoji avatar with <img src=/profile-image>
  onerror fallback to 🧠 emoji
  add .nav bar with Profile/Gallery links to both pages
  add _render_gallery_html() full gallery page renderer
  add gallery CSS: .gal-grid, .gal-card, .gal-img, .gal-info, etc.
- db.py: bump SCHEMA_VERSION 7→8
  add gallery_images table (id, filename, prompt, tags, model,
    created_at, width, height, file_size_bytes)
  add _migrate_v7_to_v8() migration function
  add init_db() hook for v<8 migration
- tests: update test_schema_version_is_7→8 in test_db.py and
  test_feature7_live_sessions.py; add gallery_images to expected tables

Storage strategy: Option B (filesystem + DB metadata)
Images in ~/.mcp/bigmind/gallery/, metadata in SQLite
Pre-populated with 5 lumen_profiles images (seeds 2409122067,
764633840, 1367851518, 3135233944, 568659042)

Tests: 297/297 passing
2026-04-04 14:52:30 +02:00
Patrick Plate a852e2ec0d docs: merge Java wiki header images 2026-04-04 14:40:57 +02:00
Patrick Plate a275a18e58 docs: add Java project wiki header images 2026-04-04 14:40:50 +02:00
Patrick Plate 20228f8d46 docs: add wiki creation script 2026-04-04 14:33:31 +02:00
Patrick Plate 3b1d5bf35c docs: add wiki header images generated by mcp-image-gen 2026-04-04 14:22:29 +02:00
Patrick Plate e12479a63a Merge branch 'feat/mcp-image-gen/tests-and-lumen-profiles' 2026-04-04 14:09:19 +02:00
Patrick Plate 64c0a62b49 feat(mcp-image-gen): add test suite (19 tests) and Lumen profile pictures 2026-04-04 14:09:11 +02:00
Patrick Plate f24aafec69 fix(mcp-image-gen): merge HF authenticated download fix 2026-04-04 12:28:28 +02:00
pplate 4165018ab2 fix(mcp-image-gen): fix HuggingFace authenticated download instructions
FLUX.1-schnell is a gated model — bare wget returns HTTP 401.

- Replace bare wget with huggingface-cli login + download (Option A)
- Add wget with Authorization header as Option B
- Add license acceptance prerequisite (huggingface.co gated repo)
- Add token creation link (huggingface.co/settings/tokens)
- Add fp8 quantized variant as alternative (~8.1GB, faster inference)
- Add download size note (~8GB, 10-30min)
2026-04-04 12:28:20 +02:00
pplate 2f01ff0639 fix(mcp-image-gen): correct ComfyUI install instructions in USAGE.md
ComfyUI is NOT on PyPI — `pip install comfyui` fails with
"No matching distribution found". Remove the wrong Option A.

Replace with:
- Warning note that pip install does not work
- Only correct method: git clone from GitHub + pip install -r requirements.txt

ROCm status confirmed: rocm-smi 3.1.0 / ROCm-SMI-LIB 7.7.0 installed.
2026-04-04 12:20:28 +02:00
Patrick Plate 7a21b02081 Merge branch 'feat/mcp-tool-limit' 2026-04-04 12:16:15 +02:00
pplate 1340d3098f fix(mcp): finalize alwaysAllow restrictions in mcp.json 2026-04-04 12:16:14 +02:00
pplate 8cbeb6571b docs(mcp-image-gen): add USAGE.md and expand tests to 19 2026-04-04 12:16:03 +02:00
pplate b0ce5c55ed fix(mcp): further restrict alwaysAllow in mcp.json after merge 2026-04-04 12:15:58 +02:00
pplate ef960a4b59 feat(mcp): limit tools to fix overload (#1)
Restrict alwaysAllow in .roo/mcp.json to essential tools per server:
- git: 5 tools (status, diff, log, add, commit) — was wildcard *
- gitea: 8 tools (create/list/get/edit issues, PR, repo) — was wildcard *
- playwright: 6 tools (navigate, click, fill, screenshot, close, new_context) — was unrestricted

Reduces total registered tools from 105+ to ~40, eliminating context
bloat and VS Code/Roo registration failures.

Closes #1
2026-04-04 12:03:07 +02:00
Patrick Plate 93b250c7a1 Merge branch 'chore/roo/mcp-config-update' 2026-04-04 11:54:33 +02:00
Patrick Plate 0a58541f1e chore(roo): update mcp.json config 2026-04-04 11:54:26 +02:00
Patrick Plate b30919cabb Merge branch 'feat/mcp-image-gen/comfyui-image-generation-server' 2026-04-04 11:49:44 +02:00
Patrick Plate 8112ff2f12 feat(mcp-image-gen): scaffold ComfyUI-backed image generation MCP server
- FastMCP server with 4 tools: generate_image, list_available_models,
  get_generation_status, get_output_directory
- ComfyUI REST API client (httpx) polling lifecycle
- FLUX.1-schnell workflow JSON template
- Dual output: TextContent (path + seed) + ImageContent (base64 PNG)
- 14 passing pytest tests with respx HTTP mocking
- ROCm/AMD RX 7900 XTX optimized setup in README
- Ollama Linux migration path documented (future)
2026-04-04 11:49:31 +02:00
Patrick Plate ba7d4bc248 feat(roo): merge gitea-playwright-mcp into main 2026-04-04 11:14:53 +02:00