@gmickel/gno 1.23.0 → 1.24.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
@@ -50,8 +50,10 @@ Use it when:
50
50
  # Install
51
51
  bun install -g @gmickel/gno
52
52
 
53
- # Add a few collections
54
- gno init ~/notes --name notes
53
+ # Prove the first folder immediately; semantic work continues independently
54
+ gno setup ~/notes --name notes
55
+
56
+ # Add more collections with the granular commands
55
57
  gno collection add ~/work/docs --name work-docs --pattern "**/*.{md,pdf,docx}"
56
58
  gno collection add ~/work/gno/src --name gno-code --pattern "**/*.{ts,tsx,js,jsx}"
57
59
 
@@ -60,7 +62,7 @@ gno context add "notes:" "Personal notes, journal entries, and long-form ideas"
60
62
  gno context add "work-docs:" "Architecture docs, runbooks, RFCs, meeting notes"
61
63
  gno context add "gno-code:" "Source code for the GNO application"
62
64
 
63
- # Index + embed
65
+ # Sync the additional collections, then embed when you want semantic retrieval
64
66
  gno update --yes
65
67
  gno embed
66
68
 
@@ -105,7 +107,7 @@ gno daemon --detach # headless continuous indexing (background; --status / --st
105
107
 
106
108
  <!-- public-truth:current-version -->
107
109
 
108
- > Current release: **v1.23.0** — see [CHANGELOG.md](./CHANGELOG.md)
110
+ > Current release: **v1.24.0** — see [CHANGELOG.md](./CHANGELOG.md)
109
111
 
110
112
  <!-- /public-truth -->
111
113
 
@@ -218,8 +220,7 @@ gno query "ECONNREFUSED 127.0.0.1:5432" --thorough
218
220
  ## Quick Start
219
221
 
220
222
  ```bash
221
- gno init ~/notes --name notes # Point at your docs
222
- gno index # Build search index
223
+ gno setup ~/notes --name notes # Build BM25 and prove an exact local result
223
224
  gno daemon --detach # Keep index fresh in the background (macOS/Linux)
224
225
  gno query "auth best practices" # Hybrid search
225
226
  gno ask "summarize the API" --answer # AI answer with citations
@@ -254,14 +255,19 @@ brew install sqlite3
254
255
  Verify the local installation and corpus-derived lexical retrieval:
255
256
 
256
257
  ```bash
257
- gno doctor
258
- gno status --json
258
+ gno setup ~/notes --name notes
259
259
  ```
260
260
 
261
- `gno status` is passive with respect to models and connectors and exits 0 even
262
- when its structured activation state is degraded. `gno doctor` exits 2 when any
263
- configured folder fails the lexical proof; semantic models may still be pending
264
- without blocking BM25 search.
261
+ `gno setup` returns only after BM25 finds an exact `gno://` result from the
262
+ folder. It is safe to rerun: the same canonical folder and collection are
263
+ reused. Semantic indexing is a separate one-shot process; `--no-semantic`
264
+ records an explicit skip. Add repeatable `--connector <id>` flags only when you
265
+ also want supported agent integrations installed and checked. Setup is direct
266
+ and standalone—it never attaches to `serve`, `daemon`, Web, or MCP.
267
+
268
+ Use `gno status --json` for passive state and `gno doctor` for diagnostics.
269
+ Semantic pending and connector follow-up never invalidate proven lexical
270
+ search.
265
271
 
266
272
  <!-- public-truth:supported-platforms -->
267
273
 
@@ -30,12 +30,19 @@ network boundaries.
30
30
  ## Quick Start
31
31
 
32
32
  ```bash
33
- gno init # Initialize in current directory
34
- gno collection add ~/docs --name docs # Add folder to index
35
- gno index # Build index (ingest + embed)
33
+ gno setup ~/docs --name docs # Index + prove exact BM25; semantic continues
36
34
  gno search "your query" # BM25 keyword search
37
35
  ```
38
36
 
37
+ `gno setup` is the default activation path. It is idempotent, returns only
38
+ after exact lexical proof, and runs directly without resident/Web/MCP
39
+ attachment. Use `--no-semantic` to start no worker and record skipped state.
40
+ Use repeatable `--connector` with `claude-code-skill`,
41
+ `claude-desktop-mcp`, `cursor-mcp`, `codex-skill`, `opencode-skill`,
42
+ `openclaw-skill`, or `hermes-skill`. Connector skips/failures can return
43
+ `completed_with_actions` without invalidating lexical success. Skill targets
44
+ are installed but report `target_runtime_unverifiable`.
45
+
39
46
  ## Recipe Router
40
47
 
41
48
  Use these recipe files when the task is more than a one-off lookup. Read only
@@ -63,22 +70,22 @@ Recipe rules:
63
70
 
64
71
  ## Command Overview
65
72
 
66
- | Category | Commands | Description |
67
- | ------------ | ----------------------------------------------------------------------- | ------------------------------------------------------------------------ |
68
- | **Search** | `search`, `vsearch`, `query`, `ask` | Find documents by keywords, meaning, or get AI answers |
69
- | **Links** | `links`, `backlinks`, `similar`, `graph`, `graph query` | Navigate document relationships and typed connections |
70
- | **Retrieve** | `get`, `multi-get`, `ls` | Fetch document content by URI or ID |
71
- | **Index** | `init`, `collection add/list/remove`, `index`, `update`, `embed` | Set up and maintain document index |
72
- | **Tags** | `tags`, `tags add`, `tags rm` | Organize and filter documents |
73
- | **Context** | `context add/list/rm/check/build/verify/watch/watches/reverify/unwatch` | Configure guidance or compile, verify, and watch saved evidence Capsules |
74
- | **Changes** | `changes`, `diff`, `impact` | Inspect bounded metadata history and dependency impact |
75
- | **Traces** | `trace list/show/label/export/replay/delete/purge` | Manage and replay private retrieval receipts |
76
- | **Models** | `models list/use/pull/clear/path` | Manage local AI models |
77
- | **Serve** | `serve`, `daemon` | One resident Web/headless gateway and watcher |
78
- | **Publish** | `publish export` | Export gno.sh publish artifacts |
79
- | **MCP** | `mcp`, `mcp install/uninstall/status` | AI assistant integration |
80
- | **Skill** | `skill install/uninstall/show/paths` | Install skill for AI agents |
81
- | **Admin** | `status`, `doctor`, `cleanup`, `reset`, `vec`, `completion` | Maintenance and diagnostics |
73
+ | Category | Commands | Description |
74
+ | ------------ | ------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
75
+ | **Search** | `search`, `vsearch`, `query`, `ask` | Find documents by keywords, meaning, or get AI answers |
76
+ | **Links** | `links`, `backlinks`, `similar`, `graph`, `graph query` | Navigate document relationships and typed connections |
77
+ | **Retrieve** | `get`, `multi-get`, `ls` | Fetch document content by URI or ID |
78
+ | **Index** | `setup`, `init`, `collection add/list/remove`, `index`, `update`, `embed` | Prove first retrieval, then maintain the document index |
79
+ | **Tags** | `tags`, `tags add`, `tags rm` | Organize and filter documents |
80
+ | **Context** | `context add/list/rm/check/build/verify/watch/watches/reverify/unwatch` | Configure guidance or compile, verify, and watch saved evidence Capsules |
81
+ | **Changes** | `changes`, `diff`, `impact` | Inspect bounded metadata history and dependency impact |
82
+ | **Traces** | `trace list/show/label/export/replay/delete/purge` | Manage and replay private retrieval receipts |
83
+ | **Models** | `models list/use/pull/clear/path` | Manage local AI models |
84
+ | **Serve** | `serve`, `daemon` | One resident Web/headless gateway and watcher |
85
+ | **Publish** | `publish export` | Export gno.sh publish artifacts |
86
+ | **MCP** | `mcp`, `mcp install/uninstall/status` | AI assistant integration |
87
+ | **Skill** | `skill install/uninstall/show/paths` | Install skill for AI agents |
88
+ | **Admin** | `status`, `doctor`, `cleanup`, `reset`, `vec`, `completion` | Maintenance and diagnostics |
82
89
 
83
90
  ## Search Modes
84
91
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gmickel/gno",
3
- "version": "1.23.0",
3
+ "version": "1.24.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",
package/spec/cli.md CHANGED
@@ -64,6 +64,7 @@ equivalent files fail closed as ambiguous.
64
64
  | ------------------ | ------ | ------- | ----- | ---- | ----- | -------- |
65
65
  | status | yes | no | no | yes | no | terminal |
66
66
  | init | no | no | no | no | no | terminal |
67
+ | setup | yes | no | no | no | no | terminal |
67
68
  | collection add | no | no | no | no | no | terminal |
68
69
  | collection list | yes | no | no | yes | no | terminal |
69
70
  | collection remove | no | no | no | no | no | terminal |
@@ -353,6 +354,96 @@ projected wiki/markdown edges and surface in graph traversal/diagnose metadata.
353
354
 
354
355
  ---
355
356
 
357
+ ### gno setup
358
+
359
+ Add or reuse one folder collection, build its lexical index, and prove a real
360
+ corpus-derived retrieval before reporting success. Semantic indexing is handed
361
+ to one standalone background worker and never delays lexical success.
362
+
363
+ **Synopsis:**
364
+
365
+ ```bash
366
+ gno setup <folder> [-n|--name <name>] [--exclude <pattern>]...
367
+ [--authorize-secret-risk] [--connector <id>]...
368
+ [--no-semantic] [--json]
369
+ ```
370
+
371
+ **Options:**
372
+
373
+ | Option | Type | Default | Description |
374
+ | ------------------------- | ---------- | ------------- | ---------------------------------------------------------------------------- |
375
+ | `-n, --name <name>` | string | dirname | Requested collection name; exact-root reruns reuse the configured collection |
376
+ | `--exclude <pattern>` | repeatable | core defaults | One literal exclusion per occurrence; never CSV |
377
+ | `--authorize-secret-risk` | boolean | false | Explicitly authorize likely credentials, private keys, or env files |
378
+ | `--connector <id>` | repeatable | none | Install or reuse and verify one supported connector after lexical proof |
379
+ | `--no-semantic` | boolean | false | Prove lexical retrieval but record semantic work as skipped |
380
+ | `--json` | boolean | false | Emit one closed setup result object |
381
+
382
+ Omitting `--exclude` preserves the core create defaults or the filters already
383
+ configured for an exact-root rerun. An empty occurrence is invalid. Global
384
+ `--yes` accepts safe defaults only; it never authorizes secret risk. Only an
385
+ interactive terminal may ask one default-No question after the lexical core
386
+ returns `secret_risk`. JSON, `--yes`, non-TTY, decline, and EOF fail closed.
387
+
388
+ The command bootstraps missing config/data/database state without adding the
389
+ folder through `init`, then runs the folder setup transaction. Success requires
390
+ a completed `FolderSetupReceipt@1.0`, `activation.ready=true`, and a non-empty
391
+ exact `activation.evidence.resultUri`. Terminal stage progress uses stderr;
392
+ `--quiet` suppresses progress but not the final result. JSON writes exactly one
393
+ canonical result to stdout on both success and domain failure, with no progress.
394
+
395
+ After lexical proof, the command records one private atomic
396
+ `setup-semantic@1.0` receipt per canonical index/folder and starts one detached,
397
+ collection-scoped Bun worker. A matching live worker is reused; a dead worker is
398
+ replaced; and a live worker with an older identity remains authoritative until
399
+ it exits so its completion receipt cannot be stranded. A later setup rerun may
400
+ then schedule the new identity. The worker uses the normal model
401
+ download/offline policy, records `completed` only when embedding and vector
402
+ synchronization finish without errors, and exits. Spawn, download, partial
403
+ embedding, and vector-sync failures retain an exact foreground
404
+ `gno ... embed <collection>` remediation and never change proven lexical exit 0.
405
+ Direct setup never contacts a resident, MCP, or Web runtime.
406
+
407
+ `--connector` is explicit and repeatable; omission performs no connector
408
+ inspection, installation, or verification. Supported IDs are
409
+ `claude-code-skill`, `claude-desktop-mcp`, `cursor-mcp`, `codex-skill`,
410
+ `opencode-skill`, `openclaw-skill`, and `hermes-skill`. Exact duplicates dedupe
411
+ in first-seen order. Unknown IDs fail before setup side effects.
412
+ Any connector-mode JSON invocation emits `setup-activation-result@1.0`.
413
+ Argument or lexical failure uses outer `status: failed`, nests the unchanged
414
+ failed setup result, and keeps `connectors: []`; it retains the original setup
415
+ exit code and performs no connector action.
416
+
417
+ After proven lexical success and after the lexical store closes, the direct CLI
418
+ opens a new standalone store for connector composition. Missing targets use the
419
+ existing read-only installer; existing entries are reused without overwrite.
420
+ Malformed or unreadable entries are preserved. MCP targets run the shipped
421
+ bounded read-only activation smoke. Skill targets install but return
422
+ `skipped/target_runtime_unverifiable` because they expose no safe runtime hook.
423
+ Connector failures or skips do not roll back lexical success: the command exits
424
+ 0 with `completed_with_actions` and bounded per-target remediation. No raw child
425
+ output or client config path is serialized. Reruns delegate passed-receipt reuse
426
+ and recoverable retry to the shipped activation verifier; setup introduces no
427
+ second connector fingerprint or cache.
428
+
429
+ **Structured schemas:**
430
+
431
+ - [`setup-command-result@1.0`](./output-schemas/setup-command-result.schema.json)
432
+ - [`setup-activation-result@1.0`](./output-schemas/setup-activation-result.schema.json)
433
+ - [`setup-semantic@1.0`](./output-schemas/setup-semantic-receipt.schema.json)
434
+ - [`FolderSetupReceipt@1.0`](./output-schemas/setup-receipt.schema.json)
435
+
436
+ **Exit Codes:**
437
+
438
+ - 0: Lexical setup completed with a real exact result URI; semantic state may
439
+ be scheduled, running, pending, completed, or skipped; requested connector
440
+ actions may require bounded follow-up
441
+ - 1: Invalid/safe-input rejection, collection/filter/index disagreement,
442
+ secret-risk refusal, or declined confirmation
443
+ - 2: Config, receipt, IO, store, indexing, proof, or internal invariant failure
444
+
445
+ ---
446
+
356
447
  ### gno collection add
357
448
 
358
449
  Add a new collection to the index.