agent-enderun 0.1.0 → 0.1.1
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/.enderun/config.json
CHANGED
package/bin/cli.js
CHANGED
|
@@ -414,7 +414,16 @@ async function initCommand(selectedAdapter) {
|
|
|
414
414
|
content = content.replace(/\{\{ADAPTER\}\}/g, selectedAdapter || "enderun");
|
|
415
415
|
|
|
416
416
|
// Sanitize workspace: protocol in all text files
|
|
417
|
-
|
|
417
|
+
if (ext === ".json") {
|
|
418
|
+
try {
|
|
419
|
+
const json = JSON.parse(content);
|
|
420
|
+
content = JSON.stringify(sanitizeJson(json), null, 2);
|
|
421
|
+
} catch (e) {
|
|
422
|
+
content = content.replace(/workspace:[^"'\s]*/g, "*");
|
|
423
|
+
}
|
|
424
|
+
} else {
|
|
425
|
+
content = content.replace(/workspace:[^"'\s]*/g, "*");
|
|
426
|
+
}
|
|
418
427
|
|
|
419
428
|
fs.writeFileSync(dest, content);
|
|
420
429
|
} else {
|
|
@@ -574,6 +583,20 @@ function checkCommand() {
|
|
|
574
583
|
}
|
|
575
584
|
}
|
|
576
585
|
|
|
586
|
+
function sanitizeJson(obj) {
|
|
587
|
+
if (typeof obj !== "object" || obj === null) return obj;
|
|
588
|
+
if (Array.isArray(obj)) return obj.map(sanitizeJson);
|
|
589
|
+
const cleaned = {};
|
|
590
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
591
|
+
if (typeof value === "string" && value.startsWith("workspace:")) {
|
|
592
|
+
cleaned[key] = "*";
|
|
593
|
+
} else {
|
|
594
|
+
cleaned[key] = sanitizeJson(value);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
return cleaned;
|
|
598
|
+
}
|
|
599
|
+
|
|
577
600
|
function copyDir(src, dest, skipSet = new Set(), nonDestructive = false, frameworkDir = ".enderun") {
|
|
578
601
|
const DEFAULT_SKIP = new Set(["node_modules", ".git", ".DS_Store", "package-lock.json"]);
|
|
579
602
|
const actualSkip = new Set([...DEFAULT_SKIP, ...skipSet]);
|
|
@@ -603,7 +626,16 @@ function copyDir(src, dest, skipSet = new Set(), nonDestructive = false, framewo
|
|
|
603
626
|
content = content.replace(/\{\{FRAMEWORK_DIR\}\}/g, frameworkDir);
|
|
604
627
|
|
|
605
628
|
// Sanitize workspace: protocol
|
|
606
|
-
|
|
629
|
+
if (ext === ".json") {
|
|
630
|
+
try {
|
|
631
|
+
const json = JSON.parse(content);
|
|
632
|
+
content = JSON.stringify(sanitizeJson(json), null, 2);
|
|
633
|
+
} catch (e) {
|
|
634
|
+
content = content.replace(/workspace:[^"'\s]*/g, "*");
|
|
635
|
+
}
|
|
636
|
+
} else {
|
|
637
|
+
content = content.replace(/workspace:[^"'\s]*/g, "*");
|
|
638
|
+
}
|
|
607
639
|
|
|
608
640
|
// Also replace ADAPTER
|
|
609
641
|
const adapterName = frameworkDir.startsWith(".") ? frameworkDir.slice(1) : frameworkDir;
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.1.
|
|
2
|
+
"version": "0.1.1",
|
|
3
3
|
"last_updated": "2026-05-09T13:04:00Z",
|
|
4
4
|
"contract_hash": "daf1d688875061ef66697f39ac2449a34631e9b93926ed3e694b4e4ac7423d98",
|
|
5
5
|
"breaking_changes": [
|
|
6
|
-
{ "version": "0.1.
|
|
6
|
+
{ "version": "0.1.1", "description": "Initial framework setup" }
|
|
7
7
|
],
|
|
8
8
|
"deprecated_versions": []
|
|
9
9
|
}
|