Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bunkerlab-net/mempalace
/ functions
Functions
2,248 in github.com/bunkerlab-net/mempalace
⨍
Functions
2,248
◇
Types & classes
117
↓ 1 callers
Function
run_collect_files
Collect all `.txt` mega-files from `directory` that meet `sessions_min`. Returns a sorted vec of `(path, session_count)` pairs. Files exceeding the s
src/cli/split.rs:388
↓ 1 callers
Function
run_compress
Handle the `compress` sub-command — compresses drawers into AAAK dialect format.
src/app.rs:447
↓ 1 callers
Function
run_compress_row_preview
Called by `run_compress_row` to print the dry-run preview for one drawer. Decodes the AAAK text and shows entities, topics, quote, emotions, and flag
src/cli/compress.rs:34
↓ 1 callers
Function
run_dedup
Handle the `dedup` sub-command — finds and removes near-duplicate drawers.
src/app.rs:350
↓ 1 callers
Function
run_diary_ingest
Handle the `diary-ingest` sub-command — ingests diary markdown files into the palace.
src/app.rs:478
↓ 1 callers
Function
run_discover_entities_prose
Called by `run_discover_entities` to add prose-detected entity candidates. Scans up to 10 prose/code files in `directory`, runs `detect_entities` wit
src/cli/init.rs:329
↓ 1 callers
Function
run_export
Handle the `export` sub-command — exports palace drawers to markdown files.
src/app.rs:503
↓ 1 callers
Function
run_mcp
Handle the `mcp` sub-command — opens the palace and starts the MCP server.
src/app.rs:412
↓ 1 callers
Function
run_mine_after_init
Mine the just-initialised project directory using pre-scanned files. Called by the `init` arm when the user confirms mining. Opens the palace, acquir
src/app.rs:259
↓ 1 callers
Function
run_print_entity_registry
Print entity registry summary: people, projects, ambiguous names, wiki cache count.
src/cli/status.rs:73
↓ 1 callers
Function
run_print_kg
Print KG entity and triple counts when either is non-zero.
src/cli/status.rs:56
↓ 1 callers
Function
run_print_rooms
Print per-room drawer counts, grouping rooms under their wing header.
src/cli/status.rs:35
↓ 1 callers
Function
run_read_line
Read one newline-delimited line from stdin, enforcing a hard byte limit. Prevents OOM by never buffering more than `limit` bytes from a client-contro
src/mcp/mod.rs:128
↓ 1 callers
Function
run_read_line_drain
Drain bytes from the reader until the next newline or EOF. Called after detecting an overlong line to resync the stream.
src/mcp/mod.rs:212
↓ 1 callers
Function
run_rebuild_index
Clear and rebuild the inverted word index via the palace library. Delegates the transaction and index work to `palace::repair::rebuild_index`, which
src/cli/repair.rs:113
↓ 1 callers
Function
run_repair
Handle the `repair` sub-command — prompts for confirmation then rebuilds the index. `skip_confirm` maps to the `-y` / `--yes` CLI flag; when false th
src/app.rs:366
↓ 1 callers
Function
run_repair_confirm
Read one line from `reader` and return `true` iff the user typed "y" (case-insensitive). Extracted so tests can inject a `Cursor` instead of real std
src/app.rs:392
↓ 1 callers
Function
run_search
Handle the `search` sub-command — opens the palace and runs the search.
src/app.rs:292
↓ 1 callers
Function
run_split
Handle the `split` sub-command — expands `~` then delegates to the splitter.
src/app.rs:330
↓ 1 callers
Function
run_sweep
Handle the `sweep` sub-command — expands `~` then delegates to the sweeper.
src/app.rs:467
↓ 1 callers
Function
run_sync
Drive `cli::sync::run` over the resolved palace and print the report.
src/app.rs:231
↓ 1 callers
Function
run_wakeup
Handle the `wakeup` sub-command — opens the palace and runs wake-up.
src/app.rs:311
↓ 1 callers
Function
run_write_config
Write `mempalace.yaml` to `directory` and print the next-step instructions. Called by [`run`] after the user confirms.
src/cli/init.rs:583
↓ 1 callers
Function
scan_claude_projects_process_slug
Process one slug directory and insert a `ProjectInfo` into `projects` if it has sessions. Called by [`scan_claude_projects`] to keep that function wi
src/palace/session_scanner.rs:105
↓ 1 callers
Function
scan_convos
Return a flat list of all conversation files under `directory`. Delegates the actual traversal to `walk_convos`.
src/palace/convo_miner.rs:369
↓ 1 callers
Function
scan_get_user_identity
Resolve the user's git identity from the first repo's local config, falling back to global. Called by [`scan`] to keep that function within the 70-li
src/palace/project_scanner.rs:752
↓ 1 callers
Function
scan_is_mine
Decide whether this repo should be considered "mine" (the current user is a key contributor). Called by [`scan_process_repo`] to keep that function w
src/palace/project_scanner.rs:765
↓ 1 callers
Function
scan_process_repo
Process one git repo: collect manifests, count authors, and update `projects` and `all_commits`. Called by [`scan`] to keep that function within the
src/palace/project_scanner.rs:794
↓ 1 callers
Function
score_entity_person
Score person-related signals: verb patterns, dialogue markers, pronouns, direct address. `pronoun_re` is the compiled locale pronoun regex built from
src/palace/entity_detect.rs:409
↓ 1 callers
Function
search_closet_boost_fetch
Fetch `(source_file, content)` pairs from `compressed` for the given paths. Helper for [`search_closet_boost`]. Skips rows with empty content.
src/palace/closets.rs:159
↓ 1 callers
Function
search_expand_parse_rows
Parse neighbor expansion rows into `SearchResult` values with zero relevance score. The `source_path` argument is the path from the anchor drawer use
src/palace/search.rs:499
↓ 1 callers
Function
search_memories_candidates
First-pass query: select top `n_candidates` drawers by raw TF sum.
src/palace/search.rs:152
↓ 1 callers
Function
search_memories_enrich_with_people
Extend `words` with tokens derived from known person names found in `query`. Loads the entity registry on every call; the file is small so the overhe
src/palace/search.rs:577
↓ 1 callers
Function
search_memories_parse_candidates
Parse candidate rows (columns: id, content, wing, room, `source_file`, `chunk_index`, `filed_at`).
src/palace/search.rs:439
↓ 1 callers
Function
search_memories_score_one
( candidate: &Candidate, tf_data: &HashMap<String, HashMap<String, i64>>, doc_lengths: &HashMap<St
src/palace/search.rs:390
↓ 1 callers
Function
search_memories_to_result
Convert a `(score, Candidate)` pair to a `SearchResult`.
src/palace/search.rs:419
↓ 1 callers
Method
seed_ambiguous_flags
Rebuild `ambiguous_flags` from the current `people` map. A name is ambiguous when its lowercase form appears in `COMMON_ENGLISH_WORDS`. Called at the
src/palace/entity_registry.rs:867
↓ 1 callers
Function
seed_chunked_source
(connection: &Connection)
src/palace/search.rs:1014
↓ 1 callers
Function
seed_from_entity_facts
( connection: &Connection, subject: &str, facts: &[(&str, &str)], )
src/kg/mod.rs:565
↓ 1 callers
Method
seed_person_entry
Insert one canonical `PersonEntry` from onboarding data. Called for each non-empty person in [`EntityRegistry::seed`].
src/palace/entity_registry.rs:827
↓ 1 callers
Function
slack_sanitize_user_id
Sanitize a Slack speaker ID for safe embedding in transcript text. Replaces bracket characters and control characters (U+0000..U+001F) with `_` to pr
src/normalize/slack.rs:16
↓ 1 callers
Function
snap_backward
Snap a byte offset to the nearest char boundary (backward).
src/palace/chunker.rs:40
↓ 1 callers
Function
snap_forward
Snap a byte offset to the nearest char boundary (forward).
src/palace/chunker.rs:20
↓ 1 callers
Function
split_by_turns
Group `lines` into segments by splitting on conversation-turn markers.
src/extract/mod.rs:379
↓ 1 callers
Function
split_collect_txt_files_from_dir
Scan `directory` for `.txt` files, honouring or ignoring `.gitignore` rules. Depth is fixed at 1 — sub-directories are never traversed — matching the
src/cli/split.rs:13
↓ 1 callers
Function
stored_mtime
Return the agreed-upon `source_mtime` for all drawers from `source_file`, or `None` when the file has never been mined or its mtime cannot be trusted.
src/palace/drawer.rs:82
↓ 1 callers
Function
sync_delete
Apply the prune: delete drawers by id, then closets by `source_file`. Counts deleted closets via a pre-DELETE COUNT so the report reflects what actua
src/cli/sync.rs:271
↓ 1 callers
Function
sync_delete_inner
Perform the inner deletes inside the open transaction. Splitting this off keeps `sync_delete` focused on transaction lifecycle.
src/cli/sync.rs:313
↓ 1 callers
Function
sync_in_clause_placeholders
Build a `?,?,?,...,?` placeholder string of length `count`. Used by [`sync_delete_inner`] to construct an `IN (...)` clause that binds each id as a s
src/cli/sync.rs:380
↓ 1 callers
Function
sync_query_drawers
Fetch every drawer's `(id, source_file, room, ingest_mode)`, optionally scoped to one wing.
src/cli/sync.rs:137
↓ 1 callers
Function
t_interpolate
Substitute `{name}` placeholders in `text` with the provided values. Placeholders not present in `vars` are left as-is; no error is raised for unreso
src/i18n/mod.rs:342
↓ 1 callers
Function
test_conn
Open an in-memory test palace database and return the database + connection pair.
src/mcp/tools.rs:1895
↓ 1 callers
Function
tool_add_drawer_insert
Write the drawer row and log the WAL event on confirmed insert. Returns the MCP response JSON.
src/mcp/tools.rs:646
↓ 1 callers
Function
tool_list_drawers_count
Total drawer count for the same `(wing, room)` filter as `tool_list_drawers_query`. Excludes diary entries to match the listing query exactly — witho
src/mcp/tools.rs:840
↓ 1 callers
Function
tool_list_drawers_query
Run the parameterized drawer list query for the given wing/room filter combination. Excludes diary entries — they use UUID IDs (not the `drawer_` pre
src/mcp/tools.rs:896
↓ 1 callers
Function
tool_update_drawer_check_duplicate
Check whether `new_id` already belongs to a different drawer, rejecting updates that would silently duplicate an existing entry. Returns `Some(error_
src/mcp/tools.rs:997
↓ 1 callers
Function
tool_update_drawer_recompute_id
Compute the deterministic SHA256-based drawer ID from wing, room, and content. Mirrors the ID computation in `tool_add_drawer` so that IDs stay consi
src/mcp/tools.rs:983
↓ 1 callers
Function
tool_update_drawer_reindex
Execute the transactional reindex: update the drawers row to its new ID, wing, room, and content, then rebuild the `drawer_words` full-text index. Wr
src/mcp/tools.rs:1023
↓ 1 callers
Function
tool_update_drawer_validate_args
Parse and validate all input args for `tool_update_drawer`. Returns `Ok(UpdateDrawerArgs)` on success. Returns `Err(Value)` on validation failure **
src/mcp/tools.rs:932
↓ 1 callers
Function
topic_normalize
Normalize a topic name for case-insensitive overlap detection.
src/palace/graph.rs:769
↓ 1 callers
Function
traverse_expand_frontier
Called by `traverse` to keep that function within the 70-line limit. For one BFS frontier node at `room_current`/`depth`, find all unvisited rooms th
src/palace/graph.rs:219
↓ 1 callers
Function
try_normalize_json
(content: &str)
src/normalize/mod.rs:80
↓ 1 callers
Function
try_parse
Try to parse a `ChatGPT` conversations.json mapping tree into transcript text. Traverses the node tree from root through `children` links, extracting
src/normalize/chatgpt.rs:13
↓ 1 callers
Function
try_parse_content_blocks
Extract and join non-empty text blocks from a Gemini CLI message entry's `content` array of `{"text": "..."}` objects.
src/normalize/gemini_cli.rs:86
↓ 1 callers
Function
try_parse_find_root
Find the root node ID in a `ChatGPT` mapping — the node with `parent=null` and no message body. Falls back to the first null-parent node with a messag
src/normalize/chatgpt.rs:35
↓ 1 callers
Function
try_parse_walk_tree
Walk the linear path of the message tree from `root`, collecting (role, text) pairs. Returns `None` if any node lookup fails (malformed export). Alwa
src/normalize/chatgpt.rs:57
↓ 1 callers
Function
xdg_data_dir
Returns `$XDG_DATA_HOME` if set to an absolute path, otherwise `$HOME/.local/share`. A relative or empty `$XDG_DATA_HOME` is treated as unset, per XD
src/config.rs:82
Function
acquire_mine_lock_creates_and_cleans_up_lockfile
()
src/palace/miner.rs:1126
Function
acquire_mine_lock_different_lock_dirs_do_not_contend
()
src/palace/miner.rs:1170
Function
acquire_mine_lock_panics_on_nonexistent_lock_dir
()
src/palace/miner.rs:2544
Function
acquire_mine_lock_second_acquire_returns_error
()
src/palace/miner.rs:1150
Method
adapter_version
(&self)
src/sources/adapter.rs:253
Method
adapter_version
(&self)
src/sources/registry.rs:112
Function
add_adds_new_categories
()
src/palace/known_entities.rs:524
Function
add_case_insensitive_dedup_preserves_first_variant
()
src/palace/known_entities.rs:476
Function
add_creates_registry_when_absent
()
src/palace/known_entities.rs:421
Function
add_dedupes_within_input
()
src/palace/known_entities.rs:625
Function
add_dict_format_category_gets_new_keys
()
src/palace/known_entities.rs:551
Function
add_drawer_deterministic_id_same_content
()
src/mcp/tools.rs:1947
Function
add_drawer_different_content_different_id
()
src/mcp/tools.rs:1974
Function
add_drawer_duplicate_returns_false
()
src/palace/drawer.rs:268
Function
add_drawer_idempotent_returns_already_exists
()
src/mcp/tools.rs:1927
Function
add_drawer_inserts_and_returns_success
()
src/mcp/tools.rs:1902
Function
add_drawer_inserts_row
()
src/palace/drawer.rs:239
Function
add_drawer_missing_required_fields_returns_error
()
src/mcp/tools.rs:1992
Function
add_drawer_stores_mtime
()
src/palace/drawer.rs:292
Function
add_drawer_with_explicit_added_by
()
src/mcp/tools.rs:4394
Function
add_entity_inserts_and_returns_id
()
src/kg/mod.rs:385
Function
add_entity_rejects_all_apostrophe_name
()
src/kg/mod.rs:367
Function
add_malformed_registry_starts_fresh
()
src/palace/known_entities.rs:579
Function
add_preserves_untouched_categories
()
src/palace/known_entities.rs:501
Function
add_returns_registry_path
()
src/palace/known_entities.rs:437
Function
add_skips_empty_names
()
src/palace/known_entities.rs:601
Function
add_triple_creates_entities_automatically
()
src/kg/mod.rs:403
Function
add_triple_dedup_returns_existing_id
()
src/kg/mod.rs:433
Function
add_triple_validate_params_accepts_canonical_datetime
()
src/kg/mod.rs:290
Function
add_triple_validate_params_normalizes_zero_offset_to_z
()
src/kg/mod.rs:312
Function
add_triple_validate_params_rejects_confidence_greater_than_one
()
src/kg/mod.rs:161
Function
add_triple_validate_params_rejects_from_after_to
()
src/kg/mod.rs:211
Function
add_triple_validate_params_rejects_invalid_date_format
()
src/kg/mod.rs:186
← previous
next →
601–700 of 2,248, ranked by callers