diff --git a/registry.json b/registry.json index ad73ccd..f56c201 100644 --- a/registry.json +++ b/registry.json @@ -3089,6 +3089,20 @@ "dependencies": [], "category": "essential" }, + { + "id": "agent-metadata", + "name": "Agent Metadata", + "type": "config", + "path": ".opencode/config/agent-metadata.json", + "description": "Centralized agent metadata used for runtime resolution, registry management, and dependency discovery", + "tags": [ + "config", + "agents", + "metadata" + ], + "dependencies": [], + "category": "essential" + }, { "id": "readme", "name": "README", @@ -3133,7 +3147,8 @@ "context:workflows-review", "context:system-context-guide", "context:adding-skill-basics", - "config:env-example" + "config:env-example", + "config:agent-metadata" ] }, "developer": { @@ -3179,6 +3194,7 @@ "context:clean-code", "context:api-design", "config:env-example", + "config:agent-metadata", "config:readme", "context:openagents-repo/*" ] @@ -3210,6 +3226,7 @@ "context:project-intelligence/*", "context:adding-skill-basics", "config:env-example", + "config:agent-metadata", "config:readme" ] }, @@ -3264,6 +3281,7 @@ "context:clean-code", "context:api-design", "config:env-example", + "config:agent-metadata", "config:readme", "context:openagents-repo/*" ] @@ -3338,6 +3356,7 @@ "context:frontmatter", "context:codebase-references", "config:env-example", + "config:agent-metadata", "config:readme" ], "additionalPaths": [ @@ -3347,7 +3366,7 @@ } }, "metadata": { - "lastUpdated": "2026-01-31", + "lastUpdated": "2026-03-21", "schemaVersion": "1.0.0" }, "subagents": { diff --git a/scripts/tests/test-e2e-install.sh b/scripts/tests/test-e2e-install.sh index 9ce6451..7f86c81 100755 --- a/scripts/tests/test-e2e-install.sh +++ b/scripts/tests/test-e2e-install.sh @@ -62,6 +62,7 @@ test_essential_profile() { "agent/subagents/core/documentation.md" "command/context.md" "command/clean.md" + "config/agent-metadata.json" "context/core/essential-patterns.md" "context/project/project-context.md" ) @@ -96,6 +97,7 @@ test_developer_profile() { "agent/subagents/code/build-agent.md" "command/commit.md" "command/test.md" + "config/agent-metadata.json" "context/core/standards/code.md" ) @@ -113,6 +115,29 @@ test_developer_profile() { fi } +test_agent_metadata_installed() { + echo -e "\n${BOLD}Test: Agent Metadata Config Installation${NC}" + + local install_dir="$TEST_DIR/metadata-test/.opencode" + + bash "$REPO_ROOT/install.sh" developer --install-dir="$install_dir" > "$TEST_DIR/metadata.log" 2>&1 + + local metadata_file="$install_dir/config/agent-metadata.json" + + if [ -f "$metadata_file" ]; then + pass "Installed agent metadata config" + else + fail "Missing agent metadata config" + return + fi + + if command -v jq &> /dev/null && jq -e '.agents.openagent.name == "OpenAgent"' "$metadata_file" > /dev/null; then + pass "Agent metadata file contains expected agent entries" + else + fail "Agent metadata file missing expected OpenAgent entry" + fi +} + test_custom_install_dir() { echo -e "\n${BOLD}Test: Custom Installation Directory${NC}" @@ -264,6 +289,7 @@ main() { test_help_and_list test_essential_profile test_developer_profile + test_agent_metadata_installed test_custom_install_dir test_skip_existing_files test_file_content_validity diff --git a/scripts/tests/test-non-interactive.sh b/scripts/tests/test-non-interactive.sh index e6400bd..b098f4b 100755 --- a/scripts/tests/test-non-interactive.sh +++ b/scripts/tests/test-non-interactive.sh @@ -81,6 +81,11 @@ test_fresh_install_piped() { if echo "" | bash "$REPO_ROOT/install.sh" essential --install-dir="$install_dir" 2>&1 | grep -q "Installation complete"; then if [ -d "$install_dir" ]; then pass "Fresh install completed successfully via pipe" + if [ -f "$install_dir/config/agent-metadata.json" ]; then + pass "Fresh piped install included agent metadata config" + else + fail "Fresh piped install missing agent metadata config" + fi else fail "Install reported success but directory not created" fi