@zvec/zvec-grep 0.2.2 → 0.3.0-rc.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 +87 -252
- package/bin/zg.exe +3 -0
- package/install.cjs +510 -0
- package/package.json +22 -72
- package/platforms.json +92 -0
- package/plugins.cjs +183 -0
- package/README_CN.md +0 -239
- package/dist/authorization/index.d.ts +0 -7
- package/dist/authorization/index.js +0 -7
- package/dist/authorization/index.js.map +0 -1
- package/dist/authorization/manager.d.ts +0 -8
- package/dist/authorization/manager.js +0 -19
- package/dist/authorization/manager.js.map +0 -1
- package/dist/authorization/operation.d.ts +0 -7
- package/dist/authorization/operation.js +0 -50
- package/dist/authorization/operation.js.map +0 -1
- package/dist/authorization/planner.d.ts +0 -21
- package/dist/authorization/planner.js +0 -97
- package/dist/authorization/planner.js.map +0 -1
- package/dist/authorization/prompt.d.ts +0 -12
- package/dist/authorization/prompt.js +0 -63
- package/dist/authorization/prompt.js.map +0 -1
- package/dist/authorization/store.d.ts +0 -20
- package/dist/authorization/store.js +0 -251
- package/dist/authorization/store.js.map +0 -1
- package/dist/authorization/target.d.ts +0 -15
- package/dist/authorization/target.js +0 -49
- package/dist/authorization/target.js.map +0 -1
- package/dist/authorization/types.d.ts +0 -61
- package/dist/authorization/types.js +0 -2
- package/dist/authorization/types.js.map +0 -1
- package/dist/cli/args.d.ts +0 -5
- package/dist/cli/args.js +0 -1210
- package/dist/cli/args.js.map +0 -1
- package/dist/cli/auth.d.ts +0 -21
- package/dist/cli/auth.js +0 -209
- package/dist/cli/auth.js.map +0 -1
- package/dist/cli/commands.d.ts +0 -4
- package/dist/cli/commands.js +0 -742
- package/dist/cli/commands.js.map +0 -1
- package/dist/cli/errors.d.ts +0 -9
- package/dist/cli/errors.js +0 -131
- package/dist/cli/errors.js.map +0 -1
- package/dist/cli/format/context.d.ts +0 -9
- package/dist/cli/format/context.js +0 -786
- package/dist/cli/format/context.js.map +0 -1
- package/dist/cli/format/debug.d.ts +0 -4
- package/dist/cli/format/debug.js +0 -60
- package/dist/cli/format/debug.js.map +0 -1
- package/dist/cli/format/highlight.d.ts +0 -3
- package/dist/cli/format/highlight.js +0 -106
- package/dist/cli/format/highlight.js.map +0 -1
- package/dist/cli/format/progress.d.ts +0 -13
- package/dist/cli/format/progress.js +0 -290
- package/dist/cli/format/progress.js.map +0 -1
- package/dist/cli/format/range.d.ts +0 -3
- package/dist/cli/format/range.js +0 -24
- package/dist/cli/format/range.js.map +0 -1
- package/dist/cli/format/status.d.ts +0 -83
- package/dist/cli/format/status.js +0 -530
- package/dist/cli/format/status.js.map +0 -1
- package/dist/cli/help.d.ts +0 -1
- package/dist/cli/help.js +0 -528
- package/dist/cli/help.js.map +0 -1
- package/dist/cli/index.d.ts +0 -2
- package/dist/cli/index.js +0 -34
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/install.d.ts +0 -4
- package/dist/cli/install.js +0 -1661
- package/dist/cli/install.js.map +0 -1
- package/dist/cli/managed-rg.d.ts +0 -10
- package/dist/cli/managed-rg.js +0 -337
- package/dist/cli/managed-rg.js.map +0 -1
- package/dist/cli/server-search.d.ts +0 -3
- package/dist/cli/server-search.js +0 -12
- package/dist/cli/server-search.js.map +0 -1
- package/dist/cli/types.d.ts +0 -87
- package/dist/cli/types.js +0 -10
- package/dist/cli/types.js.map +0 -1
- package/dist/cli/version.d.ts +0 -1
- package/dist/cli/version.js +0 -13
- package/dist/cli/version.js.map +0 -1
- package/dist/client/daemon-client.d.ts +0 -31
- package/dist/client/daemon-client.js +0 -203
- package/dist/client/daemon-client.js.map +0 -1
- package/dist/client/mode-router.d.ts +0 -9
- package/dist/client/mode-router.js +0 -28
- package/dist/client/mode-router.js.map +0 -1
- package/dist/client/search-policy.d.ts +0 -11
- package/dist/client/search-policy.js +0 -15
- package/dist/client/search-policy.js.map +0 -1
- package/dist/daemon/backend.d.ts +0 -78
- package/dist/daemon/backend.js +0 -1089
- package/dist/daemon/backend.js.map +0 -1
- package/dist/daemon/change-set.d.ts +0 -30
- package/dist/daemon/change-set.js +0 -163
- package/dist/daemon/change-set.js.map +0 -1
- package/dist/daemon/config.d.ts +0 -27
- package/dist/daemon/config.js +0 -107
- package/dist/daemon/config.js.map +0 -1
- package/dist/daemon/errors.d.ts +0 -5
- package/dist/daemon/errors.js +0 -11
- package/dist/daemon/errors.js.map +0 -1
- package/dist/daemon/http-server.d.ts +0 -30
- package/dist/daemon/http-server.js +0 -288
- package/dist/daemon/http-server.js.map +0 -1
- package/dist/daemon/index-coordinator.d.ts +0 -22
- package/dist/daemon/index-coordinator.js +0 -55
- package/dist/daemon/index-coordinator.js.map +0 -1
- package/dist/daemon/job-scheduler.d.ts +0 -73
- package/dist/daemon/job-scheduler.js +0 -434
- package/dist/daemon/job-scheduler.js.map +0 -1
- package/dist/daemon/logger.d.ts +0 -9
- package/dist/daemon/logger.js +0 -53
- package/dist/daemon/logger.js.map +0 -1
- package/dist/daemon/model-pool.d.ts +0 -45
- package/dist/daemon/model-pool.js +0 -187
- package/dist/daemon/model-pool.js.map +0 -1
- package/dist/daemon/root-lease.d.ts +0 -14
- package/dist/daemon/root-lease.js +0 -197
- package/dist/daemon/root-lease.js.map +0 -1
- package/dist/daemon/root-runtime.d.ts +0 -80
- package/dist/daemon/root-runtime.js +0 -340
- package/dist/daemon/root-runtime.js.map +0 -1
- package/dist/daemon/runtime-manager.d.ts +0 -47
- package/dist/daemon/runtime-manager.js +0 -252
- package/dist/daemon/runtime-manager.js.map +0 -1
- package/dist/daemon/runtime.d.ts +0 -12
- package/dist/daemon/runtime.js +0 -104
- package/dist/daemon/runtime.js.map +0 -1
- package/dist/daemon/server-controller.d.ts +0 -38
- package/dist/daemon/server-controller.js +0 -327
- package/dist/daemon/server-controller.js.map +0 -1
- package/dist/daemon/watch-manager.d.ts +0 -55
- package/dist/daemon/watch-manager.js +0 -347
- package/dist/daemon/watch-manager.js.map +0 -1
- package/dist/daemon/workspace-read-session-cache.d.ts +0 -31
- package/dist/daemon/workspace-read-session-cache.js +0 -115
- package/dist/daemon/workspace-read-session-cache.js.map +0 -1
- package/dist/engine/code-formats.d.ts +0 -3
- package/dist/engine/code-formats.js +0 -14
- package/dist/engine/code-formats.js.map +0 -1
- package/dist/engine/config.d.ts +0 -50
- package/dist/engine/config.js +0 -321
- package/dist/engine/config.js.map +0 -1
- package/dist/engine/errors.d.ts +0 -20
- package/dist/engine/errors.js +0 -51
- package/dist/engine/errors.js.map +0 -1
- package/dist/engine/extraction/code/adapter.d.ts +0 -19
- package/dist/engine/extraction/code/adapter.js +0 -24
- package/dist/engine/extraction/code/adapter.js.map +0 -1
- package/dist/engine/extraction/code/extractor.d.ts +0 -13
- package/dist/engine/extraction/code/extractor.js +0 -696
- package/dist/engine/extraction/code/extractor.js.map +0 -1
- package/dist/engine/extraction/code/families/c-family.d.ts +0 -2
- package/dist/engine/extraction/code/families/c-family.js +0 -122
- package/dist/engine/extraction/code/families/c-family.js.map +0 -1
- package/dist/engine/extraction/code/families/js-ts.d.ts +0 -12
- package/dist/engine/extraction/code/families/js-ts.js +0 -118
- package/dist/engine/extraction/code/families/js-ts.js.map +0 -1
- package/dist/engine/extraction/code/families/metadata.d.ts +0 -8
- package/dist/engine/extraction/code/families/metadata.js +0 -86
- package/dist/engine/extraction/code/families/metadata.js.map +0 -1
- package/dist/engine/extraction/code/families/name-field.d.ts +0 -3
- package/dist/engine/extraction/code/families/name-field.js +0 -22
- package/dist/engine/extraction/code/families/name-field.js.map +0 -1
- package/dist/engine/extraction/code/languages/c.d.ts +0 -1
- package/dist/engine/extraction/code/languages/c.js +0 -12
- package/dist/engine/extraction/code/languages/c.js.map +0 -1
- package/dist/engine/extraction/code/languages/cpp.d.ts +0 -1
- package/dist/engine/extraction/code/languages/cpp.js +0 -18
- package/dist/engine/extraction/code/languages/cpp.js.map +0 -1
- package/dist/engine/extraction/code/languages/go.d.ts +0 -2
- package/dist/engine/extraction/code/languages/go.js +0 -70
- package/dist/engine/extraction/code/languages/go.js.map +0 -1
- package/dist/engine/extraction/code/languages/java.d.ts +0 -1
- package/dist/engine/extraction/code/languages/java.js +0 -17
- package/dist/engine/extraction/code/languages/java.js.map +0 -1
- package/dist/engine/extraction/code/languages/javascript.d.ts +0 -2
- package/dist/engine/extraction/code/languages/javascript.js +0 -23
- package/dist/engine/extraction/code/languages/javascript.js.map +0 -1
- package/dist/engine/extraction/code/languages/python.d.ts +0 -2
- package/dist/engine/extraction/code/languages/python.js +0 -52
- package/dist/engine/extraction/code/languages/python.js.map +0 -1
- package/dist/engine/extraction/code/languages/rust.d.ts +0 -2
- package/dist/engine/extraction/code/languages/rust.js +0 -25
- package/dist/engine/extraction/code/languages/rust.js.map +0 -1
- package/dist/engine/extraction/code/languages/typescript.d.ts +0 -2
- package/dist/engine/extraction/code/languages/typescript.js +0 -37
- package/dist/engine/extraction/code/languages/typescript.js.map +0 -1
- package/dist/engine/extraction/code/tree-sitter/grammar.d.ts +0 -4
- package/dist/engine/extraction/code/tree-sitter/grammar.js +0 -49
- package/dist/engine/extraction/code/tree-sitter/grammar.js.map +0 -1
- package/dist/engine/extraction/code/tree-sitter/nodes.d.ts +0 -3
- package/dist/engine/extraction/code/tree-sitter/nodes.js +0 -27
- package/dist/engine/extraction/code/tree-sitter/nodes.js.map +0 -1
- package/dist/engine/extraction/code/tree-sitter/parser.d.ts +0 -2
- package/dist/engine/extraction/code/tree-sitter/parser.js +0 -31
- package/dist/engine/extraction/code/tree-sitter/parser.js.map +0 -1
- package/dist/engine/extraction/ids.d.ts +0 -1
- package/dist/engine/extraction/ids.js +0 -5
- package/dist/engine/extraction/ids.js.map +0 -1
- package/dist/engine/extraction/image/extractor.d.ts +0 -5
- package/dist/engine/extraction/image/extractor.js +0 -35
- package/dist/engine/extraction/image/extractor.js.map +0 -1
- package/dist/engine/extraction/index.d.ts +0 -4
- package/dist/engine/extraction/index.js +0 -3
- package/dist/engine/extraction/index.js.map +0 -1
- package/dist/engine/extraction/markdown/extractor.d.ts +0 -7
- package/dist/engine/extraction/markdown/extractor.js +0 -362
- package/dist/engine/extraction/markdown/extractor.js.map +0 -1
- package/dist/engine/extraction/runtime.d.ts +0 -9
- package/dist/engine/extraction/runtime.js +0 -37
- package/dist/engine/extraction/runtime.js.map +0 -1
- package/dist/engine/extraction/source.d.ts +0 -18
- package/dist/engine/extraction/source.js +0 -22
- package/dist/engine/extraction/source.js.map +0 -1
- package/dist/engine/extraction/text/extractor.d.ts +0 -7
- package/dist/engine/extraction/text/extractor.js +0 -168
- package/dist/engine/extraction/text/extractor.js.map +0 -1
- package/dist/engine/extraction/types.d.ts +0 -4
- package/dist/engine/extraction/types.js +0 -2
- package/dist/engine/extraction/types.js.map +0 -1
- package/dist/engine/extraction/vector-content.d.ts +0 -5
- package/dist/engine/extraction/vector-content.js +0 -83
- package/dist/engine/extraction/vector-content.js.map +0 -1
- package/dist/engine/file-size-policy.d.ts +0 -6
- package/dist/engine/file-size-policy.js +0 -20
- package/dist/engine/file-size-policy.js.map +0 -1
- package/dist/engine/file-type.d.ts +0 -15
- package/dist/engine/file-type.js +0 -152
- package/dist/engine/file-type.js.map +0 -1
- package/dist/engine/index-status.d.ts +0 -9
- package/dist/engine/index-status.js +0 -38
- package/dist/engine/index-status.js.map +0 -1
- package/dist/engine/manifest.d.ts +0 -13
- package/dist/engine/manifest.js +0 -124
- package/dist/engine/manifest.js.map +0 -1
- package/dist/engine/models/artifact-cache-lock.d.ts +0 -16
- package/dist/engine/models/artifact-cache-lock.js +0 -228
- package/dist/engine/models/artifact-cache-lock.js.map +0 -1
- package/dist/engine/models/artifact-downloader.d.ts +0 -77
- package/dist/engine/models/artifact-downloader.js +0 -766
- package/dist/engine/models/artifact-downloader.js.map +0 -1
- package/dist/engine/models/backends/llama-cpp.d.ts +0 -99
- package/dist/engine/models/backends/llama-cpp.js +0 -573
- package/dist/engine/models/backends/llama-cpp.js.map +0 -1
- package/dist/engine/models/backends/model2vec-runtime.d.ts +0 -63
- package/dist/engine/models/backends/model2vec-runtime.js +0 -112
- package/dist/engine/models/backends/model2vec-runtime.js.map +0 -1
- package/dist/engine/models/backends/model2vec-tokenizer.d.ts +0 -2
- package/dist/engine/models/backends/model2vec-tokenizer.js +0 -42
- package/dist/engine/models/backends/model2vec-tokenizer.js.map +0 -1
- package/dist/engine/models/backends/model2vec-worker-pool.d.ts +0 -25
- package/dist/engine/models/backends/model2vec-worker-pool.js +0 -264
- package/dist/engine/models/backends/model2vec-worker-pool.js.map +0 -1
- package/dist/engine/models/backends/model2vec-worker.d.ts +0 -1
- package/dist/engine/models/backends/model2vec-worker.js +0 -41
- package/dist/engine/models/backends/model2vec-worker.js.map +0 -1
- package/dist/engine/models/backends/model2vec.d.ts +0 -38
- package/dist/engine/models/backends/model2vec.js +0 -344
- package/dist/engine/models/backends/model2vec.js.map +0 -1
- package/dist/engine/models/backends/qwen.d.ts +0 -44
- package/dist/engine/models/backends/qwen.js +0 -411
- package/dist/engine/models/backends/qwen.js.map +0 -1
- package/dist/engine/models/backends/transformers-js.d.ts +0 -87
- package/dist/engine/models/backends/transformers-js.js +0 -360
- package/dist/engine/models/backends/transformers-js.js.map +0 -1
- package/dist/engine/models/catalog.d.ts +0 -490
- package/dist/engine/models/catalog.js +0 -522
- package/dist/engine/models/catalog.js.map +0 -1
- package/dist/engine/models/download-progress.d.ts +0 -16
- package/dist/engine/models/download-progress.js +0 -47
- package/dist/engine/models/download-progress.js.map +0 -1
- package/dist/engine/models/embeddings.d.ts +0 -69
- package/dist/engine/models/embeddings.js +0 -125
- package/dist/engine/models/embeddings.js.map +0 -1
- package/dist/engine/models/factory.d.ts +0 -2
- package/dist/engine/models/factory.js +0 -51
- package/dist/engine/models/factory.js.map +0 -1
- package/dist/engine/models/index.d.ts +0 -4
- package/dist/engine/models/index.js +0 -5
- package/dist/engine/models/index.js.map +0 -1
- package/dist/engine/models/ranking.d.ts +0 -19
- package/dist/engine/models/ranking.js +0 -2
- package/dist/engine/models/ranking.js.map +0 -1
- package/dist/engine/models/resolution.d.ts +0 -8
- package/dist/engine/models/resolution.js +0 -22
- package/dist/engine/models/resolution.js.map +0 -1
- package/dist/engine/pipeline/indexing/index.d.ts +0 -14
- package/dist/engine/pipeline/indexing/index.js +0 -1217
- package/dist/engine/pipeline/indexing/index.js.map +0 -1
- package/dist/engine/pipeline/indexing/input-budget.d.ts +0 -2
- package/dist/engine/pipeline/indexing/input-budget.js +0 -51
- package/dist/engine/pipeline/indexing/input-budget.js.map +0 -1
- package/dist/engine/pipeline/indexing/root-paths.d.ts +0 -7
- package/dist/engine/pipeline/indexing/root-paths.js +0 -148
- package/dist/engine/pipeline/indexing/root-paths.js.map +0 -1
- package/dist/engine/pipeline/indexing/scanner/index.d.ts +0 -14
- package/dist/engine/pipeline/indexing/scanner/index.js +0 -776
- package/dist/engine/pipeline/indexing/scanner/index.js.map +0 -1
- package/dist/engine/pipeline/search/index.d.ts +0 -12
- package/dist/engine/pipeline/search/index.js +0 -811
- package/dist/engine/pipeline/search/index.js.map +0 -1
- package/dist/engine/service/index.d.ts +0 -3
- package/dist/engine/service/index.js +0 -2
- package/dist/engine/service/index.js.map +0 -1
- package/dist/engine/service/lexical.d.ts +0 -28
- package/dist/engine/service/lexical.js +0 -446
- package/dist/engine/service/lexical.js.map +0 -1
- package/dist/engine/service/root.d.ts +0 -15
- package/dist/engine/service/root.js +0 -57
- package/dist/engine/service/root.js.map +0 -1
- package/dist/engine/service/structure-enrichment.d.ts +0 -8
- package/dist/engine/service/structure-enrichment.js +0 -178
- package/dist/engine/service/structure-enrichment.js.map +0 -1
- package/dist/engine/service/types.d.ts +0 -210
- package/dist/engine/service/types.js +0 -2
- package/dist/engine/service/types.js.map +0 -1
- package/dist/engine/service/workspace-index.d.ts +0 -26
- package/dist/engine/service/workspace-index.js +0 -157
- package/dist/engine/service/workspace-index.js.map +0 -1
- package/dist/engine/service/zvec-grep.d.ts +0 -13
- package/dist/engine/service/zvec-grep.js +0 -1393
- package/dist/engine/service/zvec-grep.js.map +0 -1
- package/dist/engine/storage/index.d.ts +0 -53
- package/dist/engine/storage/index.js +0 -3
- package/dist/engine/storage/index.js.map +0 -1
- package/dist/engine/storage/layout.d.ts +0 -10
- package/dist/engine/storage/layout.js +0 -29
- package/dist/engine/storage/layout.js.map +0 -1
- package/dist/engine/storage/zvec.d.ts +0 -4
- package/dist/engine/storage/zvec.js +0 -976
- package/dist/engine/storage/zvec.js.map +0 -1
- package/dist/engine/types.d.ts +0 -303
- package/dist/engine/types.js +0 -14
- package/dist/engine/types.js.map +0 -1
- package/dist/engine/utils/atomic-file.d.ts +0 -3
- package/dist/engine/utils/atomic-file.js +0 -39
- package/dist/engine/utils/atomic-file.js.map +0 -1
- package/dist/engine/utils/daemon-lease.d.ts +0 -17
- package/dist/engine/utils/daemon-lease.js +0 -175
- package/dist/engine/utils/daemon-lease.js.map +0 -1
- package/dist/engine/utils/file-selection.d.ts +0 -10
- package/dist/engine/utils/file-selection.js +0 -157
- package/dist/engine/utils/file-selection.js.map +0 -1
- package/dist/engine/utils/glob.d.ts +0 -9
- package/dist/engine/utils/glob.js +0 -208
- package/dist/engine/utils/glob.js.map +0 -1
- package/dist/engine/utils/hash.d.ts +0 -2
- package/dist/engine/utils/hash.js +0 -8
- package/dist/engine/utils/hash.js.map +0 -1
- package/dist/engine/utils/json.d.ts +0 -8
- package/dist/engine/utils/json.js +0 -83
- package/dist/engine/utils/json.js.map +0 -1
- package/dist/engine/utils/lock.d.ts +0 -19
- package/dist/engine/utils/lock.js +0 -254
- package/dist/engine/utils/lock.js.map +0 -1
- package/dist/engine/utils/path.d.ts +0 -4
- package/dist/engine/utils/path.js +0 -18
- package/dist/engine/utils/path.js.map +0 -1
- package/dist/engine/utils/timing.d.ts +0 -19
- package/dist/engine/utils/timing.js +0 -87
- package/dist/engine/utils/timing.js.map +0 -1
- package/dist/index-progress.d.ts +0 -10
- package/dist/index-progress.js +0 -159
- package/dist/index-progress.js.map +0 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.js +0 -4
- package/dist/index.js.map +0 -1
- package/dist/mcp/http-transport.d.ts +0 -27
- package/dist/mcp/http-transport.js +0 -182
- package/dist/mcp/http-transport.js.map +0 -1
- package/dist/mcp/input-normalization.d.ts +0 -38
- package/dist/mcp/input-normalization.js +0 -104
- package/dist/mcp/input-normalization.js.map +0 -1
- package/dist/mcp/progress-heartbeat.d.ts +0 -17
- package/dist/mcp/progress-heartbeat.js +0 -46
- package/dist/mcp/progress-heartbeat.js.map +0 -1
- package/dist/mcp/request-metadata.d.ts +0 -2
- package/dist/mcp/request-metadata.js +0 -11
- package/dist/mcp/request-metadata.js.map +0 -1
- package/dist/mcp/request-state.d.ts +0 -40
- package/dist/mcp/request-state.js +0 -210
- package/dist/mcp/request-state.js.map +0 -1
- package/dist/mcp/result-format.d.ts +0 -13
- package/dist/mcp/result-format.js +0 -75
- package/dist/mcp/result-format.js.map +0 -1
- package/dist/mcp/schemas.d.ts +0 -668
- package/dist/mcp/schemas.js +0 -512
- package/dist/mcp/schemas.js.map +0 -1
- package/dist/mcp/stdio-bridge.d.ts +0 -15
- package/dist/mcp/stdio-bridge.js +0 -190
- package/dist/mcp/stdio-bridge.js.map +0 -1
- package/dist/mcp/tools.d.ts +0 -153
- package/dist/mcp/tools.js +0 -488
- package/dist/mcp/tools.js.map +0 -1
- package/dist/mcp/toolset.d.ts +0 -5
- package/dist/mcp/toolset.js +0 -12
- package/dist/mcp/toolset.js.map +0 -1
- package/dist/observability/trace-context.d.ts +0 -11
- package/dist/observability/trace-context.js +0 -138
- package/dist/observability/trace-context.js.map +0 -1
- package/dist/prompts/zvec-grep-guidance.d.ts +0 -2
- package/dist/prompts/zvec-grep-guidance.js +0 -9
- package/dist/prompts/zvec-grep-guidance.js.map +0 -1
- package/docs/01-agents.md +0 -209
- package/docs/02-cli.md +0 -247
- package/docs/03-mcp.md +0 -185
- package/docs/04-pipeline.md +0 -226
- package/docs/05-architecture.md +0 -86
- package/docs/06-server.md +0 -233
- package/docs/07-embedding.md +0 -209
- package/docs/08-roadmap.md +0 -85
- package/docs/README.md +0 -53
package/README.md
CHANGED
|
@@ -1,254 +1,89 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
**zg** (**z**vec-**g**rep), powered by [zvec](https://github.com/alibaba/zvec),
|
|
31
|
-
unifies ripgrep, BM25, and vector search behind
|
|
32
|
-
[one local-first interface](./docs/05-architecture.md). Use it directly from the
|
|
33
|
-
terminal, or let your agent use it for you.
|
|
34
|
-
|
|
35
|
-
<a id="tour"></a>
|
|
36
|
-
|
|
37
|
-
## 🎬 See it in action
|
|
38
|
-
|
|
39
|
-
<div align="center">
|
|
40
|
-
<picture>
|
|
41
|
-
<source media="(prefers-color-scheme: dark)" srcset="./.github/assets/zvec-grep-tour-dark.gif">
|
|
42
|
-
<img src="./.github/assets/zvec-grep-tour.gif" width="1000" alt="Install the agent integration, index a workspace, and let the agent search it with zvec-grep" />
|
|
43
|
-
</picture>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<a id="features"></a>
|
|
47
|
-
|
|
48
|
-
## 💫 Why zg?
|
|
49
|
-
|
|
50
|
-
- **Ready for humans and agents** — install once, index once, then use the same
|
|
51
|
-
workspace from the CLI or your agent on macOS, Linux, and Windows.
|
|
52
|
-
- **Search beyond keywords** — discover by meaning, rank by relevance, then
|
|
53
|
-
verify with exact text or regex when needed.
|
|
54
|
-
- **Multi-format search** — search source code, documents, and structured data
|
|
55
|
-
while preserving useful structure and source locations.
|
|
56
|
-
- **Less searching, less context** — ranked, source-linked results surface the
|
|
57
|
-
right evidence with fewer tool calls, fewer tokens, and less noise.
|
|
58
|
-
- **Local by default** — files, indexes, and local models stay on your machine;
|
|
59
|
-
remote embeddings receive data only with your permission.
|
|
60
|
-
|
|
61
|
-
<a id="try-it-yourself"></a>
|
|
62
|
-
|
|
63
|
-
## 🚀 Try it yourself
|
|
64
|
-
|
|
65
|
-
### 1. Set up a sample bookshelf
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
# Requires Node.js 22 or newer.
|
|
69
|
-
npm install -g @zvec/zvec-grep
|
|
70
|
-
|
|
71
|
-
mkdir zg-mystery && cd zg-mystery
|
|
72
|
-
curl --retry 3 --retry-all-errors --progress-bar -fL \
|
|
73
|
-
-o alice-in-wonderland.txt https://raw.githubusercontent.com/GITenberg/Alice-s-Adventures-in-Wonderland_11/master/11.txt \
|
|
74
|
-
-o sherlock-holmes.txt https://raw.githubusercontent.com/GITenberg/The-Memoirs-of-Sherlock-Holmes_834/master/834.txt
|
|
75
|
-
|
|
76
|
-
zg index --embedding local/potion-retrieval-32m
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
> [!NOTE]
|
|
80
|
-
> The index is stored in `.zvec-grep/` under the indexed project root.
|
|
81
|
-
|
|
82
|
-
> [!TIP]
|
|
83
|
-
> If `zg index` or `zg query` fails, rerun the same command with `--debug`
|
|
84
|
-
> for diagnostics (supported in both direct and server modes).
|
|
85
|
-
> `zg status --mode direct --debug` reports per-file failures stored in an
|
|
86
|
-
> existing index; rerun a failed direct command to diagnose command-level
|
|
87
|
-
> fatal errors. Use
|
|
88
|
-
> `zg status --mode server --debug` to inspect recorded server indexing errors.
|
|
89
|
-
> For server connection failures, check `zg server status` and the
|
|
90
|
-
> [server logs](./docs/06-server.md#logs-and-state).
|
|
91
|
-
|
|
92
|
-
### 2. Choose how to search
|
|
93
|
-
|
|
94
|
-
#### For agents: ask with OpenCode
|
|
95
|
-
|
|
96
|
-
With [OpenCode](https://opencode.ai/) configured:
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
zg install --target opencode --yes
|
|
100
|
-
opencode models
|
|
101
|
-
opencode run --model opencode/nemotron-3-ultra-free \
|
|
102
|
-
"An unseen creature left a few marks. What did the detective infer? Cite local evidence."
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Free model availability can change. Check `opencode models` and replace the
|
|
106
|
-
example model with one that is currently available in your environment.
|
|
107
|
-
|
|
108
|
-
OpenCode chooses zg on its own—the prompt does not name a tool.
|
|
109
|
-
|
|
110
|
-
<details>
|
|
111
|
-
<summary><strong>See the full agent run and answer</strong></summary>
|
|
112
|
-
|
|
113
|
-
```text
|
|
114
|
-
⚙ zvec_grep_zvec_grep_search {"root":".../zg-mystery","query":"An unseen creature left a few marks. What did the detective infer?","fts":["marks","unseen creature","inferred","detective"],"fuse":true}
|
|
115
|
-
→ Read sherlock-holmes.txt [offset=5440, limit=120]
|
|
116
|
-
|
|
117
|
-
Answer:
|
|
118
|
-
The detective is Sherlock Holmes in *The Adventure of the Crooked Man*.
|
|
119
|
-
From the animal's foot-marks, he inferred:
|
|
120
|
-
|
|
121
|
-
- It was not a dog, cat, monkey, or other familiar creature: its print had
|
|
122
|
-
five foot-pads, long nails, and was nearly as large as a dessert-spoon
|
|
123
|
-
(sherlock-holmes.txt:5479-5486).
|
|
124
|
-
- It had a long body and very short legs: nearly two feet long, but with a
|
|
125
|
-
stride of only about three inches (sherlock-holmes.txt:5497-5502).
|
|
126
|
-
- It was carnivorous because it climbed the curtain toward a canary's cage
|
|
127
|
-
(sherlock-holmes.txt:5509-5510).
|
|
128
|
-
- It was probably from the weasel or stoat tribe, though unusually large
|
|
129
|
-
(sherlock-holmes.txt:5514-5516).
|
|
130
|
-
|
|
131
|
-
Holmes also inferred that a man entered through the window with it and later
|
|
132
|
-
left with the key (sherlock-holmes.txt:5464-5470, 5527-5528).
|
|
1
|
+
# zvec-grep
|
|
2
|
+
|
|
3
|
+
This is the npm distribution wrapper for the native `zg` CLI. The package uses
|
|
4
|
+
an exact-version optional dependency to install only the native package matching
|
|
5
|
+
the current operating system, CPU architecture, and Linux libc.
|
|
6
|
+
|
|
7
|
+
Linux/Windows x64 install a complete CPU runtime first. The same executable
|
|
8
|
+
retains CUDA plugin-loading capability; no recompilation is needed to add GPU
|
|
9
|
+
support. Base packages pin optional component versions, core identities and
|
|
10
|
+
archive/file hashes in `plugins.json`, not npm dependencies.
|
|
11
|
+
|
|
12
|
+
`ZG_INSTALL_ACCELERATOR=auto` (default) downloads the existing complete CUDA
|
|
13
|
+
component set only when bounded NVIDIA detection succeeds. `cpu` skips both
|
|
14
|
+
detection and downloads; `cuda` forces installation even on GPU-free image
|
|
15
|
+
builders. Detection is only a download hint, not a CUDA compatibility test.
|
|
16
|
+
It runs `nvidia-smi` with a five-second timeout and checks for a successful,
|
|
17
|
+
nonempty result; it does not compare driver versions, probe CUDA/cuDNN libraries,
|
|
18
|
+
or choose different plugin subsets for GGUF and ORT.
|
|
19
|
+
Optional failures in auto mode leave CPU usable with a warning; base corruption
|
|
20
|
+
and forced CUDA installation failures are errors. Host NVIDIA drivers, CUDA
|
|
21
|
+
runtime libraries and cuDNN remain separate requirements.
|
|
22
|
+
|
|
23
|
+
Stop running zg/daemon processes before adding plugins. On Linux, for example:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
ZG_INSTALL_ACCELERATOR=cpu npm install -g @zvec/zvec-grep
|
|
27
|
+
ZG_INSTALL_ACCELERATOR=cuda npm rebuild -g @zvec/zvec-grep --foreground-scripts
|
|
133
28
|
```
|
|
134
29
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
`
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
- **[Pylint](https://github.com/pylint-dev/pylint) — Python static analysis:** the task asks how AST node handling
|
|
197
|
-
separates annotated and non-annotated attribute initialization. Symbol-aware
|
|
198
|
-
retrieval is useful because the architectural entry point is not known in
|
|
199
|
-
advance.
|
|
200
|
-
- **[Matplotlib](https://github.com/matplotlib/matplotlib) — plotting and rendering:** the task traces `FontInfo` and font
|
|
201
|
-
selection through multiple math-text rendering stages. Ranked semantic and
|
|
202
|
-
lexical evidence helps reconstruct the cross-file data and control flow.
|
|
203
|
-
- **[Django](https://github.com/django/django) — web framework:** the task connects username uniqueness, ORM
|
|
204
|
-
transactions, and formset bulk operations. Compact ranked evidence brings
|
|
205
|
-
the distributed design rationale together.
|
|
206
|
-
|
|
207
|
-
<details>
|
|
208
|
-
<summary><strong>Repository questions</strong></summary>
|
|
209
|
-
|
|
210
|
-
| Repository | Question type | Question |
|
|
211
|
-
| --- | --- | --- |
|
|
212
|
-
| **`pylint-dev/pylint`** | What<br>Architecture exploration | What is the architectural pattern that distinguishes type-annotated from non-annotated instance attribute initialization using AST node type separation? |
|
|
213
|
-
| **`matplotlib/matplotlib`** | Where<br>Data / Control-flow | Where does the `FontInfo` NamedTuple propagate font metrics and glyph data through the mathematical text rendering pipeline, and what control flow determines whether the `postscript_name` or the `FT2Font` object is used at different stages of character rendering? |
|
|
214
|
-
| **`django/django`** | Why<br>Design rationale | Why does the User model's unique constraint on the username field interact with Django's ORM transaction handling, and what cascading effects would occur if this constraint were removed on an existing database with formset-based bulk operations? |
|
|
215
|
-
|
|
216
|
-
</details>
|
|
217
|
-
|
|
218
|
-
> zg works best when evidence spans files or modules and the target location is
|
|
219
|
-
> unknown, especially for call-chain, data-flow, and architectural questions.
|
|
220
|
-
> Since agents decide when and how to use it, results vary by model and run;
|
|
221
|
-
> repeated-run averages are more reliable.
|
|
222
|
-
|
|
223
|
-
## 📚 Documentation
|
|
224
|
-
|
|
225
|
-
| Guide | What you can do |
|
|
226
|
-
| :--- | :--- |
|
|
227
|
-
| [Agent integrations](./docs/01-agents.md) | Connect zg to Codex, Claude Code, Qwen Code, Qoder, Cursor, or OpenCode and verify that it works. |
|
|
228
|
-
| [CLI guide](./docs/02-cli.md) | Search, index, and manage your local workspaces from the terminal. |
|
|
229
|
-
| [MCP guide](./docs/03-mcp.md) | Understand which zg tools your agent can use and how access is secured. |
|
|
230
|
-
| [Retrieval pipeline](./docs/04-pipeline.md) | Choose what to index, keep it fresh, and get better search results. |
|
|
231
|
-
| [Architecture](./docs/05-architecture.md) | See how zg handles your query and where your data stays. |
|
|
232
|
-
| [Server and execution modes](./docs/06-server.md) | Choose between one-off commands and a long-running local server. |
|
|
233
|
-
| [Embedding models](./docs/07-embedding.md) | Pick the right model for speed, search quality, privacy, and your hardware. |
|
|
234
|
-
| [Roadmap](./docs/08-roadmap.md) | See what is coming next and help shape zg's priorities. |
|
|
235
|
-
|
|
236
|
-
<a id="community"></a>
|
|
237
|
-
|
|
238
|
-
## 🤝 Join Our Community
|
|
239
|
-
|
|
240
|
-
<div align="center">
|
|
241
|
-
|
|
242
|
-
| 💬 DingTalk | 📱 WeChat | 🎮 Discord | X (Twitter) |
|
|
243
|
-
| :---: | :---: | :---: | :---: |
|
|
244
|
-
| <img src="https://zvec.oss-cn-hongkong.aliyuncs.com/qrcode/dingding.png" width="150" alt="DingTalk QR Code"/> | <img src="https://zvec.oss-cn-hongkong.aliyuncs.com/qrcode/wechat.png?v5" width="150" alt="WeChat QR Code"/> | [](https://discord.gg/rKddFBBu9z) | [](<https://x.com/ZvecAI>) |
|
|
245
|
-
| Scan to join | Scan to join | Click to join | Click to follow |
|
|
246
|
-
|
|
247
|
-
</div>
|
|
248
|
-
|
|
249
|
-
## ❤️ Contributing
|
|
250
|
-
|
|
251
|
-
Community contributions are always welcome—bug fixes, features, and
|
|
252
|
-
documentation improvements all help make zvec-grep better.
|
|
253
|
-
|
|
254
|
-
Check out our [Contributing Guide](./CONTRIBUTING.md) to get started!
|
|
30
|
+
For project-local installations, omit `-g` and run in the project directory.
|
|
31
|
+
After a successful global installation or rebuild, postinstall attempts to
|
|
32
|
+
migrate existing user-level agent launch configurations from 0.2.x. It uses the
|
|
33
|
+
new native executable with `--install --upgrade-installed`; no agent selection,
|
|
34
|
+
new integration, daemon startup or model loading is involved. HTTP settings,
|
|
35
|
+
custom fields, permissions, guidance and comments are preserved. Changed files
|
|
36
|
+
receive adjacent `.zg-upgrade-*.bak` backups. Reconnect agents after migration;
|
|
37
|
+
HTTP users can run `zg --server on` to replace an old daemon.
|
|
38
|
+
|
|
39
|
+
Local dependencies, temporary execution, CI, elevated Unix installs and
|
|
40
|
+
ambiguous user homes skip automatic migration. Set
|
|
41
|
+
`ZG_INSTALL_SKIP_AGENT_UPGRADE=1` to opt out independently of native installation.
|
|
42
|
+
Migration errors or the 10-second timeout do not fail package installation;
|
|
43
|
+
details are saved in `agent-upgrade.log` inside this package when possible.
|
|
44
|
+
Retry with `zg --install --upgrade-installed`, or preview changes with
|
|
45
|
+
`zg --install --upgrade-installed --dry-run`. The command only scans known user
|
|
46
|
+
configuration locations, respects directory overrides, and reports unsupported
|
|
47
|
+
custom launchers for manual handling. Repeated runs make no additional changes.
|
|
48
|
+
|
|
49
|
+
In PowerShell, set `$env:ZG_INSTALL_ACCELERATOR = 'cuda'` before `npm rebuild`,
|
|
50
|
+
then remove that environment variable when finished. There is no `zg-setup`
|
|
51
|
+
command. Restart any previously running daemon after successful installation.
|
|
52
|
+
CPU mode disables downloads; it does not uninstall already verified plugins.
|
|
53
|
+
Failed or interrupted CUDA additions leave the existing CPU payload intact.
|
|
54
|
+
After correcting the failure, rerun the same rebuild command; no separate
|
|
55
|
+
recovery command or download-resume feature is normally needed. Concurrent
|
|
56
|
+
installations are rejected. Stale-lock recovery is serialized and rechecks the
|
|
57
|
+
owner before removal; releasing a lock never deletes a replacement owner's lock.
|
|
58
|
+
If a process is killed during the brief lock-recovery operation itself, the
|
|
59
|
+
installer fails closed on `.native-install.lock.recovery`. Stop all installers,
|
|
60
|
+
inspect the lock and this guard directory in the installed meta package, and
|
|
61
|
+
remove the abandoned empty guard before retrying. Never remove it while an
|
|
62
|
+
installer is running. An invalid/partially written `.native-install.lock` also
|
|
63
|
+
requires inspection instead of automatic deletion.
|
|
64
|
+
|
|
65
|
+
`ZG_PLUGIN_DIR` selects an absolute directory containing the exact component
|
|
66
|
+
`.tgz` files (no registry/cache fallback if a file is missing).
|
|
67
|
+
`ZG_INSTALL_OFFLINE=1` or npm's `--offline` prevents network requests; without a
|
|
68
|
+
local directory only previously verified archives in `ZG_PLUGIN_CACHE` are used.
|
|
69
|
+
The default cache is below npm's cache, isolated by platform, version, core and
|
|
70
|
+
content identity. Runtime libraries are copied beside the binary, not loaded
|
|
71
|
+
from absolute cache paths. Online downloads use npm's registry/proxy/auth/CA
|
|
72
|
+
configuration and do not run component lifecycle scripts.
|
|
73
|
+
|
|
74
|
+
The installer verifies archives, streams Linux/Windows ORT fragments into a temporary
|
|
75
|
+
file, then checks the complete library hash before activation. It preserves
|
|
76
|
+
`bin/zg.exe`, `lib/` and `lib/cuda12/`; no compilation, driver/Toolkit installation
|
|
77
|
+
or model execution happens during installation. `native-install.json` records
|
|
78
|
+
the installed core and plugins; normal CLI execution never downloads plugins.
|
|
79
|
+
The `zg` command enters the native executable directly. Unix rpaths and the
|
|
80
|
+
Windows native delay-load hook locate the sibling `lib/` without a launcher.
|
|
81
|
+
|
|
82
|
+
Node.js 14.14 or newer is required only for installation. Online plugin downloads
|
|
83
|
+
need npm 7+; plugin extraction uses the system `tar` (included with the supported
|
|
84
|
+
Windows/macOS/Linux environments). CLI execution does not require Node or npm.
|
|
85
|
+
|
|
86
|
+
`--ignore-scripts` skips CPU bootstrap too and leaves a placeholder command.
|
|
87
|
+
Explicitly allow this package's lifecycle scripts in your npm policy, then use
|
|
88
|
+
`npm rebuild -g @zvec/zvec-grep --ignore-scripts=false` to initialize it. If the
|
|
89
|
+
platform dependency was omitted, reinstall without `--omit=optional` first.
|
package/bin/zg.exe
ADDED