personal memory agent
0
fork

Configure Feed

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

Fix pre-existing ruff formatting and update stale API baselines

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+97 -30
+20 -6
apps/transcripts/call.py
··· 91 91 full: bool = typer.Option( 92 92 False, "--full", help="Include transcripts, screen, and agents." 93 93 ), 94 - raw: bool = typer.Option(False, "--raw", help="Include transcripts and screen only."), 95 - transcripts: bool = typer.Option(False, "--transcripts", help="Include transcript content."), 96 - audio: bool = typer.Option(False, "--audio", help="Alias for --transcripts.", hidden=True), 94 + raw: bool = typer.Option( 95 + False, "--raw", help="Include transcripts and screen only." 96 + ), 97 + transcripts: bool = typer.Option( 98 + False, "--transcripts", help="Include transcript content." 99 + ), 100 + audio: bool = typer.Option( 101 + False, "--audio", help="Alias for --transcripts.", hidden=True 102 + ), 97 103 percepts: bool = typer.Option(False, "--percepts", help="Include screen percepts."), 98 - screen: bool = typer.Option(False, "--screen", help="Alias for --percepts.", hidden=True), 104 + screen: bool = typer.Option( 105 + False, "--screen", help="Alias for --percepts.", hidden=True 106 + ), 99 107 agents: bool = typer.Option(False, "--agents", help="Include agent outputs."), 100 108 max_bytes: int = typer.Option( 101 109 16384, "--max", help="Max output bytes (0 = unlimited)." ··· 120 128 raise typer.Exit(1) 121 129 122 130 if full: 123 - sources: dict[str, bool] = {"transcripts": True, "percepts": True, "agents": True} 131 + sources: dict[str, bool] = { 132 + "transcripts": True, 133 + "percepts": True, 134 + "agents": True, 135 + } 124 136 elif raw: 125 137 sources = {"transcripts": True, "percepts": True, "agents": False} 126 138 elif transcripts or percepts or agents: ··· 160 172 transcript_ranges, screen_ranges = cluster_scan(day) 161 173 if transcript_ranges or screen_ranges: 162 174 days_with_data += 1 163 - typer.echo(f"{day} transcripts:{len(transcript_ranges)} percepts:{len(screen_ranges)}") 175 + typer.echo( 176 + f"{day} transcripts:{len(transcript_ranges)} percepts:{len(screen_ranges)}" 177 + ) 164 178 165 179 if not days_with_data: 166 180 typer.echo(f"No data for {month}.")
+15 -5
tests/baselines/api/stats/stats.json
··· 559 559 "pending_segments": 0, 560 560 "screen_duration": 0.0 561 561 }, 562 + "20260101": { 563 + "day_bytes": 24508, 564 + "outputs_pending": 11, 565 + "outputs_processed": 0, 566 + "pending_segments": 0, 567 + "percept_duration": 0.0, 568 + "transcript_duration": 1557.0, 569 + "transcript_segments": 38, 570 + "transcript_sessions": 8 571 + }, 562 572 "20260130": { 563 573 "audio_duration": 0.0, 564 574 "day_bytes": 275, ··· 1713 1723 } 1714 1724 }, 1715 1725 "total_percept_duration": 0.0, 1716 - "total_transcript_duration": 655.0, 1726 + "total_transcript_duration": 2212.0, 1717 1727 "totals": { 1718 1728 "audio_duration": 1243.0, 1719 1729 "audio_segments": 86, 1720 1730 "audio_sessions": 19, 1721 - "day_bytes": 503294, 1722 - "outputs_pending": 366, 1731 + "day_bytes": 527802, 1732 + "outputs_pending": 377, 1723 1733 "outputs_processed": 14, 1724 1734 "pending_segments": 0, 1725 1735 "percept_frames": 0, ··· 1727 1737 "screen_duration": 23.1, 1728 1738 "screen_frames": 3, 1729 1739 "screen_sessions": 13, 1730 - "transcript_segments": 48, 1731 - "transcript_sessions": 4 1740 + "transcript_segments": 86, 1741 + "transcript_sessions": 12 1732 1742 } 1733 1743 } 1734 1744 }
+1 -1
tests/baselines/api/tokens/stats-month.json
··· 3 3 "20260305": 0.038015, 4 4 "20260306": 0.038015, 5 5 "20260307": 0.038015, 6 - "20260308": 0.040688, 6 + "20260308": 0.038015, 7 7 "20260309": 0.038015, 8 8 "20260310": 0.038015 9 9 }
+2 -1
tests/test_gemini_importer.py
··· 182 182 assert result.segments is not None 183 183 assert len(result.segments) >= 1 184 184 assert any( 185 - Path(p).name == "conversation_transcript.jsonl" for p in result.files_created 185 + Path(p).name == "conversation_transcript.jsonl" 186 + for p in result.files_created 186 187 ) 187 188 188 189 first_path = Path(result.files_created[0])
+3 -1
tests/test_generators.py
··· 134 134 instructions = speakers.get("instructions", {}) 135 135 sources = instructions.get("sources", {}) 136 136 137 - assert sources.get("transcripts") == "required", "speakers should require transcripts" 137 + assert sources.get("transcripts") == "required", ( 138 + "speakers should require transcripts" 139 + ) 138 140 assert sources.get("percepts") is True, "speakers should include percepts" 139 141 140 142
+41 -11
tests/test_importer.py
··· 283 283 written = Path(json_path) 284 284 assert ( 285 285 written 286 - == tmp_path / "20240101" / "import.text" / "120000_300" / "conversation_transcript.jsonl" 286 + == tmp_path 287 + / "20240101" 288 + / "import.text" 289 + / "120000_300" 290 + / "conversation_transcript.jsonl" 287 291 ) 288 292 assert written.exists() 289 293 ··· 420 424 assert len(result.files_created) == 3 421 425 422 426 first_segment = ( 423 - day_path("20260115") / "import.chatgpt" / "120000_300" / "conversation_transcript.jsonl" 427 + day_path("20260115") 428 + / "import.chatgpt" 429 + / "120000_300" 430 + / "conversation_transcript.jsonl" 424 431 ) 425 432 second_segment = ( 426 - day_path("20260115") / "import.chatgpt" / "120501_300" / "conversation_transcript.jsonl" 433 + day_path("20260115") 434 + / "import.chatgpt" 435 + / "120501_300" 436 + / "conversation_transcript.jsonl" 427 437 ) 428 438 third_segment = ( 429 - day_path("20260116") / "import.chatgpt" / "000000_300" / "conversation_transcript.jsonl" 439 + day_path("20260116") 440 + / "import.chatgpt" 441 + / "000000_300" 442 + / "conversation_transcript.jsonl" 430 443 ) 431 444 432 445 assert first_segment.exists() ··· 551 564 assert len(result.files_created) == 3 552 565 553 566 first_segment = ( 554 - day_path("20260115") / "import.claude" / "120000_300" / "conversation_transcript.jsonl" 567 + day_path("20260115") 568 + / "import.claude" 569 + / "120000_300" 570 + / "conversation_transcript.jsonl" 555 571 ) 556 572 second_segment = ( 557 - day_path("20260115") / "import.claude" / "120501_300" / "conversation_transcript.jsonl" 573 + day_path("20260115") 574 + / "import.claude" 575 + / "120501_300" 576 + / "conversation_transcript.jsonl" 558 577 ) 559 578 third_segment = ( 560 - day_path("20260116") / "import.claude" / "000000_300" / "conversation_transcript.jsonl" 579 + day_path("20260116") 580 + / "import.claude" 581 + / "000000_300" 582 + / "conversation_transcript.jsonl" 561 583 ) 562 584 563 585 assert first_segment.exists() ··· 1251 1273 1252 1274 result = mod.ICSImporter().process(ics_path, tmp_path, facet="work") 1253 1275 1254 - first_md = day_path("20260301") / "import.ics" / "120000_300" / "event_transcript.md" 1255 - second_md = day_path("20260302") / "import.ics" / "090000_300" / "event_transcript.md" 1276 + first_md = ( 1277 + day_path("20260301") / "import.ics" / "120000_300" / "event_transcript.md" 1278 + ) 1279 + second_md = ( 1280 + day_path("20260302") / "import.ics" / "090000_300" / "event_transcript.md" 1281 + ) 1256 1282 1257 1283 assert result.entries_written == 4 1258 1284 assert result.errors == [] ··· 1480 1506 assert first_key == "100000_300" 1481 1507 assert second_key == "101000_300" 1482 1508 1483 - first_md = day_path("20260315") / "import.obsidian" / "100000_300" / "note_transcript.md" 1484 - second_md = day_path("20260315") / "import.obsidian" / "101000_300" / "note_transcript.md" 1509 + first_md = ( 1510 + day_path("20260315") / "import.obsidian" / "100000_300" / "note_transcript.md" 1511 + ) 1512 + second_md = ( 1513 + day_path("20260315") / "import.obsidian" / "101000_300" / "note_transcript.md" 1514 + ) 1485 1515 assert first_md.exists() 1486 1516 assert second_md.exists() 1487 1517
+1 -1
think/agents.py
··· 149 149 "- Windows that look identical in first and last frame\n" 150 150 "- Apps open but showing same content throughout\n" 151 151 "- Background windows never brought to focus\n" 152 - "- Anything you'd describe as \"had open\" or \"was visible\"" 152 + '- Anything you\'d describe as "had open" or "was visible"' 153 153 ) 154 154 155 155 IMPORT_GUIDANCE = {
+14 -4
think/cluster.py
··· 254 254 255 255 256 256 def _load_entries( 257 - day_dir: str, transcripts: bool, percepts: bool, agents: bool | dict[str, bool | str] 257 + day_dir: str, 258 + transcripts: bool, 259 + percepts: bool, 260 + agents: bool | dict[str, bool | str], 258 261 ) -> list[dict[str, Any]]: 259 262 """Load all transcript entries from a day directory.""" 260 263 from think.utils import segment_parse ··· 269 272 start_time, _ = segment_parse(seg_path.name) 270 273 if not start_time: 271 274 continue 272 - entries.extend(_process_segment(seg_path, date_str, transcripts, percepts, agents)) 275 + entries.extend( 276 + _process_segment(seg_path, date_str, transcripts, percepts, agents) 277 + ) 273 278 274 279 entries.sort(key=lambda e: e["timestamp"]) 275 280 return entries ··· 612 617 agents=sources.get("agents", False), 613 618 ) 614 619 if not entries: 615 - return f"No transcript or screen files found for segment {segment}", empty_counts 620 + return ( 621 + f"No transcript or screen files found for segment {segment}", 622 + empty_counts, 623 + ) 616 624 617 625 groups = _group_entries(entries) 618 626 markdown = _groups_to_markdown(groups) ··· 639 647 segment_path_obj = Path(segment_dir) 640 648 # Parent is stream dir; grandparent is day dir 641 649 date_str = _date_str(str(segment_path_obj.parent.parent)) 642 - entries = _process_segment(segment_path_obj, date_str, transcripts, percepts, agents) 650 + entries = _process_segment( 651 + segment_path_obj, date_str, transcripts, percepts, agents 652 + ) 643 653 entries.sort(key=lambda e: e["timestamp"]) 644 654 return entries 645 655