Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
387 commits
Select commit Hold shift + click to select a range
7d9e822
feat(cmd): add `forage-ctl gc` for sandbox garbage collection
sigma Feb 7, 2026
4619763
fix(cmd): remove dead "dir" mode fallback in ps.go
sigma Feb 7, 2026
cb300b2
config: add AgentIdentity struct to HostConfig and SandboxMetadata
sigma Feb 9, 2026
7e7a3ca
sandbox: add identity fields to CreateOptions
sigma Feb 9, 2026
1156360
sandbox: resolve and validate agent identity during creation
sigma Feb 9, 2026
a7adb0e
generator: emit agent identity config and SSH key bind mounts
sigma Feb 9, 2026
250f3ec
cmd/tui: add identity CLI flags, wizard fields, status display
sigma Feb 9, 2026
ccf32b0
skills/nix: include identity in generated CLAUDE.md and host module
sigma Feb 9, 2026
62872f5
test: add agent identity test coverage
sigma Feb 9, 2026
68fdbdd
chore: add .claude to .gitignore
sigma Feb 9, 2026
46a42c7
skills: move system prompt and skill rendering to templates
sigma Feb 9, 2026
98d5d98
generator: create tmux windows per agent at sandbox start
sigma Feb 9, 2026
ea11893
multiplexer: add Multiplexer interface abstraction
sigma Feb 10, 2026
effa9a8
config: add Multiplexer field to Template and SandboxMetadata
sigma Feb 10, 2026
ab9aedd
generator: use multiplexer abstraction for container config
sigma Feb 10, 2026
65ae4a0
health: generalize checks to use multiplexer interface
sigma Feb 10, 2026
84ba655
skills: replace TmuxSession with MuxInstructions
sigma Feb 10, 2026
98490b6
sandbox: rename NoTmuxConfig to NoMuxConfig, store Multiplexer
sigma Feb 10, 2026
299b0d3
ssh,gateway: dispatch on multiplexer type for connections
sigma Feb 10, 2026
8bb80a7
skills: rewrite nix skill with ad-hoc packages and troubleshooting
sigma Feb 10, 2026
d250f20
registry: pin nixpkgs to local store path via pkgs.path
sigma Feb 10, 2026
f0841de
fix: sanitize json generation
sigma Feb 10, 2026
1c7dbc3
multiplexer: add AttachCommandCC for tmux control mode
sigma Feb 10, 2026
1b71621
terminal: add WezTerm version detection for tmux control mode
sigma Feb 10, 2026
4996e47
ssh: use tmux -CC control mode when WezTerm is detected
sigma Feb 10, 2026
1ee0438
docs: fix CLI reference to match actual implementation
sigma Feb 11, 2026
042952a
multiplexer: auto-detect tmux control mode in AttachCommand
sigma Feb 11, 2026
678bcda
config: propagate jj identity to sandboxes
sigma Feb 11, 2026
e7555e4
injection: create package with interfaces and types
sigma Feb 11, 2026
9bb7d41
reproducibility: create package with Nix implementation
sigma Feb 11, 2026
0fd0797
runtime: add ContainerInfo and MountGeneratedFile interface
sigma Feb 11, 2026
c437629
multiplexer: implement contribution interfaces
sigma Feb 11, 2026
3315c60
workspace: implement contribution interfaces
sigma Feb 11, 2026
701af4e
agent: create package with Claude implementation
sigma Feb 11, 2026
527bbd5
injection: create infrastructure contributors
sigma Feb 11, 2026
fb1e5db
injection: create collector for contributions
sigma Feb 11, 2026
a0a19d5
sandbox: integrate injection collector into creator
sigma Feb 11, 2026
a4e5fb6
generator: refactor container.go to use contributions
sigma Feb 11, 2026
2f0871a
reproducibility: add MountContributor interface
sigma Feb 11, 2026
e73bb1e
generator: receive multiplexer instance instead of string type
sigma Feb 11, 2026
9df270c
generator: complete migration to contribution-based config
sigma Feb 11, 2026
3991384
generator: fix Nix syntax error from unescaped identity strings
sigma Feb 11, 2026
7a385a6
generator: use pname instead of outPath for agent package references
sigma Feb 11, 2026
b232b26
generator: allow unfree packages in sandbox containers
sigma Feb 11, 2026
7273b0e
sandbox: fix relative paths in generated file bind mounts
sigma Feb 11, 2026
e7ab1ab
sandbox: mount .git directory alongside .jj for jj workspaces
sigma Feb 11, 2026
2e03c2d
sandbox: pass --nixpkgs-path to extra-container create
sigma Feb 12, 2026
dc78114
module: replace deprecated pkgs.system with stdenv.hostPlatform.system
sigma Feb 12, 2026
57a091c
module: use nixpkgs flake input for nixpkgsPath instead of pkgs.path
sigma Feb 12, 2026
b5eccf5
ssh: avoid double tmux -CC invocation in control mode attach
sigma Feb 12, 2026
6d97d9c
ssh: fix tmux control mode hang on exit by dropping exec
sigma Feb 12, 2026
d4bcd36
agent: enable experimental agent teams in all Claude sandboxes
sigma Feb 12, 2026
07d1cfa
decouple container names from sandbox names
sigma Feb 12, 2026
63676a8
store runtime type in sandbox metadata
sigma Feb 12, 2026
50a42b3
add /etc/forage.json inside nspawn containers
sigma Feb 12, 2026
50b2614
add labels to Docker/Podman containers for orphan detection
sigma Feb 12, 2026
8f7a2f9
add nspawn List() fallback via in-container forage.json
sigma Feb 12, 2026
9bfa7d3
improve GC orphan detection with recovered sandbox names
sigma Feb 12, 2026
9601938
remove dead InitCommands code from injection system
sigma Feb 12, 2026
f7272c0
remove dead generator/permissions.go code
sigma Feb 12, 2026
de2c637
warn on unresolvable packages instead of silent skip
sigma Feb 12, 2026
19230e7
validate SecretName format in AgentConfig
sigma Feb 12, 2026
e73aac1
extend MockRuntime to implement GeneratedFileRuntime
sigma Feb 12, 2026
2c3f67a
document EnvVar.Value format contract
sigma Feb 12, 2026
b164773
add read-only workspace mode for filesystem-level enforcement
sigma Feb 12, 2026
8b64316
fix gofmt alignment in pick.go, agent.go, and nix.go
sigma Feb 12, 2026
520ce42
fix variable shadowing warnings in tests and creator
sigma Feb 12, 2026
e706e2e
fix unused write to Action field in picker test
sigma Feb 12, 2026
8338573
remove always-nil error return from parseCreateOptions
sigma Feb 12, 2026
2d8acaa
remove unused isHeaderSelected function
sigma Feb 12, 2026
d48efc4
remove redundant gofmt CI step, already covered by golangci-lint
sigma Feb 12, 2026
58a5673
emit nixfmt-compatible Nix from the Go generator
sigma Feb 12, 2026
b8d2bf8
fix gofmt alignment in config.go, container.go, and templates.go
sigma Feb 12, 2026
dadefc8
switch to nixfmt-tree for directory-level Nix formatting
sigma Feb 12, 2026
0c326ba
fix flaky tmux attach command test for control-mode environments
sigma Feb 12, 2026
3f2263e
Add comprehensive codebase audit report (2026-02-12)
sigma Feb 12, 2026
9dbd2f4
SEC-C1: remove passwordless sudo for container agent user
sigma Feb 12, 2026
f227f10
SEC-C2: add file locking for concurrent sandbox operations
sigma Feb 12, 2026
4fbcd9a
SEC-C3: prevent symlink following in generated file staging
sigma Feb 12, 2026
1be782b
SEC-C4: validate proxy target URL scheme to prevent SSRF
sigma Feb 12, 2026
b998532
SEC-C5: filter host environment in syscall.Exec calls
sigma Feb 12, 2026
f342fc7
SEC-H1: remove wildcard CORS header from proxy
sigma Feb 12, 2026
15d9629
SEC-H2: use only X-Api-Key header for auth injection
sigma Feb 12, 2026
73fd839
SEC-H3: restrict state directory permissions to 0750
sigma Feb 12, 2026
ef90f9f
SEC-H4: restrict config file permissions to hide secret paths
sigma Feb 12, 2026
f5c0af7
SEC-H5: make cleanup failures visible with proper logging
sigma Feb 12, 2026
aca239e
SEC-H6: use nftables for air-gap (none) network mode
sigma Feb 12, 2026
0fdd11e
SEC-M6: clean up generated file staging directories during cleanup
sigma Feb 12, 2026
7e673b1
ARCH-M1: fix commands bypassing paths() helper
sigma Feb 12, 2026
e9dc19f
ARCH-L1: remove dead code in ps.go
sigma Feb 12, 2026
16c9d5b
ARCH-L2: quote first argument in exec.go shellQuote
sigma Feb 12, 2026
fdef8c6
ARCH-L4: use filepath.Join with safePath in reset.go
sigma Feb 12, 2026
2a51a0c
SEC-M3: fix misleading comment about secret visibility
sigma Feb 12, 2026
e5e7a51
DOC: update stale documentation across DESIGN.md, security.md, and co…
sigma Feb 12, 2026
c535806
Fix tests broken by SEC-C4, SEC-H2, and SEC-H6 changes
sigma Feb 12, 2026
d1e39a3
SEC-L1: add periodic cleanup to rate limiter to prevent memory leak
sigma Feb 12, 2026
067e3b9
SEC-L2: redact SSH key file paths from debug logs
sigma Feb 12, 2026
9e354b0
SEC-L3: deduplicate tmpfiles rule for /home/agent/.config
sigma Feb 12, 2026
4224bc8
SEC-M1: add size-based audit log rotation
sigma Feb 12, 2026
0f4d457
SEC-M5: add defensive validation in workspace backend interface
sigma Feb 12, 2026
072895b
ARCH-L3: make proxy API key filename configurable
sigma Feb 12, 2026
168fe79
DOC-L2: update skill injection docs to reflect current capabilities
sigma Feb 12, 2026
6b66914
DOC: fix outdated DESIGN.md module references and stateless claim
sigma Feb 12, 2026
3502dc8
SEC-H7: document DNS resolution timing limitation in restricted mode
sigma Feb 12, 2026
492bad7
SEC-M4: implement proxy sandbox identity verification via source IP
sigma Feb 12, 2026
73cd7c5
SEC-M2: add assertion that secrets directory is on tmpfs
sigma Feb 12, 2026
25a945d
FEAT-1,2,3,4: capabilities interface, resource limits, graceful shutd…
sigma Feb 12, 2026
9c34e75
FEAT-5: health monitoring daemon
sigma Feb 12, 2026
f92f44b
FEAT-6: sandbox state snapshots; fix lint, fmt, and test issues
sigma Feb 12, 2026
9080038
fix: formatting issue in host.nix
sigma Feb 12, 2026
9893419
chore: remove obsolete audit docs
sigma Feb 12, 2026
388e4e3
Add MIT License to the project
sigma Feb 12, 2026
92917a4
Remove status section from README
sigma Feb 12, 2026
ad5f946
fix: config.json permissions and secret handling
sigma Feb 20, 2026
3e63f23
fix: disable tmux automatic-rename to prevent wezterm tab title flicker
sigma Feb 20, 2026
5102492
refactor: consolidate shell quoting with go-shellquote
sigma Feb 20, 2026
d63b738
refactor: consolidate workspaceBackendFor into workspace package
sigma Feb 20, 2026
3fce75e
refactor: replace safePath with filepath-securejoin, delete no-op nor…
sigma Feb 20, 2026
c809c73
chore: add TODO annotations for AGENTS.md detection and skills.nix ag…
sigma Feb 20, 2026
cbcb0b9
refactor: architecture/placement cleanups (wezterm connect, claude tm…
sigma Feb 20, 2026
d668512
refactor: replace hand-rolled git/jj config parsers with git CLI and …
sigma Feb 20, 2026
ea86592
refactor: centralize picker/connection flow into gateway.Connect
sigma Feb 20, 2026
a0a3363
refactor: template-ize nftables and dnsmasq config generation
sigma Feb 20, 2026
0a5235e
refactor: add LogViewer interface and fix shell command description
sigma Feb 20, 2026
1582063
refactor: make hardcoded values configurable (network prefix, usernam…
sigma Feb 20, 2026
13d1601
fix: update vendorHash and add git/jj to nativeCheckInputs for nix build
sigma Feb 20, 2026
b522cbc
fix: replace filepath-securejoin with lexical path validation
sigma Feb 20, 2026
f22db2b
fix: always run extra-container destroy during cleanup to remove unit…
sigma Feb 20, 2026
a0a2a86
fix: patch extra-container for nixos-init compat with latest nixpkgs-…
sigma Feb 20, 2026
f6e4e84
style: reformat patchedExtraContainer nix expression
sigma Feb 20, 2026
0737405
fix: replace bash -c with writeShellScript for identity service
sigma Feb 20, 2026
21b97db
fix: use jj/git CLI for identity resolution instead of file parsing
sigma Feb 20, 2026
0e65f4b
fix: update vendorHash after removing BurntSushi/toml dependency
sigma Feb 20, 2026
f412f32
fix: make identity tests hermetic for nix build sandbox
sigma Feb 20, 2026
7e04eec
fix: set HOME in process env for jj identity tests
sigma Feb 20, 2026
06a8056
fix: use Nix interpolation for store paths in identity script
sigma Feb 20, 2026
f4f6a69
feat: add initCommands option to template config
sigma Feb 20, 2026
3185a19
feat: add InitCommandResult type and wire into CreateResult
sigma Feb 20, 2026
98dbdc6
feat: implement runInitCommands and integrate into Create()
sigma Feb 20, 2026
b5b042c
feat: display init command results in up and pick commands
sigma Feb 20, 2026
864c56f
test: add tests for initCommands config and creator logic
sigma Feb 20, 2026
7417f74
docs: document initCommands and per-project .forage/init
sigma Feb 20, 2026
fa62988
ci: add GitHub Actions workflow to deploy docs to GitHub Pages
sigma Feb 20, 2026
fa9dbba
fix: nix formatting issues
sigma Feb 20, 2026
5b33581
feat: add beads-rust and beads-viewer from toolbox to devShell
sigma Feb 21, 2026
74bf6ce
config: add WorkspaceMount and WorkspaceMountMeta types
sigma Feb 21, 2026
31f737e
options: add Repos map to CreateOptions for named repo parameters
sigma Feb 21, 2026
e4e9803
injection: add WorkspaceMountsContributor for multi-mount support
sigma Feb 21, 2026
a3597a5
creator: implement setupWorkspaceMounts for composable mounts
sigma Feb 21, 2026
56af5c2
contributions: wire up multi-mount contributor and per-mount VCS back…
sigma Feb 21, 2026
728dc56
cleanup: iterate WorkspaceMounts for multi-mount cleanup
sigma Feb 21, 2026
ec4e107
cli: make --repo repeatable and optional for template-specified mounts
sigma Feb 21, 2026
6891aa7
nix: add workspace.mounts and workspace.useBeads to template options
sigma Feb 21, 2026
78e8fd6
skills: update system prompt and skill generation for composite mounts
sigma Feb 21, 2026
b2a2708
test: add tests for composable workspace mounts
sigma Feb 21, 2026
5efd7f4
docs: add comprehensive documentation for composable workspace mounts
sigma Feb 21, 2026
203ac00
fix: clean up formatting
sigma Feb 21, 2026
c15b446
fix: use ArgsLenAtDash for exec command argument parsing
sigma Feb 24, 2026
3dbaeab
feat: add E2E testing infrastructure with full-lifecycle VM tests
sigma Feb 24, 2026
9a8f46a
feat: add Go E2E framework with System interface and VMSystem
sigma Feb 25, 2026
022587c
feat: add TestEnv and assertion helpers for E2E tests
sigma Feb 25, 2026
0b0519e
feat: reimplement E2E test scenarios in Go
sigma Feb 25, 2026
7ba0312
build: update nix integration for Go E2E tests
sigma Feb 25, 2026
dc53261
refactor: remove bash E2E test scripts
sigma Feb 25, 2026
e6be168
test(e2e): add templates command verification to TestModuleSetup
sigma Feb 25, 2026
c246f98
test(e2e): add secrets, network isolation, and audit log verification
sigma Feb 25, 2026
d8b72d9
test(e2e): add stop/start, reset, and cleanup verification
sigma Feb 25, 2026
d97e003
test(e2e): add garbage collection test
sigma Feb 25, 2026
fcef5e0
perf(e2e): parallelize read-only subtests across all test functions
sigma Feb 25, 2026
b0dd9c1
fix: make sandbox secrets readable by container agent user
sigma Feb 25, 2026
206acec
fix: use extra-container to restart stopped nspawn containers
sigma Feb 25, 2026
ebca085
fix(e2e): correct status and secrets assertions to match actual behavior
sigma Feb 25, 2026
8109d9d
fix: nix formatting
sigma Feb 25, 2026
8e1de21
chore: ignore local env files
sigma Feb 25, 2026
9a0d988
feat(e2e): add local E2E mode and graceful skip in testenv
sigma Feb 25, 2026
1d2976c
feat: add test-e2e-local target and enhance check with conditional e2e
sigma Feb 25, 2026
98fbd28
feat: add internal/telemetry package with OTel init and span helpers
sigma Feb 25, 2026
de7501b
feat(e2e): instrument test framework with OpenTelemetry spans
sigma Feb 25, 2026
e4c3d2c
feat: instrument production CLI and runtime with OpenTelemetry spans
sigma Feb 25, 2026
708f923
chore: update nix vendorHash for OTel dependencies
sigma Feb 25, 2026
1e3830d
chore: load optional local environment file
sigma Feb 25, 2026
7ff2757
fix(e2e): improve trace quality with context threading and span attri…
sigma Feb 25, 2026
ba16812
feat: propagate trace context across process boundaries via TRACEPARENT
sigma Feb 25, 2026
a186596
feat: add granular spans to container creation workflow
sigma Feb 25, 2026
4e767f5
refactor: replace context.Background() with caller-inherited context
sigma Feb 25, 2026
8ef5c01
feat: add nix build observability to nspawn container creation
sigma Feb 25, 2026
269ff94
perf: replace pkgs.path with literal store path in container nix config
sigma Feb 25, 2026
743dbaa
feat: add CachedEtcPath field to SandboxMetadata for fast restart
sigma Feb 25, 2026
68ce3cd
feat: add nixcache package for template system cache management
sigma Feb 25, 2026
3cb2003
feat: add slot-independent network config for cached inner system
sigma Feb 25, 2026
ed4a958
feat: add inner/outer NixOS config templates and generator functions
sigma Feb 25, 2026
dba1556
feat: add two-phase build methods to nspawn runtime
sigma Feb 25, 2026
3c38925
feat: add cached two-phase creation flow to sandbox creator
sigma Feb 25, 2026
388ed90
test: add tests for inner/outer config generation
sigma Feb 25, 2026
cbbf786
fix: use extra-container natively for outer config instead of broken …
sigma Feb 25, 2026
c5e806e
debug: surface nixcache diagnostics in E2E test output
sigma Feb 25, 2026
f164d4c
feat: bypass extra-container eval for outer config via custom eval-co…
sigma Feb 26, 2026
6bca75b
test: parallelize multi-sandbox creation and clean up debug logs
sigma Feb 26, 2026
d2e0b30
ci: use merge queue for e2e tests, drop push-to-main trigger
sigma Feb 26, 2026
28a4d63
fix: resolve variable shadow lint warnings in creator and nspawn
sigma Feb 26, 2026
f6bb3a2
ci: fail-fast pipeline with shared setup-nix composite action
sigma Feb 26, 2026
5d264ef
feat: implement native container install/destroy (replaces extra-cont…
sigma Feb 26, 2026
a0f0854
refactor: remove ExtraContainerPath from config, runtime factory, and…
sigma Feb 26, 2026
d8c9650
refactor: remove extra-container flake input and NixOS module dependency
sigma Feb 26, 2026
10f1b7d
chore: update tests, docs, and comments to remove extra-container ref…
sigma Feb 26, 2026
9e98ee2
fix: go formatting
sigma Feb 26, 2026
debf4a1
test: add vm.wait-ssh telemetry span to E2E test driver
sigma Feb 26, 2026
a7bf9ff
ci: only run e2e workflow in merge queue
sigma Mar 20, 2026
d1c8946
perf(ci): add nix cache and minimal CI shell
sigma Mar 19, 2026
7522cde
Merge pull request #3 from firefly-engineering/ci-merge-queue-e2e-only
sigma Mar 20, 2026
e85f928
feat: add macOS (Darwin) support for devShell and packages
sigma Mar 9, 2026
a0d3377
refactor: rewrite Apple Container runtime to match actual CLI behavior
sigma Mar 9, 2026
3d05d61
feat: allow config/state/secrets paths via environment variables
sigma Mar 9, 2026
8f5da6c
feat: generic container creation with bind mounts for OCI runtimes
sigma Mar 9, 2026
1a1cd22
feat: use runtime exec for non-SSH backends
sigma Mar 9, 2026
ec60a77
fix: wrap exec commands in shell for nix-based containers
sigma Mar 9, 2026
8d44d0a
fix: check mux health via runtime exec for non-SSH backends
sigma Mar 9, 2026
34c9482
fix: mount source repo .git directory and resolve symlinks for worktr…
sigma Mar 9, 2026
e10f49e
feat: pass environment variables from contributions to OCI containers
sigma Mar 9, 2026
a701879
fix: integration test helpers use stderr for logs and match CLI inter…
sigma Mar 9, 2026
ac78100
feat: add darwinModules with shared option/config-gen modules
sigma Mar 9, 2026
ff770e9
feat: manage tasks with beadwork
sigma Mar 17, 2026
13b0d7a
feat(apple): Nix store integration and GeneratedFileRuntime for Virtu…
sigma Mar 17, 2026
ea0b1ed
fix(darwin): complete darwin.nix module for feature parity with host.nix
sigma Mar 17, 2026
a2b580b
feat(apple): implement resource limits (CPU/memory) in Create
sigma Mar 17, 2026
4ad1d1f
refactor(apple): replace string-based error matching with exit codes
sigma Mar 17, 2026
d1313cb
feat(apple): validate prerequisites at startup
sigma Mar 17, 2026
cc21d46
test: add nix-darwin module evaluation tests
sigma Mar 17, 2026
ac10b43
feat(apple): implement network isolation support
sigma Mar 17, 2026
c4a205e
fix(apple): real-world compatibility fixes from manual testing
sigma Mar 17, 2026
a0d2d42
fix(apple): real-world compatibility fixes for OCI runtimes
sigma Mar 18, 2026
f6153ce
feat(image): add forage-base Dockerfile and CI workflow
sigma Mar 18, 2026
8699a8d
feat(image): thread container image override through config and runtimes
sigma Mar 18, 2026
7925414
feat(image): skip already-installed packages in installPackages
sigma Mar 18, 2026
dc5db7b
feat(image): fall back to nixos/nix if default image is unavailable
sigma Mar 18, 2026
47b0741
fix: workspace backends contribute their packages for OCI runtimes
sigma Mar 18, 2026
e0fd6db
fix(workspace): set GIT_DIR so git CLI works in jj workspace containers
sigma Mar 18, 2026
1d5fd37
feat(image): build base image locally when GHCR is unavailable
sigma Mar 18, 2026
e9ba1cb
fix(apple): build fallback image and inject file mounts post-start
sigma Mar 18, 2026
f102b15
chore: use nix-pins
sigma Mar 18, 2026
e457b3b
fix(darwin): make module compatible with nix-darwin
sigma Mar 19, 2026
24197c9
feat(claude): transparent OAuth authentication for sandboxes
sigma Mar 19, 2026
676f659
chore: update toolbox
sigma Mar 19, 2026
49705d8
fix: disable devenv transitive input
sigma Mar 19, 2026
a30aba2
fix: nix formatting
sigma Mar 19, 2026
2ac68e4
fix: resolve golangci-lint warnings
sigma Mar 19, 2026
fc03848
refactor(nix): centralize Go source definition for forage-ctl
sigma Mar 19, 2026
cbfdae1
fix(ci): remove needs dependency so e2e runs in merge queue
sigma Mar 20, 2026
db248eb
fix: e2e test
sigma Mar 20, 2026
c2317c2
Merge pull request #2 from firefly-engineering/darwin-support
sigma Mar 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dotenv_if_exists .env.local
use flake
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# flake.lock is machine-generated JSON that cannot be merged by git.
# Always take the branch version on conflict — regenerate after merge if needed.
flake.lock merge=binary
17 changes: 17 additions & 0 deletions .github/actions/setup-nix/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Setup Nix
description: Install Nix with nixpkgs-unstable channel

runs:
using: composite
steps:
# Unset GITHUB_TOKEN so cachix/install-nix-action doesn't write a
# repo-scoped token to nix.conf. That token only covers this repo,
# so authenticated requests to other public repos (e.g. toolbox) fail
# with 401 instead of succeeding anonymously.
- name: Unset GITHUB_TOKEN for Nix
shell: bash
run: echo "GITHUB_TOKEN=" >> "$GITHUB_ENV"
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: DeterminateSystems/magic-nix-cache-action@v8
51 changes: 51 additions & 0 deletions .github/workflows/build-base-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build forage-base image

on:
push:
branches: [main]
paths:
- "images/forage-base/**"
pull_request:
paths:
- "images/forage-base/**"
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: firefly-engineering/forage-base

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4

- uses: docker/setup-buildx-action@v3

- uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/metadata-action@v5
id: meta
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha

- uses: docker/build-push-action@v5
with:
context: images/forage-base
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CI

on:
pull_request:
branches: [main]
merge_group:

jobs:
format:
if: github.event_name != 'merge_group'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-nix

- name: Check Nix formatting
run: nix fmt -- --ci .

lint:
if: github.event_name != 'merge_group'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-nix

- name: Run linter
run: nix develop .#ci --command bash -c "cd packages/forage-ctl && golangci-lint run"

build:
if: github.event_name != 'merge_group'
needs: [format, lint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-nix

- name: Build forage-ctl
run: nix build .#forage-ctl

- name: Build docs
run: nix build .#docs

test:
if: github.event_name != 'merge_group'
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-nix

- name: Run tests
run: nix develop .#ci --command bash -c "cd packages/forage-ctl && go test ./..."

e2e:
if: github.event_name == 'merge_group'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-nix

- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666"' | sudo tee /etc/udev/rules.d/99-kvm.rules
sudo udevadm control --reload-rules && sudo udevadm trigger --name-match=kvm

- name: Run E2E tests
run: nix run .#e2e-driver -- 2>&1
44 changes: 44 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy docs to GitHub Pages

on:
push:
branches: [main]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: Build docs
run: nix build .#docs

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: result

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
result
result-*
.direnv/
docs/book/

# Go vendor directories (dependencies managed by Nix)
**/vendor/

.claude/

# E2E test VM disk images
*.qcow2

# local environment files
.*.local
11 changes: 11 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Work Management

This project tracks work with `bw` (beadwork), which persists to git plans, progress, and decisions survive
compaction, session boundaries, and context loss.

ALWAYS run `bw prime` before starting work. Without it, you're missing workflow context, current state, and repo
hygiene warnings. Work done without priming often conflicts with in-progress changes.

Committing, closing issues, and syncing are part of completing a task not separate actions requiring additional
permission.

1 change: 1 addition & 0 deletions CLAUDE.md
Loading
Loading