@lacneu/openclaw-knowledge 3.2.3 → 3.2.5

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.
@@ -2,7 +2,7 @@
2
2
  "id": "openclaw-knowledge",
3
3
  "name": "Knowledge Base",
4
4
  "description": "Multi-source knowledge search (pgvector + LightRAG) with optional Jina-powered router & reranker — injects relevant documents and knowledge graph context before each turn via the before_prompt_build hook",
5
- "version": "3.2.3",
5
+ "version": "3.2.5",
6
6
  "activation": {
7
7
  "onStartup": true
8
8
  },
@@ -25,8 +25,12 @@
25
25
  },
26
26
  "collections": {
27
27
  "type": "array",
28
- "items": { "type": "string" },
29
- "default": ["knowledge_default"],
28
+ "items": {
29
+ "type": "string"
30
+ },
31
+ "default": [
32
+ "knowledge_default"
33
+ ],
30
34
  "description": "Collection names to search in the knowledge_vectors table"
31
35
  },
32
36
  "topK": {
@@ -63,7 +67,12 @@
63
67
  },
64
68
  "lightragQueryMode": {
65
69
  "type": "string",
66
- "enum": ["naive", "local", "global", "hybrid"],
70
+ "enum": [
71
+ "naive",
72
+ "local",
73
+ "global",
74
+ "hybrid"
75
+ ],
67
76
  "default": "hybrid",
68
77
  "description": "LightRAG query mode: naive (vector), local (entity), global (community), hybrid (recommended)"
69
78
  },
@@ -86,6 +95,13 @@
86
95
  "type": "string",
87
96
  "description": "Jina API key shared by router and reranker. Required when router.mode=jina-classifier or pgvectorReranker.enabled. Supports ${ENV_VAR} substitution."
88
97
  },
98
+ "rpmBudget": {
99
+ "type": "number",
100
+ "minimum": 0,
101
+ "maximum": 1000,
102
+ "default": 60,
103
+ "description": "Soft RPM budget for ALL outbound Jina calls (router + reranker). When the sliding 60-second window exceeds this number, a jina_rpm_exceeded event is emitted and a warning is logged. The call is NEVER blocked — the existing 429 cooldown is the hard backstop. Default 60 leaves headroom below the Jina free tier ceiling (100 RPM). Set to 0 to disable the monitor."
104
+ },
89
105
  "router": {
90
106
  "type": "object",
91
107
  "additionalProperties": false,
@@ -98,7 +114,10 @@
98
114
  },
99
115
  "mode": {
100
116
  "type": "string",
101
- "enum": ["heuristic", "jina-classifier"],
117
+ "enum": [
118
+ "heuristic",
119
+ "jina-classifier"
120
+ ],
102
121
  "default": "heuristic",
103
122
  "description": "heuristic: zero-cost regex + trigger rules only (safe start). jina-classifier: same heuristics first, then Jina /v1/classify for ambiguous queries."
104
123
  },
@@ -136,10 +155,34 @@
136
155
  "maximum": 100,
137
156
  "default": 5,
138
157
  "description": "Max number of results returned after rerank. Recommendation: keep topK ≥ topN × 2 so the cross-encoder has room to re-order."
158
+ },
159
+ "candidatePoolMax": {
160
+ "type": "number",
161
+ "minimum": 0,
162
+ "maximum": 100,
163
+ "default": 20,
164
+ "description": "Maximum number of cosine-ranked candidates submitted to Jina /v1/rerank per call. Trims Jina token spend on noisy recall. Set to 0 to disable the cap (legacy v3.2.3 behavior)."
165
+ },
166
+ "maxCharsPerDoc": {
167
+ "type": "number",
168
+ "minimum": 0,
169
+ "maximum": 20000,
170
+ "default": 2000,
171
+ "description": "Per-candidate text truncation length in characters before submission to Jina. The first ~2000 chars typically carry most of the relevance signal. Set to 0 to disable the truncation."
139
172
  }
140
173
  }
141
174
  }
142
175
  }
176
+ },
177
+ "provenanceReport": {
178
+ "type": "string",
179
+ "enum": [
180
+ "off",
181
+ "metadata",
182
+ "full"
183
+ ],
184
+ "default": "off",
185
+ "description": "Provenance reporting toward chat frontends (provenance/v1): off = no emission; metadata = file names/collections/scores; full = plus the exact injected excerpts. Reports ride the gateway agent-event bus and land under the chat's own ACL — never in logs."
143
186
  }
144
187
  },
145
188
  "required": []
@@ -252,6 +295,21 @@
252
295
  "label": "Reranker top-N",
253
296
  "advanced": true,
254
297
  "help": "Max results returned after rerank. Keep topK ≥ topN × 2."
298
+ },
299
+ "jina.pgvectorReranker.candidatePoolMax": {
300
+ "label": "Reranker candidate-pool cap",
301
+ "advanced": true,
302
+ "help": "Max candidates submitted to Jina per rerank call. Default 20. Set to 0 to disable the cap."
303
+ },
304
+ "jina.pgvectorReranker.maxCharsPerDoc": {
305
+ "label": "Reranker chars-per-doc cap",
306
+ "advanced": true,
307
+ "help": "Per-candidate text truncation before sending to Jina. Default 2000 chars. Set to 0 to disable truncation."
308
+ },
309
+ "jina.rpmBudget": {
310
+ "label": "Jina RPM budget (soft)",
311
+ "advanced": true,
312
+ "help": "Soft alert threshold on outbound Jina calls per minute. Default 60. Never blocks — only logs and emits jina_rpm_exceeded events. Set to 0 to disable."
255
313
  }
256
314
  }
257
- }
315
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lacneu/openclaw-knowledge",
3
- "version": "3.2.3",
3
+ "version": "3.2.5",
4
4
  "type": "module",
5
5
  "description": "Multi-source knowledge plugin for OpenClaw — pgvector + LightRAG injection with optional Jina-powered router & reranker, via before_prompt_build hook",
6
6
  "license": "MIT",