@osdlc/wayfinder 0.7.1 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -34,10 +34,11 @@ Node.js `^22.22.2 || ^24.15.0 || >=26.0.0`, the range of its dependency
34
34
 
35
35
  ## Running from a checkout
36
36
 
37
- An installed `way` follows the source you are working on, over
38
- [`@osdlc/cli-tool/devlink`](https://www.npmjs.com/package/@osdlc/cli-tool). Standing
39
- inside a wayfinder checkout runs that checkout; `way dev link` makes one the
40
- checkout every `way` on the machine runs; every link is remembered.
37
+ An installed `way` can run the source of a checkout instead, through
38
+ [`@osdlc/cli-tool/devlink`](https://www.npmjs.com/package/@osdlc/cli-tool).
39
+ `way dev link` makes one checkout the one every `way` on the machine runs, and
40
+ `WAY_HOME` names one for a shell. Every link is remembered. `way dev` is a
41
+ contributor tool, so `way --help` does not list it.
41
42
 
42
43
  ```sh
43
44
  way dev install # once: put shims for this checkout on PATH as way and wayfinder
@@ -48,12 +49,16 @@ way dev use canonical # … or to the install itself
48
49
  way dev status # which checkout runs now, and why
49
50
  ```
50
51
 
51
- First hit wins: `WAY_HOME`, a checkout above the cwd (`WAY_CWD_DEV=0` turns
52
- that off), the linked checkout, then the install. The shim says which entry
53
- it chose on stderr; `WAY_QUIET=1` silences it. State lives in
54
- `<config>/way/`: `~/Library/Application Support/way` on macOS,
55
- `${XDG_CONFIG_HOME:-~/.config}/way` elsewhere. A checkout runs from source, so
56
- it needs [Bun](https://bun.sh) on PATH and a `pnpm install` in the checkout.
52
+ The first match wins, in this order: `WAY_HOME`, the linked checkout, then the
53
+ install. `way` never picks a checkout from the cwd, so a repository you run it
54
+ in cannot choose the code that runs. A checkout must hold `src/cli.ts` and a
55
+ `package.json` named `@osdlc/wayfinder`; anything else is skipped. The shim
56
+ prints which one it chose on stderr, and `WAY_QUIET=1` silences it. State
57
+ is kept in `<config>/way/`, which is `~/Library/Application Support/way` on
58
+ macOS and `${XDG_CONFIG_HOME:-~/.config}/way` elsewhere. A checkout runs from
59
+ source, so it needs [Bun](https://bun.sh) on an absolute PATH entry and a
60
+ `pnpm install` in the checkout. A `bun` found only through a relative entry
61
+ such as `bin` or `.` is not used.
57
62
 
58
63
  ## Why
59
64
 
@@ -62,8 +67,8 @@ answers only for itself. `just --list` shows recipes. `moon query tasks` shows
62
67
  moon tasks. Neither helps when the question is "how do I start that app" and you
63
68
  do not yet know which tool owns it.
64
69
 
65
- `wayfinder` puts all of them in one searchable list, keyed by the call chain you would
66
- actually type, and — unlike anything a browser can do — lets you press Enter.
70
+ `wayfinder` puts all of them in one searchable list. Each row shows the command
71
+ you would type, and in the terminal UI, Enter runs it.
67
72
 
68
73
  ## Groups
69
74
 
@@ -96,24 +101,24 @@ tab next runner (all · just · node-scripts │ dependencies │ tools …)
96
101
  esc quit
97
102
  ```
98
103
 
99
- `^s` asks before it grants: the status line becomes `trust this repository?
100
- y/n`, and only `y` records anything. One keystroke is not a decision when the
101
- thing being decided is whether this repository's code may run.
104
+ `^s` asks first. The status line becomes `trust this repository? y/n`, and
105
+ only `y` records a grant. A single key press should not decide whether this
106
+ repository's code may run.
102
107
 
103
- A recipe that takes arguments collects them first. Enter on `just deploy <env>`
104
- turns the key line into a command line with the command already on it and the
105
- cursor after it — type `staging`, Enter runs
106
- `just deploy staging`, `esc` goes back. A task that takes nothing is unchanged:
107
- Enter still runs it, with nothing to dismiss.
108
+ A recipe that takes arguments asks for them first. Enter on
109
+ `just deploy <env>` turns the key line into a command line, with the command
110
+ already on it and the cursor after it. Type `staging` and press Enter to run
111
+ `just deploy staging`, or press `esc` to go back. A task with no arguments
112
+ runs as soon as you press Enter.
108
113
 
109
114
  Fuzzy by default. Terms are ANDed, so `photo dev` narrows to a photo app's dev
110
115
  server. A leading `'` forces one term to match exactly.
111
116
 
112
- The four keystrokes worth knowing: **`^t`, then the app's name, then Enter.**
117
+ To start an app: press `^t`, type the app's name, then press Enter.
113
118
 
114
- What Enter will run is always on screen above the key line, so it is never a
115
- surprise. Tasks are spawned from an argument vector, never through a shell, so a
116
- recipe with `<placeholders>` cannot be mangled into something else on the way.
119
+ The command Enter will run is always shown above the key line. Tasks are
120
+ spawned from an argument list, never through a shell, so a shell cannot
121
+ reinterpret a recipe that has `<placeholders>`.
117
122
 
118
123
  ## Searching from the shell
119
124
 
@@ -129,39 +134,42 @@ way query dev --json the matching tasks, rather than their command lines
129
134
  ```
130
135
 
131
136
  A leading `'` forces one term to match exactly, as it does in the UI. A search
132
- that matched nothing exits **1**, so `way query dev && …` is usable from a
133
- script; a bare `way query` searched for nothing, matches everything, and is
134
- `way --list`. Every collection flag applies — `-C`, `--only`, `--exclude`,
135
- `--cached` and the rest — and, like `--list` and `--json`, it re-probes unless
136
- you ask for the store.
137
+ that matches nothing exits 1, so `way query dev && …` works in a script. A bare
138
+ `way query` matches everything, the same as `way --list`. Every collection
139
+ flag applies (`-C`, `--only`, `--exclude`, `--cached` and the rest). Like
140
+ `--list` and `--json`, it re-probes unless you pass `--cached`.
141
+
142
+ `--list`, `query` and the terminal UI replace each control character and bidi
143
+ control in repository text with U+FFFD, so a task name cannot send escape
144
+ sequences to your terminal or read in a different order from what runs.
145
+ `--json` keeps the text exact, writing DEL, C1 and bidi controls as `\u`
146
+ escapes, so it is safe to print too.
137
147
 
138
148
  ## The web view
139
149
 
140
150
  `way --serve` opens a page with the same catalog: a collapsible tree by call
141
151
  chain, sticky group headers, fuzzy and exact search, and copy buttons.
142
152
 
143
- It is a server rather than a generated file on purpose. A file would be a
144
- snapshot — add a task and the page is quietly wrong. Here the server re-probes
145
- and the page refreshes on focus and on a slow poll, so what you are looking at
146
- is what the repository currently has.
153
+ It is a server, not a generated file, on purpose. A file goes out of date as
154
+ soon as you add a task. The server re-probes, and the page refreshes when it
155
+ gets focus and on a slow poll, so it shows what the repository has now.
147
156
 
148
- The very first request is answered from the [stored probe](#the-cache) with a
149
- real probe already running behind it, so the page appears at once on a
150
- repository whose slowest runner takes seconds; the rows update in place when
151
- the probe lands. Refresh is always a real probe.
157
+ The first request is answered from the [stored probe](#the-cache) while a real
158
+ probe runs in the background. So the page appears at once, even when the
159
+ slowest runner takes seconds. The rows update in place when the probe
160
+ finishes. Refresh always runs a real probe.
152
161
 
153
162
  ## Execution, and trust
154
163
 
155
164
  Some runners can only be read by running them. `moon query tasks` evaluates the
156
- repository's own toolchain configuration, and `mise tasks` can fire its
157
- `[hooks]`. Pointing a task browser at a repository you did not write is
158
- therefore code execution: you may choose to run nothing, and merely looking
159
- already ran that repository's code.
165
+ repository's own toolchain configuration, and `mise tasks` can run its
166
+ `[hooks]`. So opening a task browser on a repository you did not write runs
167
+ that repository's code, even if you run no task.
160
168
 
161
- `wayfinder` is willing in principle: its `allowExec` default is `true`, because you
162
- reach for a task browser standing in your own repository and one that cannot see
163
- the build graph is not much of a browser. But willingness is not the gate. Trust
164
- is, asked once and remembered per repository:
169
+ `wayfinder`'s `allowExec` default is `true`. You usually open a task browser in
170
+ your own repository, and one that cannot see the build graph is of little use.
171
+ But `allowExec` alone does not allow execution. The repository must also be
172
+ trusted. You grant trust once per repository, and it is remembered:
165
173
 
166
174
  ```text
167
175
  way trust trust the repository at the resolved root
@@ -172,15 +180,16 @@ way trust --json the same answer as one JSON object
172
180
  way trust --help this list
173
181
  ```
174
182
 
175
- Every one of these answers in the machine form too. `--json` gives one object
176
- per invocation — `{"root": …, "trusted": …, "changed": …, "by": …, "rule": …}`
177
- for the three root-scoped modes, so a caller never has to branch on the flag
178
- it just passed, and `{"trusted": [paths]}` for `--list`. `by` is
179
- `"marker" | "path" | "owner" | null` — which layer decided, see "The policy"
180
- below — and `rule` is the matching `trust.paths`/`trust.owners` entry, present
181
- only when `by` is `"path"` or `"owner"`. A `--untrust` that found nothing still
182
- prints its document and reports the miss through exit 1 and stderr, so a parser
183
- is never handed an empty stdout to interpret.
183
+ Each mode also has a JSON form, and `--json` prints one object per run. The
184
+ three modes that act on the root (the plain grant, `--untrust` and `--show`)
185
+ all print `{"root": …, "trusted": …, "changed": …, "by": …, "rule": …}`, so a
186
+ caller does not have to branch on the flag it passed. `--list` prints
187
+ `{"trusted": [paths]}`. `by` is `"marker" | "path" | "owner" | null` and names
188
+ the layer that decided (see [The policy](#the-policy) below). `rule` is the
189
+ matching `trust.paths` or `trust.owners` entry, present only when `by` is
190
+ `"path"` or `"owner"`. A `--untrust` that finds no marker to remove still
191
+ prints its object, and reports the miss with exit 1 and a line on stderr. So a
192
+ parser never gets an empty stdout.
184
193
 
185
194
  `-C` applies here too. Trust, with execution allowed, also lets the project
186
195
  file load tool modules; see
@@ -188,38 +197,46 @@ file load tool modules; see
188
197
 
189
198
  ### The policy
190
199
 
191
- A root can also be trusted with no marker at all, through a `trust` block in
192
- the USER layer of the config file (never the project layer — a repository
193
- cannot grant itself trust, same as `allowExec: true`):
200
+ A root can also be trusted without a marker, through a `trust` block in the
201
+ user config file. The project file cannot hold one: a repository cannot grant
202
+ itself trust, just as it cannot set `allowExec: true`.
194
203
 
195
204
  ```jsonc
196
205
  // ~/.config/wayfinder/config.json
197
206
  {
198
207
  "trust": {
199
208
  "paths": ["/home/me/work/**"], // @osdlc/trust-repo's glob dialect
200
- "owners": ["my-org"] // case-insensitive `origin` remote owners
209
+ "owners": ["my-org", "gitlab.com/other-org"] // `origin` remote owners; bare means github.com
201
210
  }
202
211
  }
203
212
  ```
204
213
 
205
- `@osdlc/trust-repo`'s `policyExecGate` decides trust in order — a marker in
206
- the store, then `trust.paths` (a glob over the resolved, symlink-free root),
207
- then `trust.owners` (the owner in the `origin` remote's URL, read from
208
- `.git/config` without running git). The precedence and the glob dialect are
209
- documented in `@osdlc/trust-repo`'s README. wayfinder adds no vocabulary of its
210
- own beyond expanding a leading `~` in a `trust.paths` entry against `$HOME`.
211
- An owner match trusts every repository whose remote names that owner, so list
212
- only owners whose repositories you would run. `way trust --show` reports which layer decided (`by`/`rule`);
213
- the plain grant still writes a marker on a policy-trusted root — a standing
214
- policy can change out from under a repository, and the marker is the more
215
- durable of the two — and `--untrust` says when the policy still covers the
216
- root after the marker is gone.
214
+ `@osdlc/trust-repo`'s `policyExecGate` checks, in order: a marker in the
215
+ store, then `trust.paths` (a glob over the root, with symlinks resolved), then
216
+ `trust.owners` (the host and owner in the `origin` remote's URL, which
217
+ wayfinder asks git for). An entry is `host/owner`, or a bare `owner`, which
218
+ means `github.com/owner`. Matching ignores case, and the host must match too:
219
+ `my-org` does not trust a clone from `gitlab.com/my-org`. `@osdlc/trust-repo`'s README documents the order and the glob
220
+ dialect. wayfinder adds only one thing: a leading `~` in a `trust.paths` entry
221
+ expands to `$HOME`. An owner match trusts every repository whose remote names
222
+ that owner, so list only owners whose repositories you would run.
223
+
224
+ Owner trust believes the repository's own git config. The `origin` URL comes
225
+ from the repository's `.git/config`, which arrives with the directory, so a
226
+ folder unpacked from an archive or copied from a shared drive can name any
227
+ owner. Owner trust fits clones you made yourself. `trust.paths` is the
228
+ stronger form: a repository cannot choose where it sits on your disk.
229
+
230
+ `way trust --show` reports which layer decided (`by` and `rule`). A plain
231
+ `way trust` still writes a marker on a root the policy already trusts, because
232
+ the policy can change later and the marker stays. `--untrust` tells you when
233
+ the policy still covers the root after the marker is removed.
217
234
 
218
235
  ### Removing what it has stored
219
236
 
220
- Three things live outside your repositories, and `clean` is how they go away.
221
- Bare `clean` reports them and removes nothing — a command whose subject is
222
- deleting should not delete by default.
237
+ wayfinder stores three things outside your repositories, and `way clean`
238
+ removes them. Bare `way clean` only reports them, so it deletes nothing by
239
+ default.
223
240
 
224
241
  ```text
225
242
  way clean show each store, where it is, and what it holds
@@ -230,46 +247,47 @@ way clean --all --yes all three
230
247
  way clean --json the same answer as one JSON object
231
248
  ```
232
249
 
233
- `--json` answers the same thing as one object: a `stores` array of
234
- `{key, flag, what, path, bytes, removed}`, all three on a bare report and only
235
- the ones you named on a removal. `bytes` is null when nothing was stored, which
236
- is what separates "there was nothing to remove" from "it would not delete" —
237
- both are `removed: false`. The closing note about trust being asked for again
238
- goes to stderr under `--json`, so stdout stays one parseable document.
239
-
240
- `--config` and `--all` want `--yes` because the three are not equally
241
- replaceable: the cache is derived and costs one slow probe, trust costs
242
- re-answering a question per repository, and the configuration is the only thing
243
- here you wrote by hand. Nothing inside a repository is ever touched — a
244
- project's own `wayfinder.config.json` belongs to that project.
245
-
246
- The store is a directory of marker files at `$XDG_STATE_HOME/wayfinder/trusted/`, or
247
- `~/.local/state/wayfinder/trusted/` when that variable is unset. XDG **state**, not
248
- config: trust is state a program maintains, not configuration a person
249
- hand-edits, and a consent record that travels in a dotfiles repo onto a new
250
- machine has stopped being consent. Grants made under the old waypost name, in
251
- `~/.local/state/waypost/trusted/`, still count.
252
-
253
- **A repository cannot trust itself.** `allowExec: true` in `wayfinder.config.json` is
254
- ignored with a warning, because that file lives inside the repository being
255
- scanned. The project layer may still lower `allowExec` to `false`. A
256
- project-layer `trust` block is rejected outright, the same way — trust has no
257
- "lower" state to honour from inside the repository.
258
-
259
- `--exec` is the escape hatch and records nothing — consent for one run, which is
260
- what a script or a CI job wants. `--no-exec` turns execution off however trusted
261
- the repository is. Both hold on every surface, the web view included: its
262
- `POST /api/trust` refuses with `409` whenever a grant would not apply, so
263
- `--no-exec` cannot be lifted from the page and `--exec` cannot be persisted by
264
- it. The page hides its button in those states, and the server refuses the
265
- request anyway — the session token says who is asking, never that asking made
266
- sense.
267
-
268
- When runners are withheld, every surface says so and offers the grant where it
269
- says it: `--list` and `--json` print one line on stderr, the terminal UI notes
270
- `N hidden — repo not trusted (^s to trust)` beside the counts, and the web view
271
- puts a **Trust this repository** button in each held-back runner's info panel
272
- and in the runner picker.
250
+ `--json` prints one object with a `stores` array of
251
+ `{key, flag, what, path, bytes, removed}`. A bare report lists every store. A
252
+ removal lists only the ones you named. `bytes` is null when nothing was stored.
253
+ That tells "nothing to remove" apart from "could not remove", since both have
254
+ `removed: false`. Under `--json`, the closing note that trust will be asked for
255
+ again goes to stderr, so stdout stays one JSON document.
256
+
257
+ `--config` and `--all` need `--yes` because the three stores are not equally
258
+ easy to replace. The cache is rebuilt by one slow probe. Losing trust means
259
+ answering the trust question again for each repository. The configuration is
260
+ the only one you wrote by hand. `clean` never touches anything inside a
261
+ repository: a project's own `wayfinder.config.json` belongs to that project.
262
+
263
+ The trust store is a directory of marker files at
264
+ `$XDG_STATE_HOME/wayfinder/trusted/`, or `~/.local/state/wayfinder/trusted/`
265
+ when that variable is unset. It is XDG state, not config. The program
266
+ maintains trust, and a person does not edit it by hand. A consent record
267
+ copied to a new machine in a dotfiles repository is no longer consent. Grants
268
+ made under the old waypost name, in `~/.local/state/waypost/trusted/`, still
269
+ count.
270
+
271
+ **A repository cannot trust itself.** `allowExec: true` in
272
+ `wayfinder.config.json` is ignored with a warning, because that file lives
273
+ inside the repository being scanned. The project file may still lower
274
+ `allowExec` to `false`. A `trust` block in the project file is ignored with a
275
+ warning too. Unlike `allowExec`, trust has no lower setting a repository could
276
+ choose.
277
+
278
+ `--exec` allows execution for one run and records nothing, which suits a
279
+ script or a CI job. `--no-exec` turns execution off, however trusted the
280
+ repository is. Both flags apply on every surface, including the web view. Its
281
+ `POST /api/trust` returns `409` whenever a grant would have no effect, so the
282
+ page cannot lift `--no-exec` or make an `--exec` run permanent. The page hides
283
+ its trust button in those states, and the server refuses the request anyway.
284
+ The session token proves who is asking, not that the request makes sense.
285
+
286
+ When runners are withheld, every surface says so and offers a way to grant
287
+ trust. `--list` and `--json` print one line on stderr. The terminal UI shows
288
+ `N hidden — repo not trusted (^s to trust)` beside the counts. The web view
289
+ shows a **Trust this repository** button in a bar above the list, in each
290
+ withheld runner's info panel and in the runner picker.
273
291
 
274
292
  ### What decides
275
293
 
@@ -283,26 +301,27 @@ and in the runner picker.
283
301
  | `true` | no | none | `false` | willing in principle, but this repository has not been trusted |
284
302
  | `true` | yes | none | `true` | the only combination that runs a subprocess |
285
303
 
286
- A decision is keyed on the absolute, symlink-resolved repository PATH, not on a
287
- hash of its contents — the same tradeoff mise makes. A repository you trusted
288
- that later pulls hostile changes stays trusted, and `way trust --untrust` is the
289
- only remedy. Content-hashing every runner config instead would re-prompt on
290
- ordinary edits, training people to approve without reading.
304
+ Trust is keyed on the repository's absolute path, with symlinks resolved, not
305
+ on a hash of its contents. mise makes the same tradeoff. A trusted repository
306
+ that later pulls hostile changes stays trusted, and `way trust --untrust` is
307
+ the only remedy. Hashing every runner config instead would ask again after
308
+ ordinary edits, and people would learn to approve without reading.
291
309
 
292
310
  ## The cache
293
311
 
294
- Some runners are slow to ask — moon starts its toolchain, sbt starts a JVM — and
295
- a browser that waits for them looks broken. `wayfinder` keeps the last answer per
296
- (root, runner) so the UI has something to paint at once.
312
+ Some runners are slow to ask (moon starts its toolchain, sbt starts a JVM),
313
+ and a browser that waits for them looks broken. `wayfinder` stores the last
314
+ answer for each root and runner, so the UI can show rows at once.
297
315
 
298
- **The two surfaces you look at always start from the store.** The terminal UI
299
- and `--serve` read it, paint, then probe behind you and update in place. **The
300
- two you pipe do not.** `--json` and `--list` re-probe every run, because a script
301
- or an agent reading them must get what the repository has right now; those runs
302
- also write the store, so the next UI start is instant. `--cached` inverts it for
316
+ The terminal UI and `--serve` always start from the store. They read it, show
317
+ the rows, then probe in the background and update in place. `--json` and
318
+ `--list` re-probe on every run, because a script or an agent reading them needs
319
+ what the repository has right now. Those runs also write the store, so the next
320
+ UI start is instant. `--cached` makes `--json` and `--list` read the store for
303
321
  one run.
304
322
 
305
- Three states, and each surface shows them the same way:
323
+ A stored answer is in one of three states, and every surface shows them the
324
+ same way:
306
325
 
307
326
  - **Fresh** — the stored answer still holds, and nothing is said.
308
327
  - **Stale** — the answer was used and is out of date. The terminal UI marks the
@@ -310,21 +329,21 @@ Three states, and each surface shows them the same way:
310
329
  (~149ms)` beside the counts, or `cached rows: just 35s old — ^r to re-probe`
311
330
  once the refresh is over and the rows are still the stored ones; the page
312
331
  shows `cached: just 35s old - re-probing`.
313
- - **Stale and slow to probe here** — the case the cache exists for, called out
314
- louder in red rather than in the same voice as a 200ms refresh:
332
+ - **Stale and slow to probe here** — the case the cache exists for. It is
333
+ shown in red, to set it apart from a 200ms refresh:
315
334
  `cached rows — moon (~2.4s) is slow to probe here, so this takes a moment`.
316
335
 
317
- Slowness is measured in THIS repository, from a rolling window of the last five
318
- probe durations reported as their median. A runner that is quick here is never
319
- called slow because it is slow somewhere else, and where a repository has no
320
- measurement yet the surface says so rather than inventing a number.
336
+ Slowness is measured in this repository: the median of the last five probe
337
+ durations. A runner that is quick here is never called slow because it is slow
338
+ elsewhere. When a repository has no measurement yet, the surface says so
339
+ instead of guessing a number.
321
340
 
322
- `^r` in the terminal UI and Refresh on the page are always real probes — the one
323
- action that guarantees accuracy never answers from the store.
341
+ `^r` in the terminal UI and Refresh on the page always run a real probe. They
342
+ never answer from the store.
324
343
 
325
- If a row you run turns out not to exist — a task renamed since the stored probe —
326
- both surfaces say where the row came from instead of leaving you with a bare
327
- spawn failure.
344
+ If you run a row whose task no longer exists, such as a task renamed since the
345
+ stored probe, both surfaces tell you the row came from the store, instead of
346
+ showing only a spawn failure.
328
347
 
329
348
  For the pipeable surfaces, `--cached` names the stale runners on stderr, so
330
349
  `--list` stays pipeable and `--json` stays parseable:
@@ -334,31 +353,37 @@ wayfinder: --cached: stale: just (35s old, refresh usually about 149ms)
334
353
  wayfinder: --cached: not cached, probed now: github-actions
335
354
  ```
336
355
 
337
- `--cached` against an empty store is not an error: it probes, stores the result,
338
- and says so. `--json --cached` gains a `cache` array beside the catalog, one
339
- entry per selected runner; over HTTP the page always receives it.
340
-
341
- The store is at `$XDG_CACHE_HOME/wayfinder/`, or `~/.cache/wayfinder/`. XDG **cache**,
342
- deliberately not the `~/.local/state/wayfinder/` [trust](#execution-and-trust) uses:
343
- losing this costs one slow probe, while losing the trust store would silently
344
- un-trust repositories. The cache is no part of the execution gate — a cached
345
- answer is never a trust grant, clearing the cache never changes what is trusted,
346
- and a runner withheld for want of trust is never stored at all. Invalidation is a
347
- content hash over the files a probe depended on, never an mtime; the
356
+ `--cached` with an empty store is not an error. It probes, stores the result,
357
+ and says so. `--json --cached` adds a `cache` array beside the catalog, with
358
+ one entry per selected runner. Over HTTP the page always receives this array.
359
+
360
+ The cache is at `$XDG_CACHE_HOME/wayfinder/`, or `~/.cache/wayfinder/`. It is
361
+ XDG cache, not the `~/.local/state/wayfinder/` directory that
362
+ [trust](#execution-and-trust) uses. Losing the cache costs one slow probe.
363
+ Losing the trust store would silently un-trust repositories. The cache plays no
364
+ part in deciding execution. A cached answer is never a trust grant, clearing
365
+ the cache never changes what is trusted, and a runner withheld for lack of
366
+ trust is never stored. A stored answer is invalidated by a content hash over
367
+ the files its probe read, never by mtime. The
348
368
  [`@osdlc/system-model` README](https://www.npmjs.com/package/@osdlc/system-model)
349
- sets out its limits.
369
+ describes the limits of this.
350
370
 
351
371
  ## Configuration
352
372
 
353
- The options you would otherwise retype on every invocation live in a file:
354
- which runners to skip, what order to show them in, whether execution is
355
- allowed, how files are discovered. Layers, lowest precedence first — built-in
356
- defaults, `$XDG_CONFIG_HOME/wayfinder/config.json` (or `~/.config/wayfinder/config.json`),
357
- `wayfinder.config.json` at the project root, then the flags on this command line.
373
+ Options you would otherwise type on every run can live in a file: which
374
+ runners to skip, what order to show them in, whether execution is allowed, and
375
+ how files are discovered. The layers, lowest precedence first: built-in
376
+ defaults, `$XDG_CONFIG_HOME/wayfinder/config.json` (or
377
+ `~/.config/wayfinder/config.json`), `wayfinder.config.json` at the project
378
+ root, then the flags on the command line.
358
379
 
359
380
  The keys are `runners.disabled`, `runners.order`, `allowExec`, `discovery`,
360
381
  `excludePaths`, `trust.paths`, `trust.owners` and `tools`. `WAYFINDER_CONFIG`
361
- names a different user file and changes nothing else.
382
+ names a different user file and changes nothing else. A relative
383
+ `WAYFINDER_CONFIG` is ignored with a warning: from the repository root it
384
+ would name a file in the repository. Use an absolute path or `~/`. A relative
385
+ `HOME` counts as unset, and the account's home is used. A relative `XDG_CONFIG_HOME`, `XDG_STATE_HOME` or `XDG_CACHE_HOME` is
386
+ ignored, as the XDG spec says.
362
387
 
363
388
  The tool was called waypost before its first release. `WAYPOST_CONFIG`,
364
389
  `~/.config/waypost/config.json` and `waypost.config.json` are still read when
@@ -375,28 +400,29 @@ way config --help this list
375
400
  ```
376
401
 
377
402
  `-C` applies here too, so `way config path -C /elsewhere` reports that
378
- directory's files rather than this one's. An exit code of 2 means the command
379
- as typed cannot run — an unknown key, a wrong-typed value — and 1 means it was
380
- well formed but failed against the state it found.
403
+ directory's files rather than this one's. Exit code 2 means the command as
404
+ typed cannot run, such as an unknown key or a value of the wrong type. Exit
405
+ code 1 means the command was valid but failed against the state it found.
381
406
 
382
- `runners.order` sets the report order everywhere — `--json`, `--list`, the
383
- terminal UI's tab cycle, and the web view, where your own drag-reordering
384
- (persisted in the browser) still layers on top of it.
407
+ `runners.order` sets the runner order everywhere: `--json`, `--list`, the
408
+ terminal UI's tab order, and the web view. In the web view, an order you set by
409
+ dragging is saved in the browser and overrides it.
385
410
 
386
411
  ### `allowExec` here
387
412
 
388
- wayfinder's execution default is `true`, below any file. Highest precedence first:
413
+ wayfinder's execution default is `true`, and any file overrides it. Highest
414
+ precedence first:
389
415
 
390
416
  1. `--exec` or `--no-exec` on this command line
391
- 2. `allowExec` in the user file, then `allowExec: false` in `wayfinder.config.json`
417
+ 2. `allowExec: false` in `wayfinder.config.json`, then `allowExec` in the user file
392
418
  3. wayfinder's own default, `true`
393
419
 
394
420
  A file has to say `false` for execution to be off. `way config list` and
395
421
  `way config get allowExec` report that default, labelled `(default)`.
396
422
 
397
- This settles willingness, not execution: [trust](#execution-and-trust) is the
398
- gate above it, so a `true` here still collects nothing until the repository is
399
- trusted.
423
+ This setting alone does not allow execution. The repository must also be
424
+ [trusted](#execution-and-trust), so with `true` here, runners that must run to
425
+ be read are still skipped until then.
400
426
 
401
427
  ## Options
402
428
 
@@ -430,12 +456,11 @@ providers the registered tools, built-in and your own;
430
456
  `providers --help`
431
457
  clean remove what this tool has stored; `clean --help`
432
458
  guide how to use and extend this tool, in Markdown
433
- dev link a checkout of this tool over the installed copy
434
459
  ```
435
460
 
436
- A subcommand is claimed before the flag parse, so the flags above are the
437
- top-level command's, not theirs. `-C` is the exception: the subcommands whose
438
- answer depends on which repository you are asking about take it.
461
+ A subcommand is matched before flags are parsed, so the flags above belong to
462
+ the top-level command, not to the subcommands. `-C` is the exception. The
463
+ subcommands whose answer depends on the repository take it.
439
464
 
440
465
  | Subcommand | `-C, --dir` | Why |
441
466
  |---|---|---|
@@ -444,17 +469,17 @@ answer depends on which repository you are asking about take it.
444
469
  | `providers` | yes | a trusted project file can add tools when execution is allowed |
445
470
  | `clean` | no | resolves every path from the environment and the home directory |
446
471
  | `guide` | no | its argument is a topic name |
447
- | `dev` | no | its state is devlink's, keyed on the tool name |
472
+ | `dev` | no | its state is devlink's, keyed on the tool name; not listed in the help |
448
473
 
449
- `way --help` is the short form: the ways in, the two flags most invocations
450
- pass, and the names of everything below it. `way --help --all` is the complete
451
- flag list — the block above — and each subcommand answers for itself with its
452
- own `--help`. `way guide` is the long form, by topic. A tool that answers a
453
- mistyped flag with its whole surface makes the reader hunt for the error, so a
454
- usage error prints the short form too.
474
+ `way --help` is the short form: the main ways to run it, the flags most runs
475
+ pass, and the names of the subcommands. `way --help --all` is the full flag
476
+ list shown above. Each subcommand has its own `--help`. `way guide` is the long
477
+ form, by topic. A usage error, such as a mistyped flag, prints the short form,
478
+ so the error is not lost in the full list.
455
479
 
456
- `way guide` prints usage-and-extension instructions for people and for agents;
457
- `guide extend` is how to add a tool and `guide trust` the exec gate.
480
+ `way guide` prints instructions on using and extending the tool, for people
481
+ and for agents. `way guide extend` covers adding a tool, and `way guide trust`
482
+ covers when runners may run.
458
483
 
459
484
  The directory is resolved upward to the project root, so running from a
460
485
  subdirectory still inspects the whole repository.
@@ -477,12 +502,15 @@ repository is trusted and execution is allowed (`allowExec` not `false`, no
477
502
  `--no-exec`); otherwise wayfinder prints a warning and loads nothing from it.
478
503
  `way guide extend` prints a complete example. A tool's runner may define
479
504
  `invoke(task, args)` to say where typed arguments go, such as after `--` for
480
- `npm run`; the default appends them.
505
+ `npm run`. By default they are appended.
481
506
 
482
507
  `way providers` lists every registered tool: its roles, its runner kind
483
508
  (`parse` reads files, `exec` must run the tool and needs trust), its binary,
484
509
  whether that binary is on PATH, and whether it is built in or custom.
485
- `--json` gives the same rows as data.
510
+ `--json` gives the same rows as data. Only absolute PATH entries count, as in
511
+ detection: a tool found only through a relative entry (`bin`, `.`,
512
+ `node_modules/.bin`) reads as not installed. Put an absolute entry for it on
513
+ PATH.
486
514
 
487
515
  ## How it compares
488
516