Commit 1f859a3
authored
feat(scripted_tool): help builtin for runtime schema introspection (#529)
## Summary
- Add `HelpBuiltin` providing runtime tool schema introspection inside
ScriptedTool scripts
- `help --list` — list all tool names + descriptions
- `help <tool>` — human-readable usage with flags
- `help <tool> --json` — machine-readable JSON schema (pipeable to jq)
- Add `ScriptedToolBuilder::compact_prompt(bool)` — when enabled,
`system_prompt()` emits only names + one-liners and defers full schemas
to `help`
- 8 new tests covering all help modes, compact/full prompt, and jq
piping
## Test plan
- [x] `cargo test --lib scripted_tool` — all 40 tests pass
- [x] `cargo fmt --check` — clean
- [x] `cargo clippy --all-targets --all-features -- -D warnings` — clean
Closes #5191 parent 64d6c7d commit 1f859a3
File tree
3 files changed
+670
-6
lines changed- crates/bashkit/src/scripted_tool
- specs
3 files changed
+670
-6
lines changed
0 commit comments