rterm-backend 3.1.9 → 3.1.11
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/bin/gybackend.cjs +10 -6
- package/package.json +2 -2
- package/plugins/synapse-bridge/index.mjs +10 -3
package/bin/gybackend.cjs
CHANGED
|
@@ -391926,7 +391926,7 @@ function createObservability(deps) {
|
|
|
391926
391926
|
reviewMode: deps.reviewMode ?? "strict"
|
|
391927
391927
|
});
|
|
391928
391928
|
const pluginScanRoot = (process.env.GYBACKEND_DATA_DIR ?? "./.gybackend-data") + "/plugins";
|
|
391929
|
-
const bundlePluginRoot = typeof __filename !== "undefined" ? import_node_path27.default.join(import_node_path27.default.dirname(__filename), "..", "
|
|
391929
|
+
const bundlePluginRoot = typeof __filename !== "undefined" ? import_node_path27.default.join(import_node_path27.default.dirname(__filename), "..", "plugins") : new URL("../plugins/", import_meta7.url).pathname;
|
|
391930
391930
|
const scanRoots = [pluginScanRoot, "./plugins"];
|
|
391931
391931
|
try {
|
|
391932
391932
|
const req = (0, import_node_module5.createRequire)(typeof __filename !== "undefined" ? __filename : import_meta7.url);
|
|
@@ -394750,8 +394750,10 @@ async function startGyBackend() {
|
|
|
394750
394750
|
settingsService.onDidChange?.(refreshObservabilityFromSettings);
|
|
394751
394751
|
agentService.setObservability(observability);
|
|
394752
394752
|
terminalService.setSessionRecorder(observability.recording);
|
|
394753
|
-
|
|
394754
|
-
|
|
394753
|
+
Promise.race([
|
|
394754
|
+
observability.pluginRegistry.reload(),
|
|
394755
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error("plugin reload timeout (10s)")), 1e4))
|
|
394756
|
+
]).then((pluginRecords) => {
|
|
394755
394757
|
const pluginTools = [];
|
|
394756
394758
|
for (const record2 of pluginRecords) {
|
|
394757
394759
|
if (record2.error || !record2.enabled) continue;
|
|
@@ -394767,10 +394769,12 @@ async function startGyBackend() {
|
|
|
394767
394769
|
if (pluginTools.length > 0) {
|
|
394768
394770
|
agentService.setPluginTools(pluginTools);
|
|
394769
394771
|
console.log(`[gybackend] Wired ${pluginTools.length} plugin tools from ${pluginRecords.filter((r) => !r.error && r.enabled).length} plugins into the agent.`);
|
|
394772
|
+
} else {
|
|
394773
|
+
console.log("[gybackend] No plugin tools found to wire.");
|
|
394770
394774
|
}
|
|
394771
|
-
}
|
|
394772
|
-
console.warn("[gybackend] Plugin tool wiring
|
|
394773
|
-
}
|
|
394775
|
+
}).catch((e) => {
|
|
394776
|
+
console.warn("[gybackend] Plugin tool wiring skipped:", e instanceof Error ? e.message : String(e));
|
|
394777
|
+
});
|
|
394774
394778
|
if (settingsService.getSettings().sessionLogging?.enabled) {
|
|
394775
394779
|
const logDir = import_node_path28.default.join(
|
|
394776
394780
|
import_node_process2.default.env.GYSHELL_STORE_DIR || "",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rterm-backend",
|
|
3
|
-
"version": "3.1.
|
|
4
|
-
"description": "Headless AI-native backend for RTerm / neuralOS — v3.1.
|
|
3
|
+
"version": "3.1.11",
|
|
4
|
+
"description": "Headless AI-native backend for RTerm / neuralOS — v3.1.11: fix plugin scanRoot path — 55 plugin tools from 10 plugins now wired into the agent (all callable in chat). 11 plugins. Transports (SSH/serial/local), SQLite, and NATS libs install automatically.",
|
|
5
5
|
"main": "bin/gybackend.cjs",
|
|
6
6
|
"bin": { "gybackend": "bin/gybackend.cjs" },
|
|
7
7
|
"license": "MIT",
|
|
@@ -415,10 +415,17 @@ export function register(ctx) {
|
|
|
415
415
|
// ─── auto-start the full-duplex responder on boot (when enabled + autoServe) ───
|
|
416
416
|
// Makes "be tasked by them" always-on, not opt-in per session. Best-effort: a
|
|
417
417
|
// failed auto-start logs but never blocks plugin registration (server may be down).
|
|
418
|
+
// Wrapped in setTimeout(0) to ensure register() returns synchronously BEFORE the
|
|
419
|
+
// async NATS connect — so PluginRegistry.loadFromDir() never hangs on the auto-serve.
|
|
418
420
|
if (cfg.enabled && cfg.autoServe) {
|
|
419
|
-
|
|
420
|
-
.
|
|
421
|
-
|
|
421
|
+
setTimeout(() => {
|
|
422
|
+
Promise.race([
|
|
423
|
+
serveSkills(defaultServeSkills()),
|
|
424
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error('auto-serve connect timeout (5s)')), 5000)),
|
|
425
|
+
])
|
|
426
|
+
.then((skills) => log(`[synapse] auto-started responder on ${cfg.prefix}.agent.${cfg.agentId}.inbox (skills: ${skills.join(', ')})`))
|
|
427
|
+
.catch((e) => log(`[synapse] auto-serve deferred: ${e?.message ?? e} (responder will start on first synapse_serve call)`))
|
|
428
|
+
}, 0)
|
|
422
429
|
}
|
|
423
430
|
}
|
|
424
431
|
|