@argustest/argus 3.1.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/LICENSE +113 -0
- package/README.md +56 -0
- package/bin/argus-mcp.js +32 -0
- package/native/.gitkeep +0 -0
- package/package.json +53 -0
- package/scripts/postinstall.js +235 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
ArgusTest — iOS Device Monitoring for AI Development
|
|
2
|
+
PROPRIETARY SOFTWARE LICENSE AGREEMENT
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2026 Able Varghese. All Rights Reserved Worldwide.
|
|
5
|
+
|
|
6
|
+
NOTICE: This is proprietary, trade-secret software. All intellectual property
|
|
7
|
+
rights, including but not limited to patents, copyrights, trademarks, and trade
|
|
8
|
+
secrets, are owned exclusively by Able Varghese, and any entity to which
|
|
9
|
+
Able Varghese has transferred or assigned such rights, in which Able Varghese
|
|
10
|
+
serves as a director and/or holds a majority ownership interest (collectively,
|
|
11
|
+
"Owner"). References to "Owner" in this agreement shall include Able Varghese
|
|
12
|
+
individually, his successors, assigns, heirs, and any such affiliated entity,
|
|
13
|
+
whether currently existing or formed in the future.
|
|
14
|
+
|
|
15
|
+
1. LICENSE GRANT
|
|
16
|
+
This software is licensed, not sold. Subject to payment of applicable fees
|
|
17
|
+
and compliance with these terms, the Owner grants you a limited,
|
|
18
|
+
non-exclusive, non-transferable, non-sublicensable, revocable license to
|
|
19
|
+
use this software solely for your internal business or personal purposes,
|
|
20
|
+
on the number of machines and devices specified in your subscription plan.
|
|
21
|
+
|
|
22
|
+
2. OWNERSHIP AND INTELLECTUAL PROPERTY
|
|
23
|
+
The Owner retains all right, title, and interest in and to the software,
|
|
24
|
+
including all source code, object code, algorithms, data structures,
|
|
25
|
+
architecture, documentation, trade secrets, and all derivative works.
|
|
26
|
+
Nothing in this agreement transfers any ownership rights to you.
|
|
27
|
+
|
|
28
|
+
3. STRICTLY PROHIBITED
|
|
29
|
+
You shall NOT, directly or indirectly, nor permit any third party to:
|
|
30
|
+
a) Reverse engineer, decompile, disassemble, or otherwise attempt to
|
|
31
|
+
derive the source code, algorithms, or data structures of the software;
|
|
32
|
+
b) Modify, adapt, translate, or create derivative works based on the software;
|
|
33
|
+
c) Copy, reproduce, distribute, republish, download, display, post, or
|
|
34
|
+
transmit the software in any form or by any means;
|
|
35
|
+
d) Rent, lease, lend, sell, sublicense, assign, or otherwise transfer
|
|
36
|
+
rights to the software;
|
|
37
|
+
e) Remove, alter, or obscure any proprietary notices, labels, or marks;
|
|
38
|
+
f) Circumvent, disable, or interfere with any license validation,
|
|
39
|
+
security features, or usage restrictions;
|
|
40
|
+
g) Share, publish, or disclose your license key to any third party;
|
|
41
|
+
h) Use the software to build a competing product or service;
|
|
42
|
+
i) Use the software beyond the scope of your licensed subscription plan;
|
|
43
|
+
j) Attempt to access, extract, or reconstruct any proprietary source code,
|
|
44
|
+
trade secrets, or confidential information from the compiled binaries;
|
|
45
|
+
k) Use automated tools to probe, scan, or test the license validation
|
|
46
|
+
system for vulnerabilities;
|
|
47
|
+
l) Redistribute the software binaries or any portion thereof.
|
|
48
|
+
|
|
49
|
+
4. TRADE SECRET PROTECTION
|
|
50
|
+
The software contains valuable trade secrets and proprietary information
|
|
51
|
+
of the Owner. You acknowledge that any unauthorized disclosure, use, or
|
|
52
|
+
copying of the software or its components would cause irreparable harm
|
|
53
|
+
to the Owner. You agree to maintain the confidentiality of the software
|
|
54
|
+
using at least the same degree of care you use to protect your own
|
|
55
|
+
confidential information, but in no event less than reasonable care.
|
|
56
|
+
|
|
57
|
+
5. LIQUIDATED DAMAGES
|
|
58
|
+
You acknowledge that unauthorized use, copying, distribution, reverse
|
|
59
|
+
engineering, or any violation of this agreement would cause substantial
|
|
60
|
+
and irreparable harm to the Owner, the exact amount of which would be
|
|
61
|
+
difficult to ascertain. Accordingly, you agree that in addition to any
|
|
62
|
+
other remedies available at law or in equity, the Owner shall be entitled
|
|
63
|
+
to liquidated damages of ONE HUNDRED MILLION UNITED STATES DOLLARS
|
|
64
|
+
(USD $100,000,000) for each material breach of this agreement, which you
|
|
65
|
+
acknowledge represents a reasonable estimate of the damages the Owner
|
|
66
|
+
would suffer. This liquidated damages provision shall not limit the
|
|
67
|
+
Owner's right to seek injunctive relief or actual damages where they
|
|
68
|
+
exceed this amount.
|
|
69
|
+
|
|
70
|
+
6. INJUNCTIVE RELIEF
|
|
71
|
+
You acknowledge that any breach of this agreement would cause irreparable
|
|
72
|
+
injury to the Owner for which monetary damages would be inadequate. The
|
|
73
|
+
Owner shall be entitled to seek immediate injunctive relief, including
|
|
74
|
+
temporary restraining orders, preliminary injunctions, and permanent
|
|
75
|
+
injunctions, without the necessity of proving actual damages or posting
|
|
76
|
+
any bond.
|
|
77
|
+
|
|
78
|
+
7. AUDIT RIGHTS
|
|
79
|
+
The Owner reserves the right to audit your use of the software to verify
|
|
80
|
+
compliance with this agreement. You agree to cooperate with any such audit
|
|
81
|
+
and provide reasonable access to relevant systems and records.
|
|
82
|
+
|
|
83
|
+
8. TERMINATION
|
|
84
|
+
This license is effective until terminated. It terminates automatically if
|
|
85
|
+
you breach any term of this agreement. Upon termination, you must
|
|
86
|
+
immediately cease all use and destroy all copies of the software.
|
|
87
|
+
Sections 2, 3, 4, 5, 6, 7, 10, and 11 survive termination.
|
|
88
|
+
|
|
89
|
+
9. NO WARRANTIES
|
|
90
|
+
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
91
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY,
|
|
92
|
+
FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
|
|
93
|
+
|
|
94
|
+
10. LIMITATION OF LIABILITY
|
|
95
|
+
IN NO EVENT SHALL THE OWNER BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
|
|
96
|
+
SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES ARISING FROM YOUR USE OF
|
|
97
|
+
THE SOFTWARE. THE OWNER'S TOTAL LIABILITY SHALL NOT EXCEED THE AMOUNT
|
|
98
|
+
YOU PAID FOR THE SOFTWARE IN THE TWELVE (12) MONTHS PRECEDING THE CLAIM.
|
|
99
|
+
|
|
100
|
+
11. GOVERNING LAW AND JURISDICTION
|
|
101
|
+
This agreement shall be governed by the laws of the State of California,
|
|
102
|
+
United States, without regard to conflict of law principles. Any dispute
|
|
103
|
+
arising under this agreement shall be subject to the exclusive
|
|
104
|
+
jurisdiction of the federal and state courts located in California.
|
|
105
|
+
You consent to personal jurisdiction in such courts.
|
|
106
|
+
|
|
107
|
+
12. ENTIRE AGREEMENT
|
|
108
|
+
This agreement constitutes the entire agreement between you and the Owner
|
|
109
|
+
regarding the software and supersedes all prior agreements. No amendment
|
|
110
|
+
shall be effective unless in writing and signed by the Owner.
|
|
111
|
+
|
|
112
|
+
For full terms, visit: https://argustest.dev/terms
|
|
113
|
+
Contact: legal@argustest.dev
|
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# ArgusTest - iOS Device Monitoring for AI Development
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) server for real-time iOS device monitoring, screenshots, and error tracking. Designed for Claude Code and AI-powered development workflows.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @argustest/argus
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Activate with your license key
|
|
15
|
+
argus-mcp --license-activate YOUR-LICENSE-KEY
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Subscribe at [argustest.dev/pricing](https://argustest.dev/pricing) to get your license key.
|
|
19
|
+
|
|
20
|
+
## Claude Code MCP Configuration
|
|
21
|
+
|
|
22
|
+
Add to your Claude Code MCP settings:
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"mcpServers": {
|
|
27
|
+
"argus": {
|
|
28
|
+
"command": "argus-mcp"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Available MCP Tools
|
|
35
|
+
|
|
36
|
+
| Tool | Description |
|
|
37
|
+
|------|-------------|
|
|
38
|
+
| `device_status` | Check connected device state |
|
|
39
|
+
| `device_list_errors` | List recent device errors |
|
|
40
|
+
| `device_capture_screenshot` | Capture device screenshot |
|
|
41
|
+
| `device_get_crash_logs` | List available crash logs |
|
|
42
|
+
| `device_read_crash_log` | Read crash log contents |
|
|
43
|
+
|
|
44
|
+
## Requirements
|
|
45
|
+
|
|
46
|
+
- macOS 12.0+
|
|
47
|
+
- Physical iOS device connected via USB (or Simulator)
|
|
48
|
+
- `libimobiledevice` (`brew install libimobiledevice`)
|
|
49
|
+
|
|
50
|
+
## License
|
|
51
|
+
|
|
52
|
+
Commercial software. Subscribe at [argustest.dev/pricing](https://argustest.dev/pricing).
|
|
53
|
+
|
|
54
|
+
## Support
|
|
55
|
+
|
|
56
|
+
Visit [argustest.dev/support](https://argustest.dev/support) for help.
|
package/bin/argus-mcp.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* ArgusTest MCP Server Launcher
|
|
4
|
+
*
|
|
5
|
+
* Thin Node.js wrapper that launches the native Nuitka-compiled binary.
|
|
6
|
+
* The actual binary is downloaded during `npm install` by postinstall.js.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
"use strict";
|
|
10
|
+
|
|
11
|
+
const { execFileSync } = require("child_process");
|
|
12
|
+
const path = require("path");
|
|
13
|
+
const fs = require("fs");
|
|
14
|
+
|
|
15
|
+
const BINARY_NAME = "argus-mcp";
|
|
16
|
+
const nativePath = path.join(__dirname, "..", "native", BINARY_NAME);
|
|
17
|
+
|
|
18
|
+
if (!fs.existsSync(nativePath)) {
|
|
19
|
+
console.error("ERROR: ArgusTest native binary not found.");
|
|
20
|
+
console.error("");
|
|
21
|
+
console.error("Try reinstalling: npm install -g @argustest/argus");
|
|
22
|
+
console.error("");
|
|
23
|
+
console.error("If the problem persists, visit: https://argustest.dev/support");
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
execFileSync(nativePath, process.argv.slice(2), { stdio: "inherit" });
|
|
29
|
+
} catch (err) {
|
|
30
|
+
// execFileSync throws on non-zero exit — propagate the exit code
|
|
31
|
+
process.exit(err.status || 1);
|
|
32
|
+
}
|
package/native/.gitkeep
ADDED
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@argustest/argus",
|
|
3
|
+
"version": "3.1.0",
|
|
4
|
+
"description": "iOS Device Monitoring for AI Development - MCP Server for Claude Code",
|
|
5
|
+
"bin": {
|
|
6
|
+
"argus-mcp": "./bin/argus-mcp.js"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"postinstall": "node scripts/postinstall.js"
|
|
10
|
+
},
|
|
11
|
+
"os": [
|
|
12
|
+
"darwin"
|
|
13
|
+
],
|
|
14
|
+
"cpu": [
|
|
15
|
+
"arm64",
|
|
16
|
+
"x64"
|
|
17
|
+
],
|
|
18
|
+
"keywords": [
|
|
19
|
+
"mcp",
|
|
20
|
+
"mcp-server",
|
|
21
|
+
"ios",
|
|
22
|
+
"device",
|
|
23
|
+
"testing",
|
|
24
|
+
"monitoring",
|
|
25
|
+
"claude",
|
|
26
|
+
"ai",
|
|
27
|
+
"xcode",
|
|
28
|
+
"mobile",
|
|
29
|
+
"argus"
|
|
30
|
+
],
|
|
31
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
32
|
+
"homepage": "https://argustest.dev",
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "https://github.com/AbleVarghese/homebrew-tap"
|
|
36
|
+
},
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://argustest.dev/support"
|
|
39
|
+
},
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=16"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
45
|
+
},
|
|
46
|
+
"files": [
|
|
47
|
+
"bin/",
|
|
48
|
+
"scripts/",
|
|
49
|
+
"native/.gitkeep",
|
|
50
|
+
"LICENSE",
|
|
51
|
+
"README.md"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* ArgusTest postinstall script
|
|
4
|
+
*
|
|
5
|
+
* Downloads the correct native binary for the current platform and architecture.
|
|
6
|
+
* Runs automatically after `npm install @argustest/argus`.
|
|
7
|
+
*
|
|
8
|
+
* Pattern used by: esbuild, turbo, SWC, protobuf
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
"use strict";
|
|
12
|
+
|
|
13
|
+
const https = require("https");
|
|
14
|
+
const http = require("http");
|
|
15
|
+
const fs = require("fs");
|
|
16
|
+
const path = require("path");
|
|
17
|
+
const { execSync } = require("child_process");
|
|
18
|
+
const os = require("os");
|
|
19
|
+
const zlib = require("zlib");
|
|
20
|
+
|
|
21
|
+
// Release configuration
|
|
22
|
+
const pkg = require("../package.json");
|
|
23
|
+
const VERSION = pkg.version;
|
|
24
|
+
const GITHUB_OWNER = "AbleVarghese";
|
|
25
|
+
const GITHUB_REPO = "homebrew-tap";
|
|
26
|
+
const BASE_URL = `https://github.com/${GITHUB_OWNER}/${GITHUB_REPO}/releases/download/v${VERSION}`;
|
|
27
|
+
|
|
28
|
+
// Binary names
|
|
29
|
+
const BINARY_NAME = "argus-mcp";
|
|
30
|
+
const NATIVE_DIR = path.join(__dirname, "..", "native");
|
|
31
|
+
|
|
32
|
+
function getPlatformArch() {
|
|
33
|
+
const platform = os.platform();
|
|
34
|
+
const arch = os.arch();
|
|
35
|
+
|
|
36
|
+
if (platform !== "darwin") {
|
|
37
|
+
console.error(`ERROR: ArgusTest only supports macOS. Detected: ${platform}`);
|
|
38
|
+
console.error("Visit https://argustest.dev for platform support updates.");
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Map Node.js arch names to our naming convention
|
|
43
|
+
const archMap = {
|
|
44
|
+
arm64: "arm64",
|
|
45
|
+
x64: "x86_64",
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const mappedArch = archMap[arch];
|
|
49
|
+
if (!mappedArch) {
|
|
50
|
+
console.error(`ERROR: Unsupported architecture: ${arch}`);
|
|
51
|
+
console.error("ArgusTest supports arm64 (Apple Silicon) and x64 (Intel).");
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return { platform, arch: mappedArch };
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function downloadFile(url, dest) {
|
|
59
|
+
return new Promise((resolve, reject) => {
|
|
60
|
+
const makeRequest = (requestUrl, redirectCount) => {
|
|
61
|
+
if (redirectCount > 5) {
|
|
62
|
+
reject(new Error("Too many redirects"));
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const protocol = requestUrl.startsWith("https") ? https : http;
|
|
67
|
+
protocol
|
|
68
|
+
.get(requestUrl, (res) => {
|
|
69
|
+
// Handle redirects (GitHub Releases uses 302)
|
|
70
|
+
if (res.statusCode === 301 || res.statusCode === 302) {
|
|
71
|
+
makeRequest(res.headers.location, redirectCount + 1);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (res.statusCode !== 200) {
|
|
76
|
+
reject(
|
|
77
|
+
new Error(`Download failed: HTTP ${res.statusCode} from ${requestUrl}`)
|
|
78
|
+
);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const file = fs.createWriteStream(dest);
|
|
83
|
+
res.pipe(file);
|
|
84
|
+
file.on("finish", () => {
|
|
85
|
+
file.close(resolve);
|
|
86
|
+
});
|
|
87
|
+
file.on("error", (err) => {
|
|
88
|
+
fs.unlink(dest, () => {});
|
|
89
|
+
reject(err);
|
|
90
|
+
});
|
|
91
|
+
})
|
|
92
|
+
.on("error", reject);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
makeRequest(url, 0);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
async function extractTarGz(archivePath, destDir) {
|
|
100
|
+
// Use system tar (available on macOS)
|
|
101
|
+
execSync(`tar -xzf "${archivePath}" -C "${destDir}"`, {
|
|
102
|
+
stdio: "pipe",
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async function tryDownload(arch, tempDir) {
|
|
107
|
+
const archiveName = `argus-macos-${arch}-${VERSION}.tar.gz`;
|
|
108
|
+
const downloadUrl = `${BASE_URL}/${archiveName}`;
|
|
109
|
+
const archivePath = path.join(tempDir, archiveName);
|
|
110
|
+
|
|
111
|
+
console.log(`Downloading from ${downloadUrl}...`);
|
|
112
|
+
await downloadFile(downloadUrl, archivePath);
|
|
113
|
+
return { archivePath, arch };
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
async function main() {
|
|
117
|
+
const { arch } = getPlatformArch();
|
|
118
|
+
|
|
119
|
+
console.log(`ArgusTest v${VERSION} - Installing for macOS ${arch}...`);
|
|
120
|
+
|
|
121
|
+
// Create native directory
|
|
122
|
+
fs.mkdirSync(NATIVE_DIR, { recursive: true });
|
|
123
|
+
|
|
124
|
+
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "argustest-"));
|
|
125
|
+
|
|
126
|
+
try {
|
|
127
|
+
// Download binary — strict architecture match, NO cross-architecture fallback.
|
|
128
|
+
// arm64 users get arm64, x86_64 users get x86_64. Never cross-delivered.
|
|
129
|
+
let archivePath;
|
|
130
|
+
try {
|
|
131
|
+
const result = await tryDownload(arch, tempDir);
|
|
132
|
+
archivePath = result.archivePath;
|
|
133
|
+
} catch (err) {
|
|
134
|
+
// Binary for this architecture is not available.
|
|
135
|
+
// Do NOT fall back to a different architecture under any circumstances.
|
|
136
|
+
console.error("");
|
|
137
|
+
console.error(`WARNING: ArgusTest ${arch} binary is not yet available.`);
|
|
138
|
+
console.error(` ${err.message}`);
|
|
139
|
+
console.error("");
|
|
140
|
+
console.error("This can happen if:");
|
|
141
|
+
console.error(" - The release was just published and the CI build is still in progress (~10 min)");
|
|
142
|
+
console.error(" - No internet connection or GitHub is unreachable");
|
|
143
|
+
console.error(" - GitHub rate limiting");
|
|
144
|
+
console.error("");
|
|
145
|
+
console.error("To retry after the binary becomes available:");
|
|
146
|
+
console.error(" npm rebuild @argustest/argus");
|
|
147
|
+
console.error("");
|
|
148
|
+
console.error("Manual install: https://argustest.dev/docs/install");
|
|
149
|
+
// Do NOT exit with error — npm install must succeed so user can retry later.
|
|
150
|
+
// The binary simply won't be present; bin/argus-mcp.js handles that at runtime.
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Extract
|
|
155
|
+
console.log("Extracting...");
|
|
156
|
+
const extractDir = path.join(tempDir, "extract");
|
|
157
|
+
fs.mkdirSync(extractDir, { recursive: true });
|
|
158
|
+
await extractTarGz(archivePath, extractDir);
|
|
159
|
+
|
|
160
|
+
// Find the binary (might be in a subdirectory like argus-macos-arm64-3.1.0/bin/)
|
|
161
|
+
const possiblePaths = [
|
|
162
|
+
path.join(extractDir, "bin", BINARY_NAME),
|
|
163
|
+
path.join(
|
|
164
|
+
extractDir,
|
|
165
|
+
`argus-macos-${arch}-${VERSION}`,
|
|
166
|
+
"bin",
|
|
167
|
+
BINARY_NAME
|
|
168
|
+
),
|
|
169
|
+
];
|
|
170
|
+
|
|
171
|
+
let binarySource = null;
|
|
172
|
+
for (const p of possiblePaths) {
|
|
173
|
+
if (fs.existsSync(p)) {
|
|
174
|
+
binarySource = p;
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
if (!binarySource) {
|
|
180
|
+
// Try recursive search
|
|
181
|
+
const findResult = execSync(
|
|
182
|
+
`find "${extractDir}" -name "${BINARY_NAME}" -type f 2>/dev/null`
|
|
183
|
+
)
|
|
184
|
+
.toString()
|
|
185
|
+
.trim();
|
|
186
|
+
if (findResult) {
|
|
187
|
+
binarySource = findResult.split("\n")[0];
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
if (!binarySource) {
|
|
192
|
+
throw new Error(
|
|
193
|
+
`Binary '${BINARY_NAME}' not found in downloaded archive`
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Copy binary to native directory
|
|
198
|
+
const destPath = path.join(NATIVE_DIR, BINARY_NAME);
|
|
199
|
+
fs.copyFileSync(binarySource, destPath);
|
|
200
|
+
fs.chmodSync(destPath, 0o755);
|
|
201
|
+
|
|
202
|
+
console.log(`ArgusTest v${VERSION} installed successfully for macOS ${arch}!`);
|
|
203
|
+
console.log("");
|
|
204
|
+
console.log(" Get started:");
|
|
205
|
+
console.log(" 1. Subscribe at: https://argustest.dev/pricing");
|
|
206
|
+
console.log(" 2. argus-mcp --license-activate YOUR-KEY");
|
|
207
|
+
console.log(" 3. argus-mcp --license-status");
|
|
208
|
+
console.log("");
|
|
209
|
+
} catch (err) {
|
|
210
|
+
console.error("");
|
|
211
|
+
console.error(`ERROR: Failed to install ArgusTest binary.`);
|
|
212
|
+
console.error(` ${err.message}`);
|
|
213
|
+
console.error("");
|
|
214
|
+
console.error("Possible causes:");
|
|
215
|
+
console.error(" - No internet connection");
|
|
216
|
+
console.error(" - Release not yet available for your architecture");
|
|
217
|
+
console.error(" - GitHub rate limiting");
|
|
218
|
+
console.error("");
|
|
219
|
+
console.error("Manual install: https://argustest.dev/docs/install");
|
|
220
|
+
// Don't exit with error — npm install should still succeed
|
|
221
|
+
// The binary just won't be available until manually installed
|
|
222
|
+
console.error(
|
|
223
|
+
"WARNING: ArgusTest binary not installed. Run `npm rebuild @argustest/argus` to retry."
|
|
224
|
+
);
|
|
225
|
+
} finally {
|
|
226
|
+
// Cleanup temp files
|
|
227
|
+
try {
|
|
228
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
229
|
+
} catch {
|
|
230
|
+
// Best effort cleanup
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
main();
|