Repository navigation
feat: screened transfer in flow schema v3 - #57
Merged
Merged
Conversation
Version 3 adds optional whisper and timeout_secs to transfer. A reader that ignored whisper would hand the call over blind, so it is a new version rather than an additive field. assistant moves to version 4.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds flow schema v3 with a screened transfer, and lets v3 outbound flows hand the call to a person.
What changes
schema/flow.v3.schema.json):transfergains optionalwhisper(a prompt) andtimeout_secs(5–120). A transfer with awhisperis a screened transfer: the engine calls the target first, plays the whisper, and connects only when they accept; otherwise the step takes itsno_answerexit. Withoutwhisperit is the same blind transfer as before.no_answerand is not terminal;timeout_secswithoutwhisper→timeout_without_whisper; out-of-range timeout →transfer_timeout_out_of_rangewhisper/timeout_secsin a v1/v2 document →field_requires_newer_schema(old readers would silently blind-transfer)outbound_kinds(version): v3 outbound flows may useringand a screenedtransfer; a plain blindtransferis refused on outbound (outbound_blind_transfer);ring/screened-transferno_answercount as silent exits for the unbounded-loop ruleOUTBOUND_KINDSis unchanged (the v2 list)FlowEffects::screened_transfer(target, whisper, timeout) -> ScreenOutcome { Connected, NoAnswer, Failed }, with a default impl returningFailed, so existing implementors keep compiling and fall through tono_answer. New trace detailStepDetail::Screened { target, outcome }.DEFAULT_SCREEN_TIMEOUT_SECS = 25.conformance/v3/(valid, invalid, outbound) plus one newv2/invalid/v2-whisper-refusedcase and a canonical case. No existing v1/v2 case or schema file was edited.assistantmoves to v4.Compatibility
isTerminalin the TS package now takes a node (terminal-ness depends onwhisper); it isn't exported from the barrel.Checks
cargo test --workspace, clippy-D warnings,fmt --check: passpnpm --filter @wavekat/flow-schema test(237) andtypecheck: pass; codegen drift cleancargo package -p wavekat-flow: passes (all three schema copies included)After merge, the release PR publishes
wavekat-flowand@wavekat/flow-schema.