Skip to content

cli/sdk: burn search <query> over FTS5 content #406

@willwashburn

Description

@willwashburn

Parent: #240
Split out from: #248 (see scope-update comment carried over from #259)

Context

burn search <query> was added to the CLI scope in the #259-driven scope update on #248 but never landed. Neither the SDK verb nor the CLI presenter exists today:

  • No search / search_* symbol in crates/relayburn-sdk/src/lib.rs.
  • No Search variant in crates/relayburn-cli/src/cli.rs::Command.

Scope

SDK (relayburn-sdk)

  • New verb (e.g. relayburn_sdk::search) backed by an FTS5 virtual table over the content.sqlite body store.
  • Inputs: query string, optional session_id, optional limit, optional snippet flag.
  • Output: ranked hits with session id, turn id, and (when snippet) a highlighted excerpt.

CLI (relayburn-cli)

  • New burn search <query> [--session <id>] [--limit N] [--snippet] subcommand.
  • Thin presenter over the SDK verb. Honors --json for machine output and the global --ledger-path override.

Acceptance

  • FTS5 virtual table is created/migrated as part of the content.sqlite schema (and rebuilt by burn state rebuild --content-only).
  • relayburn_sdk::search returns ranked hits against the cli-golden fixture ledger.
  • burn search <query> golden-output test passes (human + --json modes).
  • --snippet returns highlighted excerpts; --limit caps result count; --session <id> scopes to one session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions