@openlap/openlap 1.1.3 → 1.1.4
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/proxy.js +4 -4
- package/package.json +1 -1
package/dist/proxy.js
CHANGED
|
@@ -174,6 +174,10 @@ export async function startProxy() {
|
|
|
174
174
|
server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
175
175
|
const { name } = req.params;
|
|
176
176
|
const args = { ...(req.params.arguments ?? {}) };
|
|
177
|
+
// -- Heartbeat on every tool call (keeps presence alive) ----------------
|
|
178
|
+
if (channels.hasChannels()) {
|
|
179
|
+
channels.heartbeat().catch(() => { });
|
|
180
|
+
}
|
|
177
181
|
// -- v2 proxy-side channel tools (handled locally) ----------------------
|
|
178
182
|
if (name === "join_channel") {
|
|
179
183
|
const channel = args.channel;
|
|
@@ -230,10 +234,6 @@ export async function startProxy() {
|
|
|
230
234
|
process.stderr.write(`[openlap] auto-saved: ${saved}\n`);
|
|
231
235
|
}
|
|
232
236
|
}
|
|
233
|
-
// -- Heartbeat on every tool call (replaces unreliable setInterval) ------
|
|
234
|
-
if (channels.hasChannels()) {
|
|
235
|
-
channels.heartbeat().catch(() => { });
|
|
236
|
-
}
|
|
237
237
|
// -- Forward to remote --------------------------------------------------
|
|
238
238
|
const result = await remote.callTool({ name, arguments: args });
|
|
239
239
|
// v1 compat: auto-subscribe to feeds from track tool usage
|