@chrysb/alphaclaw 0.9.7 → 0.9.9
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.
|
@@ -55,6 +55,12 @@ const cleanupBootstrapArtifacts = (fs, openclawDir) => {
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
+
const getDirectoryEntryName = (entry) => {
|
|
59
|
+
if (typeof entry === "string") return entry;
|
|
60
|
+
if (entry && typeof entry.name === "string") return entry.name;
|
|
61
|
+
return "";
|
|
62
|
+
};
|
|
63
|
+
|
|
58
64
|
const promoteCloneToTarget = ({
|
|
59
65
|
fs,
|
|
60
66
|
tempDir,
|
|
@@ -78,10 +84,12 @@ const promoteCloneToTarget = ({
|
|
|
78
84
|
}
|
|
79
85
|
const existingEntries = fs.readdirSync(targetDir);
|
|
80
86
|
if (existingEntries.length > 0) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
87
|
+
promoteCloneContentsToExistingTarget({ fs, sourceDir, targetDir });
|
|
88
|
+
if (sourceDir !== tempDir) {
|
|
89
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
90
|
+
}
|
|
91
|
+
console.log(`[import] Merged ${sourceDir} into ${targetDir}`);
|
|
92
|
+
return { ok: true };
|
|
85
93
|
}
|
|
86
94
|
fs.rmSync(targetDir, { recursive: true, force: true });
|
|
87
95
|
}
|
|
@@ -203,6 +211,19 @@ const movePath = (fs, src, dest) => {
|
|
|
203
211
|
fs.copyFileSync(src, dest);
|
|
204
212
|
fs.rmSync(src, { force: true });
|
|
205
213
|
};
|
|
214
|
+
const promoteCloneContentsToExistingTarget = ({ fs, sourceDir, targetDir }) => {
|
|
215
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
216
|
+
const sourceEntries = fs.readdirSync(sourceDir, { withFileTypes: true });
|
|
217
|
+
for (const entry of sourceEntries) {
|
|
218
|
+
const entryName = getDirectoryEntryName(entry);
|
|
219
|
+
if (!entryName) continue;
|
|
220
|
+
const sourcePath = path.join(sourceDir, entryName);
|
|
221
|
+
const targetPath = path.join(targetDir, entryName);
|
|
222
|
+
removeIfExists(fs, targetPath);
|
|
223
|
+
movePath(fs, sourcePath, targetPath);
|
|
224
|
+
}
|
|
225
|
+
fs.rmSync(sourceDir, { recursive: true, force: true });
|
|
226
|
+
};
|
|
206
227
|
const buildTransformShim = (targetImportPath) =>
|
|
207
228
|
[
|
|
208
229
|
`export { default } from ${JSON.stringify(targetImportPath)};`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chrysb/alphaclaw",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.9",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"express": "^4.21.0",
|
|
38
38
|
"http-proxy": "^1.18.1",
|
|
39
|
-
"openclaw": "2026.4.
|
|
39
|
+
"openclaw": "2026.4.15",
|
|
40
40
|
"patch-package": "^8.0.1",
|
|
41
41
|
"ws": "^8.19.0"
|
|
42
42
|
},
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
diff --git a/node_modules/openclaw/dist/server.impl-GQ72oJBa.js b/node_modules/openclaw/dist/server.impl-GQ72oJBa.js
|
|
2
|
+
index 70c273a..04a6d54 100644
|
|
3
|
+
--- a/node_modules/openclaw/dist/server.impl-GQ72oJBa.js
|
|
4
|
+
+++ b/node_modules/openclaw/dist/server.impl-GQ72oJBa.js
|
|
5
|
+
@@ -22362,7 +22362,7 @@ function attachGatewayWsMessageHandler(params) {
|
|
6
|
+
close(1008, truncateCloseReason(authMessage));
|
|
7
|
+
};
|
|
8
|
+
const clearUnboundScopes = () => {
|
|
9
|
+
- if (scopes.length > 0) {
|
|
10
|
+
+ if (scopes.length > 0 && !sharedAuthOk) {
|
|
11
|
+
scopes = [];
|
|
12
|
+
connectParams.scopes = scopes;
|
|
13
|
+
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
diff --git a/node_modules/openclaw/dist/server.impl-BbJvXoPb.js b/node_modules/openclaw/dist/server.impl-BbJvXoPb.js
|
|
2
|
-
index a5be9f5d..72e3db5b 100644
|
|
3
|
-
--- a/node_modules/openclaw/dist/server.impl-BbJvXoPb.js
|
|
4
|
-
+++ b/node_modules/openclaw/dist/server.impl-BbJvXoPb.js
|
|
5
|
-
@@ -22272,7 +22272,7 @@ function attachGatewayWsMessageHandler(params) {
|
|
6
|
-
close(1008, truncateCloseReason(authMessage));
|
|
7
|
-
};
|
|
8
|
-
const clearUnboundScopes = () => {
|
|
9
|
-
- if (scopes.length > 0) {
|
|
10
|
-
+ if (scopes.length > 0 && !sharedAuthOk) {
|
|
11
|
-
scopes = [];
|
|
12
|
-
connectParams.scopes = scopes;
|
|
13
|
-
}
|