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
dedup_fetch_word_sets
Fetch word sets for the given drawer IDs from `drawer_words`. Returns a map from `drawer_id` → set of words.
src/palace/dedup.rs:156
↓ 1 callers
Function
dedupe_people_build_components
Build per-component aggregates from `all_commits` using the pre-built `uf`. Called by [`dedupe_people`] to keep that function within the 70-line limi
src/palace/project_scanner.rs:637
↓ 1 callers
Function
dedupe_people_pick_display
Pick display names for each component and build the final `PersonInfo` map. Called by [`dedupe_people`] to keep that function within the 70-line limi
src/palace/project_scanner.rs:668
↓ 1 callers
Function
default_collection_name
()
src/config.rs:46
↓ 1 callers
Function
default_entity_languages
()
src/config.rs:54
↓ 1 callers
Function
default_hook_silent_save
()
src/config.rs:50
↓ 1 callers
Function
detect_entities_with_project_entities_setup_files
Called by `detect_entities_with_project_entities` to keep that function within the 70-line limit. Create two temp files with content designed to trig
src/palace/entity_detect.rs:1050
↓ 1 callers
Function
detect_origin_heuristic_build_evidence
Build the human-readable evidence list for the heuristic result. Called by [`detect_origin_heuristic`]. Mirrors the Python evidence-building logic: t
src/palace/corpus_origin.rs:248
↓ 1 callers
Function
detect_origin_heuristic_count_turns
Count turn-marker pattern occurrences in `combined`. Called by [`detect_origin_heuristic`]. Returns `(total_hits, types_found)` where `types_found` i
src/palace/corpus_origin.rs:226
↓ 1 callers
Function
detect_origin_llm_build_prompt
Build the user prompt for the LLM classify call. Caps at [`MAX_SAMPLES_FOR_LLM`] samples and [`MAX_EXCERPT_CHARS`] per sample to keep cost bounded. C
src/palace/corpus_origin.rs:348
↓ 1 callers
Function
detect_origin_llm_parse_response
Parse a raw LLM response string into a [`CorpusOriginResult`]. Returns a conservative default-stance result on malformed JSON or missing fields. Neve
src/palace/corpus_origin.rs:376
↓ 1 callers
Function
detect_room
Route a file to the appropriate room based on path, filename, and content.
src/palace/room_detect.rs:241
↓ 1 callers
Function
diary_ingest_cursor_path
Find `<config_dir>/diary_cursors.json`. The cursor file is stored in a single location; keys within it are scoped to `(wing, agent, path)` so two cal
src/palace/diary_ingest.rs:124
↓ 1 callers
Function
diary_ingest_extract_date
Extract the `YYYY-MM-DD` date prefix from the filename.
src/palace/diary_ingest.rs:593
↓ 1 callers
Function
diary_ingest_file
( connection: &Connection, file_path: &Path, wing: &str, agent: &str, force: bool, cur
src/palace/diary_ingest.rs:197
↓ 1 callers
Function
diary_ingest_file_apply_sections
Called by `diary_ingest_file` to insert/replace drawers for each section. Skips the first `ctx.prev_count` sections (resume) and returns the number o
src/palace/diary_ingest.rs:403
↓ 1 callers
Function
diary_ingest_file_mtime
Read the file's modification time as Unix-epoch milliseconds. Returns `0` when the platform or filesystem does not expose mtime — this pairs with the
src/palace/diary_ingest.rs:64
↓ 1 callers
Function
diary_ingest_file_replace
Replace one diary section atomically when `force` is set; otherwise fall through to a plain `add_drawer` call. Wraps the force-purge + `add_drawer` p
src/palace/diary_ingest.rs:531
↓ 1 callers
Function
diary_ingest_is_diary_file
Return `true` when `path` looks like a diary file (`YYYY-MM-DD*.md`).
src/palace/diary_ingest.rs:168
↓ 1 callers
Function
diary_ingest_load_cursor
Load cursor map from disk; returns empty map on any parse or I/O error.
src/palace/diary_ingest.rs:129
↓ 1 callers
Function
diary_ingest_save_cursor
Persist cursor map to disk; propagates I/O and serialisation failures.
src/palace/diary_ingest.rs:141
↓ 1 callers
Function
diary_ingest_scan_files
Return all diary files in `diary_dir` matching `YYYY-MM-DD*.md`.
src/palace/diary_ingest.rs:152
↓ 1 callers
Method
disarm
(&mut self)
src/palace/entity_registry.rs:698
↓ 1 callers
Function
edit_distance
Levenshtein edit distance between `s1` and `s2`. Time O(m × n), space O(min(m, n)). Operates on Unicode scalar values so multi-byte characters count
src/palace/fact_checker.rs:364
↓ 1 callers
Function
emotion_codes
()
src/dialect/emotions.rs:8
↓ 1 callers
Method
endpoint
(&self)
src/llm/client.rs:132
↓ 1 callers
Function
endpoint_is_local
(url: &str)
src/llm/client.rs:675
↓ 1 callers
Function
entity_registry_load_data
Load registry data from `path`, falling back to defaults on any error. Returns `RegistryData::default()` when the file is absent, unreadable, or malf
src/palace/entity_registry.rs:1057
↓ 1 callers
Function
entity_registry_wikipedia_lookup
Fetch a Wikipedia REST API summary page and classify the result. Caller is responsible for ensuring `allow_network = true` before calling. A 404 resp
src/palace/entity_registry.rs:1306
↓ 1 callers
Function
export_query_drawers
Fetch all drawers for export, ordered by wing / room / `filed_at`.
src/palace/exporter.rs:153
↓ 1 callers
Function
export_write_index
Write a navigation `index.md` to `output_dir` listing all wings and rooms. Called by [`export_palace`] after all room files are written. The index is
src/palace/exporter.rs:267
↓ 1 callers
Function
export_write_room
Write a single room's markdown file to `output_dir/wing/room.md`.
src/palace/exporter.rs:223
↓ 1 callers
Function
extract_candidates_stop_words
()
src/palace/entity_detect.rs:240
↓ 1 callers
Function
extract_content
(value: &serde_json::Value)
src/normalize/claude_code.rs:218
↓ 1 callers
Function
extract_endpoint_hostname
Extract the lowercase hostname from a URL string. Strips scheme, port, and path. Handles IPv6 bracketed addresses (`[::1]`). Returns an empty string
src/llm/client.rs:730
↓ 1 callers
Function
extract_key_sentence_raw
Resolve the unfiltered key sentence — caller is responsible for sanitizing AAAK-reserved characters before encoding.
src/dialect/mod.rs:150
↓ 1 callers
Function
extract_key_sentence_score
Called by `extract_key_sentence` to score, rank, and truncate sentences. Scores each sentence by decision-word density and length. Returns the highes
src/dialect/mod.rs:185
↓ 1 callers
Function
extract_memories_score_segment
Score a single segment against all marker types, returning the winning type and confidence. Returns `None` only when no marker patterns match. `extra
src/extract/mod.rs:86
↓ 1 callers
Function
extract_topics
Extract key topic words from plain text by frequency + proper noun boost.
src/dialect/topics.rs:34
↓ 1 callers
Function
folder_map
()
src/palace/room_detect.rs:116
↓ 1 callers
Function
general_room
()
src/palace/room_detect.rs:198
↓ 1 callers
Function
get_sentiment
Classify `text` as `"positive"`, `"negative"`, or `"neutral"` using word lists.
src/extract/mod.rs:279
↓ 1 callers
Function
git_authors
Return up to `MAX_COMMITS_PER_REPO` `(name, email)` pairs from `git log`. Uses `%x00` (NUL) as the field separator between `%aN` and `%aE` so that au
src/palace/project_scanner.rs:416
↓ 1 callers
Function
git_global_identity
Return `(name, email)` from the global git config, or empty strings on failure.
src/palace/project_scanner.rs:393
↓ 1 callers
Function
git_user_identity
Return `(name, email)` from the repo-local git config, or empty strings on failure.
src/palace/project_scanner.rs:381
↓ 1 callers
Function
graph_stats
Summary statistics about the palace graph.
src/palace/graph.rs:310
↓ 1 callers
Function
handle_request_dispatch
Dispatch a validated JSON-RPC method to the appropriate handler. Called after `handle_request` has confirmed the request is a well-formed object with
src/mcp/mod.rs:276
↓ 1 callers
Function
handle_request_initialize
Handle the `initialize` method: negotiate protocol version and return server info.
src/mcp/mod.rs:313
↓ 1 callers
Function
handle_request_tools_call
Dispatch a `tools/call` request and return a sanitized JSON-RPC response.
src/mcp/mod.rs:338
↓ 1 callers
Function
has_resolution
Return `true` if `text` contains any resolution phrase (e.g. "fixed", "solved").
src/extract/mod.rs:310
↓ 1 callers
Function
header_field_encode
Percent-encode an AAAK header field so it survives round-tripping. Replaces `%`, `|`, newline, and CR with their `%XX` escapes. Empty input emits the
src/dialect/mod.rs:514
↓ 1 callers
Function
hook_theme_stopwords
Stopwords for theme extraction — common English function words.
src/cli/hook.rs:579
↓ 1 callers
Function
http_get
GET `url` and return the parsed response body as a [`Value`]. Used by availability probes that only need to reach a URL, not send a body. Called by [
src/llm/client.rs:609
↓ 1 callers
Function
http_get_with_headers
GET `url` with additional `headers` and return the parsed response body. Used by [`OpenAICompatProvider::check_available`] which needs to send an `Au
src/llm/client.rs:636
↓ 1 callers
Function
invalidate_check_inverted_intervals
Reject `invalidate(...)` calls whose `ended` would create an inverted interval. Scans the active triples that the UPDATE would touch and compares eac
src/kg/mod.rs:955
↓ 1 callers
Function
is_bot
Return `true` if `name` or `email` match known bot patterns.
src/palace/project_scanner.rs:449
↓ 1 callers
Function
is_registry_row
Registry rows are bookkeeping for the convo miner — preserve them so the next mine pass doesn't re-chunk + re-embed the entire transcript.
src/cli/sync.rs:57
↓ 1 callers
Function
layer1_append_kg_facts
Query active KG facts and format them as display lines for L1 context injection. Called by `layer1` to append entity-relationship context below the r
src/palace/layers.rs:164
↓ 1 callers
Function
layer1_build_room_map
Build a room → [(content, `source_name`)] map from drawer rows.
src/palace/layers.rs:125
↓ 1 callers
Function
layer2_format_row
Format one layer2 result row into a display line.
src/palace/layers.rs:318
↓ 1 callers
Function
layer2_query
Execute the SQL for layer2, returning raw rows.
src/palace/layers.rs:285
↓ 1 callers
Function
layer3_add_neighbor_context
Expand the anchor result's adjacent chunks and append them to the output lines. Radius of 2 means up to 4 adjacent chunks are fetched (2 before, 2 af
src/palace/layers.rs:428
↓ 1 callers
Function
legacy_dir
Returns the legacy `~/.mempalace` directory, used only for migration detection.
src/config.rs:98
↓ 1 callers
Method
load
Load the registry from disk. Returns a fresh empty registry when the file is absent, unreadable, or contains invalid JSON. No error is propagated.
src/palace/entity_registry.rs:348
↓ 1 callers
Method
lookup_check_people
Check the people map for a word match, applying disambiguation for ambiguous names. Called by [`EntityRegistry::lookup`].
src/palace/entity_registry.rs:887
↓ 1 callers
Method
lookup_check_projects
Check the projects list for a word match. Called by [`EntityRegistry::lookup`].
src/palace/entity_registry.rs:926
↓ 1 callers
Method
lookup_check_wiki_cache
Check the wiki cache for a confirmed entry matching `word`. Only confirmed entries are returned; unconfirmed research results are not surfaced as loo
src/palace/entity_registry.rs:955
↓ 1 callers
Function
make_entity
(name: &str, entity_type: &str, confidence: f64)
src/palace/entity_confirm.rs:174
↓ 1 callers
Function
make_mega_file_with_short_session
Build a mega-file where one session chunk has fewer than 10 lines. Session 1 has only 3 body lines (below the 10-line minimum) and session 2 has the
src/cli/split.rs:1113
↓ 1 callers
Function
matcher_for_root
Load (or reuse) a per-root `Gitignore` matcher. Matchers are cached so a large palace doesn't reparse the same `.gitignore` for every drawer.
src/cli/sync.rs:79
↓ 1 callers
Function
maybe_migrate_inner
Perform the actual migration: move files from `source` to `destination`. `config.json` is moved last so that its presence at the destination acts as
src/config.rs:501
↓ 1 callers
Function
maybe_migrate_move_dir
Move a directory's file contents from `source` to `destination`.
src/config.rs:554
↓ 1 callers
Function
mine_convos_scan_file
Read one conversation file and, unless `dry_run`, write its chunks to the palace. Returns a `MineConvosFileOutcome` describing what happened so the c
src/palace/convo_miner.rs:582
↓ 1 callers
Function
mine_install_ctrl_c_handler
Install a Ctrl-C handler that flips an atomic flag on first signal. `mine_process_files` polls the returned flag once per file and aborts the loop cl
src/palace/miner.rs:755
↓ 1 callers
Function
mine_print_header
( wing: &str, rooms: &[crate::config::RoomConfig], file_count: usize, dry_run: bool, )
src/palace/miner.rs:248
↓ 1 callers
Function
mine_process_file_one
Process a single file in the mine loop. Returns `None` when the file is unreadable or too short. Otherwise returns `(drawers_added, room, hall, entit
src/palace/miner.rs:447
↓ 1 callers
Function
mine_process_files
Process all files in the mine loop. Returns `(drawers_total, files_skipped, files_unreadable_or_too_short, room_counts)`. Checks `ctrl_c_flag` before
src/palace/miner.rs:574
↓ 1 callers
Function
mine_resolve_wing_and_rooms
Resolve the canonical wing slug and the room list `mine` will use, given the user-supplied [`MineParams`] and a canonicalised `project_dir`. This hel
src/palace/miner.rs:870
↓ 1 callers
Function
mine_run_topic_tunnels
Compute topic tunnels for `wing` after mining completes. Reads `topics_by_wing` from the global registry and calls `graph::topic_tunnels_for_wing`. D
src/palace/miner.rs:823
↓ 1 callers
Function
mine_should_skip_oversized
Decide whether a file should be skipped because it produced too many chunks. Returns `true` and prints a `[skip]` warning to stderr when `chunk_count
src/palace/miner.rs:428
↓ 1 callers
Function
mine_write_chunks
Write all chunks for one file into the palace.
src/palace/miner.rs:314
↓ 1 callers
Method
name
(&self)
src/sources/adapter.rs:250
↓ 1 callers
Function
pass0_consent_obtained
Non-interactive consent check used by Pass 0 corpus-origin LLM detection. Returns `true` when the provider may be used without prompting: - Local pro
src/cli/init.rs:453
↓ 1 callers
Function
pattern_targets_non_ascii
Return `true` when `pattern` references characters outside the ASCII range. Used by [`extract_candidates`] to skip locale `candidate_patterns` that w
src/palace/entity_detect.rs:280
↓ 1 callers
Function
query_stats_entity_count
Query `COUNT(*) FROM entities`.
src/palace/stats.rs:111
↓ 1 callers
Function
query_stats_room_counts
Query per-room drawer counts, ordered by wing then count descending.
src/palace/stats.rs:74
↓ 1 callers
Function
query_stats_total_drawers
Query `COUNT(*) FROM drawers`.
src/palace/stats.rs:28
↓ 1 callers
Function
query_stats_triple_count
Query `COUNT(*) FROM triples`.
src/palace/stats.rs:126
↓ 1 callers
Function
query_stats_wing_counts
Query per-wing drawer counts, ordered by count descending.
src/palace/stats.rs:43
↓ 1 callers
Function
rebuild_index_execute
Collect all drawers and rebuild the index inside an already-open transaction. Called exclusively by `rebuild_index`. Errors propagate to the caller,
src/palace/repair.rs:128
↓ 1 callers
Function
refine_entities_batch
Send one batch to the LLM and parse its decisions. Returns `Some(decisions)` on success (map may be empty if the LLM drops all), or `None` when the L
src/llm/refine.rs:255
↓ 1 callers
Function
regenerate_closets_fetch_drawers
Called by `regenerate_closets` to query drawers from the database. When `wing` is `Some`, only drawers in that wing are returned. When `limit` is `So
src/palace/closet_llm.rs:138
↓ 1 callers
Function
regenerate_closets_fetch_drawers_query
Called by `regenerate_closets_fetch_drawers` to run the parameterized SELECT. Split out so the parent stays under the 70-line cap; this leaf concentr
src/palace/closet_llm.rs:186
↓ 1 callers
Function
regenerate_closets_process_drawer
Called by `regenerate_closets` to process one drawer through the LLM and upsert the result. Builds a user prompt from the drawer's metadata and conte
src/palace/closet_llm.rs:244
↓ 1 callers
Function
registry_data_default_mode
Returns the default mode string for a freshly constructed `RegistryData`.
src/palace/entity_registry.rs:294
↓ 1 callers
Function
registry_data_default_version
Returns the default version number for a freshly constructed `RegistryData`.
src/palace/entity_registry.rs:289
↓ 1 callers
Function
resolve_git_dir
Resolve the real git directory for plain repos (`.git/` dir), submodules, and worktrees (`.git` file containing `gitdir: <path>`). Returns `None` onl
build.rs:40
↓ 1 callers
Function
resolve_project_root
Return the longest project root that `source_file` lives under, mirroring the longest-prefix-wins rule in `mempalace/sync.py`.
src/cli/sync.rs:63
↓ 1 callers
Function
resolve_ref
Resolve a ref name (e.g. `refs/heads/master`) to a full SHA string. Tries the loose object file at `git_dir/<ref_name>` first, then falls back to sca
build.rs:103
↓ 1 callers
Function
run_closet_llm
Handle the `closet-llm` sub-command — regenerates closets using a configured LLM.
src/app.rs:491
← previous
next →
501–600 of 2,248, ranked by callers