wogiflow 2.22.3 → 2.22.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/lib/wogi-claude +24 -13
- package/package.json +1 -1
package/lib/wogi-claude
CHANGED
|
@@ -21,12 +21,16 @@
|
|
|
21
21
|
# WOGI_MAX_RESTARTS — safety cap, default 50 (prevents runaway restart storms)
|
|
22
22
|
# WOGI_WRAPPER_PID — exported to child; hook checks this to confirm wrapper is present
|
|
23
23
|
# WOGI_CLAUDE_BIN — override path to claude binary (default: found via PATH)
|
|
24
|
-
#
|
|
25
|
-
# "Loading development
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
24
|
+
# WOGI_USE_EXPECT — (EXPERIMENTAL, v2.22.4+) set to 1 to opt IN to the
|
|
25
|
+
# expect-based auto-dismiss of the "Loading development
|
|
26
|
+
# channels" dialog. OFF BY DEFAULT because Ink's
|
|
27
|
+
# ANSI-rich output can cause expect's text match to
|
|
28
|
+
# miss, which deadlocks the dialog (user keystrokes
|
|
29
|
+
# get held by expect, not forwarded to claude). If
|
|
30
|
+
# you can confirm it works for your terminal, opt in
|
|
31
|
+
# and enjoy zero-click restarts.
|
|
32
|
+
# WOGI_NO_EXPECT — legacy opt-out from 2.22.3. Still honored (forces
|
|
33
|
+
# expect off regardless of WOGI_USE_EXPECT).
|
|
30
34
|
# WOGI_EXPECT_TIMEOUT — override the expect timeout (default 30s) for watching
|
|
31
35
|
# the dialog. After timeout we hand off to the user
|
|
32
36
|
# unconditionally.
|
|
@@ -37,14 +41,21 @@ set -u
|
|
|
37
41
|
WOGI_CLAUDE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
38
42
|
WOGI_EXPECT_SCRIPT="$WOGI_CLAUDE_DIR/wogi-claude-expect.exp"
|
|
39
43
|
|
|
40
|
-
# Detect whether to use the expect wrapper.
|
|
41
|
-
#
|
|
42
|
-
#
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
#
|
|
44
|
+
# Detect whether to use the expect wrapper (v2.22.4: OPT-IN only).
|
|
45
|
+
# Four conditions must all hold:
|
|
46
|
+
# 1. WOGI_USE_EXPECT=1 is explicitly set (opt-in)
|
|
47
|
+
# 2. WOGI_NO_EXPECT is NOT set (legacy escape hatch still honored)
|
|
48
|
+
# 3. `expect` is on PATH and the wogi-claude-expect.exp script exists
|
|
49
|
+
# 4. The args include --dangerously-load-development-channels (the only
|
|
50
|
+
# flag that triggers the dialog we want to auto-dismiss)
|
|
51
|
+
#
|
|
52
|
+
# 2.22.3 tried opt-out by default; in practice, expect's text match can miss
|
|
53
|
+
# Ink's ANSI-fragmented output, which deadlocks the dialog (user keystrokes
|
|
54
|
+
# get held in expect's buffer instead of reaching claude). 2.22.4 flips to
|
|
55
|
+
# opt-in so the default UX is predictable.
|
|
46
56
|
__wogi_use_expect=0
|
|
47
|
-
if [
|
|
57
|
+
if [ "${WOGI_USE_EXPECT:-}" = "1" ] && [ -z "${WOGI_NO_EXPECT:-}" ] && \
|
|
58
|
+
command -v expect >/dev/null 2>&1 && [ -x "$WOGI_EXPECT_SCRIPT" ]; then
|
|
48
59
|
for arg in "$@"; do
|
|
49
60
|
if [ "$arg" = "--dangerously-load-development-channels" ]; then
|
|
50
61
|
__wogi_use_expect=1
|