* feat: add 4 context engine plugins
- topic-memory: keyword clustering for topic-aware memory recall
- episodic-memory: conversation segmentation and cross-session recall
- user-profile: persistent user profiling from conversation patterns
- context-decay: time-based memory decay with reinforcement dynamics
All plugins use the ingest/after_turn hook protocol with stdin/stdout JSON.
* chore: add plugin scaffolding, update docs and templates
- Add plugin.toml template with {{NAME}} placeholder
- Add new-plugin Makefile target with hooks/ scaffolding
- Update plugins/README.md with all 10 plugins
- Update README.md stats (10 plugins, 220+ models)
- Add Plugin checkbox and checklist to PR template
- Add Plugin to issue template content type dropdown
- Fix CONTRIBUTING.md: last_verified is recommended, not required
* fix: correct model pricing and remove deprecated entries
- openrouter/gemma-2-9b-it: fix pricing from 0.0 to 0.03/0.09 per M tokens
(free variant correctly stays at 0.0)
- github-copilot: remove deprecated copilot/gpt-4 model entry
(GPT-4 retired in favor of GPT-4o for Copilot)
* docs: annotate kimi-coding as membership-gated
Kimi Code CLI uses quota-based membership model (not per-token billing).
Free tier has limited weekly requests; underlying model is K2.5.
Pricing kept at 0.0 consistent with other subscription providers
(chatgpt, github-copilot) but with explanatory comments.
* style: fix trailing newline in github-copilot.toml
* fix: correct Moonshot/Kimi model pricing from official sources
All 5 models had incorrect pricing:
- moonshot-v1-8k: 0.10/0.10 → 0.20/2.00
- moonshot-v1-32k: 0.30/0.30 → 1.00/3.00
- moonshot-v1-128k: 0.80/0.80 → 2.00/5.00
- kimi-k2: 2.00/8.00 → 0.60/2.50
- kimi-k2.5: 2.00/8.00 → 0.45/2.20
Sources: platform.moonshot.ai/docs/pricing/chat, costgoat.com, getmaxim.ai
* feat: add MiniMax M2.7 and M2.7-highspeed models
Released 2026-03-18, MiniMax's latest flagship text model.
10B activated params, 200K context, 128K output, tool use, streaming.
Pricing: $0.30/$1.20 per M tokens (input/output).
Added to both international (minimax.io) and China (minimaxi.com) providers.
72 lines
2.5 KiB
Markdown
72 lines
2.5 KiB
Markdown
# Plugins
|
|
|
|
Plugin packages for LibreFang. Plugins extend agent behavior through lifecycle hooks -- they can inject memories, modify context, or perform side effects during conversations.
|
|
|
|
## Structure
|
|
|
|
```
|
|
plugins/
|
|
└── <plugin-name>/
|
|
├── plugin.toml # Plugin manifest
|
|
├── hooks/
|
|
│ ├── ingest.py # Called on user message
|
|
│ └── after_turn.py # Called after each turn
|
|
└── requirements.txt # Python dependencies
|
|
```
|
|
|
|
## plugin.toml Format
|
|
|
|
```toml
|
|
name = "plugin-name" # Must match directory name
|
|
version = "0.1.0"
|
|
description = "What this plugin does"
|
|
author = "author-name"
|
|
|
|
[hooks]
|
|
ingest = "hooks/ingest.py" # Receives user message, can return memories
|
|
after_turn = "hooks/after_turn.py" # Post-turn processing
|
|
```
|
|
|
|
## Hook Protocol
|
|
|
|
Hooks communicate via stdin/stdout JSON:
|
|
|
|
### ingest hook
|
|
|
|
```
|
|
stdin: {"type": "ingest", "agent_id": "...", "message": "user message"}
|
|
stdout: {"type": "ingest_result", "memories": [{"content": "..."}]}
|
|
```
|
|
|
|
### after_turn hook
|
|
|
|
```
|
|
stdin: {"type": "after_turn", "agent_id": "...", "messages": [...]}
|
|
stdout: {"type": "ok"}
|
|
```
|
|
|
|
## Current Plugins (10)
|
|
|
|
| Plugin | Hooks | Description |
|
|
|--------|-------|-------------|
|
|
| auto-summarizer | ingest, after_turn | Running conversation summary for long context compression |
|
|
| context-decay | ingest, after_turn | Time-based memory decay with relevance scoring for natural forgetting |
|
|
| conversation-logger | after_turn | Logs conversations to JSONL files for auditing and analytics |
|
|
| episodic-memory | ingest, after_turn | Episode-based conversation segmentation and cross-session recall |
|
|
| guardrails | ingest | Safety filter detecting PII, prompt injection, and credential exposure |
|
|
| keyword-memory | ingest | Extracts keywords and named entities as contextual memories |
|
|
| sentiment-tracker | ingest | Analyzes user sentiment and injects emotional context |
|
|
| todo-tracker | ingest, after_turn | Detects, persists, and recalls action items from conversations |
|
|
| topic-memory | ingest, after_turn | Topic-aware keyword clustering with cross-conversation context recall |
|
|
| user-profile | ingest, after_turn | Persistent user profiling from conversation patterns for personalization |
|
|
|
|
## Adding a New Plugin
|
|
|
|
1. Create `plugins/<name>/plugin.toml`
|
|
2. Add hook scripts in `hooks/`
|
|
3. List dependencies in `requirements.txt` (prefer stdlib-only)
|
|
4. Run `python scripts/validate.py`
|
|
5. Submit a PR
|
|
|
|
See [CONTRIBUTING.md](../CONTRIBUTING.md) for the full guide.
|