Merge pull request 'fix: critical plugin structure and configuration fixes' (#17) from development into main

Reviewed-on: bandit/support-claude-mktplace#17
This commit was merged in pull request #17.
This commit is contained in:
2025-12-11 04:53:21 +00:00
7 changed files with 79 additions and 26 deletions

View File

@@ -16,6 +16,12 @@
"version": "0.1.0", "version": "0.1.0",
"description": "Post-task cleanup hook that removes temp files, warns about unexpected root files, and manages orphans", "description": "Post-task cleanup hook that removes temp files, warns about unexpected root files, and manages orphans",
"source": "./../../project-hygiene" "source": "./../../project-hygiene"
},
{
"name": "cmdb-assistant",
"version": "1.0.0",
"description": "NetBox CMDB integration for infrastructure management - query, create, update, and manage network devices, IP addresses, sites, and more",
"source": "./../../cmdb-assistant"
} }
] ]
} }

12
.gitignore vendored
View File

@@ -26,9 +26,7 @@ MANIFEST
venv/ venv/
ENV/ ENV/
env/ env/
.venv .venv/
.ENV
.env.local
# PyCharm # PyCharm
.idea/ .idea/
@@ -62,10 +60,10 @@ package-lock.json
dist/ dist/
build/ build/
# Environment variables (IMPORTANT: Contains Gitea credentials) # Environment variables - NOT ignored (private repo)
.env # .env
.env.local # .env.local
.env.*.local # .env.*.local
# OS # OS
.DS_Store .DS_Store

View File

@@ -329,6 +329,53 @@ Test in real CuisineFlow repository with actual Gitea instance before distributi
- **Python for MCP servers** - Use Python 3.8+ with virtual environments - **Python for MCP servers** - Use Python 3.8+ with virtual environments
- **Wiki.js structure** - All HHL content under `/hyper-hive-labs` namespace - **Wiki.js structure** - All HHL content under `/hyper-hive-labs` namespace
## CRITICAL: Rules You MUST Follow
### DO NOT MODIFY .gitignore Without Explicit Permission
- This is a **private repository** - credentials in `.env` files are intentional
- **NEVER** add `.env` or `.env.*` to .gitignore
- **NEVER** add venv patterns unless explicitly asked
- If you think something should be ignored, ASK FIRST
### Plugin Structure Requirements
- **plugin.json MUST be in `.claude-plugin/` directory** - NOT in plugin root
- Every plugin in the repo MUST be listed in the marketplace.json
- After creating/modifying a plugin, VERIFY it's in the marketplace
### Hooks Syntax (Claude Code Official)
- **Valid events**: `PreToolUse`, `PostToolUse`, `UserPromptSubmit`, `SessionStart`, `SessionEnd`, `Notification`, `Stop`, `SubagentStop`, `PreCompact`
- **INVALID events**: `task-completed`, `file-changed`, `git-commit-msg-needed` (these DO NOT exist)
- Hooks schema:
```json
{
"hooks": {
"EventName": [
{
"matcher": "optional-pattern",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/path/to/script.sh"
}
]
}
]
}
}
```
### MCP Server Configuration
- MCP servers MUST use venv python: `${CLAUDE_PLUGIN_ROOT}/../mcp-servers/NAME/.venv/bin/python`
- NEVER use bare `python` command - always use venv path
- Test MCP servers after any config change
### Before Completing Any Plugin Work
1. Verify plugin.json is in `.claude-plugin/` directory
2. Verify plugin is listed in marketplace.json
3. Test MCP server configs load correctly
4. Verify hooks use valid event types
5. Check .gitignore wasn't modified inappropriately
## Documentation Index ## Documentation Index
This repository contains comprehensive planning documentation: This repository contains comprehensive planning documentation:

View File

@@ -6,8 +6,10 @@ Creates 28 organization labels + 16 repository labels = 44 total
import requests import requests
import sys import sys
GITEA_URL = "https://gitea.example.com" import os
TOKEN = "ae72c63cd7de02e40bd16f66d1e98059c187759b"
GITEA_URL = os.getenv("GITEA_API_URL", "").rstrip("/api/v1")
TOKEN = os.getenv("GITEA_API_TOKEN", "")
ORG = "bandit" ORG = "bandit"
REPO = "support-claude-mktplace" REPO = "support-claude-mktplace"

View File

@@ -1,9 +1,15 @@
{ {
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [ "hooks": [
{ {
"event": "task-completed", "type": "command",
"script": "${CLAUDE_PLUGIN_ROOT}/hooks/cleanup.sh", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/cleanup.sh"
"description": "Post-task cleanup: remove temp files, warn about unexpected root files, manage orphans"
} }
] ]
} }
]
}
}

View File

@@ -1,20 +1,14 @@
{ {
"mcpServers": { "mcpServers": {
"gitea": { "gitea": {
"command": "python", "command": "${CLAUDE_PLUGIN_ROOT}/../mcp-servers/gitea/.venv/bin/python",
"args": ["-m", "mcp_server.server"], "args": ["-m", "mcp_server.server"],
"cwd": "${CLAUDE_PLUGIN_ROOT}/../mcp-servers/gitea", "cwd": "${CLAUDE_PLUGIN_ROOT}/../mcp-servers/gitea"
"env": {
"PYTHONPATH": "${CLAUDE_PLUGIN_ROOT}/../mcp-servers/gitea"
}
}, },
"wikijs": { "wikijs": {
"command": "python", "command": "${CLAUDE_PLUGIN_ROOT}/../mcp-servers/wikijs/.venv/bin/python",
"args": ["-m", "mcp_server.server"], "args": ["-m", "mcp_server.server"],
"cwd": "${CLAUDE_PLUGIN_ROOT}/../mcp-servers/wikijs", "cwd": "${CLAUDE_PLUGIN_ROOT}/../mcp-servers/wikijs"
"env": {
"PYTHONPATH": "${CLAUDE_PLUGIN_ROOT}/../mcp-servers/wikijs"
}
} }
} }
} }