Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
63 changes: 44 additions & 19 deletions .beads/.gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
# Dolt database (managed by Dolt, not git)
dolt/
dolt-access.lock

# Runtime files
bd.sock
bd.sock.startlock
sync-state.json
last-touched
.exclusive-lock

# Daemon runtime (lock, log, pid)
daemon.*

# Interactions log (runtime, not versioned)
interactions.jsonl

# Push state (runtime, per-machine)
push-state.json

# Lock files (various runtime locks)
*.lock

# Credential key (encryption key for federation peer auth — never commit)
.beads-credential-key

# Local version tracking (prevents upgrade notification spam after git ops)
.local_version
Expand All @@ -17,9 +33,30 @@ redirect
# Sync state (local-only, per-machine)
# These files are machine-specific and should not be shared across clones
.sync.lock
.jsonl.lock
sync_base.jsonl
export-state/
export-state.json

# Ephemeral store (SQLite - wisps/molecules, intentionally not versioned)
ephemeral.sqlite3
ephemeral.sqlite3-journal
ephemeral.sqlite3-wal
ephemeral.sqlite3-shm

# Dolt server management (auto-started by bd)
dolt-server.pid
dolt-server.log
dolt-server.lock
dolt-server.port
dolt-server.activity

# Corrupt backup directories (created by bd doctor --fix recovery)
*.corrupt.backup/

# Backup data (auto-exported JSONL, local-only)
backup/

# Per-project environment file (Dolt connection config, GH#2520)
.env

# Legacy files (from pre-Dolt versions)
*.db
Expand All @@ -29,19 +66,7 @@ export-state/
*.db-shm
db.sqlite
bd.db
daemon.lock
daemon.log
daemon-*.log.gz
daemon.pid
beads.base.jsonl
beads.base.meta.json
beads.left.jsonl
beads.left.meta.json
beads.right.jsonl
beads.right.meta.json

# NOTE: Do NOT add negation patterns (e.g., !issues.jsonl) here.
# They would override fork protection in .git/info/exclude, allowing
# contributors to accidentally commit upstream issue databases.
# The JSONL files (issues.jsonl, interactions.jsonl) and config files
# are tracked by git by default since no pattern above ignores them.
# NOTE: Do NOT add negation patterns here.
# They would override fork protection in .git/info/exclude.
# Config files (metadata.json, config.yaml) are tracked by git by default
# since no pattern above ignores them.
4 changes: 4 additions & 0 deletions .beads/dolt-backup-state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"last_sync": "2026-05-04T02:02:18.677980026Z",
"duration": "20.148657ms"
}
5 changes: 5 additions & 0 deletions .beads/dolt-backup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"backup_url": "file:///tmp/devloop-beads-backup",
"backup_name": "default",
"created_at": "2026-05-04T02:02:05.569697804Z"
}
6 changes: 3 additions & 3 deletions .beads/hooks/post-checkout
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#
# bd (beads) post-checkout hook - thin shim
#
# This shim delegates to 'bd hook post-checkout' which contains
# This shim delegates to 'bd hooks run post-checkout' which contains
# the actual hook logic. This pattern ensures hook behavior is always
# in sync with the installed bd version - no manual updates needed.
#
# The 'bd hook' command (singular) supports:
# The 'bd hooks run' command supports:
# - Guard against frequent firing (only imports if JSONL changed)
# - Per-worktree state tracking
# - Dolt branch-then-merge pattern
Expand All @@ -20,4 +20,4 @@ if ! command -v bd >/dev/null 2>&1; then
exit 0
fi

exec bd hook post-checkout "$@"
exec bd hooks run post-checkout "$@"
6 changes: 3 additions & 3 deletions .beads/hooks/post-merge
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#
# bd (beads) post-merge hook - thin shim
#
# This shim delegates to 'bd hook post-merge' which contains
# This shim delegates to 'bd hooks run post-merge' which contains
# the actual hook logic. This pattern ensures hook behavior is always
# in sync with the installed bd version - no manual updates needed.
#
# The 'bd hook' command (singular) supports:
# The 'bd hooks run' command supports:
# - Branch-then-merge pattern for Dolt (cell-level conflict resolution)
# - Per-worktree state tracking
# - Hook chaining configuration
Expand All @@ -21,4 +21,4 @@ if ! command -v bd >/dev/null 2>&1; then
exit 0
fi

exec bd hook post-merge "$@"
exec bd hooks run post-merge "$@"
6 changes: 3 additions & 3 deletions .beads/hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#
# bd (beads) pre-commit hook — thin shim
#
# Delegates to 'bd hook pre-commit' which contains the actual hook logic.
# Delegates to 'bd hooks run pre-commit' which contains the actual hook logic.
# This pattern ensures hook behavior is always in sync with the installed
# bd version — no manual updates needed.
#
# The 'bd hook' command supports:
# The 'bd hooks run' command supports:
# - Per-worktree export state tracking
# - Dolt in-process export (no lock deadlocks)
# - Sync-branch routing
Expand All @@ -22,4 +22,4 @@ if ! command -v bd >/dev/null 2>&1; then
exit 0
fi

exec bd hook pre-commit "$@"
exec bd hooks run pre-commit "$@"
4 changes: 4 additions & 0 deletions .beads/interactions.jsonl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{"id":"int-7230a6ae","kind":"field_change","created_at":"2026-05-04T04:43:24.260954052Z","actor":"Daniel Vianna","issue_id":"devloop-hrb","extra":{"field":"status","new_value":"in_progress","old_value":"open"}}
{"id":"int-0600ed25","kind":"field_change","created_at":"2026-05-04T04:44:14.236762188Z","actor":"Daniel Vianna","issue_id":"devloop-hrb","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Documented in README and behavior reference"}}
{"id":"int-76f6d530","kind":"field_change","created_at":"2026-05-04T04:54:41.658928411Z","actor":"Daniel Vianna","issue_id":"devloop-a2l","extra":{"field":"status","new_value":"in_progress","old_value":"open"}}
{"id":"int-a662fcf5","kind":"field_change","created_at":"2026-05-04T04:55:43.073552254Z","actor":"Daniel Vianna","issue_id":"devloop-a2l","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"0.9.0 changelog section prepared for release"}}
5 changes: 3 additions & 2 deletions .beads/metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"database": "dolt",
"jsonl_export": "issues.jsonl",
"backend": "dolt",
"dolt_database": "beads_devloop"
"dolt_mode": "embedded",
"dolt_database": "beads_devloop",
"project_id": "c77ed6d5-2ff6-43aa-aada-aab14edfcda0"
}
26 changes: 26 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"hooks": {
"PreCompact": [
{
"hooks": [
{
"command": "bd prime",
"type": "command"
}
],
"matcher": ""
}
],
"SessionStart": [
{
"hooks": [
{
"command": "bd prime",
"type": "command"
}
],
"matcher": ""
}
]
}
}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/target
/examples/*/state.json
**/.#*

# Beads / Dolt files (added by bd init)
.dolt/
*.db
.beads-credential-key

# Codex droppings
**/.codex
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to `devloop` will be recorded in this file.

## [Unreleased]

## [0.9.0] - 2026-05-04

### Added
- Added shell-free parent-environment interpolation for process
command arguments, process environment values, and HTTP probe URLs,
so client configs can share values such as `CONTAINER_PORT` without
repo-local wrapper scripts.

## [0.8.0] - 2026-04-08

### Added
Expand Down
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@AGENTS.md
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "devloop"
version = "0.8.0"
version = "0.9.0"
edition = "2024"

[dependencies]
Expand Down
8 changes: 8 additions & 0 deletions docs/behavior.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ Managed processes are long-running child commands.
- Managed child processes inherit the ambient environment unless the
process config explicitly overrides individual variables such as
`env.RUST_LOG`.
- Before a process is spawned, `devloop` expands `$NAME` and `${NAME}`
references in process command arguments and configured process
environment values from its own parent environment. Use `$$` for a
literal dollar sign.
- HTTP readiness and liveness probe URLs use the same expansion when the
probe is checked.
- Missing or malformed environment references fail loudly with the
field name so the configuration error is visible.

Liveness probes are checked on the configured interval while the process
is running. If a liveness probe fails and the restart policy allows it,
Expand Down
39 changes: 37 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ command = ["cargo", "run"]
cwd = "."
autostart = false
restart = "always"
env = { PORT = "8080" }
env = { PORT = "$CONTAINER_PORT" }
output = { inherit = true, body_style = "plain" }
```

Expand All @@ -102,6 +102,41 @@ output = { inherit = true, body_style = "plain" }
- `liveness`: optional liveness probe.
- `output`: inherited-output behavior and output-derived state rules.

### Environment interpolation

Process `command` arguments, process `env` values, and HTTP probe URLs
can reference variables from the parent `devloop` environment:

```toml
[process.server]
command = ["cargo", "run"]
env = { PORT = "$CONTAINER_PORT" }

[process.server.readiness]
kind = "http"
url = "http://127.0.0.1:$CONTAINER_PORT/"

[process.tunnel]
command = [
"cloudflared",
"tunnel",
"--url",
"http://127.0.0.1:$CONTAINER_PORT",
]

[process.chromium]
command = [
"chromium-browser",
"--remote-debugging-port=9222",
"http://localhost:$CONTAINER_PORT",
]
```

Supported forms are `$NAME` and `${NAME}`. Use `$$` for a literal dollar
sign. Expansion is performed by `devloop` before spawning a process or
checking an HTTP probe; it does not invoke a shell. Missing or malformed
references fail loudly with the field and variable name.

### Output config

```toml
Expand Down Expand Up @@ -153,7 +188,7 @@ Rule keys:
```toml
[process.server.readiness]
kind = "http"
url = "http://127.0.0.1:8080/"
url = "http://127.0.0.1:$CONTAINER_PORT/"
interval_ms = 500
timeout_ms = 30000
```
Expand Down
Loading