agentacta 1.4.0 → 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/index.js CHANGED
@@ -453,18 +453,21 @@ const server = http.createServer((req, res) => {
453
453
  res.write(': connected\n\n');
454
454
 
455
455
  let lastTs = query.after || new Date().toISOString();
456
+ let lastId = query.afterId || '';
456
457
 
457
458
  const onUpdate = () => {
458
459
  try {
459
460
  const rows = db.prepare(
460
461
  `SELECT e.*, s.summary as session_summary FROM events e
461
462
  JOIN sessions s ON s.id = e.session_id
462
- WHERE e.timestamp > ?
463
- ORDER BY e.timestamp ASC`
464
- ).all(lastTs);
463
+ WHERE (e.timestamp > ?) OR (e.timestamp = ? AND e.id > ?)
464
+ ORDER BY e.timestamp ASC, e.id ASC`
465
+ ).all(lastTs, lastTs, lastId);
465
466
  if (rows.length) {
466
- lastTs = rows[rows.length - 1].timestamp;
467
- res.write(`id: ${lastTs}\ndata: ${JSON.stringify(rows)}\n\n`);
467
+ const tail = rows[rows.length - 1];
468
+ lastTs = tail.timestamp || lastTs;
469
+ lastId = tail.id || lastId;
470
+ res.write(`id: ${lastTs}:${lastId}\ndata: ${JSON.stringify(rows)}\n\n`);
468
471
  }
469
472
  } catch (err) {
470
473
  console.error('Timeline SSE error:', err.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentacta",
3
- "version": "1.4.0",
3
+ "version": "2026.3.5",
4
4
  "description": "Audit trail and search engine for AI agent sessions",
5
5
  "main": "index.js",
6
6
  "bin": {