16 lines
1.3 KiB
Plaintext
16 lines
1.3 KiB
Plaintext
{
|
|
"description": "Persist a fact that would otherwise be lost when the session ends.",
|
|
"prompt": "## memory_remember\n\nPersist a durable fact in OptMem's append-only memory store.\n\n**Calling convention:**\n```\nmemory_remember(title=\"...\", tags=\"...\", body=\"...\")\n```\n- `title`: short noun phrase\n- `tags`: comma-separated tags\n- `body`: one standalone fact, no more than 280 bytes\n\nThe title, tags, and body are stored as one searchable memory record.",
|
|
"cmd": "input=$(cat); title=$(printf '%s' \"$input\" | jq -er '.title'); tags=$(printf '%s' \"$input\" | jq -er '.tags'); body=$(printf '%s' \"$input\" | jq -er '.body'); record=\"[$tags] $title: $body\"; bytes=$(printf '%s' \"$record\" | wc -c); [ \"$bytes\" -le 280 ] || { printf 'memory exceeds OptMem limit: %s bytes (maximum 280)\\n' \"$bytes\" >&2; exit 1; }; MEMO_TOOLS=1 MEMORY_DIR=\"${XDG_DATA_HOME:-$HOME/.local/share}/ollie/optmem\" exec \"${XDG_CONFIG_HOME:-$HOME/.config}/ollie/optmem/memo\" note \"$record\"",
|
|
"args": {
|
|
"type": "object",
|
|
"required": ["title", "tags", "body"],
|
|
"properties": {
|
|
"title": {"type": "string", "description": "Short noun phrase"},
|
|
"tags": {"type": "string", "description": "Comma-separated tags"},
|
|
"body": {"type": "string", "description": "Standalone fact, maximum 280 bytes after formatting"}
|
|
}
|
|
},
|
|
"scope": "global"
|
|
}
|