57 Commits

Author SHA1 Message Date
abc91bc149 Add dangerous command blocking and cron agent scheduling
Dangerous command approval: run_command skill now checks commands
against 9 regex patterns (rm -rf /, dd, mkfs, fork bombs, shutdown,
device writes, etc.) and blocks execution with a clear message.
Defense-in-depth layer on top of VM isolation.

Cron agents: templates support schedule (5-field cron) and
schedule_timeout (seconds, default 300) fields. Overseer checks
every 60s, spawns {name}-cron agents on match, auto-destroys after
timeout. Inline cron parser supports *, ranges, lists, and steps.
No npm dependencies added.
2026-04-08 19:26:23 +00:00
c827d341ab Overhaul agent quality — prompts, tools, config, compression
- Rewrite system prompt: structured sections, explicit tool descriptions
  with full SKILL.md descriptions, multi-agent awareness
- Add write_file skill for creating/modifying workspace files
- Per-template config passthrough: temperature, num_predict, context_size,
  compress settings, max_tool_rounds, max_response_lines
- Bump defaults: 1024 output tokens (was 512), 500-char deque (was 200),
  250-token summaries (was 150), compress threshold 16 (was 12), keep 8 (was 4)
- Cache compression by content hash — no redundant summarization
- Update all 5 templates with tuned settings per role
2026-04-08 18:28:26 +00:00
6c4ad47b09 Fix update.sh — mkdir -p before copying agent/skills into rootfs 2026-04-08 14:53:07 +00:00
5b312e34de Add read_file skill, session persistence, and update script
- New read_file skill: paginated file reading with line ranges,
  path restricted to /workspace, binary detection, directory listing
- Session persistence via SQLite + FTS5: conversation history survives
  agent restarts, last N messages restored into deque on boot,
  auto-prune to 1000 messages
- Update truncation hint to reference read_file instead of run_command
- New scripts/update.sh for patching rootfs + rebuilding snapshot

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:49:54 +00:00
6673210ff0 Add remaining low-priority items from code review to TODO 2026-04-08 02:00:06 +00:00
d6a737fbad Update REPORT.md — 14 of 19 issues fixed 2026-04-08 01:58:06 +00:00
fdfa468960 Copy all agent/*.py files into rootfs 2026-04-08 01:58:06 +00:00
ca224a0ae9 Slim down agent.py — uses skills.py and tools.py modules 2026-04-08 01:58:06 +00:00
383113126f Extract skills.py and tools.py from agent.py 2026-04-08 01:58:06 +00:00
2d371ceb86 Harden SKILL.md parser — error logging, flexible indent, CRLF support, type validation 2026-04-08 01:51:34 +00:00
d838fe08cf Fix thread safety on cooldown lock, IRC line split to 380 chars 2026-04-08 01:50:03 +00:00
deca7228c7 Add logging to cleanup catch blocks, use pkill -f agent.py instead of killall python3 2026-04-08 01:50:03 +00:00
e685a2a7ba Update REPORT.md with fix status 2026-04-08 01:41:30 +00:00
f4643b8c59 Add all 5 templates to install script (was missing researcher, creative) 2026-04-08 01:40:20 +00:00
0ab04e1964 Remove unused writePool function 2026-04-08 01:40:20 +00:00
100bb98e62 Extract SSH_OPTS constant, deduplicate SSH options 2026-04-08 01:36:01 +00:00
fe162d11f7 Fix memory reload after save_memory — reload all memory files 2026-04-08 01:36:01 +00:00
96dfa63c39 Fix IP pool — atomic writes via rename, remove fake lock 2026-04-08 01:36:01 +00:00
74e79f2870 Fix shell injection — use tee with stdin instead of echo interpolation 2026-04-08 01:36:01 +00:00
d9b695d5a0 Add code review report 2026-04-08 01:36:01 +00:00
c363f45ffc Add !version command to overseer 2026-04-08 01:16:32 +00:00
426ca8f1c1 Add cron agents and logging ideas 2026-04-07 21:05:36 +00:00
e1f1a24a37 Add !logs command — tail agent log via SSH 2026-04-07 21:01:39 +00:00
185cda575e Add file logging to agent — writes to /workspace/agent.log 2026-04-07 21:01:39 +00:00
9f624e9497 Remove per-skill truncation — handled by executor now 2026-04-07 20:53:51 +00:00
3083b5d9d7 Add large output handling and iteration budget to agent
- Tool outputs >2K chars saved to workspace/tool_outputs/ with preview
- Agent gets first 1500 chars + file path to read the rest
- Iteration budget bumped to 10 rounds (configurable per template)
- Warning injected when 2 rounds remaining to help model wrap up
2026-04-07 20:53:51 +00:00
3c00de75d1 Update TODO with prioritized next items 2026-04-07 20:50:19 +00:00
9a06bbf5ea Update roadmap with Phase 5 priorities from Hermes analysis 2026-04-07 20:50:19 +00:00
a604d73340 Install skills into agent rootfs during setup 2026-04-07 20:35:56 +00:00
2d42d498b3 Refactor agent.py to use discoverable skill system 2026-04-07 20:35:56 +00:00
4483b585a7 Add skill definitions (SKILL.md + run.py) for all agent tools 2026-04-07 20:35:56 +00:00
42870c7c1f Add SKILL.md pattern idea for discoverable agent tools 2026-04-07 20:27:58 +00:00
590c88ecef Add !persona command to overseer 2026-04-07 17:43:39 +00:00
d3ed3619c2 Add fetch_url tool to agent 2026-04-07 17:43:39 +00:00
d299e394f0 Update ROADMAP — Phase 4 done, reflect current state 2026-04-07 16:34:16 +00:00
2e5912e73c Add refactoring note to TODO 2026-04-07 16:32:32 +00:00
27cb6508dc Extract shared VM lifecycle helpers into firecracker-vm.ts 2026-04-07 16:32:24 +00:00
a2cef20a89 v0.1.3 — deployment hardening
Bump to v0.1.3. Since v0.1.2:
- Install script with verbose output and error handling
- Uninstall script
- Alpine rootfs in setup.ts (was Ubuntu)
- DNS fix for all chroot operations
- Stale tap cleanup before every createTap
- Dynamic binary paths (no hardcoded /usr/local/bin)
- Node.js upgrade handling
- Shellcheck clean
- !status command and web search tool
- Battle-tested on Ubuntu GPU server deployment

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.1.3
2026-04-07 16:18:04 +00:00
e6a6fb263d Use dynamic path for fireclaw in overseer service file
$(which fireclaw) instead of hardcoded /usr/local/bin/fireclaw.
Fixes 203/EXEC on systems where npm link installs to /usr/bin/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 16:09:10 +00:00
cf2d2d31b7 Always clean stale taps before creating new ones
deleteTap before createTap in all four call sites:
snapshot restore, cold boot, agent start, snapshot create.
Prevents "Device or resource busy" from leftover taps.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 16:07:24 +00:00
6485705d4b Remove hardcoded DNS — keep host resolv.conf in rootfs
Don't overwrite the host's resolv.conf with hardcoded 8.8.8.8.
The host's DNS config is already correct for both build and runtime.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 16:04:15 +00:00
6e9725d358 Fix DNS in install script chroot
Copy host /etc/resolv.conf into chroot before apk install.
Set static nameserver after install for runtime.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 16:02:48 +00:00
b5ad20ce51 Fix chroot DNS and mkfs.ext4 path for remote deployment
- Copy host /etc/resolv.conf into chroot before apk install (fixes DNS)
- Set static DNS (8.8.8.8) after chroot install for runtime
- Use PATH-based mkfs.ext4 instead of hardcoded /usr/sbin/
- Show chroot package install output (stdio: inherit)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 16:00:16 +00:00
1fee80f1d7 Clean stale mounts before agent rootfs build
Unmount and remove leftover files from previous failed install
attempts before starting the agent rootfs build.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 15:56:33 +00:00
e98f9af938 Remove output suppression from install script
- All commands now show their output for debugging
- Use PATH-based e2fsck/resize2fs instead of hardcoded /usr/sbin/
- Add error checks with meaningful messages at each step
- set -e in chroot to fail fast on errors

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 15:55:05 +00:00
b613c2db6f Switch setup.ts to Alpine rootfs, fix remote deployment
- setup.ts now downloads Alpine Linux minirootfs instead of Ubuntu squashfs
- Installs Alpine packages (openssh, python3, curl, ca-certificates) in chroot
- Fixes install script failing on non-Alpine base rootfs (adduser syntax)
- Clean up unused imports and lint warnings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 15:21:06 +00:00
d149319090 Improve install script with verbose progress output
- Step headers, checkmarks, skip indicators for each component
- Shows what's being installed vs already present
- Progress messages for long operations (model pulls, rootfs build)
- Banner at start and summary at end with disk usage and model count
- Per-package install status on Debian/Ubuntu

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 15:09:08 +00:00
2c82b3f7ae Fix Node.js install — upgrade if version < 20
Install script now detects existing Node.js < 20 and upgrades it
instead of skipping. Supports apt, dnf, and apk package managers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 15:05:23 +00:00
bdd4c185bb Add uninstall script
scripts/uninstall.sh — clean removal of fireclaw:
- Stops all agents and overseer
- Removes bridge, taps, iptables rules
- Removes ~/.fireclaw data directory
- Unlinks global command
- Optionally removes deps (--keep-deps to preserve them)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 15:00:02 +00:00
4b01dfb51d Fix shellcheck warnings across all scripts
Quote all variable expansions in setup-bridge.sh, teardown-bridge.sh,
and install.sh. Fix redirect order and unused variable in test-suite.sh.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 14:56:17 +00:00