Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Einsia/OpenChronicle
/ functions
Functions
450 in github.com/Einsia/OpenChronicle
⨍
Functions
450
◇
Types & classes
43
Function
recent_activity
**ALWAYS CALL** when the user references "yesterday / last week / earlier / 刚才 / 上周" etc. Newest-first cross-file feed of recent memory entri
src/openchronicle/mcp/server.py:411
Function
recent_captures
Newest-first capture rows without keyword filtering — used by current_context.
src/openchronicle/store/fts.py:438
Function
reduce_all_pending
Unconditional catch-up: reduce every non-reduced ended/failed session. Called from the daily 23:55 safety-net. Covers ``ended`` rows whose as
src/openchronicle/writer/session_reducer.py:351
Function
reduce_session_async
Spawn a daemon thread that reduces the session. Fire-and-forget.
src/openchronicle/writer/session_reducer.py:296
Function
render_file
( *, fm: dict[str, Any], entries: list[ParsedEntry], header_lines: list[str] | None = None )
src/openchronicle/store/files.py:237
Function
render_heading
(*, timestamp: str, entry_id: str, tags: list[str])
src/openchronicle/store/files.py:232
Function
resume
Resume capture.
src/openchronicle/cli.py:185
Function
retry_due
Pick up any ``failed`` session rows whose ``next_retry_at`` has elapsed.
src/openchronicle/writer/session_reducer.py:330
Function
run
(cfg: Config, *, capture_only: bool = False)
src/openchronicle/daemon.py:124
Function
run
Reduce pending sessions, then classify each fresh event-daily entry.
src/openchronicle/writer/agent.py:31
Function
run_async
Run the MCP server with the configured transport (for use inside the daemon).
src/openchronicle/mcp/server.py:608
Function
run_check_cuts
Periodic check_cuts tick.
src/openchronicle/session/tick.py:129
Function
run_classifier_tick
Periodic durable-fact classification for the active session. Every ``classifier.interval_minutes`` (min 5) checks for an active session and c
src/openchronicle/session/tick.py:176
Function
run_daily_safety_net
Once per local day at HH:MM, force-end open session + retry failed.
src/openchronicle/session/tick.py:254
Function
run_flush_tick
Incremental reducer tick for the active session. Every ``session.flush_minutes`` (min 5) checks for an active session and reduces any closed
src/openchronicle/session/tick.py:143
Function
run_forever
Daemon task: every minute, materialise any closed windows.
src/openchronicle/timeline/tick.py:62
Function
run_forever
Run the capture pipeline until cancelled. If ``cfg.event_driven`` is true, starts the watcher subprocess and routes events through the dispat
src/openchronicle/capture/scheduler.py:279
Function
run_pending
(cfg: Config, conn: sqlite3.Connection)
src/openchronicle/writer/compact.py:188
Function
run_stdio
Run the server on stdio. Blocks until the client disconnects.
src/openchronicle/mcp/server.py:602
Method
running
(self)
src/openchronicle/capture/watcher.py:89
Function
search
( conn: sqlite3.Connection, *, query: str, path_patterns: list[str] | None = None, since:
src/openchronicle/store/fts.py:280
Function
search
**ALWAYS CALL** before saying "I don't know" about something with a keyword in it. BM25 full-text search across every entry in COMPRESSED mem
src/openchronicle/mcp/server.py:373
Function
search_captures
BM25 + snippet search over capture S1 fields. The ``app_name`` filter is a case-insensitive substring match on the ``captures.app_name`` colu
src/openchronicle/store/fts.py:380
Function
search_captures
BM25 + snippet search over the S1 FTS index. Returns a list of light-weight hits — `file_stem` is the handle to follow up with `read_recent_c
src/openchronicle/mcp/captures.py:174
Function
search_captures
**ALWAYS CALL** (usually in parallel with `search`) when the user mentions a keyword they'd have typed or read on screen. Keyword search over
src/openchronicle/mcp/server.py:492
Function
set_classified_end
( conn: sqlite3.Connection, session_id: str, classified_end: datetime, )
src/openchronicle/session/store.py:160
Function
set_flush_end
( conn: sqlite3.Connection, session_id: str, flush_end: datetime, )
src/openchronicle/session/store.py:147
Function
set_needs_compact
(conn: sqlite3.Connection, path: str, value: bool)
src/openchronicle/store/fts.py:204
Function
setup
(*, console: bool = True, verbose: bool = False)
src/openchronicle/logger.py:29
Function
start
Start the OpenChronicle daemon.
src/openchronicle/cli.py:127
Function
status
Show daemon status + memory stats.
src/openchronicle/cli.py:193
Function
stop
Stop the daemon.
src/openchronicle/cli.py:165
Function
supersede_entry
Mark old entry superseded and append the new one. Returns new entry id.
src/openchronicle/store/entries.py:148
Function
supersede_worker
()
tests/test_store.py:267
Function
test_api_key_precedence
(tmp_path: Path, monkeypatch)
tests/test_config.py:46
Function
test_app_filter_and_time_window
(ac_root: Path)
tests/test_captures_fts.py:39
Function
test_atomic_write_creates_parent_directory
(tmp_path: Path)
tests/test_store.py:152
Function
test_atomic_write_preserves_existing_permissions
Overwriting must not silently downgrade an existing file's mode. ``tempfile.mkstemp`` creates files at 0o600 — without explicit chmod the ren
tests/test_store.py:158
Function
test_atomic_write_preserves_original_on_replace_failure
Simulating a crash at the rename step must leave the file intact. A SIGKILL between ``write_text``'s first byte and last byte truncates the f
tests/test_store.py:121
Function
test_atomic_write_round_trip_through_append_entry
End-to-end: append → read returns the new entry, file isn't corrupted.
tests/test_store.py:175
Function
test_attach_drill_down_breadcrumb_unit
Direct unit test of the breadcrumb post-processor.
tests/test_session_reducer.py:21
Function
test_build_manager_wires_reducer_end_to_end
on_event → auto session start → force_end → row persisted → reducer run.
tests/test_session_tick.py:77
Function
test_check_cuts_noop_when_no_session
()
tests/test_session_manager.py:111
Function
test_classifier_appends_durable_preference
(ac_root: Path, monkeypatch)
tests/test_classifier.py:58
Function
test_classifier_empty_commit_when_nothing_classifiable
( ac_root: Path, monkeypatch, )
tests/test_classifier.py:136
Function
test_classifier_rejects_event_write
(ac_root: Path, monkeypatch)
tests/test_classifier.py:105
Function
test_classifier_skips_when_event_daily_missing
(ac_root: Path)
tests/test_classifier.py:159
Function
test_clean_captures_removes_matching_index_rows
(ac_root)
tests/test_cli_captures_cleanup.py:8
Function
test_cleanup_buffer_removes_fts_rows
Time-based delete pass should also drop matching FTS rows.
tests/test_capture_scheduler_fts.py:52
Function
test_cleanup_eviction_also_drops_fts
Size-based eviction should also drop matching FTS rows.
tests/test_capture_scheduler_fts.py:90
Function
test_compact_accepts_when_file_unchanged
(ac_root: Path)
tests/test_store.py:310
Function
test_compact_skips_if_file_changes_during_llm_rewrite
Compaction must not overwrite entries appended while the LLM is running.
tests/test_store.py:337
Function
test_concurrent_appends_lose_no_entries
N threads appending to the same file must all land. Without the per-path lock, ``append_entry`` is read-modify-write: each thread reads the s
tests/test_store.py:192
Function
test_concurrent_supersede_then_append_serializes
A supersede + an append on the same file must both land cleanly. Without the per-path lock, supersede's two-write read-modify-write can inter
tests/test_store.py:248
Function
test_create_append_search
(ac_root: Path)
tests/test_store.py:25
Function
test_current_context_app_filter
(ac_root: Path)
tests/test_mcp_tools.py:166
Function
test_current_context_shape
Headlines newest-first, fulltext deduped by (app,window), timeline blocks ordered.
tests/test_mcp_tools.py:117
Function
test_daemon_uptime_running
Returns a human-readable uptime when PID file exists.
tests/test_cli_status.py:97
Function
test_daemon_uptime_stopped_when_no_pid
Returns "stopped" when the daemon is not running.
tests/test_cli_status.py:92
Function
test_defaults_when_no_file
(tmp_path: Path)
tests/test_config.py:6
Function
test_delete_propagates_to_fts
(ac_root: Path)
tests/test_captures_fts.py:81
Function
test_dispatch_append_and_commit
(ac_root: Path)
tests/test_writer_tools.py:8
Function
test_dispatch_read_memory
(ac_root: Path)
tests/test_writer_tools.py:27
Function
test_dispatch_search
(ac_root: Path)
tests/test_writer_tools.py:46
Function
test_enrich_empty_ax_tree
()
tests/test_s1_parser.py:181
Function
test_enrich_extracts_browser_url
()
tests/test_s1_parser.py:50
Function
test_enrich_falls_back_to_first_app_when_no_frontmost
()
tests/test_s1_parser.py:189
Function
test_enrich_no_focused_window_returns_empty_element
()
tests/test_s1_parser.py:155
Function
test_enrich_non_browser_has_no_url
()
tests/test_s1_parser.py:104
Function
test_enrich_noop_without_ax_tree
()
tests/test_s1_parser.py:10
Function
test_enrich_picks_frontmost_app
()
tests/test_s1_parser.py:17
Function
test_enrich_prefixes_bare_url
()
tests/test_s1_parser.py:78
Function
test_enrich_visible_text_truncation
()
tests/test_s1_parser.py:130
Function
test_flush_active_session_writes_partial_entry
( ac_root: Path, monkeypatch, )
tests/test_session_reducer.py:227
Function
test_force_end_closes_session
()
tests/test_session_manager.py:99
Function
test_frequent_switching_prevents_soft_cut
()
tests/test_session_manager.py:82
Function
test_get_capture_visible_text
(ac_root: Path)
tests/test_captures_fts.py:109
Function
test_get_schema
()
tests/test_mcp_tools.py:63
Function
test_hard_cut_after_idle_gap
()
tests/test_session_manager.py:34
Function
test_health_healthy
Timestamp within 5 minutes → "healthy", "green".
tests/test_cli_status.py:122
Function
test_health_malformed_timestamp
Unparseable timestamps are handled gracefully.
tests/test_cli_status.py:144
Function
test_health_running_no_captures
PID exists but no last timestamp → "running (no captures yet)", "yellow".
tests/test_cli_status.py:115
Function
test_health_stale
Timestamp older than 5 minutes → "stale", "yellow".
tests/test_cli_status.py:129
Function
test_health_stopped
(None, None) → "stopped", "red".
tests/test_cli_status.py:108
Function
test_health_tz_aware_timestamp
Offset-aware timestamps don't cause TypeError in subtraction.
tests/test_cli_status.py:137
Function
test_index_md_rebuild_runs
(ac_root: Path)
tests/test_store.py:108
Function
test_insert_and_keyword_search
(ac_root: Path)
tests/test_captures_fts.py:18
Function
test_invalid_prefix_rejected
(ac_root: Path)
tests/test_store.py:80
Function
test_last_capture_finds_newest
Returns timestamp and app_name from the most recent buffer file.
tests/test_cli_status.py:158
Function
test_last_capture_handles_corrupted_json
Corrupted JSON returns the filename stem as timestamp, None for app.
tests/test_cli_status.py:176
Function
test_last_capture_none_when_dir_missing
No capture-buffer dir → (None, None).
tests/test_cli_status.py:151
Function
test_list_memories
(ac_root: Path)
tests/test_mcp_tools.py:12
Function
test_make_id_uniqueness
()
tests/test_store.py:20
Function
test_no_hard_cut_below_threshold
()
tests/test_session_manager.py:49
Function
test_ping_stage_failure_label_includes_class_and_message
A raised exception becomes 'ClassName: <first-line>' truncated to 80 chars.
tests/test_writer_llm_ping.py:60
Function
test_ping_stage_failure_with_empty_message_falls_back_to_class
When str(exc) is empty, the error label is just the class name.
tests/test_writer_llm_ping.py:85
Function
test_ping_stage_mock_env_returns_mocked
OPENCHRONICLE_LLM_MOCK=1 short-circuits before any litellm import.
tests/test_writer_llm_ping.py:20
Function
test_ping_stage_success_records_latency
A normal litellm.completion return yields ok=True with a non-negative latency.
tests/test_writer_llm_ping.py:35
Function
test_ping_stage_truncates_long_error_message
Error labels are capped so a verbose provider message can't blow up status output.
tests/test_writer_llm_ping.py:107
Function
test_ping_stages_dedups_identical_configs
Stages with identical (model, base_url, api_key) only ping the network once. The default config gives every stage the same model, so a four-stage
tests/test_cli_status.py:31
← previous
next →
301–400 of 450, ranked by callers