add IBM Bob agent adapter#102
Conversation
Add support for IBM Bob Shell CLI as a new coding agent: - Add bob agent definition in detect.ts with IBM vendor info - Add bob case in buildArgv() to use --output-format stream-json - Add bob parsing logic in parseLineWithState() to handle text/content/message fields - Add prompt echo suppression in invoke.ts to avoid duplicating system prompts - Update README.md and README.zh-CN.md agent tables and badge counts (8 → 9 CLIs) Bob is invoked via stdin with stream-json output format, similar to other agents. The adapter reuses the existing JSON-line parser infrastructure.
nettee
left a comment
There was a problem hiding this comment.
I found one blocking issue in the new Bob adapter. The inline comment has the concrete fix; the rest of the changed ranges looked consistent with the existing agent wiring.
🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.| case "bob": | ||
| // Bob's `-p`/`--prompt` flag expects an argument; we stream the prompt via | ||
| // stdin, so omit `-p` and just request stream-json output. | ||
| return ["--output-format", "stream-json"]; |
There was a problem hiding this comment.
IBM's Bob Shell docs say non-interactive output includes both the final answer and intermediary thinking by default, and they expose --hide-intermediary-output specifically to limit stdout to the final completion output. This adapter only adds --output-format stream-json, while the new Bob parser below forwards every top-level text / content / message string into the preview. In practice that means Bob's reasoning and tool chatter can be appended straight into the generated HTML or markdown, which breaks the user-visible document instead of just adding metadata. Please either add --hide-intermediary-output here or tighten the Bob parser to emit only final assistant content, and add a regression test in next/src/lib/agents/__tests__/argv.test.ts that covers a "thinking + final answer" Bob stream.
Add --hide-intermediary-output flag to Bob adapter to suppress thinking and reasoning output, preventing intermediary text from polluting the final HTML/markdown document. Changes: - Add --hide-intermediary-output to buildArgv() for bob agent - Add regression tests in argv.test.ts covering Bob stream-json parsing - Update README.md and README.zh-CN.md with correct invocation This addresses the review feedback from nettee about blocking issue where Bob's reasoning could be appended into generated artifacts.
|
Thanks for the review! I've addressed the feedback: ✅ Added The flag ensures that only the final completion output is sent to stdout, preventing Bob's intermediary thinking from polluting the generated HTML/markdown artifacts. All tests pass locally ( Ready for re-review! |
nettee
left a comment
There was a problem hiding this comment.
@fredkwok-it I rechecked the Bob follow-up commit against the changed ranges. The adapter now hides intermediary output, the supported-agent/docs updates are consistent, and the Bob parser coverage added here matches the current adapter shape. Nice follow-through on the review feedback.
🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.
Summary
Add support for IBM Bob Shell CLI as a new coding agent adapter.
Changes
next/src/lib/agents/detect.ts: Add bob agent definition with IBM vendor info and fallback modelsnext/src/lib/agents/argv.ts:buildArgv()to use--output-format stream-jsonparseLineWithState()to handle text/content/message fieldsnext/src/lib/agents/invoke.ts: Add prompt echo suppression to avoid duplicating system prompts in outputREADME.md: Update agent count badge (8 → 9 CLIs) and add IBM Bob to supported agents tableREADME.zh-CN.md: Update Chinese README with same changesTesting
/opt/homebrew/bin/bob--output-format stream-jsonflagImplementation Details
Bob is invoked via stdin with
stream-jsonoutput format, similar to other agents. The adapter reuses the existing JSON-line parser infrastructure and handles three common output fields:text,content, andmessage.The implementation includes a workaround in
invoke.tsto suppress prompt echo that bob may send back as the first streamed delta, preventing system prompt pollution in user-facing output.Checklist
detect.tsbuildArgv()parseLineWithState()References