Commit Graph
441 Commits
Author SHA1 Message Date
Jon Saad-FalconandGitHub 09d1cc3681 Merge pull request #152 from open-jarvis/feat/security-hardening
feat: security hardening — layered boundary enforcement
2026-03-28 22:15:22 -07:00
Jon Saad-FalconandGitHub b06e1ebfe9 Merge pull request #151 from open-jarvis/fix/frontend-node-engine-requirement
fix: add Node >= 20 engine requirement to frontend package.json
2026-03-28 22:15:08 -07:00
Jon Saad-FalconandClaude Opus 4.6 096b718417 chore: remove spec and plan docs from PR
These are internal planning artifacts, not part of the deliverable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 22:08:07 -07:00
Jon Saad-FalconandClaude Opus 4.6 0cbd0e1dac fix: update existing tests for new secure defaults
test_config.py: SecurityConfig.mode default changed from "warn" to "redact"
test_config_phase3.py: ServerConfig.host default changed from "0.0.0.0" to "127.0.0.1"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 22:02:02 -07:00
Jon Saad-FalconandClaude Opus 4.6 f122f5a699 fix: tests work without Rust extension and server extras
- BoundaryGuard degrades gracefully when Rust scanners unavailable
- BoundaryGuard tests use lightweight mock scanners (no Rust needed)
- Server-dependent tests use pytest.importorskip for starlette/fastapi
- Fix import ordering in test files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 21:46:53 -07:00
Jon Saad-FalconandClaude Opus 4.6 8e75fcb232 feat: non-loopback auth enforcement and CORS origin passthrough
Add check_bind_safety() to auth_middleware — refuses to bind non-loopback
without API key. Add cors_origins parameter to create_app() so CORS uses
config values instead of hardcoded wildcard "*".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 21:46:45 -07:00
Jon Saad-FalconandClaude Opus 4.6 52f6aaf5bb fix: lint fixes for security hardening — line length and import order
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 21:32:20 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 0193e07d83 feat: jarvis doctor checks for security profile configuration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 21:31:09 -07:00
Jon Saad-FalconandClaude Opus 4.6 57ecd5c77f feat: security profiles — personal, shared, server presets with user overrides
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 21:30:27 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 6aca5eb559 feat: add Content-Security-Policy header to API responses
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 21:27:38 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 79a46df747 feat: startup credential audit log and CORS wildcard warning
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 21:27:30 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 60317ffcba feat: get_tool_credential — scoped credential access without env pollution
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 21:26:42 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 687ad30f9e feat: SanitizingFormatter — auto-redact credentials in all log output
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 21:24:57 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 85fbd2bd8c fix: enforce 0o600/0o700 permissions on all database and data files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 21:20:01 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 9909dde780 feat: secure_mkdir and secure_create helpers for restrictive file permissions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 20:57:25 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 472938cc2b fix: fail-closed webhook validation — reject when SDK missing or secret unconfigured
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 20:56:24 -07:00
Jon Saad-FalconandClaude Opus 4.6 d2dbd4c2a2 feat: wire BoundaryGuard into ToolExecutor for external tool scanning
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 20:28:33 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 677ece6fb3 feat: tag engines with is_cloud and tools with is_local for boundary scanning
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 20:26:26 -07:00
Jon Saad-FalconandClaude Opus 4.6 7c1f983891 feat: BoundaryGuard module — scan/redact/block at device exit points
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 20:24:07 -07:00
Jon Saad-FalconandClaude Opus 4.6 63a32d20d6 feat: secure server defaults — loopback binding, redact mode, rate limiting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 20:00:49 -07:00
Jon Saad-FalconandClaude Opus 4.6 44c52edfcd docs: security hardening implementation plan — 15 tasks with TDD
Detailed plan covering network exposure, boundary guard, webhook
validation, file permissions, log sanitization, credential scoping,
CORS hardening, and security profiles. Each task has failing tests
first, then implementation, then verification.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 19:26:59 -07:00
ANarayanandClaude Opus 4.6 bbcda62ed4 fix: add Node >= 20 engine requirement to frontend package.json
Tailwind CSS v4.2 (@tailwindcss/oxide) requires Node >= 20 for native
bindings. Without this, `npm install` succeeds but `vite` fails at
runtime with a missing native binding error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 18:51:37 -07:00
Jon Saad-FalconandClaude Opus 4.6 e842976d96 docs: security hardening design spec — layered boundary enforcement
Approved design for comprehensive security hardening covering network
exposure defaults, boundary guard scanning, webhook fail-closed validation,
file permissions, credential handling, log sanitization, and security profiles.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:29:51 -07:00
Jon Saad-Falcon 9ab2d37c82 fix: shorten Personal Deep Research template description to match others 2026-03-28 17:41:05 -07:00
Jon Saad-FalconandClaude Opus 4.6 0e9d7005cb docs: update roadmap + create cross-platform testing plan
Roadmap: updated messaging status (iMessage/SMS + Slack working,
WhatsApp Baileys blocked, Meta Cloud API planned).

Testing plan: 12 query types across 3 platforms (Interact, Slack,
iMessage/SMS) with execution phases and success criteria.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 17:34:30 -07:00
Jon Saad-Falcon 4ab6139d52 Merge branch 'main' of https://github.com/open-jarvis/OpenJarvis 2026-03-28 17:22:36 -07:00
Jon Saad-FalconandClaude Opus 4.6 290746b3e0 docs: restructure channels guide — Messaging Channels + Data Connectors
Added SendBlue (iMessage/SMS) and Slack messaging setup with detailed
step-by-step instructions, App Manifest JSON, webhook registration,
and troubleshooting tables. Reorganized doc into two sections:
Messaging Channels (talk to agent) and Data Connectors (search data).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 17:21:43 -07:00
Jon Saad-Falcon fa87bbb2d6 fix: remove whatsapp bridge node_modules from git, add to gitignore 2026-03-28 17:18:13 -07:00
Jon Saad-FalconandClaude Opus 4.6 bc31cce732 feat: simplify Messaging tab to iMessage/SMS (SendBlue) + Slack only
Removed WhatsApp (Baileys blocked by WhatsApp servers) and Twilio SMS
(SendBlue handles SMS as fallback automatically). Updated Slack setup
instructions with the App Manifest JSON for one-step configuration.

Three channels: iMessage + SMS (SendBlue), Slack (Socket Mode)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 17:17:51 -07:00
Jon Saad-FalconandGitHub 7a03bf5794 Merge pull request #150 from open-jarvis/fix/windows-git-detection
fix: Windows git detection in desktop app
2026-03-28 16:56:33 -07:00
krypticmouseandClaude Opus 4.6 76aab9c269 fix: guard fastapi import in test_sendblue_webhook.py with importorskip
CI installs `--extra dev` but not `--extra server`, so fastapi is
unavailable. All other server tests use pytest.importorskip("fastapi")
to skip gracefully — this file was missing the guard.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:49:12 +00:00
krypticmouseandClaude Opus 4.6 eeb66a1606 fix: remaining unused import lint errors in slack_daemon and agent_manager_routes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:39:51 +00:00
krypticmouseandClaude Opus 4.6 caf0e59f16 fix: remove unused imports flagged by ruff across 5 files
Pre-existing lint errors that caused CI failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:39:35 +00:00
krypticmouseandClaude Opus 4.6 e3039c0d0a fix: Windows git detection in desktop app resolve_bin()
The Tauri desktop app's resolve_bin("git") function checked incorrect
paths for Git on Windows (e.g. {ProgramFiles}\git\git.exe) and had no
PATH fallback, causing "git not found" even when Git is installed.

Fixes:
- Add correct Git for Windows paths: {ProgramFiles}\Git\cmd\git.exe,
  {ProgramFiles(x86)}\Git\cmd\git.exe, {LOCALAPPDATA}\Programs\Git\cmd\
- Add Scoop package manager path: {home}\scoop\shims\git.exe
- Add PATH fallback using `where.exe` on Windows and `which` on Unix,
  so any binary on PATH is found even if not at a hardcoded location

Closes #128

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:39:35 +00:00
Jon Saad-FalconandClaude Opus 4.6 eea5f65ea0 feat: wire Twilio SMS handler with agent + ack + response sending
The Twilio webhook now:
1. Sends "Message received! Working on it now..." via Twilio API
2. Routes to DeepResearchAgent (via bridge or direct fallback)
3. Sends the research response back as SMS
4. Handles missing bridge gracefully
5. Formats response for SMS (strips markdown, 1500 char limit)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 16:27:32 -07:00
Jon Saad-FalconandClaude Opus 4.6 6233ae1aa1 feat: Slack daemon as subprocess for reliable Socket Mode
Replaces the flaky inline bolt_app creation with a proper subprocess
daemon (slack_daemon.py). The daemon persists independently of the
HTTP request lifecycle, solving the Socket Mode connection dropping.

Features: thread replies, progress updates, message queue, Slack
formatting, PID file for lifecycle management.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 15:57:49 -07:00
Jon Saad-FalconandClaude Opus 4.6 9a6b1c1623 feat: reply in thread for Slack messages to reduce DM clutter
All bot replies (acknowledgment, progress updates, final response)
now use thread_ts to reply in the thread of the user's message.
Keeps the DM conversation clean — one thread per question.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 15:12:36 -07:00
Jon Saad-FalconandClaude Opus 4.6 590e8b90a3 feat: convert markdown to Slack formatting instead of stripping it
Converts: ## Header → *Header* (bold), **bold** → *bold*,
*italic* → _italic_, ~~strike~~ → ~strike~, [text](url) → <url|text>.
Removes LaTeX and HTML. System prompt updated to use simple markdown
since it gets auto-converted per platform.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 15:06:57 -07:00
Jon Saad-FalconandClaude Opus 4.6 d3c7c59c8d fix: improve SendBlue UX — queue tracking, periodic reminders, SMS formatting
1. Ack message: "Message received! Working on it now..."
2. Queue awareness: if another message arrives while processing,
   "Message received! Message X in queue, will respond ASAP"
3. Periodic reminders every 60s: "Still working! Will reply ASAP"
4. Response formatting: _format_for_sms() strips markdown headers,
   bold/italic, code blocks, LaTeX, image syntax, collapses blanks
5. System prompt: instructs agent to use plain text, short paragraphs,
   simple dashes — no markdown/LaTeX that breaks in iMessage/SMS

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 15:06:01 -07:00
Jon Saad-FalconandClaude Opus 4.6 2ef6615184 feat: improve Slack messaging UX — progress updates, queue, clean formatting
1. Initial: "Message received! Working on it now..."
2. Every 60s while processing: "Still working! Will reply ASAP"
3. New message while busy: "Message received! Message X in queue of Y"
4. Responses stripped of markdown (headers, bold, code blocks) for
   clean Slack display
5. System prompt updated to prefer plain text over complex markdown

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 14:59:03 -07:00
Jon Saad-FalconandClaude Opus 4.6 1252531551 test: add 26 tests for SendBlue channel and webhook
tests/channels/test_sendblue.py (18 tests):
- Init from params and env vars, no-credentials error state
- Connect/disconnect lifecycle
- Send: success, from_number inclusion, API error, network error,
  no-credentials, event emission
- Webhook handler: incoming triggers handlers, outbound ignored,
  empty content ignored, event emission, handler crash safety
- Properties: from_number, list_channels

tests/server/test_sendblue_webhook.py (8 tests):
- Webhook: incoming 200, outbound ignored, empty ignored, missing
  from_number ignored, secret validation (reject + accept), no bridge
- Health: ready=true when wired, ready=false when not

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 14:42:43 -07:00
Jon Saad-FalconandClaude Opus 4.6 1add224599 test: add 59 tests for system prompt, Slack messaging, and connector health
- test_deep_research_prompt.py (8 tests): date injection, time, day of week,
  dynamic generation, response types, tool descriptions, /no_think, Jarvis name
- test_slack_messaging.py (7 tests): connect with/without tokens, error state,
  disconnect, handler registration, send without token
- test_connector_health.py (44 tests): all 11 connectors instantiate, have
  required methods, report not-connected without creds, have metadata.
  Plus KnowledgeStore data presence checks.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 14:35:58 -07:00
Jon Saad-FalconandClaude Opus 4.6 7fd685f53a feat: inject current date/time into system prompt dynamically
The model now knows today's date and time. _build_system_prompt()
generates a fresh prompt with "Today is Saturday, March 28, 2026.
The current time is 02:28 PM." on every agent.run() call.

Fixes: model was hallucinating "January 29, 2025" for date queries.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 14:29:54 -07:00
Jon Saad-FalconandClaude Opus 4.6 77a1c596b7 feat: expand system prompt with 12 adaptive query types
Jarvis now handles: casual, quick lookup, people lookup, daily/weekly
digest, meeting prep/debrief, task/follow-up finder, contact analysis
(neglected contacts, frequency), document finder, email triage,
cross-source synthesis, deep research, and about-self queries.

Tested: "neglected contacts" → 1 SQL call, 27s, real results.
"casual greeting" → 0 tools, 6s. Model adapts automatically.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 10:07:36 -07:00
Jon Saad-FalconandClaude Opus 4.6 994671fcdf feat: adaptive system prompt — Jarvis responds naturally to different query types
Replaces the rigid deep-research-only prompt with an adaptive one that
classifies queries into 4 types:
1. Casual/conversational — friendly reply, no tools
2. Quick data lookup — one tool call, short answer
3. Deep research — multi-hop, cited report
4. About self — describe capabilities

Tested: casual gets 0 tool calls (6s), quick lookup gets 1 SQL call (17s),
self-description gets 0 calls (17s). Deep research still works as before.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 22:37:20 -07:00
Jon Saad-FalconandClaude Opus 4.6 9825daa334 feat: complete SendBlue integration — auto-restore, CLI, health check, docs
- Register sendblue in channels/__init__.py so ChannelRegistry works
- Auto-restore SendBlue bindings on server startup from database,
  re-creating ChannelBridge + DeepResearchAgent so webhooks survive
  server restarts
- Add sendblue to CLI channel_cmd.py (_get_channel, help text) and
  SystemBuilder._resolve_channel() for config.toml support
- Health check endpoint GET /v1/channels/sendblue/health returns
  channel_connected, bridge_wired, ready status
- Frontend: SendBlueWizard checks health on mount, shows
  "Disconnected" badge with "Reconnect" button when bridge is dead
- Docs: CLI usage, server restart behavior, ngrok re-registration,
  troubleshooting table, health check endpoint

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 22:33:12 -07:00
Jon Saad-FalconandClaude Opus 4.6 bfcc90866c fix: make Slack App Token required, fix CLI prompt label
App Token (xapp-) is required for Socket Mode DMs, not optional.
Removed xoxe- from CLI prompt since session tokens don't work.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 22:21:04 -07:00
Jon Saad-FalconandClaude Opus 4.6 87ad86bcb1 docs: add SendBlue iMessage/SMS channel setup guide
- Full setup walkthrough: SendBlue account, API keys, ngrok tunnel,
  webhook registration
- Documents the browser UI wizard flow (Messaging tab)
- Free tier notes: shared line, verified contacts, 10 contact limit
- Programmatic setup via Python
- Webhook behavior: instant ack, 45s delay notice, full response
- Constructor parameters and TOML config reference
- Added SendBlue to the supported channels table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 22:17:09 -07:00
Jon Saad-FalconandClaude Opus 4.6 6e33d5bbfa feat: instant iMessage ack + delay notice for SendBlue channel
When a text arrives via SendBlue:
1. Immediately sends "Message received! Researching your data now..."
2. If the agent takes >45s, sends "Still working — complex query..."
3. Then sends the full research response

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 22:15:06 -07:00
Jon Saad-FalconandClaude Opus 4.6 bf28877fec docs: comprehensive Slack setup guide with Socket Mode, App Manifest, and troubleshooting
Covers both data connector (read messages) and messaging channel (DM the agent).
Includes the full App Manifest JSON, required scopes table, and all the gotchas
we discovered (Request URL, reinstall requirement, App Token vs Bot Token, etc.).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 22:12:36 -07:00