Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
77 changes: 77 additions & 0 deletions .beads/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Dolt database (managed by Dolt, not git)
dolt/
embeddeddolt/
proxieddb/

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

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

# 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

proxied_server_client_info.json

# Worktree redirect file (contains relative path to main repo's .beads/)
# Must not be committed as paths would be wrong in other clones
redirect

# Sync state (local-only, per-machine)
# These files are machine-specific and should not be shared across clones
.sync.lock
export-state/
export-state.json
last_pull

# 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

# Debug-mode pprof artifacts (written when dolt.debug: true in config.yaml)
dolt-pprof/

# 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
*.db?*
*.db-journal
*.db-wal
*.db-shm
db.sqlite
bd.db
# 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.
81 changes: 81 additions & 0 deletions .beads/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Beads - AI-Native Issue Tracking

Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code.

## What is Beads?

Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git.

**Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads)

## Quick Start

### Essential Commands

```bash
# Create new issues
bd create "Add user authentication"

# View all issues
bd list

# View issue details
bd show <issue-id>

# Update issue status
bd update <issue-id> --claim
bd update <issue-id> --status done

# Sync with Dolt remote
bd dolt push
```

### Working with Issues

Issues in Beads are:
- **Git-native**: Stored in Dolt database with version control and branching
- **AI-friendly**: CLI-first design works perfectly with AI coding agents
- **Branch-aware**: Issues can follow your branch workflow
- **Sync-ready**: Uses Dolt remotes for backup and team sharing

## Why Beads?

✨ **AI-Native Design**
- Built specifically for AI-assisted development workflows
- CLI-first interface works seamlessly with AI coding agents
- No context switching to web UIs

🚀 **Developer Focused**
- Issues live in your repo, right next to your code
- Works offline, syncs when you push
- Fast, lightweight, and stays out of your way

🔧 **Git Integration**
- Dolt-native sync via bd dolt push / bd dolt pull
- Branch-aware issue tracking
- Dolt-native three-way merge resolution

## Get Started with Beads

Try Beads in your own projects:

```bash
# Install Beads
curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash

# Initialize in your repo
bd init

# Create your first issue
bd create "Try out Beads"
```

## Learn More

- **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs)
- **Quick Start Guide**: Run `bd quickstart`
- **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples)

---

*Beads: Issue tracking that moves at the speed of thought* ⚡
68 changes: 68 additions & 0 deletions .beads/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Beads Configuration File
# This file configures default behavior for all bd commands in this repository
# All settings can also be set via environment variables (BD_* prefix)
# or overridden with command-line flags

# Issue prefix for this repository (used by bd init)
# If not set, bd init will auto-detect from directory name
# Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc.
# issue-prefix: ""

# Use no-db mode: JSONL-only, no Dolt database
# When true, .beads/issues.jsonl is the only local store
# no-db: false

# Enable JSON output by default
# json: false

# Feedback title formatting for mutating commands (create/update/close/dep/edit)
# 0 = hide titles, N > 0 = truncate to N characters
# output:
# title-length: 255

# Default actor for audit trails (overridden by BEADS_ACTOR or --actor)
# actor: ""

# Export events (audit trail) to .beads/events.jsonl on each flush/sync
# When enabled, new events are appended incrementally using a high-water mark.
# Use 'bd export --events' to trigger manually regardless of this setting.
# events-export: false

# Multi-repo configuration (experimental - bd-307)
# Allows hydrating from multiple repositories and routing writes to the correct database
# repos:
# primary: "." # Primary repo (where this database lives)
# additional: # Additional repos to hydrate from (read-only)
# - ~/beads-planning # Personal planning repo
# - ~/work-planning # Work planning repo

# Dolt-native backup (periodic backup for off-machine recovery)
# This is full database backup only. Cross-machine sync uses Dolt remotes.
# backup:
# enabled: false # Disable auto-backup entirely
# interval: 15m # Minimum time between auto-backups
# git-push: false # Disable git push (backup locally only)
# git-repo: "" # Separate git repo for backups (default: project repo)

# Optional JSONL auto-export for viewers, interchange, and issue-level migration.
# Disabled by default; enable only when an integration needs fresh .beads/issues.jsonl.
# Use relative paths under .beads/ for JSONL import/export filenames.
# export:
# auto: false
# path: issues.jsonl
# interval: 60s
# git-add: false
# import:
# path: issues.jsonl

# Integration settings (access with 'bd config get/set')
# Non-secret keys (stored in the database):
# - jira.url, jira.project
# - linear.team_id
# - github.org, github.repo
#
# Secret keys (stored in this file but prefer env vars to avoid git exposure):
# - linear.api_key → use LINEAR_API_KEY env var instead
# - github.token → use GITHUB_TOKEN env var instead
Comment on lines +58 to +66

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "==tracked config files around .beads/config.yaml=="
git ls-files | rg '(^|/)\.beads/config\.yaml|config\.ya?ml|.*beads.*' || true

echo
echo "==lines 50-75 of .beads/config.yaml if present=="
if [ -f .beads/config.yaml ]; then
  nl -ba .beads/config.yaml | sed -n '50,75p'
fi

echo
echo "==search for token/api_key and database secret docs==
rg -n -i "api_key|secret|secret keys|plaintext|tracker-token|token|linear|github" .beads README.md .github 2>/dev/null || true

Repository: intent-solutions-io/buzz

Length of output: 588


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "==tracked config files around .beads/config.yaml==
git ls-files | grep -E '(^|/)\.beads/config\.yaml|config\.ya?ml|.*beads.*' || true

echo
echo "==lines 50-75 of .beads/config.yaml if present==
if [ -f .beads/config.yaml ]; then
  awk 'NR>=50 && NR<=75 {printf "%5d  %s\n", NR, $0}' .beads/config.yaml
fi

echo
echo "==search for token/api_key/db plaintext docs==
grep -RIniE "api_key|secret keys|secretkeys|secret|plaintext|tracker-token|tracker.*token|linear.api_key|github.token|security|rotation|scan|LINEA?R_API_KEY|GITHUB_TOKEN" . --exclude-dir=.git 2>/dev/null || true

Repository: intent-solutions-io/buzz

Length of output: 1103


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "==tracked files around .beads/config.yaml=="
git ls-files | grep -E '(^|/)\.beads/config\.yaml|(^|/)config\.ya?ml$|(^|/)Readme.*|(^|/)readme.*|\.beads/README\.md|\.beads/.*' || true

echo
echo "==lines 50-75 of .beads/config.yaml==
awk 'NR>=50 && NR<=75 {printf "%5d  %s\n", NR, $0}' .beads/config.yaml

echo
echo "==tracked gitignore for .beads/config.yaml and secret patterns==
awk 'NR>=1 && NR<=200 {printf "%5d  %s\n", NR, $0}' .beads/.gitignore

echo
echo "==search for Beads token/config/documentation==
grep -RIniE "\\b(beads|bd config|api_key|secret keys|secretkeys|secret|plaintext|tracker-token|tracker.*token|linear.api_key|github.token|LINEA?R_API_KEY|GITHUB_TOKEN|security|rotation|scan)\\b" . --exclude-dir=.git --exclude-dir=node_modules --exclude='*.lock' 2>/dev/null || true

Repository: intent-solutions-io/buzz

Length of output: 3024


🌐 Web query:

Beads steveyegge .beads/config.yaml linear.api_key github.token security security.md tracker-token

💡 Result:

Beads is an open-source, persistent memory and issue-tracking system for AI coding agents, created by Steve Yegge [1][2]. It allows agents to handle long-horizon tasks by providing a dependency-aware graph that replaces standard markdown plans [1][3]. The system is managed via the bd CLI tool and utilizes a Dolt database for version-controlled storage [3]. Regarding your configuration query, Beads manages settings in two ways [4]: 1. Tool-level configuration is stored in config.yaml files [4]. 2. Project-level configuration (including integration credentials) is primarily stored in the project's Dolt database [4]. Specific security considerations for keys like linear.api_key, github.token, and tracker-related tokens include: Security Best Practices: Beads explicitly prevents writing sensitive keys (containing names like api_key, secret, token, or password) to git-tracked config.yaml files by default [4][5][6]. This is a security measure to prevent leaking credentials into git history [5]. If you attempt to use bd config set for these keys, the system will refuse the write unless you explicitly use the --force-git-tracked flag [4][6]. Recommended Configuration: The authoritative recommendation for sensitive keys is to export them as environment variables [4][7][5]. This ensures they are not stored in your project's configuration files [4][6]. Examples: - export LINEAR_API_KEY="your_api_key" [7][6] - export GITHUB_TOKEN="your_token" [6] When these environment variables are present, Beads can consume them automatically for authentication [4][6]. Non-sensitive configuration (e.g., linear.team_id) can safely be set using bd config set [7][6]. The config.yaml file should be reserved for tool-level startup settings and non-sensitive behavior configurations [4][6].

Citations:


Stop documenting config.yaml as a secret store.

This tracked file lists linear.api_key and github.token as acceptable values, while .gitignore explicitly says config files are tracked and .beads/config.yaml only says to prefer env vars. Require env variables for API keys and add secret-scanning/rotation guidance; if token storage is unavoidable, ensure it is not stored in tracked Git/Dolt history.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.beads/config.yaml around lines 58 - 66, Update the Integration settings
documentation in config.yaml to remove API keys and tokens as supported or
acceptable file-stored values. Require LINEAR_API_KEY and GITHUB_TOKEN
environment variables, and add guidance for secret scanning and rotating exposed
credentials; if unavoidable token persistence is documented, explicitly require
storage outside tracked Git/Dolt history.

Source: MCP tools


sync.remote: "https://github.com/intent-solutions-io/buzz.git"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== repo files of interest =="
git ls-files | rg '(^|/)(FORK\.md|\.beads/config\.yaml|\.beads/issues\.jsonl|docs/DOLT\.md|\.beads)' || true

echo
echo "== .beads/config.yaml =="
if [ -f .beads/config.yaml ]; then
  nl -ba .beads/config.yaml | sed -n '1,120p'
fi

echo
echo "== FORK.md =="
if [ -f FORK.md ]; then
  nl -ba FORK.md | sed -n '1,160p'
fi

echo
echo "== docs/DOLT.md (lines mentioning GitHub/push/remote) =="
if [ -f docs/DOLT.md ]; then
  rg -n -C 3 -i 'github|push|remote|clone|dolt|beads|sync' docs/DOLT.md || true
fi

echo
echo "== .beads/issues.jsonl sample and sensitive fields =="
if [ -f .beads/issues.jsonl ]; then
  wc -l .beads/issues.jsonl
  nl -ba .beads/issues.jsonl | sed -n '1,80p'
  echo "-- matches for sensitive-looking strings --"
  rg -n 'plane|operations|owner|@|github|buzz|https?://' .beads/issues.jsonl || true
fi

Repository: intent-solutions-io/buzz

Length of output: 516


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== repo files of interest =="
git ls-files | rg '(^|/)(FORK\.md|\.beads/config\.yaml|\.beads/issues\.jsonl|docs/DOLT\.md|\.beads)' || true

echo
echo "== .beads/config.yaml =="
if [ -f .beads/config.yaml ]; then
  nl -ba .beads/config.yaml | sed -n '1,120p'
fi

echo
echo "== FORK.md =="
if [ -f FORK.md ]; then
  nl -ba FORK.md | sed -n '1,160p'
fi

echo
echo "== docs/DOLT.md (lines mentioning GitHub/push/remote) =="
if [ -f docs/DOLT.md ]; then
  rg -n -C 3 -i 'github|push|remote|clone|dolt|beads|sync' docs/DOLT.md || true
fi

echo
echo "== .beads/issues.jsonl sample and sensitive fields =="
if [ -f .beads/issues.jsonl ]; then
  wc -l .beads/issues.jsonl
  nl -ba .beads/issues.jsonl | sed -n '1,80p'
  echo "-- matches for sensitive-looking strings --"97 || true
fi

Repository: intent-solutions-io/buzz

Length of output: 516


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== .beads/config.yaml =="
python3 - <<'PY'
from pathlib import Path
for i, line in enumerate(Path('.beads/config.yaml').read_text().splitlines(), 1):
    if i <= 120:
        print(f"{i:4d}\t{line}")
PY

echo
echo "== FORK.md =="
python3 - <<'PY'
from pathlib import Path
for i, line in enumerate(Path('FORK.md').read_text().splitlines(), 1):
    if i <= 180:
        print(f"{i:4d}\t{line}")
PY

echo
echo "== docs/DOLT.md remote/push mentions =="
python3 - <<'PY'
from pathlib import Path
p = Path('docs/DOLT.md')
if p.exists():
    lines = p.read_text().splitlines()
    hits = []
    for i, line in enumerate(lines, 1):
        if any(s in line.lower() for s in ['github', 'push', 'remote', 'clone', 'dolt', 'beads', 'sync']):
            start=max(1,i-3); stop=min(len(lines),i+3)
            hits.append((i,start,stop))
    printed=set()
    for i,start,stop in hits:
        for n in range(start,stop+1):
            if n not in printed:
                print(f"{n:4d}\t{lines[n-1]}")
                printed.add(n)
else:
    print("docs/DOLT.md not found")
PY

echo
echo "== .beads/issues.jsonl sample and sensitive text =="
python3 - <<'PY'
from pathlib import Path
p=Path('.beads/issues.jsonl')
lines=p.read_text().splitlines() if p.exists() else []
print(f"line_count={len(lines)}")
for i, line in enumerate(lines[:80], 1):
    print(f"{i:4d}\t{line}")
print("\n-- sensitive matches --")
import re
keys={'plane','operations','owner','github.com/intent','buzz.git','https://'}
for i, line in enumerate(lines, 1):
    if any(k in line.lower() for k in keys) or re.search(r'[\w.-]+@\w[\w.-]*|https?://', line):
        print(f"{i:4d}\t{line}")
PY

echo
echo "== other relevant .beads metadata =="
python3 - << 'PY'
from pathlib import Path
for name in [".beads/metadata.json", ".beads/README.md", ".beads/interactions.jsonl"]:
    p=Path(name)
    print(f"\n--- {name} ---")
    if p.exists():
        txt=p.read_text()
        for i,line in enumerate(txt.splitlines()[:120],1):
            print(f"{i:4d}\t{line}")
    else:
        print("not found")
PY

echo
echo "== hook evidence for Dolt/Git push =="
for f in .beads/hooks/pre-push .beads/hooks/post-merge; do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    cat "$f"
  fi
done

Repository: intent-solutions-io/buzz

Length of output: 23901


🌐 Web query:

Beads steveyegge sync.remote Dolt remote github.com/intent-solutions-io/buzz.git

💡 Result:

The query combines several distinct technical concepts and repositories related to Steve Yegge's "Beads" project and the organization intent-solutions-io. Beads Beads is a persistent, structured memory system for AI coding agents, created by Steve Yegge [1][2]. It operates as a git-backed, dependency-aware graph issue tracker that uses the Dolt database engine to store agent memory and task history [3][4][5]. The Beads CLI tool (bd) allows agents to maintain long-horizon context that survives session rotations [4]. sync.remote and Dolt In the context of Beads, sync.remote is a configuration key used to manage cross-machine synchronization of the Dolt-backed issue database [6][7]. - It acts as the primary configuration for the remote URL used during bootstrap or synchronization operations [6][8]. - It supports various Dolt-compatible remote schemes, including git-based remotes (e.g., git+ssh://, git+https://), S3, GCS, and local paths [6][7]. - The setting is typically persisted in.beads/config.yaml [6][7]. - Beads leverages Dolt's ability to store issue data in refs/dolt/data, distinct from standard git source branches, enabling seamless synchronization alongside traditional git workflows [7][5]. github.com/intent-solutions-io/buzz.git There is no publicly available repository at github.com/intent-solutions-io/buzz.git as of July 2026. The search results identify several unrelated projects named "buzz" (e.g., by chidiwilliams, ademilter, and vibbits) [9][10][11] and list other repositories associated with intent-solutions-io (such as perception-with-intent), but none matching the specified path [12]. It is possible this path refers to a private repository or a typo in the request.

Citations:


Do not sync Beads/Dolt issue data to the public GitHub remote.

.beads/config.yaml points sync.remote at https://github.com/intent-solutions-io/buzz.git, and this fork is declared public in FORK.md. .beads/issues.jsonl contains owner/actor identity plus Plane and private operations path references, while .beads/metadata.json shows the Dolt store is enabled and .beads/README.md advertises bd dolt push / sync. Use a private Dolt remote, or scrub existing issue data/history before pushing.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.beads/config.yaml at line 68, Remove the public GitHub URL from the
sync.remote setting in .beads/config.yaml and configure it to use a private Dolt
remote instead. Ensure the existing Beads/Dolt issue data and history are not
pushed to the public repository; if no private remote is available, disable
syncing until the data is scrubbed.

Source: MCP tools

33 changes: 33 additions & 0 deletions .beads/hooks/post-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v1.1.2 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
_bd_used_perl=0
if command -v timeout >/dev/null 2>&1; then
timeout "$_bd_timeout" bd hooks run post-checkout "$@"
_bd_exit=$?
elif command -v gtimeout >/dev/null 2>&1; then
gtimeout "$_bd_timeout" bd hooks run post-checkout "$@"
_bd_exit=$?
elif command -v perl >/dev/null 2>&1; then
_bd_used_perl=1
perl -e 'alarm shift; exec @ARGV' "$_bd_timeout" bd hooks run post-checkout "$@"
_bd_exit=$?
else
echo >&2 "beads: hook 'post-checkout' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
bd hooks run post-checkout "$@"
_bd_exit=$?
fi
if [ $_bd_exit -eq 124 ] || { [ $_bd_used_perl -eq 1 ] && [ $_bd_exit -eq 142 ]; }; then
echo >&2 "beads: hook 'post-checkout' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
if [ $_bd_exit -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'post-checkout'"
_bd_exit=0
fi
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v1.1.2 ---
33 changes: 33 additions & 0 deletions .beads/hooks/post-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v1.1.2 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
_bd_used_perl=0
if command -v timeout >/dev/null 2>&1; then
timeout "$_bd_timeout" bd hooks run post-merge "$@"
_bd_exit=$?
elif command -v gtimeout >/dev/null 2>&1; then
gtimeout "$_bd_timeout" bd hooks run post-merge "$@"
_bd_exit=$?
elif command -v perl >/dev/null 2>&1; then
_bd_used_perl=1
perl -e 'alarm shift; exec @ARGV' "$_bd_timeout" bd hooks run post-merge "$@"
_bd_exit=$?
else
echo >&2 "beads: hook 'post-merge' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
bd hooks run post-merge "$@"
_bd_exit=$?
fi
if [ $_bd_exit -eq 124 ] || { [ $_bd_used_perl -eq 1 ] && [ $_bd_exit -eq 142 ]; }; then
echo >&2 "beads: hook 'post-merge' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
if [ $_bd_exit -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'post-merge'"
_bd_exit=0
fi
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v1.1.2 ---
33 changes: 33 additions & 0 deletions .beads/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v1.1.2 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
_bd_used_perl=0
if command -v timeout >/dev/null 2>&1; then
timeout "$_bd_timeout" bd hooks run pre-commit "$@"
_bd_exit=$?
elif command -v gtimeout >/dev/null 2>&1; then
gtimeout "$_bd_timeout" bd hooks run pre-commit "$@"
_bd_exit=$?
elif command -v perl >/dev/null 2>&1; then
_bd_used_perl=1
perl -e 'alarm shift; exec @ARGV' "$_bd_timeout" bd hooks run pre-commit "$@"
_bd_exit=$?
else
echo >&2 "beads: hook 'pre-commit' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
bd hooks run pre-commit "$@"
_bd_exit=$?
fi
if [ $_bd_exit -eq 124 ] || { [ $_bd_used_perl -eq 1 ] && [ $_bd_exit -eq 142 ]; }; then
echo >&2 "beads: hook 'pre-commit' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
if [ $_bd_exit -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'pre-commit'"
_bd_exit=0
fi
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v1.1.2 ---
33 changes: 33 additions & 0 deletions .beads/hooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v1.1.2 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
_bd_used_perl=0
if command -v timeout >/dev/null 2>&1; then
timeout "$_bd_timeout" bd hooks run pre-push "$@"
_bd_exit=$?
elif command -v gtimeout >/dev/null 2>&1; then
gtimeout "$_bd_timeout" bd hooks run pre-push "$@"
_bd_exit=$?
elif command -v perl >/dev/null 2>&1; then
_bd_used_perl=1
perl -e 'alarm shift; exec @ARGV' "$_bd_timeout" bd hooks run pre-push "$@"
_bd_exit=$?
else
echo >&2 "beads: hook 'pre-push' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
bd hooks run pre-push "$@"
_bd_exit=$?
fi
if [ $_bd_exit -eq 124 ] || { [ $_bd_used_perl -eq 1 ] && [ $_bd_exit -eq 142 ]; }; then
echo >&2 "beads: hook 'pre-push' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
if [ $_bd_exit -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'pre-push'"
_bd_exit=0
fi
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v1.1.2 ---
33 changes: 33 additions & 0 deletions .beads/hooks/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v1.1.2 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
_bd_used_perl=0
if command -v timeout >/dev/null 2>&1; then
timeout "$_bd_timeout" bd hooks run prepare-commit-msg "$@"
_bd_exit=$?
elif command -v gtimeout >/dev/null 2>&1; then
gtimeout "$_bd_timeout" bd hooks run prepare-commit-msg "$@"
_bd_exit=$?
elif command -v perl >/dev/null 2>&1; then
_bd_used_perl=1
perl -e 'alarm shift; exec @ARGV' "$_bd_timeout" bd hooks run prepare-commit-msg "$@"
_bd_exit=$?
else
echo >&2 "beads: hook 'prepare-commit-msg' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
bd hooks run prepare-commit-msg "$@"
_bd_exit=$?
fi
if [ $_bd_exit -eq 124 ] || { [ $_bd_used_perl -eq 1 ] && [ $_bd_exit -eq 142 ]; }; then
echo >&2 "beads: hook 'prepare-commit-msg' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
if [ $_bd_exit -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'prepare-commit-msg'"
_bd_exit=0
fi
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v1.1.2 ---
Loading