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

推荐订阅源

Last Week in AI
Last Week in AI
阮一峰的网络日志
阮一峰的网络日志
P
Proofpoint News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MongoDB | Blog
MongoDB | Blog
云风的 BLOG
云风的 BLOG
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
J
Java Code Geeks
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
V
Visual Studio Blog
小众软件
小众软件
Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
IT之家
IT之家
Vercel News
Vercel News
C
Check Point Blog
Google DeepMind News
Google DeepMind News
月光博客
月光博客
D
DataBreaches.Net
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
Y
Y Combinator Blog
Hugging Face - Blog
Hugging Face - Blog

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
Agent Harness Devlog #002
Sanchit · 2026-06-11 · via DEV Community

Sanchit

Building the Pluggable Sandbox

I'm building an agent harness, as a learning project and experimenting different ideas and implementations, along the way learning EffectTS, a lot of it is ideating with agents, agents do help a lot understanding libraries and frameworks which typically take more time and are involving.

Implementing Soft Sandbox

A soft sandbox solution is to implement some kind of application layered sandboxing, not hard sandbox and isolation solutions like VMs, containers, bubblewrap, etc.

This allows us to provided on-spot filesystem layer, for quick agentic workflows, without worrying about agent messing up the current filesystems.

I discovered @platformatic/vfs, a virtual filesystem provider for NodeJS, eventually vfs will be merged into official node, which is great.

The best part of using effect is composability, it's little magical and a blackbox, as I'm just learning about it, It's also very powerful.

The sandbox is just a layer which looks like

Layer<Provides> where Provides = Vfs | ChildProcessSpawner

If your layer provides the tags, it plugs it. These are parts I feel kinda magical!

VFS allows for different provider implementation, like real filesystem, sqlite based, and in-memory filesystem, It also allows for custom provider implementation, so in future I can have S3 filesystem provider, and others.

Integrating with Just Bash

One of the cool projects from Vercel is just-bash It allows for sandboxed bash interpreter for agents, it implements some or most of the required coreutils functionality like grep, cat, ls, etc.

It's really powerful because agents love bash, they've been trained on 40+yrs of unix shell commands.

just-bash also provides a filesystem layer, like VFS but I think sticking to VFS helps, as it will later allows for future proofing with node:vfs implementation and custom provider implementations, the most value from just-bash is the bash interpreter, so the underlying FS could just be VFS and that's what I did, creating VFS implementation that has interface that satisfies just-bash, basically building the bridge

// just-bash accepts a custom filesystem interface.
// Implement it on top of the sandbox's VFS — don't let it bring its own.
const bridge = (vfs: VirtualFileSystem): IFileSystem => ({
  readFile:  (path) => vfs.promises.readFile(path, "utf8"),
  writeFile: (path, content) => vfs.promises.writeFile(path, content),
  stat:      async (path) => toStat(await vfs.promises.stat(path)),
  ...

Bash is just a layer

const shell = Layer.effect(
  Shell,
  Effect.gen(function* () {
    const vfs = yield* FileSystem.Vfs;            // the sandbox's own tree
    const bash = new Bash({ fs: bridge(vfs), cwd: "/" });
    ...

Composition is what really like with Effect like

EnvBash.layer(EnvInMemory.layer())        // bash over a throwaway memory tree
EnvBash.layer(EnvSqldb.layer("fs.db"))    // bash over a filesystem inside one sqlite file
...

The VFS and just-bash working together

const filesystem = yield* FileSystem.Service;
const shell      = yield* Shell;

yield* filesystem.writeFileString("/data.txt", "alpha\nbeta\nbeta\n");

const result = yield* shell.exec("grep beta /data.txt | wc -l");
...

So, if you like this scratchy non-edited, non-ai devlog, give it a like ;)

Next, I'm hoping to learn more about EffectTS and also go deep into building more!

Checkout the repo: https://github.com/codeworksh/codework
Other projects: https://codeworksh.github.io/aikit/