Commit Graph
69 Commits
Author SHA1 Message Date
krypticmouseandClaude Sonnet 4.6 ffc43cd7b5 feat: add knowledge_search tool with filtered BM25 retrieval and source attribution
Implements KnowledgeSearchTool registered under "knowledge_search" that wraps
KnowledgeStore with optional filters (source, doc_type, author, since, until,
top_k) and formats results with source attribution for agent consumption.
Includes 8 unit tests covering basic search, filter-by-source, filter-by-author,
no-results, empty-query, no-store, spec parameters, and registry checks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 00:02:02 +00:00
krypticmouseandClaude Opus 4.6 56554c481a feat: add Gmail connector with OAuth and mocked API sync
Implements GmailConnector registered under 'gmail' in ConnectorRegistry,
a shared oauth.py helper (build_google_auth_url, load/save/delete_tokens)
reusable by Drive/Calendar/Contacts, and 7 fully mocked pytest tests
covering auth state, sync document extraction, disconnect, mcp_tools,
and registry lookup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 23:56:29 +00:00
krypticmouseandClaude Opus 4.6 5e0e8965d7 feat: add Obsidian/Markdown vault connector with frontmatter parsing
Implements ObsidianConnector (filesystem auth, no OAuth) that walks a vault
directory for .md/.markdown/.txt files, parses YAML frontmatter via a
dependency-free parser, skips hidden dirs and binary files, and yields
Document objects with doc_type="note" and obsidian:// deep-link URLs.
Exposes an obsidian_search_notes MCP ToolSpec.  9 tests cover connection
state, vault traversal, hidden-dir/binary filtering, frontmatter extraction,
and registry wiring.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 23:52:49 +00:00
krypticmouseandClaude Sonnet 4.6 af7d0db518 feat: add SyncEngine with checkpoint/resume for connector orchestration
Introduces SyncEngine that wraps IngestionPipeline with a SQLite state
database (sync_state.db) for checkpoint/resume: cursors and item counts
are persisted after every 100-document batch and on completion/error.
Adds 4 tests covering single-connector ingestion, checkpoint accuracy,
unsynced-connector None return, and multi-connector source filtering.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 23:49:54 +00:00
krypticmouseandClaude Sonnet 4.6 1a713e66fe feat: add ingestion pipeline with dedup, type-aware chunking, and indexed storage
Implements IngestionPipeline that deduplicates Documents by doc_id (both
in-memory and by loading existing doc_ids from the store on init), chunks
content via SemanticChunker, and persists all chunks with full provenance
metadata to KnowledgeStore. 8 tests cover single-doc ingestion, dedup across
calls and batches, persistence across pipeline instances, long-doc multi-chunk
splitting, atomic event chunking, multi-source filtering, and return-value accuracy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 23:47:59 +00:00
krypticmouseandClaude Opus 4.6 efc979edf0 feat: add type-aware semantic chunker with section/paragraph/sentence splitting
Implements SemanticChunker that splits text based on doc_type (event/contact
as single chunks, email on reply boundaries, message on double-newlines,
document/note on ## headings → paragraphs → sentences). ChunkResult carries
sequential 0-based indexes and inherits parent metadata; section headings are
added as chunk metadata. 16 tests covering all splitting strategies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 23:45:38 +00:00
krypticmouseandClaude Sonnet 4.6 8d3505f8f3 feat: add KnowledgeStore with source-aware SQLite schema and filtered BM25 retrieval
Implements KnowledgeStore (extends MemoryBackend) for Deep Research with a
rich SQLite/FTS5 schema supporting source, doc_type, author, participants,
timestamp, thread_id, url, and chunk_index columns; BM25 ranking via FTS5
with porter unicode61 tokenizer; filtered retrieval by source, doc_type,
author, since, and until; MEMORY_STORE/MEMORY_RETRIEVE event emission; WAL
journal mode; and 15 isolated tests using tmp_path fixtures.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 23:42:39 +00:00
krypticmouseandClaude Sonnet 4.6 29d275fe4e feat: add ConnectorRegistry and base connector types (Document, SyncStatus, BaseConnector)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 23:35:01 +00:00
Jon Saad-FalconandGitHub c390c73f85 Merge pull request #123 from open-jarvis/feat/gemma-cpp-engine
feat: add gemma.cpp engine via pygemma pybind11 bindings
2026-03-25 14:57:03 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 e4d036dd50 test: add live integration test stubs for gemma_cpp engine
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 13:18:13 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 16025571fd style: fix lint issues in gemma_cpp engine
Move mid-file imports to top of test file to resolve E402 violations and apply ruff formatting to both gemma_cpp.py and test_gemma_cpp.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 13:17:16 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 d08360ca21 feat: wire gemma_cpp engine into discovery and optional imports
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 13:15:06 -07:00
Jon Saad-FalconandGitHub 15dad86832 Merge pull request #121 from open-jarvis/feat/pinchbench-integration
feat: PinchBench benchmark integration
2026-03-25 12:51:01 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 411e822916 test: add config resolution tests for gemma_cpp engine
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 12:40:24 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 8b0fd702c4 feat: implement gemma_cpp health checks and model listing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 12:39:38 -07:00
Jon Saad-FalconandClaude Opus 4.6 8c2ee6843a feat: implement gemma_cpp engine lifecycle and inference methods
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 12:38:25 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 9cd822611e feat: add GemmaCppEngine skeleton with chat template formatting
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 12:36:35 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 d589bfb55d feat: add GemmaCppEngineConfig and wire into EngineConfig
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 12:34:48 -07:00
Jon Saad-FalconandClaude Opus 4.6 784b880130 test(evals): add PinchBench integration tests — full grading pipeline
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 09:31:02 -07:00
Jon Saad-FalconandClaude Opus 4.6 73cb1f1bbd feat(evals): add PinchBench grading helpers — transcript translation, automated/LLM judge/hybrid scoring
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 09:26:12 -07:00
Jon Saad-FalconandClaude Opus 4.6 8e8d4a68e4 feat(evals): add PinchBench dataset provider — repo clone and task markdown parsing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 09:25:39 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 c5cb6a9e49 feat(evals): add tool_calls field to TurnTrace for rich tool data
Adds a `tool_calls` list field to `TurnTrace` capturing name, arguments,
and result for each tool invocation, enabling PinchBench transcript integration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 09:20:25 -07:00
Jon Saad-FalconandGitHub 14c81bba98 Merge pull request #115 from open-jarvis/feat/init-onboarding-and-privacy-scanner
feat: interactive model download in init + privacy environment scanner
2026-03-25 08:12:45 -07:00
Jon Saad-FalconandClaude Opus 4.6 68a8f5646c fix: add --no-download and PrivacyScanner mock to test_cli init test
The test_init_creates_config test in test_cli.py was not updated
when the download prompt and privacy hook were added to jarvis init.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 08:07:35 -07:00
Jon Saad-FalconandClaude Opus 4.6 b2152fb40e style: fix E501 line-length and unused imports in test files
Wraps long CliRunner.invoke() calls, removes unused pytest imports,
fixes import ordering, and removes unused variables in test_scan.py.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:38:14 -07:00
Jon Saad-FalconandClaude Opus 4.6 a934977ba8 fix: address spec review findings for privacy scanner
- Add slots=True to ScanResult dataclass
- Fix extra space in IPv6 port f-string
- Add missing tests: check_remote_access, check_icloud_sync, run_quick

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 18:26:05 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 02bc36c1f8 feat: register jarvis scan command and add init privacy hook
Registers the new scan command in the CLI. Adds a lightweight
privacy check at the end of jarvis init that runs disk encryption
and cloud sync checks, with pointer to jarvis scan for full audit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 18:22:13 -07:00
Jon Saad-FalconandClaude Opus 4.6 e2376d29d1 feat: add interactive model download and empty-model fallback to init
Prompts user to download recommended model during jarvis init.
Adds --no-download flag for CI. Shows helpful message when no
model fits available memory. Adds exo/nexa next-steps text.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 18:16:59 -07:00
Jon Saad-Falcon 00f71ae504 fix: update energy scaling test for linear KV-cache FLOPs model
The FLOPs formula changed from quadratic (P*N*(N+1)) to linear
(2*P*T_evaluated) with KV-cache awareness. Update the test
expectation from ~100x to ~10x for 10x token increase.
2026-03-24 18:16:11 -07:00
Jon Saad-FalconandClaude Opus 4.6 a05c2b7df6 feat: extract ollama_pull helper and add multi-engine model pull
Refactors model pull into reusable ollama_pull() function. Adds
--engine flag to support llamacpp (GGUF) and mlx (HuggingFace)
downloads via huggingface-cli, with FileNotFoundError handling.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 18:12:55 -07:00
Jon Saad-FalconandClaude Opus 4.6 ced38bcba3 feat: add privacy environment scanner with platform-specific checks
New PrivacyScanner class with checks for disk encryption (FileVault/LUKS),
MDM profiles, cloud sync agents, network exposure, and screen recording.
Supports macOS and Linux with graceful skip on missing tools.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 18:07:54 -07:00
Jon Saad-FalconandClaude Opus 4.6 7d3b4e5ea3 fix: add MLX engine support to Qwen3.5 model catalog entries
Fixes recommend_model() returning empty string on Apple Silicon
when MLX is the recommended engine. Also adds gguf_file and
mlx_repo download metadata, and estimated_download_gb helper.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 18:04:25 -07:00
Jon Saad-FalconandClaude Opus 4.6 9dbd172950 fix: mock config in test_init_defaults to test class-level defaults
The test_init_defaults test expected OperativeAgent class defaults
(temperature=0.3) but didn't mock load_config(), so when config loaded
successfully it returned the global default (0.7) instead.

Fix: mock load_config to raise, so the test properly validates the
class-level _default_temperature/max_tokens/max_turns fallback path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 17:30:46 -07:00
Jon Saad-FalconandGitHub 033ced67e6 Merge pull request #109 from open-jarvis/fix/agent-config-defaults-103
fix: agent constructor defaults resolve from config.toml
2026-03-24 16:54:44 -07:00
Jon Saad-FalconandClaude Opus 4.6 9624f53c18 style: apply ruff format to changed files
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:43:51 -07:00
Jon Saad-FalconandClaude Opus 4.6 7b5f078b4b test: add failing tests for agent config-based default resolution (issue #103)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:14:31 -07:00
406c115a52 fix: register all tool modules so they appear in web UI (#99) (#107)
Eight tool modules (file_write, apply_patch, git_tool, db_query,
pdf_tool, image_tool, audio_tool, knowledge_tools) were missing from
openjarvis/tools/__init__.py. Their @ToolRegistry.register() decorators
never fired, so the /v1/tools endpoint never returned them and the
web UI agent wizard showed an incomplete tool list.

Add the missing imports and a regression test that checks all expected
tool names are in the registry after package import.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:12:36 -07:00
Jon Saad-FalconandGitHub 228eff7c35 Merge pull request #106 from mricharz/feat/managed-agent-streaming
feat: add SSE streaming support for managed agent messages
2026-03-24 15:57:12 -07:00
555e982f51 feat: query complexity analyzer for local/cloud routing (#102)
* feat: add query complexity analyzer with CLI and UI integration

Classify incoming queries by difficulty (trivial→very_complex) to
suggest appropriate token budgets for local vs. cloud routing.

- Add score_complexity() with weighted signals (length, code, math,
  reasoning, multi-step, creative) and token tier mapping
- Wire into `jarvis ask`: auto-suggest max_tokens when not set by user,
  show complexity in --profile output, log at DEBUG level
- Add complexity metadata to /v1/chat/completions API response
- Display complexity tier and score in frontend XRayFooter
- Extend RoutingContext with complexity_score, suggested_max_tokens,
  has_reasoning fields
- Update HeuristicRouter to route on complexity_score instead of
  raw query_length
- Remove duplicated regex patterns from router.py (use complexity
  module as single source of truth)
- Add 30 unit tests for complexity module
- Fix existing router tests for new complexity-based routing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: pass temperature and max_tokens from UI settings to backend

The settings page stores temperature and max_tokens in the frontend
store, but these values were never included in the chat API request.
The backend Pydantic model defaults max_tokens to 1024 when the field
is absent, which is too low for thinking models like qwen3.5 — they
consume all tokens on reasoning and return empty content.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: pass UI settings to backend and auto-bump max_tokens from complexity

- Pass temperature and max_tokens from frontend Settings store to the
  backend API (cherry-picked from fix/ui-max-tokens-passthrough)
- Server-side: bump max_tokens when the complexity analyzer suggests a
  higher budget (e.g. for thinking models on complex queries), never
  reduce below the client-requested value
- Fixes empty responses with thinking models (e.g. qwen3.5) that
  consumed all tokens on internal reasoning

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: raise token budget tiers to prevent empty responses on thinking models

Double all tier budgets (trivial: 512→1024, simple: 1024→2048, etc.)
so that thinking models like qwen3.5 have enough headroom for internal
chain-of-thought plus visible output, even on simple queries.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: CI lint and test failures

- Break long lines in routes.py to satisfy 88-char limit (E501)
- Add intelligence.max_tokens and temperature to mocked config in
  test_ask_router.py so complexity analyzer can compare against int
  instead of MagicMock

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: line too long in test_complexity.py (E501)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 15:27:23 -07:00
manuel.richarz b7ad2d2c12 feat: add SSE streaming support for managed agent messages
Add `stream: bool` parameter to `POST /v1/managed-agents/{id}/messages`.
When `stream=true`, the agent processes the message synchronously and
returns an SSE stream (OpenAI-compatible format) with token-by-token
response, tool result events, and usage metadata.

This enables real-time voice assistants and chat UIs to receive agent
responses as they are generated, rather than polling for completion.

- Extend SendMessageRequest with `stream` field (default: false)
- Add _stream_managed_agent() helper using asyncio.to_thread()
- Build AgentContext from conversation history for multi-turn support
- Emit tool_results as named SSE events
- Persist agent response in DB after streaming completes
- Add 6 new tests covering streaming behavior
- Update agents.md documentation with streaming examples
2026-03-24 14:56:58 +01:00
04c28ef7ed feat: add CLI commands: config, registry, tool (#98)
* feat: add CLI commands: config, registry, tool

* fix: address review feedback on CLI config/registry/tool commands

- Replace non-existent `create_config_template` with `generate_default_toml`
  to fix ImportError when config file is missing
- Deduplicate registry maps into shared `_load_registry_map()` helper
- Remove dead `_get_registry_class()` function and its tests
- Route JSON output to stdout for pipeability (`jarvis config show json | jq`)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Jon Saad-Falcon <41205309+jonsaadfalcon@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 01:38:23 -07:00
8468f08c41 fix: correct O(N²) energy/FLOPs savings calculation (#95) (#97)
The energy_wh_saved and flops_saved values were orders of magnitude too
high because a scaling factor that grows linearly with N was applied to
the energy calculation, making it scale as O(N³) instead of O(N²).

Replace the buggy scale-factor approach with a direct FLOP-to-energy
conversion using each provider's per-token constants. Add regression
tests to prevent recurrence.

Closes #95

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:52:18 -07:00
Prathap PandGitHub c2756964a7 fix(channels): wire channel→agent handler and fix Telegram send pipeline (#94)
* fix(channels): wire channel→agent handler and fix Telegram send pipeline

* format code

* add supported tests
2026-03-20 18:35:18 -07:00
62eaa70736 feat: add MiniMax as cloud inference provider with M2.7 default (#85)
* feat: add MiniMax as cloud inference provider

Add MiniMax M2.5 and M2.5-highspeed as a 5th cloud provider alongside
OpenAI, Anthropic, Google, and OpenRouter. Uses the OpenAI-compatible
API at api.minimax.io/v1 via the existing openai SDK dependency.

Changes:
- Add MiniMax client init, generate, and streaming in CloudEngine
- Add MiniMax models to model catalog with correct pricing
- Add MINIMAX_API_KEY environment variable support
- Add temperature clamping (0.01-1.0) per MiniMax API constraints
- Add 19 unit tests and 3 integration tests
- Update docs and README with MiniMax provider info

* feat: upgrade MiniMax default model to M2.7

- Add MiniMax-M2.7 and MiniMax-M2.7-highspeed to model list
- Set MiniMax-M2.7 as default model (first in list)
- Keep all previous models (M2.5, M2.5-highspeed) as alternatives
- Update pricing table with M2.7 entries
- Update model catalog with M2.7 specs
- Update docs to list all available MiniMax models
- Update unit tests (23 passing) and integration tests (3 passing)

---------

Co-authored-by: Octopus <octo-patch@users.noreply.github.com>
2026-03-20 04:16:33 -07:00
Teemu Säilynoja 806067a002 fix: simplify web search error handling and improve test mocks
- Catch any Exception from Tavily (not just specific error types)
- Fall back to DuckDuckGo for any error, making the tool more robust
- Fix test mocks to use builtins.__import__ for proper local import mocking
- Simplify test_execute_tavily_error to test generic exception handling
2026-03-17 10:34:45 +02:00
Teemu Säilynoja b10b19b1eb feat: add DuckDuckGo fallback to web_search tool
When Tavily API is unavailable (no API key, import error, or API error),
the web_search tool now falls back to DuckDuckGo search instead of
failing. This ensures the tool always works for users without a
Tavily API key.

- Add DuckDuckGo search as fallback using ddgs package
- Catch specific Tavily exceptions (MissingAPIKeyError, InvalidAPIKeyError,
  ForbiddenError, UsageLimitExceededError, TimeoutError, BadRequestError)
- Add logger.debug calls to log when falling back to DuckDuckGo
- Use ddgs instead of deprecated duckduckgo-search package name
- Add test for DuckDuckGo fallback result formatting
- Simplify test mocking to use consistent monkeypatch patterns

Closes #81
2026-03-17 10:34:45 +02:00
Gabriel Bo 9c6bdc09cb token counting fixes 2026-03-16 21:51:05 -07:00
Tarun SureshandClaude Opus 4.6 181d9ac0eb fix: resolve ruff I001 import sorting and E501 line length in tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 00:13:49 +00:00
Tarun SureshandClaude Opus 4.6 981f665913 feat: add Anthropic prompt cache breakpoint annotation
Add _annotate_anthropic_cache helper that annotates system messages
with cache_control for Anthropic prompt caching.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 18:42:54 +00:00
Tarun SureshandClaude Opus 4.6 5df8688627 feat: add GatewayDaemon, SessionExpiryHook, and service file generation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 18:40:07 +00:00