patchcord 0.5.84 → 0.5.86
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
|
@@ -7,6 +7,6 @@ type: flow
|
|
|
7
7
|
```mermaid
|
|
8
8
|
flowchart TD
|
|
9
9
|
A([BEGIN]) --> B[Call the inbox MCP tool. For each pending message: do the work it asks for, then call reply with the message_id and a concrete summary of what you did.]
|
|
10
|
-
B --> C[
|
|
10
|
+
B --> C[Call the Shell tool with these exact parameters to re-arm the listener: command='patchcord subscribe --kimi 5', run_in_background=true, timeout=86400, description='Patchcord listener'.]
|
|
11
11
|
C --> D([END])
|
|
12
12
|
```
|
|
@@ -6,6 +6,6 @@ type: flow
|
|
|
6
6
|
|
|
7
7
|
```mermaid
|
|
8
8
|
flowchart TD
|
|
9
|
-
A([BEGIN]) --> B[
|
|
9
|
+
A([BEGIN]) --> B[Call the Shell tool with these exact parameters: command='patchcord subscribe --kimi 5', run_in_background=true, timeout=86400, description='Patchcord listener'. Then tell the user in one sentence: Patchcord listener active.]
|
|
10
10
|
B --> C([END])
|
|
11
11
|
```
|
|
@@ -10,6 +10,6 @@ flowchart TD
|
|
|
10
10
|
B --> C{Message arrived?}
|
|
11
11
|
C -->|Yes| D[Do the work the message asks for, then call reply with the message_id and a concrete summary.]
|
|
12
12
|
C -->|No| E([END])
|
|
13
|
-
D --> F[
|
|
13
|
+
D --> F[Call the Shell tool with these exact parameters to re-arm the listener: command='patchcord subscribe --kimi 5', run_in_background=true, timeout=86400, description='Patchcord listener'.]
|
|
14
14
|
F --> E
|
|
15
15
|
```
|
|
@@ -90,7 +90,7 @@ if [ -f "$PIDFILE" ]; then
|
|
|
90
90
|
done
|
|
91
91
|
rm -f "$PIDFILE" 2>/dev/null || true
|
|
92
92
|
else
|
|
93
|
-
echo "Patchcord listener
|
|
93
|
+
echo "Patchcord listener active."
|
|
94
94
|
exit 0
|
|
95
95
|
fi
|
|
96
96
|
else
|
|
@@ -123,11 +123,12 @@ while true; do
|
|
|
123
123
|
if [ "$COUNT" -gt 0 ] 2>/dev/null; then
|
|
124
124
|
# Write notification file so the agent sees context on wake
|
|
125
125
|
echo "PATCHCORD: ${COUNT} message(s) waiting" > "$NOTIFY_FILE"
|
|
126
|
-
|
|
127
|
-
#
|
|
128
|
-
#
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
# Kimi auto-triggers a new agent turn when ANY background task reaches a
|
|
127
|
+
# terminal state — exit code doesn't matter. Use exit 0 so Kimi shows
|
|
128
|
+
# "completed" (not "failed"), and emit the wake-up text to stdout so it
|
|
129
|
+
# appears in the agent's task output preview.
|
|
130
|
+
printf '%s\n' "📬 Patchcord: ${COUNT} pending message(s). Call inbox(), reply to each, then re-arm by running 'patchcord subscribe --kimi 5' as a background Shell task (run_in_background=true, timeout=86400)."
|
|
131
|
+
exit 0
|
|
131
132
|
fi
|
|
132
133
|
|
|
133
134
|
sleep "$INTERVAL"
|