Skip to content

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Rust
2.8 KB
Raw Blame
<section class="surface knowledge-evidence" aria-label="Knowledge evidence">
<details open><summary>Knowledge evidence and validity</summary>
<p class="section-note">Version <code>{{ knowledge.version }}</code> · Evidence applies to this indexed version. Recorded citations do not establish truth.</p>
<dl><dt>Expiration</dt><dd>{{ knowledge.expiry }}{% if expired %} · Expired: excluded from normal retrieval, pending retention sweep.{% endif %}</dd><dt>Readable sources</dt><dd>{{ knowledge.source_count }} recorded citations. Missing records mean unknown, not unsupported. Sources can be unavailable, private or no longer retained.</dd></dl>
{% if !knowledge.sources.is_empty() %}<ul class="knowledge-sources">{% for source in knowledge.sources %}<li><strong>{{ source.kind }}</strong> · <time datetime="{{ source.at }}">{{ source.at }}</time><br>{% if source.href != "" %}<a href="{{ source.href }}">{{ source.label }} ↗</a>{% else %}{{ source.label }}{% endif %}</li>{% endfor %}</ul>{% endif %}
<nav class="usage-pagination" aria-label="Evidence pages">{% if knowledge.newer != "" %}<a href="{{ knowledge.newer }}">← Newer sources</a>{% endif %}{% if knowledge.older != "" %}<a href="{{ knowledge.older }}">Older sources →</a>{% endif %}</nav>
<h2>Declared contradictions</h2><p class="section-note">{{ knowledge.disagreement_count }} live readable edges; at most 20 shown. These are declared relationships, not an adjudication of correctness. Absence does not prove consistency.</p>
<ul>{% for edge in knowledge.disagreements %}<li>{{ edge.direction }}: <a href="{{ edge.href }}">{{ edge.title }}</a></li>{% endfor %}</ul>
</details>
<details {% if knowledge.query != "" %}open{% endif %}><summary>Why was this page retrieved?</summary>
{% if knowledge.query != "" %}<p>Query: <strong>{{ knowledge.query }}</strong> · <a href="{{ knowledge.search_href }}">Search with this context ↗</a></p><a class="secondary-button" href="{{ knowledge.explain_href }}">Recompute explanation</a>{% endif %}
<p class="section-note">{{ knowledge.recall_note }}</p>
{% if let Some(trace) = knowledge.trace %}<div class="table-scroll" data-page-recall-trace><p>Position {{ trace.position }} · rank {{ trace.rank }} · fused {{ trace.fused }} · authority {{ trace.authority }}{% if let Some(score) = trace.rerank_score %} · rerank {{ score }}{% endif %}</p><table><thead><tr><th>Stream</th><th>Rank</th><th>Raw score</th><th>RRF contribution</th></tr></thead><tbody>{% for row in trace.streams %}<tr><td>{{ row.stream }}</td><td>{{ row.rank }}</td><td>{{ row.raw }}</td><td>{{ row.rrf }}</td></tr>{% endfor %}</tbody></table>{% if trace.matched_entities != "" %}<p>Matched entities: {{ trace.matched_entities }}</p>{% endif %}{% if let Some(via) = trace.graph_via %}<p>Reached through: {{ via }}</p>{% endif %}</div>{% endif %}
</details>
</section>