fix(client(tspmIpcClient)): Use bare topic names for IPC client subscribe/unsubscribe to fix log subscription issues

This commit is contained in:
2025-08-30 21:16:31 +00:00
parent 833573eb10
commit 28680309ad
3 changed files with 13 additions and 3 deletions

View File

@@ -1,5 +1,12 @@
# Changelog
## 2025-08-30 - 5.3.1 - fix(client(tspmIpcClient))
Use bare topic names for IPC client subscribe/unsubscribe to fix log subscription issues
- Updated ts/client/tspm.ipcclient.ts to call ipcClient.subscribe/unsubscribe with the bare topic (e.g. 'logs.<id>') instead of prefixed 'topic:<...>'.
- Added comments clarifying that the IpcClient registers the 'topic:' prefix internally.
- Fixes incorrect topic registration that could prevent log streaming handlers from receiving messages.
## 2025-08-30 - 5.3.0 - feat(cli/daemon/processmonitor)
Add flexible target resolution and search command; improve restart/backoff and error handling

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@git.zone/tspm',
version: '5.3.0',
version: '5.3.1',
description: 'a no fuzz process manager'
}

View File

@@ -155,7 +155,9 @@ export class TspmIpcClient {
const id = toProcessId(processId);
const topic = `logs.${id}`;
await this.ipcClient.subscribe(`topic:${topic}`, handler);
// Note: IpcClient.subscribe expects the bare topic (without the 'topic:' prefix)
// and will register a handler for 'topic:<topic>' internally.
await this.ipcClient.subscribe(topic, handler);
}
/**
@@ -168,7 +170,8 @@ export class TspmIpcClient {
const id = toProcessId(processId);
const topic = `logs.${id}`;
await this.ipcClient.unsubscribe(`topic:${topic}`);
// Pass bare topic; client handles 'topic:' prefix internally
await this.ipcClient.unsubscribe(topic);
}
/**