@vale-dinap/lucidly 0.0.0-stage → 0.1.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/LICENSE +202 -0
- package/NOTICE +2 -0
- package/README.md +114 -2
- package/bin/lucidly.js +5 -0
- package/dist/adapters/claude-code.js +367 -0
- package/dist/adapters/claude-tools.js +123 -0
- package/dist/adapters/text.js +106 -0
- package/dist/cli.js +215 -0
- package/dist/core/engine.js +1034 -0
- package/dist/core/events.js +5 -0
- package/dist/core/model.js +1 -0
- package/dist/core/text.js +253 -0
- package/dist/outline.js +73 -0
- package/dist/server/server.js +286 -0
- package/dist/server/session.js +101 -0
- package/dist/sources/claude-sessions.js +329 -0
- package/dist/sources/source.js +1 -0
- package/dist/sources/stdin.js +74 -0
- package/dist/sources/tail.js +105 -0
- package/package.json +49 -4
- package/web/app.js +3317 -0
- package/web/favicon.svg +9 -0
- package/web/index.html +114 -0
- package/web/style.css +950 -0
package/web/favicon.svg
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
2
|
+
<rect width="32" height="32" rx="8" fill="#2f6fed"/>
|
|
3
|
+
<path d="M10 8v16" stroke="#fff" stroke-width="2.4" stroke-linecap="round" opacity=".55"/>
|
|
4
|
+
<circle cx="10" cy="9" r="3" fill="#fff"/>
|
|
5
|
+
<circle cx="10" cy="16" r="3" fill="#fff"/>
|
|
6
|
+
<circle cx="10" cy="23" r="3" fill="none" stroke="#fff" stroke-width="2"/>
|
|
7
|
+
<path d="M13 16h5a4 4 0 0 1 4 4v1" stroke="#fff" stroke-width="2.2" fill="none" stroke-linecap="round"/>
|
|
8
|
+
<circle cx="22" cy="23" r="2.6" fill="#ffb547"/>
|
|
9
|
+
</svg>
|
package/web/index.html
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>Lucidly</title>
|
|
7
|
+
<link rel="icon" href="favicon.svg" type="image/svg+xml" />
|
|
8
|
+
<link rel="stylesheet" href="style.css" />
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<header class="top">
|
|
12
|
+
<div class="brand"><img src="favicon.svg" alt="" width="20" height="20" /><span>Lucidly</span></div>
|
|
13
|
+
<button class="ibtn open-btn" id="sessionsBtn" title="Open session (O)" aria-label="Open session">
|
|
14
|
+
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3.5 7.5V6a1.5 1.5 0 0 1 1.5-1.5h4l2 2h8A1.5 1.5 0 0 1 20.5 8v1.5" /><path d="M3.5 9.5h17l-1.6 8.2a1.5 1.5 0 0 1-1.5 1.3H6.6a1.5 1.5 0 0 1-1.5-1.3z" /></svg>
|
|
15
|
+
</button>
|
|
16
|
+
<a class="ibtn save-btn" id="saveBtn" title="Save a snapshot of this run to a file, to keep or share it" aria-label="Save snapshot">
|
|
17
|
+
<svg viewBox="0 0 24 24"><path d="M12 4v11m0 0l-4-4m4 4l4-4M5 20h14" /></svg>
|
|
18
|
+
</a>
|
|
19
|
+
<div class="run" id="runBox" title="Open another session (O)">
|
|
20
|
+
<div class="run-title" id="runTitle">No run open</div>
|
|
21
|
+
<div class="run-sub" id="runSub"></div>
|
|
22
|
+
</div>
|
|
23
|
+
<span class="pill" id="status" data-status="idle"><i></i><span id="statusText">Idle</span></span>
|
|
24
|
+
<div class="wake-wrap">
|
|
25
|
+
<button class="ibtn wake" id="wakeBtn" aria-haspopup="dialog" aria-label="Keep this device awake" title="Keep this device awake">
|
|
26
|
+
<svg viewBox="0 0 24 24" aria-hidden="true"><path class="steam" d="M9 3.5c-.8.9.8 1.6 0 2.5 M12.5 3.5c-.8.9.8 1.6 0 2.5" /><path d="M5 9h11v4.5A5.5 5.5 0 0 1 10.5 19h0A5.5 5.5 0 0 1 5 13.5z M16 10.5h1.2a2.5 2.5 0 0 1 0 5H15.6 M4 21h13" /></svg>
|
|
27
|
+
</button>
|
|
28
|
+
<div class="pop wake-pop" id="wakePop" hidden></div>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="grow"></div>
|
|
31
|
+
<div class="meter-wrap">
|
|
32
|
+
<span class="pill warn" id="outdated" hidden title="Lucidly's engine was updated after this server started. Stop it and run lucidly again to apply the update: some data (such as token counts) may be missing until then.">Restart Lucidly to update</span>
|
|
33
|
+
<button class="meter" id="tokens" hidden title="Token usage (T)" aria-haspopup="dialog"></button>
|
|
34
|
+
<div class="pop" id="tokensPop" hidden></div>
|
|
35
|
+
</div>
|
|
36
|
+
</header>
|
|
37
|
+
|
|
38
|
+
<main class="main">
|
|
39
|
+
<section class="pane" id="pane">
|
|
40
|
+
<div id="overview"></div>
|
|
41
|
+
|
|
42
|
+
<div class="toolbar" id="tbPath">
|
|
43
|
+
<nav class="seg vseg" aria-label="View">
|
|
44
|
+
<button type="button" data-view="simple" class="on" title="Tasks and their steps as nodes: the essentials (V)">Simple</button>
|
|
45
|
+
<button type="button" data-view="detailed" title="Every step, with its details (V)">Detailed</button>
|
|
46
|
+
<button type="button" data-view="files" title="Every file the agent changed, with its edits (V)">Files</button>
|
|
47
|
+
<button type="button" data-view="actions" title="Every action in order, for debugging (V)">Actions</button>
|
|
48
|
+
</nav>
|
|
49
|
+
<div class="chips" id="pathModes"></div>
|
|
50
|
+
<label class="switch"><input type="checkbox" id="hideChat" /><span></span>Hide Q&A</label>
|
|
51
|
+
<div class="grow"></div>
|
|
52
|
+
<div class="search">
|
|
53
|
+
<svg viewBox="0 0 24 24"><path d="M11 4a7 7 0 1 0 0 14a7 7 0 1 0 0-14zM20 20l-4-4" /></svg>
|
|
54
|
+
<input type="search" id="pathSearch" placeholder="Search steps, files, commands" autocomplete="off" />
|
|
55
|
+
</div>
|
|
56
|
+
<button class="ibtn heat-btn" id="heatBtn" aria-pressed="false" aria-label="Token heat" title="Token heat (H)"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3c.5 3.2 4.5 5.2 4.5 10a4.5 4.5 0 0 1-9 0c0-2 .9-3.4 2-4.5.2 1.6 1 2.6 2 3 .3-3.3-.8-5.8.5-8.5z" /></svg></button>
|
|
57
|
+
<button class="tbtn" id="expandAll" title="Expand all (E)">Expand all</button>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<div class="toolbar" id="tbActions" hidden>
|
|
61
|
+
<nav class="seg vseg" aria-label="View">
|
|
62
|
+
<button type="button" data-view="simple" title="Tasks and their steps as nodes: the essentials (V)">Simple</button>
|
|
63
|
+
<button type="button" data-view="detailed" title="Every step, with its details (V)">Detailed</button>
|
|
64
|
+
<button type="button" data-view="files" title="Every file the agent changed, with its edits (V)">Files</button>
|
|
65
|
+
<button type="button" data-view="actions" class="on" title="Every action in order, for debugging (V)">Actions</button>
|
|
66
|
+
</nav>
|
|
67
|
+
<div class="chips" id="kindFilters"></div>
|
|
68
|
+
<div class="grow"></div>
|
|
69
|
+
<nav class="seg err-seg" id="errFilter" aria-label="Failures"></nav>
|
|
70
|
+
<select id="actionsGoal" aria-label="Task"></select>
|
|
71
|
+
<div class="search">
|
|
72
|
+
<svg viewBox="0 0 24 24"><path d="M11 4a7 7 0 1 0 0 14a7 7 0 1 0 0-14zM20 20l-4-4" /></svg>
|
|
73
|
+
<input type="search" id="actionsSearch" placeholder="Filter ( / )" autocomplete="off" />
|
|
74
|
+
</div>
|
|
75
|
+
<button class="tbtn" id="copyCommands" title="Copy the listed shell commands">Copy commands</button>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div id="pathView"></div>
|
|
79
|
+
<div id="actionsView" hidden></div>
|
|
80
|
+
|
|
81
|
+
<div class="empty" id="empty">
|
|
82
|
+
<img src="favicon.svg" alt="" width="44" height="44" />
|
|
83
|
+
<h2>Nothing to show yet</h2>
|
|
84
|
+
<p>Open a Claude Code session, or pipe an agent's output into <code>lucidly</code>.</p>
|
|
85
|
+
<button class="btn primary" id="emptyOpen">Choose a session</button>
|
|
86
|
+
</div>
|
|
87
|
+
<div class="fab-wrap"><button type="button" class="fab" id="toEnd" hidden title="Jump to the end and follow the agent (F)" aria-label="Jump to the end">
|
|
88
|
+
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 5v13m0 0l-5.5-5.5M12 18l5.5-5.5" /></svg><span class="fab-n" id="toEndN" hidden></span>
|
|
89
|
+
</button></div>
|
|
90
|
+
</section>
|
|
91
|
+
<aside class="detail" id="detail" hidden></aside>
|
|
92
|
+
</main>
|
|
93
|
+
|
|
94
|
+
<dialog id="picker" class="picker">
|
|
95
|
+
<form method="dialog" class="picker-h">
|
|
96
|
+
<h3>Open session</h3>
|
|
97
|
+
<nav class="seg">
|
|
98
|
+
<button type="button" data-scope="project" class="on">This project</button>
|
|
99
|
+
<button type="button" data-scope="all">All projects</button>
|
|
100
|
+
</nav>
|
|
101
|
+
<button class="ibtn" value="close" aria-label="Close"><svg viewBox="0 0 24 24"><path d="M6 6l12 12M18 6L6 18" /></svg></button>
|
|
102
|
+
</form>
|
|
103
|
+
<div id="pickerOpen"></div>
|
|
104
|
+
<ul id="pickerList" class="plist"></ul>
|
|
105
|
+
<label class="picker-f" title="A file saved with the download button: keeps a run after its transcript is gone, or lets someone else open it">
|
|
106
|
+
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 20V9m0 0l-4 4m4-4l4 4M5 4h14" /></svg>
|
|
107
|
+
Open a saved snapshot…
|
|
108
|
+
<input type="file" id="loadInput" accept=".json,application/json" hidden />
|
|
109
|
+
</label>
|
|
110
|
+
</dialog>
|
|
111
|
+
|
|
112
|
+
<script type="module" src="app.js"></script>
|
|
113
|
+
</body>
|
|
114
|
+
</html>
|