// primitive_binding.el — THE ONE FLIP POINT. // // This file is the single seam between the swarm and the real agentic // primitives. Binding the reshape's decorated primitives is a one-line change // HERE and nothing else changes anywhere in the swarm. // // The api-reshape agent (wt/api-reshape) is wiring the primitives as DECORATED // El on the dharma_* event bus over the engram — think/attend/learn/ground/assert // become decorated fns that emit afferent events onto the bus. The moment they // land, flip `bound_think` (and its siblings) to call them. // // TODAY (stub fallback, compiles + runs now against :8901): // fn bound_think(...) { return primitive_think(ctx, instruction) } // // THE FLIP (when reshape's decorated primitives land — one line each): // fn bound_think(...) { return think(ctx, instruction) } // decorated, on dharma bus // // Keep the stub as fallback: `bound_think` is only reached when the seam mode is // "decorated" (SWARM_PRIMITIVE_SEAM=decorated). Until you flip these bodies AND // set that env, the harness runs entirely on the hermetic stub. // bound_think — decorated `think` over a worker's compiled context. fn bound_think(ctx: String, instruction: String) -> String { // FLIP HERE -> `return think(ctx, instruction)` once the decorated primitive lands. return primitive_think(ctx, instruction) } // bound_attend — decorated retrieval over the dharma bus (falls back to the // HTTP/engram attend today). fn bound_attend(query: String, limit: Int) -> String { // FLIP HERE -> `return attend(query, limit)` once decorated. return primitive_attend(query, limit) } // bound_learn — decorated write onto the bus (falls back to opt-in engram write). fn bound_learn(corr_id: String, observation: String) -> String { // FLIP HERE -> `return learn(corr_id, observation)` once decorated. return primitive_learn(corr_id, observation) }