This commit is contained in:
@@ -75,10 +75,10 @@ export function createPhase2Tools({ cwd = process.cwd(), computer } = {}) {
|
||||
execute: async () => { const dir = path.join(os.homedir(), '.local/share/jarvis/memory'); try { return (await readdir(dir)).slice(0, 200); } catch { return []; } },
|
||||
},
|
||||
{
|
||||
name: 'memory_write', permission: PERMISSIONS.write,
|
||||
name: 'memory_remember', permission: PERMISSIONS.write,
|
||||
description: 'Write a local Jarvis memory note only after explicit confirmation.',
|
||||
parameters: { type: 'object', properties: { name: { type: 'string' }, text: { type: 'string' }, confirmed: { type: 'boolean' } }, required: ['name', 'text', 'confirmed'] },
|
||||
execute: async ({ name, text, confirmed }) => { if (confirmed !== true) return { confirmation_required: true, action: 'memory_write', name }; const dir = path.join(os.homedir(), '.local/share/jarvis/memory'); const safe = String(name).replace(/[^a-zA-Z0-9._-]/g, '_'); await (await import('node:fs/promises')).mkdir(dir, { recursive: true }); await writeFile(path.join(dir, safe), String(text), 'utf8'); return { ok: true, name: safe }; },
|
||||
execute: async ({ name, text, confirmed }) => { if (confirmed !== true) return { confirmation_required: true, action: 'memory_remember', name }; const dir = path.join(os.homedir(), '.local/share/jarvis/memory'); const safe = String(name).replace(/[^a-zA-Z0-9._-]/g, '_'); await (await import('node:fs/promises')).mkdir(dir, { recursive: true }); await writeFile(path.join(dir, safe), String(text), 'utf8'); return { ok: true, name: safe }; },
|
||||
},
|
||||
{
|
||||
name: 'rag_workspaces', permission: PERMISSIONS.read,
|
||||
|
||||
Reference in New Issue
Block a user