diff --git a/mcptools/add_dependency.sh b/mcptools/add_dependency.sh new file mode 100755 index 0000000..054c96e --- /dev/null +++ b/mcptools/add_dependency.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Add a dependency (child depends on parent) +# Usage: add_dependency.sh +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 2 ]; then + echo "usage: add_dependency.sh " >&2 + exit 1 +fi + +echo "dep $*" | 9p write agent/beads/ctl diff --git a/mcptools/claim_bead.sh b/mcptools/claim_bead.sh new file mode 100755 index 0000000..add923d --- /dev/null +++ b/mcptools/claim_bead.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Claim a bead for work +# Usage: claim_bead.sh [assignee] +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: claim_bead.sh [assignee]" >&2 + exit 1 +fi + +echo "claim $*" | 9p write agent/beads/ctl diff --git a/mcptools/comment_bead.sh b/mcptools/comment_bead.sh new file mode 100755 index 0000000..55387d9 --- /dev/null +++ b/mcptools/comment_bead.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Add a comment to a bead +# Usage: comment_bead.sh +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 2 ]; then + echo "usage: comment_bead.sh " >&2 + exit 1 +fi + +echo "comment $*" | 9p write agent/beads/ctl diff --git a/mcptools/complete_bead.sh b/mcptools/complete_bead.sh new file mode 100755 index 0000000..b9dba4d --- /dev/null +++ b/mcptools/complete_bead.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Complete a bead +# Usage: complete_bead.sh +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: complete_bead.sh " >&2 + exit 1 +fi + +echo "complete $1" | 9p write agent/beads/ctl diff --git a/mcptools/control_session.sh b/mcptools/control_session.sh new file mode 100755 index 0000000..b90e103 --- /dev/null +++ b/mcptools/control_session.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: agents +# description: Control a session (stop|restart|kill|refresh) +# Usage: control_session.sh +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 2 ]; then + echo "usage: control_session.sh " >&2 + exit 1 +fi + +echo "$2" | 9p write "agent/$1/ctl" diff --git a/mcptools/create_bead.sh b/mcptools/create_bead.sh new file mode 100755 index 0000000..340428d --- /dev/null +++ b/mcptools/create_bead.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Create a new bead +# Usage: create_bead.sh [description] [parent-id] [--no-lint] [capability=low|standard|high] +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: create_bead.sh <title> [description] [parent-id] [--no-lint] [capability=low|standard|high]" >&2 + exit 1 +fi + +echo "new $*" | 9p write agent/beads/ctl diff --git a/mcptools/create_session.sh b/mcptools/create_session.sh new file mode 100755 index 0000000..c845ba5 --- /dev/null +++ b/mcptools/create_session.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: agents +# description: Create a new agent session +# Usage: create_session.sh <backend> <cwd> [role=<role>] [tasks=<task1,task2>] [model=<model>] +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 2 ]; then + echo "usage: create_session.sh <backend> <cwd> [role=<role>] [tasks=<task1,task2>] [model=<model>]" >&2 + exit 1 +fi + +echo "new $*" | 9p write agent/ctl diff --git a/mcptools/fail_bead.sh b/mcptools/fail_bead.sh new file mode 100755 index 0000000..121bab5 --- /dev/null +++ b/mcptools/fail_bead.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Fail a bead with reason +# Usage: fail_bead.sh <bead-id> <reason> +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 2 ]; then + echo "usage: fail_bead.sh <bead-id> <reason>" >&2 + exit 1 +fi + +echo "fail $*" | 9p write agent/beads/ctl diff --git a/mcptools/label_bead.sh b/mcptools/label_bead.sh new file mode 100755 index 0000000..5be2129 --- /dev/null +++ b/mcptools/label_bead.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Add a label to a bead +# Usage: label_bead.sh <bead-id> <label> +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 2 ]; then + echo "usage: label_bead.sh <bead-id> <label>" >&2 + exit 1 +fi + +echo "label $*" | 9p write agent/beads/ctl diff --git a/mcptools/list_beads.sh b/mcptools/list_beads.sh new file mode 100755 index 0000000..f01d378 --- /dev/null +++ b/mcptools/list_beads.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# capabilities: beads +# description: List all beads across all mounted projects (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 + +9p read agent/beads/list diff --git a/mcptools/list_mounts.sh b/mcptools/list_mounts.sh new file mode 100755 index 0000000..e156e83 --- /dev/null +++ b/mcptools/list_mounts.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# capabilities: beads +# description: List mounted beads projects +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 + +9p read agent/beads/mtab diff --git a/mcptools/list_ready_beads.sh b/mcptools/list_ready_beads.sh new file mode 100755 index 0000000..e2bca53 --- /dev/null +++ b/mcptools/list_ready_beads.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# capabilities: beads +# description: List ready/claimable beads (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 + +9p read agent/beads/ready diff --git a/mcptools/mark_pending_approval.sh b/mcptools/mark_pending_approval.sh new file mode 100755 index 0000000..4038147 --- /dev/null +++ b/mcptools/mark_pending_approval.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Mark a bead as pending approval +# Usage: mark_pending_approval.sh <bead-id> [assignee] +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: mark_pending_approval.sh <bead-id> [assignee]" >&2 + exit 1 +fi + +echo "pending-approval $*" | 9p write agent/beads/ctl diff --git a/mcptools/mark_pending_review.sh b/mcptools/mark_pending_review.sh new file mode 100755 index 0000000..4e3d9c6 --- /dev/null +++ b/mcptools/mark_pending_review.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Mark a bead as pending review +# Usage: mark_pending_review.sh <bead-id> [assignee] +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: mark_pending_review.sh <bead-id> [assignee]" >&2 + exit 1 +fi + +echo "pending-review $*" | 9p write agent/beads/ctl diff --git a/mcptools/mount_beads.sh b/mcptools/mount_beads.sh new file mode 100755 index 0000000..9b42859 --- /dev/null +++ b/mcptools/mount_beads.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Mount a beads project +# Usage: mount_beads.sh <cwd> [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: mount_beads.sh <cwd> [name]" >&2 + exit 1 +fi + +echo "mount $*" | 9p write agent/beads/ctl diff --git a/mcptools/read_bead.sh b/mcptools/read_bead.sh new file mode 100755 index 0000000..251134c --- /dev/null +++ b/mcptools/read_bead.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Read a bead property +# Usage: read_bead.sh <bead-id> <property> +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 2 ]; then + echo "usage: read_bead.sh <bead-id> <property>" >&2 + exit 1 +fi + +9p read "agent/beads/$1/$2" diff --git a/mcptools/remove_dependency.sh b/mcptools/remove_dependency.sh new file mode 100755 index 0000000..55d4982 --- /dev/null +++ b/mcptools/remove_dependency.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Remove a dependency +# Usage: remove_dependency.sh <child-id> <parent-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 2 ]; then + echo "usage: remove_dependency.sh <child-id> <parent-id>" >&2 + exit 1 +fi + +echo "undep $*" | 9p write agent/beads/ctl diff --git a/mcptools/resume_work.sh b/mcptools/resume_work.sh new file mode 100755 index 0000000..8be0c80 --- /dev/null +++ b/mcptools/resume_work.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Resume work on a bead after approval/review +# Usage: resume_work.sh <bead-id> [assignee] +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: resume_work.sh <bead-id> [assignee]" >&2 + exit 1 +fi + +echo "resume $*" | 9p write agent/beads/ctl diff --git a/mcptools/set_capability.sh b/mcptools/set_capability.sh new file mode 100755 index 0000000..3ae9f96 --- /dev/null +++ b/mcptools/set_capability.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Set capability level on a bead (low|standard|high) +# Usage: set_capability.sh <bead-id> <level> +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 2 ]; then + echo "usage: set_capability.sh <bead-id> <level>" >&2 + exit 1 +fi + +echo "set-capability $*" | 9p write agent/beads/ctl diff --git a/mcptools/umount_beads.sh b/mcptools/umount_beads.sh new file mode 100755 index 0000000..0b13cba --- /dev/null +++ b/mcptools/umount_beads.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Unmount a beads project +# Usage: umount_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: umount_beads.sh <name>" >&2 + exit 1 +fi + +echo "umount $1" | 9p write agent/beads/ctl diff --git a/mcptools/unclaim_bead.sh b/mcptools/unclaim_bead.sh new file mode 100755 index 0000000..10943c5 --- /dev/null +++ b/mcptools/unclaim_bead.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Unclaim a bead (reset to open) +# Usage: unclaim_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: unclaim_bead.sh <bead-id>" >&2 + exit 1 +fi + +echo "unclaim $1" | 9p write agent/beads/ctl diff --git a/mcptools/unlabel_bead.sh b/mcptools/unlabel_bead.sh new file mode 100755 index 0000000..528d29b --- /dev/null +++ b/mcptools/unlabel_bead.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Remove a label from a bead +# Usage: unlabel_bead.sh <bead-id> <label> +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 2 ]; then + echo "usage: unlabel_bead.sh <bead-id> <label>" >&2 + exit 1 +fi + +echo "unlabel $*" | 9p write agent/beads/ctl diff --git a/mcptools/update_bead.sh b/mcptools/update_bead.sh new file mode 100755 index 0000000..f7db81d --- /dev/null +++ b/mcptools/update_bead.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# capabilities: beads +# description: Update a bead field +# Usage: update_bead.sh <bead-id> <field> <value> +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 3 ]; then + echo "usage: update_bead.sh <bead-id> <field> <value>" >&2 + exit 1 +fi + +echo "update $*" | 9p write agent/beads/ctl