@sickr/replay 0.9.0-beta.1 → 0.9.0-beta.3
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/live.js +14 -2
- package/package.json +1 -1
package/dist/live.js
CHANGED
|
@@ -21,7 +21,7 @@ import { join } from 'node:path';
|
|
|
21
21
|
import { setTimeout as sleep } from 'node:timers/promises';
|
|
22
22
|
import { readCredentials } from './auth.js';
|
|
23
23
|
import { runsDir } from './recorder.js';
|
|
24
|
-
export const LIVE_BASE = (process.env.SICKR_LIVE_URL ?? 'https://
|
|
24
|
+
export const LIVE_BASE = (process.env.SICKR_LIVE_URL ?? 'https://live-service.sickr.ai').replace(/\/+$/, '');
|
|
25
25
|
function pidPath() { return join(homedir(), '.sickr', 'live.pid'); }
|
|
26
26
|
function inboxDir() { return join(homedir(), '.sickr', 'inbox'); }
|
|
27
27
|
function offsetsPath() { return join(homedir(), '.sickr', 'live-offsets.json'); }
|
|
@@ -183,9 +183,21 @@ async function sessionLoop(creds, urlid, opts) {
|
|
|
183
183
|
tailTimer = setInterval(() => pumpNewLines(ws, offsets, opts), 500);
|
|
184
184
|
});
|
|
185
185
|
ws.addEventListener('message', (ev) => {
|
|
186
|
+
// Decode payload — the `ws` npm package delivers text frames as a
|
|
187
|
+
// Buffer (not a string) on the browser-style addEventListener API.
|
|
188
|
+
// Without explicit decode we'd silently treat every message as '{}'.
|
|
189
|
+
let raw = '';
|
|
190
|
+
const d = ev.data;
|
|
191
|
+
if (typeof d === 'string')
|
|
192
|
+
raw = d;
|
|
193
|
+
else if (d && typeof d.toString === 'function') {
|
|
194
|
+
raw = d.toString('utf8');
|
|
195
|
+
}
|
|
196
|
+
if (opts.verbose)
|
|
197
|
+
process.stderr.write(`sickr: ws recv (${raw.length}b): ${raw.slice(0, 120)}\n`);
|
|
186
198
|
let m;
|
|
187
199
|
try {
|
|
188
|
-
m = JSON.parse(
|
|
200
|
+
m = JSON.parse(raw);
|
|
189
201
|
}
|
|
190
202
|
catch {
|
|
191
203
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sickr/replay",
|
|
3
|
-
"version": "0.9.0-beta.
|
|
3
|
+
"version": "0.9.0-beta.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "npx @sickr/replay — local Claude Code audit + one-click share. The free wedge into SICKR.",
|
|
6
6
|
"bin": { "replay": "dist/cli.js", "sickr": "dist/cli.js" },
|