agentacta 1.4.0 → 1.5.0
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/README.md +4 -26
- package/index.js +38 -5
- package/package.json +1 -1
- package/public/app.js +583 -49
- package/public/index.html +14 -6
- package/public/style.css +383 -7
package/README.md
CHANGED
|
@@ -39,20 +39,10 @@ AgentActa gives you one place to inspect the full trail.
|
|
|
39
39
|
- ⚡ Live indexing via file watching
|
|
40
40
|
- 📱 Mobile-friendly UI
|
|
41
41
|
- 💡 Search suggestions based on real data
|
|
42
|
+
- ⌨️ Command palette (⌘K / Ctrl+K) for quick navigation
|
|
43
|
+
- 🎨 Theme settings (system, light, dark, OLED)
|
|
44
|
+
- 🏥 Health endpoint for monitoring (`/api/health`)
|
|
42
45
|
|
|
43
|
-
## Demo
|
|
44
|
-
|
|
45
|
-
https://github.com/mirajchokshi/agentacta/raw/main/screenshots/demo-final.mp4
|
|
46
|
-
|
|
47
|
-
## Screenshots
|
|
48
|
-
|
|
49
|
-

|
|
50
|
-

|
|
51
|
-

|
|
52
|
-

|
|
53
|
-

|
|
54
|
-

|
|
55
|
-

|
|
56
46
|
|
|
57
47
|
## Quick start
|
|
58
48
|
|
|
@@ -170,6 +160,7 @@ Default config:
|
|
|
170
160
|
| `GET /api/export/session/:id?format=md` | Export one session |
|
|
171
161
|
| `GET /api/timeline/stream?after=<ts>` | SSE stream for live timeline updates |
|
|
172
162
|
| `POST /api/maintenance` | VACUUM + WAL checkpoint (returns size before/after) |
|
|
163
|
+
| `GET /api/health` | Server status, version, uptime, session count |
|
|
173
164
|
| `GET /api/export/search?q=<query>&format=md` | Export search results |
|
|
174
165
|
|
|
175
166
|
Agent integration example:
|
|
@@ -179,19 +170,6 @@ const res = await fetch('http://localhost:4003/api/search?q=deployment+issue&lim
|
|
|
179
170
|
const data = await res.json();
|
|
180
171
|
```
|
|
181
172
|
|
|
182
|
-
## Demo mode
|
|
183
|
-
|
|
184
|
-
```bash
|
|
185
|
-
# seed demo data + run
|
|
186
|
-
npm run demo
|
|
187
|
-
|
|
188
|
-
# or split steps
|
|
189
|
-
node scripts/seed-demo.js
|
|
190
|
-
node index.js --demo
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
Demo mode creates 7 realistic sessions (weather app build path: scaffolding, API, frontend, debugging, deployment, tests, sub-agent task).
|
|
194
|
-
|
|
195
173
|
## Security
|
|
196
174
|
|
|
197
175
|
AgentActa binds to `127.0.0.1` by default.
|
package/index.js
CHANGED
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Bridge release for users on ^1.x semver ranges
|
|
4
|
+
if (require('./package.json').version === '1.5.0') {
|
|
5
|
+
console.log('\n\x1b[33m⚠ AgentActa has moved to CalVer versioning (2026.x.x).\x1b[0m');
|
|
6
|
+
console.log('\x1b[33m You are running an old 1.x version.\x1b[0m\n');
|
|
7
|
+
console.log(' Update with: \x1b[36mnpx agentacta@latest\x1b[0m');
|
|
8
|
+
console.log(' Or install: \x1b[36mnpm install -g agentacta@latest\x1b[0m\n');
|
|
9
|
+
}
|
|
10
|
+
|
|
2
11
|
const http = require('http');
|
|
3
12
|
const fs = require('fs');
|
|
4
13
|
const path = require('path');
|
|
5
14
|
const { EventEmitter } = require('events');
|
|
6
15
|
|
|
16
|
+
// --version / -v flag: print version and exit
|
|
17
|
+
if (process.argv.includes('--version') || process.argv.includes('-v')) {
|
|
18
|
+
const pkg = require('./package.json');
|
|
19
|
+
console.log(`${pkg.name} v${pkg.version}`);
|
|
20
|
+
process.exit(0);
|
|
21
|
+
}
|
|
22
|
+
|
|
7
23
|
// --demo flag: use demo session data (must run before config load)
|
|
8
24
|
if (process.argv.includes('--demo')) {
|
|
9
25
|
const demoDir = path.join(__dirname, 'demo');
|
|
@@ -193,6 +209,20 @@ const server = http.createServer((req, res) => {
|
|
|
193
209
|
return json(res, { ok: true, sessions: result.sessions, events: result.events });
|
|
194
210
|
}
|
|
195
211
|
|
|
212
|
+
else if (pathname === '/api/health') {
|
|
213
|
+
const pkg = require('./package.json');
|
|
214
|
+
const sessions = db.prepare('SELECT COUNT(*) as c FROM sessions').get().c;
|
|
215
|
+
const dbSize = getDbSize();
|
|
216
|
+
return json(res, {
|
|
217
|
+
status: 'ok',
|
|
218
|
+
version: pkg.version,
|
|
219
|
+
uptime: Math.round(process.uptime()),
|
|
220
|
+
sessions,
|
|
221
|
+
dbSizeBytes: dbSize.bytes,
|
|
222
|
+
node: process.version
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
|
|
196
226
|
else if (pathname === '/api/config') {
|
|
197
227
|
const dbSize = getDbSize();
|
|
198
228
|
const archiveCount = db.prepare('SELECT COUNT(*) as c FROM archive').get().c;
|
|
@@ -453,18 +483,21 @@ const server = http.createServer((req, res) => {
|
|
|
453
483
|
res.write(': connected\n\n');
|
|
454
484
|
|
|
455
485
|
let lastTs = query.after || new Date().toISOString();
|
|
486
|
+
let lastId = query.afterId || '';
|
|
456
487
|
|
|
457
488
|
const onUpdate = () => {
|
|
458
489
|
try {
|
|
459
490
|
const rows = db.prepare(
|
|
460
491
|
`SELECT e.*, s.summary as session_summary FROM events e
|
|
461
492
|
JOIN sessions s ON s.id = e.session_id
|
|
462
|
-
WHERE e.timestamp > ?
|
|
463
|
-
ORDER BY e.timestamp ASC`
|
|
464
|
-
).all(lastTs);
|
|
493
|
+
WHERE (e.timestamp > ?) OR (e.timestamp = ? AND e.id > ?)
|
|
494
|
+
ORDER BY e.timestamp ASC, e.id ASC`
|
|
495
|
+
).all(lastTs, lastTs, lastId);
|
|
465
496
|
if (rows.length) {
|
|
466
|
-
|
|
467
|
-
|
|
497
|
+
const tail = rows[rows.length - 1];
|
|
498
|
+
lastTs = tail.timestamp || lastTs;
|
|
499
|
+
lastId = tail.id || lastId;
|
|
500
|
+
res.write(`id: ${lastTs}:${lastId}\ndata: ${JSON.stringify(rows)}\n\n`);
|
|
468
501
|
}
|
|
469
502
|
} catch (err) {
|
|
470
503
|
console.error('Timeline SSE error:', err.message);
|