@rytuz/machine-access 0.1.11 → 0.1.16
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.
|
@@ -117,23 +117,33 @@ function expandVerifiedPayload(zipPath, release, root, env = process.env) {
|
|
|
117
117
|
const marker = path.join(target, ".rytuz-runtime.json");
|
|
118
118
|
fs.mkdirSync(runtimes, { recursive: true });
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
// Runtime directories are immutable identities. A changed payload needs a
|
|
121
|
+
// *new* runtime version, never an in-place replacement of a live supervisor.
|
|
122
|
+
if (fs.existsSync(target)) {
|
|
123
|
+
if (!fs.existsSync(marker)) {
|
|
124
|
+
fail("Existing runtime directory has no verified identity; refuse overwrite");
|
|
125
|
+
}
|
|
126
|
+
let existing;
|
|
121
127
|
try {
|
|
122
|
-
|
|
123
|
-
if (
|
|
124
|
-
existing.version === release.version &&
|
|
125
|
-
existing.sha256 === release.sha256 &&
|
|
126
|
-
fs.existsSync(path.join(target, "python.exe")) &&
|
|
127
|
-
fs.existsSync(
|
|
128
|
-
path.join(target, "app", "oryx_access", "standard_agent.py")
|
|
129
|
-
)
|
|
130
|
-
) {
|
|
131
|
-
return target;
|
|
132
|
-
}
|
|
128
|
+
existing = JSON.parse(fs.readFileSync(marker, "utf8"));
|
|
133
129
|
} catch {
|
|
134
|
-
|
|
130
|
+
fail("Existing runtime identity is invalid; refuse overwrite");
|
|
131
|
+
}
|
|
132
|
+
if (
|
|
133
|
+
existing.version !== release.version ||
|
|
134
|
+
existing.sha256 !== release.sha256
|
|
135
|
+
) {
|
|
136
|
+
fail("Existing runtime version has a different payload; refuse overwrite");
|
|
135
137
|
}
|
|
136
|
-
|
|
138
|
+
if (
|
|
139
|
+
!fs.existsSync(path.join(target, "python.exe")) ||
|
|
140
|
+
!fs.existsSync(
|
|
141
|
+
path.join(target, "app", "oryx_access", "standard_agent.py")
|
|
142
|
+
)
|
|
143
|
+
) {
|
|
144
|
+
fail("Existing runtime is incomplete; refuse overwrite");
|
|
145
|
+
}
|
|
146
|
+
return target;
|
|
137
147
|
}
|
|
138
148
|
|
|
139
149
|
const staging = target + ".staging-" + process.pid;
|
|
@@ -201,7 +211,8 @@ function expandVerifiedPayload(zipPath, release, root, env = process.env) {
|
|
|
201
211
|
{ encoding: "utf8", flag: "wx" }
|
|
202
212
|
);
|
|
203
213
|
if (fs.existsSync(target)) {
|
|
204
|
-
fs.rmSync(
|
|
214
|
+
fs.rmSync(staging, { recursive: true, force: true });
|
|
215
|
+
fail("Runtime target appeared during extraction; refuse overwrite");
|
|
205
216
|
}
|
|
206
217
|
fs.renameSync(staging, target);
|
|
207
218
|
return target;
|
|
@@ -294,5 +305,7 @@ module.exports = {
|
|
|
294
305
|
sha256File,
|
|
295
306
|
verifyPayload,
|
|
296
307
|
bundledPayloadPath,
|
|
297
|
-
powershellPath
|
|
308
|
+
powershellPath,
|
|
309
|
+
// Scoped unit-test hook; not exposed as a CLI command.
|
|
310
|
+
expandVerifiedPayload
|
|
298
311
|
};
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@rytuz/machine-access",
|
|
3
|
-
"version": "0.1.11",
|
|
4
|
-
"description": "Rytuz Machine Access Standard user-space bootstrap",
|
|
5
|
-
"license": "UNLICENSED",
|
|
6
|
-
"private": false,
|
|
7
2
|
"bin": {
|
|
8
3
|
"rytuz-machine-access": "bin/rytuz-machine-access.js"
|
|
9
4
|
},
|
|
5
|
+
"description": "Rytuz Machine Access Standard user-space bootstrap",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=18"
|
|
8
|
+
},
|
|
10
9
|
"files": [
|
|
11
10
|
"bin",
|
|
12
11
|
"payload",
|
|
13
12
|
"release"
|
|
14
13
|
],
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
"license": "UNLICENSED",
|
|
15
|
+
"name": "@rytuz/machine-access",
|
|
16
|
+
"private": false,
|
|
18
17
|
"scripts": {
|
|
19
18
|
"test": "node --test"
|
|
20
|
-
}
|
|
19
|
+
},
|
|
20
|
+
"version": "0.1.16"
|
|
21
21
|
}
|
|
Binary file
|
package/release/windows-x64.json
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"arch": "x64",
|
|
3
|
+
"package_name": "@rytuz/machine-access",
|
|
4
|
+
"package_version": "0.1.16",
|
|
5
|
+
"payload_path": "payload/windows-x64/rytuz-machine-access-standard.zip",
|
|
6
|
+
"payload_sha256": "40ba4e82b974a4313b1de2656da18f1d22a8bd7725b6a2464b53e44a7f451d76",
|
|
7
|
+
"payload_size": 11202215,
|
|
8
|
+
"platform": "win32",
|
|
9
|
+
"runtime_version": "0.1.16-standard.r93.1",
|
|
10
|
+
"schema_version": "1.0"
|
|
11
|
+
}
|