mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-30 23:14:37 +00:00
feat(redirect_links): SQLite-backed URL shortener for token-heavy links (#870)
This commit is contained in:
@@ -125,6 +125,9 @@ fn build_registered_controllers() -> Vec<RegisteredController> {
|
||||
controllers.extend(crate::openhuman::memory::all_memory_tree_registered_controllers());
|
||||
// Memory tree retrieval layer (#710 — LLM-callable read tools over the tree)
|
||||
controllers.extend(crate::openhuman::memory::all_retrieval_registered_controllers());
|
||||
// Link shortener for long tracking URLs — saves LLM tokens
|
||||
controllers
|
||||
.extend(crate::openhuman::redirect_links::all_redirect_links_registered_controllers());
|
||||
// Referral and growth tracking
|
||||
controllers.extend(crate::openhuman::referral::all_referral_registered_controllers());
|
||||
// Billing and subscription management
|
||||
@@ -197,6 +200,7 @@ fn build_declared_controller_schemas() -> Vec<ControllerSchema> {
|
||||
schemas.extend(crate::openhuman::memory::all_memory_controller_schemas());
|
||||
schemas.extend(crate::openhuman::memory::all_memory_tree_controller_schemas());
|
||||
schemas.extend(crate::openhuman::memory::all_retrieval_controller_schemas());
|
||||
schemas.extend(crate::openhuman::redirect_links::all_redirect_links_controller_schemas());
|
||||
schemas.extend(crate::openhuman::referral::all_referral_controller_schemas());
|
||||
schemas.extend(crate::openhuman::billing::all_billing_controller_schemas());
|
||||
schemas.extend(crate::openhuman::team::all_team_controller_schemas());
|
||||
@@ -264,6 +268,9 @@ pub fn namespace_description(namespace: &str) -> Option<&'static str> {
|
||||
"memory_tree" => Some(
|
||||
"Canonical chunk ingestion, provenance capture, and chunk retrieval for source-grounded memory.",
|
||||
),
|
||||
"redirect_links" => Some(
|
||||
"Shorten long tracking URLs to `openhuman://link/<id>` placeholders (SQLite-backed) to save tokens in prompts, with round-trip rewrite helpers.",
|
||||
),
|
||||
"referral" => Some("Referral codes, stats, and apply flows via the hosted backend API."),
|
||||
"billing" => Some("Subscription plan, payment links, and credit top-up via the backend."),
|
||||
"team" => Some("Team member management, invites, and role changes via the backend."),
|
||||
@@ -556,6 +563,7 @@ mod tests {
|
||||
fn namespace_description_known_namespaces() {
|
||||
assert!(namespace_description("memory").is_some());
|
||||
assert!(namespace_description("memory_tree").is_some());
|
||||
assert!(namespace_description("redirect_links").is_some());
|
||||
assert!(namespace_description("billing").is_some());
|
||||
assert!(namespace_description("config").is_some());
|
||||
assert!(namespace_description("health").is_some());
|
||||
|
||||
Reference in New Issue
Block a user