Jeden/Docs

CLI command

jeden sessions search

Search durable session event payloads for a case-insensitive text fragment.

Exact invocation#

Shell
jeden sessions search "query" [limit] [--json]

Inputs and options#

  • Required: a non-empty query after search.
  • Optional: a whole number of sessions to scan, newest first, after the query.

Output and state effect#

Scans newest session directories first and reports, for each scanned session whose events hold the query, the newest such event: session id, timestamp, event type, and whitespace-collapsed event JSON — tab-separated lines, or a JSON array of {session, ts, type, snippet} with --json. It does not mutate sessions.

Refusals and boundaries#

  • The functionality is jeden.session.list (tests/sessions/listing/list.mjs). Before the store is read, each exit 2: query-missing (sessions search requires a non-empty query, and the command line holds nothing after search or a blank query), limit-invalid (sessions search takes a whole number of sessions to scan after the query) and argument-unexpected (a word after the limit).
  • root-unlistable (cannot list sessions in PATH), exit 1. A session the search scans and cannot read refuses it with that session's own cause of jeden.session.find or jeden.session.ledger.read and the line context: searching the sessions under ROOT: the session PATH could not be read ….
  • A command line of the wrong form (an unknown command or option, a missing, unexpected or invalid argument, a missing confirmation) prints the error and the usage and exits 2; a refusal that retrying unchanged can help (a dependency down or not answering, a rate limit) exits 69; any other refusal or failure exits 1. A refusal a functionality declares ends with fix: … and cause: <operation>.<cause>, and jeden errors show <operation> lists every cause of that functionality.