@standardbeagle/agnt 0.6.1 → 0.6.2

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/bin/agnt ADDED
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * agnt wrapper script
5
+ *
6
+ * This script is the entry point that npm symlinks to.
7
+ * It finds and executes the downloaded Go binary.
8
+ */
9
+
10
+ const { spawn } = require('child_process');
11
+ const path = require('path');
12
+ const fs = require('fs');
13
+
14
+ // Binary is downloaded to bin/agnt-binary (or agnt-binary.exe on Windows)
15
+ const BINARY_NAME = process.platform === 'win32' ? 'agnt-binary.exe' : 'agnt-binary';
16
+ const binDir = __dirname;
17
+ const binaryPath = path.join(binDir, BINARY_NAME);
18
+
19
+ // Check if binary exists
20
+ if (!fs.existsSync(binaryPath)) {
21
+ console.error(`Error: agnt binary not found at ${binaryPath}`);
22
+ console.error('');
23
+ console.error('The binary may not have been downloaded during installation.');
24
+ console.error('Try reinstalling the package:');
25
+ console.error(' npm uninstall -g @standardbeagle/agnt');
26
+ console.error(' npm install -g @standardbeagle/agnt');
27
+ console.error('');
28
+ console.error('Or manually run the postinstall script:');
29
+ console.error(' node ' + path.join(binDir, '..', 'scripts', 'install.js'));
30
+ process.exit(1);
31
+ }
32
+
33
+ // Execute the binary with all arguments
34
+ const child = spawn(binaryPath, process.argv.slice(2), {
35
+ stdio: 'inherit',
36
+ windowsHide: true,
37
+ });
38
+
39
+ child.on('error', (err) => {
40
+ console.error(`Error executing agnt: ${err.message}`);
41
+ process.exit(1);
42
+ });
43
+
44
+ child.on('close', (code) => {
45
+ process.exit(code || 0);
46
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@standardbeagle/agnt",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "MCP server for AI coding agents - process management, reverse proxy with traffic logging, browser instrumentation, and sketch mode",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -40,7 +40,8 @@ function getArch() {
40
40
  }
41
41
 
42
42
  function getBinaryName() {
43
- return process.platform === 'win32' ? `${BINARY_NAME}.exe` : BINARY_NAME;
43
+ // Use a different name for the actual binary to avoid conflict with the wrapper script
44
+ return process.platform === 'win32' ? `${BINARY_NAME}-binary.exe` : `${BINARY_NAME}-binary`;
44
45
  }
45
46
 
46
47
  function getDownloadUrl() {
package/bin/.gitkeep DELETED
@@ -1 +0,0 @@
1
- # Binary will be downloaded during npm install