concentus 0.1.4 → 0.1.5
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/concentus.mjs +21 -12
- package/package.json +1 -1
package/bin/concentus.mjs
CHANGED
|
@@ -8,12 +8,14 @@
|
|
|
8
8
|
* verifies nothing less than HTTPS + the published size, and runs it. One artifact per release,
|
|
9
9
|
* however many doors lead to it.
|
|
10
10
|
*
|
|
11
|
-
* Honest limits, stated rather than discovered: macOS
|
|
12
|
-
*
|
|
11
|
+
* Honest limits, stated rather than discovered: on macOS the dmg is downloaded and opened, but
|
|
12
|
+
* dragging Concentus into Applications is the user's move — a CLI has no business installing an
|
|
13
|
+
* app bundle. On Linux the AppImage is downloaded and made executable, but sandbox quirks belong
|
|
14
|
+
* to the distro.
|
|
13
15
|
*/
|
|
14
16
|
import { createWriteStream, existsSync, mkdirSync, chmodSync, statSync } from 'node:fs'
|
|
15
17
|
import { get } from 'node:https'
|
|
16
|
-
import { homedir, platform
|
|
18
|
+
import { arch, homedir, platform } from 'node:os'
|
|
17
19
|
import { join } from 'node:path'
|
|
18
20
|
import { spawn } from 'node:child_process'
|
|
19
21
|
|
|
@@ -78,13 +80,7 @@ function download(url, to, expectedSize) {
|
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
const os = platform()
|
|
81
|
-
if (os
|
|
82
|
-
fail(
|
|
83
|
-
'There is no macOS build yet — it needs Apple notarization, which is on the roadmap.\n' +
|
|
84
|
-
'Windows and Linux installers: https://github.com/' + REPO + '/releases/latest',
|
|
85
|
-
)
|
|
86
|
-
}
|
|
87
|
-
if (os !== 'win32' && os !== 'linux') {
|
|
83
|
+
if (os !== 'win32' && os !== 'linux' && os !== 'darwin') {
|
|
88
84
|
fail('Unsupported platform: ' + os)
|
|
89
85
|
}
|
|
90
86
|
|
|
@@ -93,11 +89,21 @@ const release = await getJson('https://api.github.com/repos/' + REPO + '/release
|
|
|
93
89
|
fail('Could not reach GitHub Releases: ' + e.message),
|
|
94
90
|
)
|
|
95
91
|
|
|
96
|
-
|
|
92
|
+
// macOS dmgs are per-architecture, named by the same convention the brew cask reads:
|
|
93
|
+
// Concentus-<version>-<arm64|x64>.dmg.
|
|
94
|
+
const wanted =
|
|
95
|
+
os === 'win32' ? /^Concentus-Setup-.*\.exe$/
|
|
96
|
+
: os === 'darwin' ? (arch() === 'arm64' ? /^Concentus-.*-arm64\.dmg$/ : /^Concentus-.*-x64\.dmg$/)
|
|
97
|
+
: /^Concentus-.*\.AppImage$/
|
|
97
98
|
const asset = release.assets.find((a) => wanted.test(a.name))
|
|
98
99
|
if (!asset) fail('The latest release (' + release.tag_name + ') has no installer for this platform.')
|
|
99
100
|
|
|
100
|
-
const cacheDir = join(
|
|
101
|
+
const cacheDir = join(
|
|
102
|
+
os === 'win32' ? join(homedir(), 'AppData', 'Local')
|
|
103
|
+
: os === 'darwin' ? join(homedir(), 'Library', 'Caches')
|
|
104
|
+
: join(homedir(), '.cache'),
|
|
105
|
+
'concentus-launcher',
|
|
106
|
+
)
|
|
101
107
|
mkdirSync(cacheDir, { recursive: true })
|
|
102
108
|
const target = join(cacheDir, asset.name)
|
|
103
109
|
|
|
@@ -111,6 +117,9 @@ if (existsSync(target) && statSync(target).size === asset.size) {
|
|
|
111
117
|
if (os === 'win32') {
|
|
112
118
|
console.log('Starting the installer — it asks where to install and takes it from there.')
|
|
113
119
|
spawn(target, [], { detached: true, stdio: 'ignore' }).unref()
|
|
120
|
+
} else if (os === 'darwin') {
|
|
121
|
+
console.log('Opening the disk image — drag Concentus into Applications to install it.')
|
|
122
|
+
spawn('open', [target], { detached: true, stdio: 'ignore' }).unref()
|
|
114
123
|
} else {
|
|
115
124
|
chmodSync(target, 0o755)
|
|
116
125
|
console.log('Starting ' + asset.name + ' — it runs in place; move it wherever you keep AppImages.')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "concentus",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Visual multi-agent AI orchestration that runs on your Claude subscription. This package downloads the desktop app's installer for your platform from GitHub Releases and launches it — the app itself is not inside the package.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"concentus": "bin/concentus.mjs"
|