chore(integrations): plugin updates, pi-agent auto-recall, and version bumps (#6011)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mem0",
|
||||
"version": "0.2.11",
|
||||
"version": "0.2.12",
|
||||
"description": "Persistent memory for Claude Code. Remembers decisions, patterns, and preferences across sessions.",
|
||||
"author": {
|
||||
"name": "Mem0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mem0",
|
||||
"version": "0.2.11",
|
||||
"version": "0.2.12",
|
||||
"description": "Persistent memory for Codex. Remembers decisions, patterns, and preferences across sessions.",
|
||||
"author": {
|
||||
"name": "Mem0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mem0",
|
||||
"version": "0.2.11",
|
||||
"version": "0.2.12",
|
||||
"description": "Mem0 memory layer for AI applications. Add persistent memory, personalization, and semantic search using the Mem0 Platform MCP server.",
|
||||
"author": {
|
||||
"name": "Mem0",
|
||||
|
||||
@@ -463,7 +463,7 @@ Identity context (resolved at plugin startup):
|
||||
}),
|
||||
|
||||
search_memories: tool({
|
||||
description: "Search through stored memories.",
|
||||
description: "Search stored memories by semantic meaning. Use this proactively before answering when the request may depend on the user's past work, preferences, decisions, or environment -- relevant memories are not always auto-injected. For multi-part or comparative questions, run several searches with different phrasings and combine the results rather than stopping after one (multi-hop).",
|
||||
args: {
|
||||
query: tool.schema.string().describe("Search query"),
|
||||
user_id: tool.schema.string().optional().describe("User ID"),
|
||||
@@ -489,7 +489,7 @@ Identity context (resolved at plugin startup):
|
||||
}),
|
||||
|
||||
get_memories: tool({
|
||||
description: "List all memories in the memory store, optionally filtered.",
|
||||
description: "List or browse stored memories without a search query -- useful for auditing what is remembered or paging through everything in a scope. To find memories relevant to a question, use search_memories instead (it ranks by semantic relevance).",
|
||||
args: {
|
||||
user_id: tool.schema.string().optional().describe("User ID"),
|
||||
app_id: tool.schema.string().optional().describe("App/Project ID"),
|
||||
@@ -513,7 +513,7 @@ Identity context (resolved at plugin startup):
|
||||
}),
|
||||
|
||||
get_memory: tool({
|
||||
description: "Retrieve a specific memory by its ID.",
|
||||
description: "Fetch one memory by its exact ID (e.g. an ID returned by search_memories or get_memories) to read its full content and metadata.",
|
||||
args: {
|
||||
id: tool.schema.string().describe("The ID of the memory to retrieve"),
|
||||
},
|
||||
@@ -525,7 +525,7 @@ Identity context (resolved at plugin startup):
|
||||
}),
|
||||
|
||||
update_memory: tool({
|
||||
description: "Update the content or metadata of a specific memory.",
|
||||
description: "Update an existing memory in place when a stored fact has changed -- requires the memory ID. Preserves the ID and history, so prefer this over deleting and re-adding.",
|
||||
args: {
|
||||
id: tool.schema.string().describe("The ID of the memory to update"),
|
||||
text: tool.schema.string().optional().describe("New text content for the memory"),
|
||||
@@ -542,7 +542,7 @@ Identity context (resolved at plugin startup):
|
||||
}),
|
||||
|
||||
delete_memory: tool({
|
||||
description: "Delete specific memories by their ID.",
|
||||
description: "Delete one or more memories by ID when they are wrong, obsolete, or the user asks to forget them. Irreversible -- only delete what is clearly no longer wanted.",
|
||||
args: {
|
||||
id: tool.schema.string().describe("The ID of the memory to delete"),
|
||||
},
|
||||
@@ -555,7 +555,7 @@ Identity context (resolved at plugin startup):
|
||||
}),
|
||||
|
||||
delete_all_memories: tool({
|
||||
description: "Delete all memories.",
|
||||
description: "Delete ALL memories in the given scope. Destructive and irreversible -- only use when the user explicitly asks to wipe their memory. Never call speculatively.",
|
||||
args: {
|
||||
user_id: tool.schema.string().optional().describe("User ID whose memories to delete"),
|
||||
app_id: tool.schema.string().optional().describe("App ID whose memories to delete"),
|
||||
@@ -577,7 +577,7 @@ Identity context (resolved at plugin startup):
|
||||
}),
|
||||
|
||||
delete_entities: tool({
|
||||
description: "Delete user/agent/app/run entities and all their associated memories.",
|
||||
description: "Delete entire user/agent/app/run entities and every memory attached to them. Destructive and irreversible -- only on explicit user request to remove a whole user, agent, or project.",
|
||||
args: {
|
||||
user_id: tool.schema.string().optional().describe("User ID of the entity to delete"),
|
||||
agent_id: tool.schema.string().optional().describe("Agent ID of the entity to delete"),
|
||||
@@ -597,7 +597,7 @@ Identity context (resolved at plugin startup):
|
||||
}),
|
||||
|
||||
list_entities: tool({
|
||||
description: "List all user/agent/app/run entities.",
|
||||
description: "List the user/agent/app/run entities that have memories. Use to discover which scopes exist before searching, listing, or deleting within a specific one.",
|
||||
args: {
|
||||
page: tool.schema.number().optional().describe("Page number"),
|
||||
page_size: tool.schema.number().optional().describe("Page size"),
|
||||
@@ -613,7 +613,7 @@ Identity context (resolved at plugin startup):
|
||||
}),
|
||||
|
||||
get_event_status: tool({
|
||||
description: "Check the status of an asynchronous memory operation by event_id.",
|
||||
description: "Check whether an asynchronous memory write (add/update/delete) finished, using the event_id that call returned. Poll this when you need to confirm a write was persisted before relying on it.",
|
||||
args: {
|
||||
event_id: tool.schema.string().describe("The ID of the event/async operation to check"),
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@mem0/opencode-plugin",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"type": "module",
|
||||
"description": "Mem0 persistent memory plugin for OpenCode — add, search, and manage memories across sessions",
|
||||
"main": "dist/index.js",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "mem0",
|
||||
"name": "mem0",
|
||||
"version": "0.1.3",
|
||||
"version": "0.1.4",
|
||||
"description": "Persistent semantic memory for Antigravity agents. Cross-session, user-level recall via the Mem0 Platform MCP server. 16 slash commands, lifecycle hooks for auto-capture and metadata enforcement.",
|
||||
"author": { "name": "Mem0", "email": "support@mem0.ai" },
|
||||
"publisher": "mem0ai",
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
# Hook: UserPromptSubmit
|
||||
#
|
||||
# Fires on every user message. Instead of pre-searching mem0 with the
|
||||
# raw prompt, this injects a decision rubric telling the agent when
|
||||
# and how to search itself. The agent has more context than this
|
||||
# script does -- let it decide.
|
||||
# Fires on every user message. Prefetches memories relevant to the current
|
||||
# prompt (so relevant context is guaranteed) and also injects a decision
|
||||
# rubric telling the agent when to search further itself -- including
|
||||
# follow-up searches for multi-part questions. Prefetch can be disabled
|
||||
# with MEM0_PREFETCH=false.
|
||||
#
|
||||
# Input: JSON on stdin (prompt, session_id, cwd, transcript_path)
|
||||
# Output: Decision rubric injected into Claude's context (exit 0)
|
||||
@@ -152,12 +153,37 @@ else:
|
||||
fi
|
||||
fi
|
||||
|
||||
# Query-driven prefetch: search mem0 with the current prompt and inject the top
|
||||
# matches so relevant memories are guaranteed in context, not left for the agent
|
||||
# to fetch. Skipped on resume (handled above with targeted queries) and when
|
||||
# MEM0_PREFETCH=false.
|
||||
if [ -z "$HAS_RESUME" ] && [ "${MEM0_PREFETCH:-true}" != "false" ]; then
|
||||
PREFETCH_RESULTS=$(PYTHONPATH="$SCRIPT_DIR" MEM0_SEARCH_USER="$USER_ID" MEM0_SEARCH_QUERY="$PROMPT" python3 -c "
|
||||
import os, sys
|
||||
sys.path.insert(0, os.environ.get('PYTHONPATH', '.'))
|
||||
from _search import search_memories, format_results_for_context, should_rerank
|
||||
|
||||
api_key = os.environ.get('MEM0_API_KEY', '')
|
||||
user_id = os.environ.get('MEM0_SEARCH_USER', 'default')
|
||||
project_id = os.environ.get('MEM0_PROJECT_ID', 'unknown')
|
||||
query = os.environ.get('MEM0_SEARCH_QUERY', '')
|
||||
|
||||
results = search_memories(api_key, user_id, project_id, query, top_k=5, rerank=should_rerank())
|
||||
if results:
|
||||
print(format_results_for_context(results, heading='Relevant memories (auto-retrieved for this request)'))
|
||||
" 2>/dev/null || echo "")
|
||||
|
||||
if [ -n "$PREFETCH_RESULTS" ]; then
|
||||
_PROMPT_CTX="${_PROMPT_CTX:+${_PROMPT_CTX}\n}${PREFETCH_RESULTS}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$HAS_REMEMBER" ]; then
|
||||
_PROMPT_CTX="${_PROMPT_CTX:+${_PROMPT_CTX}\n}Remember intent detected. The /mem0:remember skill auto-classifies, sets confidence=1.0, and stores verbatim."
|
||||
fi
|
||||
|
||||
if [ -z "$RUBRIC_ALREADY_SHOWN" ]; then
|
||||
_PROMPT_CTX="${_PROMPT_CTX:+${_PROMPT_CTX}\n}Mem0 searches apply when user references past work, decision questions, errors, or non-trivial tasks. Queries use noun-phrases, 2-4 parallel calls with different metadata.type filters, and include user_id + app_id."
|
||||
_PROMPT_CTX="${_PROMPT_CTX:+${_PROMPT_CTX}\n}Mem0 searches apply when user references past work, decision questions, errors, or non-trivial tasks. Queries use noun-phrases, 2-4 parallel calls with different metadata.type filters, and include user_id + app_id. For multi-part or comparative questions, run follow-up searches and combine results before answering -- one search is rarely enough."
|
||||
touch "$RUBRIC_FLAG" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ def _run_hook(prompt: str, env_overrides: dict | None = None, session_id: str =
|
||||
"MEM0_RESOLVED_USER_ID": "testuser",
|
||||
"MEM0_PROJECT_ID": "test-project",
|
||||
"MEM0_BRANCH": "main",
|
||||
"MEM0_PREFETCH": "false",
|
||||
}
|
||||
if env_overrides:
|
||||
env.update(env_overrides)
|
||||
|
||||
Reference in New Issue
Block a user