feat: Multi-agent Phase 1 — user_id scoping for DB schema and agent filesystem#568
Merged
feat: Multi-agent Phase 1 — user_id scoping for DB schema and agent filesystem#568
Conversation
…-agent support (#560) Phase 1 of multi-agent support: scope pipelines, flows, jobs, and agent files to WordPress users. Database: - Add user_id column to pipelines, flows, and jobs tables - Add migrate_columns() to Pipelines and Flows (Jobs already had it) - Add user_id filter to get_all_pipelines, get_all_flows, get_pipelines_count, get_pipelines_list, get_pipelines_for_list_table, get_jobs_count, get_jobs_for_list_table - Include user_id in create_pipeline, create_flow, create_job - Scheduler intentionally skips user_id filter (runs all users' flows) Filesystem: - DirectoryManager::get_agent_directory() accepts user_id param - AgentMemory and DailyMemory constructors accept user_id - get_default_agent_user_id() resolves DATAMACHINE_DEFAULT_AGENT_USER constant or first admin user - user_id=0 preserves legacy shared directory for backward compat All changes are additive with DEFAULT 0 — existing single-agent installs keep working without configuration. Refs: #561, #562, #563, #564, #567
Homeboy Results —
|
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 1 of multi-agent support (#560). Adds
user_idscoping to the database layer and agent filesystem so each WordPress user can operate as an independent agent.user_idcolumn to pipelines, flows, and jobs tables withDEFAULT 0for backward compatmigrate_columns()to Pipelines and Flows for existing installs (Jobs already had one)user_idfilter to all list/count query methodsDirectoryManager::get_agent_directory($user_id)returnsagent/{user_id}/when specifiedAgentMemoryandDailyMemoryacceptuser_idin constructorsget_default_agent_user_id()resolves fromDATAMACHINE_DEFAULT_AGENT_USERconstant or first admin userCoreMemoryFilesDirectiveandMemoryFilesReaderChanges
10 files changed, 291 insertions, 38 deletions
Pipelines.phpFlows.phpJobs.phpJobsOperations.phpDirectoryManager.phpAgentMemory.phpDailyMemory.phpCoreMemoryFilesDirective.phpMemoryFilesReader.phpdata-machine.phpBackward Compatibility
user_idcolumns default to0— existing single-agent installs work without changesnull/0— callers that don't pass user_id get original behaviorRefs
Closes #561, closes #562, closes #563, closes #564, closes #567
Parent: #560