ticketlens 0.38.14 → 0.38.15
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/package.json
CHANGED
|
@@ -12,6 +12,10 @@ import path from 'node:path';
|
|
|
12
12
|
export const TICKET_KEY_RE = /\b[A-Z][A-Z0-9]{1,9}-\d+\b/;
|
|
13
13
|
export const RECALL_FLAG_RE = /🔖\s*Recall-flag:/;
|
|
14
14
|
export const NOTE_ADD_RE = /\bticketlens\s+note\s+add\b|\/jtb\s+note\b/;
|
|
15
|
+
// Matches the MCP tool_use name Claude Code gives an MCP server's tool call
|
|
16
|
+
// (mcp__<server-alias>__<tool-name>) — the server alias is whatever the user
|
|
17
|
+
// named it in their own .mcp.json, so only the tool-name suffix is fixed.
|
|
18
|
+
export const NOTE_ADD_MCP_RE = /^mcp__.+__recall_add$/;
|
|
15
19
|
|
|
16
20
|
export function readStdinJson() {
|
|
17
21
|
const raw = fs.readFileSync(0, 'utf8');
|
|
@@ -54,7 +58,11 @@ export function writeState(sessionId, state) {
|
|
|
54
58
|
* Claude just flagged something every time) and sawNoteAdd gets stuck true
|
|
55
59
|
* (silently disabling the Stop-hook check, since it thinks a note was
|
|
56
60
|
* already added). Only count a real assistant-authored text block for the
|
|
57
|
-
* flag, and only a real executed
|
|
61
|
+
* flag, and only a real executed note-add — either the CLI (`ticketlens
|
|
62
|
+
* note add`/`/jtb note` via Bash) or the ticketlens MCP server's recall_add
|
|
63
|
+
* tool — for note-add. Missing the MCP path here was a real bug: it made
|
|
64
|
+
* the Stop hook nudge even after a note was genuinely captured via MCP,
|
|
65
|
+
* since only the Bash/CLI form was ever recognized.
|
|
58
66
|
*/
|
|
59
67
|
export function scanTranscript(transcriptPath) {
|
|
60
68
|
const result = { sawTicketKey: false, sawRecallFlag: false, sawNoteAdd: false };
|
|
@@ -86,8 +94,10 @@ export function scanTranscript(transcriptPath) {
|
|
|
86
94
|
if (block.type === 'text' && RECALL_FLAG_RE.test(block.text ?? '')) {
|
|
87
95
|
result.sawRecallFlag = true;
|
|
88
96
|
}
|
|
89
|
-
if (block.type === 'tool_use'
|
|
90
|
-
|
|
97
|
+
if (block.type === 'tool_use') {
|
|
98
|
+
const isCliNoteAdd = block.name === 'Bash' && NOTE_ADD_RE.test(block.input?.command ?? '');
|
|
99
|
+
const isMcpNoteAdd = NOTE_ADD_MCP_RE.test(block.name ?? '');
|
|
100
|
+
if (isCliNoteAdd || isMcpNoteAdd) result.sawNoteAdd = true;
|
|
91
101
|
}
|
|
92
102
|
}
|
|
93
103
|
}
|
|
@@ -471,10 +471,11 @@ export function printProfilesHelp({ stream = process.stdout } = {}) {
|
|
|
471
471
|
'',
|
|
472
472
|
` ${s.bold('SUBCOMMANDS')}`,
|
|
473
473
|
'',
|
|
474
|
-
` ${s.brand('set-team')} ${s.dim('<profile>
|
|
474
|
+
` ${s.brand('set-team')} ${s.dim('<profile> [team name]')}`,
|
|
475
475
|
` Route this profile's Recall notes to a specific Console team —`,
|
|
476
|
-
` for accounts that belong to more than one team.
|
|
477
|
-
`
|
|
476
|
+
` for accounts that belong to more than one team. Omit the team name`,
|
|
477
|
+
` to pick one interactively from your synced teams. Stored by id,`,
|
|
478
|
+
` refreshed by ${s.cyan('ticketlens login')}/${s.cyan('ticketlens sync')}.`,
|
|
478
479
|
'',
|
|
479
480
|
` ${s.bold('OPTIONS')}`,
|
|
480
481
|
'',
|