feat(pi): 3 new Pi Dev extensions — read-tweet, auto-context, task-lifecycle tools
CI / build (push) Has been cancelled
CI / build (push) Has been cancelled
This commit is contained in:
+20
-12
@@ -54,18 +54,26 @@ else
|
||||
echo "OpenCode: not detected (no ~/.config/opencode/opencode.json or .jsonc)"
|
||||
fi
|
||||
|
||||
# Pi Dev guard
|
||||
PI_SOURCE="$FRAMEWORK_DIR/plugins/automaton-guard-pi"
|
||||
# Pi Dev extensions
|
||||
PI_EXTENSIONS=(
|
||||
"$FRAMEWORK_DIR/plugins/automaton-guard-pi"
|
||||
"$FRAMEWORK_DIR/plugins/pi-read-tweet"
|
||||
"$FRAMEWORK_DIR/plugins/pi-automaton-context"
|
||||
"$FRAMEWORK_DIR/plugins/pi-automaton-tools"
|
||||
)
|
||||
if command -v pi &>/dev/null; then
|
||||
INSTALLED=$(pi list 2>/dev/null | grep -c "automaton-guard-pi" || true)
|
||||
if [ "$INSTALLED" -gt 0 ]; then
|
||||
echo "Pi Dev: already installed"
|
||||
else
|
||||
echo "Pi Dev: installing guard extension..."
|
||||
pi install "$PI_SOURCE" 2>&1 | sed 's/^/ /'
|
||||
INSTALLED_PI=true
|
||||
echo "Pi Dev: installed"
|
||||
fi
|
||||
INSTALLED_PI=true
|
||||
for ext in "${PI_EXTENSIONS[@]}"; do
|
||||
ext_name=$(basename "$ext")
|
||||
FOUND=$(pi list 2>/dev/null | grep -c "$ext_name" || true)
|
||||
if [ "$FOUND" -gt 0 ]; then
|
||||
echo "Pi Dev: $ext_name already installed"
|
||||
else
|
||||
echo "Pi Dev: installing $ext_name..."
|
||||
pi install "$ext" 2>&1 | sed 's/^/ /'
|
||||
echo "Pi Dev: $ext_name installed"
|
||||
fi
|
||||
done
|
||||
# Offer pi-automaton startup wrapper
|
||||
PI_WRAPPER="$FRAMEWORK_DIR/scripts/pi-automaton.sh"
|
||||
if [ -f "$PI_WRAPPER" ]; then
|
||||
@@ -102,7 +110,7 @@ fi
|
||||
if ! $INSTALLED_OPENCODE && ! $INSTALLED_PI; then
|
||||
echo "No harness detected. To install a guard manually:"
|
||||
echo " OpenCode: add '\"plugin\": [\"$OPENCODE_SOURCE\"]' to ~/.config/opencode/opencode.json"
|
||||
echo " Pi Dev: pi install $PI_SOURCE"
|
||||
echo " Pi Dev: pi install $FRAMEWORK_DIR/plugins/automaton-guard-pi"
|
||||
echo ""
|
||||
echo "Without a pre-edit guard, git hooks (pre-commit + pre-push)"
|
||||
echo "provide enforcement at commit/push time instead."
|
||||
|
||||
Reference in New Issue
Block a user