dictawhisper 0.0.0 → 0.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.
Files changed (2) hide show
  1. package/README.md +30 -8
  2. package/package.json +6 -3
package/README.md CHANGED
@@ -12,7 +12,7 @@ The npm package is a name hold. Clone this repo to run it.
12
12
 
13
13
  The name is **dicta** (dictation, a dictaphone) plus **Whisper**. Audio stays on this computer. The `.json` next to each recording is the note: no database, no account.
14
14
 
15
- Open the UI at [http://localhost:7777](http://localhost:7777). On Tailscale, the same page is reachable from your phone.
15
+ Open the UI at [http://localhost:7777](http://localhost:7777). On Tailscale, the same page is reachable from your phone. If [LocalBerth](https://www.npmjs.com/package/localberth) is installed, 7777 is the `dictawhisper` slip and 8008 is `dictawhisper-api` (loopback; not `--lan`).
16
16
 
17
17
  ---
18
18
 
@@ -24,7 +24,7 @@ Voice notes are easy to make and hard to keep. Phone recordings pile up as undat
24
24
  2. **Accurate, local transcription:** `large-v3` on CUDA, a prompt seeded with your own vocabulary, word times that survive cleanup.
25
25
  3. **Usable notes:** cleaned prose, tags, playback that follows the cleaned paragraphs, files you can copy and back up.
26
26
 
27
- By default the API binds to `127.0.0.1`. Turn on `http.tailscale` and the UI listens on your tailnet so a phone or laptop on the same Tailscale can open it. File APIs only accept paths under your watch roots. If cleanup is unavailable, you still get the raw transcript.
27
+ By default the API binds to `127.0.0.1`. Turn on `http.tailscale` and the inbox also listens on this machine's Tailscale address (`100.x`, plus MagicDNS when you have it) so a phone on the same tailnet can open it. The API stays on loopback; Vite proxies to it. File APIs only accept paths under your watch roots. If cleanup is unavailable, you still get the raw transcript.
28
28
 
29
29
  ---
30
30
 
@@ -53,7 +53,7 @@ Force / retranscribe ───────────────────
53
53
 
54
54
  **Audio never leaves this computer.** Faster-whisper runs here. If you point ollanet at Ollama on another machine on your own network, only the transcript text crosses the network. If ollanet is unreachable, doctor and `/health` report it and you still have the raw words.
55
55
 
56
- **UI on the tailnet.** Default bind is localhost. Set `http.tailscale` (or `DICTA_TAILSCALE=1`) and `pnpm dev` advertises `http://<magicdns>:7777` / `http://<100.x>:7777` so you can read and record from a phone on the same Tailscale. Nothing is published to the public internet, and the app adds no login of its own; tailnet membership is the access control.
56
+ **UI on the tailnet.** Default bind is localhost. Set `http.tailscale` (or `DICTA_TAILSCALE=1`) and `pnpm dev` listens on this machine's Tailscale IPv4 (`100.64.0.0/10`) and advertises `http://<magicdns>:7777` / `http://<100.x>:7777`. localhost:7777 still works. The inbox is not bound to `0.0.0.0` or your LAN. The app adds no login of its own.
57
57
 
58
58
  **Playback aligned to word timestamps.** Cleanup drops fillers and collapses repeated phrases, but playback cues map back to Whisper word timestamps rather than being inferred from the cleaned wording. Copy uses the same sections the player shows.
59
59
 
@@ -66,7 +66,7 @@ Force / retranscribe ───────────────────
66
66
  - **No telemetry.** Nothing contacts an external analytics or telemetry service.
67
67
  - **Audio stays here.** Faster-whisper processes files on this GPU or CPU.
68
68
  - **Text only, and only on your network.** If cleanup runs on another machine you already use, only the transcript text is sent there.
69
- - **Loopback by default.** API (`8008`) and UI (`7777`) bind to `127.0.0.1`. They listen on `0.0.0.0` only if you turn on `http.tailscale`.
69
+ - **Loopback by default.** API (`8008`) and UI (`7777`) bind to `127.0.0.1`. With `http.tailscale`, the inbox also binds to this machine's Tailscale address, not to every interface.
70
70
  - **Path allowlisting.** File routes resolve realpaths and reject anything outside `watch.roots` and `browserDropFolder` with a `403`.
71
71
 
72
72
  ---
@@ -134,7 +134,29 @@ pnpm retranscribe --dir="./notes/2026/08" --limit=5 --reclean
134
134
  pnpm retranscribe --force
135
135
  ```
136
136
 
137
- `--reclean` runs ollanet again after the new transcript. Without it, cleaned text and tags are kept; only words/times/raw text update.
137
+ `--reclean` runs ollanet again after the new transcript. Without it, cleaned text and tags are kept; only words/times/raw text update. Each successful cleanup writes a `cleanup` record (text, time, model, host, prompt version, app version). The previous record, if any, is prepended to `cleanupHistory` (capped). `cleanedTranscription` remains the current text.
138
+
139
+ ---
140
+
141
+ ## MCP (read-only)
142
+
143
+ Agents can search the journal without managing it. `pnpm mcp` is a stdio server over the same sidecar files. No writes. The API does not need to be running.
144
+
145
+ Tools: `dictawhisper_search`, `dictawhisper_get_note`, `dictawhisper_list_tags`, `dictawhisper_recent`.
146
+
147
+ This repo ships `.cursor/mcp.json`. Elsewhere:
148
+
149
+ ```json
150
+ {
151
+ "mcpServers": {
152
+ "dictawhisper": {
153
+ "command": "node",
154
+ "args": ["--experimental-strip-types", "src/mcp.ts"],
155
+ "cwd": "/absolute/path/to/dictawhisper"
156
+ }
157
+ }
158
+ }
159
+ ```
138
160
 
139
161
  ---
140
162
 
@@ -163,8 +185,8 @@ Force/delete/read only accept realpaths under configured watch roots.
163
185
 
164
186
  | Env | Meaning |
165
187
  |---|---|
166
- | `HOST` / `PORT` | API bind (default `127.0.0.1:8008`; Tailscale mode listens on `0.0.0.0`) |
167
- | `DICTA_TAILSCALE` | `1` / `true`: expose UI + API on the tailnet |
188
+ | `HOST` / `PORT` | API bind (default `127.0.0.1:8008`; Tailscale mode does not change this) |
189
+ | `DICTA_TAILSCALE` | `1` / `true`: also bind the inbox to this machine's Tailscale address |
168
190
  | `WHISPER_MODEL` | `large-v3` or `turbo` |
169
191
  | `WHISPER_PYTHON` | Interpreter with faster-whisper |
170
192
  | `WHISPER_DEVICE` | `cuda` or `cpu` |
@@ -180,7 +202,7 @@ Useful `config.json` knobs (see `config.example.json`):
180
202
  - `whisper.computeType`: `float16`, or `int8_float16` if VRAM is tight
181
203
  - `audio.preprocess`: ffmpeg denoise
182
204
  - `queues.*.concurrency`: keep transcription at 1 on a single GPU
183
- - `http.tailscale`: bind beyond localhost and allow Tailscale origins for the UI
205
+ - `http.tailscale`: bind the inbox to this machine's Tailscale address and allow those origins for the UI
184
206
  - `ollanet.required`: treat missing cleanup host/model as a failure (default false; raw transcripts still work)
185
207
 
186
208
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dictawhisper",
3
- "version": "0.0.0",
3
+ "version": "0.0.1",
4
4
  "private": false,
5
5
  "description": "Name hold. The voice journal is a git clone (dictawhisper.com). A CLI or library may land here later.",
6
6
  "homepage": "https://dictawhisper.com",
@@ -32,9 +32,11 @@
32
32
  },
33
33
  "packageManager": "pnpm@8.14.1",
34
34
  "dependencies": {
35
+ "@modelcontextprotocol/sdk": "^1.30.0",
35
36
  "async": "^3.2.6",
36
37
  "chokidar": "^4.0.3",
37
38
  "express": "^4.21.2",
39
+ "fuse.js": "^7.5.0",
38
40
  "multer": "^2.2.0",
39
41
  "ollanet": "^0.6.5",
40
42
  "socket.io": "^4.8.1",
@@ -51,14 +53,15 @@
51
53
  },
52
54
  "scripts": {
53
55
  "start": "node --experimental-strip-types src/server.ts",
54
- "dev": "node --experimental-strip-types src/dev.ts",
56
+ "dev": "node scripts/ensure-lease.mjs dictawhisper 7777 && node scripts/ensure-lease.mjs dictawhisper-api 8008 && node --experimental-strip-types src/dev.ts",
55
57
  "turbo": "WHISPER_MODEL=turbo node --experimental-strip-types src/server.ts",
56
58
  "ui": "pnpm --dir client dev",
57
59
  "typecheck": "tsc --noEmit -p tsconfig.json",
58
60
  "test": "node --experimental-strip-types --test test/*.test.ts",
59
61
  "doctor": "node --experimental-strip-types src/doctor.ts",
62
+ "mcp": "node --experimental-strip-types src/mcp.ts",
60
63
  "retranscribe": "node --experimental-strip-types scripts/retranscribe.ts",
61
- "site:dev": "pnpm --dir site dev",
64
+ "site:dev": "node scripts/ensure-lease.mjs dictawhisper-site 5186 && pnpm --dir site dev",
62
65
  "site:build": "pnpm --dir site build",
63
66
  "site:deploy": "pnpm --dir site run ship",
64
67
  "ship": "pnpm --dir site run ship"