personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add PLAUD_ACCESS_TOKEN to settings UI and wire importer backend

Settings > API Keys now shows Plaud field with password input and help text.

PlaudBackend.sync() reads token from env with clear error if missing.

Updated .env.example and docs/JOURNAL.md documentation.

Updated tests for token-check behavior.

+36 -4
+4
.env.example
··· 13 13 # Rev.ai token for imported audio transcription (optional) 14 14 # Sign up: https://www.rev.ai/ then get token at https://www.rev.ai/access_token 15 15 REVAI_ACCESS_TOKEN=your-revai-token 16 + 17 + # Plaud access token for importing Plaud recordings (optional) 18 + # Log into the Plaud web portal and extract token from browser console 19 + PLAUD_ACCESS_TOKEN=your-plaud-token
+2 -1
apps/settings/routes.py
··· 30 30 "ANTHROPIC_API_KEY", 31 31 "OPENAI_API_KEY", 32 32 "REVAI_ACCESS_TOKEN", 33 + "PLAUD_ACCESS_TOKEN", 33 34 ] 34 35 35 36 ··· 66 67 - identity: User profile (name, preferred, bio, pronouns, aliases, etc.) 67 68 - transcribe: Transcription settings (device, model, compute_type) 68 69 - convey: Web app settings (password) 69 - - env: API keys (GOOGLE_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY, REVAI_ACCESS_TOKEN) 70 + - env: API keys (GOOGLE_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY, REVAI_ACCESS_TOKEN, PLAUD_ACCESS_TOKEN) 70 71 71 72 Note: Model/provider configuration is done via the 'providers' section in 72 73 journal.json. See docs/JOURNAL.md for the providers config format.
+11
apps/settings/workspace.html
··· 1761 1761 </div> 1762 1762 <small>Audio transcription for imported files. <a href="https://www.rev.ai/access_token" target="_blank">Get token</a></small> 1763 1763 </div> 1764 + <div class="settings-field"> 1765 + <label for="field-env-plaud">Plaud</label> 1766 + <div class="password-wrap"> 1767 + <input type="password" id="field-env-plaud" data-section="env" data-key="PLAUD_ACCESS_TOKEN" placeholder="Enter access token"> 1768 + <button type="button" class="password-toggle" data-toggle="field-env-plaud" title="Show token"> 1769 + <span>&#128065;</span> 1770 + </button> 1771 + </div> 1772 + <small>Import audio from Plaud recorder. Log into the web portal and extract token from browser console.</small> 1773 + </div> 1764 1774 </section> 1765 1775 1766 1776 <!-- Transcription Section --> ··· 2342 2352 updateEnvStatus('field-env-openai', env.OPENAI_API_KEY, sysEnv.OPENAI_API_KEY); 2343 2353 updateEnvStatus('field-env-anthropic', env.ANTHROPIC_API_KEY, sysEnv.ANTHROPIC_API_KEY); 2344 2354 updateEnvStatus('field-env-revai', env.REVAI_ACCESS_TOKEN, sysEnv.REVAI_ACCESS_TOKEN); 2355 + updateEnvStatus('field-env-plaud', env.PLAUD_ACCESS_TOKEN, sysEnv.PLAUD_ACCESS_TOKEN); 2345 2356 } 2346 2357 2347 2358 function updateEnvStatus(fieldId, isJournalConfigured, isSystemConfigured) {
+2 -1
docs/JOURNAL.md
··· 159 159 "GOOGLE_API_KEY": "your-google-api-key", 160 160 "ANTHROPIC_API_KEY": "your-anthropic-api-key", 161 161 "OPENAI_API_KEY": "your-openai-api-key", 162 - "REVAI_ACCESS_TOKEN": "your-revai-token" 162 + "REVAI_ACCESS_TOKEN": "your-revai-token", 163 + "PLAUD_ACCESS_TOKEN": "your-plaud-token" 163 164 } 164 165 } 165 166 ```
+12 -2
tests/test_importer_sync.py
··· 75 75 assert isinstance(PlaudBackend(), SyncableBackend) 76 76 77 77 78 - def test_plaud_sync_not_implemented(tmp_path): 79 - """PlaudBackend.sync() raises NotImplementedError.""" 78 + def test_plaud_sync_not_implemented(tmp_path, monkeypatch): 79 + """With token configured, PlaudBackend.sync() raises NotImplementedError.""" 80 80 from think.importers.plaud import PlaudBackend 81 81 82 + monkeypatch.setenv("PLAUD_ACCESS_TOKEN", "test-token") 82 83 with pytest.raises(NotImplementedError): 84 + PlaudBackend().sync(tmp_path) 85 + 86 + 87 + def test_plaud_sync_requires_token(tmp_path, monkeypatch): 88 + """Without token configured, PlaudBackend.sync() raises ValueError.""" 89 + from think.importers.plaud import PlaudBackend 90 + 91 + monkeypatch.delenv("PLAUD_ACCESS_TOKEN", raising=False) 92 + with pytest.raises(ValueError, match="PLAUD_ACCESS_TOKEN"): 83 93 PlaudBackend().sync(tmp_path) 84 94 85 95
+5
think/importers/plaud.py
··· 282 282 283 283 Not yet implemented — Phase 2 will wire up actual sync. 284 284 """ 285 + token = os.getenv("PLAUD_ACCESS_TOKEN") 286 + if not token: 287 + raise ValueError( 288 + "PLAUD_ACCESS_TOKEN not configured — set in Settings > API Keys" 289 + ) 285 290 raise NotImplementedError("Plaud sync execution is not yet implemented") 286 291 287 292