-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Problem
Core memory files (SOUL.md, USER.md, MEMORY.md) are hardcoded in two places:
MemoryFileRegistryinbootstrap.php— registers the three files at priorities 10, 20, 30MemoryFilesSelector/PipelineMemoryFilesReact component — hardcodesEXCLUDED_FILES = ['SOUL.md', 'USER.md', 'MEMORY.md']to hide them from the picker
This means plugins can't register their own core memory files that get treated as first-class citizens (always injected, excluded from the optional picker).
Proposed
Make the core memory file registry dynamic so plugins can register additional always-on memory files:
PHP side
MemoryFileRegistry::register()already exists and works — plugins can call it today- Expose a filter or action at a well-known hook so plugins register their files cleanly
- Add a method like
MemoryFileRegistry::get_core_filenames()that returns the list of always-injected files
JS/React side
- Instead of hardcoding
EXCLUDED_FILES, fetch the core file list from the REST API (or from a localized script variable) - New endpoint or extend existing:
GET /files/agentcould return{ files: [...], core_files: ['SOUL.md', ...] } MemoryFilesSelectorexcludes whatever the backend says is core, not a hardcoded array
Use cases
- A plugin registers
PLUGIN_CONTEXT.mdas a core memory file at priority 25 - It always injects into AI calls, appears in the "core" section, and is excluded from the pipeline/flow picker
- If the plugin is deactivated, the file stops injecting automatically
Related
- Feature: Flow-scoped memory files #471 (flow-scoped memory files) — introduced the shared
MemoryFilesSelectorwith the hardcoded exclusion - Core directive:
CoreMemoryFilesDirective(priority 20) - Registry:
MemoryFileRegistryininc/Engine/AI/MemoryFileRegistry.php
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels