/** * Flow utility functions * * `shouldExitFlow` mirrors `@diegoaltoworks/chatter/flows`' word-bounded * cancellation check rather than importing it: chatter is an optional peer, * and this check runs synchronously on every in-flow message, before any * peer-loading path (see ./engine.ts and src/peer-deps.test.ts). The keywords * themselves come from the phrase files, so a caller can leave a flow in the * language they are speaking, and a host can extend the list without forking. */ /** * Check if the user wants to exit the current flow, in the language they are * speaking. Falls back to the default language's keywords when none is known. * * Matching is whole-word: "quite good" and "nonstop" do not trigger on * "quit"/"stop". A keyword standing as its own word anywhere in the message * does trigger, including inside a longer phrase - "bus stop" ends the flow. * That is the deliberate trade: a mid-flow caller saying a bare cancellation * word means it, and stranding them in a flow is the worse failure. */ export declare function shouldExitFlow(message: string, language?: string, languageDir?: string): boolean; /** * Get exit message for a specific language. * @deprecated Removed in 1.0.0. Use `getFlowPhrase(language, "cancelled", languageDir)`. */ export declare function getExitMessage(language: string, languageDir?: string): string;