15 lines
1.1 KiB
Plaintext
15 lines
1.1 KiB
Plaintext
{
|
|
"description": "Submit a memory compression (nap) to OptMem.",
|
|
"prompt": "## memory_nap\n\nSubmit a compression for a memory block range. Called when memory_wake or memory_remember prints a compression prompt.\n\n**Calling convention:**\n```\nmemory_nap(range=\"0-1\", text=\"compressed one-line summary\")\n```\n- `range`: block range as printed by the compression prompt (e.g. \"0-1\")\n- `text`: the compressed one-line summary (max 280 bytes)\n\nIf more compressions remain, the tool prints the next one.",
|
|
"cmd": "input=$(cat); range=$(printf '%s' \"$input\" | jq -er '.range'); text=$(printf '%s' \"$input\" | jq -er '.text'); MEMO_TOOLS=1 MEMORY_DIR=\"${XDG_DATA_HOME:-$HOME/.local/share}/ollie/optmem\" exec \"${XDG_CONFIG_HOME:-$HOME/.config}/ollie/optmem/memo\" nap \"$range\" \"$text\"",
|
|
"args": {
|
|
"type": "object",
|
|
"required": ["range", "text"],
|
|
"properties": {
|
|
"range": {"type": "string", "description": "Block range (e.g. \"0-1\")"},
|
|
"text": {"type": "string", "description": "Compressed one-line summary (max 280 bytes)"}
|
|
}
|
|
},
|
|
"scope": "global"
|
|
}
|