Relocate agent configs and workflow library under COPILOTJ_HOME#211
Draft
yzx9 wants to merge 1 commit into
Draft
Relocate agent configs and workflow library under COPILOTJ_HOME#211yzx9 wants to merge 1 commit into
yzx9 wants to merge 1 commit into
Conversation
Agent TOMLs and the saved-workflow library lived in non-user-editable spots: agent configs were embedded in the Python package (read via __file__, shipped inside the regenerable python_sources tree, so any customization was wiped on upgrade), and saved workflows sat under $COPILOTJ_HOME/temp (mislabeled ephemeral for long-lived, user-curated data). Move both into stable homes, mirroring the existing knowledge_bank pattern: - agents/ (was copilotj/multiagent/agent_configs/): seed TOMLs ship from the repo root and the loader reads from $COPILOTJ_HOME/agents/. sync_agent_configs seeds on first run and, on upgrade, backs up each customized file as <name>.bak.YYYYMMDD before applying the new default. A per-file baseline (.seed-versions.json) means a release that changes one agent only touches that one agent; unrelated customizations stay live. Disabled templates and user-added configs are never clobbered. - workflows/ (was $COPILOTJ_HOME/temp/workflows): the library moves to $COPILOTJ_HOME/workflows/ via a one-time, idempotent migrate_workflow_layout that runs at module import (covers every server entry point, resumes after a partial run, falls back to copy+delete across filesystems). Per-run outputs stay in temp/workflow_runs. Also: extract a shared bootstrap_dir_if_empty helper (DRY for bootstrap_assets and _bootstrap_kb); delete two dead unreferenced TOMLs (success_case, imagej_macro_help); extend the pom resource include; update DEVELOPMENT, AGENTS, and user-manual docs; gitignore /workflows/. No Java logic change: partial uninstall already preserves both new dirs (only the regenerable python_sources seed is wiped and re-extracted). Deferred follow-ups captured in .plans/0005 (knowledge_bank upgrade parity) and .plans/0006 (sync_agent_configs cross-process lock). Verified: 220 pytest tests pass, ruff clean, mvn clean package ships exactly the 5 agents/*.toml in the JAR. Assisted-by: Claude-Code:GLM-5.2
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.
Agent TOMLs and the saved-workflow library lived in non-user-editable spots: agent configs were embedded in the Python package (read via file, shipped inside the regenerable python_sources tree, so any customization was wiped on upgrade), and saved workflows sat under $COPILOTJ_HOME/temp (mislabeled ephemeral for long-lived, user-curated data).
Move both into stable homes, mirroring the existing knowledge_bank pattern:
agents/ (was copilotj/multiagent/agent_configs/): seed TOMLs ship from the repo root and the loader reads from $COPILOTJ_HOME/agents/. sync_agent_configs seeds on first run and, on upgrade, backs up each customized file as .bak.YYYYMMDD before applying the new default. A per-file baseline (.seed-versions.json) means a release that changes one agent only touches that one agent; unrelated customizations stay live. Disabled templates and user-added configs are never clobbered.
workflows/ (was $COPILOTJ_HOME/temp/workflows): the library moves to $COPILOTJ_HOME/workflows/ via a one-time, idempotent migrate_workflow_layout that runs at module import (covers every server entry point, resumes after a partial run, falls back to copy+delete across filesystems). Per-run outputs stay in temp/workflow_runs.
Also: extract a shared bootstrap_dir_if_empty helper (DRY for bootstrap_assets and _bootstrap_kb); delete two dead unreferenced TOMLs (success_case, imagej_macro_help); extend the pom resource include; update DEVELOPMENT, AGENTS, and user-manual docs; gitignore /workflows/.
No Java logic change: partial uninstall already preserves both new dirs (only the regenerable python_sources seed is wiped and re-extracted).
Deferred follow-ups captured in .plans/0005 (knowledge_bank upgrade parity) and .plans/0006 (sync_agent_configs cross-process lock).
Verified: 220 pytest tests pass, ruff clean, mvn clean package ships exactly the 5 agents/*.toml in the JAR.
Assisted-by: Claude-Code:GLM-5.2