@newrelic/preflight 1.67.1 → 1.67.2

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.
@@ -3,6 +3,15 @@ export interface TranscriptMessageMetrics {
3
3
  readonly assistantMessages: number;
4
4
  readonly userCorrections: number;
5
5
  }
6
+ /**
7
+ * What the assistant did between the last user entry that ended its turn (`endsAssistantTurn`) and
8
+ * the next real user message: `acted` when it called a tool that changes something
9
+ * (`isMutatingToolUse`), `talked` when its entries called none, and `unknown` when no assistant
10
+ * entry came between them (the first message, or two user messages in a row). It is also `unknown`
11
+ * until the transcript has shown a tool call at all, since a format that doesn't record tool calls
12
+ * makes a turn that acted look like one that talked.
13
+ */
14
+ export type AssistantTurnState = 'acted' | 'talked' | 'unknown';
6
15
  export declare class TranscriptMessageTracker {
7
16
  private transcriptPath;
8
17
  private offset;
@@ -10,11 +19,16 @@ export declare class TranscriptMessageTracker {
10
19
  private userMessages;
11
20
  private assistantMessages;
12
21
  private userCorrections;
22
+ /** What the assistant's entries did since the last user entry that ended its turn. */
23
+ private assistantSinceUser;
24
+ /** Whether the transcript has shown a tool call yet, so a turn without one can be read as talking. */
25
+ private seenToolUse;
13
26
  /** Cheap; captures the first non-empty path seen and ignores later calls. No I/O. */
14
27
  observeTranscriptPath(path: string | undefined): void;
15
28
  /** Incrementally reads and classifies any transcript growth since the last call. */
16
29
  refresh(): void;
17
30
  private processLine;
31
+ private turnState;
18
32
  getMetrics(): TranscriptMessageMetrics;
19
33
  reset(): void;
20
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"transcript-message-tracker.d.ts","sourceRoot":"","sources":["../../src/metrics/transcript-message-tracker.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAoH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;IAMjB,UAAU,IAAI,wBAAwB;IAQtC,KAAK,IAAI,IAAI;CAUd"}
@@ -1,5 +1,6 @@
1
1
  import { openSync, closeSync, readSync, statSync, constants as fsConstants } from 'node:fs';
2
2
  import { isRealAssistantTurn } from '../lib/subagent-transcript-parser.js';
3
+ import { splitShellChain } from './git-event-classifier.js';
3
4
  // ---------------------------------------------------------------------------
4
5
  // Classification
5
6
  // ---------------------------------------------------------------------------
@@ -33,14 +34,419 @@ const UNDO_TRAILING_ADVERBS = 'again|now|already|please|instead';
33
34
  /** Undo verbs only count as a correction when they target the assistant's own action as a standalone object ("undo that", "don't do that", "undo it now") — a pronoun followed by any other word is modifying that noun ("revert that commit", "don't push to that branch"), not standing in for the assistant's prior action. */
34
35
  const TARGETED_UNDO_RE = new RegExp(`^(stop|undo|revert|don'?t)\\b[^.!?]{0,20}\\b(that|it|this)\\b(?!\\s+(?!(?:${UNDO_TRAILING_ADVERBS})\\b)\\S)`, 'i');
35
36
  /** Correction phrasing that doesn't require a trigger word at the start of the message. */
36
- const EMBEDDED_CORRECTION_RE = /\b(won'?t work|you (missed|forgot|broke)|that'?s (not (right|correct|what)|wrong|incorrect)|not what (i|you)'?d? (meant|asked|wanted|said)|this is the (\d+|second|third|fourth|fifth|\w+th) time)\b/i;
37
- function isCorrectionMessage(text) {
37
+ const EMBEDDED_CORRECTION_RE = /\b(you (missed|forgot|broke)|that'?s (not (right|correct|what)|wrong|incorrect)|not what (i|you)'?d? (meant|asked|wanted|said)|this is the (\d+|second|third|fourth|fifth|\w+th) time)\b/i;
38
+ /** "won't work", with or without the apostrophe. Text is read after `normalizeApostrophes`. */
39
+ const WONT_WORK_RE = /\bwon'?t work\b/i;
40
+ /** Interjections and conjunctions that can lead a verdict without being its subject ("Yeah that won't work", "But it won't work", "Hmm, no, won't work", "Now it won't work"). */
41
+ const LEADING_FILLER = 'yeah|yep|yes|ok|okay|hm+|um+|uh+|ah|oh|well|so|but|and|nah|no|nope|sorry|ugh|now|wait';
42
+ /** Punctuation that can close a leading word ("Agreed,", "Huh?", "Argh:"). */
43
+ const LEADING_PUNCTUATION = '[,.!?:]';
44
+ /** A leading word: a filler with or without punctuation after it, or any other word with punctuation after it ("Agreed, ..."). The lookahead keeps the two alternatives disjoint, so the quantified group can't backtrack between them. */
45
+ const LEADING_WORD = `(?:(?:${LEADING_FILLER})\\b${LEADING_PUNCTUATION}*|(?!(?:${LEADING_FILLER})\\b)[a-z]+${LEADING_PUNCTUATION}+)\\s+`;
46
+ /** "I tried it and ...", "Tried it, ..." or "I just tried it. ..." reports that the assistant's output, which the pronoun stands in for, fails now. */
47
+ const TRIED_IT = '(?:i )?(?:just )?(?:tried|ran|tested) (?:it|that|this)(?:,?\\s+(?:and|but)|[,.])\\s+';
48
+ /**
49
+ * Things the assistant builds, singular or plural. "your proposal", "your solution", "your approach"
50
+ * and "your idea" can name a plan, which is design discussion, so they are left out. After a turn
51
+ * that acted, "your solution" and "your approach" count anyway, since the rule there doesn't need a
52
+ * reference, but "your proposal" and "your idea" don't: `IDEA_REFERENCE_RE` excuses them.
53
+ */
54
+ const ASSISTANT_ARTIFACT = '(?:fix|patch)(?:es)?|quer(?:y|ies)|(?:change|edit|code|version|implementation|update|commit|refactor|migration|test|script|function)s?';
55
+ /** A message that opens on "won't work" with a bare pronoun, a pronoun and something built, or no subject at all ("That won't work", "That fix won't work", "Hmm that definitely won't work, ...", "Nah, won't work —", "I tried it and it won't work"), after up to two leading words, names nothing of its own, so it points at the assistant's previous turn. */
56
+ const DEICTIC_WONT_WORK_RE = new RegExp(`^(?:${LEADING_WORD}){0,2}(?:${TRIED_IT})?${OPTIONAL_ACTUALLY}(?:(?:(?:that|this|these|those)(?: (?:${ASSISTANT_ARTIFACT}))?|it) (?:(?:still|just|also|even|[a-z]+ly) ){0,2})?won'?t work\\b`, 'i');
57
+ /** Words that make what follows hypothetical ("if you added a cache", "suppose we shard", "assuming you cached it"). */
58
+ const HYPOTHETICAL = 'if|unless|suppose|supposing|assuming|imagine';
59
+ /**
60
+ * A "you" that isn't about the assistant's output: a hypothetical one, an inverted question ("have you
61
+ * tried Redis?"), or one after a remark ("the point you made", but not "at this point you've broken
62
+ * it"). A causal "since you" or a past "when you" is left out: "since you removed the check" and
63
+ * "when you renamed the env var" are about it.
64
+ */
65
+ const NOT_ABOUT_OUTPUT_BEFORE_YOU = `(?<!\\b(?:${HYPOTHETICAL}|have|had|(?:argument|suggestion|proposal|plan|idea)s?|(?<!\\b(?:this|that) )points?) )`;
66
+ const ADVERB_AFTER_YOU = '(?:just|already|also|accidentally|only|then|now|still|again|clearly|probably|actually|never|always|not) ';
67
+ /** Stems of verbs that say where an idea came from ("the cache you suggested", "as you explained", "the approach you floated"). */
68
+ const IDEA_SOURCE_VERB = '(?:(?:suggest|propos|mention|recommend|describ|outlin|offer|explain|warn|note|float|pitch)\\w*|point(?:s|ed|ing)? out)\\b';
69
+ /** Stems of verbs that report what the assistant said, thought or planned rather than what it built ("you suggested", "you're proposing", "the way you're thinking", "you're going to need"). Rejecting those is design discussion. */
70
+ const IDEA_VERB = `(?:${IDEA_SOURCE_VERB}|(?:ask|think|plan|consider|imagin|list|want|expect|say|talk|mean|agree)\\w*\\b|going\\b)`;
71
+ /** A past tense or participle. "-eed" words ("you need", "you proceed") are present tense, so the letter before "ed" can't be "e". */
72
+ const PAST_VERB = '[a-z]*[a-df-z]ed|wrote|written|rewrote|rewritten|made|did|done|undid|undone|broke|broken|ran|put|set|cast|left|built|kept|sent|split|gave|given|took|taken|forgot|forgotten|hid|hidden';
73
+ const YOUR_ARTIFACT = `\\byour (?:last |latest |previous |recent |new )?(?:${ASSISTANT_ARTIFACT})\\b`;
74
+ const YOU_PAST = `\\b${NOT_ABOUT_OUTPUT_BEFORE_YOU}you(?:'ve| have)? (?:${ADVERB_AFTER_YOU})?(?!${IDEA_VERB})(?:${PAST_VERB})\\b`;
75
+ const YOU_PROGRESSIVE = `\\b${NOT_ABOUT_OUTPUT_BEFORE_YOU}you(?:'re| are) (?:${ADVERB_AFTER_YOU})?(?!${IDEA_VERB})[a-z]+ing\\b`;
76
+ const STILL_WONT_WORK = `\\bstill won'?t work\\b`;
77
+ /**
78
+ * A reference back to something the assistant built: "your" plus a built artifact, second person plus
79
+ * a past verb ("you wrote", "you've added"), or a repeat failure ("still won't work"). A present-tense
80
+ * or modal "you" ("you need a lock", "you can't hold connections") is as often impersonal, so it
81
+ * doesn't count.
82
+ */
83
+ const BUILT_REFERENCE_RE = new RegExp([YOUR_ARTIFACT, YOU_PAST, STILL_WONT_WORK].join('|'), 'i');
84
+ /** A built reference, or a present progressive that describes the output as it stands ("you're mutating state"). */
85
+ const ASSISTANT_REFERENCE_RE = new RegExp([YOUR_ARTIFACT, YOU_PAST, YOU_PROGRESSIVE, STILL_WONT_WORK].join('|'), 'i');
86
+ /**
87
+ * A "you" that names where an idea came from, a determiner plus a word for one ("that idea", "the
88
+ * proposal"), or "your plan". "the plan" and "this option" are left out: a Terraform plan and a CLI
89
+ * option are things the assistant builds.
90
+ */
91
+ const IDEA_REFERENCE_RE = new RegExp([
92
+ `\\byou(?:'ve| have|'re| are)? (?:${ADVERB_AFTER_YOU})?${IDEA_SOURCE_VERB}`,
93
+ `\\b(?:your|the|that|this|these|those) (?:idea|proposal|suggestion|recommendation)s?\\b`,
94
+ `\\byour plans?\\b`,
95
+ ].join('|'), 'i');
96
+ /**
97
+ * A hypothetical about "you" or "we" ("if you added a cache", "if we do it that way"). Tested only on
98
+ * the text before "won't work": one after it ("that won't work if we deploy to Windows") says when
99
+ * the output fails. One whose verb takes "it", after up to one adverb ("if you just run it on
100
+ * Windows, it won't work"), says that too, so it doesn't match, except with "do": "do it" stands in
101
+ * for an option.
102
+ */
103
+ const HYPOTHETICAL_OPTION_RE = new RegExp(`\\b(?:${HYPOTHETICAL}) (?:you|we)\\b(?! (?:${ADVERB_AFTER_YOU})?(?!(?:do|does|did)\\b)[a-z]+ it\\b)`, 'i');
104
+ /** Up to one leading interjection or conjunction, with any punctuation after it. */
105
+ const OPTIONAL_LEADING_FILLER = `(?:(?:${LEADING_FILLER})\\b${LEADING_PUNCTUATION}*\\s+)?`;
106
+ /** Agreeing with the assistant ("You're right that a cache won't work", "Agreed, that won't work") repeats its own caveat back to it. */
107
+ const AGREEMENT_RE = new RegExp(`^${OPTIONAL_LEADING_FILLER}(?:(?:you'?re|you are) (?:totally |absolutely |completely )?right|agreed|i agree|good (?:point|call)|fair (?:point|enough)|true)\\b`, 'i');
108
+ /**
109
+ * A contrast, which turns away from an agreement before it. "but", "however" and "although" count
110
+ * wherever they fall ("Good call on the logging but the migration ..."). "though" counts when a word
111
+ * follows it ("Good point, though the migration ..."): one that closes a clause ("You're right
112
+ * though, that won't work") concedes the point. "still", "yet" and "that said" count where they open
113
+ * the text or follow a comma, semicolon, colon or dash, since inside a clause the first two are
114
+ * adverbs that keep agreeing ("we still need fresh reads", "we haven't shipped yet").
115
+ */
116
+ const CONTRAST_RE = new RegExp([
117
+ '\\b(?:but|however|although)\\b',
118
+ '\\bthough(?=\\s+[a-z])',
119
+ `(?:^|[,;:\u2013\u2014])\\s*${OPTIONAL_LEADING_FILLER}(?:still|yet|that said)\\b`,
120
+ ].join('|'), 'i');
121
+ /** Whitespace after sentence-ending punctuation, or a newline. The lookbehind keeps the split linear: a quantified punctuation run followed by a required character backtracks quadratically on a long run of dots. */
122
+ const SENTENCE_SPLIT_RE = /(?<=[.!?])\s+|\n\s*/;
123
+ /** Runs `test` on each sentence that uses "won't work", with the sentences either side of it. */
124
+ function someWontWorkSentence(text, test) {
125
+ const sentences = text.split(SENTENCE_SPLIT_RE);
126
+ return sentences.some((sentence, i) => WONT_WORK_RE.test(sentence) && test(sentence, sentences[i - 1] ?? '', sentences[i + 1] ?? ''));
127
+ }
128
+ /** Whether the sentence, or one either side of it, points back at something built (`BUILT_REFERENCE_RE`). */
129
+ function nearBuiltReference(...nearby) {
130
+ return nearby.some((s) => BUILT_REFERENCE_RE.test(s));
131
+ }
132
+ /** Whether the sentence, or one either side of it, points back at the assistant's output (`ASSISTANT_REFERENCE_RE`). */
133
+ function nearAssistantReference(...nearby) {
134
+ return nearby.some((s) => ASSISTANT_REFERENCE_RE.test(s));
135
+ }
136
+ /**
137
+ * Whether a "won't work" sentence agrees with the assistant: it opens on agreement, or follows a
138
+ * sentence that does, and the text from the agreement to "won't work" holds no contrast
139
+ * (`CONTRAST_RE`). That text runs across the sentence break, which ends the clause before it: "Good
140
+ * call on the logging, but the migration is the problem. It won't work" turns away, as it does with a
141
+ * colon for the period. "You're right that a cache won't work here" agrees.
142
+ */
143
+ function agreesWithAssistant(sentence, before, lead) {
144
+ const opening = AGREEMENT_RE.exec(sentence);
145
+ if (opening !== null)
146
+ return !CONTRAST_RE.test(lead.slice(opening[0].length));
147
+ const previous = AGREEMENT_RE.exec(before);
148
+ if (previous === null)
149
+ return false;
150
+ return !CONTRAST_RE.test(before.slice(previous[0].length)) && !CONTRAST_RE.test(lead);
151
+ }
152
+ /**
153
+ * After a turn that changed something, "won't work" rejects what it changed. It counts whenever the
154
+ * sentence, or one either side, points back at the assistant's output (`nearAssistantReference`),
155
+ * a present progressive included, since after a change "you're mutating state" describes it.
156
+ * Otherwise it counts unless the sentence frames an option as hypothetical, agrees with the
157
+ * assistant (`agreesWithAssistant`), or names an idea the assistant proposed rather than built.
158
+ */
159
+ function rejectsActionOutput(sentence, before, after) {
160
+ if (nearAssistantReference(sentence, before, after))
161
+ return true;
162
+ const lead = sentence.slice(0, sentence.search(WONT_WORK_RE));
163
+ return (!HYPOTHETICAL_OPTION_RE.test(lead) &&
164
+ !agreesWithAssistant(sentence, before, lead) &&
165
+ !IDEA_REFERENCE_RE.test(sentence));
166
+ }
167
+ /**
168
+ * Whether "won't work" in `text` rejects something the assistant built or did, given its previous turn.
169
+ *
170
+ * - `acted`: it rejects what the turn changed (`rejectsActionOutput`). It counts wherever `talked`
171
+ * does, wherever `unknown` does through a reference, and in most other sentences too.
172
+ * - `talked`: the turn only answered or proposed, so "won't work" rejects an option or states a
173
+ * constraint unless the sentence, or one either side, points back at something built earlier
174
+ * ("the migration you wrote still won't work"). A present progressive doesn't count here: after a
175
+ * proposal, "you're assuming a sorted list" describes the proposal as often as the code.
176
+ * - `unknown`: the text decides alone. The message counts when it opens on "won't work" with a bare
177
+ * pronoun or no subject, or when a "won't work" sentence, or one either side, points back at the
178
+ * assistant's output.
179
+ */
180
+ function hasWontWorkCorrection(text, state) {
181
+ if (!WONT_WORK_RE.test(text))
182
+ return false;
183
+ switch (state) {
184
+ case 'acted':
185
+ return someWontWorkSentence(text, rejectsActionOutput);
186
+ case 'talked':
187
+ return someWontWorkSentence(text, nearBuiltReference);
188
+ case 'unknown':
189
+ return DEICTIC_WONT_WORK_RE.test(text) || someWontWorkSentence(text, nearAssistantReference);
190
+ }
191
+ }
192
+ /** A curly apostrophe (U+2019), as macOS and phone keyboards type it, reads like a straight one in every pattern above. */
193
+ function normalizeApostrophes(text) {
194
+ return text.replace(/\u2019/g, "'");
195
+ }
196
+ function isCorrectionMessage(rawText, state) {
197
+ const text = normalizeApostrophes(rawText);
38
198
  return (LEADING_NO_RE.test(text) ||
39
199
  BARE_REJECTION_RE.test(text) ||
40
200
  EXPLICIT_REJECTION_RE.test(text) ||
41
201
  LEADING_INTERJECTION_RE.test(text) ||
42
202
  TARGETED_UNDO_RE.test(text) ||
43
- EMBEDDED_CORRECTION_RE.test(text));
203
+ EMBEDDED_CORRECTION_RE.test(text) ||
204
+ hasWontWorkCorrection(text, state));
205
+ }
206
+ /**
207
+ * Built-in tools that only look something up, track the plan or ask the user something. Any other
208
+ * built-in tool reads as the assistant doing something (`isMutatingToolUse`), so a tool missing here
209
+ * leaves a correction after it counted rather than dropped.
210
+ */
211
+ const TALKING_TOOLS = new Set([
212
+ // Look something up.
213
+ 'Read',
214
+ 'Grep',
215
+ 'Glob',
216
+ 'LS',
217
+ 'NotebookRead',
218
+ 'WebFetch',
219
+ 'WebSearch',
220
+ 'ToolSearch',
221
+ 'ListMcpResourcesTool',
222
+ 'ReadMcpResourceTool',
223
+ 'BashOutput',
224
+ 'TaskOutput',
225
+ 'ListAgents',
226
+ // Track the plan.
227
+ 'TodoWrite',
228
+ 'TodoRead',
229
+ 'TaskCreate',
230
+ 'TaskUpdate',
231
+ 'TaskList',
232
+ 'TaskGet',
233
+ // Ask the user, or enter or leave plan mode.
234
+ 'AskUserQuestion',
235
+ 'EnterPlanMode',
236
+ 'ExitPlanMode',
237
+ ]);
238
+ /** Commands that only read, apart from the arguments in `WRITING_ARGS`. */
239
+ const READ_ONLY_COMMANDS = new Set([
240
+ 'ls',
241
+ 'cat',
242
+ 'head',
243
+ 'tail',
244
+ 'wc',
245
+ 'pwd',
246
+ 'grep',
247
+ 'rg',
248
+ 'find',
249
+ ]);
250
+ /** The `find` actions that delete, run a command or write a file, and `rg --pre`, which runs one. */
251
+ const WRITING_ARGS = new Map([
252
+ ['find', /(?:^|[\s"'=])-(?:delete|exec|ok|fprint|fls)/],
253
+ ['rg', /(?:^|[\s"'=])--pre\b/],
254
+ ]);
255
+ /** git subcommands that only read, unless given `--output`, which writes a file. */
256
+ const GIT_READ_SUBCOMMANDS = new Set(['status', 'log', 'diff', 'show']);
257
+ /** Arguments that keep `git branch` listing branches. Any other creates, renames or deletes one. */
258
+ const GIT_BRANCH_LIST_ARGS = new Set([
259
+ '-a',
260
+ '-r',
261
+ '-v',
262
+ '-vv',
263
+ '--all',
264
+ '--remotes',
265
+ '--verbose',
266
+ '--list',
267
+ '--show-current',
268
+ ]);
269
+ /** A redirection, a process or command substitution, or a heredoc, anywhere in the command, quoted or not. */
270
+ const REDIRECT_OR_SUBSTITUTION_RE = /[<>`]|\$\(/;
271
+ /** Whether a git command's arguments, after `git`, only read. `--no-pager` and `-C <dir>` may lead. */
272
+ function gitOnlyReads(args) {
273
+ let i = 0;
274
+ while (args[i] === '--no-pager' || args[i] === '-C')
275
+ i += args[i] === '-C' ? 2 : 1;
276
+ const [subcommand = '', ...rest] = args.slice(i);
277
+ if (subcommand === 'branch')
278
+ return rest.every((arg) => GIT_BRANCH_LIST_ARGS.has(arg));
279
+ return GIT_READ_SUBCOMMANDS.has(subcommand) && !rest.some((arg) => arg.startsWith('--output'));
280
+ }
281
+ /** Whether one command of a shell chain only reads. A quoted or prefixed command name isn't recognised. */
282
+ function commandOnlyReads(command) {
283
+ const [name = '', ...args] = command.split(/\s+/);
284
+ if (name === 'git')
285
+ return gitOnlyReads(args);
286
+ return READ_ONLY_COMMANDS.has(name) && WRITING_ARGS.get(name)?.test(command) !== true;
287
+ }
288
+ /**
289
+ * Whether a Bash `command` only reads: every command in the chain is in `READ_ONLY_COMMANDS` or is
290
+ * a reading git command, with no redirection or substitution anywhere. Anything this can't read,
291
+ * including quotes that don't balance, counts as writing.
292
+ */
293
+ function isReadOnlyCommand(command) {
294
+ if (typeof command !== 'string' || REDIRECT_OR_SUBSTITUTION_RE.test(command))
295
+ return false;
296
+ const chain = splitShellChain(command);
297
+ const commands = chain.segments.map((segment) => segment.trim()).filter((s) => s.length > 0);
298
+ return chain.quotesBalanced && commands.length > 0 && commands.every(commandOnlyReads);
299
+ }
300
+ /** Verbs that open the name of an MCP tool that changes something. */
301
+ const MCP_WRITE_VERBS = new Set([
302
+ // Files, code and records.
303
+ 'write',
304
+ 'edit',
305
+ 'create',
306
+ 'update',
307
+ 'delete',
308
+ 'remove',
309
+ 'patch',
310
+ 'apply',
311
+ 'rename',
312
+ 'move',
313
+ 'insert',
314
+ 'replace',
315
+ 'append',
316
+ 'modify',
317
+ 'set',
318
+ 'add',
319
+ 'upsert',
320
+ 'copy',
321
+ 'clone',
322
+ 'fork',
323
+ 'save',
324
+ 'drop',
325
+ 'purge',
326
+ 'destroy',
327
+ 'clean',
328
+ 'clear',
329
+ 'reset',
330
+ 'restore',
331
+ 'revert',
332
+ 'rollback',
333
+ 'discard',
334
+ 'change',
335
+ 'toggle',
336
+ 'sync',
337
+ 'push',
338
+ 'merge',
339
+ 'commit',
340
+ 'upload',
341
+ // Issues, reviews, sessions and access.
342
+ 'close',
343
+ 'reopen',
344
+ 'transition',
345
+ 'assign',
346
+ 'unassign',
347
+ 'approve',
348
+ 'reject',
349
+ 'accept',
350
+ 'submit',
351
+ 'comment',
352
+ 'reply',
353
+ 'respond',
354
+ 'archive',
355
+ 'unarchive',
356
+ 'dismiss',
357
+ 'lock',
358
+ 'unlock',
359
+ 'pin',
360
+ 'unpin',
361
+ 'share',
362
+ 'invite',
363
+ 'grant',
364
+ 'revoke',
365
+ 'bind',
366
+ 'unbind',
367
+ 'attach',
368
+ 'detach',
369
+ // Messages and schedules.
370
+ 'send',
371
+ 'post',
372
+ 'notify',
373
+ 'publish',
374
+ 'unpublish',
375
+ 'schedule',
376
+ 'cancel',
377
+ // Deployments, services and packages.
378
+ 'deploy',
379
+ 'start',
380
+ 'stop',
381
+ 'restart',
382
+ 'kill',
383
+ 'terminate',
384
+ 'launch',
385
+ 'trigger',
386
+ 'dispatch',
387
+ 'enable',
388
+ 'disable',
389
+ 'install',
390
+ 'uninstall',
391
+ // A browser page.
392
+ 'click',
393
+ 'type',
394
+ 'fill',
395
+ 'press',
396
+ 'drag',
397
+ ]);
398
+ /** Whether an MCP tool's name, `mcp__<server>__<tool>`, opens on a verb in `MCP_WRITE_VERBS`, in snake or camel case. */
399
+ function isWritingMcpTool(name) {
400
+ if (!name.startsWith('mcp__'))
401
+ return false;
402
+ const tool = name.slice(name.lastIndexOf('__') + 2);
403
+ const verb = /^[A-Za-z][a-z]*/.exec(tool)?.[0].toLowerCase() ?? '';
404
+ return MCP_WRITE_VERBS.has(verb);
405
+ }
406
+ /**
407
+ * Whether a tool call is something the assistant did that the user can reject.
408
+ * - Edit, Write, MultiEdit and NotebookEdit change files.
409
+ * - Task, Agent and Workflow hand work to subagents, which often edit files. Their own entries are
410
+ * sidechains, which this tracker skips, so the call is the only trace in the turn of what they did.
411
+ * - Bash runs a command, which reads as talking when every command in it only reads
412
+ * (`isReadOnlyCommand`). A command is output the user corrects too ("the command you ran
413
+ * won't work in CI"), so any other, such as `npm test` or `cd src && ls`, acts.
414
+ * - PowerShell, Claude Code's shell on native Windows, runs a command as Bash does. It always acts:
415
+ * `isReadOnlyCommand` reads POSIX shell, not PowerShell syntax.
416
+ * - An MCP tool acts when its name opens on a verb that changes something (`isWritingMcpTool`):
417
+ * `write_file`, `create_pull_request`, `close_issue`, `deploy_project`, `click`. Tool names usually
418
+ * lead with the verb, and a reading one can hold a write word later (`get_commit`), so only the
419
+ * first word counts. A verb that also opens reading tools counts as talking: `execute` and `run`
420
+ * (`execute_nrql_query`), `resolve` (`resolve-library-id`), and `navigate` and `hover`, which load
421
+ * or point at a page to read it. So does a name led by its service (`slack_send_message`,
422
+ * `browser_type`).
423
+ * - Any other built-in tool acts unless it is in `TALKING_TOOLS`, so a tool that list doesn't name,
424
+ * such as Skill, SendMessage or one added later, acts.
425
+ */
426
+ function isMutatingToolUse({ name, input }) {
427
+ if (name === 'Bash') {
428
+ const command = typeof input === 'object' && input !== null
429
+ ? input.command
430
+ : undefined;
431
+ return !isReadOnlyCommand(command);
432
+ }
433
+ if (name.startsWith('mcp__'))
434
+ return isWritingMcpTool(name);
435
+ return !TALKING_TOOLS.has(name);
436
+ }
437
+ /** The `tool_use` blocks in an assistant entry's `message.content`. */
438
+ function toolUses(message) {
439
+ if (message === null || typeof message !== 'object')
440
+ return [];
441
+ const content = message.content;
442
+ if (!Array.isArray(content))
443
+ return [];
444
+ return content.flatMap((block) => {
445
+ if (typeof block !== 'object' || block === null)
446
+ return [];
447
+ const { type, name, input } = block;
448
+ return type === 'tool_use' && typeof name === 'string' ? [{ name, input }] : [];
449
+ });
44
450
  }
45
451
  /** A content block carrying a `text` field — narrows before reading `.text`. */
46
452
  function hasStringText(block) {
@@ -68,6 +474,65 @@ function getEffectiveText(message) {
68
474
  function isSyntheticText(text) {
69
475
  return SYNTHETIC_TEXT_PREFIXES.some((prefix) => text.startsWith(prefix));
70
476
  }
477
+ /** The text Claude Code writes as a user entry when the user presses Esc, with " for tool use]" after it when a tool call was rejected. */
478
+ const INTERRUPT_MARKER = '[Request interrupted by user';
479
+ /**
480
+ * How the entries for a `!` bash-mode command open. The CLI writes the command and its output as
481
+ * two entries, `<bash-input>` and then `<bash-stdout>` (with `<bash-stderr>` after it), and the
482
+ * desktop app writes both in one entry. Neither carries a structural field that marks it, apart
483
+ * from the desktop app's `origin.kind: 'human'`.
484
+ */
485
+ const BASH_MODE_PREFIXES = ['<bash-input>', '<bash-stdout>', '<bash-stderr>'];
486
+ function isBashModeText(text) {
487
+ return BASH_MODE_PREFIXES.some((prefix) => text.startsWith(prefix));
488
+ }
489
+ /** A tool result echoed back as a user entry: by the field Claude Code sets, or by its content block when the field is missing. */
490
+ function isToolResult(entry) {
491
+ if (entry.toolUseResult !== undefined)
492
+ return true;
493
+ const content = entry.message?.content;
494
+ return (Array.isArray(content) &&
495
+ content.some((block) => typeof block === 'object' &&
496
+ block !== null &&
497
+ block.type === 'tool_result'));
498
+ }
499
+ /**
500
+ * Whether a user entry ends the assistant's turn, so the next message is read against what the
501
+ * assistant does after it. An entry can end the turn with no text to count, and have text to count
502
+ * without ending it.
503
+ *
504
+ * - The user writing something ends it, even when the entry opens on a pasted image. So does an entry
505
+ * marked `origin.kind: 'human'` that opens on a `SYNTHETIC_TEXT_PREFIXES` prefix: Claude Code marks
506
+ * a typed message with a system reminder in front of it that way, and a prompt-style slash command
507
+ * the assistant then answers.
508
+ * - An interrupt doesn't. The user pressed Esc on what the assistant was doing, so their next message
509
+ * reacts to that.
510
+ * - A `!` bash-mode command doesn't, even as the desktop app writes it, marked `origin.kind: 'human'`.
511
+ * The user ran a command of their own rather than answering the assistant. What the assistant says
512
+ * about the command's output, which current versions prompt it for, adds to the turn the user
513
+ * hasn't answered yet, as with a task notification. The entries still count as user messages.
514
+ * - A compaction summary doesn't. Claude Code writes it, mid-turn when compaction is automatic, and it
515
+ * changes nothing the assistant did.
516
+ * - A task notification doesn't. It reports a background task the assistant started, and what the
517
+ * assistant does about it adds to the turn the user hasn't answered yet.
518
+ * - Any other entry that opens on a `SYNTHETIC_TEXT_PREFIXES` prefix doesn't. Most are the harness
519
+ * reporting something: a reminder, a notification, another session's message, a command's output.
520
+ * The rest echo a local slash command such as /model or /compact, which the assistant doesn't
521
+ * answer, so the user's next message still answers its last turn.
522
+ * - A sidechain, meta or tool-result entry is part of the assistant's own work.
523
+ */
524
+ function endsAssistantTurn(entry) {
525
+ if (entry.isSidechain === true || entry.isMeta === true || isToolResult(entry))
526
+ return false;
527
+ const text = getEffectiveText(entry.message);
528
+ if (text !== null && (text.startsWith(INTERRUPT_MARKER) || isBashModeText(text)))
529
+ return false;
530
+ if (entry.origin?.kind === 'human')
531
+ return true;
532
+ if (entry.isCompactSummary === true || entry.origin?.kind === 'task-notification')
533
+ return false;
534
+ return text === null || !isSyntheticText(text);
535
+ }
71
536
  /** Returns the entry's real message text, or null if it isn't a real human-typed message. */
72
537
  function classifyUserEntry(entry) {
73
538
  if (entry.isSidechain === true)
@@ -97,6 +562,10 @@ export class TranscriptMessageTracker {
97
562
  userMessages = 0;
98
563
  assistantMessages = 0;
99
564
  userCorrections = 0;
565
+ /** What the assistant's entries did since the last user entry that ended its turn. */
566
+ assistantSinceUser = 'none';
567
+ /** Whether the transcript has shown a tool call yet, so a turn without one can be read as talking. */
568
+ seenToolUse = false;
100
569
  /** Cheap; captures the first non-empty path seen and ignores later calls. No I/O. */
101
570
  observeTranscriptPath(path) {
102
571
  if (this.transcriptPath === null && typeof path === 'string' && path.length > 0) {
@@ -115,9 +584,12 @@ export class TranscriptMessageTracker {
115
584
  return;
116
585
  }
117
586
  if (size < this.offset) {
118
- // File was rotated/truncated — restart from the beginning.
587
+ // File was rotated/truncated — restart from the beginning, with no turn carried over from
588
+ // the old file.
119
589
  this.offset = 0;
120
590
  this.skippingOversizedLine = false;
591
+ this.assistantSinceUser = 'none';
592
+ this.seenToolUse = false;
121
593
  }
122
594
  if (size <= this.offset)
123
595
  return;
@@ -182,17 +654,37 @@ export class TranscriptMessageTracker {
182
654
  const text = classifyUserEntry(entry);
183
655
  if (text !== null) {
184
656
  this.userMessages++;
185
- if (isCorrectionMessage(text.trim())) {
657
+ // A `!` command's entries hold the user's command and the program's output, neither of
658
+ // them a reply to the assistant.
659
+ if (!isBashModeText(text) && isCorrectionMessage(text.trim(), this.turnState())) {
186
660
  this.userCorrections++;
187
661
  }
188
662
  }
663
+ if (endsAssistantTurn(entry))
664
+ this.assistantSinceUser = 'none';
189
665
  }
190
666
  else if (entry.type === 'assistant') {
191
667
  if (isRealAssistantTurn(entry)) {
192
668
  this.assistantMessages++;
669
+ const tools = toolUses(entry.message);
670
+ if (tools.length > 0)
671
+ this.seenToolUse = true;
672
+ if (tools.some(isMutatingToolUse)) {
673
+ this.assistantSinceUser = 'acted';
674
+ }
675
+ else if (this.assistantSinceUser === 'none') {
676
+ this.assistantSinceUser = 'talked';
677
+ }
193
678
  }
194
679
  }
195
680
  }
681
+ turnState() {
682
+ if (this.assistantSinceUser === 'acted')
683
+ return 'acted';
684
+ if (this.assistantSinceUser === 'talked' && this.seenToolUse)
685
+ return 'talked';
686
+ return 'unknown';
687
+ }
196
688
  getMetrics() {
197
689
  return {
198
690
  userMessages: this.userMessages,
@@ -207,6 +699,8 @@ export class TranscriptMessageTracker {
207
699
  this.userMessages = 0;
208
700
  this.assistantMessages = 0;
209
701
  this.userCorrections = 0;
702
+ this.assistantSinceUser = 'none';
703
+ this.seenToolUse = false;
210
704
  }
211
705
  }
212
706
  //# sourceMappingURL=transcript-message-tracker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transcript-message-tracker.js","sourceRoot":"","sources":["../../src/metrics/transcript-message-tracker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,SAAS,CAAC;AAE5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAc3E,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8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,CAAC,iBAAiB,EAAE,CAAC;YAC3B,CAAC;QACH,CAAC;IACH,CAAC;IAED,UAAU;QACR,OAAO;YACL,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,eAAe,EAAE,IAAI,CAAC,eAAe;SACtC,CAAC;IACJ,CAAC;IAED,KAAK;QACH,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;QACnC,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;QAC3B,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC;IAC3B,CAAC;CACF"}
1
+ {"version":3,"file":"transcript-message-tracker.js","sourceRoot":"","sources":["../../src/metrics/transcript-message-tracker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,SAAS,CAAC;AAE5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAwB5D,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,uBAAuB,GAAG;IAC9B,wBAAwB;IACxB,wBAAwB;IACxB,gBAAgB;IAChB,mBAAmB;IACnB,qBAAqB;IACrB,mBAAmB;IACnB,wCAAwC;CACzC,CAAC;AAEF,0GAA0G;AAC1G,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AAEhD,4GAA4G;AAC5G,MAAM,aAAa,GAAG,IAAI,MAAM,CAC9B,IAAI,iBAAiB,gGAAgG,EACrH,GAAG,CACJ,CAAC;AAEF,iFAAiF;AACjF,MAAM,iBAAiB,GAAG,uBAAuB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,CAAC;IACnB,CAAC;IAED,UAAU;QACR,OAAO;YACL,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,eAAe,EAAE,IAAI,CAAC,eAAe;SACtC,CAAC;IACJ,CAAC;IAED,KAAK;QACH,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;QACnC,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;QAC3B,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC;QACzB,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC;QACjC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC3B,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newrelic/preflight",
3
- "version": "1.67.1",
3
+ "version": "1.67.2",
4
4
  "mcpName": "io.github.newrelic-experimental/preflight",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",