···424424 against the provider API, and stores results in providers.key_validation.
425425 """
426426 try:
427427- from think.providers import PROVIDER_METADATA, validate_key as _validate_key
427427+ from think.providers import PROVIDER_METADATA
428428+ from think.providers import validate_key as _validate_key
428429429430 config = get_journal_config()
430431 env_config = config.get("env", {})
···145145 sources = {"transcripts": True, "percepts": False, "agents": True}
146146147147 # Validate mutually exclusive selection modes
148148- mode_count = sum([
149149- segment is not None,
150150- segments is not None,
151151- start is not None or length is not None,
152152- ])
148148+ mode_count = sum(
149149+ [
150150+ segment is not None,
151151+ segments is not None,
152152+ start is not None or length is not None,
153153+ ]
154154+ )
153155 if mode_count > 1:
154156 typer.echo(
155157 "Error: Cannot mix --segment, --segments, and --start/--length.",
···175175 return changed
176176177177178178-def _get_eligible_suggestion(routines_config: dict, journal_config: dict) -> dict | None:
178178+def _get_eligible_suggestion(
179179+ routines_config: dict, journal_config: dict
180180+) -> dict | None:
179181 """Evaluate 5-gate chain and return the best eligible suggestion, or None."""
180182 meta = routines_config.get("_meta", {})
181183···352354 f"First seen: {suggestion['first_trigger']}\n\n"
353355 "### Etiquette\n"
354356 "- Mention this ONCE, naturally, at the end of your response\n"
355355- '- Frame as observation: "I\'ve noticed you often... — would a '
357357+ "- Frame as observation: \"I've noticed you often... — would a "
356358 'routine help?"\n'
357359 "- If $name declines or ignores, do not bring it up again this "
358360 "conversation\n"
+1-1
observe/remote_cli.py
···143143 print("Remote observer created:")
144144 print(f" Name: {name}")
145145 print(f" Prefix: {key[:8]}")
146146- print(f" server url: (set during server configuration)")
146146+ print(" server url: (set during server configuration)")
147147 print(f" api key: {key}")
148148 return 0
149149
+1
observe/transcribe/revai.py
···3333import numpy as np
3434import requests
3535import soundfile as sf
3636+3637API_BASE = "https://api.rev.ai/speechtotext/v1"
37383839# Default configuration
···63636464 sm = ActivityStateMachine()
6565 sm.update(_sense(content_type="coding"), "090000_300", "20260304")
6666- changes = sm.update(
6767- _sense(content_type="meeting"), "090500_300", "20260304"
6868- )
6666+ changes = sm.update(_sense(content_type="meeting"), "090500_300", "20260304")
69677068 assert len(changes) == 2
7169 ended = [c for c in changes if c["state"] == "ended"]
+3-1
tests/test_awareness.py
···10261026 def test_self_md_wrapper_still_works(self, tmp_path):
10271027 from think.awareness import update_self_md_section
1028102810291029- self_md = "# self\n\n## my name\nsol (default)\n\n## who I'm here for\nTest User\n"
10291029+ self_md = (
10301030+ "# self\n\n## my name\nsol (default)\n\n## who I'm here for\nTest User\n"
10311031+ )
10301032 (tmp_path / "sol").mkdir(exist_ok=True)
10311033 (tmp_path / "sol" / "self.md").write_text(self_md)
10321034
+1
tests/test_cogitate_coder.py
···177177 cmd = mock_runner_cls.call_args.kwargs["cmd"]
178178 assert "--allowed-tools" not in cmd
179179180180+180181# ---------------------------------------------------------------------------
181182# muse/coder.md existence and frontmatter
182183# ---------------------------------------------------------------------------
···8686 raise ValueError("GOOGLE_API_KEY not found in environment")
8787 client = genai.Client(
8888 api_key=api_key,
8989- http_options=types.HttpOptions(retry_options=types.HttpRetryOptions(attempts=8)),
8989+ http_options=types.HttpOptions(
9090+ retry_options=types.HttpRetryOptions(attempts=8)
9191+ ),
9092 )
9193 return client
9294
+4-1
think/service.py
···2626import subprocess
2727import sys
2828from pathlib import Path
2929+2930from think.utils import get_journal, get_journal_info
30313132SERVICE_LABEL = "org.solpbc.solstone"
···9091 return plistlib.dumps(plist)
919292939393-def _generate_systemd_unit(env: dict[str, str], port: int = DEFAULT_SERVICE_PORT) -> str:
9494+def _generate_systemd_unit(
9595+ env: dict[str, str], port: int = DEFAULT_SERVICE_PORT
9696+) -> str:
9497 """Generate a systemd user unit for the solstone supervisor."""
9598 sol = _sol_bin()
9699 env_lines = "\n".join(f"Environment={k}={v}" for k, v in sorted(env.items()))
+1-3
think/tools/routines.py
···400400 suggestions = meta.get("suggestions", {})
401401402402 if template not in suggestions:
403403- typer.echo(
404404- f"Error: no suggestion state for template '{template}'.", err=True
405405- )
403403+ typer.echo(f"Error: no suggestion state for template '{template}'.", err=True)
406404 raise typer.Exit(code=1)
407405408406 from datetime import date