tracegist-mcp-bridge 0.2.12 → 0.2.14

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 CHANGED
@@ -37,16 +37,19 @@ Set `TRACEGIST_DIR` to change where the bridge looks for packages (defaults to `
37
37
 
38
38
  ## MCP tools
39
39
 
40
- - `list_tracegist_packages` — list TraceGist package zips in `TRACEGIST_DIR` (or `~/Downloads`)
41
- - `get_tracegist_package_overview` manifest + truncated handoff preview + file list (preview capped at 12K chars)
42
- - `get_tracegist_handoff_markdown` full handoff markdown (use this for complete content)
43
- - `read_tracegist_package_file` read any text file from inside the ZIP without writing to disk (e.g. `network/api-requests.jsonl`, the Playwright repro script)
44
- - `extract_tracegist_package_file` write a binary or text file from the ZIP to a local directory
45
- - `transcribe_tracegist_package_voice_notes` transcribe voice notes using local Python Whisper
46
- - `watch_live_session` poll real-time session events while recording is active
47
- - `get_live_screenshot` request and retrieve a screenshot of the current tab
48
- - `ask_tester_question` send a question to the tester (shown as a browser toast, max 200 chars)
49
- - `get_tester_response` retrieve the tester's voice + screenshot answer
40
+ | Tool | Description |
41
+ | ------------------------------------------ | --------------------------------------------------------------- |
42
+ | `list_tracegist_packages` | List package ZIPs in Downloads |
43
+ | `get_tracegist_package_overview` | Manifest + truncated handoff preview |
44
+ | `get_tracegist_handoff_markdown` | Full handoff markdown |
45
+ | `read_tracegist_package_file` | Read any file from the ZIP (e.g. `network/api-requests.jsonl`) |
46
+ | `extract_tracegist_package_file` | Extract a file to disk |
47
+ | `transcribe_tracegist_package_voice_notes` | Local Whisper transcription |
48
+ | `watch_live_session` | Poll real-time session events while recording is active |
49
+ | `get_live_screenshot` | Request and retrieve a screenshot of the current tab |
50
+ | `ask_tester_question` | Send a question to the tester (shown as a browser toast) |
51
+ | `get_tester_response` | Retrieve the tester's voice + screenshot answer |
52
+ | `get_live_session_summary` | Complete interaction log and voice transcriptions after session |
50
53
 
51
54
  ## Package contents
52
55
 
package/bin/lib.mjs CHANGED
@@ -11,16 +11,23 @@ export function normalizeZipBaseName(entryName) {
11
11
  return path.posix.basename(entryName).toLowerCase();
12
12
  }
13
13
 
14
- export function renderPackagesText(packages, directory, totalCount = null, hasMore = false, offset = 0) {
14
+ export function renderPackagesText(
15
+ packages,
16
+ directory,
17
+ totalCount = null,
18
+ hasMore = false,
19
+ offset = 0,
20
+ ) {
15
21
  if (packages.length === 0) {
16
22
  return [
17
23
  `No TraceGist package zips found in ${directory}.`,
18
24
  "Expected naming pattern: tracegist-...-package.zip",
19
25
  ].join("\n");
20
26
  }
21
- const countLabel = totalCount != null
22
- ? `Showing ${packages.length} of ${totalCount} TraceGist package(s) in ${directory}:`
23
- : `Found ${packages.length} TraceGist package(s) in ${directory}:`;
27
+ const countLabel =
28
+ totalCount != null
29
+ ? `Showing ${packages.length} of ${totalCount} TraceGist package(s) in ${directory}:`
30
+ : `Found ${packages.length} TraceGist package(s) in ${directory}:`;
24
31
  const lines = [countLabel, ""];
25
32
  for (const pkg of packages) {
26
33
  lines.push(
@@ -416,6 +416,7 @@ server.registerPrompt(
416
416
  server.registerTool(
417
417
  "transcribe_tracegist_package_voice_notes",
418
418
  {
419
+ title: "Transcribe Voice Notes",
419
420
  description:
420
421
  "Transcribe voice-note files inside a TraceGist package zip using local Python Whisper (no external API).",
421
422
  annotations: {
@@ -437,6 +438,16 @@ server.registerTool(
437
438
  .optional()
438
439
  .describe("ISO 639-1 language code (e.g. en, de, ja). Omit for auto-detection."),
439
440
  }),
441
+ outputSchema: {
442
+ zipPath: z.string(),
443
+ model: z.string(),
444
+ language: z.string().nullable(),
445
+ voiceFileCount: z.number().optional(),
446
+ transcribedCount: z.number().optional(),
447
+ transcriptions: z.array(z.object({ entryName: z.string(), transcript: z.string() })),
448
+ failures: z.array(z.object({ entryName: z.string(), error: z.string() })).optional(),
449
+ warning: z.string().optional(),
450
+ },
440
451
  },
441
452
  async ({ zipPath, model = "base", language }) => {
442
453
  try {
@@ -538,9 +549,10 @@ server.registerTool(
538
549
  failures,
539
550
  };
540
551
 
552
+ const hasError = transcriptions.length === 0 && failures.length > 0;
541
553
  return {
542
554
  content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
543
- ...(transcriptions.length === 0 && failures.length > 0 ? { isError: true } : {}),
555
+ ...(hasError ? { isError: true } : { structuredContent: result }),
544
556
  };
545
557
  } catch (err) {
546
558
  return toolError(err);
@@ -551,6 +563,7 @@ server.registerTool(
551
563
  server.registerTool(
552
564
  "list_tracegist_packages",
553
565
  {
566
+ title: "List Packages",
554
567
  description:
555
568
  "List TraceGist marker package zip files. Searches TRACEGIST_DIR (env var), falls back to ~/Downloads, or uses the given directory.",
556
569
  annotations: {
@@ -578,6 +591,20 @@ server.registerTool(
578
591
  .optional()
579
592
  .describe("Number of packages to skip for pagination (default: 0)."),
580
593
  }),
594
+ outputSchema: {
595
+ totalCount: z.number(),
596
+ count: z.number(),
597
+ offset: z.number(),
598
+ hasMore: z.boolean(),
599
+ packages: z.array(
600
+ z.object({
601
+ name: z.string(),
602
+ path: z.string(),
603
+ sizeBytes: z.number(),
604
+ modifiedAt: z.string(),
605
+ }),
606
+ ),
607
+ },
581
608
  },
582
609
  async ({ directory, limit = 20, offset = 0 }) => {
583
610
  try {
@@ -587,10 +614,21 @@ server.registerTool(
587
614
  limit,
588
615
  offset,
589
616
  );
617
+ const structured = {
618
+ totalCount,
619
+ count: packages.length,
620
+ offset,
621
+ hasMore,
622
+ packages,
623
+ };
590
624
  return {
591
625
  content: [
592
- { type: "text", text: renderPackagesText(packages, searchDir, totalCount, hasMore, offset) },
626
+ {
627
+ type: "text",
628
+ text: renderPackagesText(packages, searchDir, totalCount, hasMore, offset),
629
+ },
593
630
  ],
631
+ structuredContent: structured,
594
632
  };
595
633
  } catch (err) {
596
634
  return toolError(err);
@@ -601,6 +639,7 @@ server.registerTool(
601
639
  server.registerTool(
602
640
  "get_tracegist_package_overview",
603
641
  {
642
+ title: "Package Overview",
604
643
  description:
605
644
  "Quick metadata overview of a TraceGist package: manifest and file list. " +
606
645
  "Does NOT include handoff content — call get_tracegist_handoff_markdown (no section param → table of contents, then load sections by name) for the actual handoff. " +
@@ -614,6 +653,15 @@ server.registerTool(
614
653
  inputSchema: z.object({
615
654
  zipPath: z.string().describe("Absolute path to the TraceGist package zip file."),
616
655
  }),
656
+ outputSchema: {
657
+ zipPath: z.string(),
658
+ entryCount: z.number(),
659
+ manifestEntryName: z.string().nullable(),
660
+ handoffEntryName: z.string().nullable(),
661
+ manifest: z.any().nullable(),
662
+ entries: z.array(z.string()),
663
+ hint: z.string(),
664
+ },
617
665
  },
618
666
  async ({ zipPath }) => {
619
667
  try {
@@ -633,6 +681,7 @@ server.registerTool(
633
681
 
634
682
  return {
635
683
  content: [{ type: "text", text: JSON.stringify(overview, null, 2) }],
684
+ structuredContent: overview,
636
685
  };
637
686
  } catch (err) {
638
687
  return toolError(err);
@@ -643,6 +692,7 @@ server.registerTool(
643
692
  server.registerTool(
644
693
  "get_tracegist_handoff_markdown",
645
694
  {
695
+ title: "Handoff Markdown",
646
696
  description:
647
697
  "Extract coding agent handoff markdown from a TraceGist package zip. " +
648
698
  "Voice note transcripts are automatically generated (via local Whisper) and injected inline " +
@@ -767,6 +817,7 @@ server.registerTool(
767
817
  server.registerTool(
768
818
  "read_tracegist_package_file",
769
819
  {
820
+ title: "Read Package File",
770
821
  description:
771
822
  "Read a text file directly from inside a TraceGist package zip and return its content without writing to disk. " +
772
823
  "Common uses: `network/api-requests.jsonl` for request/response bodies, or the Playwright repro script " +
@@ -807,6 +858,7 @@ server.registerTool(
807
858
  server.registerTool(
808
859
  "extract_tracegist_package_file",
809
860
  {
861
+ title: "Extract Package File",
810
862
  description: "Extract one file from a TraceGist package zip to a local directory.",
811
863
  annotations: {
812
864
  readOnlyHint: false,
@@ -1254,6 +1306,7 @@ server.resource(
1254
1306
  server.registerTool(
1255
1307
  "watch_live_session",
1256
1308
  {
1309
+ title: "Watch Live Session",
1257
1310
  description:
1258
1311
  "Watch a live TraceGist shadowing session in real-time. Returns buffered events since the given sequence number.\n\n" +
1259
1312
  "IMPORTANT POLLING BEHAVIOR:\n" +
@@ -1389,6 +1442,7 @@ server.registerTool(
1389
1442
  server.registerTool(
1390
1443
  "ask_tester_question",
1391
1444
  {
1445
+ title: "Ask Tester Question",
1392
1446
  description:
1393
1447
  "Ask the tester a short, concise question during a live shadowing session. " +
1394
1448
  "The question appears as a toast notification in their browser. " +
@@ -1470,6 +1524,7 @@ server.registerTool(
1470
1524
  server.registerTool(
1471
1525
  "get_tester_response",
1472
1526
  {
1527
+ title: "Get Tester Response",
1473
1528
  description:
1474
1529
  "Check for the tester's response to a question asked during live shadowing. " +
1475
1530
  "Returns the tester's screenshot, highlight captures, and transcribed voice note.\n\n" +
@@ -1605,6 +1660,7 @@ server.registerTool(
1605
1660
  server.registerTool(
1606
1661
  "get_live_screenshot",
1607
1662
  {
1663
+ title: "Live Screenshot",
1608
1664
  description:
1609
1665
  "Capture a screenshot of the tester's current browser tab during a live shadowing session.",
1610
1666
  annotations: {
@@ -1668,6 +1724,7 @@ server.registerTool(
1668
1724
  server.registerTool(
1669
1725
  "get_live_session_summary",
1670
1726
  {
1727
+ title: "Live Session Summary",
1671
1728
  description:
1672
1729
  "Get a summary of the live shadowing session including all agent-tester interactions. " +
1673
1730
  "Call this after the session ends (sessionActive becomes false) to get the complete interaction log " +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tracegist-mcp-bridge",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
4
4
  "description": "Local-first MCP bridge for reading and transcribing TraceGist package zips.",
5
5
  "type": "module",
6
6
  "bin": {