Skip to content

⚡ Bolt & 🛡️ Sentinel: Core performance, security, and CLI improvements#199

Draft
hackerxj2010 wants to merge 1 commit into
mainfrom
improve-jeanbot-core-12584228362328253805
Draft

⚡ Bolt & 🛡️ Sentinel: Core performance, security, and CLI improvements#199
hackerxj2010 wants to merge 1 commit into
mainfrom
improve-jeanbot-core-12584228362328253805

Conversation

@hackerxj2010
Copy link
Copy Markdown
Owner

Summary

Improved JeanBot's performance, security, and developer experience to enhance its capabilities relative to other AI agents.

Changes

  • AI Package Optimization (⚡ Bolt):
    • Replaced crypto.createHash with the faster crypto.hash API (Node 22+).
    • Switched from .toFixed(8) to Math.round(x * 1e8) / 1e8 in vector calculations for significant speedup.
    • Optimized vector normalization logic.
  • Security Hardening (🛡️ Sentinel):
    • Secured LocalJsonStore in packages/documents against path traversal attacks by resolving paths against a base directory and filtering out . and .. segments.
  • Python CLI Enhancements:
    • Introduced on_step_update callback for real-time progress visualization in the terminal.
    • Added ANSI-colored status updates to the interactive shell.
    • Implemented status, plan, and artifacts commands for better mission inspection.
    • Improved shell resilience by catching and reporting mission execution errors without crashing the session.

Verification Results

  • pnpm test (Vitest): All 45 tests passed.
  • pytest tests/python (Pytest): All 6 tests passed.
  • Manual verification of path traversal protection and CLI interactivity.

PR created automatically by Jules for task 12584228362328253805 started by @hackerxj2010

…ive experience

This PR enhances JeanBot across multiple domains:
- ⚡ Bolt: Optimized synthetic embedding generation in `packages/ai` by using `crypto.hash`, `Math.round` for vector math, and centralized normalization.
- 🛡️ Sentinel: Hardened `LocalJsonStore` against path traversal in `packages/documents` by strictly filtering key segments and ensuring prefix-based path resolution.
- 🚀 Deepened the Python Mission Runner CLI with real-time step updates, new commands (`status`, `plan`, `artifacts`), and improved session stability.

Verified with `vitest` and `pytest`.

Co-authored-by: hackerxj2010 <198651211+hackerxj2010@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant