Commit Graph

21 Commits

Author SHA1 Message Date
Alexander Whitestone
f862ffde93 Merge pull request #6 from Alexspayne/feat/mission-control-v2 2026-02-21 12:59:03 -05:00
Alexspayne
f9b84c1e2f feat: Mission Control v2 — swarm, L402, voice, marketplace, React dashboard
Major expansion of the Timmy Time Dashboard:

Backend modules:
- Swarm subsystem: registry, manager, bidder, coordinator, agent_runner, swarm_node, tasks, comms
- L402/Lightning: payment_handler, l402_proxy with HMAC macaroons
- Voice NLU: regex-based intent detection (chat, status, swarm, task, help, voice)
- Notifications: push notifier for swarm events
- Shortcuts: Siri Shortcuts iOS integration endpoints
- WebSocket: live dashboard event manager
- Inter-agent: agent-to-agent messaging layer

Dashboard routes:
- /swarm/* — swarm management and agent registry
- /marketplace — agent catalog with sat pricing
- /voice/* — voice command processing
- /mobile — mobile status endpoint
- /swarm/live — WebSocket live feed

React web dashboard (dashboard-web/):
- Sovereign Terminal design — dark theme with Bitcoin orange accents
- Three-column layout: status sidebar, workspace tabs, context panel
- Chat, Swarm, Tasks, Marketplace tab views
- JetBrains Mono typography, terminal aesthetic
- Framer Motion animations throughout

Tests: 228 passing (expanded from 93)
Includes Kimi's additional templates and QA work.
2026-02-21 12:57:38 -05:00
Alexander Whitestone
77f33b82aa Merge pull request #5 from Alexspayne/claude/quality-analysis-mobile-testing-Ahsqb 2026-02-21 12:23:03 -05:00
Claude
c8aa6a5fbb feat: quality analysis — bug fixes, mobile tests, HITL checklist
Senior architect review findings + remediations:

BUG FIX — critical interface mismatch
- TimmyAirLLMAgent only exposed print_response(); dashboard route calls
  agent.run() → AttributeError when AirLLM backend is selected.
  Added run() → RunResult(content) as primary inference entry point;
  print_response() now delegates to run() so both call sites share
  one inference path.
- Added RunResult dataclass for Agno-compatible structured return.

BUG FIX — hardcoded model name in health status partial
- health_status.html rendered literal "llama3.2" regardless of
  OLLAMA_MODEL env var. Route now passes settings.ollama_model to
  the template context; partial renders {{ model }} instead.

FEATURE — /mobile-test HITL checklist page
- 22 human-executable test scenarios across: Layout, Touch & Input,
  Chat behaviour, Health, Scroll, Notch/Home Bar, Live UI.
- Pass/Fail/Skip buttons with sessionStorage state persistence.
- Live progress bar + final score summary.
- TEST link added to Mission Control header for quick access on phone.

TEST — 32 new automated mobile quality tests (M1xx–M6xx)
- M1xx: viewport/meta tags (8 tests)
- M2xx: touch target sizing — 44 px min-height, manipulation (4 tests)
- M3xx: iOS zoom prevention, autocapitalize, enterkeyhint (5 tests)
- M4xx: HTMX robustness — hx-sync drop, disabled-elt, polling (5 tests)
- M5xx: safe-area insets, overscroll, dvh units (5 tests)
- M6xx: AirLLM interface contract — run(), RunResult, delegation (5 tests)

Total test count: 61 → 93 (all passing).

https://claude.ai/code/session_01RBuRCBXZNkAQQXXGiJNDmt
2026-02-21 17:21:47 +00:00
Alexander Whitestone
7499690e10 Merge pull request #4 from Alexspayne/claude/implement-todo-item-61a2S 2026-02-21 11:59:10 -05:00
Claude
19af4ae540 feat: integrate AirLLM as optional high-performance backend
Adds the `bigbrain` optional dependency group (airllm>=2.9.0) and a
complete second inference path that runs 8B / 70B / 405B Llama models
locally via layer-by-layer loading — no GPU required, no cloud, fully
sovereign.

Key changes:
- src/timmy/backends.py   — TimmyAirLLMAgent (same print_response interface
                            as Agno Agent); auto-selects AirLLMMLX on Apple
                            Silicon, AutoModel (PyTorch) everywhere else
- src/timmy/agent.py      — _resolve_backend() routing with explicit override,
                            env-config, and 'auto' Apple-Silicon detection
- src/timmy/cli.py        — --backend / --model-size flags on all commands
- src/config.py           — timmy_model_backend + airllm_model_size settings
- src/timmy/prompts.py    — mentions AirLLM "even bigger brains, still fully
                            sovereign"
- pyproject.toml          — bigbrain optional dep; wheel includes updated
- .env.example            — TIMMY_MODEL_BACKEND + AIRLLM_MODEL_SIZE docs
- tests/conftest.py       — stubs 'airllm' module so tests run without GPU
- tests/test_backends.py  — 13 new tests covering helpers + TimmyAirLLMAgent
- tests/test_agent.py     — 7 new tests for backend routing
- README.md               — Big Brain section with one-line install
- activate_self_tdd.sh    — bootstrap script (venv + install + tests +
                            watchdog + dashboard); --big-brain flag

All 61 tests pass. Self-TDD watchdog unaffected.

https://claude.ai/code/session_01DMjQ5qMZ8iHeyix1j3GS7c
2026-02-21 16:53:16 +00:00
Claude
7619407b63 feat: add self-tdd watchdog — continuous test runner CLI
Adds `src/self_tdd/watchdog.py` with a `_run_tests()` function that
shells out to pytest and a `watch` command that polls on a configurable
interval, printing green on recovery and full short-traceback output on
regression. No files are modified and no commits are made automatically.

Usage:
    self-tdd watch            # default 60s interval
    self-tdd watch -i 15      # poll every 15s

Also adds 6 unit tests and wires the `self-tdd` entry point +
`src/self_tdd` wheel include into pyproject.toml.

https://claude.ai/code/session_01DMjQ5qMZ8iHeyix1j3GS7c
2026-02-21 16:36:56 +00:00
Claude
982c42ba45 Use TIMMY_STATUS_PROMPT in CLI status command
TIMMY_STATUS_PROMPT was defined in timmy/prompts.py and covered by
tests, but never wired into the application. The CLI status command
was passing a hardcoded inline string instead. Replace the inline
string with the canonical prompt and add two CLI tests that verify
the correct prompt is used.

https://claude.ai/code/session_01DMjQ5qMZ8iHeyix1j3GS7c
2026-02-21 16:17:55 +00:00
Alexander Whitestone
41a38bf6af Merge pull request #3 from Alexspayne/claude/add-missing-work-fRfyu 2026-02-20 15:49:08 -05:00
Claude
0d14be291a feat: persistent chat history with clear button
- Add dashboard/store.py: MessageLog dataclass singleton tracking
  user/agent/error messages for the lifetime of the server process
- agents.py: write each chat turn to MessageLog; add GET and DELETE
  /agents/timmy/history routes returning the history.html partial
- partials/history.html: render stored messages by role (YOU / TIMMY /
  SYSTEM); falls back to the Mission Control init message when empty
- index.html: chat-log loads history via hx-get on page start; new
  CLEAR button in panel header sends hx-delete to reset the log
- style.css: add .mc-btn-clear (muted, red-on-hover for the header)
- tests: autouse reset_message_log fixture in conftest; 5 new history
  tests covering empty state, recording, offline errors, clear, and
  post-clear state → 32 tests total, all passing

https://claude.ai/code/session_01KZMfwBpLuiv6x9GbzTqbys
2026-02-20 18:55:14 +00:00
Alexander Whitestone
c9ac2d9d17 Merge pull request #2 from Alexspayne/claude/timmy-time-bootstrap-f3TDe 2026-02-20 08:06:17 -05:00
Claude
cf99c06b97 feat: integrate Bootstrap 5.3 into Mission Control dashboard
- Add Bootstrap 5.3.3 CSS/JS via CDN to base.html with dark theme (data-bs-theme="dark")
- Rework index.html to use Bootstrap grid (container-fluid, row, col-md-3/9), card components, and form utilities
- Update health_status partial to use Bootstrap card-header/card-body structure
- Rewrite style.css to override Bootstrap CSS variables for the dark mission-control palette; replace .badge.up/down/ready with .mc-badge-* modifiers; adapt layout and mobile breakpoints to Bootstrap grid

All 27 tests pass.

https://claude.ai/code/session_01KZMfwBpLuiv6x9GbzTqbys
2026-02-20 02:51:41 +00:00
Alexander Whitestone
acace792aa Merge pull request #1 from Alexspayne/claude/run-tests-IYl0F 2026-02-19 14:59:57 -05:00
Claude
7829536952 ci: mobile-friendly test results via GitHub Actions
Workflow upgrades:
- permissions: checks: write + pull-requests: write (required for annotations)
- pytest now outputs --junitxml=reports/junit.xml and --cov-report=xml
- EnricoMi/publish-unit-test-result-action@v2: posts a "pytest results"
  check annotation AND a PR comment showing pass/fail counts with
  per-test breakdown — both visible in the GitHub mobile app
- actions/upload-artifact@v4: uploads coverage.xml (14-day retention)
  browsable from the Actions tab on mobile

README:
- Live test badge at the top (green/red, links to Actions run history)

.gitignore:
- Add reports/ so generated junit.xml + coverage.xml are never committed

https://claude.ai/code/session_01M4L3R98N5fgXFZRvV8X9b6
2026-02-19 19:41:01 +00:00
Claude
a84225b25a docs: architecture diagram + config reference table in README
- Mermaid graph showing Browser/Phone → FastAPI → Timmy → Ollama/SQLite
  data flow; makes the local-first architecture immediately obvious
- Configuration table: OLLAMA_URL, OLLAMA_MODEL, DEBUG with defaults
- Updated project layout to include src/config.py and .env.example

https://claude.ai/code/session_01M4L3R98N5fgXFZRvV8X9b6
2026-02-19 19:31:57 +00:00
Claude
c1d47eb883 chore: pydantic-settings config, logging, CI workflow
Config (src/config.py):
- pydantic-settings Settings class: OLLAMA_URL, OLLAMA_MODEL, DEBUG
- Reads from .env (gitignored) with sane defaults
- settings singleton imported by health.py and agent.py

Removes two hardcodes:
- health.py: OLLAMA_URL="http://localhost:11434" → settings.ollama_url
- agent.py:  Ollama(id="llama3.2")              → settings.ollama_model

app.py:
- logging.basicConfig at INFO — requests/errors now visible in terminal
- docs_url/redoc_url gated on settings.debug (off by default)

pyproject.toml:
- pydantic-settings>=2.0.0 added to main dependencies
- hatch wheel config updated to include src/config.py

.env.example: documents all three env vars with inline comments
.gitignore: add !.env.example negation so the template gets committed

.github/workflows/tests.yml: runs pytest --cov on every push/PR
(ubuntu-latest, Python 3.11, pip cache)

All 27 tests pass.

https://claude.ai/code/session_01M4L3R98N5fgXFZRvV8X9b6
2026-02-19 19:31:48 +00:00
Claude
46b848a2d7 fix: chat input correctness and mobile UX
- after-request → after-settle: scrollChat() was firing before HTMX
  swapped the new message into the DOM, so the chat log didn't scroll
  to the new message. after-settle fires post-swap, post-settle.

- hx-sync="this:drop": prevents duplicate submissions if the user taps
  SEND a second time while a slow Ollama response is in flight.

- hx-disabled-elt="find button": disables SEND button visually during
  a pending request; paired with hx-sync for belt-and-suspenders.

- autocorrect="off" autocapitalize="none" spellcheck="false": iOS
  autocorrect mangles model names (llama3.2 etc.) and autocapitalize
  uppercases every message's first word. Both are wrong for a terminal-
  style chat interface.

- enterkeyhint="send": tells the iOS/Android soft keyboard to label
  the Return key "Send" instead of the generic return arrow.

https://claude.ai/code/session_01M4L3R98N5fgXFZRvV8X9b6
2026-02-19 19:24:20 +00:00
Claude
f9ccfa9177 feat: mobile-optimized layout + phone access instructions
CSS:
- Responsive grid: 2-col desktop → 1-col mobile (≤768px)
- Sidebar becomes horizontal scroll strip on mobile
- 100dvh for correct mobile viewport height
- env(safe-area-inset-*) for iPhone notch/home bar
- 16px input font-size prevents iOS auto-zoom
- 44px min touch targets on input + send button
- touch-action: manipulation stops double-tap zoom
- overscroll-behavior: none prevents iOS bounce bleed
- -webkit-overflow-scrolling: touch for smooth scroll

HTML (base.html):
- viewport-fit=cover for full-bleed on notched iPhones
- apple-mobile-web-app-capable + status-bar-style meta
- theme-color meta (#060d14)

README:
- "Access from your phone" section with exact steps:
  --host 0.0.0.0, ipconfig getifaddr en0, same-WiFi note

https://claude.ai/code/session_01M4L3R98N5fgXFZRvV8X9b6
2026-02-19 19:15:43 +00:00
Claude
03f4027f43 docs: rewrite README as human-friendly Mac quickstart
Step-by-step clone → venv → install → Ollama → run sequence,
what to expect in the browser, troubleshooting section for
common Mac failure modes.

https://claude.ai/code/session_01M4L3R98N5fgXFZRvV8X9b6
2026-02-19 19:11:42 +00:00
Claude
5e7d805245 feat: scaffold Timmy Time Mission Control (v1.0.0 Genesis)
- src/timmy/ — Agno agent wrapper (llama3.2 via Ollama, SQLite memory, TIMMY_SYSTEM_PROMPT)
- src/dashboard/ — FastAPI + HTMX + Jinja2 Mission Control UI
  - /health + /health/status (Ollama ping, HTMX 30s poll)
  - /agents list + /agents/timmy/chat (HTMX form submission)
- static/style.css — dark terminal mission-control aesthetic
- tests/ — 27 pytest tests (prompts, agent config, dashboard routes); no Ollama required
- pyproject.toml — hatchling build, pytest configured with pythonpath=src

https://claude.ai/code/session_01M4L3R98N5fgXFZRvV8X9b6
2026-02-19 19:05:01 +00:00
Alex Payne
6b5e3f694c Initial commit 2026-02-05 05:17:22 -05:00