@redaksjon/protokoll 1.0.0 → 1.0.1
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/main.js +3 -2
- package/dist/main.js.map +1 -1
- package/dist/mcp/prompts/batch_transcription.md +50 -1
- package/dist/mcp/prompts/edit_entity.md +50 -1
- package/dist/mcp/prompts/enrich_entity.md +95 -2
- package/dist/mcp/prompts/find_and_analyze.md +127 -0
- package/dist/mcp/prompts/review_transcript.md +39 -1
- package/dist/mcp/server.js +41 -8
- package/dist/mcp/server.js.map +1 -1
- package/dist/term-assist.js +4 -2
- package/dist/term-assist.js.map +1 -1
- package/dist/term-context.js +4 -2
- package/dist/term-context.js.map +1 -1
- package/dist/transcript.js +335 -288
- package/dist/transcript.js.map +1 -1
- package/docs/mcp-tools/get-version.md +57 -0
- package/package.json +4 -2
|
@@ -1,3 +1,52 @@
|
|
|
1
|
-
# Batch Transcription
|
|
1
|
+
# Batch Transcription Workflow
|
|
2
2
|
|
|
3
3
|
I want to batch process audio files in: ${directory}
|
|
4
|
+
|
|
5
|
+
## Step 1: Discover Context Configuration
|
|
6
|
+
|
|
7
|
+
First, let's understand what context configuration is available:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
protokoll_discover_config
|
|
11
|
+
startingDirectory: "${directory}"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
This will show us:
|
|
15
|
+
- Which `.protokoll` context directory will be used
|
|
16
|
+
- What projects are defined
|
|
17
|
+
- What entities (people, terms, companies) are available
|
|
18
|
+
|
|
19
|
+
## Step 2: List Audio Files
|
|
20
|
+
|
|
21
|
+
Before processing, let's see what audio files are in the directory:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
protokoll_batch_process
|
|
25
|
+
inputDirectory: "${directory}"
|
|
26
|
+
dryRun: true (if you want to preview first)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Step 3: Process the Batch
|
|
30
|
+
|
|
31
|
+
Once you've confirmed the configuration and files, run:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
protokoll_batch_process
|
|
35
|
+
inputDirectory: "${directory}"
|
|
36
|
+
contextDirectory: (path from step 1, or omit to auto-discover)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## What Happens During Batch Processing
|
|
40
|
+
|
|
41
|
+
For each audio file:
|
|
42
|
+
1. **Transcription**: Whisper transcribes the audio
|
|
43
|
+
2. **Enhancement**: The reasoning model corrects names/terms using context
|
|
44
|
+
3. **Classification**: Multi-signal routing determines which project it belongs to
|
|
45
|
+
4. **Output**: Transcript saved to the appropriate project folder
|
|
46
|
+
|
|
47
|
+
## Related Tools
|
|
48
|
+
|
|
49
|
+
- `protokoll_list_transcripts` - View transcripts after processing
|
|
50
|
+
- `protokoll_context_status` - Check context configuration
|
|
51
|
+
- `protokoll_list_projects` - See available projects
|
|
52
|
+
- `protokoll_provide_feedback` - Report issues with transcripts
|
|
@@ -1,9 +1,58 @@
|
|
|
1
|
-
# Edit Entity
|
|
1
|
+
# Edit Entity Workflow
|
|
2
2
|
|
|
3
3
|
${userMessage}
|
|
4
4
|
|
|
5
5
|
I'll help you edit the ${entityType} "${entityId}".
|
|
6
6
|
|
|
7
|
+
## User Input Expected
|
|
8
|
+
|
|
9
|
+
**This prompt is typically invoked with additional freeform feedback from the user.** The user may provide instructions like:
|
|
10
|
+
- "Add phonetic variants 'pre a' and 'pria' to the sounds_like field"
|
|
11
|
+
- "Change the company to 'Acme Corp' and role to 'Senior Engineer'"
|
|
12
|
+
- "Remove the incorrect sounds_like variant 'john doe'"
|
|
13
|
+
- "Update the domain to 'kubernetes' and add topics 'containers', 'orchestration'"
|
|
14
|
+
- Any other specific edits to entity fields
|
|
15
|
+
|
|
16
|
+
**Use the user's feedback to determine which fields to update and what values to set.**
|
|
17
|
+
|
|
18
|
+
## Step 1: Get Current Entity Data
|
|
19
|
+
|
|
20
|
+
First, let's see what we're working with:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
protokoll_get_entity
|
|
24
|
+
entityType: "${entityType}"
|
|
25
|
+
entityId: "${entityId}"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
This shows the current values for all fields.
|
|
29
|
+
|
|
30
|
+
## Step 2: Make Your Edits
|
|
31
|
+
|
|
7
32
|
${entityGuidance}
|
|
8
33
|
|
|
34
|
+
## Common Editing Patterns
|
|
35
|
+
|
|
36
|
+
### Adding Phonetic Variants
|
|
37
|
+
When Whisper mishears a name/term, add how it sounds:
|
|
38
|
+
- Use `add_sounds_like: ["variant1", "variant2"]` to append
|
|
39
|
+
- Example: Person "Priya" → add_sounds_like: ["pre a", "pria"]
|
|
40
|
+
|
|
41
|
+
### Updating Associations
|
|
42
|
+
- For people: Change `company` or `role`
|
|
43
|
+
- For terms: Update `domain`, add to `topics` or `projects`
|
|
44
|
+
- For projects: Modify `destination`, `explicit_phrases`, `topics`
|
|
45
|
+
|
|
46
|
+
### Removing Bad Data
|
|
47
|
+
- Use `remove_sounds_like` to delete incorrect variants
|
|
48
|
+
- Use `remove_topics` or `remove_projects` for terms
|
|
49
|
+
- Use `remove_explicit_phrases` for projects
|
|
50
|
+
|
|
9
51
|
${modificationNote}
|
|
52
|
+
|
|
53
|
+
## Related Tools
|
|
54
|
+
|
|
55
|
+
- `protokoll_get_entity` - View current entity data
|
|
56
|
+
- `protokoll_search_context` - Find entities by name or content
|
|
57
|
+
- `protokoll_list_people` / `protokoll_list_terms` / `protokoll_list_projects` - Browse all entities
|
|
58
|
+
- `protokoll_delete_entity` - Remove an entity entirely
|
|
@@ -1,3 +1,96 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Enrich Entity with Smart Assistance
|
|
2
2
|
|
|
3
|
-
I want to add a ${entityType} called: ${entityName}
|
|
3
|
+
I want to add or enrich a ${entityType} called: ${entityName}
|
|
4
|
+
|
|
5
|
+
## User Input Expected
|
|
6
|
+
|
|
7
|
+
**This prompt is typically invoked with additional freeform feedback from the user.** The user may provide:
|
|
8
|
+
- **Source URLs or resources** to analyze for enrichment:
|
|
9
|
+
- "Use https://example.com/about to enrich this project"
|
|
10
|
+
- "Analyze https://kubernetes.io/docs to generate metadata for this term"
|
|
11
|
+
- "Read /path/to/project-spec.md to create the entity"
|
|
12
|
+
- **Specific metadata** they want to include:
|
|
13
|
+
- "Add sounds_like variants 'kube nets' and 'kube netties'"
|
|
14
|
+
- "Set the domain to 'cloud-native' and topics to 'containers', 'orchestration'"
|
|
15
|
+
- **Instructions about the enrichment process**:
|
|
16
|
+
- "Focus on technical terminology when generating metadata"
|
|
17
|
+
- "Include common misspellings in sounds_like"
|
|
18
|
+
|
|
19
|
+
**Use the user's feedback to determine which sources to analyze and what metadata to generate or include.**
|
|
20
|
+
|
|
21
|
+
## What This Does
|
|
22
|
+
|
|
23
|
+
This workflow uses AI to automatically generate metadata for entities by analyzing source content (URLs, files, or existing context).
|
|
24
|
+
|
|
25
|
+
## Step 1: Check If Entity Already Exists
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
protokoll_search_context
|
|
29
|
+
query: "${entityName}"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
If it exists, you may want to use `protokoll_edit_${entityType}` instead.
|
|
33
|
+
|
|
34
|
+
## Step 2: Choose Your Approach
|
|
35
|
+
|
|
36
|
+
### Option A: Add with Smart Assistance (Recommended)
|
|
37
|
+
|
|
38
|
+
For **projects** and **terms**, you can provide a source URL or file path, and Protokoll will:
|
|
39
|
+
- Generate phonetic variants (`sounds_like`) for transcription correction
|
|
40
|
+
- Extract relevant topics and keywords
|
|
41
|
+
- Create trigger phrases for classification
|
|
42
|
+
- Write a helpful description
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
protokoll_add_${entityType}
|
|
46
|
+
name: "${entityName}"
|
|
47
|
+
source: "https://example.com/about" or "/path/to/file.md"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Option B: Add Manually
|
|
51
|
+
|
|
52
|
+
If you don't have a source or prefer manual control:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
protokoll_add_${entityType}
|
|
56
|
+
name: "${entityName}"
|
|
57
|
+
sounds_like: ["phonetic", "variants"]
|
|
58
|
+
(other fields as needed)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## What Gets Generated
|
|
62
|
+
|
|
63
|
+
### For Projects:
|
|
64
|
+
- `sounds_like` - How the project name might be transcribed
|
|
65
|
+
- `explicit_phrases` - Phrases that trigger routing to this project
|
|
66
|
+
- `topics` - Keywords for classification
|
|
67
|
+
- `description` - Summary of what the project is about
|
|
68
|
+
|
|
69
|
+
### For Terms:
|
|
70
|
+
- `sounds_like` - Phonetic variants
|
|
71
|
+
- `domain` - Technical domain (e.g., "kubernetes", "finance")
|
|
72
|
+
- `expansion` - Full form of acronyms
|
|
73
|
+
- `description` - What the term means
|
|
74
|
+
|
|
75
|
+
### For People:
|
|
76
|
+
- `sounds_like` - Name pronunciation variants
|
|
77
|
+
- Note: People don't support source-based enrichment yet
|
|
78
|
+
|
|
79
|
+
## Step 3: Review and Refine
|
|
80
|
+
|
|
81
|
+
After creation, check the generated metadata:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
protokoll_get_entity
|
|
85
|
+
entityType: "${entityType}"
|
|
86
|
+
entityId: (the ID from the creation response)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
If you need to adjust anything, use `protokoll_edit_${entityType}`.
|
|
90
|
+
|
|
91
|
+
## Related Tools
|
|
92
|
+
|
|
93
|
+
- `protokoll_suggest_project_metadata` - Preview metadata without creating
|
|
94
|
+
- `protokoll_suggest_term_metadata` - Preview term metadata without creating
|
|
95
|
+
- `protokoll_update_project` - Regenerate project metadata from updated source
|
|
96
|
+
- `protokoll_update_term` - Regenerate term metadata from updated source
|
|
@@ -1,3 +1,130 @@
|
|
|
1
1
|
# Find and Analyze Transcripts
|
|
2
2
|
|
|
3
3
|
I want to search for transcripts in: ${directory}
|
|
4
|
+
|
|
5
|
+
## Step 1: List Available Transcripts
|
|
6
|
+
|
|
7
|
+
Start by seeing what transcripts are available:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
protokoll_list_transcripts
|
|
11
|
+
directory: "${directory}"
|
|
12
|
+
limit: 50
|
|
13
|
+
sortBy: "date" (or "filename", "title")
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Filtering Options
|
|
17
|
+
|
|
18
|
+
**By Date Range:**
|
|
19
|
+
```
|
|
20
|
+
protokoll_list_transcripts
|
|
21
|
+
directory: "${directory}"
|
|
22
|
+
startDate: "2026-01-01"
|
|
23
|
+
endDate: "2026-01-31"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**By Content Search:**
|
|
27
|
+
```
|
|
28
|
+
protokoll_list_transcripts
|
|
29
|
+
directory: "${directory}"
|
|
30
|
+
search: "kubernetes" (searches filename and content)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Pagination:**
|
|
34
|
+
```
|
|
35
|
+
protokoll_list_transcripts
|
|
36
|
+
directory: "${directory}"
|
|
37
|
+
limit: 20
|
|
38
|
+
offset: 20 (skip first 20, show next 20)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Step 2: Read Specific Transcripts
|
|
42
|
+
|
|
43
|
+
Once you've found interesting transcripts, read them:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
protokoll_read_transcript
|
|
47
|
+
transcriptPath: "/path/from/list/result.md"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
This returns:
|
|
51
|
+
- Full transcript content
|
|
52
|
+
- Metadata (date, time, title)
|
|
53
|
+
- Routing information (which project it was assigned to)
|
|
54
|
+
- Any tags or classifications
|
|
55
|
+
|
|
56
|
+
## Step 3: Analyze Patterns
|
|
57
|
+
|
|
58
|
+
Look for:
|
|
59
|
+
- **Common topics** - What are you talking about most?
|
|
60
|
+
- **Missing context** - Names/terms that weren't recognized
|
|
61
|
+
- **Routing issues** - Transcripts in wrong project folders
|
|
62
|
+
- **Quality problems** - Transcription errors that need feedback
|
|
63
|
+
|
|
64
|
+
## Step 4: Take Action
|
|
65
|
+
|
|
66
|
+
### Fix Transcription Errors
|
|
67
|
+
```
|
|
68
|
+
protokoll_provide_feedback
|
|
69
|
+
transcriptPath: "/path/to/transcript.md"
|
|
70
|
+
feedback: "Describe the issue"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Update Transcript Metadata
|
|
74
|
+
```
|
|
75
|
+
protokoll_edit_transcript
|
|
76
|
+
transcriptPath: "/path/to/transcript.md"
|
|
77
|
+
title: "New Title"
|
|
78
|
+
projectId: "correct-project-id"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Add Missing Context
|
|
82
|
+
If you notice names/terms that weren't recognized:
|
|
83
|
+
```
|
|
84
|
+
protokoll_add_person
|
|
85
|
+
name: "Person Name"
|
|
86
|
+
sounds_like: ["how whisper heard it"]
|
|
87
|
+
|
|
88
|
+
protokoll_add_term
|
|
89
|
+
name: "Technical Term"
|
|
90
|
+
sounds_like: ["mishearing variant"]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Combine Related Transcripts
|
|
94
|
+
```
|
|
95
|
+
protokoll_combine_transcripts
|
|
96
|
+
transcriptPaths: ["/path/1.md", "/path/2.md"]
|
|
97
|
+
outputPath: "/path/combined.md"
|
|
98
|
+
title: "Combined Meeting Notes"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Common Analysis Workflows
|
|
102
|
+
|
|
103
|
+
### Find All Transcripts About a Project
|
|
104
|
+
```
|
|
105
|
+
protokoll_list_transcripts
|
|
106
|
+
directory: "${directory}"
|
|
107
|
+
search: "project-name"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Review Recent Transcripts for Quality
|
|
111
|
+
```
|
|
112
|
+
protokoll_list_transcripts
|
|
113
|
+
directory: "${directory}"
|
|
114
|
+
startDate: "2026-01-20"
|
|
115
|
+
sortBy: "date"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Find Transcripts with Specific People
|
|
119
|
+
```
|
|
120
|
+
protokoll_search_context
|
|
121
|
+
query: "person-name"
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Then check which transcripts mention them.
|
|
125
|
+
|
|
126
|
+
## Related Tools
|
|
127
|
+
|
|
128
|
+
- `protokoll_context_status` - See what context is being used
|
|
129
|
+
- `protokoll_list_projects` - View all projects for routing analysis
|
|
130
|
+
- `protokoll_search_context` - Search across entities and transcripts
|
|
@@ -7,7 +7,45 @@ I'll help you review "${transcriptPath}".
|
|
|
7
7
|
**Focus areas:**
|
|
8
8
|
- ${focusArea}
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## User Input Expected
|
|
11
|
+
|
|
12
|
+
**This prompt is typically invoked with additional freeform feedback from the user.** The user may provide instructions like:
|
|
13
|
+
- "Change the title to 'XYZ' and the project to '123'"
|
|
14
|
+
- "Fix the speaker names"
|
|
15
|
+
- "Update the timestamp to 2pm"
|
|
16
|
+
- "Correct technical terms related to [topic]"
|
|
17
|
+
- Any other specific changes or improvements they want to make
|
|
18
|
+
|
|
19
|
+
**Use the user's feedback to guide which tools to call and what changes to make.** The instructions below explain how to make those changes properly.
|
|
20
|
+
|
|
21
|
+
## CRITICAL: Use ONLY Protokoll MCP Tools to Alter Transcripts
|
|
22
|
+
|
|
23
|
+
**YOU MUST use Protokoll MCP tools to make ANY changes to the transcript. NEVER directly edit transcript files.**
|
|
24
|
+
|
|
25
|
+
You are free to use other tools for research, web searches, or gathering context to inform your suggestions. However, when it comes time to actually modify the transcript file itself, you MUST route all changes through Protokoll MCP tools.
|
|
26
|
+
|
|
27
|
+
### For Content Corrections (typos, names, terms):
|
|
11
28
|
1. Call `protokoll_feedback_analyze` to analyze the transcript
|
|
12
29
|
2. Review suggested corrections
|
|
13
30
|
3. Apply corrections using `protokoll_feedback_apply`
|
|
31
|
+
|
|
32
|
+
### For Title Changes:
|
|
33
|
+
- **DO NOT** edit the file directly to change the title
|
|
34
|
+
- **DO** use `protokoll_transcript_rename` to change both the filename and title together
|
|
35
|
+
- This ensures the file is properly renamed and the title metadata is updated
|
|
36
|
+
|
|
37
|
+
### For Metadata Changes (Project, Time, etc.):
|
|
38
|
+
- **DO NOT** edit the file directly
|
|
39
|
+
- **DO** use `protokoll_transcript_update` to update metadata fields
|
|
40
|
+
|
|
41
|
+
### What NOT to Do:
|
|
42
|
+
❌ Do NOT use StrReplace, Write, or any file editing tools to modify the transcript
|
|
43
|
+
❌ Do NOT directly edit the transcript markdown file
|
|
44
|
+
❌ Do NOT bypass Protokoll tools when changing the transcript
|
|
45
|
+
|
|
46
|
+
### What TO Do:
|
|
47
|
+
✅ Use any tools needed for research, web searches, or gathering context
|
|
48
|
+
✅ Always use `protokoll_feedback_analyze` to review transcript content
|
|
49
|
+
✅ Always use `protokoll_feedback_apply` to apply content corrections to the transcript
|
|
50
|
+
✅ Always use `protokoll_transcript_rename` to change the transcript title/filename
|
|
51
|
+
✅ Always use `protokoll_transcript_update` to change transcript metadata
|
package/dist/mcp/server.js
CHANGED
|
@@ -6,7 +6,7 @@ import { ListToolsRequestSchema, CallToolRequestSchema, ListResourcesRequestSche
|
|
|
6
6
|
import { fileURLToPath } from 'node:url';
|
|
7
7
|
import { resolve, dirname } from 'node:path';
|
|
8
8
|
import { readFile, stat, mkdir, writeFile, unlink } from 'node:fs/promises';
|
|
9
|
-
import { q as create, B as listTranscripts, d as create$1, c as create$2, g as getLogger, i as DEFAULT_OUTPUT_DIRECTORY, l as DEFAULT_OUTPUT_STRUCTURE, k as DEFAULT_OUTPUT_FILENAME_OPTIONS, p as create$3, w as DEFAULT_TRANSCRIPTION_MODEL, v as DEFAULT_MODEL, C as DEFAULT_TEMP_DIRECTORY, b as DEFAULT_MAX_AUDIO_SIZE, e as DEFAULT_INTERMEDIATE_DIRECTORY, D as DEFAULT_REASONING_LEVEL, r as create$4, E as create$6, F as create$8, G as processFeedback, H as applyChanges, I as combineTranscripts, J as editTranscript, K as parseTranscript } from '../transcript.js';
|
|
9
|
+
import { q as create, B as listTranscripts, d as create$1, c as create$2, g as getLogger, i as DEFAULT_OUTPUT_DIRECTORY, l as DEFAULT_OUTPUT_STRUCTURE, k as DEFAULT_OUTPUT_FILENAME_OPTIONS, p as create$3, w as DEFAULT_TRANSCRIPTION_MODEL, v as DEFAULT_MODEL, C as DEFAULT_TEMP_DIRECTORY, b as DEFAULT_MAX_AUDIO_SIZE, e as DEFAULT_INTERMEDIATE_DIRECTORY, D as DEFAULT_REASONING_LEVEL, r as create$4, E as create$6, F as create$8, G as processFeedback, H as applyChanges, I as combineTranscripts, J as editTranscript, K as parseTranscript, P as PROGRAM_NAME, V as VERSION } from '../transcript.js';
|
|
10
10
|
import * as yaml from 'js-yaml';
|
|
11
11
|
import { readFileSync } from 'node:fs';
|
|
12
12
|
import { glob } from 'glob';
|
|
@@ -18,12 +18,14 @@ import 'fs/promises';
|
|
|
18
18
|
import 'openai';
|
|
19
19
|
import 'fluent-ffmpeg';
|
|
20
20
|
import 'node:os';
|
|
21
|
+
import '@riotprompt/riotprompt';
|
|
22
|
+
import 'zod';
|
|
21
23
|
import 'node:crypto';
|
|
22
24
|
import 'html-to-text';
|
|
23
25
|
import 'commander';
|
|
24
|
-
import '
|
|
26
|
+
import '@theunwalked/overcontext';
|
|
27
|
+
import '@redaksjon/context';
|
|
25
28
|
import 'winston';
|
|
26
|
-
import '@riotprompt/riotprompt';
|
|
27
29
|
|
|
28
30
|
const SCHEME = "protokoll";
|
|
29
31
|
function parseUri(uri) {
|
|
@@ -459,8 +461,7 @@ const __dirname$1 = dirname(__filename$1);
|
|
|
459
461
|
function getPromptsDir() {
|
|
460
462
|
const isBundled = __dirname$1.includes("/dist") || __dirname$1.endsWith("dist") || __filename$1.includes("dist/mcp-server.js") || __filename$1.includes("dist\\mcp-server.js");
|
|
461
463
|
if (isBundled) {
|
|
462
|
-
|
|
463
|
-
return promptsDir;
|
|
464
|
+
return __dirname$1;
|
|
464
465
|
}
|
|
465
466
|
return __dirname$1;
|
|
466
467
|
}
|
|
@@ -470,7 +471,17 @@ function loadTemplate(name) {
|
|
|
470
471
|
try {
|
|
471
472
|
return readFileSync(path, "utf-8").trim();
|
|
472
473
|
} catch (error) {
|
|
473
|
-
|
|
474
|
+
const isBundled = __dirname$1.includes("/dist");
|
|
475
|
+
const debugInfo = [
|
|
476
|
+
`Failed to load prompt template "${name}"`,
|
|
477
|
+
`Attempted path: ${path}`,
|
|
478
|
+
`Prompts directory: ${promptsDir}`,
|
|
479
|
+
`Current __dirname: ${__dirname$1}`,
|
|
480
|
+
`Current __filename: ${__filename$1}`,
|
|
481
|
+
`Environment: ${isBundled ? "bundled (dist)" : "source (src)"}`,
|
|
482
|
+
`Error: ${error}`
|
|
483
|
+
].join("\n ");
|
|
484
|
+
throw new Error(debugInfo);
|
|
474
485
|
}
|
|
475
486
|
}
|
|
476
487
|
function fillTemplate(template, args) {
|
|
@@ -519,7 +530,7 @@ function getPrompts() {
|
|
|
519
530
|
},
|
|
520
531
|
{
|
|
521
532
|
name: "review_transcript",
|
|
522
|
-
description: "Analyze a transcript and suggest corrections based on context. Identifies potential name/term errors and offers to apply fixes.",
|
|
533
|
+
description: "Analyze a transcript and suggest corrections based on context. Identifies potential name/term errors and offers to apply fixes. IMPORTANT: This prompt instructs the AI to use ONLY Protokoll MCP tools, never direct file editing.",
|
|
523
534
|
arguments: [
|
|
524
535
|
{
|
|
525
536
|
name: "transcriptPath",
|
|
@@ -528,7 +539,7 @@ function getPrompts() {
|
|
|
528
539
|
},
|
|
529
540
|
{
|
|
530
541
|
name: "focusArea",
|
|
531
|
-
description:
|
|
542
|
+
description: 'What to focus on: names, terms, technical, or all (defaults to "all")',
|
|
532
543
|
required: false
|
|
533
544
|
}
|
|
534
545
|
]
|
|
@@ -3147,7 +3158,26 @@ async function handleProvideFeedback(args) {
|
|
|
3147
3158
|
};
|
|
3148
3159
|
}
|
|
3149
3160
|
|
|
3161
|
+
const getVersionTool = {
|
|
3162
|
+
name: "protokoll_get_version",
|
|
3163
|
+
description: "Get the current version of Protokoll including git information and system details. Useful for diagnosing if you are using the latest version.",
|
|
3164
|
+
inputSchema: {
|
|
3165
|
+
type: "object",
|
|
3166
|
+
properties: {},
|
|
3167
|
+
required: []
|
|
3168
|
+
}
|
|
3169
|
+
};
|
|
3170
|
+
async function handleGetVersion() {
|
|
3171
|
+
return {
|
|
3172
|
+
version: VERSION,
|
|
3173
|
+
programName: PROGRAM_NAME,
|
|
3174
|
+
fullVersion: `${PROGRAM_NAME} ${VERSION}`
|
|
3175
|
+
};
|
|
3176
|
+
}
|
|
3177
|
+
|
|
3150
3178
|
const tools = [
|
|
3179
|
+
// System Information
|
|
3180
|
+
getVersionTool,
|
|
3151
3181
|
// Discovery & Configuration
|
|
3152
3182
|
discoverConfigTool,
|
|
3153
3183
|
suggestProjectTool,
|
|
@@ -3186,6 +3216,9 @@ const tools = [
|
|
|
3186
3216
|
];
|
|
3187
3217
|
async function handleToolCall(name, args) {
|
|
3188
3218
|
switch (name) {
|
|
3219
|
+
// System Information
|
|
3220
|
+
case "protokoll_get_version":
|
|
3221
|
+
return handleGetVersion();
|
|
3189
3222
|
// Discovery & Configuration
|
|
3190
3223
|
case "protokoll_discover_config":
|
|
3191
3224
|
return handleDiscoverConfig(args);
|