codeforge-dev 1.10.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devcontainer/.env +7 -1
- package/.devcontainer/.gitignore +1 -0
- package/.devcontainer/CHANGELOG.md +138 -0
- package/.devcontainer/CLAUDE.md +87 -8
- package/.devcontainer/README.md +55 -18
- package/.devcontainer/config/defaults/main-system-prompt.md +132 -152
- package/.devcontainer/config/defaults/rules/session-search.md +66 -0
- package/.devcontainer/config/defaults/rules/spec-workflow.md +39 -12
- package/.devcontainer/config/defaults/settings.json +2 -1
- package/.devcontainer/config/defaults/writing-system-prompt.md +185 -0
- package/.devcontainer/config/file-manifest.json +12 -0
- package/.devcontainer/connect-external-terminal.ps1 +1 -1
- package/.devcontainer/devcontainer.json +40 -10
- package/.devcontainer/docs/configuration-reference.md +3 -0
- package/.devcontainer/docs/plugins.md +9 -2
- package/.devcontainer/docs/troubleshooting.md +2 -2
- package/.devcontainer/features/README.md +8 -9
- package/.devcontainer/features/agent-browser/devcontainer-feature.json +21 -21
- package/.devcontainer/features/agent-browser/install.sh +0 -7
- package/.devcontainer/features/ast-grep/devcontainer-feature.json +22 -22
- package/.devcontainer/features/biome/devcontainer-feature.json +12 -14
- package/.devcontainer/features/ccms/README.md +50 -0
- package/.devcontainer/features/ccms/devcontainer-feature.json +21 -0
- package/.devcontainer/features/ccms/install.sh +122 -0
- package/.devcontainer/features/ccstatusline/install.sh +24 -2
- package/.devcontainer/features/lsp-servers/devcontainer-feature.json +43 -43
- package/.devcontainer/features/mcp-qdrant/poststart-hook.sh +2 -1
- package/.devcontainer/features/ruff/devcontainer-feature.json +17 -19
- package/.devcontainer/features/tmux/install.sh +2 -2
- package/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json +8 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/README.md +81 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/README.md +92 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/README.md +250 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/architect.md +1 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/claude-guide.md +2 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/debug-logs.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/dependency-analyst.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/doc-writer.md +4 -4
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/explorer.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/generalist.md +2 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/git-archaeologist.md +2 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/researcher.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/security-auditor.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/spec-writer.md +8 -8
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/hooks/hooks.json +10 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/skill-suggester.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/git-state-injector.py +15 -4
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/inject-cwd.py +37 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/skill-suggester.py +24 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/spec-reminder.py +3 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-build/SKILL.md +353 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-build/references/review-checklist.md +175 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-check/SKILL.md +15 -14
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/SKILL.md +12 -11
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/references/backlog-template.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/references/milestones-template.md +32 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-new/SKILL.md +17 -18
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-new/references/template.md +12 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-review/SKILL.md +229 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-update/SKILL.md +6 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/specification-writing/SKILL.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/codeforge-lsp/.claude-plugin/plugin.json +38 -5
- package/.devcontainer/plugins/devs-marketplace/plugins/codeforge-lsp/README.md +41 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/README.md +72 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/scripts/block-dangerous.py +73 -47
- package/.devcontainer/plugins/devs-marketplace/plugins/notify-hook/README.md +42 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/README.md +86 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/hooks/hooks.json +25 -15
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected-bash.py +122 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected.py +3 -3
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/README.md +96 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/README.md +94 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/hooks/hooks.json +17 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/scripts/__pycache__/guard-workspace-scope.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/scripts/guard-workspace-scope.py +132 -0
- package/.devcontainer/scripts/check-setup.sh +1 -1
- package/.devcontainer/scripts/setup-aliases.sh +68 -75
- package/.devcontainer/scripts/setup-projects.sh +23 -16
- package/.devcontainer/scripts/setup.sh +48 -5
- package/README.md +17 -8
- package/package.json +1 -2
- package/.devcontainer/features/mcp-reasoner/README.md +0 -177
- package/.devcontainer/features/mcp-reasoner/devcontainer-feature.json +0 -25
- package/.devcontainer/features/mcp-reasoner/install.sh +0 -184
- package/.devcontainer/features/mcp-reasoner/poststart-hook.sh +0 -67
- package/.devcontainer/features/splitrail/README.md +0 -140
- package/.devcontainer/features/splitrail/devcontainer-feature.json +0 -39
- package/.devcontainer/features/splitrail/install.sh +0 -136
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/references/roadmap-template.md +0 -33
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
# MCP Reasoner Server Feature
|
|
2
|
-
|
|
3
|
-
A DevContainer Feature that installs and configures the MCP Reasoner server for enhanced AI reasoning capabilities.
|
|
4
|
-
|
|
5
|
-
## Quick Start
|
|
6
|
-
|
|
7
|
-
```json
|
|
8
|
-
{
|
|
9
|
-
"features": {
|
|
10
|
-
"ghcr.io/devcontainers/features/node:1": {},
|
|
11
|
-
"ghcr.io/devcontainers/features/common-utils:2": {},
|
|
12
|
-
"./features/mcp-reasoner": {}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
**Note:** This feature requires Node.js and common-utils features to be installed first.
|
|
18
|
-
|
|
19
|
-
## Options
|
|
20
|
-
|
|
21
|
-
| Option | Type | Default | Description |
|
|
22
|
-
|--------|------|---------|-------------|
|
|
23
|
-
| `username` | string | `automatic` | User to install for (auto-detects: vscode, node, codespace, or root) |
|
|
24
|
-
|
|
25
|
-
## What This Feature Installs
|
|
26
|
-
|
|
27
|
-
- **mcp-reasoner**: Cloned from GitHub and built locally
|
|
28
|
-
- **Native MCP Support**: Uses devcontainer native `mcpServers` configuration (declarative)
|
|
29
|
-
- **Install Location**: `/home/{username}/mcp-reasoner`
|
|
30
|
-
|
|
31
|
-
## Requirements
|
|
32
|
-
|
|
33
|
-
This feature has explicit dependencies that **must** be installed first:
|
|
34
|
-
|
|
35
|
-
```json
|
|
36
|
-
{
|
|
37
|
-
"features": {
|
|
38
|
-
"ghcr.io/devcontainers/features/node:1": {},
|
|
39
|
-
"ghcr.io/devcontainers/features/common-utils:2": {},
|
|
40
|
-
"./features/mcp-reasoner": {}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
**Required by this feature:**
|
|
46
|
-
- **Node.js + npm**: For building mcp-reasoner
|
|
47
|
-
- **jq**: For safe JSON generation (from common-utils)
|
|
48
|
-
|
|
49
|
-
The feature will validate these are present and exit with an error if missing.
|
|
50
|
-
|
|
51
|
-
## Features
|
|
52
|
-
|
|
53
|
-
- ✅ **Automatic Installation**: Clones and builds mcp-reasoner
|
|
54
|
-
- ✅ **Idempotent**: Safe to run multiple times
|
|
55
|
-
- ✅ **Multi-user**: Automatically detects container user
|
|
56
|
-
- ✅ **Native DevContainer Support**: Uses native `mcpServers` configuration for declarative setup
|
|
57
|
-
|
|
58
|
-
## Configuration
|
|
59
|
-
|
|
60
|
-
### Native DevContainer MCP Support
|
|
61
|
-
|
|
62
|
-
This feature uses the native devcontainer `mcpServers` configuration pattern, which means the MCP server is declared in the `devcontainer.json` settings automatically. The configuration is applied when the devcontainer is created:
|
|
63
|
-
|
|
64
|
-
```json
|
|
65
|
-
{
|
|
66
|
-
"customizations": {
|
|
67
|
-
"vscode": {
|
|
68
|
-
"settings": {
|
|
69
|
-
"mcp": {
|
|
70
|
-
"servers": {
|
|
71
|
-
"reasoner": {
|
|
72
|
-
"type": "stdio",
|
|
73
|
-
"command": "node",
|
|
74
|
-
"args": ["${userHome}/mcp-reasoner/dist/index.js"]
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
**No manual steps required!** The MCP server is automatically available to your AI agent once the devcontainer starts.
|
|
85
|
-
|
|
86
|
-
### Verify It Worked
|
|
87
|
-
|
|
88
|
-
**1. Start your AI agent** (Claude Code or other MCP-compatible agent)
|
|
89
|
-
|
|
90
|
-
**2. Verify the server is available:**
|
|
91
|
-
|
|
92
|
-
Ask your AI agent:
|
|
93
|
-
```
|
|
94
|
-
"Show me what MCP servers you have available"
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
You should see `reasoner` listed among the available MCP servers.
|
|
98
|
-
|
|
99
|
-
**3. Test directly (optional):**
|
|
100
|
-
```bash
|
|
101
|
-
node ~/mcp-reasoner/dist/index.js
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
## Usage with AI Agents
|
|
105
|
-
|
|
106
|
-
### Claude Code
|
|
107
|
-
|
|
108
|
-
The MCP Reasoner server provides enhanced reasoning capabilities for your AI agent.
|
|
109
|
-
|
|
110
|
-
## Architecture
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
AI Agent (Claude Code, etc.)
|
|
114
|
-
↓
|
|
115
|
-
Model Context Protocol
|
|
116
|
-
↓
|
|
117
|
-
mcp-reasoner (Node.js)
|
|
118
|
-
↓
|
|
119
|
-
Reasoning capabilities
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
## Troubleshooting
|
|
123
|
-
|
|
124
|
-
### Server Not Appearing in AI Agent
|
|
125
|
-
|
|
126
|
-
**Symptom:** Installation succeeds but agent doesn't see MCP Reasoner server
|
|
127
|
-
|
|
128
|
-
**Solution:**
|
|
129
|
-
1. Ensure the devcontainer is running the latest image (rebuild if needed)
|
|
130
|
-
2. Restart your AI agent to reload MCP server configurations
|
|
131
|
-
3. Check that the dist file exists: `ls -la ~/mcp-reasoner/dist/index.js`
|
|
132
|
-
|
|
133
|
-
### Installation Fails: "node is not available"
|
|
134
|
-
|
|
135
|
-
**Cause:** Node feature not installed first
|
|
136
|
-
|
|
137
|
-
**Solution:** Add Node feature before mcp-reasoner:
|
|
138
|
-
```json
|
|
139
|
-
{
|
|
140
|
-
"features": {
|
|
141
|
-
"ghcr.io/devcontainers/features/node:1": {},
|
|
142
|
-
"./features/mcp-reasoner": {}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
### Installation Fails: "jq is not available"
|
|
148
|
-
|
|
149
|
-
**Cause:** common-utils feature not installed
|
|
150
|
-
|
|
151
|
-
**Solution:** Add common-utils feature:
|
|
152
|
-
```json
|
|
153
|
-
{
|
|
154
|
-
"features": {
|
|
155
|
-
"ghcr.io/devcontainers/features/common-utils:2": {},
|
|
156
|
-
"./features/mcp-reasoner": {}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### Build Fails
|
|
162
|
-
|
|
163
|
-
**Symptom:** npm build errors during installation
|
|
164
|
-
|
|
165
|
-
**Checks:**
|
|
166
|
-
- Verify Node.js version is compatible: `node --version`
|
|
167
|
-
- Check npm is available: `npm --version`
|
|
168
|
-
- Review build output for specific errors
|
|
169
|
-
|
|
170
|
-
## Resources
|
|
171
|
-
|
|
172
|
-
- [MCP Reasoner GitHub](https://github.com/Jacck/mcp-reasoner)
|
|
173
|
-
- [Model Context Protocol](https://modelcontextprotocol.io)
|
|
174
|
-
|
|
175
|
-
## License
|
|
176
|
-
|
|
177
|
-
MIT License - See repository for details.
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "mcp-reasoner",
|
|
3
|
-
"version": "1.0.3",
|
|
4
|
-
"name": "MCP Reasoner Server",
|
|
5
|
-
"description": "Installs MCP Reasoner server for enhanced AI reasoning capabilities",
|
|
6
|
-
"maintainer": "AnExiledDev",
|
|
7
|
-
"documentationURL": "https://github.com/Jacck/mcp-reasoner",
|
|
8
|
-
"options": {
|
|
9
|
-
"version": {
|
|
10
|
-
"type": "string",
|
|
11
|
-
"description": "Version to install (or 'none' to skip installation)",
|
|
12
|
-
"default": "latest"
|
|
13
|
-
},
|
|
14
|
-
"username": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"description": "Container user to install for",
|
|
17
|
-
"default": "automatic"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"installsAfter": [
|
|
21
|
-
"ghcr.io/devcontainers/features/node:1",
|
|
22
|
-
"ghcr.io/devcontainers/features/common-utils:2",
|
|
23
|
-
"ghcr.io/anthropics/devcontainer-features/claude-code:1"
|
|
24
|
-
]
|
|
25
|
-
}
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
# No cleanup needed - using CLI instead of temp files
|
|
5
|
-
|
|
6
|
-
# Import options
|
|
7
|
-
VERSION="${VERSION:-latest}"
|
|
8
|
-
USERNAME="${USERNAME:-automatic}"
|
|
9
|
-
|
|
10
|
-
# Skip installation if version is "none"
|
|
11
|
-
if [ "${VERSION}" = "none" ]; then
|
|
12
|
-
echo "[mcp-reasoner] Skipping installation (version=none)"
|
|
13
|
-
exit 0
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
echo "[mcp-reasoner] Starting MCP Reasoner installation..."
|
|
17
|
-
|
|
18
|
-
# Source NVM (Node is installed via NVM by the node feature)
|
|
19
|
-
if [ -f /usr/local/share/nvm/nvm.sh ]; then
|
|
20
|
-
source /usr/local/share/nvm/nvm.sh
|
|
21
|
-
fi
|
|
22
|
-
|
|
23
|
-
# Validate node is available
|
|
24
|
-
if ! command -v node &>/dev/null; then
|
|
25
|
-
echo "[mcp-reasoner] ERROR: node is not available. Please ensure node feature is installed first."
|
|
26
|
-
echo " NVM path: /usr/local/share/nvm/nvm.sh"
|
|
27
|
-
exit 1
|
|
28
|
-
fi
|
|
29
|
-
|
|
30
|
-
# Validate npm is available
|
|
31
|
-
if ! command -v npm &>/dev/null; then
|
|
32
|
-
echo "[mcp-reasoner] ERROR: npm is not available. Please ensure node feature is installed first."
|
|
33
|
-
exit 1
|
|
34
|
-
fi
|
|
35
|
-
|
|
36
|
-
# Determine the user
|
|
37
|
-
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
|
38
|
-
USERNAME=""
|
|
39
|
-
for CURRENT_USER in vscode node codespace; do
|
|
40
|
-
if id -u "${CURRENT_USER}" >/dev/null 2>&1; then
|
|
41
|
-
USERNAME=${CURRENT_USER}
|
|
42
|
-
break
|
|
43
|
-
fi
|
|
44
|
-
done
|
|
45
|
-
[ -z "${USERNAME}" ] && USERNAME=root
|
|
46
|
-
elif [ "${USERNAME}" = "none" ] || ! id -u "${USERNAME}" >/dev/null 2>&1; then
|
|
47
|
-
USERNAME=root
|
|
48
|
-
fi
|
|
49
|
-
|
|
50
|
-
echo "[mcp-reasoner] Installing for user: ${USERNAME}"
|
|
51
|
-
|
|
52
|
-
INSTALL_DIR="/home/${USERNAME}/mcp-reasoner"
|
|
53
|
-
DIST_FILE="${INSTALL_DIR}/dist/index.js"
|
|
54
|
-
|
|
55
|
-
if [[ -f "$DIST_FILE" ]]; then
|
|
56
|
-
echo "[mcp-reasoner] MCP-reasoner installation already present. Skipping..."
|
|
57
|
-
else
|
|
58
|
-
echo "[mcp-reasoner] Installing MCP-reasoner to ${INSTALL_DIR}"
|
|
59
|
-
|
|
60
|
-
# Clone and build as detected user with NVM environment
|
|
61
|
-
sudo -u "${USERNAME}" bash -c "
|
|
62
|
-
source /usr/local/share/nvm/nvm.sh
|
|
63
|
-
cd /home/${USERNAME}
|
|
64
|
-
|
|
65
|
-
# Remove existing directory if present (handles failed previous runs)
|
|
66
|
-
rm -rf mcp-reasoner
|
|
67
|
-
|
|
68
|
-
# Clone the repository
|
|
69
|
-
git clone https://github.com/Jacck/mcp-reasoner.git
|
|
70
|
-
cd mcp-reasoner
|
|
71
|
-
|
|
72
|
-
# Install dependencies and build
|
|
73
|
-
npm install
|
|
74
|
-
npm run build
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
# Verify installation
|
|
78
|
-
if [[ ! -f "$DIST_FILE" ]]; then
|
|
79
|
-
echo "[mcp-reasoner] ERROR: MCP-reasoner installation failed - dist/index.js not found"
|
|
80
|
-
exit 1
|
|
81
|
-
fi
|
|
82
|
-
|
|
83
|
-
echo "[mcp-reasoner] MCP-reasoner installed successfully"
|
|
84
|
-
fi
|
|
85
|
-
|
|
86
|
-
# Create post-start hook for Claude Code registration
|
|
87
|
-
echo "[mcp-reasoner] Creating post-start hook for Claude Code registration..."
|
|
88
|
-
mkdir -p /usr/local/devcontainer-poststart.d
|
|
89
|
-
|
|
90
|
-
cat > /usr/local/devcontainer-poststart.d/51-mcp-reasoner.sh <<'HOOK_EOF'
|
|
91
|
-
#!/bin/bash
|
|
92
|
-
set -euo pipefail
|
|
93
|
-
|
|
94
|
-
echo "[mcp-reasoner] Registering Reasoner MCP server with Claude Code..."
|
|
95
|
-
|
|
96
|
-
# Determine user
|
|
97
|
-
USERNAME="${USERNAME:-vscode}"
|
|
98
|
-
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
|
99
|
-
for CURRENT_USER in vscode node codespace; do
|
|
100
|
-
if id -u "${CURRENT_USER}" >/dev/null 2>&1; then
|
|
101
|
-
USERNAME=${CURRENT_USER}
|
|
102
|
-
break
|
|
103
|
-
fi
|
|
104
|
-
done
|
|
105
|
-
fi
|
|
106
|
-
|
|
107
|
-
# Check if reasoner is installed
|
|
108
|
-
REASONER_PATH="/home/${USERNAME}/mcp-reasoner/dist/index.js"
|
|
109
|
-
if [ ! -f "$REASONER_PATH" ]; then
|
|
110
|
-
echo "[mcp-reasoner] WARNING: Reasoner not found at $REASONER_PATH, skipping registration"
|
|
111
|
-
exit 0
|
|
112
|
-
fi
|
|
113
|
-
|
|
114
|
-
# Ensure settings.json exists
|
|
115
|
-
SETTINGS_FILE="/workspaces/.claude/settings.json"
|
|
116
|
-
if [ ! -f "$SETTINGS_FILE" ]; then
|
|
117
|
-
echo "[mcp-reasoner] ERROR: $SETTINGS_FILE not found"
|
|
118
|
-
exit 1
|
|
119
|
-
fi
|
|
120
|
-
|
|
121
|
-
# Check if jq is available
|
|
122
|
-
if ! command -v jq &>/dev/null; then
|
|
123
|
-
echo "[mcp-reasoner] ERROR: jq not available"
|
|
124
|
-
exit 1
|
|
125
|
-
fi
|
|
126
|
-
|
|
127
|
-
# Build the server configuration
|
|
128
|
-
SERVER_CONFIG=$(jq -n \
|
|
129
|
-
--arg cmd "node" \
|
|
130
|
-
--arg path "$REASONER_PATH" \
|
|
131
|
-
'{
|
|
132
|
-
command: $cmd,
|
|
133
|
-
args: [$path]
|
|
134
|
-
}')
|
|
135
|
-
|
|
136
|
-
# Update settings.json - add or update reasoner server
|
|
137
|
-
# Create temporary file for atomic update
|
|
138
|
-
TEMP_FILE=$(mktemp)
|
|
139
|
-
jq --argjson server "$SERVER_CONFIG" \
|
|
140
|
-
'.mcpServers.reasoner = $server' \
|
|
141
|
-
"$SETTINGS_FILE" > "$TEMP_FILE"
|
|
142
|
-
|
|
143
|
-
# Verify the JSON is valid
|
|
144
|
-
if jq empty "$TEMP_FILE" 2>/dev/null; then
|
|
145
|
-
mv "$TEMP_FILE" "$SETTINGS_FILE"
|
|
146
|
-
echo "[mcp-reasoner] ✓ Reasoner MCP server registered in Claude Code settings"
|
|
147
|
-
else
|
|
148
|
-
echo "[mcp-reasoner] ERROR: Generated invalid JSON"
|
|
149
|
-
rm -f "$TEMP_FILE"
|
|
150
|
-
exit 1
|
|
151
|
-
fi
|
|
152
|
-
|
|
153
|
-
# Set proper permissions
|
|
154
|
-
chmod 644 "$SETTINGS_FILE"
|
|
155
|
-
chown "$(id -un):$(id -gn)" "$SETTINGS_FILE" 2>/dev/null || true
|
|
156
|
-
|
|
157
|
-
echo "[mcp-reasoner] ✓ Configuration complete"
|
|
158
|
-
HOOK_EOF
|
|
159
|
-
|
|
160
|
-
chmod +x /usr/local/devcontainer-poststart.d/51-mcp-reasoner.sh
|
|
161
|
-
echo "[mcp-reasoner] ✓ Post-start hook created at /usr/local/devcontainer-poststart.d/51-mcp-reasoner.sh"
|
|
162
|
-
|
|
163
|
-
echo ""
|
|
164
|
-
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
165
|
-
echo " MCP Reasoner Installation Complete"
|
|
166
|
-
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
167
|
-
echo ""
|
|
168
|
-
echo "Configuration:"
|
|
169
|
-
echo " • Install Path: ${INSTALL_DIR}"
|
|
170
|
-
echo " • User: ${USERNAME}"
|
|
171
|
-
echo " • MCP Server: reasoner (native devcontainer support)"
|
|
172
|
-
echo ""
|
|
173
|
-
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
174
|
-
echo " Next Steps"
|
|
175
|
-
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
176
|
-
echo ""
|
|
177
|
-
echo "1. MCP server will auto-register with Claude Code on container start"
|
|
178
|
-
echo ""
|
|
179
|
-
echo "2. Test the server directly:"
|
|
180
|
-
echo " node ${DIST_FILE}"
|
|
181
|
-
echo ""
|
|
182
|
-
echo "3. Verify available MCP servers in your AI agent"
|
|
183
|
-
echo ""
|
|
184
|
-
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
echo "[mcp-reasoner] Registering Reasoner MCP server with Claude Code..."
|
|
5
|
-
|
|
6
|
-
# Determine user
|
|
7
|
-
USERNAME="${USERNAME:-vscode}"
|
|
8
|
-
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
|
9
|
-
for CURRENT_USER in vscode node codespace; do
|
|
10
|
-
if id -u "${CURRENT_USER}" >/dev/null 2>&1; then
|
|
11
|
-
USERNAME=${CURRENT_USER}
|
|
12
|
-
break
|
|
13
|
-
fi
|
|
14
|
-
done
|
|
15
|
-
fi
|
|
16
|
-
|
|
17
|
-
# Check if reasoner is installed
|
|
18
|
-
REASONER_PATH="/home/${USERNAME}/mcp-reasoner/dist/index.js"
|
|
19
|
-
if [ ! -f "$REASONER_PATH" ]; then
|
|
20
|
-
echo "[mcp-reasoner] WARNING: Reasoner not found at $REASONER_PATH, skipping registration"
|
|
21
|
-
exit 0
|
|
22
|
-
fi
|
|
23
|
-
|
|
24
|
-
# Ensure settings.json exists
|
|
25
|
-
SETTINGS_FILE="/workspaces/.claude/settings.json"
|
|
26
|
-
if [ ! -f "$SETTINGS_FILE" ]; then
|
|
27
|
-
echo "[mcp-reasoner] ERROR: $SETTINGS_FILE not found"
|
|
28
|
-
exit 1
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
# Check if jq is available
|
|
32
|
-
if ! command -v jq &>/dev/null; then
|
|
33
|
-
echo "[mcp-reasoner] ERROR: jq not available"
|
|
34
|
-
exit 1
|
|
35
|
-
fi
|
|
36
|
-
|
|
37
|
-
# Build the server configuration
|
|
38
|
-
SERVER_CONFIG=$(jq -n \
|
|
39
|
-
--arg cmd "node" \
|
|
40
|
-
--arg path "$REASONER_PATH" \
|
|
41
|
-
'{
|
|
42
|
-
command: $cmd,
|
|
43
|
-
args: [$path]
|
|
44
|
-
}')
|
|
45
|
-
|
|
46
|
-
# Update settings.json - add or update reasoner server
|
|
47
|
-
# Create temporary file for atomic update
|
|
48
|
-
TEMP_FILE=$(mktemp)
|
|
49
|
-
jq --argjson server "$SERVER_CONFIG" \
|
|
50
|
-
'.mcpServers.reasoner = $server' \
|
|
51
|
-
"$SETTINGS_FILE" > "$TEMP_FILE"
|
|
52
|
-
|
|
53
|
-
# Verify the JSON is valid
|
|
54
|
-
if jq empty "$TEMP_FILE" 2>/dev/null; then
|
|
55
|
-
mv "$TEMP_FILE" "$SETTINGS_FILE"
|
|
56
|
-
echo "[mcp-reasoner] ✓ Reasoner MCP server registered in Claude Code settings"
|
|
57
|
-
else
|
|
58
|
-
echo "[mcp-reasoner] ERROR: Generated invalid JSON"
|
|
59
|
-
rm -f "$TEMP_FILE"
|
|
60
|
-
exit 1
|
|
61
|
-
fi
|
|
62
|
-
|
|
63
|
-
# Set proper permissions
|
|
64
|
-
chmod 644 "$SETTINGS_FILE"
|
|
65
|
-
chown vscode:vscode "$SETTINGS_FILE" 2>/dev/null || true
|
|
66
|
-
|
|
67
|
-
echo "[mcp-reasoner] ✓ Configuration complete"
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
# Splitrail Token Usage Tracker Feature
|
|
2
|
-
|
|
3
|
-
A DevContainer Feature that installs Splitrail - a real-time AI token usage tracker and cost monitor for AI coding agents.
|
|
4
|
-
|
|
5
|
-
## Quick Start
|
|
6
|
-
|
|
7
|
-
```json
|
|
8
|
-
{
|
|
9
|
-
"features": {
|
|
10
|
-
"ghcr.io/devcontainers/features/rust:1": {},
|
|
11
|
-
"ghcr.io/devcontainers/features/common-utils:2": {},
|
|
12
|
-
"./features/splitrail": {}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
**Note:** This feature requires Rust and common-utils features to be installed first.
|
|
18
|
-
|
|
19
|
-
## Options
|
|
20
|
-
|
|
21
|
-
| Option | Type | Default | Description |
|
|
22
|
-
|--------|------|---------|-------------|
|
|
23
|
-
| `repoUrl` | string | `https://github.com/Piebald-AI/splitrail.git` | Git repository URL |
|
|
24
|
-
| `branch` | string | `main` | Git branch to checkout |
|
|
25
|
-
| `username` | string | `automatic` | User to install for (auto-detects: vscode, node, codespace, or root) |
|
|
26
|
-
|
|
27
|
-
## What This Feature Installs
|
|
28
|
-
|
|
29
|
-
- **splitrail**: Compiled from source (Rust)
|
|
30
|
-
- **Binary Location**: `/home/{username}/.cargo/bin/splitrail`
|
|
31
|
-
- **Compile Time**: 2-3 minutes on first build
|
|
32
|
-
- **Disk Usage**: ~50MB source + build artifacts
|
|
33
|
-
|
|
34
|
-
## Requirements
|
|
35
|
-
|
|
36
|
-
This feature has explicit dependencies that **must** be installed first:
|
|
37
|
-
|
|
38
|
-
```json
|
|
39
|
-
{
|
|
40
|
-
"features": {
|
|
41
|
-
"ghcr.io/devcontainers/features/rust:1": {},
|
|
42
|
-
"ghcr.io/devcontainers/features/common-utils:2": {},
|
|
43
|
-
"./features/splitrail": {}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
**Required by this feature:**
|
|
49
|
-
- **Rust + Cargo**: For compiling splitrail from source
|
|
50
|
-
- **Git**: For cloning the repository
|
|
51
|
-
|
|
52
|
-
The feature will validate these are present and exit with an error if missing.
|
|
53
|
-
|
|
54
|
-
## Features
|
|
55
|
-
|
|
56
|
-
- ✅ **Real-time Tracking**: Monitor token usage as you code
|
|
57
|
-
- ✅ **Cost Monitoring**: Track costs for different AI models
|
|
58
|
-
- ✅ **Multi-agent Support**: Supports Claude Code, Gemini, Codex
|
|
59
|
-
- ✅ **Cloud Upload**: Optional private cloud aggregation across machines
|
|
60
|
-
- ✅ **Fast Performance**: Written in Rust for minimal overhead
|
|
61
|
-
- ✅ **Idempotent**: Safe to run multiple times
|
|
62
|
-
- ✅ **Multi-user**: Automatically detects container user
|
|
63
|
-
|
|
64
|
-
## Usage
|
|
65
|
-
|
|
66
|
-
### Start Monitoring
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
splitrail
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### Check Version
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
splitrail --version
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### View Help
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
splitrail --help
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Architecture
|
|
85
|
-
|
|
86
|
-
```
|
|
87
|
-
AI Agent (Claude Code, etc.)
|
|
88
|
-
↓
|
|
89
|
-
Splitrail monitors usage
|
|
90
|
-
↓
|
|
91
|
-
Real-time display + optional cloud upload
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## Troubleshooting
|
|
95
|
-
|
|
96
|
-
### Compilation Fails
|
|
97
|
-
|
|
98
|
-
**Cause:** Rust/Cargo not available
|
|
99
|
-
|
|
100
|
-
**Solution:** Ensure Rust feature is installed first:
|
|
101
|
-
```json
|
|
102
|
-
{
|
|
103
|
-
"features": {
|
|
104
|
-
"ghcr.io/devcontainers/features/rust:1": {},
|
|
105
|
-
"./features/splitrail": {}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Binary Not Found
|
|
111
|
-
|
|
112
|
-
**Symptom:** `splitrail: command not found`
|
|
113
|
-
|
|
114
|
-
**Solution:** Check the binary location:
|
|
115
|
-
```bash
|
|
116
|
-
ls -la /home/node/.cargo/bin/splitrail
|
|
117
|
-
# Should exist
|
|
118
|
-
|
|
119
|
-
# Verify PATH includes cargo bin
|
|
120
|
-
echo $PATH | grep cargo
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Build Errors
|
|
124
|
-
|
|
125
|
-
**Symptom:** Cargo build fails during compilation
|
|
126
|
-
|
|
127
|
-
**Checks:**
|
|
128
|
-
- Verify Rust version: `rustc --version`
|
|
129
|
-
- Check cargo: `cargo --version`
|
|
130
|
-
- Review build output for specific errors
|
|
131
|
-
- Try cleaning: `cd ~/splitrail && cargo clean && cargo build --release`
|
|
132
|
-
|
|
133
|
-
## Resources
|
|
134
|
-
|
|
135
|
-
- [Splitrail GitHub](https://github.com/Piebald-AI/splitrail)
|
|
136
|
-
- [Rust Language](https://www.rust-lang.org/)
|
|
137
|
-
|
|
138
|
-
## License
|
|
139
|
-
|
|
140
|
-
MIT License - See repository for details.
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "splitrail",
|
|
3
|
-
"version": "1.0.1",
|
|
4
|
-
"name": "Splitrail Token Usage Tracker",
|
|
5
|
-
"description": "Installs Splitrail - real-time AI token usage tracker and cost monitor",
|
|
6
|
-
"maintainer": "AnExiledDev",
|
|
7
|
-
"documentationURL": "https://github.com/Piebald-AI/splitrail",
|
|
8
|
-
"options": {
|
|
9
|
-
"version": {
|
|
10
|
-
"type": "string",
|
|
11
|
-
"description": "Version to install (or 'none' to skip installation)",
|
|
12
|
-
"default": "latest"
|
|
13
|
-
},
|
|
14
|
-
"repoUrl": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"description": "Git repository URL for splitrail",
|
|
17
|
-
"default": "https://github.com/Piebald-AI/splitrail.git"
|
|
18
|
-
},
|
|
19
|
-
"branch": {
|
|
20
|
-
"type": "string",
|
|
21
|
-
"description": "Git branch to checkout",
|
|
22
|
-
"default": "main"
|
|
23
|
-
},
|
|
24
|
-
"username": {
|
|
25
|
-
"type": "string",
|
|
26
|
-
"description": "Container user to install for",
|
|
27
|
-
"default": "automatic"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"installsAfter": [
|
|
31
|
-
"ghcr.io/devcontainers/features/rust:1",
|
|
32
|
-
"ghcr.io/devcontainers/features/common-utils:2"
|
|
33
|
-
],
|
|
34
|
-
"customizations": {
|
|
35
|
-
"vscode": {
|
|
36
|
-
"extensions": []
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|