Documentation
¶
Overview ¶
Package stubworker implements the ADR 0003 worker protocol with no models attached. It backs cmd/voice-stub-worker and the protocol tests: TTS returns a few tiny silent PCM chunks, ASR returns a canned transcript, and both honor load state, delays, cancellation, and crash injection.
Index ¶
Constants ¶
const CrashText = "__stub_crash__"
CrashText makes a speak/transcribe request crash the stub process, so supervisor crash handling can be exercised deliberately.
Variables ¶
var ErrCrashRequested = errors.New("stub worker crash requested")
ErrCrashRequested is returned by Run when a request asked the stub to crash; the command wrapper converts it to a nonzero exit.
Functions ¶
Types ¶
type Options ¶
type Options struct {
Role protocol.Role
Provider string
ProviderVersion string
StartLoaded bool
// AdvertiseProtocolVersion overrides the protocol version reported at
// hello (0 means the real one) so core-side mismatch rejection can be
// tested against a live process.
AdvertiseProtocolVersion int
}
Options configure one stub worker session.