claude-connector ask: no-tools completion CLI #2
Loading…
Reference in a new issue
No description provided.
Delete branch "eureka-substrate/notool-ask-cli"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds
claude-connector ask: a subcommand of the existing binary (no new crate, no new target; one dependency line,rand_core, already in the lockfile) that gets a no-tools completion throughConnectorClient. Prompt on stdin, answer on stdout.Usage:
claude-connector ask --caller-id ID --connection-key-file FILE --model MODEL (--system TEXT | --system-file FILE) [--endpoint HOST:PORT] [--effort low|medium|high|max] [--max-output-tokens N] [--timeout-secs N] < prompt > answerProviderRequest::new(empty tools).load_admissionsreads it; zeroized; never echoed. Errors never carry key, prompt, instructions or the provider's failure message (only its kind).ask.rs(the repo holds no config default for it).Tests (
crates/claude-connector/tests/ask.rs, real serve loop on loopback with a scripted backend, plus the binary): success text; fresh request ids; no-tools request; model outside allowed_models refused; output cap refused; wrong key / wrong caller; bad key files (missing, directory, empty, too long, binary, padded) without echo; empty answer; empty stdin before any connection; provider failure names kind only; timeout; dead endpoint; binary success and one-line stderr failure, tools/cwd flags rejected. A unit test inask.rsruns the real backend planner: it accepts the asked request and refuses it once a tool is forced in.Note:
backend::tests::the_meter_call_reads_the_week_from_a_real_captured_eventfails on main today (fixture reset time 2026-11-09 has passed); unrelated and untouched.🤖 Generated with Claude Code