Skip to content

armgit / xerj

Public Imported from GitHub
0

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.

Merge pull request #278 from xerj-org/feat/agent-progress-bar

xerj-org5c95969e2e57
diff --cc engine/crates/xerj-autoindex/src/cli.rs
index 2ee480f81,733836ba2..85196c78c
--- a/engine/crates/xerj-autoindex/src/cli.rs
+++ b/engine/crates/xerj-autoindex/src/cli.rs
@@@ -182,33 -164,36 +182,46 @@@ pub fn print_help()
(A run killed by a signal cannot print one either; a missing\n\
terminal line after the process is gone means it died, not that it\n\
finished.)\n\
- --progress plain emits `xerj-progress phase=… pct=… eta_s=…` lines;\n\
+ --progress plain writes TWO lines per tick, in one write:\n\
+ xerj-bar [######################--] 93.4% | index | 8082/8083 items | eta 7s\n\
+ xerj-progress phase=index basis=bytes pct=93.4 items=8082/8083 eta_s=7.2 …\n\
+ `xerj-bar` is the DISPLAY line — self-contained, meant to be shown\n\
+ to a person verbatim by whatever is relaying the run. It is spaced\n\
+ at most one per 15s, plus one per phase change and never two closer\n\
+ than 2s, so it does not flood a transcript. Short phases therefore\n\
+ draw fewer bars than transitions — read the machine line for those.\n\
+ `xerj-progress` is the MACHINE line and keeps\n\
+ the --progress-interval cadence; parse that one. --progress json\n\
+ stays one object per line and carries the same rendered string in\n\
+ a `bar` field.\n\
`pct`/`eta_s` are the literal word `unknown` (JSON null) whenever they\n\
- cannot be computed honestly, never a filler number.\n\
+ cannot be computed honestly, never a filler number — and the drawn\n\
+ bar obeys the same rule: `[????…]` when there is no denominator,\n\
+ and a full bar only at a real 100%.\n\
\n\
RESUME POLICY:\n\
- A durable plan supports no-op resume and same-path content replacement.\n\
- Files added after the plan was frozen are reported as skipped and are not\n\
- indexed; --fresh rebuilds the plan in place and picks them up.\n\
- Removing an indexed file is refused before any remote mutation: its\n\
- documents are already live and nothing here deletes them. Restore the file\n\
- and rerun, or rebuild — in place by deleting the published indices and the\n\
- state directory, or isolated under a new --state-dir, --prefix and --brain\n\
- (or --no-graph), validated before you switch readers.\n\
+ {resume_policy_help}.\n\
+ On a graph-enabled or pre-generation journal the durable plan supports no-op\n\
+ resume and same-path content replacement. Files added after that plan was frozen\n\
+ are reported as skipped and are not indexed; --fresh rebuilds the plan in place\n\
+ and picks them up. Removing an indexed file is refused there before any remote\n\
+ mutation: its documents are already live and nothing on that path deletes them.\n\
+ Restore the file and rerun, or rebuild — in place by deleting the published\n\
+ indices and the state directory, or isolated under a new --state-dir, --prefix\n\
+ and --brain (or --no-graph), validated before you switch readers.\n\
+ --fresh is not cleanup and is not destination reconciliation: it never removes\n\
+ stale records from the destination, and it is refused outright once a durable\n\
+ corpus generation exists (re-run without it — the generated path reconciles the\n\
+ change incrementally). For an independent rebuild use a new --state-dir and a\n\
+ new --prefix, plus a new --brain when graph is enabled (or --no-graph).\n\
+ Validate before switching readers; explicitly clean the shared\n\
+ autoindex-catalog and old target only after validation.\n\
\n\
EXIT CODES: 0 complete; 3 completed-with-junk (junk recorded, never fatal);\n\
- 2 usage; 1 endpoint/journal failure or a refused corpus removal\n",
- fresh_help = FRESH_HELP
+ 2 usage; 1 endpoint/journal failure, a refused corpus removal, or a\n\
+ refused unsafe state transition\n",
+ fresh_help = FRESH_HELP,
+ resume_policy_help = RESUME_POLICY_HELP
);
}