openkrew 0.1.7 → 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/core-bootstrap.mjs +24 -4
- package/package.json +4 -2
package/core-bootstrap.mjs
CHANGED
|
@@ -68,6 +68,10 @@ function getBinaryName() {
|
|
|
68
68
|
return platform() === "win32" ? "openkrew.exe" : "openkrew";
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
function getGatewayName() {
|
|
72
|
+
return platform() === "win32" ? "openkrew-gateway.exe" : "openkrew-gateway";
|
|
73
|
+
}
|
|
74
|
+
|
|
71
75
|
/**
|
|
72
76
|
* Checks if the binary is already downloaded and matches the expected version.
|
|
73
77
|
*/
|
|
@@ -118,11 +122,27 @@ async function downloadBinary() {
|
|
|
118
122
|
tarProcess.on("error", reject);
|
|
119
123
|
});
|
|
120
124
|
|
|
121
|
-
// Make
|
|
125
|
+
// Make binaries executable on Unix
|
|
122
126
|
if (platform() !== "win32") {
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
127
|
+
for (const name of [getBinaryName(), getGatewayName()]) {
|
|
128
|
+
const binPath = join(BIN_DIR, name);
|
|
129
|
+
if (existsSync(binPath)) {
|
|
130
|
+
chmodSync(binPath, 0o755);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Ad-hoc codesign on macOS — gives binaries a stable identity so macOS
|
|
136
|
+
// remembers permission grants (network, file access) across launches
|
|
137
|
+
if (platform() === "darwin") {
|
|
138
|
+
for (const name of [getBinaryName(), getGatewayName()]) {
|
|
139
|
+
const binPath = join(BIN_DIR, name);
|
|
140
|
+
if (existsSync(binPath)) {
|
|
141
|
+
try {
|
|
142
|
+
const codesign = spawn("codesign", ["--force", "--sign", "-", binPath], { stdio: "ignore" });
|
|
143
|
+
await new Promise((resolve) => codesign.on("close", resolve));
|
|
144
|
+
} catch {}
|
|
145
|
+
}
|
|
126
146
|
}
|
|
127
147
|
}
|
|
128
148
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openkrew",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Distributed multi-machine AI agent team platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "BUSL-1.1",
|
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
"LICENSE"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
|
-
"preinstall": "node scripts/check-global.mjs"
|
|
22
|
+
"preinstall": "node scripts/check-global.mjs",
|
|
23
|
+
"prebuild": "node scripts/sync-version.mjs",
|
|
24
|
+
"version:sync": "node scripts/sync-version.mjs"
|
|
23
25
|
},
|
|
24
26
|
"engines": {
|
|
25
27
|
"node": ">=18"
|