Skip to content

Commit 5152b33

Browse files
committed
feat: Introduce conversation history compaction, a PDF manipulation tool, a planning tool, and enhance execution sandbox security.
1 parent a74d178 commit 5152b33

File tree

11 files changed

+1535
-26
lines changed

11 files changed

+1535
-26
lines changed

package-lock.json

Lines changed: 261 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
"jose": "^5.9.0",
4646
"node-llama-cpp": "^3.15.1",
4747
"openai": "^4.70.0",
48+
"pdf-lib": "^1.17.1",
49+
"pdf-parse": "^2.4.5",
4850
"pino": "^10.3.0",
4951
"playwright": "^1.48.0",
5052
"qrcode": "^1.5.4",
@@ -76,4 +78,4 @@
7678
],
7779
"license": "MIT",
7880
"author": ""
79-
}
81+
}

src/agents/prompt-builder.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ Use tools when appropriate to accomplish tasks. Be efficient and don't make unne
3030
- You have full access to the workspace directory: ${params.workspaceDir}
3131
- Files created or modified should be within this workspace
3232
- Use the exec tool to run commands when needed
33-
- Use the browser tool for web research and automation`);
33+
- Use the browser tool for web research and automation
34+
- Use the pdf tool for PDF operations: create documents from text/markdown, read/extract text, merge multiple PDFs, split pages, add watermarks, protect with passwords, convert images to PDF, add page numbers, and read/write metadata`);
3435

3536
// Safety
3637
const safetyLevel = params.safetyLevel ?? "moderate";

src/dashboard/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const ICONS = {
4545
camera: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z"/><circle cx="12" cy="13" r="3"/></svg>',
4646
image: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>',
4747
file: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/></svg>',
48+
fileText: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="M10 9H8"/><path d="M16 13H8"/><path d="M16 17H8"/></svg>',
4849
clock: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>',
4950
volume2: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"/><path d="M15.54 8.46a5 5 0 0 1 0 7.07"/><path d="M19.07 4.93a10 10 0 0 1 0 14.14"/></svg>',
5051
code: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>',
@@ -2024,7 +2025,8 @@ function renderTools() {
20242025
extend: 'puzzle',
20252026
camera_snap: 'camera',
20262027
camera_record: 'video',
2027-
screen_record: 'monitor'
2028+
screen_record: 'monitor',
2029+
pdf: 'fileText'
20282030
};
20292031

20302032
const categoryColors = {

0 commit comments

Comments
 (0)