247-cli 2.31.3 → 2.31.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ const program = new Command();
|
|
|
15
15
|
program
|
|
16
16
|
.name('247')
|
|
17
17
|
.description('247 - Access Claude Code from anywhere 24/7\nby The Vibe Company')
|
|
18
|
-
.version('2.31.
|
|
18
|
+
.version('2.31.4')
|
|
19
19
|
.option('-P, --profile <name>', 'Use a specific profile (dev, prod, etc.)');
|
|
20
20
|
// Add commands
|
|
21
21
|
program.addCommand(initCommand);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# 247 Hook Script for Claude Code
|
|
3
|
+
# VERSION: 2.31.2
|
|
4
|
+
# Ultra simple: hook called = needs_attention
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
AGENT_URL="http://${AGENT_247_HOST:-localhost}:${AGENT_247_PORT:-4678}/api/hooks/status"
|
|
8
|
+
cat > /dev/null # Consume stdin (Claude's event JSON, not needed)
|
|
9
|
+
|
|
10
|
+
# Use CLAUDE_TMUX_SESSION env var (set by 247 when starting session)
|
|
11
|
+
SESSION_ID="${CLAUDE_TMUX_SESSION:-}"
|
|
12
|
+
[ -z "$SESSION_ID" ] && exit 0
|
|
13
|
+
|
|
14
|
+
# Simple: hook called = needs_attention
|
|
15
|
+
curl -s -X POST "$AGENT_URL" \
|
|
16
|
+
-H "Content-Type: application/json" \
|
|
17
|
+
-d "$(jq -n --arg sid "$SESSION_ID" '{sessionId:$sid,status:"needs_attention",source:"hook",timestamp:(now*1000|floor)}')" \
|
|
18
|
+
--connect-timeout 2 --max-time 5 > /dev/null 2>&1 || true
|
|
19
|
+
|
|
20
|
+
echo "[247-hook] $SESSION_ID needs attention" >&2
|