Skip to content

feat: add space as run agent parameter for projects or user - #2963

Merged
kunal0137 merged 6 commits into
devfrom
feat-run-agent-user-space
Sep 17, 2026
Merged

kunal0137 merged 6 commits into
devfrom
feat-run-agent-user-space

Conversation

@kunal0137

@kunal0137 kunal0137 commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds an explicit filesystem target to RunAgent. The top-level space argument selects the room (INSIGHT or omitted), the authenticated user's assets (USER), or an editable project ID. The resolved AgentRunTarget is retained across harness execution, subagent inheritance, Git hooks, and cluster persistence so downstream paths do not reinterpret the target.

Changes Made

  • Add top-level RunAgent(space=...) parsing and reject conflicting legacy target parameters.
  • Resolve INSIGHT, USER, and editable-project roots through AgentRunTarget.
  • Validate optional subdir beneath the authorized target root.
  • Carry target metadata into subagents, Git hooks, and cluster synchronization.
  • Keep Python execution and Playground/SDK changes out of this PR.

How to Test

Post-merge local validation on 2026-09-17:

  1. Omitted space selected the room directory.
  2. space="USER" selected the authenticated user's version/assets directory.
  3. space="01a05ec0-6cd1-7298-8800-58e16922e397" selected that editable project's version/assets directory.
  4. Managed Python validation confirmed each selected working directory was the run's ROOT, while authenticated USER_ROOT remained available in all three target types.
  5. A USER-targeted LLM Wiki run staged the packaged skill and invoked its linter through Bash using target-relative paths. The linter correctly reported that llm-wiki/ does not currently exist; no files were modified.

Notes

  • This PR was merged before its placeholder description was replaced; this body records the scope and validation after the fact.
  • git diff-tree --check on merge commit 84cc9a069693dee76b5aee257a60a9bcbd469d32 flags CRLF-added lines in RunAgentReactor.java as trailing whitespace. That formatting issue was not mixed into the managed-Python follow-up.
  • Anonymous USER rejection, unauthorized-project rejection, subagent inheritance, and cluster behavior remain source-reviewed rather than re-exercised in this post-merge local session.

@snyk-io

snyk-io Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

# Conflicts:
#	src/prerna/reactor/agent/AgentRunner.java
#	src/prerna/reactor/agent/RunAgentReactor.java
#	src/prerna/reactor/agent/subagent/AgentSubAgentRegistry.java
#	src/prerna/reactor/agent/subagent/SubAgentDispatcher.java
@kunal0137
kunal0137 marked this pull request as ready for review September 17, 2026 17:33
@kunal0137
kunal0137 requested a review from a team as a code owner September 17, 2026 17:33
@kunal0137
kunal0137 merged commit 84cc9a0 into dev Sep 17, 2026
4 checks passed
@kunal0137
kunal0137 deleted the feat-run-agent-user-space branch September 17, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant