Commit Graph

46 Commits

Author SHA1 Message Date
myron b19e8e1b25 Phase 2: facts_collector TTL guards — reduce external polling
- Proxmox: skip if data < 10 min old (was: every 3 min unconditionally)
- Ollama: skip if data < 15 min old (model list rarely changes)
- Site health: skip if data < 5 min old (was: 7 HTTP calls every 3 min)
- Home Assistant: removed entirely (HA agent pushes 212 entities every 30s)

Fast local reads (CPU/mem/network pings) still run every 3 min. External
HTTP calls now fire only when data is actually stale. Saves ~140 site-check
HTTP calls/hour and ~60 Proxmox API calls/hour in steady state.
2026-06-11 21:37:26 +00:00
myron 27a0259e64 Phase 10: Memory Core — auto-extraction knowledge graph
- reactor.py v9.0.0+: memory_extract + memory_store handlers (21 handlers)
  - handle_memory_extract: Haiku-powered fact extraction from conversations
  - handle_memory_store: explicit memory insertion from voice commands
  - FastAPI: /memory/facts CRUD, /memory/context (relevance retrieval), /memory/stats
- chat.php: Tier 0.9k voice commands (remember/forget/recall/memory status)
  - Memory context injected into Groq + Claude system prompts
  - Auto-trigger memory_extract after every LLM response (async, non-blocking)
- memory.php: new API endpoint proxying Arc Reactor memory routes
- api.php: added memory route
- admin/index.php: MEMORY CORE nav + tab (browse by category, search, add/delete facts)
- index.html: MEMORY count in bottom bar (polls every 60s)
2026-06-11 12:33:05 +00:00
myron 93d7594c4f Phase 9: Clearance Protocol — intercept, approve/deny, HUD, voice commands
- reactor.py v9.0.0: clearance endpoints, watchdog, create_job intercept
- arc.php: 7 clearance actions (pending/history/approve/deny/rules/rule_update/create)
- chat.php: Tier 0.9j voice commands — approve/deny/status clearance
- index.html: clearance banner, CLEARANCE tab with pending requests + rules + history
- admin/index.php: CLEARANCE nav + tab with full CRUD for rules and approve/deny UI
2026-06-11 12:19:14 +00:00
myron aaf07edacb Phase 8: Mission Directives — OKR/goal tracking with AI review
- DB: directives, directive_key_results, directive_links tables
- reactor.py v8.0.0: directive_review handler — fetches active directives + KRs + links, Claude generates executive progress briefing, injects into conversations
- directives.php: new API endpoint (list/get/save/delete/key_result_update/link/summary)
- api.php: routes directives/* endpoint
- admin/index.php: Directives nav + tab — objective cards with progress bars, editor with multi-KR builder (title/current/target/unit), AI Review button per directive and global
- index.html: DIRECTIVES tab — collapsible objective cards with progress bars, KR counts, AI Review button, link to admin
- chat.php: Tier 0.9i directive review detection; daily briefing now includes active directive progress %

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 11:59:44 +00:00
myron b6c417948e Phase 7: Mission Ops — multi-step automated workflow engine
- DB: missions, mission_steps, mission_runs tables
- reactor.py v7.0.0: handle_run_mission, _execute_mission, mission_trigger_loop (schedule/guardian_event/email_keyword triggers), {{template}} substitution across steps, full CRUD REST endpoints
- arc.php: missions/mission_get/mission_runs/mission_create/mission_update/mission_delete/mission_run/mission_toggle actions
- admin/index.php: Mission Ops tab with visual workflow builder (trigger config, step cards with ↑↓, JSON payload editor, continue-on-failure flag), run history with step-level detail, enable/disable toggle
- index.html: MISSIONS tab with collapsible mission cards, RUN NOW button per mission, live run result feedback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 11:49:07 +00:00
myron 8229f52b8b Phase 6: Comms v2 — send email, compose, schedule, meeting prep
- arc.php: comms_sent / comms_sent_get / comms_sent_delete + outbox backend
- chat.php: Tier 0.9f-0.9h — send_email, compose_email, schedule_event, meeting_prep voice detection
- index.html: COMMS tab SEND REPLY button, COMPOSE modal, OUTBOX section, onArcJobStarted routes comms jobs to COMMS tab
- admin/index.php: OUTBOX nav + tab, send_reply/compose_email/outbox_list/outbox_delete PHP actions, outboxCompose() modal, triageSendReply() inline

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 05:05:00 +00:00
myron f15225994a Phase 5: Guardian Mode — continuous awareness + proactive AI alerts
- reactor.py: v5.0.0; guardian_loop() background task scans all agents every
  120s; checks CPU/mem/disk thresholds + agent offline transitions + failed
  services; 10min cooldown per metric to debounce repeat alerts; AI analysis
  of critical findings via Claude; proactive chat injection into conversations
  table; handle_sitrep() generates Iron Man-style full/brief situation reports;
  handle_guardian_config() reads/writes guardian_config table; FastAPI endpoints:
  /guardian/status, /guardian/events, /guardian/events/{id}/ack, /guardian/chat
- arc.php: guardian_status, guardian_events, guardian_ack, guardian_chat actions
- chat.php: Tier 0.9d detects sitrep/situation report/how are things commands
- index.html: GUARDIAN tab in right panel; guardian event list with severity
  badges + AI analysis; ACK / ACK ALL buttons; Guardian badge in bottom bar
  (green/amber/red pulse based on unread critical events); proactive chat
  polling every 30s surfacing guardian-injected messages as JARVIS speech
- admin/index.php: GUARDIAN MODE tab; status bar + events table + config modal;
  inline SITREP runner with result modal; threshold configuration
2026-06-11 04:52:08 +00:00
myron 56c9e2d914 Phase 4: Vision Protocol — screenshot + Claude vision
- reactor.py: v4.0.0; adds screenshot, vision, sysinfo handlers;
  _dispatch_agent_command() shared helper; FastAPI /screenshots endpoints
- jarvis-agent.py: v3.0; screenshot command handler (scrot/import/fbcat/
  ImageMagick render fallback); sysinfo command returns structured snapshot;
  detect_capabilities() advertises screenshot + sysinfo caps
- chat.php: Tier 0.9c detects screenshot (show screen on X, screenshot X)
  and sysinfo (check status of X) voice/text commands
- arc.php: screenshots, screenshot_get, screenshot_delete actions
- index.html: VISION PROTOCOL lightbox overlay; SCREENSHOT + SYSINFO
  buttons on each online agent card; keyboard Escape to close
- admin/index.php: VISION PROTOCOL tab under ARC REACTOR nav; gallery view
  with image thumbnails + analysis; take screenshot modal; purge action
2026-06-11 04:42:21 +00:00
myron 068aff27b4 Phase 3: Comms Protocol + Field Protocol
- chat.php: Add Tier 0.9a (gmail_triage), Tier 0.9b (remote_exec) detection;
  refactor arc submit into arcSubmitJob() helper; natural-language triggers for
  email triage (check my email, triage inbox) and remote exec (restart X on Y,
  run X on Y, get logs from X on Y)
- arc.php: Add triage and triage_action endpoints (read/update email_triage table)
- index.html: Add COMMS tab with triage card UI (filter bar, category badges,
  draft reply viewer, copy/dismiss actions); loadComms() with 8s polling;
  onArcJobStarted() routes gmail_triage jobs to COMMS tab
- admin/index.php: Add GMAIL TRIAGE section under COMMUNICATIONS nav; triage_list/
  triage_action/triage_run PHP actions; loadTriage() JS with full table + draft
  modal; triageRunNow() submits gmail_triage job to Arc Reactor
2026-06-11 04:33:43 +00:00
myron 9ea43c852b feat: Phase 2 — Intel Protocol + Iron Protocol
Arc Reactor v2.0:
- research handler: DDG search → async page fetch → trafilatura extraction → Claude synthesis
- tool_loop handler: multi-step agent loop (up to 200 iter) with web_search, fetch_url, jarvis_agents, jarvis_alerts, current_time tools
- llm handler: multi-provider router (Claude/Groq/Ollama)
- /jobs/recent endpoint for HUD polling
- Phase 1 handlers preserved (ping/echo/shell)

chat.php — Tier 0.9 Intel Protocol (before KB intent engine):
- Detects: research/investigate/deep-dive/look up/find out about → research job
- Detects: step-by-step/figure out/analyze and report → tool_loop job
- Returns arc_job ID in response for UI polling
- Depth modifiers: quick/standard/deep

index.html:
- INTEL tab in right panel tab bar
- Research result cards with expand/collapse, synthesis, sources, status
- Live polling (4s) when INTEL tab is active + active jobs present
- Auto-switches to INTEL tab when research is triggered from chat
- intelPrompt() pre-fills chat input for new research

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 04:16:29 +00:00
myron 7013a80428 feat: Phase 1 — Arc Reactor Core Daemon
- Python asyncio daemon (/opt/jarvis-arc/reactor.py) running on 127.0.0.1:7474
- systemd service (jarvis-arc) auto-starts with MySQL dependency
- arc_jobs + arc_status MySQL tables for async job queue
- api/endpoints/arc.php: PHP bridge to daemon (status, job_create, job_get, jobs, purge)
- api.php: added arc route
- index.html: ARC REACTOR status indicator in bottom bar with live polling
- admin/index.php: ARC REACTOR nav section + full job management panel
- Built-in job handlers: ping, echo, shell (whitelist-gated)
- Foundation for Phase 2 (Intel Protocol) and beyond

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 04:07:28 +00:00
myron 27eb012005 Update Parker Slingshot monitoring URL to parkerslingshotrentals.com
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09 22:50:44 +00:00
myron d77621c849 Fix sites manager: DB-first settings storage, all 5 sites now read/write
Root cause: open_basedir restriction prevented lsphp from reading config
files on other vhosts (/home/epictravelexpeditions.com/*, etc.)
TJJ worked via its own DB; TTG worked because file happened to be readable.
Epic, Parker Slingshot, Parker Slingshot Rentals all returned empty.

Fix: site_settings table in jarvis_db as primary storage for all sites.
- All reads/writes go through JarvisDB (always accessible, no open_basedir)
- TJJ still syncs bidirectionally with its own settings table (secondary)
- File push attempted best-effort on save (succeeds where writable, silent no-op otherwise)
- Seeded existing known values from file grep on table creation
- All 5 sites now return and save settings correctly
2026-06-02 12:48:51 +00:00
myron 02847d5de3 Fix intent placeholders, add alert/agent/deploy action intents, admin search+tester
- Restore {user_title} in ~200 intents where placeholder was stripped (comma-period, em-dash variants)
- Replace 20 hardcoded Mr. Blair with {user_title} token
- Remove duplicate pve_storage and tech_ssh intents
- Add action intents: alerts_show, alerts_count, alerts_clear, agents_offline, agents_all, agents_count, deploy_status, deploy_force, pbx_status, pbx_extension
- Admin KB Intents: add search/filter bar (name/pattern/response + type/status dropdowns)
- Admin KB Intents: add TEST PATTERN button — tests any phrase client-side against full intent list
2026-06-01 23:23:32 +00:00
myron 0caff5db57 Add brightness, media player, siren control + 5 scene keywords
- Add scene keywords: good morning work, master bedroom scene, porch lights (3 variants)
- Add Tier 0a: brightness control handler ("dim X to Y%", "set X to Y%")
- Add Tier 0b: media player on/off/pause for Apple TV and Pioneer receiver
- Add Tier 0c: per-camera siren activate/silence via switch
2026-06-01 14:16:30 +00:00
myron 5d5eb2fdac feat: complete calendar integration + planner widget + 298 new KB intents
- Add calendar sync route to api.php (/api/calendar → calendar_sync.php)
- Add CALENDAR SYNC tab to admin with feed CRUD (add/edit/delete Google/ICS feeds)
- Add cal_sync_now action to admin for on-demand iCloud/Google sync
- Add cron: calendar_sync.php every 15 min (iCloud CalDAV + ICS feeds)
- Add PLANNER mini panel to index.html (left panel, shows today tasks + appointments)
- Update loadPlannerSummary() to render tasks/appts with priority dots and times
- Seed 298 new KB intents across 37 categories: science, history, tech, geography,
  math, health, food, space, philosophy, psychology, sports, music, film, travel,
  language, literature, finance, productivity, nature, facts, home automation,
  architecture, geopolitics, and more — 543 total intents
2026-05-31 22:47:35 +00:00
myron 1c7a42f68b feat: 224 voice intents seeded; fix KBEngine fillTemplate — user_title, pending_count, system/network facts 2026-05-31 19:58:28 +00:00
myron cfdbd57bce fix: task/appt voice creation — non-greedy trigger strip, bare-date extraction, noon/midnight, book trigger, 900ms TTS mic gap 2026-05-31 19:47:41 +00:00
myron 721607cfb0 fix: HA voice control — domain preference scoring, exact match priority, skip unavailable, fresh entity_map 2026-05-31 19:22:40 +00:00
myron 18649c47df feat: full voice intents — overdue/priority/week tasks, next appt, reschedule, cancel, week calendar, email→planner 2026-05-31 19:12:06 +00:00
myron 7c1cfda588 feat: email intelligence — action item detection, task/appt creation, admin EMAIL tab, full voice intents 2026-05-31 18:57:47 +00:00
myron f122de483a feat: JARVIS Planner — tasks/appointments with voice intents, status bar badge, admin CRUD 2026-05-31 16:53:21 +00:00
myron aa622e97a5 fix: HA toggles — real-time ha_entities table, optimistic update, renderHATable extracted 2026-05-31 16:34:01 +00:00
myron 8d2c1948bb feat: Gmail IMAP email integration with voice intents
- email.php: IMAP reader for Gmail/Outlook/iCloud with 5-min cache
- api.php: add /api/email route
- chat.php: email voice intents — check count, read recent, filter by sender
- config.php: Gmail credentials (gitignored)
2026-05-31 06:20:15 +00:00
myron 114842e8c5 fix: do_server.php SQL missing quotes on category=sites causing 500 2026-05-31 06:06:54 +00:00
myron a96f8a3f85 feat: ElevenLabs TTS George voice + fix HA toggle optimistic update 2026-05-31 05:58:22 +00:00
myron 499adadc6d feat: HA smart home control improvements
- stats_cache: swap interesting domains to controllable-only (remove sensors/binary_sensors)
- stats_cache: filter pre-release/camera/HA-addon switches from entity list
- index.html: add visual toggle switch buttons per entity
- index.html: fix scene activation (was returning early; now calls scene/turn_on)
- index.html: remove 8-per-domain cap on entity display
- index.html: add domain icons and unavailable state handling
- index.html: alarm panel arm/disarm toggle logic
2026-05-31 05:05:44 +00:00
myron ca3ae31826 netscan: respect status field from probe payloads (offline phones now correctly marked offline) 2026-05-31 04:43:54 +00:00
myron 705ee4f5a7 netscan: store VoIP SIP registration status in kb_facts when phone probe provides it 2026-05-31 04:38:33 +00:00
myron f007786fe4 Fix services panel: correct services, live refresh loop, last-updated timestamp in footer 2026-05-30 06:46:26 +00:00
myron cbd63f1a1e Proxmox VMs: full resources from cluster API (both nodes), CPU/RAM/disk/uptime/network per VM 2026-05-30 04:40:34 +00:00
myron 785b0fa7ab Fix RUN NETWORK SCAN button: queue PVE1 probe, return real DB data, no fake scan from DO 2026-05-30 03:53:13 +00:00
myron e189a64ddd Fix network scan: return real DB data and queue PVE1 netscan instead of fabricating 2026-05-30 03:41:54 +00:00
myron 21af9a08e0 Fix Proxmox API: use DDNS hostname (port 8006 forwarded via FortiGate) 2026-05-30 03:35:07 +00:00
myron f73ce6cd57 Admin: add HA entities, News CRUD, Proxmox VMs tabs; news.php merges custom pinned entries 2026-05-30 03:31:50 +00:00
myron 50c06722bb Fix network panel: include netscan devices; fix Scan Now to queue agent command 2026-05-30 03:26:53 +00:00
myron e08b80a6c6 Fix agent detection: real client IP via CF header, tablet/iPad support, subnet fallback match 2026-05-30 03:23:12 +00:00
myron 62c7878615 Add netscan push endpoint: PVE1 nmap scan every 3min populates network devices 2026-05-30 03:20:06 +00:00
myron 2faeb5498a Auto-populate network devices via nmap scan from PVE1 every 3min 2026-05-30 03:11:14 +00:00
myron 0d6f70661b Fix DO server offline: read /proc directly instead of SSH loopback 2026-05-30 02:46:50 +00:00
myron a1b4e49a9c Fix sites push: chown config files to JARVIS user; treat no-change as success 2026-05-29 19:45:05 +00:00
myron 2c5459af82 Add Sites Manager to JARVIS — centralized email settings for all sites 2026-05-29 19:28:24 +00:00
myron ecbc2e09a5 Fix 8 code-review findings: security + reliability
1. agent.py: shell allow-check reads cfg, not server payload (RCE fix)
2. webhook.php: move WEBHOOK_SECRET to gitignored config.php; rotate secret
3. agent.py: replace recursive main() with while loop (RecursionError fix)
4. jarvis-deploy.sh: push force-revert to GitHub on syntax fail (loop fix)
5. agent.py: self_update() verifies SHA-256 before exec (integrity fix)
6. agent.php: remove JARVIS_IP from browser-action bypass (auth fix)
7. jarvis-watchdog.sh: escape SQL vars in alert() to prevent injection
8. jarvis-deploy.sh: atomic mv instead of cat+truncate (TOCTOU fix)

Also: distribute jarvis-agent.py.sha256 alongside agent for integrity checks
2026-05-25 14:27:27 +00:00
myron 45fef11785 Autonomous systems: watchdog, smart deploy, site health, auto-heal, agent installer
- deploy/jarvis-watchdog.sh: self-healing watchdog (every 5 min)
  * monitors lsws/mysql/redis, restarts on failure
  * JARVIS HTTP self-check, restarts OLS on 5xx
  * disk/memory alerts inserted to DB
  * offline Proxmox VM agents restarted via qm guest exec
  * log rotation (1000 line cap)
- deploy/jarvis-deploy.sh: smart deploy with PHP validation
  * php8.3 syntax check on every changed .php file
  * auto-reverts git commit + inserts critical alert on syntax error
  * reloads OLS after JARVIS deploys
- api/endpoints/facts_collector.php: site health monitoring
  * curls all 7 managed sites every 3 min
  * stores up/down status in kb_facts
- api/endpoints/alerts.php: auto-heal + site alerts
  * dispatches restart_service commands when services down on agents
  * generates alerts from kb_facts site health data
- public_html/install-agent.sh: one-liner Linux agent installer
  * installs deps, downloads agent, registers with JARVIS, sets up systemd
- public_html/webhook.php: fixed infra deploy path to /opt/infra
2026-05-25 14:08:07 +00:00
myron 6b6b6fcc3b Security fixes: SSL verification, SQL injection, auth bypass, hash_equals
- Enable CURLOPT_SSL_VERIFYPEER on Groq and Claude API calls (MITM fix)
- Parameterize agent_commands IN clause to prevent SQL injection
- Add session/IP check for list/status/myip endpoints (auth bypass fix)
- Use hash_equals() for registration key comparison (timing attack fix)
2026-05-25 13:46:11 +00:00
myron dc55e6c45b Initial commit: JARVIS AI dashboard v2.3
- 4-tier chat: HA control → Ollama → Groq → Claude
- Push-based agent system with heartbeat/metrics
- Network monitoring, alerts, Proxmox, Home Assistant
- Windows + Linux agent installers
- Stats cache cron, facts collector, KB engine
2026-05-25 13:22:57 +00:00