@gmickel/gno 0.13.0 → 0.13.2

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
@@ -7,7 +7,11 @@
7
7
  [![Website](./assets/badges/website.svg)](https://gno.sh)
8
8
  [![Twitter](./assets/badges/twitter.svg)](https://twitter.com/gmickel)
9
9
 
10
- GNO is a local knowledge engine for privacy-conscious developers and AI agents. Index your notes, code, PDFs, and Office docs. Get hybrid search (BM25 + vector + reranking) and AI-powered answers, all running 100% on your machine.
10
+ > **ClawdHub**: GNO skills bundled for Clawdbot [clawdhub.com/gmickel/gno](https://clawdhub.com/gmickel/gno)
11
+
12
+ ![GNO](./assets/og-image.png)
13
+
14
+ GNO is a local knowledge engine that turns your documents into a searchable, connected knowledge graph. Index notes, code, PDFs, and Office docs. Get hybrid search, AI answers with citations, and wiki-style note linking—all 100% offline.
11
15
 
12
16
  ---
13
17
 
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gmickel/gno",
3
- "version": "0.13.0",
3
+ "version": "0.13.2",
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",
@@ -57,6 +57,8 @@
57
57
  "website:dev": "cd website && make serve",
58
58
  "website:build": "cd website && make build",
59
59
  "website:demos": "cd website/demos && ./build-demos.sh",
60
+ "website:og": "bun scripts/og-screenshots.ts",
61
+ "website:sync-assets": "bun scripts/sync-assets.ts",
60
62
  "sync:agents": "scripts/sync-agents.sh",
61
63
  "build:css": "bunx @tailwindcss/cli -i src/serve/public/globals.css -o src/serve/public/globals.built.css --minify",
62
64
  "serve": "bun src/index.ts serve",
@@ -130,6 +132,7 @@
130
132
  "oxlint": "^1.36.0",
131
133
  "oxlint-tsgolint": "^0.10.1",
132
134
  "pdf-lib": "^1.17.1",
135
+ "playwright": "^1.52.0",
133
136
  "pptxgenjs": "^4.0.1",
134
137
  "ultracite": "7.0.4",
135
138
  "vitest": "^4.0.16"
package/src/cli/AGENTS.md CHANGED
@@ -19,6 +19,7 @@ src/cli/
19
19
  ├── search.ts
20
20
  ├── query.ts
21
21
  ├── ask.ts
22
+ ├── tags.ts # Tag management (list, add, remove)
22
23
  └── ...
23
24
  ```
24
25
 
@@ -94,3 +95,26 @@ bun test test/cli/
94
95
  ```
95
96
 
96
97
  Use `--json` output for assertions in tests.
98
+
99
+ ## Tag Commands
100
+
101
+ Tag management commands in `src/cli/commands/tags.ts`:
102
+
103
+ ```bash
104
+ # List all tags (with doc counts)
105
+ gno tags
106
+
107
+ # Add tags to document
108
+ gno tag add <path> tag1 tag2
109
+
110
+ # Remove tags from document
111
+ gno tag remove <path> tag1
112
+
113
+ # Filter search/query by tags
114
+ gno search "query" --tags=foo,bar
115
+ ```
116
+
117
+ - Tags normalized via `src/core/tags.ts`: lowercase, trimmed, validated
118
+ - Stored in `doc_tags` junction table with `source` column (frontmatter|user)
119
+ - Frontmatter tags extracted during ingestion (`src/ingestion/frontmatter.ts`)
120
+ - User-added tags can be removed; frontmatter tags are read-only
@@ -708,7 +708,7 @@ export async function similar(
708
708
 
709
709
  /** Escape markdown table cell content */
710
710
  function escapeTableCell(text: string): string {
711
- return text.replace(/\|/g, "\\|").replace(/\n/g, " ");
711
+ return text.replace(/\\/g, "\\\\").replace(/\|/g, "\\|").replace(/\n/g, " ");
712
712
  }
713
713
 
714
714
  /**
@@ -50,6 +50,12 @@ export function parseGlobalOptions(
50
50
  const offlineFlag = Boolean(raw.offline);
51
51
  const offlineEnabled = offlineEnv || offlineFlag;
52
52
 
53
+ const noPagerEnv =
54
+ (env.NO_PAGER !== undefined && env.NO_PAGER !== "") ||
55
+ (env.GNO_NO_PAGER !== undefined && env.GNO_NO_PAGER !== "") ||
56
+ env.NODE_ENV === "test" ||
57
+ env.BUN_TEST !== undefined;
58
+
53
59
  return {
54
60
  index: (raw.index as string) ?? "default",
55
61
  config: raw.config as string | undefined,
@@ -60,7 +66,7 @@ export function parseGlobalOptions(
60
66
  json: Boolean(raw.json),
61
67
  offline: offlineEnabled,
62
68
  // Commander: --no-pager => opts().pager === false
63
- noPager: raw.pager === false,
69
+ noPager: raw.pager === false || noPagerEnv,
64
70
  };
65
71
  }
66
72
 
package/src/mcp/AGENTS.md CHANGED
@@ -84,3 +84,24 @@ MCP tests in `test/mcp/`:
84
84
  ```bash
85
85
  bun test test/mcp/
86
86
  ```
87
+
88
+ ## Tag Tools
89
+
90
+ Tag management via MCP:
91
+
92
+ - `gno.list_tags` - List all tags with doc counts, optional collection filter
93
+ - `gno.tag` - Add/remove tags from documents
94
+
95
+ ```typescript
96
+ // gno.list_tags
97
+ { collection?: string } // optional filter
98
+ // Returns: { tags: [{ name, count }] }
99
+
100
+ // gno.tag
101
+ { action: "add" | "remove", path: string, tags: string[] }
102
+ // Returns: { success, tags: [...current tags] }
103
+ ```
104
+
105
+ - Tags in search/query tools: `--tags` param filters by tag (AND logic)
106
+ - Validation via `src/core/tags.ts`: normalizeTag(), validateTag()
107
+ - Storage: `doc_tags` junction table with `source` column (frontmatter|user)
@@ -79,12 +79,14 @@ Answer generation uses shared module to stay in sync with CLI:
79
79
  | `/api/presets` | POST | Switch preset (hot-reload) |
80
80
  | `/api/models/status` | GET | Download progress |
81
81
  | `/api/models/pull` | POST | Start model download |
82
+ | `/api/tags` | GET | List tags (with counts) |
82
83
 
83
84
  ## Frontend
84
85
 
85
86
  - **Framework**: React (via Bun HTML imports)
86
87
  - **Styling**: Tailwind CSS + ShadCN components
87
88
  - **AI Elements**: Conversation, Message, Sources, CodeBlock, Loader
89
+ - **Tag Components**: TagInput, TagFacets (filter sidebar)
88
90
  - **Routing**: Simple hash-free SPA routing in App.tsx
89
91
 
90
92
  ## Development
@@ -178,3 +180,22 @@ bun --hot ./index.ts
178
180
  ```
179
181
 
180
182
  For more information, read the Bun API docs in `node_modules/bun-types/docs/**.md`.
183
+
184
+ ## Tag System
185
+
186
+ REST endpoints support tag filtering:
187
+
188
+ - `GET /api/tags` - List all tags with doc counts
189
+ - `POST /api/search`, `/api/query`, `/api/ask` - Accept `tags` array param
190
+
191
+ WebUI state:
192
+
193
+ - TagFacets component shows available tags with counts
194
+ - TagInput for adding/removing tags on documents
195
+ - Selected tags filter search results (AND logic)
196
+
197
+ Implementation:
198
+
199
+ - Tags stored in `doc_tags` junction table with `source` (frontmatter|user)
200
+ - Validation via `src/core/tags.ts`
201
+ - Frontmatter parsing in `src/ingestion/frontmatter.ts`