Files
librefang-registry/plugins/mempalace-indexer/plugin.toml
T
Evan 7881d327a5 refactor: migrate icon fields from emoji to lucide:<name> tokens (#63)
* refactor: migrate icon fields from emoji to lucide:<name> tokens

Every TOML manifest's `icon = "<emoji>"` line is replaced with
`icon = "lucide:<kebab-name>"` — a reference to a lucide-react icon,
which the librefang.ai site and dashboard render as crisp SVG. Reasons
for the switch:

- Emoji render very differently across OS/browser/font stacks; the
  registry catalog looked inconsistent from one row to the next.
- Five manifests (clip / creator / linkedin / reddit / twitter) had
  their icons stored as literal Python-style escape strings
  ("\\U0001F3AC") because the TOML parser upstream never decoded
  them. Switching away from emoji drops that class of bug entirely.
- As a drive-by, also decode the \\uXXXX accent escapes in the
  [i18n.fr] block of hands/creator/HAND.toml so "Créateur" shows
  up correctly.

87 files touched. example manifests left untouched (still "TODO").

* fix: backfill i18n name + drop the single-member email category

- Every existing [i18n.<lang>] block now has a `name` field. 60 files
  previously translated description but kept the English name
  implicitly — which rendered as "some English some Chinese" in the
  registry UI. Fill in the missing name from the English brand (or a
  known localized equivalent: DingTalk→钉钉, Feishu→飞书, Email→
  电子邮件 / メール / E-Mail / Correo / Courriel, and a handful of
  hands that have Chinese product names like 视频剪辑 Hand).
- channels/email.toml was the only item under category="email";
  reclassify it as "messaging" so the sub-category filter chip list
  on the category page isn't littered with singletons.

* feat(i18n): localize 76 agents/integrations/plugins into 7 languages

Adds full [i18n.zh], [i18n.zh-TW], [i18n.ja], [i18n.ko], [i18n.de],
[i18n.es], [i18n.fr] blocks with name + description to every manifest
that previously shipped English-only.

Coverage:
- 32 agents (academic-researcher, analyst, architect, assistant,
  code-reviewer, coder, customer-support, data-scientist, debugger,
  devops-lead, doc-writer, email-assistant, health-tracker,
  hello-world, home-automation, legal-assistant, meeting-assistant,
  ops, orchestrator, personal-finance, planner, recipe-assistant,
  recruiter, researcher, sales-assistant, security-auditor,
  social-media, test-engineer, translator, travel-planner, tutor,
  writer)
- 33 integrations (AWS, Azure, Bitbucket, Brave Search, Discord,
  Dropbox, Elasticsearch, Exa Search, Fetch, Filesystem, GCP, Git,
  GitHub, GitLab, Gmail, Google Calendar, Google Drive, Google Maps,
  Jira, Linear, Memory, MongoDB, Notion, PostgreSQL, Puppeteer, Redis,
  Sentry, Sequential Thinking, Slack, SQLite, Teams, Time, Todoist) —
  brand names kept as-is across all locales, only descriptions
  translated.
- 11 plugins (auto-summarizer, context-decay, conversation-logger,
  episodic-memory, guardrails, keyword-memory, mempalace-indexer,
  sentiment-tracker, todo-tracker, topic-memory, user-profile)

The descriptions are one-line summaries — hand-translated rather than
machine-generated, so technical terms (MCP, PR, CI/CD, etc.) stay
consistent across locales.

* feat(i18n): close remaining per-lang gaps for channels, workflows, devteam

Third pass on i18n coverage. Every non-example manifest now carries a
full set of [i18n.zh], [i18n.zh-TW], [i18n.ja], [i18n.ko], [i18n.de],
[i18n.es], [i18n.fr] blocks.

- 44 channel adapters: added French descriptions (zh/zh-TW/ja/ko/de/es
  were already present). Brand names kept as-is in all locales so users
  recognize Discord / Slack / LINE / etc. consistently.
- 22 workflows: filled zh-TW / ja / ko / de / es / fr blocks. Each
  translation mirrors the existing zh one in structure and tone so the
  catalog reads consistently across locales.
- hands/devteam/HAND.toml: added the four langs that were missing
  (zh-TW, de, es, fr).

Only the 6 templates under examples/ are left without i18n blocks on
purpose — they still contain "TODO:" placeholders.
2026-04-17 22:04:26 +09:00

151 lines
6.0 KiB
TOML

name = "mempalace-indexer"
version = "0.3.0"
description = "Auto-index conversations into MemPalace and recall relevant memories. No API keys, no cloud."
author = "LibreFang Community"
requirements = "requirements.txt"
librefang_min_version = "2026.4.0"
# ---------------------------------------------------------------------------
# Hook execution settings
#
# MUST sit above [hooks] so they land on the top-level table instead of being
# folded into [hooks] by TOML table scoping rules (validate.py iterates
# data["hooks"].items() expecting every value to be a hook file path).
# ---------------------------------------------------------------------------
# ingest is fast (vector search) — 30 s is generous.
# after_turn does classification + write — 60 s covers a slow machine or large turn.
hook_timeout_secs = 30
# A temporary mempalace outage should not block the agent turn.
on_hook_failure = "warn"
# One silent retry handles transient ChromaDB lock contention.
max_retries = 1
retry_delay_ms = 500
# Python interpreter startup is ~200 ms. Keep subprocesses alive between calls
# to eliminate that overhead on every user message.
persistent_subprocess = true
# ingest results are deterministic for the same message text — cache for 60 s
# to avoid redundant embedding lookups on rapid follow-up turns.
hook_cache_ttl_secs = 60
# Priority 0 (default). Raise to e.g. 10 to run before other recall plugins.
priority = 0
# ---------------------------------------------------------------------------
# System binary requirements
# ---------------------------------------------------------------------------
[[requires]]
binary = "python3"
install_hint = "Install Python 3.9+ from https://python.org or via your system package manager (apt install python3 / brew install python)"
# ---------------------------------------------------------------------------
# Hook scripts
#
# Every value in this section MUST be a path relative to the plugin directory.
# Execution settings live above at the top level.
# ---------------------------------------------------------------------------
[hooks]
ingest = "hooks/ingest.py"
after_turn = "hooks/after_turn.py"
# ---------------------------------------------------------------------------
# [config] — user-configurable settings
#
# The runtime merges user overrides with these defaults and writes the result
# as JSON to the path in LIBREFANG_PLUGIN_CONFIG before each hook subprocess.
# Hooks should read that file (falling back to environment variables for
# backward compatibility with direct invocation).
# ---------------------------------------------------------------------------
[config.palace_path]
type = "string"
default = "~/.mempalace/palace"
description = "Path to the MemPalace directory (passed to mempalace APIs and ChromaDB)."
[config.min_chars]
type = "number"
default = 80
description = "Minimum character length of extracted conversation text to be worth saving. Shorter exchanges are skipped by after_turn."
[config.window_size]
type = "number"
default = 6
description = "Number of recent messages the after_turn hook considers when extracting text (sliding window from the end of the conversation)."
[config.dedup_max]
type = "number"
default = 500
description = "Maximum number of SHA-256 content hashes kept in the per-agent deduplication store. Oldest entries are dropped first when the cap is reached."
[config.lang_detect]
type = "boolean"
default = true
description = "Enable language detection via langdetect. When true, non-English exchanges bypass the English keyword relevance filter and are indexed on length alone."
[config.max_chars]
type = "number"
default = 300
description = "Maximum characters per injected memory snippet in the ingest hook. Longer texts are truncated at the nearest word boundary."
[config.min_similarity]
type = "number"
default = 0.3
description = "Minimum similarity score (0-1, higher = more relevant) for memories returned by the ingest hook. Results below this threshold are dropped. Set to 0 to disable filtering."
[config.n_results]
type = "number"
default = 5
description = "Number of memories the ingest hook retrieves from MemPalace per turn."
[config.max_age_days]
type = "number"
default = 90
description = "Prune drawers older than this many days when running hooks/prune.py. Set to 0 to disable TTL pruning."
# ---------------------------------------------------------------------------
# [integrity] — SHA-256 hashes verified at load time
#
# Regenerate after editing hook files:
# sha256sum hooks/ingest.py hooks/after_turn.py hooks/prune.py
# ---------------------------------------------------------------------------
[integrity]
"hooks/ingest.py" = "621b17f2d0afbd6142a49963fb57187a500cfeac057c13cb80961b6222bd03e2"
"hooks/after_turn.py" = "1c5bcdade4ca0d785878d60910105208fcff38f74872426ee821363ce5bf9811"
"hooks/prune.py" = "2dceeb9bb0d0b7ee224291bfce600f629f38b4a853cd437774d9b66ef226838d"
[i18n.zh]
name = "MemPalace 索引器"
description = "自动把对话索引进 MemPalace 并召回相关记忆。无需 API key、不依赖云端。"
[i18n.zh-TW]
name = "MemPalace 索引器"
description = "自動將對話索引進 MemPalace 並召回相關記憶。無需 API key、不依賴雲端。"
[i18n.ja]
name = "MemPalace インデクサ"
description = "会話を MemPalace に自動索引し関連メモリを想起。API キー不要・クラウド不要。"
[i18n.ko]
name = "MemPalace 인덱서"
description = "대화를 MemPalace에 자동 색인하고 관련 기억을 회상. API 키 불필요, 클라우드 불필요."
[i18n.de]
name = "MemPalace-Indexer"
description = "Indiziert Gespräche automatisch in MemPalace und ruft passende Erinnerungen ab. Ohne API-Keys, ohne Cloud."
[i18n.es]
name = "Indexador MemPalace"
description = "Indexa automáticamente las conversaciones en MemPalace y recupera memorias relevantes. Sin API keys ni cloud."
[i18n.fr]
name = "Indexeur MemPalace"
description = "Indexe automatiquement les conversations dans MemPalace et rappelle les mémoires pertinentes. Sans clé d'API, sans cloud."