@gmickel/gno 1.1.0 → 1.2.0

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
@@ -63,9 +63,9 @@ gno get "gno://work-docs/architecture/auth.md"
63
63
  gno multi-get "gno-code/**/*.ts" --max-bytes 30000 --md
64
64
  gno query "deployment process" --all --files --min-score 0.35
65
65
 
66
- # Run the workspace
67
- gno serve
68
- gno daemon
66
+ # Run the workspace (pick one — don't run both against the same index concurrently)
67
+ gno serve # browser/desktop session with the Web UI
68
+ gno daemon --detach # headless continuous indexing (background; --status / --stop to manage)
69
69
  ```
70
70
 
71
71
  ---
@@ -92,7 +92,7 @@ gno daemon
92
92
 
93
93
  ## What's New
94
94
 
95
- > Latest release: [v1.0.0](./CHANGELOG.md#100---2026-04-16)
95
+ > Latest release: [v1.1.0](./CHANGELOG.md#110---2026-04-21)
96
96
  > Full release history: [CHANGELOG.md](./CHANGELOG.md)
97
97
 
98
98
  - **Publish to [gno.sh](https://gno.sh/publish)**: new `gno publish export` CLI and Web UI action produce a self-contained artifact you upload to the hosted reader — public, secret, invite-only, or locally encrypted before upload
@@ -175,11 +175,13 @@ gno query "ECONNREFUSED 127.0.0.1:5432" --thorough
175
175
  ```bash
176
176
  gno init ~/notes --name notes # Point at your docs
177
177
  gno index # Build search index
178
- gno daemon # Keep index fresh in background (foreground process)
178
+ gno daemon --detach # Keep index fresh in the background (macOS/Linux)
179
179
  gno query "auth best practices" # Hybrid search
180
180
  gno ask "summarize the API" --answer # AI answer with citations
181
181
  ```
182
182
 
183
+ Manage the detached process with `gno daemon --status` and `gno daemon --stop`.
184
+
183
185
  ![GNO CLI](./assets/screenshots/cli.jpg)
184
186
 
185
187
  ---
@@ -213,11 +215,13 @@ desktop beta zip now published on GitHub Releases. See
213
215
  Keep an index fresh continuously without opening the Web UI:
214
216
 
215
217
  ```bash
216
- gno daemon
218
+ gno daemon # foreground (Ctrl+C to stop)
219
+ gno daemon --detach # background (macOS/Linux); use --status / --stop to manage
217
220
  ```
218
221
 
219
- `gno daemon` runs as a foreground watcher/sync/embed process. Use `nohup`,
220
- launchd, or systemd if you want it supervised long-term.
222
+ `gno daemon` runs the watch/sync/embed loop headless. `--detach` self-spawns a
223
+ detached child and exits 0; `gno daemon --status` and `gno daemon --stop` give
224
+ you lifecycle control without `nohup`, `launchd`, or `systemd` units.
221
225
 
222
226
  See also: [docs/DAEMON.md](./docs/DAEMON.md)
223
227
 
@@ -264,14 +268,17 @@ Use `gno daemon` when you want continuous indexing without the browser or
264
268
  desktop shell open.
265
269
 
266
270
  ```bash
267
- gno daemon
271
+ gno daemon # foreground (Ctrl+C to stop)
268
272
  gno daemon --no-sync-on-start
269
- nohup gno daemon > /tmp/gno-daemon.log 2>&1 &
273
+ gno daemon --detach # background (macOS/Linux); auto-writes pid + log files
274
+ gno daemon --status # check the detached process
275
+ gno daemon --stop # SIGTERM with 10s timeout, SIGKILL fallback
270
276
  ```
271
277
 
272
278
  It reuses the same watch/sync/embed runtime as `gno serve`, but stays
273
- headless. In v0.30 it is foreground-only and does not expose built-in
274
- `start/stop/status` management.
279
+ headless. `--detach` / `--status` / `--stop` give you symmetric lifecycle
280
+ controls so you don't need `nohup`, `launchd`, or `systemd` units. The same
281
+ flag set is available on `gno serve`.
275
282
 
276
283
  [Daemon guide →](https://gno.sh/docs/DAEMON/)
277
284
 
@@ -494,6 +494,105 @@ gno serve [options]
494
494
 
495
495
  Features: Dashboard, search, browse collections, document viewer, AI Q&A with citations.
496
496
 
497
+ #### Long-running process flags (shared with `gno daemon`)
498
+
499
+ `gno serve` and `gno daemon` share an identical management contract.
500
+ The full spec is reproduced in this section so installed copies of this
501
+ skill stay self-contained. The canonical source in the gno repo is
502
+ `docs/CLI.md#long-running-processes` (kept in sync with this section
503
+ on every release).
504
+
505
+ | Flag | Purpose |
506
+ | ------------------- | -------------------------------------------------------------------------------------------- |
507
+ | `--detach` | Self-spawn a detached child; parent prints `pid` (+ `url` for serve) and exits 0. Unix-only. |
508
+ | `--status` | Read pid-file, check liveness, print status. Pair with `--json` for machine output. |
509
+ | `--stop` | SIGTERM the recorded pid, poll up to 10s, fall back to SIGKILL. |
510
+ | `--pid-file <path>` | Override pid-file location (defaults to `{data}/serve.pid`). |
511
+ | `--log-file <path>` | Override log-file location (append-only; defaults to `{data}/serve.log`). |
512
+
513
+ `--detach`, `--status`, and `--stop` are mutually exclusive (Commander conflict error).
514
+
515
+ **`--json` is gated to `--status` only.** Passing `--json` with `--detach`,
516
+ `--stop`, or the foreground path produces a `VALIDATION` error (exit 1).
517
+ The literal stderr message is:
518
+
519
+ ```
520
+ --json is only supported with `gno serve --status`
521
+ ```
522
+
523
+ Do **not** try to parse a NOT_RUNNING envelope from stderr in this case —
524
+ it isn't there. Match on the literal string above (or just on exit code 1
525
+ plus the absence of structured output) and fall back to a status call.
526
+
527
+ **Exit codes:**
528
+
529
+ - `gno serve --status` → `0` when running, `3` (`NOT_RUNNING`) when not.
530
+ The stdout JSON payload is still emitted in JSON mode on exit 3 so
531
+ consumers always get a schema-shaped result; the NOT_RUNNING envelope
532
+ rides on stderr (JSON mode only).
533
+ - `gno serve --stop` → `0` when stopped, `3` (`NOT_RUNNING`) when there
534
+ was nothing to stop. **Silent on `3`** — no stderr envelope. Branch on
535
+ `$?`, not stderr text. `1` when refusing to signal a foreign-version
536
+ live pid; `2` when SIGTERM + SIGKILL both timed out.
537
+
538
+ Examples:
539
+
540
+ ```bash
541
+ gno serve --detach # self-spawn, parent exits 0
542
+ gno serve --status # terminal table
543
+ gno serve --status --json # process-status schema
544
+ gno serve --stop # graceful stop
545
+ gno serve --detach --pid-file /tmp/gs.pid \
546
+ --log-file /tmp/gs.log
547
+ ```
548
+
549
+ > **Windows note**: `--detach` returns a clean `VALIDATION` error pointing
550
+ > to WSL. `--status` / `--stop` / `--pid-file` / `--log-file` remain
551
+ > parseable but have nothing to manage in the absence of a detached child.
552
+
553
+ ### gno daemon
554
+
555
+ Headless long-running watcher process. Same watch + sync + embed loop as
556
+ `gno serve`, no web UI, no port.
557
+
558
+ ```bash
559
+ gno daemon [options]
560
+ ```
561
+
562
+ | Option | Description |
563
+ | -------------------- | ----------------------------------------------------------- |
564
+ | `--no-sync-on-start` | Skip the initial sync pass; only watch future file changes. |
565
+
566
+ Plus the shared long-running-process flags listed in [`gno serve`](#gno-serve)
567
+ above (`--detach` / `--status` / `--stop` / `--pid-file` / `--log-file`).
568
+ Defaults: `{data}/daemon.pid`, `{data}/daemon.log` (`{data}` =
569
+ `resolveDirs().data`, honours `GNO_DATA_DIR`).
570
+
571
+ **`--json` gating** mirrors `gno serve` exactly. The literal stderr
572
+ message on a misuse is:
573
+
574
+ ```
575
+ --json is only supported with `gno daemon --status`
576
+ ```
577
+
578
+ **Exit codes** are identical to `gno serve` (`0` / `1` / `2` / `3`
579
+ `NOT_RUNNING`). `--stop` is silent on `3`.
580
+
581
+ Examples:
582
+
583
+ ```bash
584
+ gno daemon # foreground
585
+ gno daemon --no-sync-on-start # watcher-only
586
+ gno daemon --detach # self-spawn
587
+ gno daemon --detach --log-file /tmp/gd.log
588
+ gno daemon --status
589
+ gno daemon --status --json
590
+ gno daemon --stop
591
+ ```
592
+
593
+ Avoid running `gno daemon` and `gno serve` against the same index at the
594
+ same time until cross-process coordination exists.
595
+
497
596
  ## Publish
498
597
 
499
598
  ### gno publish export
@@ -620,8 +719,9 @@ gno completion uninstall
620
719
 
621
720
  ## Exit Codes
622
721
 
623
- | Code | Description |
624
- | ---- | ----------------------------- |
625
- | 0 | Success |
626
- | 1 | Validation error (bad args) |
627
- | 2 | Runtime error (IO, DB, model) |
722
+ | Code | Description |
723
+ | ---- | -------------------------------------------------------------------- |
724
+ | 0 | Success |
725
+ | 1 | Validation error (bad args) |
726
+ | 2 | Runtime error (IO, DB, model) |
727
+ | 3 | `NOT_RUNNING` — `--status` / `--stop` found no live matching process |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gmickel/gno",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Local semantic search for your documents. Index Markdown, PDF, and Office files with hybrid BM25 + vector search.",
5
5
  "keywords": [
6
6
  "embeddings",