Skip to content

feat: ?format= output option + output guidance#37

Merged
0xeb merged 1 commit into
mainfrom
feat/output-format-and-guidance
Jun 23, 2026
Merged

feat: ?format= output option + output guidance#37
0xeb merged 1 commit into
mainfrom
feat/output-format-and-guidance

Conversation

@0xeb

@0xeb 0xeb commented Jun 23, 2026

Copy link
Copy Markdown
Member

Ports two cross-tool improvements from bnsql (all three tools share libxsql).

Feature: ?format=text|csv|tsv on /query

Pins libxsql v1.0.7, which adds format= in the shared thinclient http_query_server. idasql delegates to the thinclient, so no handler logic change — JSON stays default; text/csv/tsv are for terminal/pipe use. /help + README updated.

Also corrects the stale Response Format in /help and the agent guide — they showed a flat {columns,rows} shape and a wrong statements key; fixed to the real {results:[...]} envelope.

Guidance

prompts/idasql_agent.md gains an Output guidance section: Selection (decide display by intent), Fidelity (show the real artifact, not a paraphrase), Mechanics (consume the JSON envelope; don't pipe through python/jq to pre-render a table). Mirrors the bnsql guide fix; cross-tool lessons in bnsql-insights.md.

Build note

xsql (v1.0.7) and idasql_cli (contains the edited http_server.cpp + thinclient) build and link cleanly. format= behavior verified live against the identical shared thinclient via ghidrasql. The idasql_plugin target has a pre-existing, unrelated bookmarks_t SDK-compat error (in ida_compat.hpp, untouched here).

- Pin libxsql v1.0.7 (brings ?format=text|csv|tsv on /query via the shared
  thinclient; JSON stays default). idasql delegates to the thinclient, so no
  handler logic change.
- Fix stale /help + agent-guide Response Format (flat {columns,rows} and a
  wrong 'statements' key) to the real {results:[...]} envelope; document format=.
- Add output guidance to the agent guide: Selection (decide display by intent),
  Fidelity (show real artifacts), Mechanics (consume the JSON envelope, don't
  pipe through python/jq to reformat).
@0xeb
0xeb merged commit bad516b into main Jun 23, 2026
0 of 6 checks passed
@0xeb
0xeb deleted the feat/output-format-and-guidance branch June 23, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant