chore(dist): recompile neuron.c and elp-c-decls.h
Neuron Soul CI / build (push) Has been cancelled
Neuron Soul CI / deploy (push) Has been cancelled

Reflects session-start event pruning in emit_session_start_event
(keep_n=10, prunes oldest beyond that) and updated forward declarations
for connector routing (connectd_get, connectd_post, handle_connectors,
rate_limit_check, handle_chat_plan) replacing the removed route_sessions
helpers and flag_true.
This commit is contained in:
2026-07-01 11:26:00 -05:00
parent 6819729429
commit c586ea5ef1
2 changed files with 28 additions and 5 deletions
Generated Vendored
+5 -1
View File
@@ -141,7 +141,6 @@ el_val_t build_np(el_val_t referent, el_val_t slots);
el_val_t build_pp(el_val_t loc);
el_val_t build_rules(void);
el_val_t build_system_prompt(el_val_t ctx, el_val_t chat_mode);
el_val_t handle_chat_plan(el_val_t body);
el_val_t build_vocab(void);
el_val_t build_vp_body(el_val_t slots);
el_val_t build_vp_from_slots(el_val_t slots);
@@ -151,6 +150,8 @@ el_val_t call_neuron_mcp(el_val_t tool_name, el_val_t args_json);
el_val_t capitalize_first(el_val_t s);
el_val_t chat_default_model(void);
el_val_t clean_llm_response(el_val_t s);
el_val_t connectd_get(el_val_t suffix);
el_val_t connectd_post(el_val_t suffix, el_val_t body);
el_val_t connector_tools_json(void);
el_val_t conv_history_load(void);
el_val_t conv_history_persist(el_val_t hist);
@@ -595,7 +596,9 @@ el_val_t handle_api_tune_config(el_val_t body);
el_val_t handle_chat(el_val_t body);
el_val_t handle_chat_agentic(el_val_t body);
el_val_t handle_chat_as_soul(el_val_t body);
el_val_t handle_chat_plan(el_val_t body);
el_val_t handle_config(el_val_t method, el_val_t body);
el_val_t handle_connectors(el_val_t method, el_val_t clean, el_val_t body);
el_val_t handle_conversations(el_val_t method);
el_val_t handle_dharma(el_val_t path, el_val_t method, el_val_t body);
el_val_t handle_dharma_recv(el_val_t body);
@@ -918,6 +921,7 @@ el_val_t pluralize(el_val_t singular);
el_val_t proactive_curiosity(void);
el_val_t pulse_count(void);
el_val_t pulse_inc(void);
el_val_t rate_limit_check(el_val_t ip, el_val_t path);
el_val_t realize(el_val_t form);
el_val_t realize_lang(el_val_t form, el_val_t profile);
el_val_t realize_np(el_val_t referent, el_val_t number);
Generated Vendored
+23 -4
View File
@@ -129,6 +129,7 @@ el_val_t resolve_in_root(el_val_t path, el_val_t root);
el_val_t dispatch_tool(el_val_t tool_name, el_val_t tool_input);
el_val_t is_builtin_tool(el_val_t tool_name);
el_val_t next_bridge_id(void);
el_val_t handle_chat_plan(el_val_t body);
el_val_t handle_chat_agentic(el_val_t body);
el_val_t agentic_loop(el_val_t session_id, el_val_t model, el_val_t safe_sys, el_val_t tools_json, el_val_t messages_in, el_val_t h, el_val_t tools_log_in);
el_val_t bridge_save(el_val_t session_id, el_val_t model, el_val_t safe_sys, el_val_t tools_json, el_val_t messages, el_val_t tools_log, el_val_t tool_use_id);
@@ -157,8 +158,8 @@ el_val_t elp_extract_topic(el_val_t msg);
el_val_t elp_detect_predicate(el_val_t msg);
el_val_t elp_parse(el_val_t msg);
el_val_t handle_elp_chat(el_val_t body);
el_val_t rate_limit_check(el_val_t ip, el_val_t path);
el_val_t strip_query(el_val_t path);
el_val_t flag_true(el_val_t body, el_val_t key);
el_val_t err_404(el_val_t path);
el_val_t err_405(el_val_t method, el_val_t path);
el_val_t route_health(void);
@@ -167,9 +168,9 @@ el_val_t route_imprint_contextual(el_val_t body);
el_val_t route_imprint_user(el_val_t body);
el_val_t route_synthesize(el_val_t body);
el_val_t handle_dharma_recv(el_val_t body);
el_val_t route_sessions(void);
el_val_t parse_session_id_from_path(el_val_t path);
el_val_t parse_session_subpath(el_val_t path);
el_val_t connectd_get(el_val_t suffix);
el_val_t connectd_post(el_val_t suffix, el_val_t body);
el_val_t handle_connectors(el_val_t method, el_val_t clean, el_val_t body);
el_val_t handle_request(el_val_t method, el_val_t path, el_val_t body);
el_val_t init_soul_edges(void);
el_val_t ensure_self_canonical_bridge(void);
@@ -443,6 +444,24 @@ el_val_t emit_session_start_event(void) {
el_val_t payload = el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(EL_STR("{\"event\":\"session_start\""), EL_STR(",\"boot\":")), boot_num), EL_STR(",\"cgi\":\"")), eff_cgi), EL_STR("\"")), EL_STR(",\"node_count\":")), int_to_str(node_ct)), EL_STR(",\"edge_count\":")), int_to_str(edge_ct)), EL_STR(",\"identity_loaded\":")), has_identity), EL_STR(",\"prev_session_summary_loaded\":")), has_prev_sum), EL_STR(",\"ts\":")), int_to_str(ts)), EL_STR("}"));
el_val_t tags = EL_STR("[\"internal-state\",\"session-start\",\"InternalStateEvent\"]");
el_val_t discard = engram_node_full(payload, EL_STR("InternalStateEvent"), EL_STR("session-start"), el_from_float(0.9), el_from_float(0.9), el_from_float(1.0), EL_STR("Episodic"), tags);
el_val_t keep_n = 10;
el_val_t old_events = engram_search_json(EL_STR("session-start InternalStateEvent"), 200);
if (!str_eq(old_events, EL_STR("")) && !str_eq(old_events, EL_STR("[]"))) {
el_val_t ev_count = json_array_len(old_events);
if (ev_count > keep_n) {
el_val_t prune_to = (ev_count - keep_n);
el_val_t ei = 0;
while (ei < prune_to) {
el_val_t old_ev = json_array_get(old_events, ei);
el_val_t old_ev_id = json_get(old_ev, EL_STR("id"));
if (!str_eq(old_ev_id, EL_STR(""))) {
engram_forget(old_ev_id);
}
ei = (ei + 1);
}
println(el_str_concat(el_str_concat(el_str_concat(el_str_concat(EL_STR("[soul] pruned "), int_to_str(prune_to)), EL_STR(" old session-start events (kept ")), int_to_str(keep_n)), EL_STR(")")));
}
}
println(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(EL_STR("[soul] session-start event logged (boot="), boot_num), EL_STR(" nodes=")), int_to_str(node_ct)), EL_STR(" edges=")), int_to_str(edge_ct)), EL_STR(" prev_summary=")), has_prev_sum), EL_STR(")")));
return 0;
}