@gmickel/gno 1.7.0 → 1.7.1

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.
@@ -136,7 +136,7 @@ gno search "error handling" --json | jq -r '.results[].uri' | xargs gno multi-ge
136
136
  When using GNO through MCP, prefer this retrieval order:
137
137
 
138
138
  1. Check `gno_status` first when freshness, missing vectors, or stale results are plausible.
139
- 2. Use `gno_query` first for normal content questions. It returns snippets plus `uri`, `docid`, and often `line`; it also adds bounded one-hop graph neighbors from top seeds when graph data exists.
139
+ 2. Use `gno_query` first for normal content questions. It returns snippets plus `uri`, `docid`, and often `line`; pass `graph: true` only when linked context is worth the extra latency.
140
140
  3. Use graph/link expansion for relationship context: `gno_graph_neighbors` for nearby documents, `gno_graph_path` for "how are X and Y connected?", `gno_links`/`gno_backlinks` for one-document link expansion, and `gno_similar` for semantic neighbors. Prefer `explicit` graph edges over `inferred`, `ambiguous`, or `similarity` edges when confidence matters.
141
141
  4. Use `gno_get` with `fromLine`/`lineCount` for targeted reads, or `gno_multi_get` to batch top refs.
142
142
 
@@ -154,7 +154,7 @@ gno query <query> [options]
154
154
 
155
155
  | Flag | Time | Description |
156
156
  | ------------ | ----- | ------------------------------ |
157
- | `--fast` | ~0.7s | Skip expansion, graph, rerank |
157
+ | `--fast` | ~0.7s | Skip expansion and rerank |
158
158
  | (default) | ~2-3s | Skip expansion, with reranking |
159
159
  | `--thorough` | ~5-8s | Full pipeline with expansion |
160
160
 
@@ -164,7 +164,8 @@ Additional options:
164
164
  | ------------- | --------------------------------- |
165
165
  | `--no-expand` | Disable query expansion |
166
166
  | `--no-rerank` | Disable reranking |
167
- | `--no-graph` | Disable graph-neighbor candidates |
167
+ | `--graph` | Enable graph-neighbor candidates |
168
+ | `--no-graph` | Compatibility no-op by default |
168
169
  | `--explain` | Print retrieval details to stderr |
169
170
 
170
171
  ### gno ask
@@ -56,9 +56,8 @@ gno mcp status
56
56
  ## Retrieval Order
57
57
 
58
58
  For normal questions, start with `gno_query`, then read targeted snippets with
59
- `gno_get` or batch refs with `gno_multi_get`. `gno_query` already does bounded
60
- one-hop graph expansion from top seeds; pass `noGraph: true` only when comparing
61
- pure BM25/vector retrieval. Check `gno_status` first when freshness or
59
+ `gno_get` or batch refs with `gno_multi_get`. Pass `graph: true` only when
60
+ linked context is worth the extra latency. Check `gno_status` first when freshness or
62
61
  embeddings may be stale.
63
62
 
64
63
  Use graph tools for relationship context: `gno_graph` for corpus report/stats,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gmickel/gno",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
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",
@@ -539,7 +539,8 @@ function wireSearchCommands(program: Command): void {
539
539
  )
540
540
  .option("--no-expand", "disable query expansion")
541
541
  .option("--no-rerank", "disable reranking")
542
- .option("--no-graph", "disable graph neighbor expansion")
542
+ .option("--graph", "enable graph neighbor expansion")
543
+ .option("--no-graph", "compatibility no-op; graph is off by default")
543
544
  .option(
544
545
  "--query-mode <mode:text>",
545
546
  "structured mode entry (repeatable): term:<text>, intent:<text>, or hyde:<text>",
@@ -656,6 +657,7 @@ function wireSearchCommands(program: Command): void {
656
657
  lineNumbers: Boolean(cmdOpts.lineNumbers),
657
658
  noExpand: depthPolicy.noExpand,
658
659
  noRerank: depthPolicy.noRerank,
660
+ graph: Boolean(cmdOpts.graph),
659
661
  noGraph: Boolean(cmdOpts.fast) || cmdOpts.graph === false,
660
662
  candidateLimit: depthPolicy.candidateLimit,
661
663
  queryModes,
@@ -456,7 +456,11 @@ export const queryInputSchema = z.object({
456
456
  noGraph: z
457
457
  .boolean()
458
458
  .optional()
459
- .describe("Disable bounded one-hop graph neighbor expansion"),
459
+ .describe("Compatibility no-op unless graph is also true"),
460
+ graph: z
461
+ .boolean()
462
+ .optional()
463
+ .describe("Enable bounded one-hop graph neighbor expansion"),
460
464
  tagsAll: z.array(z.string()).optional().describe("Require ALL of these tags"),
461
465
  tagsAny: z.array(z.string()).optional().describe("Require ANY of these tags"),
462
466
  });
@@ -51,6 +51,7 @@ interface QueryInput {
51
51
  expand?: boolean;
52
52
  rerank?: boolean;
53
53
  noGraph?: boolean;
54
+ graph?: boolean;
54
55
  tagsAll?: string[];
55
56
  tagsAny?: string[];
56
57
  }
@@ -272,6 +273,7 @@ export function handleQuery(
272
273
  author: args.author,
273
274
  noExpand,
274
275
  noRerank,
276
+ graph: args.graph === true,
275
277
  noGraph: args.noGraph || args.fast,
276
278
  queryModes,
277
279
  tagsAll: normalizeTagFilters(args.tagsAll),
@@ -554,7 +554,7 @@ export async function searchHybrid(
554
554
  includeSimilar: vectorAvailable,
555
555
  limit,
556
556
  candidateLimit,
557
- disabled: options.noGraph,
557
+ disabled: !options.graph || options.noGraph,
558
558
  lang: options.lang,
559
559
  tagsAll: options.tagsAll,
560
560
  tagsAny: options.tagsAny,
@@ -174,7 +174,9 @@ export type HybridSearchOptions = SearchOptions & {
174
174
  candidateLimit?: number;
175
175
  /** Enable explain output */
176
176
  explain?: boolean;
177
- /** Disable bounded one-hop graph candidate expansion */
177
+ /** Enable bounded one-hop graph candidate expansion */
178
+ graph?: boolean;
179
+ /** Compatibility no-op unless graph is also true */
178
180
  noGraph?: boolean;
179
181
  /** Language hint for prompt selection (does NOT filter retrieval, only affects expansion prompts) */
180
182
  queryLanguageHint?: string;
@@ -173,6 +173,7 @@ export interface QueryRequestBody {
173
173
  noExpand?: boolean;
174
174
  noRerank?: boolean;
175
175
  noGraph?: boolean;
176
+ graph?: boolean;
176
177
  /** Comma-separated tags - filter to docs having ALL (AND) */
177
178
  tagsAll?: string;
178
179
  /** Comma-separated tags - filter to docs having ANY (OR) */
@@ -3311,6 +3312,7 @@ export async function handleQuery(
3311
3312
  queryModes: normalizedQueryModes,
3312
3313
  noExpand: body.noExpand,
3313
3314
  noRerank: body.noRerank,
3315
+ graph: body.graph === true,
3314
3316
  noGraph: body.noGraph,
3315
3317
  tagsAll,
3316
3318
  tagsAny,