@redaksjon/protokoll 0.3.0 → 1.0.0

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.
Files changed (36) hide show
  1. package/.kronologi/config.yaml +10 -0
  2. package/.kronologi/jobs/monthly-summary/config.yaml +40 -0
  3. package/.kronologi/jobs/monthly-summary/instructions.md +23 -0
  4. package/.kronologi/jobs/monthly-summary/persona.md +11 -0
  5. package/.kronologi/jobs/weekly-summary/config.yaml +42 -0
  6. package/.kronologi/jobs/weekly-summary/instructions.md +21 -0
  7. package/.kronologi/jobs/weekly-summary/persona.md +10 -0
  8. package/README.md +41 -0
  9. package/activity/2026/4/test-activity.md +10 -0
  10. package/dist/main.js +2 -2
  11. package/dist/mcp/prompts/batch_transcription.md +3 -0
  12. package/dist/mcp/prompts/edit_entity.md +9 -0
  13. package/dist/mcp/prompts/enrich_entity.md +3 -0
  14. package/dist/mcp/prompts/find_and_analyze.md +3 -0
  15. package/dist/mcp/prompts/review_transcript.md +13 -0
  16. package/dist/mcp/prompts/setup_project.md +12 -0
  17. package/dist/mcp/prompts/transcribe_with_context.md +8 -0
  18. package/dist/mcp/server.js +2314 -2416
  19. package/dist/mcp/server.js.map +1 -1
  20. package/dist/term-assist.js +11 -3
  21. package/dist/term-assist.js.map +1 -1
  22. package/dist/term-context.js +10 -2
  23. package/dist/term-context.js.map +1 -1
  24. package/dist/transcript.js +168 -124
  25. package/dist/transcript.js.map +1 -1
  26. package/guide/index.md +6 -0
  27. package/guide/quickstart.md +26 -1
  28. package/package.json +1 -1
  29. package/summary/2026/4/completion.json +16 -0
  30. package/summary/2026/4/inputs.json +60 -0
  31. package/summary/2026/4/summary.md +26 -0
  32. package/.cursor/rules/definition-of-done.md +0 -90
  33. package/.cursor/rules/no-auto-summary-files.md +0 -43
  34. package/.cursor/rules/no-emoticons.md +0 -57
  35. package/nodemon.json +0 -14
  36. package/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,10 @@
1
+ # Kronologi Configuration
2
+ # Root configuration file for default settings
3
+
4
+ # Default model (can be overridden per job)
5
+ model: gpt-4o-mini
6
+
7
+ # Default directories
8
+ activityDirectory: activity
9
+ summaryDirectory: summary
10
+ contextDirectory: context
@@ -0,0 +1,40 @@
1
+ # Monthly Summary Configuration
2
+ # Generates monthly summaries from activity files
3
+
4
+ model: gpt-4o-mini
5
+ temperature: 0.7
6
+ maxCompletionTokens: 4000
7
+
8
+ parameters:
9
+ year:
10
+ type: number
11
+ description: Year for the summary
12
+ required: true
13
+ month:
14
+ type: number
15
+ description: Month for the summary (1-12)
16
+ required: true
17
+
18
+ content:
19
+ activity:
20
+ type: activity
21
+ name: Monthly Activity
22
+ directory: ''
23
+ pattern: '*.md'
24
+
25
+ output:
26
+ summary:
27
+ type: summary
28
+ format: markdown
29
+ name: Monthly Summary
30
+ pattern: 'summary.md'
31
+
32
+ completion:
33
+ type: metadata
34
+ format: json
35
+ pattern: 'completion.json'
36
+
37
+ inputs:
38
+ type: metadata
39
+ format: json
40
+ pattern: 'inputs.json'
@@ -0,0 +1,23 @@
1
+ # Monthly Summary Instructions
2
+
3
+ Create a comprehensive monthly summary based on the provided activity files.
4
+
5
+ ## Structure
6
+
7
+ 1. **Executive Summary**: High-level overview of the month
8
+ 2. **Major Accomplishments**: Significant achievements and milestones
9
+ 3. **Progress by Area**: Organized by project or focus area
10
+ 4. **Key Decisions**: Important decisions made and their rationale
11
+ 5. **Challenges & Solutions**: Problems encountered and how they were addressed
12
+ 6. **Metrics & Impact**: Quantifiable results where applicable
13
+ 7. **Looking Ahead**: Priorities and plans for next month
14
+
15
+ ## Guidelines
16
+
17
+ - Start with the most important information
18
+ - Use clear section headings
19
+ - Include specific examples and details
20
+ - Highlight trends and patterns across the month
21
+ - Note any strategic shifts or changes
22
+ - Keep the tone professional and objective
23
+ - Use bullet points and formatting for readability
@@ -0,0 +1,11 @@
1
+ # Monthly Summary Persona
2
+
3
+ You are a professional technical writer who creates comprehensive monthly summaries.
4
+
5
+ Your summaries:
6
+ - Provide a high-level overview of the month's work
7
+ - Highlight major accomplishments and milestones
8
+ - Identify trends and patterns
9
+ - Note important decisions and their impact
10
+ - Are written in clear, professional language
11
+ - Balance detail with readability
@@ -0,0 +1,42 @@
1
+ # Weekly Summary Configuration
2
+ # Generates weekly summaries from activity files
3
+
4
+ model: gpt-4o-mini
5
+ temperature: 0.7
6
+ maxCompletionTokens: 4000
7
+
8
+ parameters:
9
+ year:
10
+ type: number
11
+ description: Year for the summary
12
+ required: true
13
+ month:
14
+ type: number
15
+ description: Month number (1-12) - used as week identifier for weekly summaries
16
+ required: true
17
+
18
+ context: {}
19
+
20
+ content:
21
+ activity:
22
+ type: activity
23
+ name: Weekly Activity
24
+ directory: ''
25
+ pattern: '*.md'
26
+
27
+ output:
28
+ summary:
29
+ type: summary
30
+ format: markdown
31
+ name: Weekly Summary
32
+ pattern: 'summary.md'
33
+
34
+ completion:
35
+ type: metadata
36
+ format: json
37
+ pattern: 'completion.json'
38
+
39
+ inputs:
40
+ type: metadata
41
+ format: json
42
+ pattern: 'inputs.json'
@@ -0,0 +1,21 @@
1
+ # Weekly Summary Instructions
2
+
3
+ Create a comprehensive weekly summary based on the provided activity files.
4
+
5
+ ## Structure
6
+
7
+ 1. **Overview**: Brief summary of the week's focus and major themes
8
+ 2. **Key Accomplishments**: What was completed or achieved
9
+ 3. **Progress**: Work that advanced significantly
10
+ 4. **Decisions**: Important decisions made
11
+ 5. **Challenges**: Blockers or issues encountered
12
+ 6. **Next Steps**: Planned work for the coming week
13
+
14
+ ## Guidelines
15
+
16
+ - Be concise but informative
17
+ - Use bullet points for easy scanning
18
+ - Highlight the most important items
19
+ - Include relevant context for decisions
20
+ - Note any risks or concerns
21
+ - Keep the tone professional and factual
@@ -0,0 +1,10 @@
1
+ # Weekly Summary Persona
2
+
3
+ You are a professional technical writer who creates concise, informative weekly summaries.
4
+
5
+ Your summaries:
6
+ - Highlight key accomplishments and progress
7
+ - Identify important decisions and changes
8
+ - Note blockers or challenges
9
+ - Are written in clear, professional language
10
+ - Focus on what matters most to stakeholders
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  > **Transform voice memos into perfectly organized, context-aware notes—without the transcription chaos.**
4
4
 
5
+ <!-- Test publish 2026-01-22 -->
6
+
5
7
  ## The Problem
6
8
 
7
9
  You record voice memos constantly. Quick thoughts, meeting notes, ideas to remember. But the reality:
@@ -199,6 +201,10 @@ You're drowning in voice memos but can't use them because they're disorganized.
199
201
 
200
202
  - **Node.js**: Version 18 or higher
201
203
  - **npm**: Version 8 or higher
204
+ - **ffmpeg**: Required for audio format conversion and processing
205
+ - macOS: `brew install ffmpeg`
206
+ - Ubuntu/Debian: `apt-get install ffmpeg`
207
+ - Windows: Download from [ffmpeg.org](https://ffmpeg.org/download.html)
202
208
  - **API Key**: OpenAI API key (required for transcription and reasoning)
203
209
  - Optionally: Anthropic API key for Claude models
204
210
 
@@ -207,6 +213,15 @@ You're drowning in voice memos but can't use them because they're disorganized.
207
213
  1. **OpenAI**: Sign up at [platform.openai.com](https://platform.openai.com) and create an API key
208
214
  2. **Anthropic** (optional): Sign up at [console.anthropic.com](https://console.anthropic.com) for Claude models
209
215
 
216
+ ### Why ffmpeg?
217
+
218
+ Protokoll uses ffmpeg to:
219
+ - **Convert audio formats**: Automatically converts unsupported formats (like .qta, .aif, .aiff) to formats compatible with OpenAI's Whisper API
220
+ - **Split large files**: Breaks audio files larger than 25MB into chunks for processing
221
+ - **Extract metadata**: Reads creation timestamps and duration from audio files
222
+
223
+ The conversion happens transparently—just point Protokoll at any audio file and it will handle the rest.
224
+
210
225
  ## Installation
211
226
 
212
227
  ### From npm (Recommended)
@@ -1824,6 +1839,29 @@ export OPENAI_API_KEY='sk-your-key'
1824
1839
  echo "OPENAI_API_KEY=sk-your-key" > .env
1825
1840
  ```
1826
1841
 
1842
+ #### "Invalid file format" or "Unsupported audio format"
1843
+
1844
+ Protokoll automatically converts unsupported audio formats to MP3. If you see this error:
1845
+
1846
+ 1. **Install ffmpeg** (required for audio conversion):
1847
+ ```bash
1848
+ # macOS
1849
+ brew install ffmpeg
1850
+
1851
+ # Ubuntu/Debian
1852
+ sudo apt-get install ffmpeg
1853
+
1854
+ # Windows: download from ffmpeg.org
1855
+ ```
1856
+
1857
+ 2. **Supported formats** (native to OpenAI Whisper):
1858
+ - `.flac`, `.m4a`, `.mp3`, `.mp4`, `.mpeg`, `.mpga`, `.oga`, `.ogg`, `.wav`, `.webm`
1859
+
1860
+ 3. **Auto-converted formats** (requires ffmpeg):
1861
+ - `.qta` (QuickTime Audio), `.aif`, `.aiff`, `.wma`, and most other audio formats
1862
+
1863
+ The conversion happens automatically and the converted file is cached in the interim directory for faster reprocessing.
1864
+
1827
1865
  #### "Audio file too large"
1828
1866
 
1829
1867
  Files over 25MB are automatically split. If splitting fails:
@@ -2229,3 +2267,6 @@ Apache-2.0
2229
2267
  ## Author
2230
2268
 
2231
2269
  Tim O'Brien <tobrien@discursive.com>
2270
+ TEST
2271
+ TEST
2272
+ TEST
@@ -0,0 +1,10 @@
1
+ # Test Activity for Week 4, 2026
2
+
3
+ ## Completed Tasks
4
+ - Fixed model default configuration bug in kronologi
5
+ - Added executable permissions to built files
6
+ - Updated documentation for configuration hierarchy
7
+
8
+ ## In Progress
9
+ - Testing weekly summary functionality
10
+ - Verifying build process improvements
package/dist/main.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import 'dotenv/config';
3
3
  import { Command } from 'commander';
4
- import { P as PROGRAM_NAME, D as DEFAULT_REASONING_LEVEL, V as VERSION, a as PROTOKOLL_DEFAULTS, g as getLogger, b as DEFAULT_MAX_AUDIO_SIZE, c as create$2, d as create$3, e as DEFAULT_INTERMEDIATE_DIRECTORY, A as ALLOWED_OUTPUT_FILENAME_OPTIONS, f as ALLOWED_OUTPUT_STRUCTURES, h as ALLOWED_AUDIO_EXTENSIONS, i as DEFAULT_OUTPUT_DIRECTORY, j as DEFAULT_INPUT_DIRECTORY, k as DEFAULT_OUTPUT_FILENAME_OPTIONS, l as DEFAULT_OUTPUT_STRUCTURE, m as DEFAULT_AUDIO_EXTENSIONS, n as DEFAULT_TIMEZONE, o as DEFAULT_CONFIG_DIR, s as setLogLevel, p as create$4, q as create$5, r as create$6, t as DEFAULT_CONTEXT_DIR_NAME, u as DEFAULT_CONTEXT_CONFIG_FILE_NAME, v as DEFAULT_MODEL, w as DEFAULT_TRANSCRIPTION_MODEL, x as registerActionCommands, y as registerFeedbackCommands, z as registerTranscriptCommands } from './transcript.js';
4
+ import { P as PROGRAM_NAME, D as DEFAULT_REASONING_LEVEL, V as VERSION, a as PROTOKOLL_DEFAULTS, b as DEFAULT_MAX_AUDIO_SIZE, g as getLogger, c as create$2, d as create$3, e as DEFAULT_INTERMEDIATE_DIRECTORY, A as ALLOWED_OUTPUT_FILENAME_OPTIONS, f as ALLOWED_OUTPUT_STRUCTURES, h as ALLOWED_AUDIO_EXTENSIONS, i as DEFAULT_OUTPUT_DIRECTORY, j as DEFAULT_INPUT_DIRECTORY, k as DEFAULT_OUTPUT_FILENAME_OPTIONS, l as DEFAULT_OUTPUT_STRUCTURE, m as DEFAULT_AUDIO_EXTENSIONS, n as DEFAULT_TIMEZONE, o as DEFAULT_CONFIG_DIR, s as setLogLevel, p as create$4, q as create$5, r as create$6, t as DEFAULT_CONTEXT_DIR_NAME, u as DEFAULT_CONTEXT_CONFIG_FILE_NAME, v as DEFAULT_MODEL, w as DEFAULT_TRANSCRIPTION_MODEL, x as registerActionCommands, y as registerFeedbackCommands, z as registerTranscriptCommands } from './transcript.js';
5
5
  import dayjs from 'dayjs';
6
6
  import timezone from 'dayjs/plugin/timezone.js';
7
7
  import utc from 'dayjs/plugin/utc.js';
@@ -20,12 +20,12 @@ import * as path from 'path';
20
20
  import 'child_process';
21
21
  import 'openai';
22
22
  import 'fluent-ffmpeg';
23
+ import 'node:os';
23
24
  import 'node:fs';
24
25
  import 'node:crypto';
25
26
  import 'node:fs/promises';
26
27
  import 'html-to-text';
27
28
  import 'fs';
28
- import 'node:os';
29
29
  import 'winston';
30
30
  import '@riotprompt/riotprompt';
31
31
 
@@ -0,0 +1,3 @@
1
+ # Batch Transcription
2
+
3
+ I want to batch process audio files in: ${directory}
@@ -0,0 +1,9 @@
1
+ # Edit Entity
2
+
3
+ ${userMessage}
4
+
5
+ I'll help you edit the ${entityType} "${entityId}".
6
+
7
+ ${entityGuidance}
8
+
9
+ ${modificationNote}
@@ -0,0 +1,3 @@
1
+ # Add or Update Entity
2
+
3
+ I want to add a ${entityType} called: ${entityName}
@@ -0,0 +1,3 @@
1
+ # Find and Analyze Transcripts
2
+
3
+ I want to search for transcripts in: ${directory}
@@ -0,0 +1,13 @@
1
+ # Review and Improve Transcript
2
+
3
+ I want to review and improve the transcript at: ${transcriptPath}
4
+
5
+ I'll help you review "${transcriptPath}".
6
+
7
+ **Focus areas:**
8
+ - ${focusArea}
9
+
10
+ **To proceed:**
11
+ 1. Call `protokoll_feedback_analyze` to analyze the transcript
12
+ 2. Review suggested corrections
13
+ 3. Apply corrections using `protokoll_feedback_apply`
@@ -0,0 +1,12 @@
1
+ # Setup New Protokoll Project
2
+
3
+ I want to create a new Protokoll project called: ${projectName}
4
+
5
+ I'll help you set up the "${projectName}" project.
6
+
7
+ **Steps:**
8
+ 1. Call `protokoll_create_project` with:
9
+ - projectName: "${projectName}"${sourceUrlLine}${destinationLine}
10
+
11
+ 2. The tool will create the project YAML file
12
+ 3. Configure routing, trigger phrases, and other metadata as needed
@@ -0,0 +1,8 @@
1
+ # Transcribe Audio with Context
2
+
3
+ I want to transcribe the audio file: ${audioFile}
4
+
5
+ ${discoverySection}
6
+
7
+ To start transcription, call `protokoll_process_audio` with:
8
+ - audioFile: "${audioFile}"