openclaw-opencode-bridge 2.0.7 → 2.0.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-opencode-bridge",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "Bridge OpenClaw messaging channels to OpenCode via tmux persistent sessions",
5
5
  "main": "./lib/onboard.js",
6
6
  "bin": {
@@ -1,5 +1,5 @@
1
1
  #!/bin/bash
2
- # bridge-version: 2
2
+ # bridge-version: 3
3
3
  # Start fresh session and send instruction
4
4
  MSG="$1"
5
5
  OPENCODE="{{OPENCODE_BIN}}"
@@ -15,6 +15,8 @@ fi
15
15
  cd "$WORKSPACE"
16
16
  FULL_MSG="[${CHANNEL}:${TARGET}] $MSG"
17
17
 
18
- "$OPENCODE" run --fork "$FULL_MSG" 2>&1 &
18
+ OUTPUT=$("$OPENCODE" run --fork "$FULL_MSG" 2>&1)
19
19
 
20
- echo "✅ New session started. Reply will arrive shortly."
20
+ openclaw message send --channel "$CHANNEL" --target "$TARGET" -m "$OUTPUT"
21
+
22
+ echo "✅ OpenCode response sent."
@@ -1,6 +1,6 @@
1
1
  #!/bin/bash
2
- # bridge-version: 2
3
- # Send instruction to OpenCode (non-interactive mode)
2
+ # bridge-version: 3
3
+ # Send instruction to OpenCode and relay response to telegram
4
4
  MSG="$1"
5
5
  OPENCODE="{{OPENCODE_BIN}}"
6
6
  CHANNEL="{{CHANNEL}}"
@@ -15,6 +15,8 @@ fi
15
15
  cd "$WORKSPACE"
16
16
  FULL_MSG="[${CHANNEL}:${TARGET}] $MSG"
17
17
 
18
- "$OPENCODE" run --continue "$FULL_MSG" 2>&1 &
18
+ OUTPUT=$("$OPENCODE" run --continue "$FULL_MSG" 2>&1)
19
19
 
20
- echo "✅ Delivered to OpenCode. Reply will arrive shortly."
20
+ openclaw message send --channel "$CHANNEL" --target "$TARGET" -m "$OUTPUT"
21
+
22
+ echo "✅ OpenCode response sent."