Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:48:40 +08:00
commit 21e99f1aa7
18 changed files with 1868 additions and 0 deletions

105
.claude-plugin/hooks.json Normal file
View File

@@ -0,0 +1,105 @@
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "python ${CLAUDE_PLUGIN_ROOT}/src/rag_cli_plugin/hooks/slash-command-blocker.py",
"name": "slash-command-blocker",
"priority": 150,
"description": "Prevents Claude from responding to slash commands, showing only execution status"
}
]
},
{
"hooks": [
{
"type": "command",
"command": "python ${CLAUDE_PLUGIN_ROOT}/src/rag_cli_plugin/hooks/user-prompt-submit.py",
"name": "user-prompt-submit",
"priority": 100,
"description": "Automatically enhances queries with RAG context and multi-agent orchestration"
}
]
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "python ${CLAUDE_PLUGIN_ROOT}/src/rag_cli_plugin/hooks/response-post.py",
"name": "response-post",
"priority": 80,
"enabled": false,
"description": "Adds inline citations to Claude responses when RAG context is used (DISABLED: Claude Code framework bug)"
}
]
}
],
"Notification": [
{
"hooks": [
{
"type": "command",
"command": "python ${CLAUDE_PLUGIN_ROOT}/src/rag_cli_plugin/hooks/error-handler.py",
"name": "error-handler",
"priority": 70,
"description": "Provides graceful error handling with helpful troubleshooting tips"
}
]
},
{
"hooks": [
{
"type": "command",
"command": "python ${CLAUDE_PLUGIN_ROOT}/src/rag_cli_plugin/hooks/plugin-state-change.py",
"name": "plugin-state-change",
"priority": 60,
"description": "Persists RAG settings across Claude Code restarts"
}
]
}
],
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "python ${CLAUDE_PLUGIN_ROOT}/src/rag_cli_plugin/hooks/document-indexing.py",
"name": "document-indexing",
"priority": 50,
"description": "Automatically indexes new or modified documents"
}
]
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "python ${CLAUDE_PLUGIN_ROOT}/src/rag_cli_plugin/hooks/session-start.py",
"name": "session-start",
"priority": 40,
"description": "Initializes RAG-CLI resources when a Claude Code session starts"
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "python ${CLAUDE_PLUGIN_ROOT}/src/rag_cli_plugin/hooks/session-end.py",
"name": "session-end",
"priority": 30,
"description": "Cleanup and state persistence when Claude Code session ends"
}
]
}
]
}
}

View File

@@ -0,0 +1,41 @@
{
"name": "rag-cli",
"description": "Local RAG system with embedded Multi-Agent Framework for Claude Code plugin",
"version": "2.0.0",
"author": {
"name": "DiaTech",
"email": "support@rag-cli.dev",
"url": "https://github.com/ItMeDiaTech/rag-cli"
},
"skills": [
"./src/rag_cli_plugin/skills"
],
"commands": [
"./src/rag_cli_plugin/commands"
],
"hooks": [
"./.claude-plugin/hooks.json"
],
"mcp": {
"rag-cli": {
"command": "python",
"args": [
"-m",
"rag_cli_plugin.mcp.unified_server"
],
"env": {
"PYTHONUNBUFFERED": "1",
"RAG_CLI_MODE": "claude_code",
"RAG_CLI_ROOT": "${CLAUDE_PLUGIN_ROOT}",
"PYTHONPATH": "${CLAUDE_PLUGIN_ROOT}:${CLAUDE_PLUGIN_ROOT}/src"
},
"alwaysAllowTrust": false,
"features": {
"autoStart": true,
"retryOnFailure": true,
"maxRetries": 3,
"retryDelayMs": 1000
}
}
}
}