@angri450/zvec-grep 0.2.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.
Files changed (418) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +319 -0
  3. package/README_CN.md +297 -0
  4. package/dist/authorization/index.d.ts +7 -0
  5. package/dist/authorization/index.js +7 -0
  6. package/dist/authorization/index.js.map +1 -0
  7. package/dist/authorization/manager.d.ts +8 -0
  8. package/dist/authorization/manager.js +19 -0
  9. package/dist/authorization/manager.js.map +1 -0
  10. package/dist/authorization/operation.d.ts +7 -0
  11. package/dist/authorization/operation.js +50 -0
  12. package/dist/authorization/operation.js.map +1 -0
  13. package/dist/authorization/planner.d.ts +21 -0
  14. package/dist/authorization/planner.js +97 -0
  15. package/dist/authorization/planner.js.map +1 -0
  16. package/dist/authorization/prompt.d.ts +12 -0
  17. package/dist/authorization/prompt.js +63 -0
  18. package/dist/authorization/prompt.js.map +1 -0
  19. package/dist/authorization/store.d.ts +20 -0
  20. package/dist/authorization/store.js +251 -0
  21. package/dist/authorization/store.js.map +1 -0
  22. package/dist/authorization/target.d.ts +15 -0
  23. package/dist/authorization/target.js +49 -0
  24. package/dist/authorization/target.js.map +1 -0
  25. package/dist/authorization/types.d.ts +61 -0
  26. package/dist/authorization/types.js +2 -0
  27. package/dist/authorization/types.js.map +1 -0
  28. package/dist/cli/args.d.ts +6 -0
  29. package/dist/cli/args.js +1255 -0
  30. package/dist/cli/args.js.map +1 -0
  31. package/dist/cli/auth.d.ts +21 -0
  32. package/dist/cli/auth.js +209 -0
  33. package/dist/cli/auth.js.map +1 -0
  34. package/dist/cli/commands.d.ts +4 -0
  35. package/dist/cli/commands.js +801 -0
  36. package/dist/cli/commands.js.map +1 -0
  37. package/dist/cli/errors.d.ts +9 -0
  38. package/dist/cli/errors.js +131 -0
  39. package/dist/cli/errors.js.map +1 -0
  40. package/dist/cli/format/context.d.ts +9 -0
  41. package/dist/cli/format/context.js +786 -0
  42. package/dist/cli/format/context.js.map +1 -0
  43. package/dist/cli/format/debug.d.ts +4 -0
  44. package/dist/cli/format/debug.js +60 -0
  45. package/dist/cli/format/debug.js.map +1 -0
  46. package/dist/cli/format/highlight.d.ts +3 -0
  47. package/dist/cli/format/highlight.js +106 -0
  48. package/dist/cli/format/highlight.js.map +1 -0
  49. package/dist/cli/format/progress.d.ts +13 -0
  50. package/dist/cli/format/progress.js +290 -0
  51. package/dist/cli/format/progress.js.map +1 -0
  52. package/dist/cli/format/range.d.ts +3 -0
  53. package/dist/cli/format/range.js +24 -0
  54. package/dist/cli/format/range.js.map +1 -0
  55. package/dist/cli/format/status.d.ts +83 -0
  56. package/dist/cli/format/status.js +530 -0
  57. package/dist/cli/format/status.js.map +1 -0
  58. package/dist/cli/help.d.ts +1 -0
  59. package/dist/cli/help.js +546 -0
  60. package/dist/cli/help.js.map +1 -0
  61. package/dist/cli/index.d.ts +2 -0
  62. package/dist/cli/index.js +40 -0
  63. package/dist/cli/index.js.map +1 -0
  64. package/dist/cli/install.d.ts +4 -0
  65. package/dist/cli/install.js +1735 -0
  66. package/dist/cli/install.js.map +1 -0
  67. package/dist/cli/managed-rg.d.ts +10 -0
  68. package/dist/cli/managed-rg.js +337 -0
  69. package/dist/cli/managed-rg.js.map +1 -0
  70. package/dist/cli/server-search.d.ts +3 -0
  71. package/dist/cli/server-search.js +12 -0
  72. package/dist/cli/server-search.js.map +1 -0
  73. package/dist/cli/types.d.ts +87 -0
  74. package/dist/cli/types.js +10 -0
  75. package/dist/cli/types.js.map +1 -0
  76. package/dist/cli/version.d.ts +1 -0
  77. package/dist/cli/version.js +13 -0
  78. package/dist/cli/version.js.map +1 -0
  79. package/dist/client/daemon-client.d.ts +31 -0
  80. package/dist/client/daemon-client.js +203 -0
  81. package/dist/client/daemon-client.js.map +1 -0
  82. package/dist/client/mode-router.d.ts +9 -0
  83. package/dist/client/mode-router.js +28 -0
  84. package/dist/client/mode-router.js.map +1 -0
  85. package/dist/client/search-policy.d.ts +11 -0
  86. package/dist/client/search-policy.js +15 -0
  87. package/dist/client/search-policy.js.map +1 -0
  88. package/dist/daemon/backend.d.ts +78 -0
  89. package/dist/daemon/backend.js +1118 -0
  90. package/dist/daemon/backend.js.map +1 -0
  91. package/dist/daemon/change-set.d.ts +30 -0
  92. package/dist/daemon/change-set.js +163 -0
  93. package/dist/daemon/change-set.js.map +1 -0
  94. package/dist/daemon/config.d.ts +27 -0
  95. package/dist/daemon/config.js +107 -0
  96. package/dist/daemon/config.js.map +1 -0
  97. package/dist/daemon/errors.d.ts +5 -0
  98. package/dist/daemon/errors.js +11 -0
  99. package/dist/daemon/errors.js.map +1 -0
  100. package/dist/daemon/http-server.d.ts +30 -0
  101. package/dist/daemon/http-server.js +307 -0
  102. package/dist/daemon/http-server.js.map +1 -0
  103. package/dist/daemon/index-coordinator.d.ts +22 -0
  104. package/dist/daemon/index-coordinator.js +55 -0
  105. package/dist/daemon/index-coordinator.js.map +1 -0
  106. package/dist/daemon/job-scheduler.d.ts +85 -0
  107. package/dist/daemon/job-scheduler.js +492 -0
  108. package/dist/daemon/job-scheduler.js.map +1 -0
  109. package/dist/daemon/logger.d.ts +10 -0
  110. package/dist/daemon/logger.js +101 -0
  111. package/dist/daemon/logger.js.map +1 -0
  112. package/dist/daemon/model-pool.d.ts +48 -0
  113. package/dist/daemon/model-pool.js +190 -0
  114. package/dist/daemon/model-pool.js.map +1 -0
  115. package/dist/daemon/root-lease.d.ts +14 -0
  116. package/dist/daemon/root-lease.js +197 -0
  117. package/dist/daemon/root-lease.js.map +1 -0
  118. package/dist/daemon/root-runtime.d.ts +80 -0
  119. package/dist/daemon/root-runtime.js +340 -0
  120. package/dist/daemon/root-runtime.js.map +1 -0
  121. package/dist/daemon/runtime-manager.d.ts +47 -0
  122. package/dist/daemon/runtime-manager.js +252 -0
  123. package/dist/daemon/runtime-manager.js.map +1 -0
  124. package/dist/daemon/runtime.d.ts +12 -0
  125. package/dist/daemon/runtime.js +105 -0
  126. package/dist/daemon/runtime.js.map +1 -0
  127. package/dist/daemon/server-controller.d.ts +38 -0
  128. package/dist/daemon/server-controller.js +327 -0
  129. package/dist/daemon/server-controller.js.map +1 -0
  130. package/dist/daemon/watch-manager.d.ts +62 -0
  131. package/dist/daemon/watch-manager.js +415 -0
  132. package/dist/daemon/watch-manager.js.map +1 -0
  133. package/dist/daemon/workspace-read-session-cache.d.ts +31 -0
  134. package/dist/daemon/workspace-read-session-cache.js +115 -0
  135. package/dist/daemon/workspace-read-session-cache.js.map +1 -0
  136. package/dist/engine/code-formats.d.ts +3 -0
  137. package/dist/engine/code-formats.js +14 -0
  138. package/dist/engine/code-formats.js.map +1 -0
  139. package/dist/engine/config.d.ts +57 -0
  140. package/dist/engine/config.js +351 -0
  141. package/dist/engine/config.js.map +1 -0
  142. package/dist/engine/errors.d.ts +20 -0
  143. package/dist/engine/errors.js +51 -0
  144. package/dist/engine/errors.js.map +1 -0
  145. package/dist/engine/extraction/code/adapter.d.ts +19 -0
  146. package/dist/engine/extraction/code/adapter.js +24 -0
  147. package/dist/engine/extraction/code/adapter.js.map +1 -0
  148. package/dist/engine/extraction/code/extractor.d.ts +13 -0
  149. package/dist/engine/extraction/code/extractor.js +696 -0
  150. package/dist/engine/extraction/code/extractor.js.map +1 -0
  151. package/dist/engine/extraction/code/families/c-family.d.ts +2 -0
  152. package/dist/engine/extraction/code/families/c-family.js +122 -0
  153. package/dist/engine/extraction/code/families/c-family.js.map +1 -0
  154. package/dist/engine/extraction/code/families/js-ts.d.ts +12 -0
  155. package/dist/engine/extraction/code/families/js-ts.js +118 -0
  156. package/dist/engine/extraction/code/families/js-ts.js.map +1 -0
  157. package/dist/engine/extraction/code/families/metadata.d.ts +8 -0
  158. package/dist/engine/extraction/code/families/metadata.js +86 -0
  159. package/dist/engine/extraction/code/families/metadata.js.map +1 -0
  160. package/dist/engine/extraction/code/families/name-field.d.ts +3 -0
  161. package/dist/engine/extraction/code/families/name-field.js +22 -0
  162. package/dist/engine/extraction/code/families/name-field.js.map +1 -0
  163. package/dist/engine/extraction/code/languages/c.d.ts +1 -0
  164. package/dist/engine/extraction/code/languages/c.js +12 -0
  165. package/dist/engine/extraction/code/languages/c.js.map +1 -0
  166. package/dist/engine/extraction/code/languages/cpp.d.ts +1 -0
  167. package/dist/engine/extraction/code/languages/cpp.js +18 -0
  168. package/dist/engine/extraction/code/languages/cpp.js.map +1 -0
  169. package/dist/engine/extraction/code/languages/go.d.ts +2 -0
  170. package/dist/engine/extraction/code/languages/go.js +70 -0
  171. package/dist/engine/extraction/code/languages/go.js.map +1 -0
  172. package/dist/engine/extraction/code/languages/java.d.ts +1 -0
  173. package/dist/engine/extraction/code/languages/java.js +17 -0
  174. package/dist/engine/extraction/code/languages/java.js.map +1 -0
  175. package/dist/engine/extraction/code/languages/javascript.d.ts +2 -0
  176. package/dist/engine/extraction/code/languages/javascript.js +23 -0
  177. package/dist/engine/extraction/code/languages/javascript.js.map +1 -0
  178. package/dist/engine/extraction/code/languages/python.d.ts +2 -0
  179. package/dist/engine/extraction/code/languages/python.js +52 -0
  180. package/dist/engine/extraction/code/languages/python.js.map +1 -0
  181. package/dist/engine/extraction/code/languages/rust.d.ts +2 -0
  182. package/dist/engine/extraction/code/languages/rust.js +25 -0
  183. package/dist/engine/extraction/code/languages/rust.js.map +1 -0
  184. package/dist/engine/extraction/code/languages/typescript.d.ts +2 -0
  185. package/dist/engine/extraction/code/languages/typescript.js +37 -0
  186. package/dist/engine/extraction/code/languages/typescript.js.map +1 -0
  187. package/dist/engine/extraction/code/tree-sitter/grammar.d.ts +4 -0
  188. package/dist/engine/extraction/code/tree-sitter/grammar.js +49 -0
  189. package/dist/engine/extraction/code/tree-sitter/grammar.js.map +1 -0
  190. package/dist/engine/extraction/code/tree-sitter/nodes.d.ts +3 -0
  191. package/dist/engine/extraction/code/tree-sitter/nodes.js +27 -0
  192. package/dist/engine/extraction/code/tree-sitter/nodes.js.map +1 -0
  193. package/dist/engine/extraction/code/tree-sitter/parser.d.ts +2 -0
  194. package/dist/engine/extraction/code/tree-sitter/parser.js +31 -0
  195. package/dist/engine/extraction/code/tree-sitter/parser.js.map +1 -0
  196. package/dist/engine/extraction/ids.d.ts +1 -0
  197. package/dist/engine/extraction/ids.js +5 -0
  198. package/dist/engine/extraction/ids.js.map +1 -0
  199. package/dist/engine/extraction/image/extractor.d.ts +5 -0
  200. package/dist/engine/extraction/image/extractor.js +35 -0
  201. package/dist/engine/extraction/image/extractor.js.map +1 -0
  202. package/dist/engine/extraction/index.d.ts +4 -0
  203. package/dist/engine/extraction/index.js +3 -0
  204. package/dist/engine/extraction/index.js.map +1 -0
  205. package/dist/engine/extraction/markdown/extractor.d.ts +7 -0
  206. package/dist/engine/extraction/markdown/extractor.js +362 -0
  207. package/dist/engine/extraction/markdown/extractor.js.map +1 -0
  208. package/dist/engine/extraction/runtime.d.ts +9 -0
  209. package/dist/engine/extraction/runtime.js +37 -0
  210. package/dist/engine/extraction/runtime.js.map +1 -0
  211. package/dist/engine/extraction/source.d.ts +18 -0
  212. package/dist/engine/extraction/source.js +22 -0
  213. package/dist/engine/extraction/source.js.map +1 -0
  214. package/dist/engine/extraction/text/extractor.d.ts +7 -0
  215. package/dist/engine/extraction/text/extractor.js +168 -0
  216. package/dist/engine/extraction/text/extractor.js.map +1 -0
  217. package/dist/engine/extraction/types.d.ts +4 -0
  218. package/dist/engine/extraction/types.js +2 -0
  219. package/dist/engine/extraction/types.js.map +1 -0
  220. package/dist/engine/extraction/vector-content.d.ts +5 -0
  221. package/dist/engine/extraction/vector-content.js +83 -0
  222. package/dist/engine/extraction/vector-content.js.map +1 -0
  223. package/dist/engine/file-size-policy.d.ts +6 -0
  224. package/dist/engine/file-size-policy.js +20 -0
  225. package/dist/engine/file-size-policy.js.map +1 -0
  226. package/dist/engine/file-type.d.ts +15 -0
  227. package/dist/engine/file-type.js +152 -0
  228. package/dist/engine/file-type.js.map +1 -0
  229. package/dist/engine/index-status.d.ts +9 -0
  230. package/dist/engine/index-status.js +38 -0
  231. package/dist/engine/index-status.js.map +1 -0
  232. package/dist/engine/manifest.d.ts +13 -0
  233. package/dist/engine/manifest.js +124 -0
  234. package/dist/engine/manifest.js.map +1 -0
  235. package/dist/engine/models/artifact-cache-lock.d.ts +16 -0
  236. package/dist/engine/models/artifact-cache-lock.js +228 -0
  237. package/dist/engine/models/artifact-cache-lock.js.map +1 -0
  238. package/dist/engine/models/artifact-downloader.d.ts +77 -0
  239. package/dist/engine/models/artifact-downloader.js +766 -0
  240. package/dist/engine/models/artifact-downloader.js.map +1 -0
  241. package/dist/engine/models/backends/llama-cpp.d.ts +100 -0
  242. package/dist/engine/models/backends/llama-cpp.js +567 -0
  243. package/dist/engine/models/backends/llama-cpp.js.map +1 -0
  244. package/dist/engine/models/backends/model2vec-runtime.d.ts +63 -0
  245. package/dist/engine/models/backends/model2vec-runtime.js +112 -0
  246. package/dist/engine/models/backends/model2vec-runtime.js.map +1 -0
  247. package/dist/engine/models/backends/model2vec-tokenizer.d.ts +2 -0
  248. package/dist/engine/models/backends/model2vec-tokenizer.js +42 -0
  249. package/dist/engine/models/backends/model2vec-tokenizer.js.map +1 -0
  250. package/dist/engine/models/backends/model2vec-worker-pool.d.ts +25 -0
  251. package/dist/engine/models/backends/model2vec-worker-pool.js +264 -0
  252. package/dist/engine/models/backends/model2vec-worker-pool.js.map +1 -0
  253. package/dist/engine/models/backends/model2vec-worker.d.ts +1 -0
  254. package/dist/engine/models/backends/model2vec-worker.js +41 -0
  255. package/dist/engine/models/backends/model2vec-worker.js.map +1 -0
  256. package/dist/engine/models/backends/model2vec.d.ts +38 -0
  257. package/dist/engine/models/backends/model2vec.js +344 -0
  258. package/dist/engine/models/backends/model2vec.js.map +1 -0
  259. package/dist/engine/models/backends/qwen.d.ts +44 -0
  260. package/dist/engine/models/backends/qwen.js +411 -0
  261. package/dist/engine/models/backends/qwen.js.map +1 -0
  262. package/dist/engine/models/backends/transformers-js.d.ts +90 -0
  263. package/dist/engine/models/backends/transformers-js.js +411 -0
  264. package/dist/engine/models/backends/transformers-js.js.map +1 -0
  265. package/dist/engine/models/catalog.d.ts +490 -0
  266. package/dist/engine/models/catalog.js +522 -0
  267. package/dist/engine/models/catalog.js.map +1 -0
  268. package/dist/engine/models/download-progress.d.ts +16 -0
  269. package/dist/engine/models/download-progress.js +47 -0
  270. package/dist/engine/models/download-progress.js.map +1 -0
  271. package/dist/engine/models/embeddings.d.ts +73 -0
  272. package/dist/engine/models/embeddings.js +125 -0
  273. package/dist/engine/models/embeddings.js.map +1 -0
  274. package/dist/engine/models/factory.d.ts +2 -0
  275. package/dist/engine/models/factory.js +51 -0
  276. package/dist/engine/models/factory.js.map +1 -0
  277. package/dist/engine/models/index.d.ts +5 -0
  278. package/dist/engine/models/index.js +6 -0
  279. package/dist/engine/models/index.js.map +1 -0
  280. package/dist/engine/models/local-embedding-parallelism.d.ts +15 -0
  281. package/dist/engine/models/local-embedding-parallelism.js +63 -0
  282. package/dist/engine/models/local-embedding-parallelism.js.map +1 -0
  283. package/dist/engine/models/local-embedding-queue.d.ts +12 -0
  284. package/dist/engine/models/local-embedding-queue.js +65 -0
  285. package/dist/engine/models/local-embedding-queue.js.map +1 -0
  286. package/dist/engine/models/ranking.d.ts +19 -0
  287. package/dist/engine/models/ranking.js +2 -0
  288. package/dist/engine/models/ranking.js.map +1 -0
  289. package/dist/engine/models/resolution.d.ts +8 -0
  290. package/dist/engine/models/resolution.js +22 -0
  291. package/dist/engine/models/resolution.js.map +1 -0
  292. package/dist/engine/pipeline/indexing/index.d.ts +14 -0
  293. package/dist/engine/pipeline/indexing/index.js +1219 -0
  294. package/dist/engine/pipeline/indexing/index.js.map +1 -0
  295. package/dist/engine/pipeline/indexing/input-budget.d.ts +2 -0
  296. package/dist/engine/pipeline/indexing/input-budget.js +51 -0
  297. package/dist/engine/pipeline/indexing/input-budget.js.map +1 -0
  298. package/dist/engine/pipeline/indexing/root-paths.d.ts +7 -0
  299. package/dist/engine/pipeline/indexing/root-paths.js +148 -0
  300. package/dist/engine/pipeline/indexing/root-paths.js.map +1 -0
  301. package/dist/engine/pipeline/indexing/scanner/index.d.ts +14 -0
  302. package/dist/engine/pipeline/indexing/scanner/index.js +776 -0
  303. package/dist/engine/pipeline/indexing/scanner/index.js.map +1 -0
  304. package/dist/engine/pipeline/search/index.d.ts +12 -0
  305. package/dist/engine/pipeline/search/index.js +811 -0
  306. package/dist/engine/pipeline/search/index.js.map +1 -0
  307. package/dist/engine/service/index.d.ts +3 -0
  308. package/dist/engine/service/index.js +2 -0
  309. package/dist/engine/service/index.js.map +1 -0
  310. package/dist/engine/service/lexical.d.ts +28 -0
  311. package/dist/engine/service/lexical.js +446 -0
  312. package/dist/engine/service/lexical.js.map +1 -0
  313. package/dist/engine/service/root.d.ts +15 -0
  314. package/dist/engine/service/root.js +57 -0
  315. package/dist/engine/service/root.js.map +1 -0
  316. package/dist/engine/service/structure-enrichment.d.ts +8 -0
  317. package/dist/engine/service/structure-enrichment.js +178 -0
  318. package/dist/engine/service/structure-enrichment.js.map +1 -0
  319. package/dist/engine/service/types.d.ts +212 -0
  320. package/dist/engine/service/types.js +2 -0
  321. package/dist/engine/service/types.js.map +1 -0
  322. package/dist/engine/service/workspace-index.d.ts +26 -0
  323. package/dist/engine/service/workspace-index.js +157 -0
  324. package/dist/engine/service/workspace-index.js.map +1 -0
  325. package/dist/engine/service/zvec-grep.d.ts +15 -0
  326. package/dist/engine/service/zvec-grep.js +1520 -0
  327. package/dist/engine/service/zvec-grep.js.map +1 -0
  328. package/dist/engine/storage/index.d.ts +53 -0
  329. package/dist/engine/storage/index.js +3 -0
  330. package/dist/engine/storage/index.js.map +1 -0
  331. package/dist/engine/storage/layout.d.ts +10 -0
  332. package/dist/engine/storage/layout.js +29 -0
  333. package/dist/engine/storage/layout.js.map +1 -0
  334. package/dist/engine/storage/zvec.d.ts +4 -0
  335. package/dist/engine/storage/zvec.js +976 -0
  336. package/dist/engine/storage/zvec.js.map +1 -0
  337. package/dist/engine/types.d.ts +303 -0
  338. package/dist/engine/types.js +14 -0
  339. package/dist/engine/types.js.map +1 -0
  340. package/dist/engine/utils/atomic-file.d.ts +3 -0
  341. package/dist/engine/utils/atomic-file.js +39 -0
  342. package/dist/engine/utils/atomic-file.js.map +1 -0
  343. package/dist/engine/utils/daemon-lease.d.ts +17 -0
  344. package/dist/engine/utils/daemon-lease.js +175 -0
  345. package/dist/engine/utils/daemon-lease.js.map +1 -0
  346. package/dist/engine/utils/file-selection.d.ts +10 -0
  347. package/dist/engine/utils/file-selection.js +157 -0
  348. package/dist/engine/utils/file-selection.js.map +1 -0
  349. package/dist/engine/utils/glob.d.ts +9 -0
  350. package/dist/engine/utils/glob.js +208 -0
  351. package/dist/engine/utils/glob.js.map +1 -0
  352. package/dist/engine/utils/hash.d.ts +2 -0
  353. package/dist/engine/utils/hash.js +8 -0
  354. package/dist/engine/utils/hash.js.map +1 -0
  355. package/dist/engine/utils/json.d.ts +8 -0
  356. package/dist/engine/utils/json.js +83 -0
  357. package/dist/engine/utils/json.js.map +1 -0
  358. package/dist/engine/utils/lock.d.ts +19 -0
  359. package/dist/engine/utils/lock.js +254 -0
  360. package/dist/engine/utils/lock.js.map +1 -0
  361. package/dist/engine/utils/path.d.ts +4 -0
  362. package/dist/engine/utils/path.js +18 -0
  363. package/dist/engine/utils/path.js.map +1 -0
  364. package/dist/engine/utils/timing.d.ts +19 -0
  365. package/dist/engine/utils/timing.js +87 -0
  366. package/dist/engine/utils/timing.js.map +1 -0
  367. package/dist/index-progress.d.ts +10 -0
  368. package/dist/index-progress.js +159 -0
  369. package/dist/index-progress.js.map +1 -0
  370. package/dist/index.d.ts +6 -0
  371. package/dist/index.js +4 -0
  372. package/dist/index.js.map +1 -0
  373. package/dist/mcp/http-transport.d.ts +27 -0
  374. package/dist/mcp/http-transport.js +182 -0
  375. package/dist/mcp/http-transport.js.map +1 -0
  376. package/dist/mcp/input-normalization.d.ts +38 -0
  377. package/dist/mcp/input-normalization.js +104 -0
  378. package/dist/mcp/input-normalization.js.map +1 -0
  379. package/dist/mcp/progress-heartbeat.d.ts +17 -0
  380. package/dist/mcp/progress-heartbeat.js +46 -0
  381. package/dist/mcp/progress-heartbeat.js.map +1 -0
  382. package/dist/mcp/request-metadata.d.ts +2 -0
  383. package/dist/mcp/request-metadata.js +11 -0
  384. package/dist/mcp/request-metadata.js.map +1 -0
  385. package/dist/mcp/request-state.d.ts +40 -0
  386. package/dist/mcp/request-state.js +210 -0
  387. package/dist/mcp/request-state.js.map +1 -0
  388. package/dist/mcp/result-format.d.ts +13 -0
  389. package/dist/mcp/result-format.js +75 -0
  390. package/dist/mcp/result-format.js.map +1 -0
  391. package/dist/mcp/schemas.d.ts +668 -0
  392. package/dist/mcp/schemas.js +512 -0
  393. package/dist/mcp/schemas.js.map +1 -0
  394. package/dist/mcp/stdio-bridge.d.ts +15 -0
  395. package/dist/mcp/stdio-bridge.js +190 -0
  396. package/dist/mcp/stdio-bridge.js.map +1 -0
  397. package/dist/mcp/tools.d.ts +153 -0
  398. package/dist/mcp/tools.js +488 -0
  399. package/dist/mcp/tools.js.map +1 -0
  400. package/dist/mcp/toolset.d.ts +5 -0
  401. package/dist/mcp/toolset.js +12 -0
  402. package/dist/mcp/toolset.js.map +1 -0
  403. package/dist/observability/trace-context.d.ts +11 -0
  404. package/dist/observability/trace-context.js +138 -0
  405. package/dist/observability/trace-context.js.map +1 -0
  406. package/dist/prompts/zvec-grep-guidance.d.ts +2 -0
  407. package/dist/prompts/zvec-grep-guidance.js +9 -0
  408. package/dist/prompts/zvec-grep-guidance.js.map +1 -0
  409. package/docs/01-agents.md +217 -0
  410. package/docs/02-cli.md +259 -0
  411. package/docs/03-mcp.md +185 -0
  412. package/docs/04-pipeline.md +234 -0
  413. package/docs/05-architecture.md +86 -0
  414. package/docs/06-server.md +279 -0
  415. package/docs/07-embedding.md +227 -0
  416. package/docs/08-roadmap.md +85 -0
  417. package/docs/README.md +53 -0
  418. package/package.json +87 -0
@@ -0,0 +1,279 @@
1
+ # Server and execution modes
2
+
3
+ [Documentation](./README.md) · [Agents](./01-agents.md) ·
4
+ [CLI](./02-cli.md) · [MCP](./03-mcp.md) · [Pipeline](./04-pipeline.md) ·
5
+ [Architecture](./05-architecture.md) · [Server](./06-server.md) ·
6
+ [Embedding](./07-embedding.md) · [Roadmap](./08-roadmap.md)
7
+
8
+ The zvec-grep Server is a local daemon shared by agents and terminal commands.
9
+ It keeps the MCP endpoint available, coordinates active Workspace runtimes,
10
+ supports background index refresh, and can reuse loaded Embedding models across
11
+ requests.
12
+
13
+ You do not need the Server for every use of zg. Exact managed ripgrep and
14
+ indexed operations can also run directly in the current process.
15
+
16
+ ## Choose an execution mode
17
+
18
+ Indexed CLI commands accept `--mode auto|server|direct`.
19
+
20
+ | Mode | Use it when | Behavior |
21
+ | --- | --- | --- |
22
+ | `auto` | Almost all terminal use | Use a ready Server; otherwise run Direct before submitting the operation |
23
+ | `server` | A script requires the daemon, shared state, or background refresh | Require the Server and fail if it is unavailable |
24
+ | `direct` | One-off use, CI, foreground debugging, or no daemon is desired | Run entirely in the current process |
25
+
26
+ `auto` is the default and the recommended mode for people. It does not start a
27
+ missing Server; it simply chooses the Server when one is already ready.
28
+
29
+ Use Server mode when:
30
+
31
+ - an Agent connects through MCP;
32
+ - indexed searches happen repeatedly across sessions;
33
+ - background refresh should keep an active Workspace current;
34
+ - multiple requests can benefit from a shared loaded model;
35
+ - operational tooling needs an explicit ready/not-ready contract.
36
+
37
+ Use Direct mode when:
38
+
39
+ - a command is an isolated one-off operation;
40
+ - a CI job should not leave a daemon running;
41
+ - you want foreground failures and resource lifetime tied to one process.
42
+
43
+ Managed `zg --rg` does not need an index or loaded Embedding model. It
44
+ runs locally regardless of whether a Server is available.
45
+
46
+ ## Agent setup
47
+
48
+ `zg --install` configures the selected Agent and starts the Server when possible:
49
+
50
+ ```bash
51
+ zg --install
52
+ ```
53
+
54
+ Most Agent users therefore never need to run `zg --server on` manually. Restart
55
+ the Agent or open a new session after installation so it discovers the MCP
56
+ endpoint.
57
+
58
+ Set `ZVEC_GREP_INSTALL_SKIP_SERVER=1` only when another process manager will
59
+ start the Server separately.
60
+
61
+ See [Agent integrations](./01-agents.md) for managed configuration and
62
+ [MCP](./03-mcp.md) for the exposed tools.
63
+
64
+ ## Server lifecycle
65
+
66
+ Start the background daemon:
67
+
68
+ ```bash
69
+ zg --server on
70
+ ```
71
+
72
+ Inspect process readiness, endpoint, PID, and MCP toolset:
73
+
74
+ ```bash
75
+ zg --server status
76
+ zg --server status --check-ready
77
+ ```
78
+
79
+ `--check-ready` preserves normal output and exits non-zero unless the Server is
80
+ ready, making it suitable for scripts and health checks.
81
+
82
+ Stop the daemon gracefully:
83
+
84
+ ```bash
85
+ zg --server off
86
+ ```
87
+
88
+ The shutdown endpoint accepts native clients without an `Origin` header. When
89
+ `Origin` is present, its scheme, hostname, and port must match the request's
90
+ loopback authority, and that authority must use the daemon's actual listening
91
+ port. Pages on other local ports cannot request shutdown. Opaque (`null`), empty,
92
+ duplicate, and malformed origins are rejected before shutdown runs. Optional
93
+ Bearer authentication still applies to every shutdown request when configured;
94
+ native CLI and agent clients need no additional configuration.
95
+
96
+ MCP endpoints retain support for other HTTP loopback origins. Both MCP and
97
+ shutdown reject malformed origins and invalid or duplicate Host authorities.
98
+
99
+ Run it in the foreground for logs or process supervision:
100
+
101
+ ```bash
102
+ zg --server run
103
+ ```
104
+
105
+ Only one Server instance can own a given zvec-grep home. If a running Server
106
+ uses the wrong MCP toolset, stop it before restarting with the new profile:
107
+
108
+ ```bash
109
+ zg --server off
110
+ zg --server on --mcp-toolset full
111
+ ```
112
+
113
+ The Server releases a Workspace watcher and its lightweight runtime after four
114
+ hours without a client request or a relevant file-system change. Periodic
115
+ reconciliation does not extend this idle deadline. To select another timeout,
116
+ set the number of seconds before starting or restarting the Server:
117
+
118
+ ```bash
119
+ export ZVEC_GREP_WATCHER_IDLE_TIMEOUT_SECONDS=7200
120
+ zg server off
121
+ zg server on
122
+ ```
123
+
124
+ Set the value to `0` to keep activated watchers until the Server stops.
125
+
126
+ ## Configure the mode
127
+
128
+ Choose a mode for one command:
129
+
130
+ ```bash
131
+ zg --mode direct "root-local index discovery"
132
+ zg --status --mode server --check-ready
133
+ ```
134
+
135
+ Set an environment default:
136
+
137
+ ```bash
138
+ export ZVEC_GREP_MODE=auto
139
+ ```
140
+
141
+ Or set `client.mode` in `~/.zvec-grep/config.json`:
142
+
143
+ ```json
144
+ {
145
+ "version": 1,
146
+ "client": {
147
+ "mode": "auto"
148
+ }
149
+ }
150
+ ```
151
+
152
+ An explicit `--mode` wins over the environment and global configuration.
153
+
154
+ ## Refresh behavior
155
+
156
+ The execution mode changes the default indexed-search refresh policy:
157
+
158
+ | Policy | Server | Direct |
159
+ | --- | --- | --- |
160
+ | Default | `background` | `off` |
161
+ | `--refresh background` | Return current results and schedule an update | Warn and behave as `off` |
162
+ | `--refresh wait` | Wait for a fresh index | Update and wait in the current process |
163
+ | `--refresh off` | Search without updating | Search without updating |
164
+
165
+ Server searches return `freshness: possibly_stale` only with evidence of index
166
+ drift. The first refresh after activation may use this conservative status; an
167
+ hourly reconciliation remains `fresh` until its probe finds a mismatch. Use
168
+ `--refresh wait` only when the latest file state is required.
169
+
170
+ Watcher-reported path updates skip workspace-wide status scans. Because
171
+ file-system watchers can silently miss events, the Server schedules an hourly
172
+ full reconciliation probe; the next search uses it to scan the Workspace and
173
+ repair index drift.
174
+
175
+ Large bursts of exact watcher events are compacted into directory-scoped
176
+ updates. A full reconciliation is reserved for watcher errors, missing event
177
+ paths, resume drift, and other cases where events may have been lost.
178
+
179
+ ## Endpoint and toolset
180
+
181
+ The default endpoint is:
182
+
183
+ ```text
184
+ http://127.0.0.1:7999/mcp
185
+ ```
186
+
187
+ The Server only accepts loopback listen addresses. Change the loopback address
188
+ or port with:
189
+
190
+ ```bash
191
+ zg --server on --listen 127.0.0.1:8999
192
+ ```
193
+
194
+ Set `ZVEC_GREP_SERVER_URL` when a client should use a non-default configured
195
+ endpoint.
196
+
197
+ The default `agent` MCP toolset exposes only `zvec_grep_search`. Use
198
+ `--mcp-toolset full` or `ZVEC_GREP_MCP_TOOLSET=full` to expose optional managed
199
+ rg together with the index and status tools. See [MCP](./03-mcp.md) for the tool
200
+ contract.
201
+
202
+ ## Bearer authentication
203
+
204
+ Authentication is disabled by default because the Server is loopback-only. To
205
+ require a token, provide at least 32 characters through the environment or a
206
+ file:
207
+
208
+ ```bash
209
+ export ZVEC_GREP_SERVER_TOKEN="replace-with-a-long-random-token"
210
+ zg --server on
211
+ ```
212
+
213
+ ```bash
214
+ zg --server on --token-file /secure/path/zvec-grep.token
215
+ ```
216
+
217
+ Clients can use `ZVEC_GREP_SERVER_TOKEN` or `ZVEC_GREP_SERVER_TOKEN_FILE`.
218
+ Supported Agent integrations can reference an environment-backed token:
219
+
220
+ ```bash
221
+ zg --install \
222
+ --target codex \
223
+ --mcp-token-env ZVEC_GREP_SERVER_TOKEN \
224
+ --yes
225
+ ```
226
+
227
+ The MCP Bearer token protects the local Server. It does not configure an
228
+ Embedding provider or authorize remote data transfer.
229
+
230
+ ## Logs and state
231
+
232
+ The default daemon directory is `~/.zvec-grep/daemon/`. Its structured JSON
233
+ Lines log is written to:
234
+
235
+ ```text
236
+ ~/.zvec-grep/daemon/logs/server.log
237
+ ```
238
+
239
+ Credential, authorization, token, API-key, and query fields are filtered from
240
+ daemon log records. Repository identities are logged opaquely rather than as
241
+ raw paths where identity is sufficient.
242
+
243
+ Use `ZVEC_GREP_HOME` to relocate Server state. Check `zg --server status` before
244
+ reading logs; routine searches do not need a status preflight.
245
+
246
+ ## Daemon logs
247
+
248
+ The daemon writes JSON lines to `~/.zvec-grep/daemon/logs/server.log`.
249
+ Size-based rotation is enabled by default: 10 MiB per file and five backups,
250
+ numbered `server.log.1` (newest) through `server.log.5` (oldest). The oldest
251
+ backup is removed on rotation. File writes and rotation use `rotating-file-stream`.
252
+ Surplus numbered backups are removed when the logger opens after reducing `keep`.
253
+ Existing logs are checked on the first write
254
+ following a restart. Rotation happens after a complete record brings the file to
255
+ or above the limit; the new active file may therefore be empty. Each JSON record
256
+ is kept intact, so a rotated file may exceed the limit by one record.
257
+
258
+ Configure logging in `~/.zvec-grep/config.json`, preserving your other settings:
259
+
260
+ ```json
261
+ {
262
+ "version": 1,
263
+ "log": {
264
+ "maxBytes": 10485760,
265
+ "keep": 5,
266
+ "level": "info"
267
+ }
268
+ }
269
+ ```
270
+
271
+ `maxBytes` must be a positive safe integer; `keep` must be a non-negative safe
272
+ integer and counts backups in addition to the active file. Setting `keep` to
273
+ `0` removes the temporary backup after rotation completes.
274
+ Restart the daemon after changing these settings.
275
+
276
+ Successful `GET /healthz` completion events have level `debug` and are omitted
277
+ at the default `info` level. Set `level` to `debug` to include them for diagnostics.
278
+ Unsuccessful health checks and other requests continue to be logged at `info`.
279
+ Each record includes a `level` field alongside the existing event fields.
@@ -0,0 +1,227 @@
1
+ # Embedding models
2
+
3
+ [Documentation](./README.md) · [Agents](./01-agents.md) ·
4
+ [CLI](./02-cli.md) · [MCP](./03-mcp.md) · [Pipeline](./04-pipeline.md) ·
5
+ [Architecture](./05-architecture.md) · [Server](./06-server.md) ·
6
+ [Embedding](./07-embedding.md) · [Roadmap](./08-roadmap.md)
7
+
8
+ The Embedding model determines the vector representation used by indexed
9
+ search. It affects language coverage, memory use, index size, input length, and
10
+ indexing speed. A new index selects an explicit model, an environment default,
11
+ or a configured default, and otherwise uses the built-in local default:
12
+
13
+ ```bash
14
+ zg --index --embedding local/potion-code-16m-v2
15
+ ```
16
+
17
+ Local models keep workspace content and query text on the machine. Their files
18
+ are downloaded from Hugging Face on first use and cached under
19
+ `~/.zvec-grep/models` by default. If a pinned Hugging Face artifact cannot be
20
+ downloaded, zvec-grep automatically falls back to its pinned, integrity-checked
21
+ ModelScope copy. A complete ModelScope snapshot is reused on later runs without
22
+ retrying Hugging Face. ModelScope downloads use a separate `modelscope` cache
23
+ subdirectory.
24
+
25
+ Remote models avoid local inference but send disclosed query or workspace
26
+ content to the configured provider after authorization.
27
+
28
+ A first search without an index always creates one with a local model. It
29
+ respects a configured local default but does not implicitly use a remote
30
+ default. Select and authorize a remote model explicitly with `zg --index`.
31
+
32
+ ## Quick selection
33
+
34
+ | Need | Start with | Why |
35
+ | --- | --- | --- |
36
+ | A fast first index for a code repository | `local/potion-code-16m-v2` | Small static Model2Vec model with a 1,024-token input limit |
37
+ | Fast English document retrieval | `local/potion-retrieval-32m` | Retrieval-tuned static model with 512-dimensional vectors |
38
+ | Fast multilingual document retrieval | `local/potion-multilingual-128m` | Static model trained for 101 languages with compact 256-dimensional vectors |
39
+ | A Transformer model specialized for code | `local/jina-embeddings-v2-base-code` | Code-oriented, multilingual, and long-context |
40
+ | General multilingual code and documents | `local/embeddinggemma-300m` | Broad language coverage in a local GGUF model |
41
+ | A smaller multilingual model | `local/multilingual-e5-small` | Compact 384-dimensional Transformer model |
42
+ | A lightweight English model | `local/all-minilm-l6-v2` | Small local model for short English text |
43
+ | Long English documents | `local/gte-modernbert-base` or `local/nomic-embed-text-v1.5` | 8,192-token local context |
44
+ | No local model runtime | `qwen/qwen3.7-text-embedding` | Managed text Embedding API |
45
+ | Text and image retrieval | `qwen/qwen3-vl-embedding` | Managed multimodal Embedding API |
46
+
47
+ The best model still depends on the repository and its real queries. Start with
48
+ the smallest model that covers the required languages and input length, then
49
+ compare representative results before committing to a larger model.
50
+
51
+ ## Supported models
52
+
53
+ The input limit applies to each extracted entity or fragment, not the entire
54
+ file.
55
+
56
+ | Model | Runtime | Max input tokens | Dimensions |
57
+ | --- | --- | ---: | ---: |
58
+ | `local/potion-code-16m-v2` | Model2Vec FP16 | 1,024 | 256 |
59
+ | `local/potion-retrieval-32m` | Model2Vec FP32 | 1,024 | 512 |
60
+ | `local/potion-multilingual-128m` | Model2Vec FP32 | 1,024 | 256 |
61
+ | `local/all-minilm-l6-v2` | ONNX Q4 | 256 | 384 |
62
+ | `local/bge-small-en-v1.5` | ONNX Q4 | 512 | 384 |
63
+ | `local/multilingual-e5-small` | ONNX Q8 | 512 | 384 |
64
+ | `local/jina-embeddings-v2-base-code` | ONNX Q8 | 8,192 | 768 |
65
+ | `local/gte-modernbert-base` | ONNX Q4 | 8,192 | 768 |
66
+ | `local/nomic-embed-text-v1.5` | ONNX Q4 | 8,192 | 768 |
67
+ | `local/embeddinggemma-300m` | GGUF Q8_0 | 2,048 | 768 |
68
+ | `local/qwen3-embedding-0.6b` | GGUF Q8_0 | 8,192 | 1,024 |
69
+ | `qwen/text-embedding-v4` | Remote text | 8,192 | 1,024 |
70
+ | `qwen/qwen3.7-text-embedding` | Remote text | 128,000 | 1,024 |
71
+ | `qwen/qwen3-vl-embedding` | Remote multimodal | 32,000 | 2,560 |
72
+
73
+ All catalog entries currently use cosine similarity. Exact model revisions are
74
+ pinned by zvec-grep so the same reference resolves consistently for a given
75
+ release.
76
+
77
+ ## Configure a default model
78
+
79
+ Set a default for new indexes:
80
+
81
+ ```bash
82
+ zg --config model set local/potion-code-16m-v2 --default
83
+ zg --index
84
+ ```
85
+
86
+ `ZVEC_GREP_EMBEDDING` provides a process-level default that takes priority over
87
+ the configured global default for new indexes:
88
+
89
+ ```bash
90
+ export ZVEC_GREP_EMBEDDING=local/potion-code-16m-v2
91
+ zg --index
92
+ ```
93
+
94
+ An existing index always reuses its stored provider, model, dimensions, and
95
+ metric unless `--embedding` and `--rebuild` explicitly change them. `zg --index`
96
+ forwards the current CLI environment default in server and auto modes; direct
97
+ MCP calls use the environment inherited by the daemon.
98
+
99
+ ## Local runtime and device
100
+
101
+ Select a device for local Transformer and GGUF models:
102
+
103
+ ```bash
104
+ zg --index \
105
+ --embedding local/jina-embeddings-v2-base-code \
106
+ --device auto
107
+ ```
108
+
109
+ Supported values are `auto`, `cpu`, `metal`, `vulkan`, and `cuda`. Save a model
110
+ preference globally with:
111
+
112
+ ```bash
113
+ zg --config model set local/jina-embeddings-v2-base-code --device metal
114
+ ```
115
+
116
+ The equivalent environment override is `ZVEC_GREP_DEVICE`. Model2Vec models
117
+ such as Potion use static vector lookup, so selecting a GPU does not improve
118
+ their runtime.
119
+
120
+ For ONNX models using Transformers.js, `auto` uses the runtime's Node default
121
+ (CPU). Select a GPU device explicitly when its hardware and runtime libraries
122
+ are available. GGUF models retain their own automatic device selection.
123
+
124
+ If Transformers.js cannot initialize a model, indexing stops instead of
125
+ retrying the same load for every file. Correct the model or device configuration
126
+ and restart the process or daemon before retrying; a failed first ONNX session
127
+ can leave the runtime unusable for the rest of the process. For a GPU
128
+ initialization error, restart and use `--device cpu` (or configure
129
+ `ZVEC_GREP_DEVICE=cpu` in the daemon environment when no saved device overrides
130
+ it). GPU inference failures after a successful initialization can still fall
131
+ back to CPU. Model warnings are retained in the daemon log as `model.warning`
132
+ events as well as sent through live progress.
133
+
134
+ Override the download cache with `--model-cache` or `ZVEC_GREP_MODEL_CACHE`:
135
+
136
+ ```bash
137
+ zg --index \
138
+ --embedding local/potion-code-16m-v2 \
139
+ --model-cache /path/to/model-cache
140
+ ```
141
+
142
+ ## Remote Embedding and authorization
143
+
144
+ Configure the Qwen provider credential and, optionally, a model endpoint:
145
+
146
+ ```bash
147
+ zg --config provider set qwen --api-key "$DASHSCOPE_API_KEY"
148
+ zg --config model set qwen/text-embedding-v4 --default
149
+ ```
150
+
151
+ One-off values can be passed directly or through `ZVEC_GREP_API_KEY` and
152
+ `ZVEC_GREP_ENDPOINT`:
153
+
154
+ ```bash
155
+ zg --index \
156
+ --embedding qwen/text-embedding-v4 \
157
+ --api-key "$DASHSCOPE_API_KEY" \
158
+ --allow-remote
159
+ ```
160
+
161
+ Credentials configure access to a provider; they do not authorize data
162
+ transfer. `--allow-remote` authorizes Remote Embedding only for the current
163
+ command. To create a signed Workspace grant shared by the CLI and MCP server:
164
+
165
+ ```bash
166
+ zg --auth grant \
167
+ --capability embedding \
168
+ --scope workspace \
169
+ --embedding qwen/text-embedding-v4
170
+
171
+ zg --auth status
172
+ zg --auth revoke
173
+ ```
174
+
175
+ Before granting access, confirm that the workspace content is permitted to be
176
+ sent to the selected provider and endpoint. MCP tool approval is separate from
177
+ this data authorization.
178
+
179
+ When Qoder CLI reports that it has no handler for `elicitation/create`, or
180
+ declines or cancels without displaying the form, the `AGENTS.md` guidance
181
+ installed by `zg --install --target qoder` uses the exact `AskUserQuestion` tool
182
+ as a compatibility path. It offers workspace approval, local FTS only, or
183
+ cancel.
184
+
185
+ Qoder IDE uses the exact native tool name `ask_user_question`. Because Qoder IDE
186
+ does not provide a supported global Rules location, the installer does not
187
+ write equivalent IDE guidance. In stdio mode, the zvec-grep bridge instead
188
+ turns a missing `elicitation/create` handler into an actionable error directing
189
+ the top-level IDE agent to present the same choices with `ask_user_question`.
190
+ This path still requires an end-to-end smoke test in a real Qoder IDE session.
191
+
192
+ Either path runs the Workspace grant only after explicit approval and retries
193
+ the original MCP search once. Choosing local FTS instead removes
194
+ vector-producing query routes, sets `autoUpdate` to `false`, and keeps retrieval
195
+ local without refreshing the remote-embedding index; a headless session never
196
+ grants access automatically. Neither question tool should collect a token, API
197
+ key, or password. `--allow-remote` is not a substitute for this path because it
198
+ authorizes only the current CLI command, not a later MCP retry.
199
+
200
+ ## Input length and truncation
201
+
202
+ zvec-grep uses the selected model's input limit when it creates fragments, but
203
+ characters and tokens do not map one-to-one across languages. If an extracted
204
+ input still exceeds the model limit, the provider truncates it and the index
205
+ records the count.
206
+
207
+ Inspect the index after changing models or file scope:
208
+
209
+ ```bash
210
+ zg --status
211
+ ```
212
+
213
+ Prefer a model with a larger input limit or narrow the indexed content when
214
+ `truncated_fragments` is unexpectedly high.
215
+
216
+ ## Change models
217
+
218
+ Vector spaces from different models are incompatible, even when their
219
+ dimensions match. Rebuild explicitly when changing models:
220
+
221
+ ```bash
222
+ zg --index --rebuild --embedding local/jina-embeddings-v2-base-code
223
+ ```
224
+
225
+ Changing a remote endpoint also requires a rebuild because the endpoint is part
226
+ of the stored index schema. API key and local device changes affect runtime and
227
+ do not require rebuilding the vectors.
@@ -0,0 +1,85 @@
1
+ # Roadmap
2
+
3
+ [Documentation](./README.md) · [Agents](./01-agents.md) ·
4
+ [CLI](./02-cli.md) · [MCP](./03-mcp.md) · [Pipeline](./04-pipeline.md) ·
5
+ [Architecture](./05-architecture.md) · [Server](./06-server.md) ·
6
+ [Embedding](./07-embedding.md) · [Roadmap](./08-roadmap.md)
7
+
8
+ zvec-grep is under active development. The destination is one dependable,
9
+ local-first search layer that people and agents can use without choosing among
10
+ separate retrieval tools. This roadmap describes direction, not promised dates;
11
+ priorities may change as we learn from real workloads.
12
+
13
+ ## Now — make the public preview dependable
14
+
15
+ - Make installation, updates, and removal reliable across current platforms and
16
+ agent integrations.
17
+ - Harden incremental indexing, freshness, Server recovery, and concurrent
18
+ workspace access.
19
+ - Establish reproducible search-quality, performance, and agent-context
20
+ evaluation.
21
+ - Stabilize the CLI, MCP contracts, configuration, diagnostics, and index
22
+ compatibility policy before a stable release.
23
+
24
+ ## Product direction
25
+
26
+ The following four directions are part of the product vision, not optional
27
+ experiments. Their sequencing may change, but each is required for zg to become
28
+ the search layer we want it to be.
29
+
30
+ ### 1. Search more data formats, natively
31
+
32
+ - Make PDF, PowerPoint (`.ppt` and `.pptx`), HTML, images, and other multimodal
33
+ documents first-class searchable inputs.
34
+ - Add format-aware extraction that preserves useful structure, layout, metadata,
35
+ and relationships instead of flattening every file into plain text.
36
+ - Combine text extraction, OCR, vision-language understanding, and multimodal
37
+ Embedding where each format benefits from them.
38
+ - Use format- and content-aware retrieval so zg can choose a smarter strategy
39
+ for each query and source.
40
+
41
+ ### 2. Strengthen retrieval
42
+
43
+ - Add knowledge-graph construction and graph retrieval to complement BM25,
44
+ vector search, and managed ripgrep.
45
+ - Expand multi-route hybrid retrieval across lexical, vector, graph, structural,
46
+ and metadata signals.
47
+ - Improve query planning so people and agents can express intent without
48
+ manually choosing retrieval routes.
49
+ - Improve fusion, reranking, evaluation, and explainability while keeping the
50
+ returned context compact.
51
+
52
+ ### 3. Make zg more out of the box
53
+
54
+ - Provide a local GUI for search, workspace management, indexing, model setup,
55
+ permissions, and diagnostics.
56
+ - Support more installation paths beyond npm, including platform-native package
57
+ managers and installers where appropriate.
58
+ - Make first-run setup, Agent discovery, model selection, updates, and recovery
59
+ increasingly automatic with useful defaults.
60
+ - Preserve CLI and configuration control for advanced users while removing it
61
+ from the critical path for everyone else.
62
+
63
+ ### 4. Reach every platform, from PC to mobile
64
+
65
+ - Deliver a consistent experience across macOS, Windows, and Linux desktops.
66
+ - Extend the local search layer to iOS and Android instead of treating mobile as
67
+ a remote client to a required cloud service.
68
+ - Adapt indexing, storage, and model execution to the memory, power, and lifecycle
69
+ constraints of mobile devices.
70
+ - Keep the same local-first trust and permission model across desktop and mobile.
71
+
72
+ ## Guardrails
73
+
74
+ - Local-first remains the default; remote content transfer always requires
75
+ explicit authorization.
76
+ - zg should hide retrieval-tool choice from users without hiding useful control.
77
+ - Better recall must not come at the cost of noisy, oversized agent context.
78
+ - A hosted service must never be required for the core local workflow.
79
+
80
+ ## Help shape the roadmap
81
+
82
+ Priorities should come from real use. Open a
83
+ [GitHub issue](https://github.com/zvec-ai/zvec-grep/issues) to describe a
84
+ workflow, limitation, or result that matters to you. Contributions are welcome;
85
+ see the [Contributing Guide](../CONTRIBUTING.md).
package/docs/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # zvec-grep documentation
2
+
3
+ **zg** is one local-first search layer for people and agents. These guides go
4
+ beyond the short path in the project [README](../README.md) and explain how to
5
+ connect an agent, shape an index, search it, and control the underlying
6
+ interfaces.
7
+
8
+ > [!IMPORTANT]
9
+ > zvec-grep is a work in progress. Commands and configuration may change before
10
+ > the first stable release.
11
+
12
+ ## Start here
13
+
14
+ | I want to… | Read |
15
+ | --- | --- |
16
+ | Connect Codex, Claude Code, Qwen Code, Cursor, or OpenCode | [Agent integrations](./01-agents.md) |
17
+ | Use zg directly from a terminal | [CLI guide](./02-cli.md) |
18
+ | Understand the tools exposed to an agent | [MCP guide](./03-mcp.md) |
19
+ | Understand indexing, updates, and search routes | [Retrieval pipeline](./04-pipeline.md) |
20
+ | See how the components and trust boundaries fit together | [Architecture](./05-architecture.md) |
21
+ | Choose between Auto, Server, and Direct execution | [Server and execution modes](./06-server.md) |
22
+ | Choose and configure an Embedding model | [Embedding models](./07-embedding.md) |
23
+ | See what is stable now and what comes next | [Roadmap](./08-roadmap.md) |
24
+
25
+ ## Recommended paths
26
+
27
+ If you primarily use an agent, start with [Agent integrations](./01-agents.md),
28
+ then read the [MCP guide](./03-mcp.md) and
29
+ [Retrieval pipeline](./04-pipeline.md). The [Server guide](./06-server.md)
30
+ explains the daemon that connects them.
31
+
32
+ If you primarily use the terminal, start with the [CLI guide](./02-cli.md), then
33
+ read the [Retrieval pipeline](./04-pipeline.md). Use the
34
+ [Embedding guide](./07-embedding.md) when creating a new index. The default
35
+ `auto` execution mode is explained in
36
+ [Server and execution modes](./06-server.md).
37
+
38
+ For the whole-system mental model and trust boundaries, read
39
+ [Architecture](./05-architecture.md).
40
+
41
+ The [Roadmap](./08-roadmap.md) tracks the path from work in progress to a stable
42
+ release.
43
+
44
+ The CLI remains the source of truth for flags in the installed version:
45
+
46
+ ```bash
47
+ zg --help
48
+ zg --help search
49
+ zg --help index
50
+ ```
51
+
52
+ For development setup and pull request conventions, see
53
+ [CONTRIBUTING.md](../CONTRIBUTING.md).