feat: Multi-agent Phase 2 — directives resolve user context from execution#572
Merged
feat: Multi-agent Phase 2 — directives resolve user context from execution#572
Conversation
Homeboy Results —
|
…chemas
Both abilities return different fields depending on the execution path
(single vs bulk, with/without flow). Fields like flow_id are null when
no flow_config is provided, but the output schema declared them as
strict 'integer', causing WP_Ability::validate_output() to reject the
result with ability_invalid_output. Use array('integer', 'null') union
types per JSON Schema spec to allow null values.
…nt (#565) Phase 2 of multi-agent support: directives now read the correct agent's files based on user_id from the execution context. Pipeline path: - RunFlowAbility propagates flow's user_id to job record and engine snapshot - AIStep extracts user_id from engine snapshot into payload Chat path: - ChatOrchestrator threads user_id through options into loop_context - All three callers (processChat, processContinue, processPing) pass user_id Directives: - CoreMemoryFilesDirective resolves user_id from payload, passes to DirectoryManager::get_agent_directory() - MemoryFilesReader::read() accepts user_id param (default 0 for compat) - PipelineMemoryFilesDirective and FlowMemoryFilesDirective pass user_id through to MemoryFilesReader All changes default to user_id=0 — existing single-agent installs keep working without configuration. Refs: #565, #560
…oader Homeboy's WP test bootstrap loads the plugin on plugins_loaded, but the plugin requires vendor/autoload.php (PSR-4 autoloader). Without running composer install, no DataMachine classes are autoloadable, causing 'Class not found' fatals in PHPUnit.
BaseCommand extends WP_CLI_Command, which isn't available in the test environment without this dependency. WordPress core doesn't include WP-CLI.
06be5dc to
fd967c1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 2 of multi-agent support (#560). Directives now resolve
user_idfrom execution context so each agent's files (SOUL.md, MEMORY.md, etc.) are read from the correct per-user directory.Changes
7 files changed, 31 insertions, 9 deletions
Pipeline path
user_idto job record and engine snapshotuser_idfrom engine snapshot into the payload passed to directivesChat path
user_idthrough options intoloop_contextprocessChat,processContinue,processPing) passuser_idDirectives
user_idfrom$payload, passes toDirectoryManager::get_agent_directory()$user_idparam (default 0 for backward compat)user_idthrough toMemoryFilesReaderData flow
Backward Compatibility
All
user_idparameters default to0— existing single-agent installs get the legacy shared agent directory with zero configuration changes.Refs
Closes #565
Parent: #560