@newrelic/preflight 1.14.18 → 1.14.19
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/dist/hooks/collector-script.d.ts +1 -16
- package/dist/hooks/collector-script.d.ts.map +1 -1
- package/dist/hooks/collector-script.js +2 -188
- package/dist/hooks/collector-script.js.map +1 -1
- package/dist/hooks/event-processor.d.ts +10 -0
- package/dist/hooks/event-processor.d.ts.map +1 -1
- package/dist/hooks/event-processor.js +22 -0
- package/dist/hooks/event-processor.js.map +1 -1
- package/dist/hooks/parent-transcript-watcher.d.ts +124 -0
- package/dist/hooks/parent-transcript-watcher.d.ts.map +1 -0
- package/dist/hooks/parent-transcript-watcher.js +475 -0
- package/dist/hooks/parent-transcript-watcher.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -1
- package/dist/storage/local-store.d.ts +1 -0
- package/dist/storage/local-store.d.ts.map +1 -1
- package/dist/storage/local-store.js +34 -5
- package/dist/storage/local-store.js.map +1 -1
- package/dist/storage/types.d.ts +2 -0
- package/dist/storage/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parent Transcript Watcher — polls a Claude Code session's own main
|
|
3
|
+
* transcript and emits one `mode: 'token'` line per real assistant turn into
|
|
4
|
+
* that session's hook buffer.
|
|
5
|
+
*
|
|
6
|
+
* Replaces the old hook-triggered scanner in collector-script.ts
|
|
7
|
+
* (`collectTranscriptTokens`/`readLastAssistantUsage`), which only ran when a
|
|
8
|
+
* PreToolUse/PostToolUse hook fired and even then returned only the single
|
|
9
|
+
* most recent assistant-with-usage entry. Any turn producing no tool call
|
|
10
|
+
* never triggered a hook at all, and any turn superseded by another before
|
|
11
|
+
* the next hook fired was silently and permanently dropped. This watcher is
|
|
12
|
+
* independent of tool-call timing entirely — it tails the transcript on its
|
|
13
|
+
* own interval via a durable byte cursor, mirroring `SubagentWatcher`, so
|
|
14
|
+
* every real turn is captured regardless of whether it called a tool.
|
|
15
|
+
*
|
|
16
|
+
* Discovery differs from `SubagentWatcher`: a main transcript lives directly
|
|
17
|
+
* at `<projectsDir>/<projectDir>/<sessionId>.jsonl` (flat file under the
|
|
18
|
+
* project dir), not nested under a `subagents/` subdirectory. In scoped mode
|
|
19
|
+
* (`parentSessionId` set — the `--stdio` case) the resolved path is cached
|
|
20
|
+
* after first discovery, since a session's own transcript path never moves.
|
|
21
|
+
*
|
|
22
|
+
* Cursor durability: byte cursor persisted to
|
|
23
|
+
* `~/.newrelic-preflight/.parent-transcript-pos-<sessionId>` survives
|
|
24
|
+
* restart. On crash mid-emit the next poll re-reads from the previous cursor
|
|
25
|
+
* → potential duplicates, which downstream dedupes by (sessionId, messageId)
|
|
26
|
+
* in `HookEventProcessor.handleTokenEvent()`.
|
|
27
|
+
*/
|
|
28
|
+
import type { LocalStore } from '../storage/local-store.js';
|
|
29
|
+
export interface ParentTranscriptWatcherOptions {
|
|
30
|
+
/** Storage path for cursor state (defaults to ~/.newrelic-preflight). */
|
|
31
|
+
readonly storagePath?: string;
|
|
32
|
+
/** ~/.claude/projects directory; defaults to homedir-relative. */
|
|
33
|
+
readonly projectsDir?: string;
|
|
34
|
+
/** Poll interval in ms. Default 2000. */
|
|
35
|
+
readonly pollIntervalMs?: number;
|
|
36
|
+
/** Cold-scan eligibility window for unfiltered mode. Default 24h. */
|
|
37
|
+
readonly discoveryHours?: number;
|
|
38
|
+
/** LocalStore, used to exclude sessions already owned by a live --stdio watcher in unfiltered mode. */
|
|
39
|
+
readonly localStore?: LocalStore;
|
|
40
|
+
/**
|
|
41
|
+
* If provided, watcher only processes this one session's transcript.
|
|
42
|
+
* Default: process every session id under projectsDir (matches `--local`
|
|
43
|
+
* unscoped semantics).
|
|
44
|
+
*/
|
|
45
|
+
readonly parentSessionId?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface ParentTranscriptWatcherHealth {
|
|
48
|
+
readonly filesWatched: number;
|
|
49
|
+
readonly linesRead: number;
|
|
50
|
+
readonly bytesRead: number;
|
|
51
|
+
readonly parseErrors: number;
|
|
52
|
+
}
|
|
53
|
+
export declare class ParentTranscriptWatcher {
|
|
54
|
+
private readonly storagePath;
|
|
55
|
+
private readonly projectsDir;
|
|
56
|
+
private readonly pollIntervalMs;
|
|
57
|
+
private readonly discoveryHours;
|
|
58
|
+
private readonly parentSessionFilter;
|
|
59
|
+
private readonly localStore;
|
|
60
|
+
private intervalId;
|
|
61
|
+
private running;
|
|
62
|
+
private cachedScopedPath;
|
|
63
|
+
private readonly partialByPath;
|
|
64
|
+
private readonly decoderByPath;
|
|
65
|
+
private filesWatched;
|
|
66
|
+
private linesRead;
|
|
67
|
+
private bytesRead;
|
|
68
|
+
private parseErrors;
|
|
69
|
+
constructor(options?: ParentTranscriptWatcherOptions);
|
|
70
|
+
start(): void;
|
|
71
|
+
stop(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Single poll cycle. Public so tests can drive deterministically without
|
|
74
|
+
* waiting on the interval timer.
|
|
75
|
+
*/
|
|
76
|
+
poll(): void;
|
|
77
|
+
/** Public snapshot of watcher health counters, for tests and future dashboard wiring. */
|
|
78
|
+
getHealthStats(): ParentTranscriptWatcherHealth;
|
|
79
|
+
private discoverFiles;
|
|
80
|
+
/**
|
|
81
|
+
* Scoped mode: locate the one known session's own transcript by scanning
|
|
82
|
+
* every top-level project dir for `<sessionId>.jsonl` — deliberately not
|
|
83
|
+
* derived from cwd, since a cwd-derived dashed dir name breaks under git
|
|
84
|
+
* worktrees (the same reason collector-script.ts's retired getTranscriptPath()
|
|
85
|
+
* preferred the hook's transcript_path field, which this watcher has no
|
|
86
|
+
* access to). Cached after first success.
|
|
87
|
+
*/
|
|
88
|
+
private resolveScopedPath;
|
|
89
|
+
/**
|
|
90
|
+
* Unfiltered (--local) mode: discover every session's main transcript
|
|
91
|
+
* across all project dirs, excluding sessions already owned by a live
|
|
92
|
+
* --stdio heartbeat — identical race-avoidance to SubagentWatcher's
|
|
93
|
+
* unfiltered discovery, so the two processes never fight over the same
|
|
94
|
+
* cursor file.
|
|
95
|
+
*/
|
|
96
|
+
private discoverUnfiltered;
|
|
97
|
+
private processFile;
|
|
98
|
+
/**
|
|
99
|
+
* Drop in-memory partial-line state for files no longer discovered this
|
|
100
|
+
* poll (e.g. an aged-out or removed session), bounding partialByPath by the
|
|
101
|
+
* live file set. The persisted cursor is left untouched.
|
|
102
|
+
*/
|
|
103
|
+
private evictStalePartials;
|
|
104
|
+
/**
|
|
105
|
+
* Parse a JSONL line, returning non-null only for a real, non-sidechain
|
|
106
|
+
* assistant turn with a usable model, message id, and usage object.
|
|
107
|
+
*/
|
|
108
|
+
private tryParseLine;
|
|
109
|
+
private cursorPath;
|
|
110
|
+
private readCursor;
|
|
111
|
+
private writeCursor;
|
|
112
|
+
/**
|
|
113
|
+
* Append to the session's own buffer file. Mirrors the path-naming used by
|
|
114
|
+
* `LocalStore`/`SubagentWatcher` so `HookEventProcessor.poll()` picks it up.
|
|
115
|
+
*/
|
|
116
|
+
private appendToParentBuffer;
|
|
117
|
+
private recordError;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Stable cursor file path computation, exported for tests that want to
|
|
121
|
+
* inspect cursor state without instantiating the watcher.
|
|
122
|
+
*/
|
|
123
|
+
export declare function buildParentTranscriptCursorPath(storagePath: string, sessionId: string): string;
|
|
124
|
+
//# sourceMappingURL=parent-transcript-watcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parent-transcript-watcher.d.ts","sourceRoot":"","sources":["../../src/hooks/parent-transcript-watcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAmBH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAqB5D,MAAM,WAAW,8BAA8B;IAC7C,yEAAyE;IACzE,QAAQ,CAAC,WAAW,CAAC,EA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AUZ;;;OAGG;IACH,IAAI,IAAI,IAAI;IAaZ,yFAAyF;IACzF,cAAc,IAAI,6BAA6B;IAa/C,OAAO,CAAC,aAAa;IAQrB;;;;;;;OAOG;IACH,OAAO,CAAC,iBAAiB;IA2BzB;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;IA4C1B,OAAO,CAAC,WAAW;IAsGnB;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAY1B;;;OAGG;IACH,OAAO,CAAC,YAAY;IA6CpB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,WAAW;IAanB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAY5B,OAAO,CAAC,WAAW;CAIpB;AAUD;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE9F"}
|
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parent Transcript Watcher — polls a Claude Code session's own main
|
|
3
|
+
* transcript and emits one `mode: 'token'` line per real assistant turn into
|
|
4
|
+
* that session's hook buffer.
|
|
5
|
+
*
|
|
6
|
+
* Replaces the old hook-triggered scanner in collector-script.ts
|
|
7
|
+
* (`collectTranscriptTokens`/`readLastAssistantUsage`), which only ran when a
|
|
8
|
+
* PreToolUse/PostToolUse hook fired and even then returned only the single
|
|
9
|
+
* most recent assistant-with-usage entry. Any turn producing no tool call
|
|
10
|
+
* never triggered a hook at all, and any turn superseded by another before
|
|
11
|
+
* the next hook fired was silently and permanently dropped. This watcher is
|
|
12
|
+
* independent of tool-call timing entirely — it tails the transcript on its
|
|
13
|
+
* own interval via a durable byte cursor, mirroring `SubagentWatcher`, so
|
|
14
|
+
* every real turn is captured regardless of whether it called a tool.
|
|
15
|
+
*
|
|
16
|
+
* Discovery differs from `SubagentWatcher`: a main transcript lives directly
|
|
17
|
+
* at `<projectsDir>/<projectDir>/<sessionId>.jsonl` (flat file under the
|
|
18
|
+
* project dir), not nested under a `subagents/` subdirectory. In scoped mode
|
|
19
|
+
* (`parentSessionId` set — the `--stdio` case) the resolved path is cached
|
|
20
|
+
* after first discovery, since a session's own transcript path never moves.
|
|
21
|
+
*
|
|
22
|
+
* Cursor durability: byte cursor persisted to
|
|
23
|
+
* `~/.newrelic-preflight/.parent-transcript-pos-<sessionId>` survives
|
|
24
|
+
* restart. On crash mid-emit the next poll re-reads from the previous cursor
|
|
25
|
+
* → potential duplicates, which downstream dedupes by (sessionId, messageId)
|
|
26
|
+
* in `HookEventProcessor.handleTokenEvent()`.
|
|
27
|
+
*/
|
|
28
|
+
import { appendFileSync, closeSync, existsSync, mkdirSync, openSync, readdirSync, readFileSync, readSync, statSync, writeFileSync, } from 'node:fs';
|
|
29
|
+
import { homedir } from 'node:os';
|
|
30
|
+
import { dirname, join, resolve } from 'node:path';
|
|
31
|
+
import { StringDecoder } from 'node:string_decoder';
|
|
32
|
+
import { createLogger } from '../shared/index.js';
|
|
33
|
+
const logger = createLogger('parent-transcript-watcher');
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
// Constants
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
const DEFAULT_POLL_INTERVAL_MS = 2_000;
|
|
38
|
+
const DEFAULT_DISCOVERY_HOURS = 24;
|
|
39
|
+
const MAX_BYTES_PER_POLL = 64 * 1024;
|
|
40
|
+
/** See SubagentWatcher's identical constant for the OOM-bug rationale this guards against. */
|
|
41
|
+
const MAX_PARTIAL_LINE_BYTES = 1024 * 1024; // 1 MiB
|
|
42
|
+
const SESSION_ID_RE = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;
|
|
43
|
+
const PROJECTS_DIR_NAME = '.claude/projects';
|
|
44
|
+
// ---------------------------------------------------------------------------
|
|
45
|
+
// ParentTranscriptWatcher
|
|
46
|
+
// ---------------------------------------------------------------------------
|
|
47
|
+
export class ParentTranscriptWatcher {
|
|
48
|
+
storagePath;
|
|
49
|
+
projectsDir;
|
|
50
|
+
pollIntervalMs;
|
|
51
|
+
discoveryHours;
|
|
52
|
+
parentSessionFilter;
|
|
53
|
+
localStore;
|
|
54
|
+
intervalId = null;
|
|
55
|
+
running = false;
|
|
56
|
+
// Scoped-mode only: a session's transcript path never moves once found, so
|
|
57
|
+
// caching it avoids re-scanning every project dir on every poll for the
|
|
58
|
+
// life of a session (unlike SubagentWatcher, which must rescan every poll
|
|
59
|
+
// since new subagent files can appear at any time).
|
|
60
|
+
cachedScopedPath = null;
|
|
61
|
+
partialByPath = new Map();
|
|
62
|
+
decoderByPath = new Map();
|
|
63
|
+
filesWatched = 0;
|
|
64
|
+
linesRead = 0;
|
|
65
|
+
bytesRead = 0;
|
|
66
|
+
parseErrors = 0;
|
|
67
|
+
constructor(options = {}) {
|
|
68
|
+
this.storagePath = options.storagePath ?? join(homedir(), '.newrelic-preflight');
|
|
69
|
+
this.projectsDir = options.projectsDir ?? join(homedir(), PROJECTS_DIR_NAME);
|
|
70
|
+
this.pollIntervalMs = options.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;
|
|
71
|
+
const envHours = parseInt(process.env.NR_AI_WATCHER_DISCOVERY_HOURS ?? '', 10);
|
|
72
|
+
this.discoveryHours =
|
|
73
|
+
options.discoveryHours ??
|
|
74
|
+
(Number.isFinite(envHours) && envHours > 0 ? envHours : DEFAULT_DISCOVERY_HOURS);
|
|
75
|
+
this.parentSessionFilter = options.parentSessionId ?? null;
|
|
76
|
+
this.localStore = options.localStore;
|
|
77
|
+
}
|
|
78
|
+
start() {
|
|
79
|
+
if (this.running) {
|
|
80
|
+
logger.warn('ParentTranscriptWatcher already running');
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
this.running = true;
|
|
84
|
+
if (!existsSync(this.storagePath)) {
|
|
85
|
+
mkdirSync(this.storagePath, { recursive: true, mode: 0o700 });
|
|
86
|
+
}
|
|
87
|
+
this.intervalId = setInterval(() => this.poll(), this.pollIntervalMs);
|
|
88
|
+
this.intervalId.unref();
|
|
89
|
+
logger.info('ParentTranscriptWatcher started', {
|
|
90
|
+
pollIntervalMs: this.pollIntervalMs,
|
|
91
|
+
discoveryHours: this.discoveryHours,
|
|
92
|
+
projectsDir: this.projectsDir,
|
|
93
|
+
scoped: this.parentSessionFilter !== null,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
stop() {
|
|
97
|
+
if (!this.running)
|
|
98
|
+
return;
|
|
99
|
+
this.running = false;
|
|
100
|
+
if (this.intervalId !== null) {
|
|
101
|
+
clearInterval(this.intervalId);
|
|
102
|
+
this.intervalId = null;
|
|
103
|
+
}
|
|
104
|
+
logger.info('ParentTranscriptWatcher stopped');
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Single poll cycle. Public so tests can drive deterministically without
|
|
108
|
+
* waiting on the interval timer.
|
|
109
|
+
*/
|
|
110
|
+
poll() {
|
|
111
|
+
try {
|
|
112
|
+
const files = this.discoverFiles();
|
|
113
|
+
this.filesWatched = files.length;
|
|
114
|
+
for (const file of files) {
|
|
115
|
+
this.processFile(file.path, file.sessionId);
|
|
116
|
+
}
|
|
117
|
+
this.evictStalePartials(files);
|
|
118
|
+
}
|
|
119
|
+
catch (err) {
|
|
120
|
+
this.recordError(err);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/** Public snapshot of watcher health counters, for tests and future dashboard wiring. */
|
|
124
|
+
getHealthStats() {
|
|
125
|
+
return {
|
|
126
|
+
filesWatched: this.filesWatched,
|
|
127
|
+
linesRead: this.linesRead,
|
|
128
|
+
bytesRead: this.bytesRead,
|
|
129
|
+
parseErrors: this.parseErrors,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
// -------------------------------------------------------------------------
|
|
133
|
+
// Discovery
|
|
134
|
+
// -------------------------------------------------------------------------
|
|
135
|
+
discoverFiles() {
|
|
136
|
+
if (this.parentSessionFilter) {
|
|
137
|
+
const path = this.resolveScopedPath();
|
|
138
|
+
return path ? [{ path, sessionId: this.parentSessionFilter }] : [];
|
|
139
|
+
}
|
|
140
|
+
return this.discoverUnfiltered();
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Scoped mode: locate the one known session's own transcript by scanning
|
|
144
|
+
* every top-level project dir for `<sessionId>.jsonl` — deliberately not
|
|
145
|
+
* derived from cwd, since a cwd-derived dashed dir name breaks under git
|
|
146
|
+
* worktrees (the same reason collector-script.ts's retired getTranscriptPath()
|
|
147
|
+
* preferred the hook's transcript_path field, which this watcher has no
|
|
148
|
+
* access to). Cached after first success.
|
|
149
|
+
*/
|
|
150
|
+
resolveScopedPath() {
|
|
151
|
+
if (this.cachedScopedPath && existsSync(this.cachedScopedPath)) {
|
|
152
|
+
return this.cachedScopedPath;
|
|
153
|
+
}
|
|
154
|
+
const sessionId = this.parentSessionFilter;
|
|
155
|
+
if (!sessionId || !existsSync(this.projectsDir))
|
|
156
|
+
return null;
|
|
157
|
+
let entries;
|
|
158
|
+
try {
|
|
159
|
+
entries = readdirSync(this.projectsDir);
|
|
160
|
+
}
|
|
161
|
+
catch (err) {
|
|
162
|
+
this.recordError(err);
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
165
|
+
for (const project of entries) {
|
|
166
|
+
const candidate = join(this.projectsDir, project, `${sessionId}.jsonl`);
|
|
167
|
+
try {
|
|
168
|
+
if (statSync(candidate).isFile()) {
|
|
169
|
+
this.cachedScopedPath = candidate;
|
|
170
|
+
return candidate;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
/* not in this project dir */
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return null; // not created yet — Claude Code creates it lazily on first message
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Unfiltered (--local) mode: discover every session's main transcript
|
|
181
|
+
* across all project dirs, excluding sessions already owned by a live
|
|
182
|
+
* --stdio heartbeat — identical race-avoidance to SubagentWatcher's
|
|
183
|
+
* unfiltered discovery, so the two processes never fight over the same
|
|
184
|
+
* cursor file.
|
|
185
|
+
*/
|
|
186
|
+
discoverUnfiltered() {
|
|
187
|
+
const out = [];
|
|
188
|
+
if (!existsSync(this.projectsDir))
|
|
189
|
+
return out;
|
|
190
|
+
const cutoffMs = Date.now() - this.discoveryHours * 60 * 60 * 1000;
|
|
191
|
+
const liveOwnedSessionIds = this.localStore?.getActiveSessionIdsFromHeartbeats() ?? null;
|
|
192
|
+
let projectEntries;
|
|
193
|
+
try {
|
|
194
|
+
projectEntries = readdirSync(this.projectsDir);
|
|
195
|
+
}
|
|
196
|
+
catch (err) {
|
|
197
|
+
this.recordError(err);
|
|
198
|
+
return out;
|
|
199
|
+
}
|
|
200
|
+
for (const project of projectEntries) {
|
|
201
|
+
const projectPath = join(this.projectsDir, project);
|
|
202
|
+
let entries;
|
|
203
|
+
try {
|
|
204
|
+
entries = readdirSync(projectPath);
|
|
205
|
+
}
|
|
206
|
+
catch {
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
for (const name of entries) {
|
|
210
|
+
if (!name.endsWith('.jsonl'))
|
|
211
|
+
continue;
|
|
212
|
+
const sessionId = name.slice(0, -'.jsonl'.length);
|
|
213
|
+
if (!SESSION_ID_RE.test(sessionId))
|
|
214
|
+
continue;
|
|
215
|
+
if (liveOwnedSessionIds?.has(sessionId))
|
|
216
|
+
continue;
|
|
217
|
+
const path = join(projectPath, name);
|
|
218
|
+
let st;
|
|
219
|
+
try {
|
|
220
|
+
st = statSync(path);
|
|
221
|
+
}
|
|
222
|
+
catch {
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
if (!st.isFile() || st.mtimeMs < cutoffMs)
|
|
226
|
+
continue;
|
|
227
|
+
out.push({ path, sessionId });
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return out;
|
|
231
|
+
}
|
|
232
|
+
// -------------------------------------------------------------------------
|
|
233
|
+
// Per-file processing
|
|
234
|
+
// -------------------------------------------------------------------------
|
|
235
|
+
processFile(path, sessionId) {
|
|
236
|
+
let size;
|
|
237
|
+
try {
|
|
238
|
+
size = statSync(path).size;
|
|
239
|
+
}
|
|
240
|
+
catch (err) {
|
|
241
|
+
this.recordError(err);
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
const cursorPath = this.cursorPath(sessionId);
|
|
245
|
+
const startCursor = this.readCursor(cursorPath);
|
|
246
|
+
if (startCursor.bytePos >= size)
|
|
247
|
+
return;
|
|
248
|
+
const remaining = size - startCursor.bytePos;
|
|
249
|
+
const toRead = Math.min(remaining, MAX_BYTES_PER_POLL);
|
|
250
|
+
let buf;
|
|
251
|
+
let actuallyRead = 0;
|
|
252
|
+
let fd = null;
|
|
253
|
+
try {
|
|
254
|
+
fd = openSync(path, 'r');
|
|
255
|
+
buf = Buffer.allocUnsafe(toRead);
|
|
256
|
+
actuallyRead = readSync(fd, buf, 0, toRead, startCursor.bytePos);
|
|
257
|
+
}
|
|
258
|
+
catch (err) {
|
|
259
|
+
this.recordError(err);
|
|
260
|
+
if (fd !== null) {
|
|
261
|
+
try {
|
|
262
|
+
closeSync(fd);
|
|
263
|
+
}
|
|
264
|
+
catch {
|
|
265
|
+
/* ignore */
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
finally {
|
|
271
|
+
if (fd !== null) {
|
|
272
|
+
try {
|
|
273
|
+
closeSync(fd);
|
|
274
|
+
}
|
|
275
|
+
catch {
|
|
276
|
+
/* ignore */
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
if (actuallyRead === 0)
|
|
281
|
+
return;
|
|
282
|
+
let decoder = this.decoderByPath.get(path);
|
|
283
|
+
if (decoder === undefined) {
|
|
284
|
+
decoder = new StringDecoder('utf-8');
|
|
285
|
+
this.decoderByPath.set(path, decoder);
|
|
286
|
+
}
|
|
287
|
+
const chunk = decoder.write(buf.subarray(0, actuallyRead));
|
|
288
|
+
this.bytesRead += actuallyRead;
|
|
289
|
+
const carried = this.partialByPath.get(path) ?? startCursor.partialLine;
|
|
290
|
+
const combined = carried + chunk;
|
|
291
|
+
// The byte cursor ALWAYS advances by the bytes just read — see
|
|
292
|
+
// SubagentWatcher.processFile()'s identical comment for the OOM bug this
|
|
293
|
+
// invariant fixes (advancing only to the last newline can freeze the
|
|
294
|
+
// cursor forever on an oversized line).
|
|
295
|
+
const nextBytePos = startCursor.bytePos + actuallyRead;
|
|
296
|
+
const lastNewline = combined.lastIndexOf('\n');
|
|
297
|
+
let lines = [];
|
|
298
|
+
let newPartial = combined;
|
|
299
|
+
if (lastNewline >= 0) {
|
|
300
|
+
lines = combined.slice(0, lastNewline).split('\n');
|
|
301
|
+
newPartial = combined.slice(lastNewline + 1);
|
|
302
|
+
}
|
|
303
|
+
if (newPartial.length > MAX_PARTIAL_LINE_BYTES) {
|
|
304
|
+
newPartial = '';
|
|
305
|
+
this.parseErrors += 1;
|
|
306
|
+
}
|
|
307
|
+
for (const line of lines) {
|
|
308
|
+
if (!line)
|
|
309
|
+
continue;
|
|
310
|
+
this.linesRead += 1;
|
|
311
|
+
const parsed = this.tryParseLine(line);
|
|
312
|
+
if (parsed === null)
|
|
313
|
+
continue;
|
|
314
|
+
const event = {
|
|
315
|
+
mode: 'token',
|
|
316
|
+
tool: 'transcript',
|
|
317
|
+
timestamp: parsed.timestampMs,
|
|
318
|
+
sessionId,
|
|
319
|
+
messageId: parsed.messageId,
|
|
320
|
+
model: parsed.model,
|
|
321
|
+
inputTokens: parsed.inputTokens,
|
|
322
|
+
outputTokens: parsed.outputTokens,
|
|
323
|
+
cacheReadTokens: parsed.cacheReadTokens,
|
|
324
|
+
cacheCreationTokens: parsed.cacheCreationTokens,
|
|
325
|
+
};
|
|
326
|
+
this.appendToParentBuffer(sessionId, event);
|
|
327
|
+
}
|
|
328
|
+
this.writeCursor(cursorPath, nextBytePos, newPartial);
|
|
329
|
+
if (newPartial.length > 0) {
|
|
330
|
+
this.partialByPath.set(path, newPartial);
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
this.partialByPath.delete(path);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Drop in-memory partial-line state for files no longer discovered this
|
|
338
|
+
* poll (e.g. an aged-out or removed session), bounding partialByPath by the
|
|
339
|
+
* live file set. The persisted cursor is left untouched.
|
|
340
|
+
*/
|
|
341
|
+
evictStalePartials(files) {
|
|
342
|
+
if (this.partialByPath.size === 0 && this.decoderByPath.size === 0)
|
|
343
|
+
return;
|
|
344
|
+
const live = new Set();
|
|
345
|
+
for (const f of files)
|
|
346
|
+
live.add(f.path);
|
|
347
|
+
for (const path of this.partialByPath.keys()) {
|
|
348
|
+
if (!live.has(path))
|
|
349
|
+
this.partialByPath.delete(path);
|
|
350
|
+
}
|
|
351
|
+
for (const path of this.decoderByPath.keys()) {
|
|
352
|
+
if (!live.has(path))
|
|
353
|
+
this.decoderByPath.delete(path);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Parse a JSONL line, returning non-null only for a real, non-sidechain
|
|
358
|
+
* assistant turn with a usable model, message id, and usage object.
|
|
359
|
+
*/
|
|
360
|
+
tryParseLine(line) {
|
|
361
|
+
let parsed;
|
|
362
|
+
try {
|
|
363
|
+
parsed = JSON.parse(line);
|
|
364
|
+
}
|
|
365
|
+
catch {
|
|
366
|
+
this.parseErrors += 1;
|
|
367
|
+
return null;
|
|
368
|
+
}
|
|
369
|
+
if (!parsed || typeof parsed !== 'object')
|
|
370
|
+
return null;
|
|
371
|
+
const obj = parsed;
|
|
372
|
+
if (obj.type !== 'assistant')
|
|
373
|
+
return null;
|
|
374
|
+
// Subagent turns are inlined into the main transcript too — skip them so
|
|
375
|
+
// they're never double-attributed as parent-session cost. Mirrors
|
|
376
|
+
// TranscriptMessageTracker.isRealAssistantEntry()'s identical check.
|
|
377
|
+
if (obj.isSidechain === true)
|
|
378
|
+
return null;
|
|
379
|
+
const message = obj.message;
|
|
380
|
+
if (!message || typeof message !== 'object')
|
|
381
|
+
return null;
|
|
382
|
+
const m = message;
|
|
383
|
+
const model = typeof m.model === 'string' ? m.model : null;
|
|
384
|
+
if (!model || model === '<synthetic>')
|
|
385
|
+
return null;
|
|
386
|
+
const messageId = typeof m.id === 'string' ? m.id : null;
|
|
387
|
+
if (!messageId)
|
|
388
|
+
return null;
|
|
389
|
+
const usage = m.usage;
|
|
390
|
+
if (!usage || typeof usage !== 'object')
|
|
391
|
+
return null;
|
|
392
|
+
const u = usage;
|
|
393
|
+
const tsRaw = typeof obj.timestamp === 'string' ? obj.timestamp : null;
|
|
394
|
+
const timestampMs = tsRaw ? Date.parse(tsRaw) : Date.now();
|
|
395
|
+
if (!Number.isFinite(timestampMs))
|
|
396
|
+
return null;
|
|
397
|
+
return {
|
|
398
|
+
timestampMs,
|
|
399
|
+
messageId,
|
|
400
|
+
model,
|
|
401
|
+
inputTokens: num(u.input_tokens),
|
|
402
|
+
outputTokens: num(u.output_tokens),
|
|
403
|
+
cacheReadTokens: num(u.cache_read_input_tokens),
|
|
404
|
+
cacheCreationTokens: num(u.cache_creation_input_tokens),
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
// -------------------------------------------------------------------------
|
|
408
|
+
// Buffer + cursor I/O
|
|
409
|
+
// -------------------------------------------------------------------------
|
|
410
|
+
cursorPath(sessionId) {
|
|
411
|
+
return join(this.storagePath, `.parent-transcript-pos-${sessionId}`);
|
|
412
|
+
}
|
|
413
|
+
readCursor(cursorPath) {
|
|
414
|
+
if (!existsSync(cursorPath))
|
|
415
|
+
return { bytePos: 0, partialLine: '' };
|
|
416
|
+
try {
|
|
417
|
+
const raw = readFileSync(cursorPath, 'utf-8').trim();
|
|
418
|
+
const parsed = JSON.parse(raw);
|
|
419
|
+
const bytePos = typeof parsed.bytePos === 'number' && parsed.bytePos >= 0 ? parsed.bytePos : 0;
|
|
420
|
+
const partialLine = typeof parsed.partialLine === 'string' ? parsed.partialLine : '';
|
|
421
|
+
return { bytePos, partialLine };
|
|
422
|
+
}
|
|
423
|
+
catch {
|
|
424
|
+
return { bytePos: 0, partialLine: '' };
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
writeCursor(cursorPath, bytePos, partialLine) {
|
|
428
|
+
try {
|
|
429
|
+
if (!existsSync(this.storagePath)) {
|
|
430
|
+
mkdirSync(this.storagePath, { recursive: true, mode: 0o700 });
|
|
431
|
+
}
|
|
432
|
+
const dir = dirname(cursorPath);
|
|
433
|
+
if (!existsSync(dir))
|
|
434
|
+
mkdirSync(dir, { recursive: true, mode: 0o700 });
|
|
435
|
+
writeFileSync(cursorPath, JSON.stringify({ bytePos, partialLine }), { mode: 0o600 });
|
|
436
|
+
}
|
|
437
|
+
catch (err) {
|
|
438
|
+
this.recordError(err);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Append to the session's own buffer file. Mirrors the path-naming used by
|
|
443
|
+
* `LocalStore`/`SubagentWatcher` so `HookEventProcessor.poll()` picks it up.
|
|
444
|
+
*/
|
|
445
|
+
appendToParentBuffer(sessionId, event) {
|
|
446
|
+
const path = join(this.storagePath, `buffer-${sessionId}.jsonl`);
|
|
447
|
+
try {
|
|
448
|
+
if (!existsSync(this.storagePath)) {
|
|
449
|
+
mkdirSync(this.storagePath, { recursive: true, mode: 0o700 });
|
|
450
|
+
}
|
|
451
|
+
appendFileSync(path, JSON.stringify(event) + '\n', { mode: 0o600 });
|
|
452
|
+
}
|
|
453
|
+
catch (err) {
|
|
454
|
+
this.recordError(err);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
recordError(err) {
|
|
458
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
459
|
+
logger.warn('ParentTranscriptWatcher error', { message: message.slice(0, 200) });
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
// ---------------------------------------------------------------------------
|
|
463
|
+
// Helpers
|
|
464
|
+
// ---------------------------------------------------------------------------
|
|
465
|
+
function num(v) {
|
|
466
|
+
return typeof v === 'number' && Number.isFinite(v) && v >= 0 ? v : 0;
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Stable cursor file path computation, exported for tests that want to
|
|
470
|
+
* inspect cursor state without instantiating the watcher.
|
|
471
|
+
*/
|
|
472
|
+
export function buildParentTranscriptCursorPath(storagePath, sessionId) {
|
|
473
|
+
return resolve(storagePath, `.parent-transcript-pos-${sessionId}`);
|
|
474
|
+
}
|
|
475
|
+
//# sourceMappingURL=parent-transcript-watcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parent-transcript-watcher.js","sourceRoot":"","sources":["../../src/hooks/parent-transcript-watcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EACL,cAAc,EACd,SAAS,EACT,UAAU,EACV,SAAS,EACT,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD,MAAM,MAAM,GAAG,YAAY,CAAC,2BAA2B,CAAC,CAAC;AAEzD,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,wBAAwB,GAAG,KAAK,CAAC;AACvC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,kBAAkB,GAAG,EAAE,GAAG,IAAI,CAAC;AACrC,8FAA8F;AAC9F,MAAM,sBAAsB,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,QAAQ;AACpD,M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O,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;IACnF,CAAC;CACF;AAED,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,SAAS,GAAG,CAAC,CAAU;IACrB,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,+BAA+B,CAAC,WAAmB,EAAE,SAAiB;IACpF,OAAO,OAAO,CAAC,WAAW,EAAE,0BAA0B,SAAS,EAAE,CAAC,CAAC;AACrE,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,eAAe,CAAC;AAMvB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAKvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAuChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,eAAe,CAAC;AAMvB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAKvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAuChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAczE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAI3D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