I'm currently playing around with retooling the ru...
# proj-agent
n
I'm currently playing around with retooling the runtime/base code that grabs the org repo.... what I was gonna do in general is walk up the repo uri path looking for an 'org repo' (which in the case of gitlab is
openhands-config
... ) it then tries to clone the repo into
/workspace/org_openhands_${GROUPNAME_WHERE_IT_FOUND_THE_ORG_REPO}
if that dir already exists, it fails and doesn't look for microagents in that dir. There's a fair bit of expectation that the 'openhands configuration' will live in
.openhands
relatively pathed ... which is a little obtuse; as discerning where the hell its looking is hard since there's several
.openhands
dirs depending on
cwd
I wondered if, once the org_repo is cloned or discerned to be in place... does it make sense to create a symlink from
/workspace/.openahands
to
/workspace/whateverthehellorgrepowecloned
? That got me thinking about abstractions .... Would there be benefit to the idea of setting some durablee/expected env vars for •
openhands_session_id
•
workspace_root
•
config_root
•
code_provider_type
•
code_provider_url
•
org_repo
•
active_org
•
org_repo_path
•
org_id
•
org_name
•
org_config_path
•
project name
•
active_project
•
project_repo
•
project_path
•
project_id
•
project_config_path
•
project_active_branch
•
project_default_branch
•
project_cloned_branch
( This is silly and not really a good idea, but if there were a global toggle like •
multi_project_workflow_bool
to inform various tooling that assumptions about accuracy of the above may be problematic could be useful to facilitate restablishing coherency mid-flow ) ... and providing some means to fetch these values from an endpoint OH provides the sandbox that could be instantiated at start of $whatever_conversation but also REinstantiated should ones working context change (say switching to another project) rather than using relative pathing, to allow for displaying the actual values of where things are being looked for in logs n wotnot .... while also providing ways to abstract out the different interests? you don't really care if the org microagent collection comes from a repo or not, you don't really care if this conversation started out on one project, and switched to another, so long as there's ways to attain coherence ... I'm gonna try and adjust the get the org repo someplace in /workspace logic a bit... if I get something that feels helpful, I'll sub a PR .... but wanted to float the ideas above in case they resonate with y'all
Copy code
0:0:0 - INFO: openhands/runtime/base.py:459 - [runtime] Cloning repo: <TOP_LEVEL_GROUP>/<subgroups: <SUB_GROUP_1>/<SUB_GROUP_2>>/<SELECTED_PROJECT>
0:0:0 - INFO: openhands/runtime/base.py:782 - [runtime] Selected repo: <TOP_LEVEL_GROUP>/<subgroups: <SUB_GROUP_1>/<SUB_GROUP_2>>/<SELECTED_PROJECT>. Searching for org_microagents
0:0:0 - INFO: openhands/runtime/base.py:673 - [runtime] Starting org‑level microagent loading for repository: <TOP_LEVEL_GROUP>/<subgroups: <SUB_GROUP_1>/<SUB_GROUP_2>>/<SELECTED_PROJECT>
0:0:0 - INFO: openhands/runtime/base.py:695 - [runtime] <SELECTED_PROJECT> Checking for org‑level microagents at <TOP_LEVEL_GROUP>/<subgroups: <SUB_GROUP_1>/<SUB_GROUP_2>>/openhands-config
0:0:0 - ERROR: openhands/integrations/provider.py:467 - Failed to access repository <TOP_LEVEL_GROUP>/<subgroups: <SUB_GROUP_1>/<SUB_GROUP_2>>/openhands-config with all available providers. Errors: gitlab: Resource not found on gitlab API: Client error '404 Not Found' for url 'https://<GITLAB_HOST>/api/v4/projects/<TOP_LEVEL_GROUP>%2F<SUB_GROUP_1>%2F<SUB_GROUP_2>%2Fopenhands-config' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404
0:0:0 - WARNING: openhands/runtime/base.py:705 - [runtime] <SELECTED_PROJECT> Received AuthenticationError checking for Org‑level <TOP_LEVEL_GROUP>/<subgroups: <SUB_GROUP_1>/<SUB_GROUP_2>>/openhands-config: Unable to access repo <TOP_LEVEL_GROUP>/<subgroups: <SUB_GROUP_1>/<SUB_GROUP_2>>/openhands-config
0:0:0 - INFO: openhands/runtime/base.py:695 - [runtime] <SELECTED_PROJECT> Checking for org‑level microagents at <TOP_LEVEL_GROUP>/<SUB_GROUP_1>/openhands-config
0:0:0 - ERROR: openhands/integrations/provider.py:467 - Failed to access repository <TOP_LEVEL_GROUP>/<SUB_GROUP_1>/openhands-config with all available providers. Errors: gitlab: Resource not found on gitlab API: Client error '404 Not Found' for url 'https://<GITLAB_HOST>/api/v4/projects/<TOP_LEVEL_GROUP>%2F<SUB_GROUP_1>%2Fopenhands-config' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404
0:0:0 - WARNING: openhands/runtime/base.py:705 - [runtime] <SELECTED_PROJECT> Received AuthenticationError checking for Org‑level <TOP_LEVEL_GROUP>/<SUB_GROUP_1>/openhands-config: Unable to access repo <TOP_LEVEL_GROUP>/<SUB_GROUP_1>/openhands-config
0:0:0 - INFO: openhands/runtime/base.py:695 - [runtime] <SELECTED_PROJECT> Checking for org‑level microagents at <TOP_LEVEL_GROUP>/openhands-config
0:0:0 - INFO: openhands/runtime/base.py:713 - [runtime] <SELECTED_PROJECT> org-repo <TOP_LEVEL_GROUP>/openhands-config local path should be: /workspace/org_openhands_<TOP_LEVEL_GROUP>
0:0:0 - INFO: openhands/runtime/base.py:717 - [runtime] <SELECTED_PROJECT> pre‑existing org-repo <TOP_LEVEL_GROUP>/openhands-config found at /workspace/org_openhands_<TOP_LEVEL_GROUP>. Attempting fetch+hard reset
0:0:0 - INFO: openhands/runtime/base.py:721 - [runtime] <SELECTED_PROJECT> Successfully updated org-repo /workspace/org_openhands_<TOP_LEVEL_GROUP> from <TOP_LEVEL_GROUP>/openhands-config
0:0:0 - INFO: openhands/runtime/base.py:603 - [runtime] Attempting to list files in org‑level microagents directory: /workspace/org_openhands_<TOP_LEVEL_GROUP>/microagents
0:0:0 - INFO: openhands/runtime/base.py:617 - [runtime] Found 10 files in org‑level microagents directory
0:0:0 - INFO: openhands/runtime/base.py:634 - [runtime] Loaded 2 repo agents and 8 knowledge agents from org‑level
0:0:0 - INFO: openhands/runtime/base.py:753 - [runtime] Loaded 10 microagents from org‑level repository <TOP_LEVEL_GROUP>/openhands-config
0:0:0 - INFO: openhands/runtime/base.py:790 - [runtime] Selected repo: <TOP_LEVEL_GROUP>/<subgroups: <SUB_GROUP_1>/<SUB_GROUP_2>>/<SELECTED_PROJECT>, loading microagents from /workspace/<SELECTED_PROJECT>/.openhands/microagents (inside runtime)
0:0:0 - INFO: openhands/runtime/base.py:796 - [runtime] /workspace/.openhands_instructions not present, trying to load /workspace/<SELECTED_PROJECT>/.openhands_instructions
0:0:0 - INFO: openhands/runtime/base.py:603 - [runtime] Attempting to list files in repository microagents directory: /workspace/<SELECTED_PROJECT>/.openhands/microagents
0:0:0 - INFO: openhands/memory/memory.py:261 - Loading user workspace microagents: ['microagents_here']
0:0:0 - WARNING: openhands/mcp/utils.py:298 - Added microagent stdio server: fetch
0:0:0 - INFO: openhands/runtime/impl/action_execution/action_execution_client.py:434 - [runtime] Updated MCP config: ['snip']
Getting closer ...