@nodeskai/genehub 2026.3.4-6 → 2026.3.5
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/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -825,14 +825,20 @@ ${geneBlock}
|
|
|
825
825
|
await writeFile4(this.configPath, JSON.stringify(existing, null, 2), "utf-8");
|
|
826
826
|
}
|
|
827
827
|
async triggerLearning(prompt) {
|
|
828
|
-
const {
|
|
828
|
+
const { execFile, spawn } = await import("child_process");
|
|
829
829
|
const { promisify } = await import("util");
|
|
830
|
-
const
|
|
831
|
-
const
|
|
830
|
+
const { setTimeout: sleep } = await import("timers/promises");
|
|
831
|
+
const run = promisify(execFile);
|
|
832
832
|
try {
|
|
833
|
-
await
|
|
833
|
+
await run("openclaw", ["gateway", "restart"], { timeout: 15e3 });
|
|
834
834
|
} catch {
|
|
835
835
|
}
|
|
836
|
+
await sleep(5e3);
|
|
837
|
+
const child = spawn("openclaw", ["agent", "--agent", "main", "--message", prompt], {
|
|
838
|
+
detached: true,
|
|
839
|
+
stdio: "ignore"
|
|
840
|
+
});
|
|
841
|
+
child.unref();
|
|
836
842
|
}
|
|
837
843
|
async notifySkillChange(geneName, action) {
|
|
838
844
|
await this.invalidateSkillSnapshots();
|