- New App/Voice/{VoiceOrchestratorAdapter,VoiceTTSAdapter,VoiceBusEmitterAdapter,RejectReasonCopy}.swift
replaces NullOrchestratorAdapter / NullTTSAdapter / NullBusEmitterAdapter (D-09).
- VoiceOrchestratorAdapter forwards submit/cancelAndSubmit to AgentOrchestrator,
appends user-side text to TurnTranscriptStore (BLOCKER-1), enqueues a HUDBanner
on every SubmitOutcome.rejected case via shared RejectReasonCopy (D-10).
- VoiceTTSAdapter wraps an optional TTSEngineActor (engine construction lands
in a follow-on plan; nil-engine path no-ops gracefully).
- VoiceBusEmitterAdapter wraps an OutboundBatcher whose sink is the WebviewBridge
so audio-level RMS reaches the HUD's RingMesh pulse.
- AppDelegate.installVoice now uses the production adapters; install order
in applicationWillFinishLaunching reordered to vision -> agent -> voice
with voiceInstallTask awaiting agentInstallTask?.value (WARNING-5).
- New broadcaster .voice subscriber in installAgent: per-turn assistantText
accumulator + turnSourceWasVoice filter so text-originated turns NEVER drive
emitTurnEnded on the voice adapter (BLOCKER-2).
- SubmitOutcome.superseded extended with newTurnId so cancelAndSubmit callers
can append user text under the new turn id (BLOCKER-1 user-side closure on
the cancel path).
- VoiceSubscriberTextTurnFilterTests proves text turns never trigger
emitTurnEnded; VoiceOrchestratorAdapterTests covers RejectReasonCopy +
banner id mapping + VoiceBusEmitterAdapter forwarding.
- New scripts/check-install-order.sh + scripts/check-no-null-voice-adapters.sh
catch regressions structurally.
39 lines
1.3 KiB
Bash
Executable File
39 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Phase 9 / Plan 4 / D-09: NullVoiceAdapters.swift is DELETED and all three
|
|
# Null* adapter declarations have been replaced with real production adapters
|
|
# under App/Voice/{VoiceOrchestratorAdapter,VoiceTTSAdapter,VoiceBusEmitterAdapter}.swift.
|
|
#
|
|
# This script is a structural drift catcher — if a future change resurrects
|
|
# any of the Null adapter types in production code, the build fails before
|
|
# the binary is signed.
|
|
set -euo pipefail
|
|
|
|
ROOT="${1:-$(pwd)}"
|
|
|
|
if [ -f "$ROOT/App/Voice/NullVoiceAdapters.swift" ]; then
|
|
echo "FAIL: App/Voice/NullVoiceAdapters.swift still exists (Plan 9-04 deletes it)"
|
|
exit 1
|
|
fi
|
|
|
|
# Look for production references to the Null* adapter types. Excludes test
|
|
# scaffolding and comment-only lines (the production adapter files reference
|
|
# the Null types in their doc-comment migration history; those are allowed).
|
|
remaining=$(grep -rn --include="*.swift" \
|
|
-E "Null(Orchestrator|TTS|BusEmitter)Adapter" \
|
|
"$ROOT/packages" "$ROOT/App" 2>/dev/null \
|
|
| grep -v "/Tests/" \
|
|
| grep -v "/.build/" \
|
|
| grep -vE ':[[:space:]]*//' \
|
|
| grep -vE ':[[:space:]]*\*' \
|
|
| grep -vE 'replaces[[:space:]]+`?Null' \
|
|
|| true)
|
|
|
|
if [ -n "$remaining" ]; then
|
|
echo "FAIL: NullVoiceAdapter references remain in production:"
|
|
echo "$remaining"
|
|
exit 1
|
|
fi
|
|
|
|
echo "PASS: NullVoiceAdapters fully replaced"
|
|
exit 0
|