feat(memory): M3 recall 回忆工具——更早日记翻页 + 旧会话成果文件定位/取件
用户拍板 B 方案(极简 tool,不走 skill:执行器沙箱跨不了会话目录,回连 core 反而重)。 日记存储本就永久(上一版定稿),本工具把「查得到」补齐——开场注入只是嘴边的,回忆才是全部: - op=list:翻开场注入窗之外的更早碎片(memory.olderFragments 与 journalFor 同展开序, 默认跳过注入窗,skip/count 翻页,尾部如实标注剩余条数与续翻参数; 越界/空态给友好文案引导 op=files)。 - op=files:按日记碎片里的会话 id 现查那次会话任务目录的顶层成果文件—— 按磁盘实况列出,天然完成存在性判定(文件被删/目录已清都有交代); 同用户校验防互探,id 形态白名单校验。 - op=link:对清单里的文件产临时下载外链(复用 mint_public_link 同机制同 public_link 配置, resolveInTask 沙箱限该会话目录内,嵌套路径可取,穿越拒绝)——微信端发链接即交付, 网页端浏览器直下。 - advisor 白名单加 recall(config.js):顾问只聊和读,翻日记查旧成果正属其分内; 开场日记头行同步改为指路 recall 三 op(AI 自然知道怎么下钻)。 探针 13 项全过(跳窗/翻页/尾页标注/越界/文件列出过滤 dot 与目录/外链格式/嵌套/穿越拒绝/ 跨用户拒绝/不存在报错/空用户友好),临时目录探针自清。
This commit is contained in:
@@ -231,6 +231,46 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "recall",
|
||||
"description": "Access your long-term memory: the work diary. Each finished session leaves one short fragment (a few dozen characters, headed by the source session id), stored permanently; only the newest fragments were injected at session start. Read-only.\n\nop=list Older diary fragments beyond the injected window. Optional: skip (default = skip the injected window), count (default 20, max 50).\nop=files List files of a past session that still exist on disk right now. Requires id (the session id from a diary fragment's 【…】 heading).\nop=link Mint a temporary download link for one of those files. Requires id and path (a name from op=files).",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"op"
|
||||
],
|
||||
"properties": {
|
||||
"op": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"list",
|
||||
"files",
|
||||
"link"
|
||||
],
|
||||
"description": "What to recall: list = older diary fragments; files = a past session's current artifacts; link = a download link for one of them."
|
||||
},
|
||||
"skip": {
|
||||
"type": "integer",
|
||||
"description": "op=list: how many newest fragments to skip. Default = the window already injected at session start."
|
||||
},
|
||||
"count": {
|
||||
"type": "integer",
|
||||
"description": "op=list: fragments to return (default 20, max 50)."
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "op=files / op=link: the source session id as written inside a diary fragment's 【…】 heading (e.g. 'task-20260929-003')."
|
||||
},
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "op=link: file name inside that session's task directory, exactly as listed by op=files."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"function": {
|
||||
|
||||
Reference in New Issue
Block a user