Commit Graph

46 Commits

Author SHA1 Message Date
myron 90e4ded7c9 Fix 8 issues from code review
- ha-poller: replace recursive main() retry with while loop (stack overflow fix)
- ha-poller: advance last_push on empty HA response (log spam fix)
- ha-poller: use datetime.now(timezone.utc) instead of deprecated utcnow()
- ping-probe: always call update_status() unconditionally so offline devices register as offline
- agent.php: heartbeat reads status from payload instead of hardcoding 'online'
- phone-probe: delegate JSON building to python3 (bash concatenation injection fix)
- netscan + phone-probe: read registration key from /etc/jarvis-agent/reg-key
- admin/index.php: sync ha_list skipDomains with ha.php (14 missing domains added)
- facts_collector: self-check JARVIS via 127.0.0.1 instead of Cloudflare hairpin
2026-06-29 20:58:22 -05:00
myron 5bbd3a9098 Add DOCS tab to admin panel with infrastructure reference download 2026-06-15 04:05:53 +00:00
myron 7dc457562b Update button — popup progress modal, polls for version confirmation, live cell update
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 01:45:52 +00:00
myron 0469b31829 Agent version tracking — workers tab shows current vs latest version
- Add version column to registered_agents table
- Agents send version on registration (Linux 3.1, Windows 3.0, macOS 3.0)
- workers_list API returns latest_versions per platform
- Workers tab: VERSION column with green check (up-to-date) or red (outdated)
- Outdated agents highlight row and show blue UPDATE button
- Up-to-date agents show dimmed UPDATE button
- Update button dispatches update command immediately

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 01:44:59 +00:00
myron 9e590dff29 Fix guardian tab stuck on loading — const ts shadowed ts() function causing ReferenceError 2026-06-12 01:13:13 +00:00
myron 146a13d8ec Fix vision protocol — always fetch all online agents for screenshot modal 2026-06-12 01:10:28 +00:00
myron 48b912574d Fix arc reactor capabilities showing blank — fall back to handlers field 2026-06-12 01:07:57 +00:00
myron 950749323c admin: Workers page — consolidated view of all JARVIS Agent Workers
Single tab showing field agents (capabilities, status, last seen, update/screenshot
actions), cron workers (schedule, last run, run-now button), and Arc Reactor daemon
(handler count, 24h job stats, restart button). wToast for action feedback.
2026-06-11 21:31:50 +00:00
myron 90b96f5de5 Admin panel: full CSS consistency pass — Orbitron font, readable nav, align color vars to main page 2026-06-11 20:45:28 +00:00
myron 8298353106 Fix Vision Protocol: rename shadowed ts var, load agents dynamically
const ts = ts() in loadVision caused TDZ ReferenceError crashing gallery.
visionRunScreenshot now fetches online agents from agents_list API when
no screenshots exist yet (previously showed No agents online falsely).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 18:21:44 +00:00
myron d3d2b36257 Add missing loadArc, arcTestPing, arcPurge functions
ARC REACTOR tab had HTML and PHP API handlers but no JS load function,
causing ReferenceError on every tab click. Adds all three missing functions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 18:14:56 +00:00
myron abe7a25141 Fix duplicate CAT_COLORS const breaking admin login
Rename memory section CAT_COLORS to MEM_CAT_COLORS to avoid SyntaxError
that prevented doLogin from being defined, locking users out of admin.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 18:10:42 +00:00
myron cb90ea087e Fix admin: add Cache-Control: no-transform to block Cloudflare Rocket Loader 2026-06-11 12:42:34 +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 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 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 cf95960e57 Add HIDE UNAVAIL toggle to KB Facts page; filter unavailable/empty fact values client-side 2026-06-01 15:18:56 +00:00
myron f0e42cbcbd Style count badges to match agents page (cyan, spaced, X ONLINE / Y TOTAL format) 2026-06-01 14:25:04 +00:00
myron 78c95a508d Add total count badges beside page titles in admin
- KB Facts: shows total fact count (sum across all categories)
- Network Devices: shows online/total count in title
- Home Assistant Entities: shows entity count in title
- Proxmox VMs: shows running/total VM count in title
- KB Intents already had this; no change needed
2026-06-01 14:22:36 +00:00
myron f30f0fdfad revert: restore admin/index.php to pre-login-fix state 2026-06-01 09:30:57 +00:00
myron 85e23f618f fix: bypass Cloudflare Rocket Loader on admin script — doLogin was undefined at click time
data-cfasync=false prevents Rocket Loader from deferring the main script block.
Also added try/catch + button feedback to doLogin so errors show visibly.
2026-06-01 03:26:15 +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 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 1f90d83073 fix: ha_list reads from ha_entities table (real-time agent data, not 5min cache) 2026-05-31 06:05:45 +00:00
myron a96f8a3f85 feat: ElevenLabs TTS George voice + fix HA toggle optimistic update 2026-05-31 05:58:22 +00:00
myron b080ecb4bd fix: HA admin panel — remove entity ID column, add toggle controls, filter unavailable 2026-05-31 05:51:30 +00:00
myron d0f751372c Add Backups tab: daily cron + on-demand trigger + download, 7-day retention 2026-05-30 05:12:13 +00:00
myron 53b1c6b90a Fix agents_list: use JSON_EXTRACT on metric_data instead of non-existent columns 2026-05-30 05:05:02 +00:00
myron 20c91671da Fix agents render: move miniBar outside setTimeout scope, add Array.isArray guard 2026-05-30 05:02:03 +00:00
myron d38d66d147 Admin: progressive row reveal on all tables — scanShell + staggered render, no stuck LOADING state 2026-05-30 04:55:59 +00:00
myron f4eef862d1 Alerts tab: default to Active filter, order Active/All/Resolved 2026-05-30 04:49:33 +00:00
myron 772fc48d00 HA tab: add ALL / ON ONLY toggle filter 2026-05-30 04:46:29 +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 88dbefa831 HA tab: remove toggle buttons, read-only view only 2026-05-30 03:36:27 +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 2faeb5498a Auto-populate network devices via nmap scan from PVE1 every 3min 2026-05-30 03:11:14 +00:00
myron 07827651f5 Add /admin portal: full JARVIS management UI (agents, network, alerts, KB, sites, users) 2026-05-30 02:55:34 +00:00