diff --git a/README.md b/README.md index e9f4e98e..37518ec4 100644 --- a/README.md +++ b/README.md @@ -623,6 +623,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later Gestalt Mobile is distributed under the GNU Affero General Public License version 3 or, at your option, any later version. See [LICENSE](LICENSE). -Use `--xerj manual` (default, retrieval only), `--xerj auto` (opt-in indexing), or `--xerj off`. +Source discovery defaults to `--xerj auto` (index and watch). Use `--xerj manual` +for retrieval only or `--xerj off` to disable the integration. See [root-wide XERJ discovery](docs/xerj.md) for background indexing, exclusions, status, recovery and the retrieval/write-permission boundary. diff --git a/docs/xerj.md b/docs/xerj.md index b3613a52..a7927be9 100644 --- a/docs/xerj.md +++ b/docs/xerj.md @@ -6,13 +6,16 @@ XERJ is optional. Install it with `gestalt xerj install`, then start Mobile: gestalt mobile -- --cwd /path/to/source-root ``` -`manual` is the default when launched through Mobile's CLI. It starts or discovers +`auto` is the default when launched through Mobile's CLI. It indexes and watches +the source root in the background without blocking startup. + +Use `--xerj manual` for retrieval only. It starts or discovers the retrieval backend but does not scan source files, create an ignore file, or start a watcher. Existing indexes remain available and unchanged; an empty index provides no source results until explicitly populated. New files, edits and deletions are not reflected until an operator runs indexing. -`--xerj auto` explicitly opts into background indexing and watching, including the +Automatic indexing and watching include the rc.87 incremental-addition limitation described below. `--xerj off` disables Mobile's XERJ integration. An absent XERJ does not prevent startup. These use Mobile's existing CLI configuration, not a separate service configuration file. The manager must be on diff --git a/src/server/cli.ts b/src/server/cli.ts index 18f5ce80..ae01058c 100644 --- a/src/server/cli.ts +++ b/src/server/cli.ts @@ -37,7 +37,7 @@ Options: --disable-passkey-auth Disable passkey access control (unsafe on shared or network hosts) --data-dir Directory for persistent application data --icon SVG or PNG used as the installed PWA application icon - --xerj Source discovery: manual (default, no indexing), auto, off + --xerj Source discovery: auto (default, index and watch), manual, off --skills Use a global skill profile for every session --skills list List saved global skill profiles without starting the server --help Show this help diff --git a/src/server/config.test.ts b/src/server/config.test.ts index 7b621c4e..6ce2dfc5 100644 --- a/src/server/config.test.ts +++ b/src/server/config.test.ts @@ -32,7 +32,7 @@ describe('parseConfig', () => { }, root: resolve('/caller'), dataDir: undefined, - xerj: 'manual', + xerj: 'auto', }); }); @@ -66,7 +66,7 @@ describe('parseConfig', () => { }, root: resolve('/caller/work'), dataDir: './state', - xerj: 'manual', + xerj: 'auto', iconPath: resolve('/caller/subdirectory/brand.png'), }); }); diff --git a/src/server/config.ts b/src/server/config.ts index 506ff624..a0db4910 100644 --- a/src/server/config.ts +++ b/src/server/config.ts @@ -67,7 +67,7 @@ export function parseConfig(args: string[], cwd = process.cwd()): RelayConfig { index += 1; } - const xerj = values.get('--xerj') ?? 'manual'; + const xerj = values.get('--xerj') ?? 'auto'; if (xerj !== 'auto' && xerj !== 'manual' && xerj !== 'off') throw new CliUsageError('--xerj must be auto, manual, or off');