@monoes/monomindcli 1.10.30 → 1.10.32
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/.claude/commands/browse.md +6 -17
- package/.claude/helpers/handlers/adr-draft-handler.cjs +64 -0
- package/.claude/helpers/handlers/agent-start-handler.cjs +99 -0
- package/.claude/helpers/handlers/budget-status-handler.cjs +14 -0
- package/.claude/helpers/handlers/compact-handler.cjs +33 -0
- package/.claude/helpers/handlers/graph-status-handler.cjs +38 -0
- package/.claude/helpers/handlers/loops-status-handler.cjs +45 -0
- package/.claude/helpers/handlers/session-restore-handler.cjs +66 -55
- package/.claude/helpers/handlers/stats-handler.cjs +14 -0
- package/.claude/helpers/hook-handler.cjs +16 -228
- package/.claude/skills/agent-browser-testing/SKILL.md +149 -151
- package/.claude/skills/monomind/browse-agentcore.md +20 -21
- package/.claude/skills/monomind/browse-electron.md +45 -46
- package/.claude/skills/monomind/browse-qa.md +29 -30
- package/.claude/skills/monomind/browse-references/authentication.md +39 -40
- package/.claude/skills/monomind/browse-references/trust-boundaries.md +1 -2
- package/.claude/skills/monomind/browse-references/video-recording.md +23 -24
- package/.claude/skills/monomind/browse-slack.md +52 -53
- package/.claude/skills/monomind/browse-vercel.md +26 -27
- package/.claude/skills/monomind/browse.md +273 -273
- package/dist/src/browser/actions.d.ts +15 -0
- package/dist/src/browser/actions.d.ts.map +1 -1
- package/dist/src/browser/actions.js +91 -0
- package/dist/src/browser/actions.js.map +1 -1
- package/dist/src/browser/batch.d.ts +13 -0
- package/dist/src/browser/batch.d.ts.map +1 -0
- package/dist/src/browser/batch.js +11 -0
- package/dist/src/browser/batch.js.map +1 -0
- package/dist/src/browser/console-log.d.ts +22 -0
- package/dist/src/browser/console-log.d.ts.map +1 -0
- package/dist/src/browser/console-log.js +55 -0
- package/dist/src/browser/console-log.js.map +1 -0
- package/dist/src/browser/dialog.d.ts +11 -0
- package/dist/src/browser/dialog.d.ts.map +1 -0
- package/dist/src/browser/dialog.js +36 -0
- package/dist/src/browser/dialog.js.map +1 -0
- package/dist/src/browser/emulation.d.ts +15 -0
- package/dist/src/browser/emulation.d.ts.map +1 -0
- package/dist/src/browser/emulation.js +62 -0
- package/dist/src/browser/emulation.js.map +1 -0
- package/dist/src/browser/find.d.ts +21 -0
- package/dist/src/browser/find.d.ts.map +1 -0
- package/dist/src/browser/find.js +118 -0
- package/dist/src/browser/find.js.map +1 -0
- package/dist/src/browser/index.d.ts +7 -0
- package/dist/src/browser/index.d.ts.map +1 -1
- package/dist/src/browser/index.js +7 -0
- package/dist/src/browser/index.js.map +1 -1
- package/dist/src/browser/pdf.d.ts +15 -0
- package/dist/src/browser/pdf.d.ts.map +1 -0
- package/dist/src/browser/pdf.js +27 -0
- package/dist/src/browser/pdf.js.map +1 -0
- package/dist/src/browser/storage.d.ts +11 -0
- package/dist/src/browser/storage.d.ts.map +1 -0
- package/dist/src/browser/storage.js +43 -0
- package/dist/src/browser/storage.js.map +1 -0
- package/dist/src/commands/browse.d.ts.map +1 -1
- package/dist/src/commands/browse.js +939 -18
- package/dist/src/commands/browse.js.map +1 -1
- package/dist/src/ui/dashboard-v2.html +581 -19
- package/dist/src/ui/server.mjs +56 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/src/ui/server.mjs
CHANGED
|
@@ -373,6 +373,62 @@ export async function startServer({ port = 4242, projectDir, openBrowser = true
|
|
|
373
373
|
return;
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
+
// ------------------------------------------------------- GET /api/search-sessions
|
|
377
|
+
if (req.method === 'GET' && url === '/api/search-sessions') {
|
|
378
|
+
const qs = new URL(req.url, 'http://localhost').searchParams;
|
|
379
|
+
const dir = qs.get('dir') || '';
|
|
380
|
+
const q = (qs.get('q') || '').toLowerCase().trim();
|
|
381
|
+
if (!q || q.length < 2) {
|
|
382
|
+
res.writeHead(200, { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' });
|
|
383
|
+
res.end(JSON.stringify({ results: [] }));
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
try {
|
|
387
|
+
const d = path.resolve(dir || process.cwd());
|
|
388
|
+
const slug = d.replace(/\//g, '-');
|
|
389
|
+
const projectClaudeDir = path.join(os.homedir(), '.claude', 'projects', slug);
|
|
390
|
+
let sessionFiles = [];
|
|
391
|
+
try {
|
|
392
|
+
sessionFiles = fs.readdirSync(projectClaudeDir)
|
|
393
|
+
.filter(f => f.endsWith('.jsonl'))
|
|
394
|
+
.map(f => { try { return { f, mtime: fs.statSync(path.join(projectClaudeDir, f)).mtimeMs }; } catch { return null; } })
|
|
395
|
+
.filter(Boolean)
|
|
396
|
+
.sort((a, b) => b.mtime - a.mtime)
|
|
397
|
+
.slice(0, 20);
|
|
398
|
+
} catch {}
|
|
399
|
+
const results = [];
|
|
400
|
+
for (const { f, mtime } of sessionFiles) {
|
|
401
|
+
const fp = path.join(projectClaudeDir, f);
|
|
402
|
+
const id = f.replace('.jsonl', '');
|
|
403
|
+
let lastPrompt = '';
|
|
404
|
+
const matches = [];
|
|
405
|
+
try {
|
|
406
|
+
const lines = fs.readFileSync(fp, 'utf8').split('\n').filter(Boolean);
|
|
407
|
+
for (const line of lines) {
|
|
408
|
+
let e; try { e = JSON.parse(line); } catch { continue; }
|
|
409
|
+
if (e.type === 'last-prompt' && e.lastPrompt) lastPrompt = e.lastPrompt;
|
|
410
|
+
if (e.type === 'user') {
|
|
411
|
+
const msg = e.message || {};
|
|
412
|
+
const ct = msg.content || [];
|
|
413
|
+
let text = '';
|
|
414
|
+
if (Array.isArray(ct)) { for (const b of ct) { if (b && b.type === 'text') { text = b.text; break; } } }
|
|
415
|
+
else if (typeof ct === 'string') text = ct;
|
|
416
|
+
if (text.toLowerCase().includes(q)) matches.push({ text: text.slice(0, 150), ts: e.timestamp });
|
|
417
|
+
}
|
|
418
|
+
if (matches.length >= 3) break;
|
|
419
|
+
}
|
|
420
|
+
} catch {}
|
|
421
|
+
if (matches.length) results.push({ id, file: fp, lastPrompt, mtime, matches });
|
|
422
|
+
}
|
|
423
|
+
res.writeHead(200, { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*', 'Cache-Control': 'no-cache' });
|
|
424
|
+
res.end(JSON.stringify({ results, q }));
|
|
425
|
+
} catch (err) {
|
|
426
|
+
res.writeHead(500, { 'Content-Type': 'application/json' });
|
|
427
|
+
res.end(JSON.stringify({ error: err.message }));
|
|
428
|
+
}
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
|
|
376
432
|
// ------------------------------------------------------- GET /api/palace
|
|
377
433
|
if (req.method === 'GET' && url === '/api/palace') {
|
|
378
434
|
try {
|