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

推荐订阅源

WordPress大学
WordPress大学
MyScale Blog
MyScale Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
人人都是产品经理
人人都是产品经理
C
Check Point Blog
宝玉的分享
宝玉的分享
B
Blog RSS Feed
博客园 - 三生石上(FineUI控件)
量子位
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
Jina AI
Jina AI
IT之家
IT之家
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
J
Java Code Geeks
The Cloudflare Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
腾讯CDC
P
Proofpoint News Feed
美团技术团队
H
Help Net Security
B
Blog
博客园_首页

Hacker News - Newest: "AI"

AI can't read an investor deck AI as an attorney? Student uses ChatGPT, Gemini to sue UW over alleged racial discrimination Hacking MCP Servers in AI Systems – The Rug Pull: Tool Changes After Approval GitHub - MeepCastana/KubeezCut: Free Web based video editor Can AI judge journalism? A Thiel-backed startup says yes, even if it risks chilling whistleblowers Coming soon: 10 Things That Matter in AI Right Now DARPA built an AI to fact-check enemy weapons claims What explains heterogeneity in AI adoption? When AI Meets Muscle: Context-Aware Electrical Stimulation Promises a New Way to Guide Human Movements - Department of Computer Science AI Changed How We Build. It Did Not Change What Matters. Linux rules on using AI-generated code - Copilot is OK, but humans must take 'full responsibility for the… Meta spins up AI version of Mark Zuckerberg to engage with employees Code Mode: Let Your AI Write Programs, Not Just Call Tools | TanStack Blog GitHub - Delavalom/graft: Go framework for building AI agents. Type-safe tools, multi-provider (OpenAI, Anthropic, Gemini, Bedrock), zero vendor SDKs. India's TCS tops estimates, says new AI models did not dent services demand Gen Z's fading AI hype Strong feeling: we are in a folded AI reality GitHub - machinarii/total-recall-catalog: A reference catalog of latest knowledge retrieval, memory & RAG systems GitHub - mensfeld/code-on-incus: Give each AI agent its own isolated machine with root, Docker, and systemd. Active defense detects and stops threats automatically.. Quantization, LoRA, and the 8% Problem: Benchmarking Local LLMs for Production AI Iran war: We spoke to the man making Lego-style AI videos that experts say are powerful propaganda Powell, Bessent discussed Anthropic's Mythos AI cyber threat with major U.S. banks GitHub - immartian/bellamem: Persistent belief-graph memory for AI agents. Retrieves decisive context by importance — not recency, not RAG, not /compact. recursive-mode: The Repo-Native Operating System for AI Engineering After the attack on Sam Altman's home, will AI CEO's go on the offensive? The biggest advance in AI since the LLM Opus 4.6 vs GPT 5.4 One Prompt Unity World Generation Test “AI polls” are fake polls Client Challenge Can AI be a 'child of God'? Inside Anthropic's meeting with Christian leaders
GitHub - Baukaalm/safesandbox: Infinite undo for AI codin...
baursha · 2026-05-09 · via Hacker News - Newest: "AI"

Infinite undo for AI coding agents.

SafeSandbox is a local-first developer tool that automatically creates snapshots and checkpoints while AI coding agents (Cursor, Claude Code, Codex, Aider, etc.) modify your repository.

What it does

  • Automatic snapshots — detects bursts of file changes and creates restore points
  • Rollback — restore your codebase to any previous snapshot in seconds
  • Timeline — view a human-readable history of what changed
  • Protection from destructive AI edits — never lose working code again

What it is NOT

  • Not a cloud service — everything stays on your machine
  • Not a remote IDE
  • Not a Docker container
  • Not an AI model
  • Not a code editor

What it IS

  • A local CLI tool
  • A filesystem watcher (via chokidar)
  • A git-based snapshot manager

Installation

npm install -g safesandbox
# or
pnpm add -g safesandbox

Or run without installing:

npx safesandbox init

Quick Start

# 1. Initialize SafeSandbox in your repo
cd my-project
safesandbox init

# 2. Start watching for changes
safesandbox watch

# 3. Let your AI agent work...
# SafeSandbox auto-creates snapshots when it detects bursts of edits

# 4. View timeline
safesandbox timeline

# 5. Roll back if something goes wrong
safesandbox rollback 12

Commands

safesandbox init

Sets up SafeSandbox in the current repository. Creates:

  • .safesandbox/ directory with metadata storage
  • A hidden snapshot branch for internal commits
  • Config file with default thresholds

safesandbox watch

Starts filesystem monitoring. Detects:

  • Multiple rapid file changes
  • Deleted files
  • package.json changes
  • Lockfile changes (package-lock.json, pnpm-lock.yaml, yarn.lock, bun.lockb)

Snapshots are batched — not every single file write triggers one. You will see output like:

[SafeSandbox]
Snapshot #12 created
Reason: 24 files changed in 8 seconds

safesandbox timeline

Shows snapshot history:

#14 — 24 files changed
#13 — package.json modified
#12 — deleted docker-compose.yml

safesandbox rollback <id>

Restores the repository to the state at snapshot <id>. Asks for confirmation before destructive changes.

How it works

SafeSandbox uses git internally for snapshots:

  • A hidden branch stores internal commits
  • Metadata maps snapshot IDs to commit hashes
  • Rollback uses git checkout + git restore for safe, precise restoration

No Docker. No overlayfs. No cloud. Just your local git repo + a smart watcher.

Configuration

After init, a config file lives at .safesandbox/config.json:

{
  "thresholdFiles": 5,
  "thresholdSeconds": 10,
  "ignoredPaths": ["node_modules", ".git", "dist", "build", ".safesandbox"]
}
  • thresholdFiles — minimum files changed to trigger a snapshot
  • thresholdSeconds — time window for batching changes

Example session

$ cd my-cursor-project

$ safesandbox init
[SafeSandbox] Initialized in /Users/me/my-cursor-project

$ safesandbox watch
[SafeSandbox] Watching for changes...

# ... you prompt Cursor to "add auth" ...

[SafeSandbox]
Snapshot #1 created
Reason: 12 files changed in 6 seconds

# ... you prompt again, it deletes something important ...

[SafeSandbox]
Snapshot #2 created
Reason: 3 files changed in 4 seconds

$ safesandbox timeline
#2 — 3 files changed
#1 — 12 files changed (auth feature)

$ safesandbox rollback 1
[SafeSandbox] This will restore 12 files to the state at snapshot #1.
Are you sure? (y/N) y
[SafeSandbox] Rolled back to snapshot #1.

Requirements

  • Node.js >= 20
  • Git repository (run git init first if needed)

License

MIT