惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Check Point Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
GbyAI
GbyAI
WordPress大学
WordPress大学
月光博客
月光博客
V
Visual Studio Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Google DeepMind News
Google DeepMind News
H
Help Net Security
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
博客园 - 司徒正美
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research
Blog — PlanetScale
Blog — PlanetScale
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Microsoft Azure Blog
Microsoft Azure Blog
V
V2EX
L
LangChain Blog
腾讯CDC
T
The Blog of Author Tim Ferriss
量子位

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Building a Privacy-First Agentic OS: Announcing Samarthya...
Bishnu Prasad Sahu · 2026-06-01 · via DEV Community

Bishnu Prasad Sahu

Managing files, running automation tasks, and orchestrating terminal commands with local LLMs can be challenging, especially when running across multiple operating systems.

Today, I am releasing SamarthyaBot v2.3.0 to npm and GitHub. This release transforms SamarthyaBot from a Linux-centric utility into a cross-platform local Agentic AI Operating System.

Here is a technical walkthrough of how we resolved cross-platform challenges, sandboxed execution, and added native capabilities.


1. Achieving OS Portability (Linux, macOS, Windows)

Previously, SamarthyaBot relied on Unix-style paths, shell utilities, and a pre-compiled Go worker binary specifically built for Linux.

To achieve true cross-platform compatibility, we introduced a centralized Platform Service (backend/services/system/platform.js):

  • Dynamic Shell Discovery: Resolves execution contexts between Windows (cmd.exe or powershell.exe) and Unix platforms (/bin/sh or /bin/bash).
  • Process Fallback: If the Go binary is not compiled for the host OS, the runtime falls back to a native Node executor (workerClient.js). This ensures streaming executors run reliably without crashes.
  • Context Injected Prompts: The host OS type is supplied directly to the LLM system prompt. The LLM adjusts its code generation to match the OS constraints (e.g., using dir on Windows and ls on Unix).

2. Hardening the Sandbox & Preventing Command Injection

Allowing an AI agent to run shell commands and read/write files presents significant security challenges. In v2.3.0, we introduced multi-layered boundaries:

A. Spawning over Shell Interpretation

We removed raw shell string execution from utility tools such as open_path. Instead of running:

// Vulnerable to target = "file.txt; rm -rf /"
exec(`open "${target}"`); 

We now spawn processes with clean argument arrays and reject shell metacharacters:

// Secure approach
spawn(opener, [target], { shell: false });

B. Segment Validation for Chained Commands

Users or models might try chaining commands using &&, ;, |, or \r. The command validation engine now splits inputs by these delimiters and inspects each segment against a blacklist (blocking unauthorized sudo, fork-bombs, and destructive commands).

C. Workspace-Scoped Sandbox

All file system tools are constrained to the current project workspace by default. Boundary checks ensure the agent cannot use directory traversal (../../) or absolute path patterns to escape the designated workspace.


3. Expanding the Agent Skillset (34 Skills)

We added 10 new functional tools to give the agent more capabilities out of the box:

  • Utilities: password_generate, qr_generate, url_shorten, ip_geolocate, timezone_now.
  • Automation: clipboard_copy, translate_text (with dedicated Hindi capabilities), open_path, and http_request (with SSRF guard blocking standard and local schemes like file://).
  • Security & Math: hash_text, base64_tool, currency_convert, crypto_price.

4. Zero-Latency Slash Commands

To keep the agent responsive, slash commands such as /help, /status, /tools, and /memory are processed instantly at the controller level without calling the LLM. This cuts down token usage and latency to zero for routine status checks across Web, Telegram, and Discord channels.


5. UI/UX Refresh

The web dashboard is updated with modern design aesthetics:

  • Tricolor aurora animated background gradient.
  • Subtle grid-pattern background.
  • Glassmorphism panels with top-border highlights.
  • Dynamic hover actions, sheen sweep buttons, and responsive scale transitions.

Getting Started

You can self-host SamarthyaBot locally with your choice of LLMs (Gemini, Claude, GPT, Ollama, DeepSeek, or Qwen).

Quick Install

npm install -g samarthya-bot
samarthya gateway

We invite you to explore the source code, open issues, or contribute:
⭐ GitHub: https://github.com/mebishnusahu0595/SamarthyaBot
📦 npm Package: https://www.npmjs.com/package/samarthya-bot

Let me know what automation workflows you build with it.