saeeol 1.5.0 → 1.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.
Files changed (2) hide show
  1. package/bin/saeeol +44 -0
  2. package/package.json +1 -1
package/bin/saeeol ADDED
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env node
2
+ // Proxy script — delegates to platform-specific binary
3
+ const path = require("path")
4
+ const { execFileSync } = require("child_process")
5
+ const os = require("os")
6
+ const fs = require("fs")
7
+
8
+ const platform = os.platform()
9
+ const arch = os.arch()
10
+
11
+ function findBinary() {
12
+ const dir = path.resolve(__dirname, "..")
13
+ // Try optionalDependency packages first
14
+ const pkgNames = platform === "win32"
15
+ ? [`saeeol-windows-${arch}`]
16
+ : platform === "darwin"
17
+ ? [`saeeol-darwin-${arch}`, `saeeol-darwin-${arch}-baseline`]
18
+ : [`saeeol-linux-${arch}`, `saeeol-linux-${arch}-baseline`, `saeeol-linux-${arch}-musl`]
19
+
20
+ for (const pkg of pkgNames) {
21
+ try {
22
+ const pkgDir = path.resolve(__dirname, "..", "..", pkg)
23
+ const exe = platform === "win32" ? "saeeol.exe" : "saeeol"
24
+ const binPath = path.join(pkgDir, "bin", exe)
25
+ if (fs.existsSync(binPath)) return binPath
26
+ } catch {}
27
+ }
28
+
29
+ // Try bundled bin
30
+ const localExe = platform === "win32" ? "saeeol.exe" : "saeeol"
31
+ const localPath = path.join(__dirname, localExe)
32
+ if (fs.existsSync(localPath)) return localPath
33
+
34
+ console.error("Could not find saeeol binary for " + platform + "-" + arch)
35
+ process.exit(1)
36
+ }
37
+
38
+ const binary = findBinary()
39
+ const result = execFileSync(binary, process.argv.slice(2), {
40
+ stdio: "inherit",
41
+ env: { ...process.env },
42
+ windowsHide: true,
43
+ })
44
+ if (result != null) process.exit(result)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saeeol",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "AI agent engine for SAEEOL — CLI + Desktop in one package",
5
5
  "bin": { "saeeol": "./bin/saeeol", "fabulist": "./bin/saeeol" },
6
6
  "scripts": { "postinstall": "node ./postinstall.mjs" },