Skip to main content

Crate ctxone_hub

Crate ctxone_hub 

Source
Expand description

CtxOne Hub library.

Exposes http::router, the memory-tools helpers, and the migration runner so integration tests and downstream embedders can reuse them without a separate process.

Modules§

asd_pool
AsdProcessPool — manages a pool of asd-serve child processes, one per registered repo. Processes are spawned lazily on first use and killed after an idle timeout to reclaim memory.
asd_registry
Read-only consumer of the shared ASD repo registry written by the asd repo ... CLI. We deliberately don’t depend on agentstatedeveloper-core from a different repo — this is the only piece of the schema we need (active pointer + per-repo path), so parsing it directly with toml is simpler than carrying a cross-repo dependency.
backup
SQLite snapshot / rolling backup support for the hub.
code_tools
HTTP helpers for the CTX-hub → ASD code-intelligence proxy.
db_admin
ctxone-hub db: the Hub’s Postgres database.
graph_write
Writes that skip a commit when nothing would change (ctx-hub-sync t-004).
help
On-demand instruction disclosure (help) — t-005 of ctx-context-paradigm.
http
HTTP REST API for CtxOne Hub.
hub_store
Where the hub keeps the state that lives outside the graph: the project registry (crate::project) and session statistics (crate::memory_tools::SessionRegistry), and the MCP sessions another Hub process can continue (crate::mcp_sessions).
lens
Embedded Lens static file server.
local_ref
Refs that never leave this machine (ctx-hub-sync t-002).
lockfile
Process-exclusive lockfile + inode-drift watchdog for the sqlite db.
mcp_http
MCP-over-HTTP: serve the MCP tool surface as a Streamable-HTTP route so a single hub daemon serves MCP + REST + Lens from one port. Agents connect by URL (/mcp?namespace=<ns>) instead of spawning their own stdio child, which removes the startup-order race and the two-hubs-one-db lockfile collision.
mcp_sessions
MCP sessions that any Hub process sharing the database can continue (ctx-multi-tenant-hub t-012).
memory_tools
CtxOne memory-oriented MCP tools.
migrations
CtxOne schema migrations.
personal
The personal namespace (ctx-hub-sync t-003).
plan_tools
CTXone plan tools — wrap agentstategraph-tasks and surface it as MCP tools + shared helpers for the HTTP endpoints.
postgres_url
What a Postgres connection string says about TLS, for the hub’s startup log. AgentStateGraph’s storage does the connecting and the verifying (its postgres-tls feature, which the hub always builds with); this only reads the string, so an operator can see whether a database on another machine may be reached in plaintext without anyone having chosen that.
project
Project registry — maps codebases to CTXone namespaces.
push_filter
A credential scan on every push (ctx-hub-sync t-007).
rate_limit
Rate limiting for the Hub HTTP API: per tenant on a multi-tenant Hub, per peer IP otherwise.
reminder_tools
CTXone reminder tools — wrap agentstategraph-reminders and surface it as MCP tools + shared helpers for the HTTP endpoints.
reminder_trust
Which reminders may run their commands on this machine (ctx-hub-sync t-008).
secrets
Credential-shaped strings in a store (ctx-hub-sync t-017).
segments
Topic-arc segmentation of a session’s turns (t-003, curated summaries).
session_links
Deriving a session’s plan/task associations from its transcript.
starter
Session STARTER generation from the user’s own words (t-002).
sync_client
The Hub pushes its workspaces to a remote Hub and pulls them back (ctx-hub-sync t-006).
sync_service
The Hub serves AgentStateGraph’s sync protocol (ctx-hub-sync t-015).
tenant
Tenant identity for a multi-tenant Hub: which tenant a request’s bearer token belongs to (docs/design/MULTI_TENANT_HUB.md, “Identity”).
tenant_admin
ctxone-hub tenant: a multi-tenant Hub’s tenants, their tokens in the tenants file, and deleting a tenant’s data (docs/design/MULTI_TENANT_HUB.md, “Administration”).
tenant_cache
Each tenant’s data on a multi-tenant Hub (docs/design/MULTI_TENANT_HUB.md, “Per-tenant state”).
turns
Raw session turns, on a local-only ref of their own (ctx-hub-sync t-002).