Commit graph

133 commits

Author SHA1 Message Date
Rosie Val
e33368a03c Add venv/.venv to ingestion's SKIP_DIRECTORIES
The previous fix (403b4e8) filtered doc-file selection through
should_skip_path(), assuming it matched tree_sitter_indexer.py's
exclusion behavior. It doesn't: ingestion.py's own SKIP_DIRECTORIES
never included 'venv'/'.venv' at all - only tree_sitter_indexer.py's
separate SKIP_DIRS did. Two inconsistent exclusion lists in the
codebase, and the previous fix happened to reuse the incomplete one.

Confirmed live: a selective-indexing run after the previous fix still
pulled in 61 .venv/lib/python3.11/site-packages/... files into
Ody-project_index.
2026-08-22 20:25:13 -04:00
Rosie Val
403b4e8c5f Fix selective semantic indexing pulling in .venv/node_modules garbage
_run_semantic_indexing_background and _run_semantic_indexing_sync both
select doc files with Path(project_path).rglob("*.md"/"*.txt"/"*.rst")
and no directory exclusion at all - unlike the tree-sitter code-file
selection right next to it, which already filters via
TreeSitterIndexer.SKIP_DIRS.

For a project with a .venv checked into its own directory, this pulled
in hundreds of unrelated site-packages files (LICENSE.txt, dist-info
top_level.txt, vendored library .rst docs) as "important" project
knowledge, drowning out the actual project's docs and code in every
KB built with selective indexing. Confirmed live: Ody-project_index
had .venv/lib/python3.11/site-packages/... entries making up most of
its 67 documents.

Filter with the already-existing should_skip_path() from
app.core.ingestion (same SKIP_DIRECTORIES used by ingest_directory)
instead of writing a second exclusion list.
2026-08-22 20:14:45 -04:00
Rosie Val
e374440c67 Add a service-token bypass for code-forge, gated on auth being enabled
code-forge (the stdio MCP server) calls the REST API directly and has
no login flow of its own. With auth disabled it already passes
through as guest, same as before - but the moment CLAUDE_OS_EMAIL/
PASSWORD get set, it would start getting 401'd with no way to
authenticate.

get_current_user now accepts a CLAUDE_OS_SERVICE_TOKEN as a bearer
token, checked with a constant-time compare, alongside normal user
JWTs. claude_code_mcp.py sends it (via a shared _auth_headers() used
by all 5 of its httpx.AsyncClient() call sites) whenever
CLAUDE_OS_SERVICE_TOKEN is set, and sends nothing when it isn't - a
no-op change for anyone not using auth.

Since this process can be launched directly (e.g. over SSH as a stdio
server) without claude-os's own .env sourced into its shell or its cwd
set to the project root, it now loads .env explicitly by path relative
to the script's own location rather than relying on load_dotenv()'s
cwd-relative default search.
2026-08-22 16:42:03 -04:00
Rosie Val
9298de1a49 Fix auth so it actually enforces, not just decorates
Two gaps found while wiring auth into the data routes:

1. mcp_server/auth.py: HTTPBearer() defaults to auto_error=True, which
   rejects any request with no Authorization header before
   get_current_user's own "auth not configured -> allow as guest"
   check ever runs. That meant turning on Depends(get_current_user)
   anywhere 401'd every request even with auth fully disabled.
   Switched to auto_error=False and handle the missing-credentials
   case explicitly inside get_current_user instead.

2. Frontend never actually sent the stored token on data requests.
   auth.tsx only attached it to its own /api/auth/me check; api.ts's
   fetch() calls (chat, stats, documents, upload, delete) and every
   axios call elsewhere in the app (projects, kanban, hooks) had no
   Authorization header at all. Added an authHeaders() helper in
   api.ts, and a single axios request interceptor in auth.tsx that
   attaches the token app-wide since every component imports the same
   default axios instance.

Known gap not addressed here: mcp_server/claude_code_mcp.py (the
code-forge stdio MCP server) calls the REST API with no token at all.
Harmless while auth is disabled (current state), but it will start
getting 401'd the moment CLAUDE_OS_EMAIL/PASSWORD are actually set -
needs a service-token bypass if that's ever turned on.
2026-08-22 15:46:45 -04:00
Rosie Val
d999d6af4a Require auth on all data API routes, not just /api/auth/me
get_current_user was only wired into one of 75 routes. Everything
else - chat, kb crud, uploads, projects, jobs, mcp management - had
no auth dependency at all, so setting CLAUDE_OS_EMAIL/PASSWORD only
gated the frontend's login screen while the API itself stayed fully
open to anyone who could reach it directly.

Added Depends(get_current_user) to all 72 remaining data routes,
left /api/auth/login, /api/auth/status, and /health public (has to
be reachable pre-login / for health checks). get_current_user already
returns a guest user when auth isn't configured, so this is a no-op
for anyone who hasn't set credentials.

Moved the mcp_server.auth import to the top of the file - it was
previously imported ~3250 lines down, after most of these routes'
def statements would have already tried to evaluate
Depends(get_current_user) as a default argument.
2026-08-22 15:43:16 -04:00
Rosie Val
6a23cf80d5 Fix RAG synthesis silently falling back to raw chunk dump
_query_base/_query_hybrid passed raw TextNodes to
get_response_synthesizer().synthesize(), which requires NodeWithScore
(it reads node.node internally). Every real query hit
AttributeError: 'TextNode' object has no attribute 'node', got caught
by a bare except Exception, and silently fell back to
_generate_fallback_answer - the "Based on the available
documentation: 1. From X... 2. From Y..." template users were
actually seeing instead of a real LLM-synthesized answer.

This was a pre-existing bug independent of the Groq change - Ollama
hit the same exception, it just wasn't noticed because the fallback
looks superficially like an answer.
2026-08-22 15:39:31 -04:00
Rosie Val
3512c615c9 Fix frontend API base URL for remote access, pin mcp<2.0.0
api.ts and auth.tsx hardcoded API_BASE to http://localhost:8051 with
no override, unlike every other component which already checked
VITE_API_URL first. That's fine when the browser and server are on
the same machine, but breaks auth/chat/stats/documents entirely when
accessing the UI from a different machine than the one running
claude-os - "localhost" resolves to the browser's own machine, not
the server.

Also pins mcp<2.0.0 in requirements.txt: mcp 2.0.0 removed the
low-level Server.list_tools() API that mcp_server/claude_code_mcp.py
(the code-forge stdio MCP server) depends on, so an unbounded
mcp>=1.0.0 install silently breaks that integration.
2026-08-22 15:31:10 -04:00
Rosie Val
614a109378 Add Groq as an LLM provider
Config.PROVIDER was never actually consulted by the LLM call sites -
rag_engine.py, insight_extractor.py, and knowledge_lifecycle.py all
hardcoded Ollama directly. This wires up a real "groq" provider:

- config.py: GROQ_API_KEY/GROQ_MODEL settings, is_groq_provider(),
  provider-aware get_active_llm_model() and validate_provider_config()
- rag_engine.py: uses llama_index's Groq LLM when provider is groq
- insight_extractor.py / knowledge_lifecycle.py: branch to Groq's
  OpenAI-compatible chat completions API instead of Ollama's /api/generate
- requirements.txt: add llama-index-llms-groq

Embeddings are untouched and stay on Ollama - Groq has no embeddings API.
Default model is openai/gpt-oss-120b.
2026-08-22 13:53:46 -04:00
Bob Roberts
ee7b62bc5b feat: Add cross-KB search, inline health checks, and simplify templates
All checks were successful
Tests / test (push) Successful in 13m33s
- Add search_all_knowledge_bases MCP tool + POST /api/kb/search-all endpoint
  + query_documents_multi_kb() in sqlite_manager with dedup and score merge
- Add inline health check to search_knowledge_base (24h cache, appends warnings)
- Rewrite CLAUDE.md template: 351→128 lines, project content first, session tips
- Simplify session command: 625→224 lines, 4-field state file
- Update README.md What's New to v2.5, remove Discord section
- Add cross-KB search tool to CLAUDE.md MCP tools table
- Add 5 new tests for query_documents_multi_kb (all 593 tests pass)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 11:04:21 -06:00
Bob Roberts
ecd040d08a chore: Add lifecycle tools to CLAUDE.md project template
Ensures new projects initialized with /claude-os-init include
the lifecycle slash command and MCP tools in their CLAUDE.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 10:11:04 -06:00
Bob Roberts
844762f187 feat: Add Knowledge Lifecycle Engine and fix upload_document MCP tool
Add KB lifecycle management system with deduplication, consolidation,
archival, and health analytics. Also fix pre-existing routing bug in
upload_document MCP tool (was hitting /import instead of new /documents/content).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 10:08:00 -06:00
Bob Roberts
90de2e32e4 feat: Consolidate memory skills & punch up README
Memory Skill:
- Merged remember-this into unified memory skill
- Now uses Claude OS KBs (not separate memory MCP)
- Supports natural language: "remember this:", "save to memory:", etc.
- Deleted redundant remember-this skill

README:
- New tagline: "Give Your AI a Memory"
- Added "The Magic" section showing natural language UX
- Rewrote "What is Claude OS" with before/after comparison
- Added killer line: "Claude is a tool → Claude is a partner"
- Compact features table replacing wall of checkmarks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 16:04:43 -06:00
Bob Roberts
b3f9123c5b
Merge pull request #23 from gurdasnijor/smithery/add-badge
Add "Run in Smithery" badge
2025-12-18 15:20:39 -06:00
Bob Roberts
753d427896 fix: Configure MCP server per-project via claude mcp add
Claude Code stores MCP configs in ~/.claude.json per-project, NOT in
~/.claude/settings.json. The previous approach of writing to settings.json
didn't work - projects showed "No MCP servers configured".

Changes:
- Remove broken MCP setup from setup-claude-os.sh (was writing to wrong file)
- Add Step 2.5 to /claude-os-init that runs `claude mcp add` for each project
- Update final summary to remind users to restart Claude Code after init

Now the workflow is:
1. ./setup-claude-os.sh - Install Claude OS once
2. /claude-os-init - Run in each project (creates KBs + configures MCP)
3. Restart Claude Code - MCP connects
4. mcp__code-forge__* tools available!

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 18:16:19 -06:00
Gurdas Nijor
19332033db Add Smithery badge 2025-12-16 11:39:08 -08:00
Bob Roberts
c45c2e87a5 Fixed the auto sync file watcher and updated setup script to make agent-os default install false 2025-12-12 14:37:45 -06:00
Bob Roberts
212dda1ce1 session extractor fix 2025-12-11 19:49:53 -06:00
Bob Roberts
d4a9b8b62d Add wiki badge and link to Recommended Skills 2025-12-11 19:49:24 -06:00
Bob Roberts
a1820ebdf0 Adding more tests to improve test coverage 2025-12-11 14:07:58 -06:00
Bob Roberts
2af8381476 fix: Update Getting Started to use setup-claude-os.sh
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 12:59:33 -06:00
Bob Roberts
a744080e65 feat: Add Skills Library and Session Insights (v2.3)
## Skills Library
- Browse and install 36+ community skills from Anthropic & Superpowers
- Local skill templates (Rails, React, testing)
- Create custom project-specific skills
- Beautiful UI with search and filtering
- /claude-os-skills command for CLI management

## Session Insights
- Parse Claude Code native .jsonl session files
- Extract patterns, decisions, blockers automatically
- Track tool usage and file changes
- Session summary generation for LLM processing

## Documentation
- Updated README with v2.3 features
- Updated API_REFERENCE with new endpoints
- Added SKILLS_GUIDE.md and SESSIONS_GUIDE.md
- Updated GitHub Pages (docs/index.html)
- Reorganized docs (internal_docs for private)

## Bug Fixes
- Fixed httpx client closure in community skill install
- Fixed frontend request format for skill install

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 12:56:49 -06:00
Bob Roberts
8908f2b03b Working on adding the linux setup 2025-12-09 17:43:16 -06:00
Bob Roberts
6562d3615b Add Discord announcement and update community contributions
- Add Discord badge and invite link at top of README
- Add 5 new PRs from @illAssad (#18-#22) to contributions table

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 16:39:51 -06:00
Bob Roberts
0764d37b74
Merge pull request #21 from illAssad/fix/skip-node-modules
fix: Skip node_modules and common build directories during ingestion
2025-12-09 16:34:36 -06:00
Bob Roberts
a6a3913bfc
Merge pull request #22 from illAssad/fix/delete-document-endpoint
fix: Fix delete document endpoint SQLite cursor handling
2025-12-09 16:34:22 -06:00
Illya
f6320faa9c fix: Fix delete document endpoint SQLite cursor handling
- Replace context manager pattern with direct cursor assignment
  (SQLite cursors don't support context manager protocol)
- Use conn.close() instead of db_manager.return_connection()
  (SQLiteManager doesn't have return_connection method)

Fixes 500 error when deleting documents via REST API.
2025-12-08 23:54:49 -05:00
Illya
e63466845f fix: Skip node_modules and common build directories during ingestion
The ingest_directory function was recursively indexing ALL files including
node_modules, which caused:
- Massive index bloat (thousands of irrelevant library files)
- Polluted search results with third-party code
- Very slow indexing times

Added SKIP_DIRECTORIES set with common directories to exclude:
- Package managers: node_modules, vendor, Pods
- Build outputs: dist, build, target, .next, .nuxt
- VCS: .git, .svn, .hg
- Caches: __pycache__, .pytest_cache, .mypy_cache, .cache
- IDE: .vscode, .idea
- Our own: .claude-os

Also added should_skip_path() helper function with wildcard support
for patterns like *.egg-info.
2025-12-08 23:33:33 -05:00
Bob Roberts
046f18949c
Merge pull request #19 from illAssad/feat/background-indexing-jobs-ui
Add non-blocking semantic indexing with Jobs Dashboard UI
2025-12-08 21:57:23 -06:00
Bob Roberts
90297ca4db
Merge pull request #20 from illAssad/fix/tree-sitter-version-compatibility
Fix tree-sitter version compatibility with tree-sitter-languages
2025-12-08 21:49:52 -06:00
Bob Roberts
2b80837f7c
Merge pull request #18 from illAssad/fix/frontend-npm-install
Fix frontend startup by auto-installing npm dependencies
2025-12-08 21:47:01 -06:00
Illya
64a8807f33 Fix tree-sitter version compatibility with tree-sitter-languages
Pin tree-sitter to 0.20.x because tree-sitter-languages 1.10.x is
incompatible with tree-sitter 0.21+. The 0.21+ API changed Parser()
and Language() constructors, causing '__init__() takes exactly 1
argument (2 given)' errors on all file parsing operations.

This fix restores selective indexing functionality which relies on
TreeSitter for code parsing and symbol extraction.
2025-12-08 20:26:20 -05:00
Illya
51e0702d94 Add non-blocking semantic indexing with Jobs Dashboard UI
- Fix server blocking issue during semantic indexing by using FastAPI BackgroundTasks
- Add job progress tracking with real-time status updates
- Add /api/jobs and /api/jobs/{job_id} endpoints for monitoring
- Add JobsDashboard component with live progress bars and status indicators
- Add Jobs tab to MainApp for interactive monitoring
- Maintain backward compatibility with background=false option for sync mode
- Include automatic job cleanup to prevent memory leaks
2025-12-08 17:19:15 -05:00
Illya
a77c439015 Fix frontend startup by auto-installing npm dependencies
The start script was running `npm run dev` without checking if
node_modules existed, causing "vite: command not found" errors
for new users who hadn't manually run npm install.

Now checks for node_modules and runs npm install automatically
if dependencies are missing.
2025-12-08 16:40:53 -05:00
Bob Roberts
3a5d7dee81 Update README with v2.2 features and community contributions
Documentation updates:
- Add "What's New in v2.2" section highlighting:
  - Gum CLI support for beautiful interactive installer
  - Safety features (--demo, --dry-run, auto-backup)
  - Lite model default (llama3.2:3b)
  - Cloud provider option (OpenAI)
- Add "Community Contributions" section thanking:
  - @williamclavier, @jplimack, @gkastanis, @nicseltzer
- Update installation section for setup-claude-os.sh
- Update Scripts Guide with new unified installer
- Update environment variables with new defaults and OpenAI options
- Note legacy script redirects

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-05 21:38:46 -06:00
Bob Roberts
75162ce596 Add safety features: --demo, --dry-run, and automatic backups
New command line options:
- --demo: Interactive demo mode (no changes made)
- --dry-run: Preview what would be done without doing it
- --help/-h: Show usage information
- --version/-v: Show version number
- --force/-f: Skip confirmation prompts

Safety improvements:
- Automatic backup of .env and config.json before overwriting
- Backups saved as filename.backup.YYYYMMDD_HHMMSS
- Dry-run shows all actions that would be taken
- Demo mode lets users see the beautiful UI safely

Version bumped to 2.2.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-05 21:31:33 -06:00
Bob Roberts
8e2c4cc1d0 Add Charm CLI (gum) support for premium installer experience
- Detect gum and offer to install for enhanced UX
- Add wrapper functions with graceful bash fallback:
  - gum_choose: Interactive option selection
  - gum_confirm: Yes/no prompts
  - gum_input: Text input
  - gum_password: Hidden input
  - gum_spin: Animated spinners
  - gum_style_box: Styled boxes
- Works perfectly without gum, beautiful with it
- Supports macOS (Homebrew), Debian/Ubuntu (apt), and Go install

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-05 21:04:45 -06:00
Bob Roberts
e98ecbcf14 Add beautiful unified installer with Local/Cloud support
✨ New Features:
- Beautiful CLI installer (setup-claude-os.sh) with ASCII art,
  progress bars, spinners, and styled prompts
- Choose between Local (Ollama) or Cloud (OpenAI) providers
- Lite model (llama3.2:3b) as default - faster download, works on more machines
- Full model (llama3.1:8b) option for users who want better quality
- OpenAI API support for users who prefer cloud

🔧 Changes:
- setup.sh and install.sh now redirect to setup-claude-os.sh
- config.py updated with provider support and new defaults
- Works on both macOS and Linux

📦 Default Model Change:
- Before: llama3.1:latest (8B, 4.7GB download)
- After: llama3.2:3b (3B, 2GB download)

This makes Claude OS accessible to more users with smaller machines
while still offering the full experience for power users.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-05 20:53:20 -06:00
Bob Roberts
61a9ad8f00 Add MCP server, tests, and updated docs
- CLAUDE.md: Added identity, session management, full documentation
  - install.sh: Auto-configures settings.json for users
  - claude_code_mcp.py: True MCP server with stdio transport (15 tools)
  - test_mcp_server.py: 15 tests covering tools, API, errors

  366 tests passing. Ready for the 100 stars
2025-12-05 20:29:51 -06:00
Bob Roberts
c9d7b61cf2
Merge pull request #17 from williamclavier/fix/install-subdirectories
Fix: Ensure commands and skills directories exist during install
2025-12-03 14:30:23 -06:00
William Clavier
1683592ee4 Fix: Ensure commands and skills directories exist during install
Previously, if ~/.claude already existed from a prior Claude Code
installation, the install script would skip creating the commands/
and skills/ subdirectories. This caused symlink creation to fail
silently, leaving users without access to /claude-os-init and other
commands.

This fix ensures the subdirectories are always created, regardless
of whether ~/.claude already exists.

Fixes issue where /claude-os-init command was not available after
running install.sh on systems with existing ~/.claude directory.
2025-12-03 13:50:13 -05:00
Bob Roberts
6c51d807a6 Remove test screenshots from tracking 2025-12-02 16:28:24 -06:00
Bob Roberts
b5246a0ab2 Clean up repo: remove internal docs, fix issues, add features
- Remove internal docs from git tracking (still in .gitignore)
- Clean Tuffy/Pistn references from public documentation
- Add uninstall.sh script with README documentation
- Fix Configure modal overlay bug (issue #14)
- Add Playwright e2e testing setup
- Remove state/config files from tracking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 16:27:58 -06:00
Bob Roberts
295a95d4ae [Bug] "Configure" window superimposed on underlying UI elements #14 2025-12-02 16:10:07 -06:00
Bob Roberts
559205e7c0 Added uninstall script 2025-12-02 15:36:12 -06:00
Bob Roberts
8e696f0323 Code cleanup still and all tests passing now 2025-12-02 15:28:25 -06:00
Bob Roberts
9e1f9c4074
Merge pull request #11 from gkastanis/feature/linux-support
Add Linux support for installation scripts
2025-12-02 14:48:00 -06:00
Bob Roberts
73278c90e8
Merge pull request #10 from nicseltzer/main
[readme][link]: Broken link to 'buildermethods'
2025-12-02 14:47:24 -06:00
Bob Roberts
a7b7c4e51c
Merge pull request #12 from gkastanis/fix/missing-frontend-lib-files
Add missing frontend lib files
2025-12-02 14:44:55 -06:00
Bob Roberts
f45f2f0c6a Major cleanup that should have done before announcing this app!!! 2025-12-02 14:35:15 -06:00
Bob Roberts
033a36987a
Merge pull request #16 from jplimack/fix/issue-9-hardcoded-paths
Fix hardcoded /Users/iamanmp/ paths - make paths dynamic
2025-12-02 14:13:55 -06:00