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-servechild 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 onagentstatedeveloper-corefrom a different repo — this is the only piece of the schema we need (active pointer + per-repo path), so parsing it directly withtomlis 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 ofctx-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-tasksand 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-tlsfeature, 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-remindersand 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).