@rubytech/create-maxy-code 0.1.161 → 0.1.163
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 +1 -1
- package/payload/platform/plugins/admin/hooks/__tests__/per-turn-graph-pass-gate.test.sh +29 -3
- package/payload/platform/plugins/admin/hooks/per-turn-graph-pass-gate.sh +11 -6
- package/payload/platform/plugins/whatsapp/PLUGIN.md +1 -1
- package/payload/platform/plugins/whatsapp/references/channels-whatsapp.md +3 -4
package/package.json
CHANGED
|
@@ -288,7 +288,7 @@ ENV_DISPATCH=$(envelope_for "$OP_ID" "$TR_DISPATCH")
|
|
|
288
288
|
run_hook "admin" "" "$ENV_DISPATCH"
|
|
289
289
|
[[ "$HOOK_RC" -eq 0 ]] || fail "case-7 expected rc=0, got $HOOK_RC"
|
|
290
290
|
[[ -z "$HOOK_STDERR" ]] || fail "case-7 stderr must be empty on release"
|
|
291
|
-
if ingest_lines | grep -qE "^gate-released sessionId=${OP_ID} via=dispatch
|
|
291
|
+
if ingest_lines | grep -qE "^gate-released sessionId=${OP_ID} via=dispatch( |$)"; then
|
|
292
292
|
pass "case-7 Task(database-operator) after latest user → gate-released via=dispatch"
|
|
293
293
|
else
|
|
294
294
|
fail "case-7 expected gate-released via=dispatch, got: $(ingest_lines)"
|
|
@@ -308,7 +308,7 @@ ENV_SKIP=$(envelope_for "$OP_ID" "$TR_SKIP")
|
|
|
308
308
|
run_hook "admin" "" "$ENV_SKIP"
|
|
309
309
|
[[ "$HOOK_RC" -eq 0 ]] || fail "case-8 expected rc=0, got $HOOK_RC"
|
|
310
310
|
[[ -z "$HOOK_STDERR" ]] || fail "case-8 stderr must be empty on release"
|
|
311
|
-
if ingest_lines | grep -qE "^gate-released sessionId=${OP_ID} via=skip-sentinel$"; then
|
|
311
|
+
if ingest_lines | grep -qE "^gate-released sessionId=${OP_ID} via=skip-sentinel tool=mcp__admin__pre-turn-graph-pass-skip$"; then
|
|
312
312
|
pass "case-8 skip-sentinel after latest user → gate-released via=skip-sentinel"
|
|
313
313
|
else
|
|
314
314
|
fail "case-8 expected gate-released via=skip-sentinel, got: $(ingest_lines)"
|
|
@@ -349,12 +349,38 @@ ENV_REENTRY=$(envelope_for "$OP_ID" "$TR_REENTRY")
|
|
|
349
349
|
: > "$REQ_LOG"
|
|
350
350
|
run_hook "admin" "" "$ENV_REENTRY"
|
|
351
351
|
[[ "$HOOK_RC" -eq 0 ]] || fail "case-10 expected rc=0, got $HOOK_RC"
|
|
352
|
-
if ingest_lines | grep -qE "^gate-released sessionId=${OP_ID} via=dispatch
|
|
352
|
+
if ingest_lines | grep -qE "^gate-released sessionId=${OP_ID} via=dispatch( |$)"; then
|
|
353
353
|
pass "case-10 second Stop after dispatch still releases (no loop)"
|
|
354
354
|
else
|
|
355
355
|
fail "case-10 expected gate-released via=dispatch, got: $(ingest_lines)"
|
|
356
356
|
fi
|
|
357
357
|
|
|
358
|
+
# ---------------------------------------------------------------------------
|
|
359
|
+
# Case 11: namespace alias — admin called the skip MCP tool via the Claude
|
|
360
|
+
# Code plugin-system namespace (`mcp__plugin_admin_admin__…`) instead of the
|
|
361
|
+
# bare `mcp__admin__…`. Both forms must release the gate. Regression guard
|
|
362
|
+
# for the Task 440 namespace-match bug observed in session
|
|
363
|
+
# 2cfe467c-743d-4386-ac04-3eec8c89d8c9, where the agent looped on Stop
|
|
364
|
+
# because the gate's literal `mcp__admin__pre-turn-graph-pass-skip` pattern
|
|
365
|
+
# did not fullmatch the plugin-prefixed `tool_use.name` actually written
|
|
366
|
+
# to JSONL.
|
|
367
|
+
# ---------------------------------------------------------------------------
|
|
368
|
+
TR_NS=$(mktemp); TMPFILES+=("$TR_NS")
|
|
369
|
+
write_transcript "$TR_NS" \
|
|
370
|
+
"user|thanks|" \
|
|
371
|
+
"assistant|noted|tool_use:mcp__plugin_admin_admin__pre-turn-graph-pass-skip" \
|
|
372
|
+
"assistant|you're welcome|"
|
|
373
|
+
ENV_NS=$(envelope_for "$OP_ID" "$TR_NS")
|
|
374
|
+
: > "$REQ_LOG"
|
|
375
|
+
run_hook "admin" "" "$ENV_NS"
|
|
376
|
+
[[ "$HOOK_RC" -eq 0 ]] || fail "case-11 expected rc=0, got $HOOK_RC"
|
|
377
|
+
[[ -z "$HOOK_STDERR" ]] || fail "case-11 stderr must be empty on release"
|
|
378
|
+
if ingest_lines | grep -qE "^gate-released sessionId=${OP_ID} via=skip-sentinel tool=mcp__plugin_admin_admin__pre-turn-graph-pass-skip$"; then
|
|
379
|
+
pass "case-11 plugin-namespaced skip-sentinel → gate-released via=skip-sentinel"
|
|
380
|
+
else
|
|
381
|
+
fail "case-11 expected gate-released via=skip-sentinel under plugin namespace, got: $(ingest_lines)"
|
|
382
|
+
fi
|
|
383
|
+
|
|
358
384
|
# ---------------------------------------------------------------------------
|
|
359
385
|
echo
|
|
360
386
|
echo "per-turn-graph-pass-gate tests: $PASS passed, $FAIL failed"
|
|
@@ -58,10 +58,15 @@ agp_parse_stdin
|
|
|
58
58
|
agp_guard_role_specialist
|
|
59
59
|
agp_guard_transcript require-stdin
|
|
60
60
|
|
|
61
|
-
# Release alternation:
|
|
62
|
-
#
|
|
63
|
-
#
|
|
64
|
-
|
|
61
|
+
# Release alternation: any MCP-prefixed skip-sentinel name (the admin MCP
|
|
62
|
+
# server can surface as either `mcp__admin__…` when wired via .mcp.json or
|
|
63
|
+
# `mcp__plugin_admin_admin__…` when loaded via the Claude Code plugin
|
|
64
|
+
# system — both forms appear in JSONL `tool_use.name` and both release the
|
|
65
|
+
# gate), or a Task tool_use with `input.subagent_type=database-operator`
|
|
66
|
+
# (matched as the synthetic name `Task:database-operator` by the helper).
|
|
67
|
+
# Same defect class Task 417 fixed for the session-end retrospective gate,
|
|
68
|
+
# generalised here to cover the plugin-system namespace.
|
|
69
|
+
RELEASE_PATTERN='mcp__[a-z_]+__pre-turn-graph-pass-skip|Task:database-operator'
|
|
65
70
|
|
|
66
71
|
INSPECTION=$(agp_scan_post_user_toolnames "$RELEASE_PATTERN")
|
|
67
72
|
USER_PRESENT="${INSPECTION%% *}"
|
|
@@ -80,14 +85,14 @@ if [ -n "$MATCHED_NAME" ]; then
|
|
|
80
85
|
Task:database-operator)
|
|
81
86
|
VIA="dispatch"
|
|
82
87
|
;;
|
|
83
|
-
|
|
88
|
+
mcp__*__pre-turn-graph-pass-skip)
|
|
84
89
|
VIA="skip-sentinel"
|
|
85
90
|
;;
|
|
86
91
|
*)
|
|
87
92
|
VIA="unknown"
|
|
88
93
|
;;
|
|
89
94
|
esac
|
|
90
|
-
agp_emit_log "gate-released sessionId=${SESSION_ID} via=${VIA}"
|
|
95
|
+
agp_emit_log "gate-released sessionId=${SESSION_ID} via=${VIA} tool=${MATCHED_NAME}"
|
|
91
96
|
exit 0
|
|
92
97
|
fi
|
|
93
98
|
|
|
@@ -66,7 +66,7 @@ Activate when the user asks about WhatsApp — connecting, linking, checking sta
|
|
|
66
66
|
- Group messaging with mention gating and per-group activation
|
|
67
67
|
- DM policy enforcement (open, allowlist, disabled)
|
|
68
68
|
- Conversation browsing — list active conversations, read message history, inspect group metadata
|
|
69
|
-
- Inbound voice note transcription (OGG Opus → text via local whisper.cpp
|
|
69
|
+
- Inbound voice note transcription (OGG Opus → text via local whisper.cpp)
|
|
70
70
|
- Outbound voice note normalization (OGG Opus via ffmpeg)
|
|
71
71
|
- Auto-reconnection with exponential backoff
|
|
72
72
|
- Business hours gating — public messages gated by `OpeningHoursSpecification` from Neo4j, with optional after-hours auto-reply via the `afterHoursMessage` config field
|
|
@@ -149,13 +149,12 @@ Inbound voice notes are transcribed to text before reaching the agent. The pipel
|
|
|
149
149
|
|
|
150
150
|
1. **ffmpeg** converts OGG Opus → WAV (16 kHz, mono, PCM s16le)
|
|
151
151
|
2. **whisper.cpp** (`/opt/whisper.cpp/build/bin/whisper-cli` with `ggml-base` model) transcribes WAV → raw text
|
|
152
|
-
3. **Haiku** refines the raw transcript — removes disfluencies, fixes grammar. Short transcripts (< 5 words) pass through without an API call
|
|
153
152
|
|
|
154
|
-
The
|
|
153
|
+
The raw whisper transcript is set on `extracted.text` so both agent paths receive identical content. On any failure, the pipeline degrades silently — the agent sees the standard media placeholder instead of transcribed text.
|
|
155
154
|
|
|
156
|
-
**Source:** `platform/ui/app/lib/stt/index.ts` (transcription)
|
|
155
|
+
**Source:** `platform/ui/app/lib/stt/index.ts` (transcription)
|
|
157
156
|
|
|
158
|
-
**Log
|
|
157
|
+
**Log tag:** `[stt]`
|
|
159
158
|
|
|
160
159
|
### Outbound (PTT)
|
|
161
160
|
|