agentswarm-cli 1.3.15 → 1.4.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/agency +1 -1
- package/package.json +14 -13
- package/postinstall.mjs +26 -21
package/bin/agency
CHANGED
|
@@ -49,7 +49,7 @@ let arch = archMap[os.arch()]
|
|
|
49
49
|
if (!arch) {
|
|
50
50
|
arch = os.arch()
|
|
51
51
|
}
|
|
52
|
-
const base = "
|
|
52
|
+
const base = "agentswarm-cli-" + platform + "-" + arch
|
|
53
53
|
const binary = platform === "windows" ? "agency.exe" : "agency"
|
|
54
54
|
|
|
55
55
|
function supportsAvx2() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentswarm-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Agent Swarm CLI for the terminal.",
|
|
@@ -23,19 +23,20 @@
|
|
|
23
23
|
"postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
|
|
24
24
|
},
|
|
25
25
|
"optionalDependencies": {
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
26
|
+
"@vrsen/agentswarm-cli-linux-arm64-musl": "1.4.5",
|
|
27
|
+
"@vrsen/agentswarm-cli-windows-x64": "1.4.5",
|
|
28
|
+
"@vrsen/agentswarm-cli-windows-arm64": "1.4.5",
|
|
29
|
+
"@vrsen/agentswarm-cli-darwin-x64": "1.4.5",
|
|
30
|
+
"@vrsen/agentswarm-cli-linux-x64": "1.4.5",
|
|
31
|
+
"@vrsen/agentswarm-cli-darwin-arm64": "1.4.5",
|
|
32
|
+
"@vrsen/agentswarm-cli-linux-x64-musl": "1.4.5",
|
|
33
|
+
"@vrsen/agentswarm-cli-linux-x64-baseline": "1.4.5",
|
|
34
|
+
"@vrsen/agentswarm-cli-linux-x64-baseline-musl": "1.4.5",
|
|
35
|
+
"@vrsen/agentswarm-cli-darwin-x64-baseline": "1.4.5",
|
|
36
|
+
"@vrsen/agentswarm-cli-linux-arm64": "1.4.5",
|
|
37
|
+
"@vrsen/agentswarm-cli-windows-x64-baseline": "1.4.5"
|
|
38
38
|
},
|
|
39
|
+
"platformScope": "@vrsen",
|
|
39
40
|
"publishConfig": {
|
|
40
41
|
"access": "public"
|
|
41
42
|
}
|
package/postinstall.mjs
CHANGED
|
@@ -9,6 +9,8 @@ import { createRequire } from "module"
|
|
|
9
9
|
|
|
10
10
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
11
11
|
const require = createRequire(import.meta.url)
|
|
12
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, "package.json"), "utf8"))
|
|
13
|
+
const scope = pkg.platformScope || ""
|
|
12
14
|
|
|
13
15
|
function detectPlatformAndArch() {
|
|
14
16
|
// Map platform names
|
|
@@ -51,7 +53,7 @@ function detectPlatformAndArch() {
|
|
|
51
53
|
function findBinary() {
|
|
52
54
|
const { platform, arch } = detectPlatformAndArch()
|
|
53
55
|
const binaryName = platform === "windows" ? "agency.exe" : "agency"
|
|
54
|
-
const base = `
|
|
56
|
+
const base = `agentswarm-cli-${platform}-${arch}`
|
|
55
57
|
const baseline = arch === "x64" && !supportsAvx2(platform, arch)
|
|
56
58
|
const names = packageNames(platform, arch, base, baseline)
|
|
57
59
|
|
|
@@ -119,26 +121,31 @@ function supportsAvx2(platform, arch) {
|
|
|
119
121
|
}
|
|
120
122
|
|
|
121
123
|
function packageNames(platform, arch, base, baseline) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
if (
|
|
126
|
-
if (
|
|
127
|
-
|
|
124
|
+
const names = (() => {
|
|
125
|
+
if (platform === "linux") {
|
|
126
|
+
const musl = isMusl()
|
|
127
|
+
if (arch === "x64") {
|
|
128
|
+
if (musl) {
|
|
129
|
+
if (baseline) return [`${base}-baseline-musl`, `${base}-musl`, `${base}-baseline`, base]
|
|
130
|
+
return [`${base}-musl`, `${base}-baseline-musl`, base, `${base}-baseline`]
|
|
131
|
+
}
|
|
132
|
+
if (baseline) return [`${base}-baseline`, base, `${base}-baseline-musl`, `${base}-musl`]
|
|
133
|
+
return [base, `${base}-baseline`, `${base}-musl`, `${base}-baseline-musl`]
|
|
128
134
|
}
|
|
129
|
-
if (
|
|
130
|
-
return [base, `${base}-
|
|
135
|
+
if (musl) return [`${base}-musl`, base]
|
|
136
|
+
return [base, `${base}-musl`]
|
|
131
137
|
}
|
|
132
|
-
if (musl) return [`${base}-musl`, base]
|
|
133
|
-
return [base, `${base}-musl`]
|
|
134
|
-
}
|
|
135
138
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
if (arch === "x64") {
|
|
140
|
+
if (baseline) return [`${base}-baseline`, base]
|
|
141
|
+
return [base, `${base}-baseline`]
|
|
142
|
+
}
|
|
140
143
|
|
|
141
|
-
|
|
144
|
+
return [base]
|
|
145
|
+
})()
|
|
146
|
+
|
|
147
|
+
if (!scope) return names
|
|
148
|
+
return names.map((name) => `${scope}/${name}`)
|
|
142
149
|
}
|
|
143
150
|
|
|
144
151
|
function isMusl() {
|
|
@@ -181,9 +188,7 @@ async function main() {
|
|
|
181
188
|
}
|
|
182
189
|
}
|
|
183
190
|
|
|
184
|
-
|
|
185
|
-
main()
|
|
186
|
-
} catch (error) {
|
|
191
|
+
await main().catch((error) => {
|
|
187
192
|
console.error("Postinstall script error:", error.message)
|
|
188
193
|
process.exit(0)
|
|
189
|
-
}
|
|
194
|
+
})
|