@karmaniverous/jeeves-watcher 0.4.4 → 0.5.0-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
@@ -106,7 +106,7 @@ Config strings support `${VAR_NAME}` syntax for environment variable injection:
106
106
  }
107
107
  ```
108
108
 
109
- If `GOOGLE_API_KEY` is set in the environment, the value is substituted at config load time. **Unresolvable expressions are left untouched** — this allows `${...}` template syntax used in inference rule `set` values (e.g. `${frontmatter.title}`, `${file.path}`) to pass through for later resolution by the rules engine.
109
+ If `GOOGLE_API_KEY` is set in the environment, the value is substituted at config load time. **Unresolvable expressions are left untouched** — this allows `${...}` template syntax used in inference rule property schemas (e.g. `${frontmatter.title}`, `${file.path}`) to pass through for later resolution by the rules engine.
110
110
 
111
111
  ### Watch Paths
112
112
 
@@ -150,12 +150,25 @@ If `GOOGLE_API_KEY` is set in the environment, the value is substituted at confi
150
150
 
151
151
  ### Inference Rules
152
152
 
153
- Automatically enrich metadata based on file patterns:
153
+ Automatically enrich metadata based on file patterns using declarative JSON Schemas:
154
154
 
155
155
  ```json
156
156
  {
157
+ "schemas": {
158
+ "base": {
159
+ "type": "object",
160
+ "properties": {
161
+ "domain": {
162
+ "type": "string",
163
+ "description": "Content domain"
164
+ }
165
+ }
166
+ }
167
+ },
157
168
  "inferenceRules": [
158
169
  {
170
+ "name": "meeting-classifier",
171
+ "description": "Classify files under meetings directory",
159
172
  "match": {
160
173
  "properties": {
161
174
  "file": {
@@ -166,15 +179,22 @@ Automatically enrich metadata based on file patterns:
166
179
  }
167
180
  }
168
181
  },
169
- "set": {
170
- "domain": "meetings",
171
- "category": "notes"
172
- }
182
+ "schema": [
183
+ "base",
184
+ {
185
+ "properties": {
186
+ "domain": { "set": "meetings" },
187
+ "category": { "type": "string", "set": "notes" }
188
+ }
189
+ }
190
+ ]
173
191
  }
174
192
  ]
175
193
  }
176
194
  ```
177
195
 
196
+ **New in v0.5.0:** Inference rules now use `schema` arrays that reference global named schemas. Type coercion automatically converts string interpolation results to declared types (integer, number, boolean, array, object). See [Inference Rules Guide](guides/inference-rules.md) for details.
197
+
178
198
  ### Chunking
179
199
 
180
200
  Chunking settings are configured under `embedding`:
@@ -206,10 +226,14 @@ The watcher provides a REST API (default port: 3456):
206
226
  |----------|--------|-------------|
207
227
  | `/status` | GET | Health check, uptime, and collection stats |
208
228
  | `/search` | POST | Semantic search (`{ query: string, limit?: number, filter?: object }`) |
209
- | `/metadata` | POST | Update document metadata (`{ path: string, metadata: object }`) |
229
+ | `/metadata` | POST | Update document metadata with schema validation (`{ path: string, metadata: object }`) |
210
230
  | `/reindex` | POST | Reindex all watched files |
211
231
  | `/rebuild-metadata` | POST | Rebuild metadata files from Qdrant |
212
232
  | `/config-reindex` | POST | Reindex after config changes (`{ scope?: "rules" \| "full" }`) |
233
+ | `/config/schema` | GET | JSON Schema of merged virtual document (v0.5.0+) |
234
+ | `/config/query` | POST | JSONPath query over config (`{ path: string, resolve?: string[] }`) (v0.5.0+) |
235
+ | `/config/match` | POST | Test paths against inference rules (`{ paths: string[] }`) (v0.5.0+) |
236
+ | `/issues` | GET | Current embedding failures and processing errors (v0.5.0+) |
213
237
 
214
238
  ### Example: Search
215
239