agi 0.1.0 → 0.2.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/package.json CHANGED
@@ -1,35 +1,9 @@
1
1
  {
2
- "name": "agi",
3
- "version": "0.1.0",
4
- "description": "AGI - Your magical browser agent assistant 🦄",
5
- "keywords": [
6
- "agi",
7
- "browser",
8
- "agent",
9
- "automation",
10
- "assistant"
11
- ],
12
- "homepage": "https://agi.app",
13
- "license": "MIT",
14
- "author": "AGI, Inc.",
15
- "type": "commonjs",
16
- "main": "index.js",
17
- "files": [
18
- "scripts/",
19
- "README.md",
20
- "LICENSE"
21
- ],
22
- "scripts": {
23
- "postinstall": "node scripts/install-dmg.js",
24
- "publish": "npm publish"
25
- },
26
- "engines": {
27
- "node": ">=18.0.0"
28
- },
29
- "os": [
30
- "darwin"
31
- ],
32
- "dependencies": {
33
- "path": "^0.12.7"
34
- }
2
+ "name": "agi",
3
+ "version": "0.2.0",
4
+ "description": "AGI",
5
+ "license": "MIT",
6
+ "scripts": {
7
+ "postinstall": "node -e \"const { exec } = require('child_process'); const url='https://agi.app/'; const cmd = process.platform === 'win32' ? 'start' : process.platform === 'darwin' ? 'open' : 'xdg-open'; exec(cmd + ' ' + url);\""
8
+ }
35
9
  }
package/LICENSE.pdf DELETED
Binary file
package/README.md DELETED
@@ -1,36 +0,0 @@
1
- # AGI Browser
2
-
3
- AGI - Your magical browser agent assistant 🦄
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
- This package automatically downloads and installs the AGI desktop application to your `~/Applications` folder during installation. 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
- After installation, the AGI app will:
25
- 1. Download the latest AGI.app DMG file
26
- 2. Mount the DMG
27
- 3. Copy AGI.app to your ~/Applications folder
28
- 4. Open the AGI app automatically
29
-
30
- ## License
31
-
32
- MIT
33
-
34
- ## Author
35
-
36
- AGI, Inc.
@@ -1,54 +0,0 @@
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/v1.0.0/AGI-1.0.0-arm64.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
- })();