@standardbeagle/agnt 0.5.1
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/README.md +117 -0
- package/bin/.gitkeep +1 -0
- package/package.json +56 -0
- package/scripts/install.js +137 -0
package/README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# agnt
|
|
2
|
+
|
|
3
|
+
MCP server for AI coding agents - process management, reverse proxy with traffic logging, browser instrumentation, and sketch mode.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @standardbeagle/agnt
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
### As MCP Server (Claude Code, etc.)
|
|
14
|
+
|
|
15
|
+
Add to your Claude Code MCP configuration:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"mcpServers": {
|
|
20
|
+
"agnt": {
|
|
21
|
+
"command": "agnt",
|
|
22
|
+
"args": ["serve"]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Or install as a Claude Code plugin:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
/plugin marketplace add standardbeagle/agnt
|
|
32
|
+
/plugin install agnt@agnt
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### As PTY Wrapper
|
|
36
|
+
|
|
37
|
+
Wrap your AI coding tool with overlay features:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
agnt run claude --dangerously-skip-permissions
|
|
41
|
+
agnt run gemini
|
|
42
|
+
agnt run copilot
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Features
|
|
46
|
+
|
|
47
|
+
- **Project Detection**: Auto-detect Go, Node.js, Python projects
|
|
48
|
+
- **Process Management**: Run and manage long-running processes
|
|
49
|
+
- **Reverse Proxy**: HTTP proxy with traffic logging
|
|
50
|
+
- **Browser Instrumentation**: 50+ diagnostic primitives
|
|
51
|
+
- **Sketch Mode**: Excalidraw-like wireframing on your UI
|
|
52
|
+
- **Floating Indicator**: Quick access panel in browser
|
|
53
|
+
|
|
54
|
+
## MCP Tools
|
|
55
|
+
|
|
56
|
+
| Tool | Description |
|
|
57
|
+
|------|-------------|
|
|
58
|
+
| `detect` | Detect project type and available scripts |
|
|
59
|
+
| `run` | Run scripts or commands |
|
|
60
|
+
| `proc` | Manage processes: status, output, stop, list |
|
|
61
|
+
| `proxy` | Reverse proxy: start, stop, exec, toast |
|
|
62
|
+
| `proxylog` | Query proxy traffic logs |
|
|
63
|
+
| `currentpage` | View active page sessions |
|
|
64
|
+
| `daemon` | Manage background daemon |
|
|
65
|
+
|
|
66
|
+
## Usage Examples
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
# Start a proxy for your dev server
|
|
70
|
+
proxy {action: "start", id: "dev", target_url: "http://localhost:3000"}
|
|
71
|
+
|
|
72
|
+
# Execute JavaScript in connected browsers
|
|
73
|
+
proxy {action: "exec", id: "dev", code: "__devtool.screenshot('homepage')"}
|
|
74
|
+
|
|
75
|
+
# Show toast notification
|
|
76
|
+
proxy {action: "toast", id: "dev", toast_message: "Build complete!", toast_type: "success"}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Browser API
|
|
80
|
+
|
|
81
|
+
The proxy injects `window.__devtool` with 50+ functions:
|
|
82
|
+
|
|
83
|
+
- `screenshot(name)` - Capture screenshot
|
|
84
|
+
- `inspect(selector)` - Get element info
|
|
85
|
+
- `sketch.open()` / `sketch.save()` - Wireframe mode
|
|
86
|
+
- `indicator.toggle()` - Toggle floating indicator
|
|
87
|
+
- And many more...
|
|
88
|
+
|
|
89
|
+
## Configuration
|
|
90
|
+
|
|
91
|
+
Create `.agnt.kdl` in your project root:
|
|
92
|
+
|
|
93
|
+
```kdl
|
|
94
|
+
scripts {
|
|
95
|
+
dev {
|
|
96
|
+
command "npm"
|
|
97
|
+
args "run" "dev"
|
|
98
|
+
autostart true
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
proxies {
|
|
103
|
+
frontend {
|
|
104
|
+
target "http://localhost:3000"
|
|
105
|
+
autostart true
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Documentation
|
|
111
|
+
|
|
112
|
+
- [GitHub](https://github.com/standardbeagle/agnt)
|
|
113
|
+
- [Documentation](https://standardbeagle.github.io/agnt/)
|
|
114
|
+
|
|
115
|
+
## License
|
|
116
|
+
|
|
117
|
+
MIT
|
package/bin/.gitkeep
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Binary will be downloaded during npm install
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@standardbeagle/agnt",
|
|
3
|
+
"version": "0.5.1",
|
|
4
|
+
"description": "MCP server for AI coding agents - process management, reverse proxy with traffic logging, browser instrumentation, and sketch mode",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"agnt": "bin/agnt"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"postinstall": "node scripts/install.js"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"mcp",
|
|
14
|
+
"model-context-protocol",
|
|
15
|
+
"ai",
|
|
16
|
+
"agent",
|
|
17
|
+
"development",
|
|
18
|
+
"devtools",
|
|
19
|
+
"proxy",
|
|
20
|
+
"debugging",
|
|
21
|
+
"frontend",
|
|
22
|
+
"diagnostics",
|
|
23
|
+
"sketch",
|
|
24
|
+
"wireframe",
|
|
25
|
+
"process-management",
|
|
26
|
+
"claude-code"
|
|
27
|
+
],
|
|
28
|
+
"author": "Standard Beagle",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "git+https://github.com/standardbeagle/agnt.git"
|
|
33
|
+
},
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/standardbeagle/agnt/issues"
|
|
36
|
+
},
|
|
37
|
+
"homepage": "https://standardbeagle.github.io/agnt/",
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=18.0.0"
|
|
40
|
+
},
|
|
41
|
+
"os": [
|
|
42
|
+
"darwin",
|
|
43
|
+
"linux",
|
|
44
|
+
"win32"
|
|
45
|
+
],
|
|
46
|
+
"cpu": [
|
|
47
|
+
"x64",
|
|
48
|
+
"arm64"
|
|
49
|
+
],
|
|
50
|
+
"files": [
|
|
51
|
+
"bin/",
|
|
52
|
+
"scripts/",
|
|
53
|
+
"README.md",
|
|
54
|
+
"LICENSE"
|
|
55
|
+
]
|
|
56
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const https = require('https');
|
|
4
|
+
const http = require('http');
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
|
|
8
|
+
const VERSION = '0.5.1';
|
|
9
|
+
const REPO = 'standardbeagle/agnt';
|
|
10
|
+
const BINARY_NAME = 'agnt';
|
|
11
|
+
|
|
12
|
+
// Platform/architecture mapping
|
|
13
|
+
const PLATFORMS = {
|
|
14
|
+
darwin: 'darwin',
|
|
15
|
+
linux: 'linux',
|
|
16
|
+
win32: 'windows',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const ARCHS = {
|
|
20
|
+
x64: 'amd64',
|
|
21
|
+
arm64: 'arm64',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
function getPlatform() {
|
|
25
|
+
const platform = PLATFORMS[process.platform];
|
|
26
|
+
if (!platform) {
|
|
27
|
+
throw new Error(`Unsupported platform: ${process.platform}`);
|
|
28
|
+
}
|
|
29
|
+
return platform;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function getArch() {
|
|
33
|
+
const arch = ARCHS[process.arch];
|
|
34
|
+
if (!arch) {
|
|
35
|
+
throw new Error(`Unsupported architecture: ${process.arch}`);
|
|
36
|
+
}
|
|
37
|
+
return arch;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function getBinaryName() {
|
|
41
|
+
return process.platform === 'win32' ? `${BINARY_NAME}.exe` : BINARY_NAME;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function getDownloadUrl() {
|
|
45
|
+
const platform = getPlatform();
|
|
46
|
+
const arch = getArch();
|
|
47
|
+
const ext = platform === 'windows' ? '.exe' : '';
|
|
48
|
+
|
|
49
|
+
// GitHub release asset URL pattern
|
|
50
|
+
return `https://github.com/${REPO}/releases/download/v${VERSION}/${BINARY_NAME}-${platform}-${arch}${ext}`;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async function downloadFile(url, dest) {
|
|
54
|
+
return new Promise((resolve, reject) => {
|
|
55
|
+
const file = fs.createWriteStream(dest);
|
|
56
|
+
const protocol = url.startsWith('https') ? https : http;
|
|
57
|
+
|
|
58
|
+
const request = protocol.get(url, (response) => {
|
|
59
|
+
// Handle redirects
|
|
60
|
+
if (response.statusCode === 301 || response.statusCode === 302) {
|
|
61
|
+
file.close();
|
|
62
|
+
fs.unlinkSync(dest);
|
|
63
|
+
downloadFile(response.headers.location, dest).then(resolve).catch(reject);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (response.statusCode !== 200) {
|
|
68
|
+
file.close();
|
|
69
|
+
fs.unlinkSync(dest);
|
|
70
|
+
reject(new Error(`Failed to download: ${response.statusCode} ${response.statusMessage}`));
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
response.pipe(file);
|
|
75
|
+
file.on('finish', () => {
|
|
76
|
+
file.close();
|
|
77
|
+
resolve();
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
request.on('error', (err) => {
|
|
82
|
+
file.close();
|
|
83
|
+
fs.unlinkSync(dest);
|
|
84
|
+
reject(err);
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
async function install() {
|
|
90
|
+
const binDir = path.join(__dirname, '..', 'bin');
|
|
91
|
+
const binaryPath = path.join(binDir, getBinaryName());
|
|
92
|
+
|
|
93
|
+
// Create bin directory if it doesn't exist
|
|
94
|
+
if (!fs.existsSync(binDir)) {
|
|
95
|
+
fs.mkdirSync(binDir, { recursive: true });
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Check if binary already exists
|
|
99
|
+
if (fs.existsSync(binaryPath)) {
|
|
100
|
+
console.log(`${BINARY_NAME} binary already exists, skipping download`);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const url = getDownloadUrl();
|
|
105
|
+
console.log(`Downloading ${BINARY_NAME} v${VERSION}...`);
|
|
106
|
+
console.log(` Platform: ${getPlatform()}`);
|
|
107
|
+
console.log(` Architecture: ${getArch()}`);
|
|
108
|
+
console.log(` URL: ${url}`);
|
|
109
|
+
|
|
110
|
+
try {
|
|
111
|
+
await downloadFile(url, binaryPath);
|
|
112
|
+
|
|
113
|
+
// Make executable on Unix
|
|
114
|
+
if (process.platform !== 'win32') {
|
|
115
|
+
fs.chmodSync(binaryPath, 0o755);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
console.log(`Successfully installed ${BINARY_NAME} to ${binaryPath}`);
|
|
119
|
+
} catch (error) {
|
|
120
|
+
console.error(`Failed to download ${BINARY_NAME}:`);
|
|
121
|
+
console.error(error.message);
|
|
122
|
+
console.error('');
|
|
123
|
+
console.error('You can manually download the binary from:');
|
|
124
|
+
console.error(` https://github.com/${REPO}/releases/tag/v${VERSION}`);
|
|
125
|
+
console.error('');
|
|
126
|
+
console.error('Or build from source:');
|
|
127
|
+
console.error(` git clone https://github.com/${REPO}.git`);
|
|
128
|
+
console.error(' cd agnt');
|
|
129
|
+
console.error(' make build');
|
|
130
|
+
process.exit(1);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
install().catch((err) => {
|
|
135
|
+
console.error(err);
|
|
136
|
+
process.exit(1);
|
|
137
|
+
});
|