@redaksjon/protokoll 0.4.3 → 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.
@@ -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
 
@@ -4,24 +4,24 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
4
4
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
5
5
  import { ListToolsRequestSchema, CallToolRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema } from '@modelcontextprotocol/sdk/types.js';
6
6
  import { fileURLToPath } from 'node:url';
7
- import { readFile, stat, mkdir, writeFile, unlink } from 'node:fs/promises';
8
7
  import { resolve, dirname } from 'node:path';
9
- import { q as create, B as listTranscripts, d as create$1, g as getLogger, c as create$2, 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';
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';
10
10
  import * as yaml from 'js-yaml';
11
11
  import { readFileSync } from 'node:fs';
12
12
  import { glob } from 'glob';
13
13
  import { create as create$7 } from '../term-assist.js';
14
- import { create as create$5, buildAnalysisContext } from '../term-context.js';
14
+ import { buildAnalysisContext, create as create$5 } from '../term-context.js';
15
15
  import 'readline';
16
16
  import 'child_process';
17
17
  import 'fs/promises';
18
18
  import 'openai';
19
19
  import 'fluent-ffmpeg';
20
+ import 'node:os';
20
21
  import 'node:crypto';
21
22
  import 'html-to-text';
22
23
  import 'commander';
23
24
  import 'fs';
24
- import 'node:os';
25
25
  import 'winston';
26
26
  import '@riotprompt/riotprompt';
27
27
 
@@ -3324,7 +3324,7 @@ async function main() {
3324
3324
  await new Promise(() => {
3325
3325
  });
3326
3326
  }
3327
- const isMainModule = import.meta.url.startsWith("file:") && process.argv[1] === fileURLToPath(import.meta.url);
3327
+ const isMainModule = import.meta.url.startsWith("file:") && resolve(process.argv[1]) === resolve(fileURLToPath(import.meta.url));
3328
3328
  if (isMainModule) {
3329
3329
  main().catch((error) => {
3330
3330
  console.error(error);