@conversation-flow-sdk/transport-console
v0.1.0
Published
Console (readline) transport for @conversation-flow-sdk/core.
Downloads
120
Readme
@conversation-flow-sdk/transport-console
Readline-based console transport for conversation-flow-sdk. Use it for CLI apps and dev loops.
pnpm add @conversation-flow-sdk/core @conversation-flow-sdk/transport-consoleUsage
import { createConsoleTransport } from '@conversation-flow-sdk/transport-console';
const transport = createConsoleTransport({
prompt: 'You: ', // shown after each assistant message
assistantLabel: 'AI: ', // prefix on assistant messages
});API
createConsoleTransport(options?: {
prompt?: string; // default: 'You: '
assistantLabel?: string; // default: 'Assistant: '
input?: Readable; // default: process.stdin
output?: Writable; // default: process.stdout
}): FlowTransportThe input/output options exist primarily for unit testing (use node:stream's PassThrough). In normal use the defaults are correct.
end() is idempotent and stops accepting input.
