From a33b8b258e7b465af13f9d9e8eb2992034b75af7 Mon Sep 17 00:00:00 2001 From: Dmitry Shilov Date: Mon, 12 Oct 2026 15:25:15 +0300 Subject: [PATCH] chore(06-05): remove conversation-logger from signed registry (10 members) - delete plugins/conversation-logger/ tree (README, plugin.toml, hooks/after_turn.py) - drop the conversation-logger entry from index.json (11 -> 10 members) - copy index.json over plugins-index.json so the pair stays byte-identical - plugins/README.md: heading + table set to the index-authoritative count (10) NOT re-signed: index.json.sig / plugins-index.json.sig are the operator step (D-64). Pre-removal commit: 8dec8f603831865be8868ec7dc98a93d9868e740 --- index.json | 2 +- plugins-index.json | 2 +- plugins/README.md | 5 +- plugins/conversation-logger/README.md | 34 ---------- .../conversation-logger/hooks/after_turn.py | 68 ------------------- plugins/conversation-logger/plugin.toml | 39 ----------- 6 files changed, 4 insertions(+), 146 deletions(-) delete mode 100644 plugins/conversation-logger/README.md delete mode 100644 plugins/conversation-logger/hooks/after_turn.py delete mode 100644 plugins/conversation-logger/plugin.toml diff --git a/index.json b/index.json index 749af2e..58af3f6 100644 --- a/index.json +++ b/index.json @@ -1 +1 @@ -[{"name":"auto-summarizer","version":"0.1.0","description":"Maintains a running conversation summary to help agents handle long conversations without losing context"},{"name":"context-decay","version":"0.1.0","description":"Time-based memory decay with relevance scoring for natural context forgetting"},{"name":"conversation-logger","version":"0.1.0","description":"Logs all conversations to JSONL files for auditing, analytics, and debugging"},{"name":"episodic-memory","version":"0.1.0","description":"Episode-based memory segmentation and recall for cross-conversation context continuity"},{"name":"guardrails","version":"0.1.0","description":"Safety filter that detects potentially harmful content patterns and injects warnings into agent context"},{"name":"keyword-memory","version":"0.1.0","description":"Extracts keywords and named entities from user messages and returns them as contextual memories"},{"name":"mempalace-indexer","version":"0.3.0","description":"Auto-index conversations into MemPalace and recall relevant memories. No API keys, no cloud."},{"name":"sentiment-tracker","version":"0.1.0","description":"Analyzes user message sentiment and injects emotional context so agents can respond with appropriate tone"},{"name":"todo-tracker","version":"0.1.0","description":"Detects action items and tasks mentioned in conversations, persists them, and recalls them as context"},{"name":"topic-memory","version":"0.1.0","description":"Topic-aware memory recall with keyword clustering for cross-conversation context"},{"name":"user-profile","version":"0.1.0","description":"Persistent user profiling from conversation patterns for personalized agent responses"}] \ No newline at end of file +[{"name":"auto-summarizer","version":"0.1.0","description":"Maintains a running conversation summary to help agents handle long conversations without losing context"},{"name":"context-decay","version":"0.1.0","description":"Time-based memory decay with relevance scoring for natural context forgetting"},{"name":"episodic-memory","version":"0.1.0","description":"Episode-based memory segmentation and recall for cross-conversation context continuity"},{"name":"guardrails","version":"0.1.0","description":"Safety filter that detects potentially harmful content patterns and injects warnings into agent context"},{"name":"keyword-memory","version":"0.1.0","description":"Extracts keywords and named entities from user messages and returns them as contextual memories"},{"name":"mempalace-indexer","version":"0.3.0","description":"Auto-index conversations into MemPalace and recall relevant memories. No API keys, no cloud."},{"name":"sentiment-tracker","version":"0.1.0","description":"Analyzes user message sentiment and injects emotional context so agents can respond with appropriate tone"},{"name":"todo-tracker","version":"0.1.0","description":"Detects action items and tasks mentioned in conversations, persists them, and recalls them as context"},{"name":"topic-memory","version":"0.1.0","description":"Topic-aware memory recall with keyword clustering for cross-conversation context"},{"name":"user-profile","version":"0.1.0","description":"Persistent user profiling from conversation patterns for personalized agent responses"}] \ No newline at end of file diff --git a/plugins-index.json b/plugins-index.json index 749af2e..58af3f6 100644 --- a/plugins-index.json +++ b/plugins-index.json @@ -1 +1 @@ -[{"name":"auto-summarizer","version":"0.1.0","description":"Maintains a running conversation summary to help agents handle long conversations without losing context"},{"name":"context-decay","version":"0.1.0","description":"Time-based memory decay with relevance scoring for natural context forgetting"},{"name":"conversation-logger","version":"0.1.0","description":"Logs all conversations to JSONL files for auditing, analytics, and debugging"},{"name":"episodic-memory","version":"0.1.0","description":"Episode-based memory segmentation and recall for cross-conversation context continuity"},{"name":"guardrails","version":"0.1.0","description":"Safety filter that detects potentially harmful content patterns and injects warnings into agent context"},{"name":"keyword-memory","version":"0.1.0","description":"Extracts keywords and named entities from user messages and returns them as contextual memories"},{"name":"mempalace-indexer","version":"0.3.0","description":"Auto-index conversations into MemPalace and recall relevant memories. No API keys, no cloud."},{"name":"sentiment-tracker","version":"0.1.0","description":"Analyzes user message sentiment and injects emotional context so agents can respond with appropriate tone"},{"name":"todo-tracker","version":"0.1.0","description":"Detects action items and tasks mentioned in conversations, persists them, and recalls them as context"},{"name":"topic-memory","version":"0.1.0","description":"Topic-aware memory recall with keyword clustering for cross-conversation context"},{"name":"user-profile","version":"0.1.0","description":"Persistent user profiling from conversation patterns for personalized agent responses"}] \ No newline at end of file +[{"name":"auto-summarizer","version":"0.1.0","description":"Maintains a running conversation summary to help agents handle long conversations without losing context"},{"name":"context-decay","version":"0.1.0","description":"Time-based memory decay with relevance scoring for natural context forgetting"},{"name":"episodic-memory","version":"0.1.0","description":"Episode-based memory segmentation and recall for cross-conversation context continuity"},{"name":"guardrails","version":"0.1.0","description":"Safety filter that detects potentially harmful content patterns and injects warnings into agent context"},{"name":"keyword-memory","version":"0.1.0","description":"Extracts keywords and named entities from user messages and returns them as contextual memories"},{"name":"mempalace-indexer","version":"0.3.0","description":"Auto-index conversations into MemPalace and recall relevant memories. No API keys, no cloud."},{"name":"sentiment-tracker","version":"0.1.0","description":"Analyzes user message sentiment and injects emotional context so agents can respond with appropriate tone"},{"name":"todo-tracker","version":"0.1.0","description":"Detects action items and tasks mentioned in conversations, persists them, and recalls them as context"},{"name":"topic-memory","version":"0.1.0","description":"Topic-aware memory recall with keyword clustering for cross-conversation context"},{"name":"user-profile","version":"0.1.0","description":"Persistent user profiling from conversation patterns for personalized agent responses"}] \ No newline at end of file diff --git a/plugins/README.md b/plugins/README.md index a2e29a2..74f50e6 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -76,13 +76,12 @@ librefang plugin list --agent coder Hands can also declare an `allowed_plugins` list in `HAND.toml`, which restricts which installed plugins are active within that hand. -## All Plugins (12 total) +## All Plugins (10 total) | Name | Version | Hooks | Description | |------|---------|-------|-------------| | auto-summarizer | 0.1.0 | ingest, after_turn | Maintains a running conversation summary to help agents handle long conversations without losing context | | context-decay | 0.1.0 | ingest, after_turn | Time-based memory decay with relevance scoring for natural context forgetting | -| conversation-logger | 0.1.0 | after_turn | Logs all conversations to JSONL files for auditing, analytics, and debugging | | episodic-memory | 0.1.0 | ingest, after_turn | Episode-based memory segmentation and recall for cross-conversation context continuity | | guardrails | 0.1.0 | ingest | Safety filter that detects potentially harmful content patterns and injects warnings into agent context | | keyword-memory | 0.1.0 | ingest | Extracts keywords and named entities from user messages and returns them as contextual memories | @@ -92,7 +91,7 @@ Hands can also declare an `allowed_plugins` list in `HAND.toml`, which restricts | topic-memory | 0.1.0 | ingest, after_turn | Topic-aware memory recall with keyword clustering for cross-conversation context | | user-profile | 0.1.0 | ingest, after_turn | Persistent user profiling from conversation patterns for personalized agent responses | -Note: the `guardrails` and `mempalace-indexer` plugins have no `after_turn` hook; `conversation-logger` has no `ingest` hook. +Note: the `guardrails` and `mempalace-indexer` plugins have no `after_turn` hook. ## Hook Execution Order diff --git a/plugins/conversation-logger/README.md b/plugins/conversation-logger/README.md deleted file mode 100644 index 5a9d332..0000000 --- a/plugins/conversation-logger/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# conversation-logger - -Logs all conversations to JSONL files for auditing, analytics, and debugging. Each agent gets its own log file at `~/.librefang/logs/conversations/{agent_id}.jsonl`. - -## Log Format - -Each line is a JSON object: - -```json -{ - "timestamp": "2026-03-21T12:34:56Z", - "agent_id": "agent-abc123", - "turn_number": 5, - "message_count": 10, - "last_user_message": "truncated to 200 chars...", - "last_assistant_message": "truncated to 200 chars..." -} -``` - -## Hooks - -| Hook | Script | Description | -|------|--------|-------------| -| after_turn | `hooks/after_turn.py` | Appends a log entry after each conversation turn | - -## How It Works - -After each conversation turn the hook extracts summary information from the messages array and appends a single JSON line to the agent's log file. User and assistant messages are truncated to 200 characters to keep log files manageable. - -Errors from the filesystem (permissions, disk full, etc.) are caught silently so the agent conversation is never interrupted by a logging failure. - -## Usage - -Installed automatically when enabled in agent configuration. Log files are created on first write -- no manual setup required. diff --git a/plugins/conversation-logger/hooks/after_turn.py b/plugins/conversation-logger/hooks/after_turn.py deleted file mode 100644 index ce1a3a0..0000000 --- a/plugins/conversation-logger/hooks/after_turn.py +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env python3 -"""Conversation logger after_turn hook. - -Appends a JSON line to a per-agent log file after each conversation turn. -Log files are stored under ~/.librefang/logs/conversations/{agent_id}.jsonl. - -Receives via stdin: - {"type": "after_turn", "agent_id": "...", "messages": [...]} - -Prints to stdout: - {"type": "ok"} -""" -import json -import os -import sys -from datetime import datetime, timezone -from pathlib import Path - - -def _log_dir() -> Path: - """Return the conversations log directory, creating it if needed.""" - home = Path.home() - log_path = home / ".librefang" / "logs" / "conversations" - log_path.mkdir(parents=True, exist_ok=True) - return log_path - - -def _last_message_by_role(messages: list, role: str) -> str: - """Find the last message with the given role and return its content truncated to 200 chars.""" - for msg in reversed(messages): - if msg.get("role") == role: - content = msg.get("content", "") - if len(content) > 200: - return content[:200] + "..." - return content - return "" - - -def main(): - request = json.loads(sys.stdin.read()) - agent_id = request.get("agent_id", "unknown") - messages = request.get("messages", []) - - entry = { - "timestamp": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"), - "agent_id": agent_id, - "turn_number": max( - sum(1 for m in messages if m.get("role") == "assistant"), 1 - ), - "message_count": len(messages), - "last_user_message": _last_message_by_role(messages, "user"), - "last_assistant_message": _last_message_by_role(messages, "assistant"), - } - - try: - log_file = _log_dir() / f"{agent_id}.jsonl" - with open(log_file, "a", encoding="utf-8") as f: - f.write(json.dumps(entry, ensure_ascii=False) + "\n") - except OSError: - # Filesystem issues should not crash the agent. The hook still - # responds with "ok" so the conversation continues normally. - pass - - print(json.dumps({"type": "ok"})) - - -if __name__ == "__main__": - main() diff --git a/plugins/conversation-logger/plugin.toml b/plugins/conversation-logger/plugin.toml deleted file mode 100644 index 584db88..0000000 --- a/plugins/conversation-logger/plugin.toml +++ /dev/null @@ -1,39 +0,0 @@ -name = "conversation-logger" -version = "0.1.0" -description = "Logs all conversations to JSONL files for auditing, analytics, and debugging" -author = "librefang" - -[hooks] -after_turn = "hooks/after_turn.py" - - -[i18n.zh] -name = "对话日志" -description = "将所有会话写入 JSONL 文件,便于审计、分析与调试。" - -[i18n.zh-TW] -name = "對話日誌" -description = "將所有會話寫入 JSONL 檔案,便於稽核、分析與除錯。" - -[i18n.ja] -name = "会話ロガー" -description = "全会話を JSONL に記録し、監査・分析・デバッグに利用。" - -[i18n.ko] -name = "대화 로거" -description = "모든 대화를 JSONL 파일로 기록하여 감사, 분석, 디버깅에 활용." - -[i18n.de] -name = "Konversations-Logger" -description = "Protokolliert alle Konversationen in JSONL-Dateien für Audit, Analytics und Debugging." - -[i18n.es] -name = "Registro de conversaciones" -description = "Registra todas las conversaciones en archivos JSONL para auditoría, analítica y depuración." - -[i18n.fr] -name = "Journal de conversations" -description = "Enregistre toutes les conversations en JSONL pour audit, analytics et débogage." - -[integrity] -"hooks/after_turn.py" = "19a008af65e6797186ac0cc5b88e6d3c889fb1e312a099d65b9e10ee749eb65e"