Skip to content

sairam0424/ContextOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

195 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ContextOS (v1.12.0)

Enterprise-grade intelligence layer for autonomous AI agents.

ContextOS is a TypeScript monorepo providing structured context infrastructure — from workspace indexing and vector search to multi-agent orchestration with built-in resilience. Ships as three npm packages and a spatial dashboard.


Quick Start

Install the CLI

npm install -g @context-os/cli

Initialize a Project

context-os init my-project

Connect an AI Agent (MCP)

In Cursor, Claude Desktop, or VS Code settings:

npx -y @context-os/mcp@latest

Launch the Dashboard

context-os dashboard

Architecture

Four workspaces under one Turborepo root:

Package Description
@context-os/core SQLite indexer, vector search (sqlite-vec), ML embeddings, tree-sitter parsing, DI container, event bus, agent registry, orchestration, resilience
@context-os/cli Terminal interface — project scaffolding, search, watch, dashboard launcher
@context-os/mcp Model Context Protocol server — stdio and HTTP/SSE transports
workspace-dashboard React 19 + Three.js spatial visualization (private, not published)

v2 Core Modules

Module Purpose
ServiceContainer Dependency injection with scoped resolution and typed tokens
WorkspaceEventBus Typed events with error-isolated handlers
AgentRegistry Lifecycle management — register, heartbeat, quarantine, stale detection
MessageBus Direct, broadcast, and correlation-based messaging with TTL
TaskGraph DAG-validated task dependencies with compare-and-swap assignment
TaskScheduler Dependency-aware scheduling with contention retry
ConflictResolver Read/write locks with upgrade support
CircuitBreaker Sliding-window failure tracking with auto-quarantine
AuditLog Merkle-linked tamper-evident audit trail

Development

npm run build          # Turbo: build all workspaces
npm run test           # Turbo: run mocha tests (core/cli/mcp)
npm run link:all       # Build + npm link for local dev

Per-workspace:

cd workspace-dashboard && npm run dev    # Vite dev server
cd workspace-cli && npm run watch        # tsc watch
cd workspace-mcp && npm run mcp:stdio    # Run MCP server

Run a single test:

cd packages/core && npx mocha dist/tests/container.test.js

Capability Matrix

Feature CLI MCP Core
Spatial Dashboard (Aether HUD) x
Real-time Watch Service x
Project Scaffolding x
Daily Logging x x
ADR Tracking x x
Workspace Validation x
Global Search x x x
Multi-Agent Orchestration x
Circuit Breaker / Resilience x
Merkle Audit Log x

Version & Release

All four package.json files must share the same version. Publish order: Core -> CLI -> MCP. Triggered by pushing a v* tag. CI runs on Node 22.


Documentation


📄 License

MIT © Sairam Ugge

About

The Autonomous Spatial Intelligence Layer for AI Agents. ContextOS bridges the gap between raw development activity and structured AI context using a 3D Aether HUD, Gemini-powered Janitor Agents, and Graph-aware Spatial RAG.

Topics

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors