@redaksjon/protokoll 0.0.13 → 0.0.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.
Files changed (108) hide show
  1. package/README.md +199 -0
  2. package/dist/feedback.js +5193 -0
  3. package/dist/feedback.js.map +1 -0
  4. package/dist/main.js +1858 -9
  5. package/dist/main.js.map +1 -1
  6. package/dist/mcp/server.js +1330 -0
  7. package/dist/mcp/server.js.map +1 -0
  8. package/guide/index.md +16 -0
  9. package/guide/mcp-integration.md +341 -0
  10. package/package.json +5 -3
  11. package/tsconfig.tsbuildinfo +1 -1
  12. package/vite.config.ts +13 -29
  13. package/dist/agentic/executor.js +0 -747
  14. package/dist/agentic/executor.js.map +0 -1
  15. package/dist/agentic/index.js +0 -19
  16. package/dist/agentic/index.js.map +0 -1
  17. package/dist/agentic/registry.js +0 -41
  18. package/dist/agentic/registry.js.map +0 -1
  19. package/dist/agentic/tools/lookup-person.js +0 -185
  20. package/dist/agentic/tools/lookup-person.js.map +0 -1
  21. package/dist/agentic/tools/lookup-project.js +0 -210
  22. package/dist/agentic/tools/lookup-project.js.map +0 -1
  23. package/dist/agentic/tools/route-note.js +0 -49
  24. package/dist/agentic/tools/route-note.js.map +0 -1
  25. package/dist/agentic/tools/store-context.js +0 -51
  26. package/dist/agentic/tools/store-context.js.map +0 -1
  27. package/dist/agentic/tools/verify-spelling.js +0 -57
  28. package/dist/agentic/tools/verify-spelling.js.map +0 -1
  29. package/dist/arguments.js +0 -178
  30. package/dist/arguments.js.map +0 -1
  31. package/dist/cli/action.js +0 -704
  32. package/dist/cli/action.js.map +0 -1
  33. package/dist/cli/config.js +0 -482
  34. package/dist/cli/config.js.map +0 -1
  35. package/dist/cli/context.js +0 -466
  36. package/dist/cli/context.js.map +0 -1
  37. package/dist/cli/feedback.js +0 -858
  38. package/dist/cli/feedback.js.map +0 -1
  39. package/dist/cli/index.js +0 -103
  40. package/dist/cli/index.js.map +0 -1
  41. package/dist/cli/install.js +0 -572
  42. package/dist/cli/install.js.map +0 -1
  43. package/dist/cli/transcript.js +0 -199
  44. package/dist/cli/transcript.js.map +0 -1
  45. package/dist/constants.js +0 -91
  46. package/dist/constants.js.map +0 -1
  47. package/dist/context/discovery.js +0 -114
  48. package/dist/context/discovery.js.map +0 -1
  49. package/dist/context/index.js +0 -82
  50. package/dist/context/index.js.map +0 -1
  51. package/dist/context/storage.js +0 -184
  52. package/dist/context/storage.js.map +0 -1
  53. package/dist/interactive/handler.js +0 -524
  54. package/dist/interactive/handler.js.map +0 -1
  55. package/dist/interactive/index.js +0 -18
  56. package/dist/interactive/index.js.map +0 -1
  57. package/dist/interactive/onboarding.js +0 -28
  58. package/dist/interactive/onboarding.js.map +0 -1
  59. package/dist/logging.js +0 -46
  60. package/dist/logging.js.map +0 -1
  61. package/dist/output/index.js +0 -8
  62. package/dist/output/index.js.map +0 -1
  63. package/dist/output/manager.js +0 -150
  64. package/dist/output/manager.js.map +0 -1
  65. package/dist/phases/complete.js +0 -142
  66. package/dist/phases/complete.js.map +0 -1
  67. package/dist/phases/locate.js +0 -64
  68. package/dist/phases/locate.js.map +0 -1
  69. package/dist/pipeline/index.js +0 -8
  70. package/dist/pipeline/index.js.map +0 -1
  71. package/dist/pipeline/orchestrator.js +0 -354
  72. package/dist/pipeline/orchestrator.js.map +0 -1
  73. package/dist/protokoll.js +0 -180
  74. package/dist/protokoll.js.map +0 -1
  75. package/dist/reasoning/client.js +0 -233
  76. package/dist/reasoning/client.js.map +0 -1
  77. package/dist/reasoning/index.js +0 -37
  78. package/dist/reasoning/index.js.map +0 -1
  79. package/dist/reasoning/strategy.js +0 -60
  80. package/dist/reasoning/strategy.js.map +0 -1
  81. package/dist/reflection/collector.js +0 -124
  82. package/dist/reflection/collector.js.map +0 -1
  83. package/dist/reflection/index.js +0 -16
  84. package/dist/reflection/index.js.map +0 -1
  85. package/dist/reflection/reporter.js +0 -238
  86. package/dist/reflection/reporter.js.map +0 -1
  87. package/dist/routing/classifier.js +0 -201
  88. package/dist/routing/classifier.js.map +0 -1
  89. package/dist/routing/index.js +0 -27
  90. package/dist/routing/index.js.map +0 -1
  91. package/dist/routing/router.js +0 -153
  92. package/dist/routing/router.js.map +0 -1
  93. package/dist/transcription/index.js +0 -41
  94. package/dist/transcription/index.js.map +0 -1
  95. package/dist/transcription/service.js +0 -64
  96. package/dist/transcription/service.js.map +0 -1
  97. package/dist/transcription/types.js +0 -31
  98. package/dist/transcription/types.js.map +0 -1
  99. package/dist/util/dates.js +0 -96
  100. package/dist/util/dates.js.map +0 -1
  101. package/dist/util/media.js +0 -103
  102. package/dist/util/media.js.map +0 -1
  103. package/dist/util/metadata.js +0 -95
  104. package/dist/util/metadata.js.map +0 -1
  105. package/dist/util/sound.js +0 -116
  106. package/dist/util/sound.js.map +0 -1
  107. package/dist/util/storage.js +0 -135
  108. package/dist/util/storage.js.map +0 -1
package/README.md CHANGED
@@ -94,6 +94,7 @@ The goal is simple: **After a few weeks of use, Protokoll should understand your
94
94
  - [Output Structure](#output-structure)
95
95
  - [Supported Models](#supported-models)
96
96
  - [Troubleshooting](#troubleshooting)
97
+ - [MCP Server Integration](#mcp-server-integration)
97
98
  - [Architecture](#architecture)
98
99
  - [Examples](#examples)
99
100
 
@@ -1263,6 +1264,204 @@ Check `./output/protokoll/` for:
1263
1264
  - LLM requests/responses
1264
1265
  - Routing decisions
1265
1266
 
1267
+ ## MCP Server Integration
1268
+
1269
+ Protokoll can run as an MCP (Model Context Protocol) server, allowing AI assistants like Cursor and Claude to interact with transcription and context management directly—without needing to understand command-line interfaces.
1270
+
1271
+ ### Why MCP?
1272
+
1273
+ Traditional workflow:
1274
+ 1. Open terminal
1275
+ 2. Navigate to directory
1276
+ 3. Remember command syntax
1277
+ 4. Copy-paste file paths
1278
+ 5. Run commands
1279
+
1280
+ With MCP, you just talk naturally:
1281
+ - *"Can you transcribe this meeting recording?"*
1282
+ - *"Add Sanjay Gupta as a person - Whisper mishears him as 'San Jay Grouper'"*
1283
+ - *"This should be in the Quantum Readiness project"*
1284
+
1285
+ The AI handles all the details.
1286
+
1287
+ ### Project-Aware Configuration
1288
+
1289
+ **Important**: Protokoll supports multiple project configurations. When you have different `.protokoll` directories for different projects, the MCP server intelligently discovers and uses the right configuration.
1290
+
1291
+ #### How It Works
1292
+
1293
+ When you ask to transcribe a file, the AI:
1294
+
1295
+ 1. **Discovers configurations** - Walks up the directory tree to find `.protokoll` directories
1296
+ 2. **Suggests projects** - Analyzes the file path to determine which project it likely belongs to
1297
+ 3. **Asks for clarification** - If ambiguous, asks which project to use
1298
+ 4. **Processes with context** - Uses the appropriate configuration for transcription
1299
+
1300
+ #### Example: Ambiguous Location
1301
+
1302
+ ```
1303
+ You: "Can you transcribe ~/Downloads/meeting.m4a?"
1304
+
1305
+ AI: "I found your Protokoll configuration with 3 projects configured.
1306
+ Based on the file location in Downloads, I can't automatically
1307
+ determine which project this belongs to. Is this for:
1308
+ 1. Client Alpha
1309
+ 2. Internal Notes
1310
+ 3. Personal
1311
+ Which project should I use?"
1312
+
1313
+ You: "It's for Client Alpha"
1314
+
1315
+ AI: "Got it! Processing with Client Alpha configuration..."
1316
+ [transcribes and routes to ~/notes/client-alpha/]
1317
+ ```
1318
+
1319
+ #### Example: Clear Location
1320
+
1321
+ ```
1322
+ You: "Transcribe ~/work/client-alpha/recordings/standup.m4a"
1323
+
1324
+ AI: "Found Client Alpha configuration nearby. Processing..."
1325
+ [automatically uses the right config and routing]
1326
+ ```
1327
+
1328
+ ### Available MCP Tools
1329
+
1330
+ | Tool | Purpose |
1331
+ |------|---------|
1332
+ | **Discovery** | |
1333
+ | `protokoll_discover_config` | Find .protokoll configurations for a file/directory |
1334
+ | `protokoll_suggest_project` | Determine which project a file belongs to |
1335
+ | **Transcription** | |
1336
+ | `protokoll_process_audio` | Process a single audio file |
1337
+ | `protokoll_batch_process` | Process all audio files in a directory |
1338
+ | **Context Management** | |
1339
+ | `protokoll_context_status` | Get status of the context system |
1340
+ | `protokoll_list_projects` | List all configured projects |
1341
+ | `protokoll_list_people` | List all people in context |
1342
+ | `protokoll_list_terms` | List technical terms |
1343
+ | `protokoll_list_companies` | List companies |
1344
+ | `protokoll_search_context` | Search across all entity types |
1345
+ | `protokoll_get_entity` | Get detailed info about an entity |
1346
+ | `protokoll_add_person` | Add a new person to context |
1347
+ | `protokoll_add_project` | Add a new project |
1348
+ | `protokoll_add_term` | Add a technical term |
1349
+ | `protokoll_add_company` | Add a company |
1350
+ | `protokoll_delete_entity` | Delete an entity |
1351
+ | **Transcript Actions** | |
1352
+ | `protokoll_read_transcript` | Read and parse a transcript file |
1353
+ | `protokoll_edit_transcript` | Edit title or change project |
1354
+ | `protokoll_combine_transcripts` | Combine multiple transcripts |
1355
+ | `protokoll_provide_feedback` | Natural language feedback to correct transcripts |
1356
+
1357
+ ### Setup
1358
+
1359
+ Add Protokoll to your MCP configuration:
1360
+
1361
+ **One-Time Setup (works for all projects):**
1362
+
1363
+ ```json
1364
+ {
1365
+ "mcpServers": {
1366
+ "protokoll": {
1367
+ "command": "npx",
1368
+ "args": ["-y", "-p", "@redaksjon/protokoll", "protokoll-mcp"]
1369
+ }
1370
+ }
1371
+ }
1372
+ ```
1373
+
1374
+ Or if installed globally (`npm install -g @redaksjon/protokoll`):
1375
+
1376
+ ```json
1377
+ {
1378
+ "mcpServers": {
1379
+ "protokoll": {
1380
+ "command": "protokoll-mcp"
1381
+ }
1382
+ }
1383
+ }
1384
+ ```
1385
+
1386
+ **For Cursor:** Add to `~/.cursor/mcp.json`
1387
+
1388
+ **For Claude Desktop:** Add to `~/Library/Application Support/Claude/claude_desktop_config.json`
1389
+
1390
+ ### Example Conversations
1391
+
1392
+ **Basic Transcription:**
1393
+ ```
1394
+ Human: Transcribe ~/recordings/standup.m4a
1395
+
1396
+ AI: [discovers config, suggests project]
1397
+
1398
+ AI: Done! Transcript saved to ~/notes/2026/01/16-0900-standup.md
1399
+ Project: Daily Standups (95% confidence)
1400
+ People recognized: Sarah Chen, Mike Johnson
1401
+ ```
1402
+
1403
+ **Add Context:**
1404
+ ```
1405
+ Human: "San Jay" should be "Sanjay Gupta" - he's a product manager at Acme
1406
+
1407
+ AI: [calls protokoll_add_person]
1408
+
1409
+ AI: Added Sanjay Gupta to your context. Future transcripts will
1410
+ recognize "San Jay", "Sanjay", and similar variations.
1411
+ ```
1412
+
1413
+ **Provide Feedback:**
1414
+ ```
1415
+ Human: In that last transcript, WCMP should be WCNP
1416
+
1417
+ AI: [calls protokoll_provide_feedback]
1418
+
1419
+ AI: Fixed! I replaced "WCMP" with "WCNP" (3 occurrences) and added
1420
+ WCNP to your vocabulary for future transcripts.
1421
+ ```
1422
+
1423
+ **Combine Transcripts:**
1424
+ ```
1425
+ Human: Combine these three meeting parts into one:
1426
+ ~/notes/meeting-part1.md
1427
+ ~/notes/meeting-part2.md
1428
+ ~/notes/meeting-part3.md
1429
+
1430
+ AI: [calls protokoll_combine_transcripts]
1431
+
1432
+ AI: Combined into ~/notes/16-1400-full-meeting.md
1433
+ The source files have been deleted.
1434
+ ```
1435
+
1436
+ ### Configuration Hierarchy
1437
+
1438
+ The MCP server respects Protokoll's hierarchical configuration:
1439
+
1440
+ ```
1441
+ ~/
1442
+ ├── .protokoll/ # Global config (shared context)
1443
+ │ ├── config.yaml
1444
+ │ ├── people/ # People you mention across all projects
1445
+ │ └── companies/
1446
+ └── work/
1447
+ └── client-alpha/
1448
+ └── .protokoll/ # Project-specific (overrides global)
1449
+ ├── config.yaml # Client-specific settings
1450
+ ├── people/ # Client Alpha contacts
1451
+ └── projects/ # Routing for this client
1452
+ ```
1453
+
1454
+ When processing a file, the nearest `.protokoll` takes precedence, but inherits from parent directories.
1455
+
1456
+ ### Best Practices
1457
+
1458
+ 1. **Create project-specific configs** when you have different routing needs
1459
+ 2. **Use global config** for shared context (common terms, general contacts)
1460
+ 3. **Let the AI discover** - it will ask when clarification is needed
1461
+ 4. **Accept context suggestions** - when the AI offers to add terms/people, say yes
1462
+
1463
+ For complete documentation, see the [MCP Integration Guide](./guide/mcp-integration.md).
1464
+
1266
1465
  ## Architecture
1267
1466
 
1268
1467
  Protokoll is built with a modular architecture designed for extensibility: