@botlearn-course/daemon 0.0.23-beta.2 → 0.0.23
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.
|
@@ -137,7 +137,16 @@ function writeFile(destination, content, root, dirMode, fileMode) {
|
|
|
137
137
|
if (resolved !== resolvedRoot && !resolved.startsWith(`${resolvedRoot}${path.sep}`)) {
|
|
138
138
|
throw new RuntimeSkillMaterializationError("skill_package_path_escape", "Skill package file escapes its materialization directory");
|
|
139
139
|
}
|
|
140
|
-
|
|
140
|
+
const parent = path.dirname(resolved);
|
|
141
|
+
mkdirSync(parent, { recursive: true, mode: dirMode });
|
|
142
|
+
// The managed daemon uses a restrictive umask. chmod every package-created ancestor,
|
|
143
|
+
// not only the Skill root, so the separate runtime UID can traverse nested references.
|
|
144
|
+
let current = resolvedRoot;
|
|
145
|
+
const relativeParent = path.relative(resolvedRoot, parent);
|
|
146
|
+
for (const segment of relativeParent.split(path.sep).filter(Boolean)) {
|
|
147
|
+
current = path.join(current, segment);
|
|
148
|
+
chmodSync(current, dirMode);
|
|
149
|
+
}
|
|
141
150
|
writeFileSync(resolved, content, { mode: fileMode });
|
|
142
151
|
chmodSync(resolved, fileMode);
|
|
143
152
|
}
|
package/package.json
CHANGED