@oratis/lisa 0.2.0 → 0.3.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 +70 -6
- package/README.zh-CN.md +69 -6
- package/completions/_lisa +1 -0
- package/completions/lisa.bash +1 -1
- package/completions/lisa.fish +1 -0
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +12 -0
- package/dist/agent.js.map +1 -1
- package/dist/cli.js +23 -0
- package/dist/cli.js.map +1 -1
- package/dist/env.js +6 -1
- package/dist/env.js.map +1 -1
- package/dist/heartbeat/config.d.ts.map +1 -1
- package/dist/heartbeat/config.js +7 -1
- package/dist/heartbeat/config.js.map +1 -1
- package/dist/heartbeat/install.d.ts.map +1 -1
- package/dist/heartbeat/install.js +80 -15
- package/dist/heartbeat/install.js.map +1 -1
- package/dist/integrations/claude-code/parser.d.ts +56 -0
- package/dist/integrations/claude-code/parser.d.ts.map +1 -0
- package/dist/integrations/claude-code/parser.js +224 -0
- package/dist/integrations/claude-code/parser.js.map +1 -0
- package/dist/integrations/claude-code/watcher.d.ts +127 -0
- package/dist/integrations/claude-code/watcher.d.ts.map +1 -0
- package/dist/integrations/claude-code/watcher.js +361 -0
- package/dist/integrations/claude-code/watcher.js.map +1 -0
- package/dist/llm.d.ts +0 -6
- package/dist/llm.d.ts.map +1 -1
- package/dist/llm.js +0 -10
- package/dist/llm.js.map +1 -1
- package/dist/mood-bus.d.ts +11 -2
- package/dist/mood-bus.d.ts.map +1 -1
- package/dist/mood-bus.js +15 -2
- package/dist/mood-bus.js.map +1 -1
- package/dist/sessions/store.d.ts +1 -5
- package/dist/sessions/store.d.ts.map +1 -1
- package/dist/sessions/store.js +0 -11
- package/dist/sessions/store.js.map +1 -1
- package/dist/tools/task.d.ts +0 -1
- package/dist/tools/task.d.ts.map +1 -1
- package/dist/tools/task.js +0 -3
- package/dist/tools/task.js.map +1 -1
- package/dist/web/assets/lisa-mascot.png +0 -0
- package/dist/web/island.d.ts +12 -0
- package/dist/web/island.d.ts.map +1 -0
- package/dist/web/island.js +927 -0
- package/dist/web/island.js.map +1 -0
- package/dist/web/lisa-html.d.ts +29 -0
- package/dist/web/lisa-html.d.ts.map +1 -0
- package/dist/web/lisa-html.js +2095 -0
- package/dist/web/lisa-html.js.map +1 -0
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +86 -1601
- package/dist/web/server.js.map +1 -1
- package/package.json +11 -1
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code session monitor — Phase 1.
|
|
3
|
+
*
|
|
4
|
+
* Watches ~/.claude/projects/<encoded-cwd>/<session-uuid>.jsonl for activity
|
|
5
|
+
* from Claude Code's CLI / IDE clients. Emits an `update` event whenever
|
|
6
|
+
* a session jsonl appears (new) or grows (message). LISA's web server
|
|
7
|
+
* subscribes and broadcasts to /events SSE so the island widget and other
|
|
8
|
+
* surfaces can render a "Claude is busy" indicator.
|
|
9
|
+
*
|
|
10
|
+
* ── PRIVACY CONTRACT ────────────────────────────────────────────────
|
|
11
|
+
*
|
|
12
|
+
* This module NEVER reads the jsonl message contents. Only:
|
|
13
|
+
* - filename / directory name (= encoded cwd)
|
|
14
|
+
* - mtime
|
|
15
|
+
* - size in bytes
|
|
16
|
+
*
|
|
17
|
+
* The user's prompts and Claude's replies stay in their files. We do
|
|
18
|
+
* not parse, log, or transmit them anywhere. Phase 2 might add an
|
|
19
|
+
* opt-in parser to detect "waiting for permission" semantics — that
|
|
20
|
+
* will be a separate, explicit decision.
|
|
21
|
+
*
|
|
22
|
+
* ── DEPENDENCIES ────────────────────────────────────────────────────
|
|
23
|
+
*
|
|
24
|
+
* None added. Uses only `node:fs` (`fs.watch` with `recursive: true`
|
|
25
|
+
* works on macOS 10.5+ and Windows 10+ — perfect for our target).
|
|
26
|
+
*
|
|
27
|
+
* ── EVENT SEMANTICS ─────────────────────────────────────────────────
|
|
28
|
+
*
|
|
29
|
+
* - "new" — a session jsonl appeared we hadn't seen before
|
|
30
|
+
* - "message" — an existing session jsonl grew (debounced 200ms so a
|
|
31
|
+
* fast token stream doesn't fire a flood)
|
|
32
|
+
* - (Phase 2) "waiting" / "completed" / "error" — needs jsonl parse
|
|
33
|
+
*
|
|
34
|
+
* Active = mtime within ACTIVE_WINDOW_MS (30 min). listActive()
|
|
35
|
+
* returns sessions sorted newest-first, capped at MAX_LISTED.
|
|
36
|
+
*/
|
|
37
|
+
import fs from "node:fs";
|
|
38
|
+
import fsp from "node:fs/promises";
|
|
39
|
+
import path from "node:path";
|
|
40
|
+
import os from "node:os";
|
|
41
|
+
import { EventEmitter } from "node:events";
|
|
42
|
+
import { parseSessionState } from "./parser.js";
|
|
43
|
+
const CLAUDE_HOME = process.env.CLAUDE_HOME ?? path.join(os.homedir(), ".claude");
|
|
44
|
+
const PROJECTS_DIR = path.join(CLAUDE_HOME, "projects");
|
|
45
|
+
const DEBOUNCE_MS = 200;
|
|
46
|
+
const ACTIVE_WINDOW_MS = 30 * 60_000;
|
|
47
|
+
const MAX_LISTED = 10;
|
|
48
|
+
/**
|
|
49
|
+
* After Claude Code writes an `assistant` line with stop_reason=tool_use
|
|
50
|
+
* the file stops growing until the tool returns. For auto-approved tools
|
|
51
|
+
* that's <1s. For tools requiring user permission it's however long the
|
|
52
|
+
* user takes to click "approve" in the Claude Code TUI.
|
|
53
|
+
*
|
|
54
|
+
* Crucially, Claude Code does NOT log a system entry or subtype event
|
|
55
|
+
* for the permission prompt — the prompt lives entirely in the TUI and
|
|
56
|
+
* never touches the jsonl. So the only signal we have that "Claude is
|
|
57
|
+
* waiting for the user" is: last line is tool_use AND the file hasn't
|
|
58
|
+
* grown in a while.
|
|
59
|
+
*
|
|
60
|
+
* 5s is a tuned compromise: short enough to surface real permission
|
|
61
|
+
* prompts promptly in the island pill, long enough that fast tools
|
|
62
|
+
* (Read / Grep / etc, normally <1s) don't false-trigger.
|
|
63
|
+
*/
|
|
64
|
+
const TOOL_USE_PERMISSION_THRESHOLD_MS = 5_000;
|
|
65
|
+
/**
|
|
66
|
+
* Polling interval for the periodic re-evaluation that catches stale
|
|
67
|
+
* tool_use sessions. The fs.watch event stream alone is insufficient
|
|
68
|
+
* because the file isn't growing during the wait — no event fires —
|
|
69
|
+
* so we periodically re-derive state for active sessions.
|
|
70
|
+
*/
|
|
71
|
+
const REPOLL_INTERVAL_MS = 3_000;
|
|
72
|
+
export class ClaudeCodeWatcher extends EventEmitter {
|
|
73
|
+
sessions = new Map(); // key = full path
|
|
74
|
+
watcher = null;
|
|
75
|
+
retryTimer = null;
|
|
76
|
+
repollTimer = null;
|
|
77
|
+
pendingChanges = new Map();
|
|
78
|
+
log;
|
|
79
|
+
started = false;
|
|
80
|
+
constructor(opts = {}) {
|
|
81
|
+
super();
|
|
82
|
+
this.log = opts.log ?? (() => { });
|
|
83
|
+
this.setMaxListeners(32);
|
|
84
|
+
}
|
|
85
|
+
/** Begin watching. Idempotent. Survives ~/.claude/projects not existing yet. */
|
|
86
|
+
async start() {
|
|
87
|
+
if (this.started)
|
|
88
|
+
return;
|
|
89
|
+
this.started = true;
|
|
90
|
+
await this.initialScan();
|
|
91
|
+
await this.attachWatcher();
|
|
92
|
+
this.startRepollLoop();
|
|
93
|
+
}
|
|
94
|
+
stop() {
|
|
95
|
+
this.started = false;
|
|
96
|
+
this.watcher?.close();
|
|
97
|
+
this.watcher = null;
|
|
98
|
+
if (this.retryTimer)
|
|
99
|
+
clearTimeout(this.retryTimer);
|
|
100
|
+
if (this.repollTimer)
|
|
101
|
+
clearInterval(this.repollTimer);
|
|
102
|
+
this.repollTimer = null;
|
|
103
|
+
for (const t of this.pendingChanges.values())
|
|
104
|
+
clearTimeout(t);
|
|
105
|
+
this.pendingChanges.clear();
|
|
106
|
+
}
|
|
107
|
+
/** Sessions modified in the last 30 min, newest first, capped. */
|
|
108
|
+
listActive() {
|
|
109
|
+
const cutoff = Date.now() - ACTIVE_WINDOW_MS;
|
|
110
|
+
return [...this.sessions.values()]
|
|
111
|
+
.filter((s) => s.lastMtime >= cutoff)
|
|
112
|
+
.sort((a, b) => b.lastMtime - a.lastMtime)
|
|
113
|
+
.slice(0, MAX_LISTED);
|
|
114
|
+
}
|
|
115
|
+
// ── Internals ────────────────────────────────────────────────────
|
|
116
|
+
async initialScan() {
|
|
117
|
+
let projectDirs;
|
|
118
|
+
try {
|
|
119
|
+
projectDirs = await fsp.readdir(PROJECTS_DIR);
|
|
120
|
+
}
|
|
121
|
+
catch (err) {
|
|
122
|
+
const e = err;
|
|
123
|
+
if (e.code !== "ENOENT") {
|
|
124
|
+
this.log(`[claude-code] initial scan failed: ${e.message}`);
|
|
125
|
+
}
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
for (const dir of projectDirs) {
|
|
129
|
+
if (dir.startsWith("."))
|
|
130
|
+
continue;
|
|
131
|
+
const projectPath = path.join(PROJECTS_DIR, dir);
|
|
132
|
+
let sessionFiles = [];
|
|
133
|
+
try {
|
|
134
|
+
sessionFiles = await fsp.readdir(projectPath);
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
for (const f of sessionFiles) {
|
|
140
|
+
if (!f.endsWith(".jsonl"))
|
|
141
|
+
continue;
|
|
142
|
+
const full = path.join(projectPath, f);
|
|
143
|
+
await this.recordExisting(full);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
this.log(`[claude-code] initial scan: ${this.sessions.size} session(s) seen`);
|
|
147
|
+
}
|
|
148
|
+
async recordExisting(filePath) {
|
|
149
|
+
try {
|
|
150
|
+
const st = await fsp.stat(filePath);
|
|
151
|
+
if (!st.isFile())
|
|
152
|
+
return;
|
|
153
|
+
const parsed = await parseSessionState(filePath);
|
|
154
|
+
const info = this.makeInfo(filePath, st.mtimeMs, st.size, parsed.state, parsed.reason, parsed.cwd);
|
|
155
|
+
this.sessions.set(filePath, info);
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
// ignore — file disappeared between readdir and stat
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
async attachWatcher() {
|
|
162
|
+
try {
|
|
163
|
+
await fsp.access(PROJECTS_DIR);
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
// Directory doesn't exist (user hasn't run Claude Code yet).
|
|
167
|
+
// Poll every 30s for its appearance; once it shows up, attach.
|
|
168
|
+
this.scheduleRetry();
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
try {
|
|
172
|
+
this.watcher = fs.watch(PROJECTS_DIR, { recursive: true, persistent: false }, (_eventType, filename) => {
|
|
173
|
+
if (filename)
|
|
174
|
+
this.handleFsEvent(filename);
|
|
175
|
+
});
|
|
176
|
+
this.watcher.on("error", (err) => {
|
|
177
|
+
this.log(`[claude-code] watcher error: ${err.message}; will retry`);
|
|
178
|
+
this.watcher?.close();
|
|
179
|
+
this.watcher = null;
|
|
180
|
+
this.scheduleRetry();
|
|
181
|
+
});
|
|
182
|
+
this.log(`[claude-code] watching ${PROJECTS_DIR}`);
|
|
183
|
+
}
|
|
184
|
+
catch (err) {
|
|
185
|
+
this.log(`[claude-code] failed to attach: ${err.message}; retrying`);
|
|
186
|
+
this.scheduleRetry();
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
scheduleRetry() {
|
|
190
|
+
if (this.retryTimer || !this.started)
|
|
191
|
+
return;
|
|
192
|
+
this.retryTimer = setTimeout(() => {
|
|
193
|
+
this.retryTimer = null;
|
|
194
|
+
void this.attachWatcher();
|
|
195
|
+
}, 30_000);
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* fs.watch fires the relative path of the changed entry. We debounce
|
|
199
|
+
* to coalesce rapid streaming writes into one `message` event per
|
|
200
|
+
* burst.
|
|
201
|
+
*/
|
|
202
|
+
handleFsEvent(filename) {
|
|
203
|
+
if (!filename.endsWith(".jsonl"))
|
|
204
|
+
return;
|
|
205
|
+
const full = path.join(PROJECTS_DIR, filename);
|
|
206
|
+
const existing = this.pendingChanges.get(full);
|
|
207
|
+
if (existing)
|
|
208
|
+
clearTimeout(existing);
|
|
209
|
+
this.pendingChanges.set(full, setTimeout(() => {
|
|
210
|
+
this.pendingChanges.delete(full);
|
|
211
|
+
void this.diff(full);
|
|
212
|
+
}, DEBOUNCE_MS));
|
|
213
|
+
}
|
|
214
|
+
async diff(fullPath) {
|
|
215
|
+
let st;
|
|
216
|
+
try {
|
|
217
|
+
st = await fsp.stat(fullPath);
|
|
218
|
+
}
|
|
219
|
+
catch {
|
|
220
|
+
// file was deleted — drop from map silently (no `ended` event in Phase 1)
|
|
221
|
+
this.sessions.delete(fullPath);
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
if (!st.isFile())
|
|
225
|
+
return;
|
|
226
|
+
const prev = this.sessions.get(fullPath);
|
|
227
|
+
const parsed = await parseSessionState(fullPath);
|
|
228
|
+
const info = this.makeInfo(fullPath, st.mtimeMs, st.size, parsed.state, parsed.reason, parsed.cwd);
|
|
229
|
+
this.sessions.set(fullPath, info);
|
|
230
|
+
if (!prev) {
|
|
231
|
+
this.emitUpdate("new", info);
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
const grew = st.size !== prev.size || st.mtimeMs !== prev.lastMtime;
|
|
235
|
+
const stateChanged = prev.state !== info.state;
|
|
236
|
+
if (grew) {
|
|
237
|
+
// A "message" event implicitly reports the new state too.
|
|
238
|
+
this.emitUpdate("message", info);
|
|
239
|
+
}
|
|
240
|
+
else if (stateChanged) {
|
|
241
|
+
// Rare path: file mtime/size unchanged but parse derived a
|
|
242
|
+
// different state. Emit a state-only event so the UI can react.
|
|
243
|
+
this.emitUpdate("state_changed", info);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
emitUpdate(event, info) {
|
|
247
|
+
const payload = {
|
|
248
|
+
event,
|
|
249
|
+
projectEncoded: info.projectEncoded,
|
|
250
|
+
projectLabel: info.projectLabel,
|
|
251
|
+
sessionId: info.sessionId,
|
|
252
|
+
state: info.state,
|
|
253
|
+
stateReason: info.stateReason,
|
|
254
|
+
cwd: info.cwd,
|
|
255
|
+
ts: new Date().toISOString(),
|
|
256
|
+
};
|
|
257
|
+
this.emit("update", payload);
|
|
258
|
+
}
|
|
259
|
+
makeInfo(filePath, mtimeMs, size, state, stateReason, cwd) {
|
|
260
|
+
const sessionId = path.basename(filePath, ".jsonl");
|
|
261
|
+
const projectEncoded = path.basename(path.dirname(filePath));
|
|
262
|
+
// Staleness heuristic: any "working" session whose jsonl hasn't
|
|
263
|
+
// grown in TOOL_USE_PERMISSION_THRESHOLD_MS gets promoted to
|
|
264
|
+
// "waiting". Three real-world cases all map to this:
|
|
265
|
+
//
|
|
266
|
+
// - tool_use + stale → Claude is waiting for the user to
|
|
267
|
+
// approve a tool in the Claude Code TUI
|
|
268
|
+
// (the prompt lives in the TUI, never on
|
|
269
|
+
// disk — staleness is the only signal)
|
|
270
|
+
// - assistant + stale → API stream stalled or Claude is mid-
|
|
271
|
+
// thinking on a hard turn
|
|
272
|
+
// - user + stale → tool result came back but Claude never
|
|
273
|
+
// wrote the follow-up — usually means
|
|
274
|
+
// the user cancelled Claude Code
|
|
275
|
+
//
|
|
276
|
+
// For all three the user benefit is the same: solid orange dot in
|
|
277
|
+
// the island pill ("not making progress, check on it") instead of
|
|
278
|
+
// a pulsing one ("actively working"). Reason "idle" is honest about
|
|
279
|
+
// what we know — we can't actually distinguish these from on-disk
|
|
280
|
+
// metadata alone.
|
|
281
|
+
const ageMs = Date.now() - mtimeMs;
|
|
282
|
+
let finalState = state;
|
|
283
|
+
let finalReason = stateReason;
|
|
284
|
+
if (state === "working" && ageMs >= TOOL_USE_PERMISSION_THRESHOLD_MS) {
|
|
285
|
+
finalState = "waiting";
|
|
286
|
+
finalReason = stateReason === "tool_use" ? "permission" : "idle";
|
|
287
|
+
}
|
|
288
|
+
return {
|
|
289
|
+
projectEncoded,
|
|
290
|
+
projectLabel: decodeProjectLabel(projectEncoded),
|
|
291
|
+
sessionId,
|
|
292
|
+
lastMtime: mtimeMs,
|
|
293
|
+
size,
|
|
294
|
+
state: finalState,
|
|
295
|
+
stateReason: finalReason,
|
|
296
|
+
cwd,
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Periodic re-evaluation of active sessions' state. The fs.watch
|
|
301
|
+
* stream only fires when the file changes — but the very condition
|
|
302
|
+
* we want to detect (Claude waiting for permission) is "the file
|
|
303
|
+
* STOPPED changing". So we sweep every few seconds: for each session
|
|
304
|
+
* with a recent mtime, re-stat + re-parse + emit `state_changed` if
|
|
305
|
+
* the derived state has flipped.
|
|
306
|
+
*
|
|
307
|
+
* Cheap: stat is O(1), parser reads only the file's tail.
|
|
308
|
+
*/
|
|
309
|
+
startRepollLoop() {
|
|
310
|
+
if (this.repollTimer)
|
|
311
|
+
return;
|
|
312
|
+
this.repollTimer = setInterval(() => {
|
|
313
|
+
void this.repollActive();
|
|
314
|
+
}, REPOLL_INTERVAL_MS);
|
|
315
|
+
// Don't keep the process alive purely for this poll — the HTTP
|
|
316
|
+
// server's listening sockets are the real lifecycle holders.
|
|
317
|
+
if (this.repollTimer.unref)
|
|
318
|
+
this.repollTimer.unref();
|
|
319
|
+
}
|
|
320
|
+
async repollActive() {
|
|
321
|
+
const cutoff = Date.now() - ACTIVE_WINDOW_MS;
|
|
322
|
+
const candidates = [...this.sessions.entries()]
|
|
323
|
+
.filter(([, info]) => info.lastMtime >= cutoff);
|
|
324
|
+
for (const [filePath, prev] of candidates) {
|
|
325
|
+
let st;
|
|
326
|
+
try {
|
|
327
|
+
st = await fsp.stat(filePath);
|
|
328
|
+
}
|
|
329
|
+
catch {
|
|
330
|
+
continue; // file gone — let the fs.watch flow handle removal
|
|
331
|
+
}
|
|
332
|
+
if (!st.isFile())
|
|
333
|
+
continue;
|
|
334
|
+
const parsed = await parseSessionState(filePath);
|
|
335
|
+
const info = this.makeInfo(filePath, st.mtimeMs, st.size, parsed.state, parsed.reason, parsed.cwd);
|
|
336
|
+
// No file growth here — only re-emit when the DERIVED state
|
|
337
|
+
// changed (tool_use → waiting/permission after staleness).
|
|
338
|
+
if (info.state !== prev.state || info.stateReason !== prev.stateReason) {
|
|
339
|
+
this.sessions.set(filePath, info);
|
|
340
|
+
this.emitUpdate("state_changed", info);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* `~/.claude/projects/-Users-oratis-Projects-Adex` → "Adex".
|
|
347
|
+
* Heuristic: strip a leading dash, replace remaining dashes with slashes,
|
|
348
|
+
* take the basename. Falls back to the raw encoded form if the result
|
|
349
|
+
* looks broken (no `/`, suspiciously empty).
|
|
350
|
+
*/
|
|
351
|
+
export function decodeProjectLabel(encoded) {
|
|
352
|
+
if (!encoded.startsWith("-"))
|
|
353
|
+
return encoded;
|
|
354
|
+
const asPath = "/" + encoded.slice(1).replace(/-/g, "/");
|
|
355
|
+
const base = path.basename(asPath);
|
|
356
|
+
if (!base || base === "/")
|
|
357
|
+
return encoded;
|
|
358
|
+
return base;
|
|
359
|
+
}
|
|
360
|
+
export const CLAUDE_PROJECTS_DIR = PROJECTS_DIR;
|
|
361
|
+
//# sourceMappingURL=watcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watcher.js","sourceRoot":"","sources":["../../../src/integrations/claude-code/watcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,GAAG,MAAM,kBAAkB,CAAC;AACnC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAA2B,MAAM,aAAa,CAAC;AAEzE,MAAM,WAAW,GAAS,OAAO,CAAC,GAAG,CAAC,WAAW,IA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CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;gBAClC,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;YACzC,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAe;IAChD,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,OAAO,CAAC;IAC7C,MAAM,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACzD,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACnC,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,GAAG;QAAE,OAAO,OAAO,CAAC;IAC1C,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,YAAY,CAAC"}
|
package/dist/llm.d.ts
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
import Anthropic from "@anthropic-ai/sdk";
|
|
2
1
|
export declare const DEFAULT_MODEL = "claude-sonnet-4-6";
|
|
3
|
-
export declare const DEFAULT_MAX_TOKENS = 16000;
|
|
4
|
-
export declare function createAnthropicClient(opts?: {
|
|
5
|
-
apiKey?: string;
|
|
6
|
-
baseURL?: string;
|
|
7
|
-
}): Anthropic;
|
|
8
2
|
//# sourceMappingURL=llm.d.ts.map
|
package/dist/llm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm.d.ts","sourceRoot":"","sources":["../src/llm.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"llm.d.ts","sourceRoot":"","sources":["../src/llm.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,sBAAsB,CAAC"}
|
package/dist/llm.js
CHANGED
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
import Anthropic from "@anthropic-ai/sdk";
|
|
2
|
-
import { proxyAwareFetch } from "./proxy-bootstrap.js";
|
|
3
1
|
export const DEFAULT_MODEL = "claude-sonnet-4-6";
|
|
4
|
-
export const DEFAULT_MAX_TOKENS = 16_000;
|
|
5
|
-
export function createAnthropicClient(opts = {}) {
|
|
6
|
-
return new Anthropic({
|
|
7
|
-
apiKey: opts.apiKey,
|
|
8
|
-
baseURL: opts.baseURL,
|
|
9
|
-
fetch: proxyAwareFetch,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
2
|
//# sourceMappingURL=llm.js.map
|
package/dist/llm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm.js","sourceRoot":"","sources":["../src/llm.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"llm.js","sourceRoot":"","sources":["../src/llm.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC"}
|
package/dist/mood-bus.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { EventEmitter } from "node:events";
|
|
2
2
|
/**
|
|
3
|
-
* Process-wide mood bus
|
|
4
|
-
*
|
|
3
|
+
* Process-wide mood bus + a few lightweight agent-state pulses.
|
|
4
|
+
*
|
|
5
|
+
* The set_mood tool emits `mood` here and the web server (or any other
|
|
6
|
+
* surface) subscribes to push it to the client. The agent loop also emits
|
|
7
|
+
* `chat_start` / `chat_end` so external surfaces (web GUI, island widget)
|
|
8
|
+
* can show a "thinking" indicator without subscribing to the per-turn
|
|
9
|
+
* agent event stream.
|
|
5
10
|
*
|
|
6
11
|
* Decoupled from the agent loop so non-agent code (scheduled tasks,
|
|
7
12
|
* heartbeats, channels) can also nudge the avatar.
|
|
@@ -10,6 +15,10 @@ declare class MoodBus extends EventEmitter {
|
|
|
10
15
|
private currentSlug;
|
|
11
16
|
set(slug: string): void;
|
|
12
17
|
current(): string;
|
|
18
|
+
/** Agent loop entered a turn — surfaces switch to "thinking" indicator. */
|
|
19
|
+
chatStart(): void;
|
|
20
|
+
/** Agent loop exited — surfaces clear the "thinking" indicator. */
|
|
21
|
+
chatEnd(): void;
|
|
13
22
|
}
|
|
14
23
|
export declare const moodBus: MoodBus;
|
|
15
24
|
export {};
|
package/dist/mood-bus.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mood-bus.d.ts","sourceRoot":"","sources":["../src/mood-bus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C
|
|
1
|
+
{"version":3,"file":"mood-bus.d.ts","sourceRoot":"","sources":["../src/mood-bus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;;;;;;;GAWG;AACH,cAAM,OAAQ,SAAQ,YAAY;IAChC,OAAO,CAAC,WAAW,CAAa;IAEhC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAKvB,OAAO,IAAI,MAAM;IAIjB,2EAA2E;IAC3E,SAAS,IAAI,IAAI;IAIjB,mEAAmE;IACnE,OAAO,IAAI,IAAI;CAGhB;AAED,eAAO,MAAM,OAAO,SAAgB,CAAC"}
|
package/dist/mood-bus.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { EventEmitter } from "node:events";
|
|
2
2
|
/**
|
|
3
|
-
* Process-wide mood bus
|
|
4
|
-
*
|
|
3
|
+
* Process-wide mood bus + a few lightweight agent-state pulses.
|
|
4
|
+
*
|
|
5
|
+
* The set_mood tool emits `mood` here and the web server (or any other
|
|
6
|
+
* surface) subscribes to push it to the client. The agent loop also emits
|
|
7
|
+
* `chat_start` / `chat_end` so external surfaces (web GUI, island widget)
|
|
8
|
+
* can show a "thinking" indicator without subscribing to the per-turn
|
|
9
|
+
* agent event stream.
|
|
5
10
|
*
|
|
6
11
|
* Decoupled from the agent loop so non-agent code (scheduled tasks,
|
|
7
12
|
* heartbeats, channels) can also nudge the avatar.
|
|
@@ -15,6 +20,14 @@ class MoodBus extends EventEmitter {
|
|
|
15
20
|
current() {
|
|
16
21
|
return this.currentSlug;
|
|
17
22
|
}
|
|
23
|
+
/** Agent loop entered a turn — surfaces switch to "thinking" indicator. */
|
|
24
|
+
chatStart() {
|
|
25
|
+
this.emit("chat_start");
|
|
26
|
+
}
|
|
27
|
+
/** Agent loop exited — surfaces clear the "thinking" indicator. */
|
|
28
|
+
chatEnd() {
|
|
29
|
+
this.emit("chat_end");
|
|
30
|
+
}
|
|
18
31
|
}
|
|
19
32
|
export const moodBus = new MoodBus();
|
|
20
33
|
moodBus.setMaxListeners(64);
|
package/dist/mood-bus.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mood-bus.js","sourceRoot":"","sources":["../src/mood-bus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C
|
|
1
|
+
{"version":3,"file":"mood-bus.js","sourceRoot":"","sources":["../src/mood-bus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;;;;;;;GAWG;AACH,MAAM,OAAQ,SAAQ,YAAY;IACxB,WAAW,GAAG,SAAS,CAAC;IAEhC,GAAG,CAAC,IAAY;QACd,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,2EAA2E;IAC3E,SAAS;QACP,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1B,CAAC;IAED,mEAAmE;IACnE,OAAO;QACL,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxB,CAAC;CACF;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AACrC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC"}
|
package/dist/sessions/store.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SessionHeader, StoredMessage } from "../types.js";
|
|
2
2
|
export declare class SessionStore {
|
|
3
3
|
readonly id: string;
|
|
4
4
|
readonly path: string;
|
|
@@ -11,10 +11,6 @@ export declare class SessionStore {
|
|
|
11
11
|
}): Promise<SessionStore>;
|
|
12
12
|
appendMessage(message: StoredMessage): Promise<void>;
|
|
13
13
|
appendReflection(summary: string): Promise<void>;
|
|
14
|
-
readAll(): Promise<{
|
|
15
|
-
header: SessionHeader;
|
|
16
|
-
entries: SessionEntry[];
|
|
17
|
-
}>;
|
|
18
14
|
/**
|
|
19
15
|
* Read a page of message entries (newest-first within the page).
|
|
20
16
|
* page=0 = latest PAGE_SIZE messages, page=1 = older ones, etc.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/sessions/store.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/sessions/store.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAgB,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE9E,qBAAa,YAAY;IACvB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAE/B,OAAO;WAMM,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;WASvC,MAAM,CAAC,IAAI,EAAE;QACxB,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,OAAO,CAAC,YAAY,CAAC;IAgBnB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IASpD,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAStD;;;OAGG;IACG,eAAe,CACnB,IAAI,EAAE,MAAM,EACZ,QAAQ,SAAK,GACZ,OAAO,CAAC;QAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;CAe5D"}
|
package/dist/sessions/store.js
CHANGED
|
@@ -52,17 +52,6 @@ export class SessionStore {
|
|
|
52
52
|
};
|
|
53
53
|
await appendLine(this.path, JSON.stringify(entry));
|
|
54
54
|
}
|
|
55
|
-
async readAll() {
|
|
56
|
-
const raw = await fs.readFile(this.path, "utf8");
|
|
57
|
-
const lines = raw.split("\n").filter(Boolean);
|
|
58
|
-
if (lines.length === 0)
|
|
59
|
-
throw new Error("empty session file");
|
|
60
|
-
const header = JSON.parse(lines[0]);
|
|
61
|
-
const entries = lines
|
|
62
|
-
.slice(1)
|
|
63
|
-
.map((line) => JSON.parse(line));
|
|
64
|
-
return { header, entries };
|
|
65
|
-
}
|
|
66
55
|
/**
|
|
67
56
|
* Read a page of message entries (newest-first within the page).
|
|
68
57
|
* page=0 = latest PAGE_SIZE messages, page=1 = older ones, etc.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/sessions/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGvD,MAAM,OAAO,YAAY;IACd,EAAE,CAAS;IACX,IAAI,CAAS;IACb,MAAM,CAAgB;IAE/B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C"}
|
package/dist/tools/task.d.ts
CHANGED
package/dist/tools/task.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../src/tools/task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,UAAU,SAAS;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAWD,wBAAgB,cAAc,CAAC,IAAI,EAAE;IACnC,WAAW,EAAE,MAAM,cAAc,EAAE,CAAC;IACpC,eAAe,EAAE,MAAM,cAAc,EAAE,CAAC;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,WAAW,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,cAAc,CAAC,SAAS,EAAE,MAAM,CAAC,CAgDpC
|
|
1
|
+
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../src/tools/task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,UAAU,SAAS;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAWD,wBAAgB,cAAc,CAAC,IAAI,EAAE;IACnC,WAAW,EAAE,MAAM,cAAc,EAAE,CAAC;IACpC,eAAe,EAAE,MAAM,cAAc,EAAE,CAAC;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,WAAW,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,cAAc,CAAC,SAAS,EAAE,MAAM,CAAC,CAgDpC"}
|
package/dist/tools/task.js
CHANGED
package/dist/tools/task.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.js","sourceRoot":"","sources":["../../src/tools/task.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAS7C,MAAM,cAAc,GAAG;;;2GAGoF,CAAC;AAE5G,MAAM,cAAc,GAAG;;gCAES,CAAC;AAEjC,MAAM,UAAU,cAAc,CAAC,IAM9B;IACC,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,WAAW,EACT,+EAA+E;YAC/E,0FAA0F;YAC1F,8FAA8F;YAC9F,0EAA0E;YAC1E,mDAAmD;QACrD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,+CAA+C;iBAC7D;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,gFAAgF;iBAC9F;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;oBAC5B,OAAO,EAAE,SAAS;iBACnB;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,2DAA2D;iBACzE;aACF;YACD,QAAQ,EAAE,CAAC,aAAa,EAAE,QAAQ,CAAC;SACpC;QACD,KAAK,CAAC,OAAO,CAAC,KAAK;YACjB,MAAM,KAAK,GACT,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACzE,MAAM,MAAM,GACV,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC;YAC7D,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC;gBA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