memory: route staging lifecycle through sqlite authority
This commit is contained in:
@@ -80,8 +80,8 @@ pub enum WorkerPrompt {
|
||||
/// after the scope summary when an AGENTS.md is present.
|
||||
AgentsMdSection,
|
||||
/// Trailing `## Resident memory summary` section, appended after the
|
||||
/// AGENTS.md section when memory is enabled, summary injection is enabled,
|
||||
/// and `memory/summary.md` has a valid non-empty body.
|
||||
/// AGENTS.md section when memory is enabled, resident injection is enabled,
|
||||
/// and the workspace Memory document has a valid non-empty body.
|
||||
ResidentMemorySummarySection,
|
||||
/// Trailing Worker orchestration guidance, appended when registered tools
|
||||
/// include Worker-management capabilities.
|
||||
|
||||
@@ -153,9 +153,9 @@ pub struct SystemPromptContext<'a> {
|
||||
/// Not visible from the template; consumed by the trailing-section
|
||||
/// formatter in [`SystemPromptTemplate::render`].
|
||||
pub agents_md: Option<String>,
|
||||
/// The body of `<workspace>/.yoi/memory/summary.md`, with
|
||||
/// frontmatter stripped. `None` disables the resident summary section;
|
||||
/// empty strings are ignored by the trailing-section formatter.
|
||||
/// The body of the workspace Memory document. `None` disables the
|
||||
/// resident summary section; empty strings are ignored by the trailing-section
|
||||
/// formatter.
|
||||
pub resident_summary: Option<&'a str>,
|
||||
/// Catalog used to render the fixed trailing section headers.
|
||||
/// Passed by reference so callers do not give up ownership across
|
||||
|
||||
@@ -507,8 +507,8 @@ pub struct Worker<C: LlmClient, St: Store> {
|
||||
/// [`Self::from_manifest`], or defaults to the builtin pack when a
|
||||
/// Worker is constructed through lower-level paths that have no loader.
|
||||
prompts: Arc<PromptCatalog>,
|
||||
/// When true (default), the system-prompt assembler may append the
|
||||
/// workspace memory summary (`memory/summary.md`). Internal disposable
|
||||
/// When true (default), the system-prompt assembler may append resident
|
||||
/// context from the workspace Memory document. Internal disposable
|
||||
/// workers disable this so resident memory exposure is opt-in per Worker.
|
||||
inject_resident_summary: bool,
|
||||
/// When true (default), the system-prompt assembler may append resident
|
||||
@@ -833,7 +833,7 @@ impl<C: LlmClient, St: Store> Worker<C, St> {
|
||||
self.inject_resident_summary = enabled;
|
||||
}
|
||||
|
||||
/// Toggle `memory/summary.md` resident injection in the system prompt.
|
||||
/// Toggle workspace Memory document resident injection in the system prompt.
|
||||
pub fn set_resident_summary_injection(&mut self, enabled: bool) {
|
||||
self.inject_resident_summary = enabled;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user