Add GLSM listener telemetry and stale-listen recovery

This commit is contained in:
Jacob Dubin
2026-05-07 06:24:30 -05:00
parent 69707f32a7
commit 3e50fb9a49
9 changed files with 385 additions and 105 deletions

View File

@@ -88,6 +88,11 @@ Current websocket scope:
- active local prompt preservation so `shared/yes_no`, clock, gallery, and settings prompts can still consume transcript-bearing short replies even when the stock skill reports a local context
- binary audio ignored for an existing transID until a fresh `LISTEN` has been seen, preventing context-only or post-speech tails from reopening an endless buffered turn
- blank-audio hotphrase turns clear pending listen state and install a short late-audio ignore window
- first GLSM-aligned listener telemetry and recovery slice is now in source:
- derived phase labels (`HJ_LISTENING`, `LISTENING`, `WAIT_LISTEN_FINISHED`, `DISPATCH_DIALOG`, `PROCESS_LISTENER_QUEUE`)
- `glsm_phase_transition` turn diagnostics
- websocket turn events with `glsmPhase` snapshots
- stale pending-listen recovery for long-open no-context/no-audio listens before processing a new hotphrase listen
- unknown inbound websocket types dropped silently instead of echoing stock-OS-unknown OpenJibo events
- file telemetry and fixture export for HTTP, websocket, and turn captures
@@ -145,6 +150,7 @@ Use these sources as evidence, not as code to copy blindly:
- User-provided original source snapshot: `..\jibo` when extracted locally
- Original Pegasus cloud source inside that snapshot: `pegasus`
- Original SDK and skill source inside that snapshot: `sdk`
- Legacy listener flow reference diagram: `..\jibo\sdk\packages\skills-service-manager\resources\state-diagrams\glsm.png`
- JiboOS reference tree: `..\JiboOS`
- JiboOS skill snapshot: `..\JiboOS\opt\jibo\Jibo\Skills\@be`

View File

@@ -301,6 +301,20 @@ Current release theme:
- Follow-up:
- live smoke should confirm `cloud version` speaks `1.0.18`, carries `match.skipSurprises = true`, does not stop itself on the word `Jibo`, and settles without a generic `I heard...` reply or a local surprise handoff
### GLSM Listener Flow Capture And Recovery
- Status: `implemented`
- Tags: `protocol`, `docs`
- Result:
- the legacy listener state machine source (`sdk ... glsm.png`) is now captured in current planning docs
- runtime now emits GLSM-aligned phase snapshots (`HJ_LISTENING`, `LISTENING`, `WAIT_LISTEN_FINISHED`, `DISPATCH_DIALOG`, `PROCESS_LISTENER_QUEUE`)
- turn diagnostics now include `glsm_phase_transition` for phase changes
- websocket telemetry now records `glsmPhase` on binary/context/turn events
- stale pending-listen recovery is now in source so a long-open no-context/no-audio listen can be cleared when the next hotphrase listen arrives
- Follow-up:
- live-capture proof is still required against the recurring blue-ring/stuck-listening sequence
- deeper GLSM parity (`Interrupt Listeners`, launch/global parse branches) should be tackled after this first capture slice is validated on-device
### End-Of-Skill Surprise Suppression
- Status: `implemented`

View File

@@ -119,7 +119,7 @@ Reference:
## Next Queued Task (`2026-05-06`)
Queued next `1.0.19` implementation task:
Queued next `1.0.19` implementation task (now started):
- dialog parsing expansion and ambiguity guardrails
@@ -129,6 +129,12 @@ Execution focus:
- reduce trigger-only captures that drop the rest of the utterance
- preserve command-vs-question personality split and local skill payload compatibility
- add focused tests for new phrase families and ambiguity boundaries
- keep listener-state observability aligned with the legacy GLSM flow while phrase guardrails are added
First completed guardrail slice under this queue:
- GLSM listener flow capture + telemetry mapping
- stale pending-listen recovery path for long-open no-context/no-audio listens
## Next Slices

View File

@@ -16,6 +16,7 @@ As-of date: `2026-05-06`
- Legacy system architecture: `C:\Projects\jibo\pegasus\resources\system_diagram.png`
- Legacy generic skill scaffold: `C:\Projects\jibo\pegasus\packages\template-skill\docs\TemplateSkill.png`
- Legacy listener state machine: `C:\Projects\jibo\sdk\packages\skills-service-manager\resources\state-diagrams\glsm.png`
## Template Skill Verdict
@@ -45,6 +46,30 @@ Conclusion: do not treat template-skill flow as a port target. Treat it as a sha
| `Proactivity Catalog` | in-code candidate lists/weights | explicit catalog service with tuned weights and operator controls |
| `Audio Logs` | file telemetry sinks in infrastructure telemetry | hosted indexed capture/retention for multi-operator analysis |
## GLSM Listener Flow Alignment (`2026-05-06`)
Captured source:
- `C:\Projects\jibo\sdk\packages\skills-service-manager\resources\state-diagrams\glsm.png`
First OpenJibo support slice (implemented):
- explicit derived listener phases are now emitted in cloud diagnostics:
- `HJ_LISTENING`
- `LISTENING`
- `WAIT_LISTEN_FINISHED`
- `DISPATCH_DIALOG`
- `PROCESS_LISTENER_QUEUE`
- turn telemetry now records `glsm_phase_transition` with previous/next state and trigger
- websocket telemetry now includes `glsmPhase` on binary, context, and turn-processed events
- stale pending-listen recovery is now implemented:
- when a pending `LISTEN` stays open long enough with no context/audio, a new hotphrase listen can recover the stuck state before continuing
Current parity boundary:
- this slice focuses on listener lifecycle observability plus stuck-listen recovery
- deeper explicit parity states from GLSM (`Interrupt Listeners`, `Handle Launch Parse`, `Handle Global Parse`, `Dispatch Dialog` sub-branches) are next candidates once this capture-driven slice is validated live
## Where We Were
Legacy cloud design was service-oriented around: