AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.
Rust agent-memoryai-agentsbm25claude-codeclicode-searchcursordatabaseelasticsearchfull-text-searchhybrid-searchjsonllocal-firstmcpmcp-servermodel-context-protocolragrustsearch-enginevector-search
Add an explicit archived Codex session import alongside Claude Code
xerj-org13742f731f1a
diff --cc CHANGELOG.mdindex e23026de6,c74113faf..1a0045c9a--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -9,146 -9,14 +9,151 @@@ and this project adheres to [Semantic V### Added-- `xerj sessions import --format codex` prepares one explicitly selected Codex- rollout JSONL using the same native PII redactor and no-clobber publication- as the Claude Code adapter. It exports user/assistant response text with- source locations, archive event IDs and explicit message phases; duplicate- events, system/developer messages, reasoning and tool payloads are skipped. Unsupported- shapes and external history references refuse publication. This extends- #1793 without automatic discovery or inferred file/commit associations. See- [the format contract](tools/session-import/README.md#codex-rollout-adapter).++- Offline `xerj sessions import --format codex` exports a documented subset++ of one archived Codex rollout through the existing text redactor. It skips++ tools and reasoning, retains physical source locations and archive event++ identities, and refuses unsupported formats without publishing output.+++- Corpus Hub manifest `paths` entries may name regular files as well as+ directories (#2486). A file selection checks out that file without its+ siblings; symlinks and submodules are refused.++- MCP `xerj_status` reports node reachability, cluster health and visible+ indices before a search. It distinguishes a missing autoindex catalog from+ other indexed data and preserves failed or malformed probes as errors+ rather than reporting a successful empty node (#2515).++- Empty autoindex maps now explain that managed corpus slugs and autoindex+ dataset/index names belong to separate discovery surfaces. CLI diagnostics,+ MCP empty responses and the `xerj_map` description point to corpus discovery+ without claiming a corpus exists. Missing catalogs remain errors; auth+ refusals and successful dataset maps retain their behavior (#2412).++- Public Agent Skills Discovery v0.2.0 index and a documentation-routing skill+ at `/.well-known/agent-skills/`. The index is generated from the published+ skill's metadata and exact-byte SHA-256, with a CI drift check.++### Fixed++- Corpus cloning validates existing checkouts and serializes writers (#2453).+ New checkouts are staged before publication. Ambiguous existing directories+ are preserved for recovery rather than deleted or reset automatically.++- MCP `xerj_search` advertises plain text in `query` and structured clauses+ in `query_dsl`. Legacy object-valued `query` and omitted-query browsing+ remain supported; conflicting fields fail before HTTP requests (#2549).+- Search payloads and batch retrieval default to 8,000 UAX #29 words when+ `max_tokens` is absent or null (#2491). This is not a byte or model-token+ cap. Explicit larger budgets remain available; errors and mandatory+ search staleness hints stay outside the payload budget.+- GitHub field-report submission uses the supported explicit-repository+ `gh repo fork --clone=false` invocation and adds the fork remote itself+ (#2596). The rollback test now verifies that the report was committed+ before a failed push, rather than passing after an earlier fork failure.+- Local admin-key discovery reports the source of the selected key and warns+ when its directory is outside the working tree (#2578). Packaged installs+ have their own provenance, and MCP guidance names `XERJ_AUTH`. Discovery+ priority and explicit credential overrides are unchanged.++- `xerj autoindex` fails a run when one dataset index holds no documents+ although the journal says records were written to it, even when the other+ datasets are live (#2407, defect 2). The check summed live documents over+ every dataset, so a populated `-json` index let a re-run print `ok: indexed+ and searchable` over an empty `-docs` index. The error names each empty+ index and its contributing files; record totals are reported only when+ those files target that dataset alone. Unknown sibling counts do not hide+ independently confirmed missing data.+- SQL source extraction no longer slices statement heads inside a UTF-8+ character, so unrecognized CJK statement/comment heads do not panic (#2547).+- Short Markdown files with YAML frontmatter retain their prose body even+ when bullets or `Key: value` lines also parse as YAML (#2447). Existing+ frontmatter-title behavior and structured CSV/JSON body detection remain.+- Empty files keep separate inventory identities instead of being reported+ as content duplicates of unrelated paths (#2449). Non-empty byte-identical+ files still deduplicate.+- A search with both `query` and a top-level `knn` returns `size` hits, not+ `k` (#2561). The page was widened to `k`, so `size: 5, k: 20` returned+ 20 hits. `k` still sets how many nearest neighbours join the candidate+ set, and `from`/`size` page through the union, as in Elasticsearch.+- Index deletion no longer waits for unrelated index statistics while+ resolving its selectors. Index listings and health checks also release+ their index-map locks before awaiting statistics, so a stalled schema+ update does not hold those locks against DELETE (part of #2405; extracted+ from #2489). Merge/flush cancellation and the process memory cap remain+ separate follow-ups.+- `xerj autoindex` compresses per-file phase-B stages with zstd level 1 and+ uses temporary files cleaned up by the operating system when the client+ exits (#2493, part of #2427). It finishes buffered compression before+ deleting previous records, so a stage finalization error preserves the old+ records and an ordinary resume can complete the replacement. Compression+ savings depend on the data; this does not impose a disk or server-memory cap.+- `autoindex` bulk back-pressure patience is now measured since the last+ progress, not since the first round. A window the server drains a few+ records at a time (per-item 429 `resource_exhausted` on an embedding+ deadline or admission refusal) used to abort with `bulk backend failed`+ once the rounds together passed the 600 s `THROTTLE_PATIENCE`, even though+ every round settled records. Each round that settles at least one item now+ restarts the patience clock and the backoff; rounds that settle nothing+ still count, so a server that answers 429 forever fails at the same limits+ as before.+- `xerj autoindex` titles a prose file that opens with YAML frontmatter from+ its `title:` key, or from the first line after the closing `---` when there+ is none (#2556). Every such file (Jekyll, Hugo, Obsidian) used to be titled+ `---`, its opening fence. A leading `---` block that is not parseable+ frontmatter (unclosed, not a YAML mapping, over 64 KiB) takes the first line+ that is not a bare `---`; the body, the frontmatter text in it and+ `start_line` are unchanged. An unchanged file is not re-extracted, so re-index+ with `xerj autoindex --fresh` to retitle documents already in an index.++## [1.0.0-rc.100] - 2026-10-26++**rc.100: faster autoindex and search, shaped by your field reports.** This+release is about speed. Background merges skip the zstd-19 stored encode, so+indexing under a memory cap runs at full speed again (#2441). Cold searches+read stored fields about 6x faster and decode only the hits and fields they+return (#2443, #2434, #2454, #2465). Search keeps its own share of the memory+budget while merges run (#2484, #2485), autoindex plans large folders in+bounded memory with fewer, larger datasets (#2417, #2430), and a+`semantic_text` test segment shrinks from 20.1 MB to 1.8 MB on disk+(#2471). A local performance harness adds autoindex and search budgets and an+Elasticsearch floor (#2432); release-workflow integration remains open in+#2433. Thank you to everyone+who filed a field report: they shaped this release. The memory-ceiling work+continues in #2427 and #1122, which stay open.++### Upgrade notes++- **Stored `semantic_text` vectors** (PR+ [#2471](https://github.com/xerj-org/xerj/pull/2471)). Segments written by+ this build no longer store the vectors the built-in lexical embedder+ derives for a `semantic_text` field (`<target>` and `<target>_chunks`) in+ the stored `_source`; readers rebuild them from the text. Older segments+ open unchanged and lose their stored copy when a merge rewrites them.+ There is no format-marker change, so an older binary still opens the+ index, but it reads those rows without vectors: `_source` lacks them and+ semantic and kNN recall on them drops until the index is reindexed.+ Before downgrading, restart this build with+ `XERJ_STORE_SEMANTIC_VECTORS=1` and run `POST /{index}/_forcemerge?max_num_segments=1`+ on each index with a `semantic_text` field: with the variable set, flushes+ store full vectors and a merge writes them back for rows stored without+ them. Vectors from neural, ONNX or proxy embedders, and vectors supplied+ by the caller, were always kept and are not affected.++- #2422: an existing autoindex keeps the datasets it already has. Later+ runs on the same folder use the new rules only for new files. To get the+ smaller set of indices, index the folder again with a new `--prefix` and a+ new `--state-dir`, check it, then delete the old indices with+ `xerj autoindex remove --prefix <old>`. `--fresh` does not do this for a+ `--no-graph` run that has already committed: it refuses, as before (PR #2430).++### Added++- `scripts/bench/neural-bulk-ab.sh CONTROL_SHA CANDIDATE_SHA [N]` is an+ interleaved A/B harness for neural-embedding `_bulk` ingest. It builds each+ SHA in a worktree, runs the real `xerj autoindex` client against a frozen+ Okta corpus on a CPU-capped throwaway node, and reports median, p95 and the+ control arm's spread per metric. It measures the harness only; no+ performance claim is made. See `benchmarks/ingest-neural-bulk/README.md`.- `xerj sessions import --format claude-code --input FILE --output NEW.jsonl`prepares an explicit Claude Code JSONL transcript for ordinary `autoindex`.diff --cc engine/crates/xerj-autoindex/src/sessions.rsindex 8767a7963,0c0fccb74..8b101a1ea--- a/engine/crates/xerj-autoindex/src/sessions.rs+++ b/engine/crates/xerj-autoindex/src/sessions.rs@@@ -16,12 -16,12 +16,13 @@@ const MAX_RECORDS: usize = 100_000pub const HELP: &str = "xerj sessions import — offline session preparation for autoindex- USAGE: xerj sessions import --format claude-code --input FILE --output NEW.jsonl+ USAGE: xerj sessions import --format <claude-code|codex> --input FILE --output NEW.jsonl- Read one explicit Claude Code JSONL transcript; write user/assistant text+ Read one explicit Claude Code transcript or Codex rollout JSONL; write user/assistant textrecords through the existing native PII redactor before any output is stored.--Preserve session/message UUIDs, parent UUIDs, source filename/line/byte offset,--branch metadata and file paths explicitly named by Read/Write/Edit/MultiEdit.++Keep format-specific identity and source filename/line/byte offset metadata.++Claude Code preserves session/message/parent UUIDs and file paths explicitly++named by Read/Write/Edit/MultiEdit; Codex uses the archive event IDs below.Skip tool results, tool inputs except file paths, thinking and metadata.This exports all text-bearing branches in file order, not an active conversationchain. Unsupported/malformed turns or repeated message UUIDs refuse the export.