diff --git a/memory.elh b/memory.elh index 607cdf7..4f665a2 100644 --- a/memory.elh +++ b/memory.elh @@ -1,4 +1,4 @@ -// auto-generated by elc --emit-header — do not edit +// auto-generated by elc --emit-header - do not edit extern fn tier_working() -> String extern fn tier_episodic() -> String extern fn tier_canonical() -> String diff --git a/routes.el b/routes.el index 09444ad..ec92061 100644 --- a/routes.el +++ b/routes.el @@ -7,6 +7,14 @@ import "neuron-api.el" import "sessions.el" import "soul.elh" +// flag_true — tolerant flag test: accepts both boolean `true` (Kotlin UI) and +// integer 1 (el-src UI). json_get_bool only recognises literal `true`, so +// without this wrapper an "agentic":1 request would silently route to the +// non-agentic path. +fn flag_true(body: String, key: String) -> Bool { + return json_get_bool(body, key) || json_get_int(body, key) > 0 +} + // --------------------------------------------------------------------------- // Rate limiting — simple in-memory per-IP sliding window counter. //