agi 0.2.0 → 0.2.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/LICENSE.pdf +0 -0
- package/README.md +32 -0
- package/package.json +33 -7
- package/scripts/install-dmg.js +54 -0
package/LICENSE.pdf
ADDED
|
Binary file
|
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# AGI Browser
|
|
2
|
+
|
|
3
|
+
AGI - Your intelligent browser worker
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install agi
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Note:** This package is currently only supported on macOS (darwin).
|
|
12
|
+
|
|
13
|
+
## What it does
|
|
14
|
+
|
|
15
|
+
The AGI app provides an intelligent browser automation assistant that can help you navigate and interact with web pages.
|
|
16
|
+
|
|
17
|
+
## Requirements
|
|
18
|
+
|
|
19
|
+
- macOS (darwin)
|
|
20
|
+
- Node.js >= 14.0.0
|
|
21
|
+
|
|
22
|
+
## Post-install
|
|
23
|
+
|
|
24
|
+
Install the AGI app
|
|
25
|
+
|
|
26
|
+
## License
|
|
27
|
+
|
|
28
|
+
MIT
|
|
29
|
+
|
|
30
|
+
## Author
|
|
31
|
+
|
|
32
|
+
AGI, Inc.
|
package/package.json
CHANGED
|
@@ -1,9 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
"name": "agi",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "AGI - Your intelligent browser worker",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"agi",
|
|
7
|
+
"browser",
|
|
8
|
+
"agent",
|
|
9
|
+
"automation",
|
|
10
|
+
"assistant",
|
|
11
|
+
"worker"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://agi.app",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"author": "AGI, Inc.",
|
|
16
|
+
"type": "commonjs",
|
|
17
|
+
"main": "index.js",
|
|
18
|
+
"files": [
|
|
19
|
+
"scripts/",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"postinstall": "node scripts/install-dmg.js"
|
|
25
|
+
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=18.0.0"
|
|
28
|
+
},
|
|
29
|
+
"os": [
|
|
30
|
+
"darwin"
|
|
31
|
+
],
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"path": "^0.12.7"
|
|
34
|
+
}
|
|
9
35
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const fs = require("fs");
|
|
3
|
+
const { pipeline } = require("stream");
|
|
4
|
+
const { promisify } = require("util");
|
|
5
|
+
const { execSync } = require("child_process");
|
|
6
|
+
const path = require("path");
|
|
7
|
+
const os = require("os");
|
|
8
|
+
|
|
9
|
+
const DMG_URL = "https://agi-app.s3.us-east-1.amazonaws.com/agi-app/AGI-latest-mac.dmg";
|
|
10
|
+
const dmgPath = path.join(os.tmpdir(), "AGI.dmg");
|
|
11
|
+
|
|
12
|
+
(async () => {
|
|
13
|
+
try {
|
|
14
|
+
console.log(`• Downloading ${DMG_URL}`);
|
|
15
|
+
const res = await fetch(DMG_URL);
|
|
16
|
+
if (!res.ok) throw new Error(`${res.status} ${res.statusText}`);
|
|
17
|
+
await promisify(pipeline)(res.body, fs.createWriteStream(dmgPath));
|
|
18
|
+
|
|
19
|
+
console.log("• Mounting DMG …");
|
|
20
|
+
const attachOut = execSync(`hdiutil attach "${dmgPath}" -nobrowse`).toString();
|
|
21
|
+
|
|
22
|
+
// Look for /Volumes path in the output - it's usually on the last line
|
|
23
|
+
const lines = attachOut.split('\n').filter(line => line.trim());
|
|
24
|
+
const mountLine = lines.find(line => line.includes('/Volumes/'));
|
|
25
|
+
const mount = mountLine ? mountLine.split('\t').pop().trim() : null;
|
|
26
|
+
|
|
27
|
+
if (!mount) {
|
|
28
|
+
console.error("Full hdiutil output:", attachOut);
|
|
29
|
+
throw new Error("Failed to find mount point");
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
console.log("• Copying to ~/Applications …");
|
|
33
|
+
const userAppsDir = path.join(os.homedir(), 'Applications');
|
|
34
|
+
|
|
35
|
+
// Create ~/Applications directory if it doesn't exist
|
|
36
|
+
if (!fs.existsSync(userAppsDir)) {
|
|
37
|
+
fs.mkdirSync(userAppsDir, { recursive: true });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
execSync(`cp -R "${mount}/AGI.app" "${userAppsDir}"`, { stdio: "inherit" });
|
|
41
|
+
|
|
42
|
+
console.log("• Detaching …");
|
|
43
|
+
execSync(`hdiutil detach "${mount}"`);
|
|
44
|
+
fs.unlinkSync(dmgPath);
|
|
45
|
+
|
|
46
|
+
console.log("✅ AGI installed!");
|
|
47
|
+
|
|
48
|
+
console.log("• Opening AGI …");
|
|
49
|
+
execSync(`open "${userAppsDir}/AGI.app"`);
|
|
50
|
+
} catch (e) {
|
|
51
|
+
console.error("⚠️ DMG install failed:", e.message);
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
54
|
+
})();
|