Add missing beads tools: init, sync, delete, batch-create

This commit is contained in:
Levi Neely 2026-02-28 18:53:56 +01:00
parent 08ddd42958
commit 7028bcd3e3
4 changed files with 63 additions and 0 deletions

17
mcptools/batch_create_beads.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
# capabilities: beads
# description: Batch create beads from JSON array
# Usage: batch_create_beads.sh <json-array>
set -euo pipefail
if cat /etc/passwd >/dev/null 2>&1; then
echo "Error: This script must be run via execute_code tool" >&2
exit 1
fi
if [ $# -lt 1 ]; then
echo "usage: batch_create_beads.sh <json-array>" >&2
exit 1
fi
echo "batch-create $1" | 9p write agent/beads/ctl

17
mcptools/delete_bead.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
# capabilities: beads
# description: Delete a bead
# Usage: delete_bead.sh <bead-id>
set -euo pipefail
if cat /etc/passwd >/dev/null 2>&1; then
echo "Error: This script must be run via execute_code tool" >&2
exit 1
fi
if [ $# -lt 1 ]; then
echo "usage: delete_bead.sh <bead-id>" >&2
exit 1
fi
echo "delete $1" | 9p write agent/beads/ctl

12
mcptools/init_beads.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
# capabilities: beads
# description: Initialize beads project with issue prefix
# Usage: init_beads.sh [prefix]
set -euo pipefail
if cat /etc/passwd >/dev/null 2>&1; then
echo "Error: This script must be run via execute_code tool" >&2
exit 1
fi
echo "init ${1:-bd}" | 9p write agent/beads/ctl

17
mcptools/sync_beads.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
# capabilities: beads
# description: Sync a mounted beads project
# Usage: sync_beads.sh <name>
set -euo pipefail
if cat /etc/passwd >/dev/null 2>&1; then
echo "Error: This script must be run via execute_code tool" >&2
exit 1
fi
if [ $# -lt 1 ]; then
echo "usage: sync_beads.sh <name>" >&2
exit 1
fi
echo "sync $1" | 9p write agent/beads/ctl