Skip to main content

Crate chasm

Crate chasm 

Source
Expand description

Chat System Manager (CSM) - Library

A library for managing and merging chat sessions across workspaces and LLM providers.

§Supported Providers

  • VS Code Copilot Chat - Default, file-based sessions
  • Cursor - Cursor IDE chat sessions
  • Ollama - Local LLM inference
  • vLLM - High-performance LLM serving
  • Azure AI Foundry - Microsoft’s AI platform (Foundry Local)
  • LM Studio - Local model runner
  • LocalAI - Drop-in OpenAI replacement
  • Text Generation WebUI - oobabooga’s web interface
  • Jan.ai - Open source ChatGPT alternative
  • GPT4All - Local privacy-focused AI
  • Llamafile - Portable executable LLMs

§Agent Development Kit (Agency)

The Agency module provides a Rust-native framework for building AI agents:

use csm::Agency::{Agent, AgentBuilder, Runtime, Tool};

let agent = AgentBuilder::new("assistant")
    .instruction("You are a helpful assistant.")
    .model("gemini-2.5-flash")
    .tool(Tool::web_search())
    .build();

let runtime = Runtime::new()?;
runtime.register_agent(agent);
let result = runtime.run("assistant", "Hello!").await?;

Re-exports§

pub use cli::Cli;
pub use cli::Commands;
pub use cli::ExportCommands;
pub use cli::FetchCommands;
pub use cli::FindCommands;
pub use cli::GitCommands;
pub use cli::ImportCommands;
pub use cli::ListCommands;
pub use cli::MergeCommands;
pub use cli::MigrationCommands;
pub use cli::MoveCommands;
pub use cli::ProviderCommands;
pub use cli::RunCommands;
pub use cli::ShowCommands;
pub use database::ChatDatabase;
pub use database::ShareLinkInfo;
pub use database::ShareLinkParser;
pub use database::ShareLinkProvider;
pub use error::CsmError;
pub use models::ChatMessage;
pub use models::ChatRequest;
pub use models::ChatSession;
pub use models::ChatSessionIndex;
pub use models::ChatSessionIndexEntry;
pub use models::SessionWithPath;
pub use models::Workspace;
pub use models::WorkspaceJson;
pub use providers::CsmConfig;
pub use providers::GenericMessage;
pub use providers::GenericSession;
pub use providers::ProviderConfig;
pub use providers::ProviderRegistry;
pub use providers::ProviderType;
pub use storage::add_session_to_index;
pub use storage::backup_workspace_sessions;
pub use storage::close_vscode_and_wait;
pub use storage::compact_session_jsonl;
pub use storage::is_vscode_running;
pub use storage::parse_session_auto;
pub use storage::parse_session_file;
pub use storage::parse_session_json;
pub use storage::parse_session_jsonl;
pub use storage::read_chat_session_index;
pub use storage::register_all_sessions_from_directory;
pub use storage::reopen_vscode;
pub use storage::repair_workspace_sessions;
pub use storage::sync_session_index;
pub use storage::trim_session_jsonl;
pub use storage::write_chat_session_index;
pub use workspace::decode_workspace_folder;
pub use workspace::discover_workspaces;
pub use workspace::find_workspace_by_path;
pub use workspace::get_chat_sessions_from_workspace;
pub use workspace::get_workspace_by_hash;
pub use workspace::get_workspace_by_path;
pub use workspace::get_workspace_storage_path;
pub use workspace::normalize_path;

Modules§

agency
Agent Development Kit (Agency) - Rust Implementation
analytics
Analytics module
api
HTTP API Server for Chat System Manager
automation
Automation Engine Module
browser
Browser authentication detection for web-based LLM providers
cli
CLI argument definitions using clap derive macros
cloud_sync
Cloud Sync Service Integration
commands
Command implementations
database
Universal Chat Session Database
encryption
Encryption at Rest for Session Data
error
Error types for csm
integrations
Life Integrations Module
intelligence
AI Intelligence Module
mcp
MCP (Model Context Protocol) Server for Chat System Manager
models
Data models for VS Code chat sessions
plugins
Plugin System Module
providers
LLM Provider integrations for Chat System Manager
routing
Routing module
scaling
Database Scaling Module
storage
VS Code storage (SQLite database) operations
sync
Synchronization Module
teams
Team management module
telemetry
Telemetry module for anonymous usage data collection
tui
TUI (Text User Interface) module for interactive browsing of chat sessions
workspace
Workspace discovery and management