Expand description
Graph extractor task: bump semantic recurrence_count from retrieval deltas, then run persona evolution.
Alpha: API may change before 1.0.
Persona evolution rows use ainl_persona::EVOLUTION_TRAIT_NAME — import that constant from ainl-persona
when matching evolution bundles; do not duplicate the string.
Note: GraphExtractorTask::evolution_engine is the canonical in-process handle to
ainl_persona::EvolutionEngine. ainl-runtime exposes the same engine for direct
ingest_signals / correction_tick / evolve calls; this crate’s run_pass is one signal path, not the only one.
§run_pass and ExtractionReport
GraphExtractorTask::run_pass returns an ExtractionReport (not Result<_, _>): semantic /
pattern / persona phases record errors in extract_error, pattern_error, and
persona_error respectively. Use ExtractionReport::has_errors before treating a pass as
clean. ArmaraOS GraphMemoryWriter::run_persona_evolution_pass surfaces the same struct
and logs warnings for populated error slots.
Structs§
- Extract
Pass Collected - Collected signals plus episode tag writes deferred to
flush_episode_pattern_tags. - Extraction
Report - Result of
GraphExtractorTask::run_pass. Errors are carried per phase; the pass does not returnResultso callers can record partial progress and continue. - Graph
Extractor Task - Persona
Signal Extractor State - Rolling state for debounce / streak detectors (in-memory, per
GraphExtractorTask). - Semantic
Tag - Turn
Vitals - Minimal vitals snapshot accepted by this crate (avoids a direct
openfang-typesdep).
Enums§
Constants§
- AXIS_
EVOLUTION_ SNAPSHOT - Stable alias for the same trait string (documentation / import ergonomics).
- EVOLUTION_
TRAIT_ NAME - Canonical
ainl_memory::PersonaNode::trait_namefor axis-evolution bundles.graph_extractor(Prompt 2) should import this from the crate root when selecting persona rows for domain / formality signals — do not duplicate the string.
Functions§
- extract_
pass - Episode-ordered heuristics plus semantic domain pass; updates
stateand may patch episode rows. - extract_
pass_ collect - Build signals and pending episode tag patches without writing episodes yet.
- extract_
turn_ semantic_ tags_ for_ memory - Semantic tags from one completed turn suitable for downstream fact extraction.
- flush_
episode_ pattern_ tags - Apply episode
persona_signals_emittedtag patches fromextract_pass_collect. - run_
extraction_ pass - Convenience wrapper for one-off extraction. Creates a fresh
GraphExtractorTaskwith a newcrate::PersonaSignalExtractorStateon each call, so streak-based detectors (brevity, formality) cannot fire across invocations. For long-running agent loops, instantiateGraphExtractorTaskdirectly and callGraphExtractorTask::run_passto preserve streak state between passes. - tag_
tool_ names - Maps tool name strings to canonical
TagNamespace::Tooltags. Unknown tools are retained with a sanitized slug and confidence0.5. - update_
semantic_ recurrence - For each semantic node for
agent_id, ifreference_countincreased since the last extractor snapshot, incrementrecurrence_countby at most 1 and refresh_last_ref_snapshot.