Expand description
Sticky CCR tool injection for provider prefix-cache stability.
Once a conversation has seen at least one CCR handle, the ctx_expand tool
definition stays in tools[] for the remainder of the session, even on turns
with no active markers. This prevents the tool-list change from busting the
provider prompt-cache prefix.
That injection is the developer-mode path only. Under protection the proxy
declares nothing: a declaration it adds is no evidence that the host can
execute the call. There a recovery stub is issued only per block, for a
tool result whose very call is on record in this proxy’s store as answered
by an Engine of this store, and it names the expand tool the host listed
under the same prefix as the tool that produced the block
(expand_tool_for). Nothing marks a conversation under protection: the
mark is read by the injection only.
Functions§
- ensure_
tool_ present - Ensure
ctx_expandis present in thetoolsarray when CCR is active. Returnstrueif the tool was injected. - is_
ccr_ active - Returns
trueif this conversation has ever used CCR. - mark_
ccr_ active - Mark a conversation as having used CCR.