Expand description
Core tool execution handlers.
Contains handlers for subcogβs core memory operations: capture, recall, status, namespaces, prompt understanding, consolidate, enrich, reindex.
StructsΒ§
- Component
Health π - Health status for a backend component.
ConstantsΒ§
- MAX_
CONTENT_ πLENGTH - Maximum allowed input length for content fields (SEC-M5).
- MAX_
QUERY_ πLENGTH - Maximum allowed input length for query fields (SEC-M5).
- NAMESPACE_
DEFS π - Namespace definitions with descriptions for XML output.
FunctionsΒ§
- build_
delete_ πresult_ output - Builds the deletion result output message.
- build_
dry_ πrun_ output - Builds the dry-run output message.
- build_
llm_ πprovider_ from_ config - Builds an LLM provider from configuration.
- build_
xml_ πdomains - Builds the domains XML section (single-line).
- build_
xml_ πnamespaces - Builds the namespaces XML section with counts from the service (single-line).
- build_
xml_ πstatus - Builds the status XML element (single-line).
- build_
xml_ πtools - Builds the tools XML section with essential parameters (single-line).
- check_
capture_ πhealth - Checks health of the capture service.
- check_
index_ πhealth - Checks health of the index layer.
- check_
persistence_ πhealth - Checks health of the persistence layer by attempting a simple operation.
- check_
vector_ πhealth - Checks health of the vector layer (embedding search).
- delete_
memory_ πhard - Performs hard (permanent) deletion of a memory.
- delete_
memory_ πsoft - Performs soft deletion (tombstone) of a memory.
- escape_
xml π - Escapes special XML characters for safe embedding in XML output.
- execute_
bulk_ πdelete - Executes bulk deletion and returns (
deleted_count,failed_count). - execute_
capture - Executes the capture tool.
- execute_
consolidate - Executes the consolidate tool. Triggers memory consolidation and returns statistics.
- execute_
delete - Executes the delete tool - soft or hard deletes a memory.
- execute_
delete_ all - Executes the
delete_alltool - bulk deletes memories matching filter criteria. - execute_
enrich - Executes the enrich tool. Returns a sampling request for the LLM to enrich a memory.
- execute_
gdpr_ export - Executes the GDPR data export tool.
- execute_
get - Executes the get tool - retrieves a memory by ID.
- execute_
get_ summary - Executes the get summary tool. Retrieves a summary memory and its linked source memories.
- execute_
history - Executes the history tool - retrieves change history for a memory.
- execute_
init - Executes the init tool for session initialization.
- execute_
list - Executes the list tool - lists memories with optional filtering and pagination.
- execute_
namespaces - Executes the namespaces tool.
- execute_
prompt_ understanding - Executes the
prompt_understandingtool. - execute_
recall - Executes the recall tool.
- execute_
reindex - Executes the reindex tool.
- execute_
restore - Executes the restore tool - restores a tombstoned (soft-deleted) memory.
- execute_
status - Executes the status tool with comprehensive health checks (CHAOS-HIGH-006).
- execute_
update - Executes the update tool - modifies an existing memoryβs content and/or tags.
- format_
init_ πrecall_ xml - Formats the recall section as XML for init output (single-line).
- format_
source_ πmemory_ entry - Formats a single source memory entry for display.
- has_
any_ πfilter_ criteria - Checks if the filter has any criteria set.
- run_
mcp_ πconsolidation - Helper function to run consolidation and format results for MCP tool response.
- validate_
input_ πlength - Validates that a string input does not exceed the maximum allowed length.