cocoindex-code 0.2.27__tar.gz → 0.2.28__tar.gz
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.
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/PKG-INFO +16 -11
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/README.md +11 -6
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/pyproject.toml +6 -12
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/src/cocoindex_code/_version.py +2 -2
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/src/cocoindex_code/chunking.py +1 -1
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/src/cocoindex_code/litellm_embedder.py +1 -0
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/src/cocoindex_code/shared.py +3 -3
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/.gitignore +0 -0
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/LICENSE +0 -0
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/src/cocoindex_code/__init__.py +0 -0
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/src/cocoindex_code/__main__.py +0 -0
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/src/cocoindex_code/_daemon_paths.py +0 -0
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/src/cocoindex_code/cli.py +0 -0
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/src/cocoindex_code/client.py +0 -0
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/src/cocoindex_code/daemon.py +0 -0
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/src/cocoindex_code/indexer.py +0 -0
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/src/cocoindex_code/project.py +0 -0
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/src/cocoindex_code/protocol.py +0 -0
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/src/cocoindex_code/query.py +0 -0
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/src/cocoindex_code/schema.py +0 -0
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/src/cocoindex_code/server.py +0 -0
- {cocoindex_code-0.2.27 → cocoindex_code-0.2.28}/src/cocoindex_code/settings.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cocoindex-code
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.28
|
|
4
4
|
Summary: MCP server for indexing and querying codebases using CocoIndex
|
|
5
5
|
Project-URL: Homepage, https://github.com/cocoindex-io/cocoindex-code
|
|
6
6
|
Project-URL: Repository, https://github.com/cocoindex-io/cocoindex-code
|
|
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
18
18
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
19
|
Requires-Python: >=3.11
|
|
20
|
-
Requires-Dist: cocoindex[litellm]
|
|
20
|
+
Requires-Dist: cocoindex[litellm]<1.1.0,>=1.0.0
|
|
21
21
|
Requires-Dist: einops>=0.8.2
|
|
22
22
|
Requires-Dist: mcp>=1.0.0
|
|
23
23
|
Requires-Dist: msgspec>=0.19.0
|
|
@@ -29,7 +29,7 @@ Requires-Dist: questionary>=2.0.0
|
|
|
29
29
|
Requires-Dist: sqlite-vec>=0.1.0
|
|
30
30
|
Requires-Dist: typer>=0.9.0
|
|
31
31
|
Provides-Extra: dev
|
|
32
|
-
Requires-Dist: cocoindex[sentence-transformers]
|
|
32
|
+
Requires-Dist: cocoindex[sentence-transformers]<1.1.0,>=1.0.0; extra == 'dev'
|
|
33
33
|
Requires-Dist: mypy>=1.0.0; extra == 'dev'
|
|
34
34
|
Requires-Dist: prek>=0.1.0; extra == 'dev'
|
|
35
35
|
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
|
@@ -37,9 +37,9 @@ Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
|
37
37
|
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
38
38
|
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
39
39
|
Provides-Extra: embeddings-local
|
|
40
|
-
Requires-Dist: cocoindex[sentence-transformers]
|
|
40
|
+
Requires-Dist: cocoindex[sentence-transformers]<1.1.0,>=1.0.0; extra == 'embeddings-local'
|
|
41
41
|
Provides-Extra: full
|
|
42
|
-
Requires-Dist: cocoindex[sentence-transformers]
|
|
42
|
+
Requires-Dist: cocoindex[sentence-transformers]<1.1.0,>=1.0.0; extra == 'full'
|
|
43
43
|
Description-Content-Type: text/markdown
|
|
44
44
|
|
|
45
45
|
<p align="center">
|
|
@@ -263,25 +263,30 @@ The rest of this section uses `:latest` — substitute `:full` in the `image:` /
|
|
|
263
263
|
|
|
264
264
|
### Quick start — `docker compose up -d`
|
|
265
265
|
|
|
266
|
-
|
|
266
|
+
Bring it up in one line — no clone needed (bash / zsh):
|
|
267
267
|
|
|
268
268
|
```bash
|
|
269
269
|
# macOS / Windows
|
|
270
|
-
docker compose up -d
|
|
270
|
+
docker compose -f <(curl -L https://raw.githubusercontent.com/cocoindex-io/cocoindex-code/refs/heads/main/docker/docker-compose.yml) up -d
|
|
271
271
|
|
|
272
272
|
# Linux (aligns file ownership on bind-mounted paths with your host user)
|
|
273
|
-
PUID=$(id -u) PGID=$(id -g) docker compose up -d
|
|
273
|
+
PUID=$(id -u) PGID=$(id -g) docker compose -f <(curl -L https://raw.githubusercontent.com/cocoindex-io/cocoindex-code/refs/heads/main/docker/docker-compose.yml) up -d
|
|
274
274
|
```
|
|
275
275
|
|
|
276
|
+
Or grab [`docker/docker-compose.yml`](./docker/docker-compose.yml) and run `docker compose up -d` next to it (works on any shell, including Windows cmd / PowerShell).
|
|
277
|
+
|
|
276
278
|
By default your home directory is mounted into the container (set
|
|
277
279
|
`COCOINDEX_HOST_WORKSPACE` to narrow this to a specific code folder). Index
|
|
278
280
|
data and the embedding model cache persist in a Docker volume across
|
|
279
281
|
restarts. Your global settings file at `$HOME/.cocoindex_code/global_settings.yml`
|
|
280
282
|
is visible and editable on the host; edits take effect on your next `ccc` command.
|
|
281
283
|
|
|
282
|
-
> **
|
|
283
|
-
>
|
|
284
|
-
>
|
|
284
|
+
> **Pick a different image:** set `COCOINDEX_CODE_IMAGE` to override the
|
|
285
|
+
> default. For example, the `:full` variant or GHCR:
|
|
286
|
+
> ```bash
|
|
287
|
+
> COCOINDEX_CODE_IMAGE=cocoindex/cocoindex-code:full docker compose up -d
|
|
288
|
+
> COCOINDEX_CODE_IMAGE=ghcr.io/cocoindex-io/cocoindex-code:latest docker compose up -d
|
|
289
|
+
> ```
|
|
285
290
|
|
|
286
291
|
### Or: `docker run`
|
|
287
292
|
|
|
@@ -219,25 +219,30 @@ The rest of this section uses `:latest` — substitute `:full` in the `image:` /
|
|
|
219
219
|
|
|
220
220
|
### Quick start — `docker compose up -d`
|
|
221
221
|
|
|
222
|
-
|
|
222
|
+
Bring it up in one line — no clone needed (bash / zsh):
|
|
223
223
|
|
|
224
224
|
```bash
|
|
225
225
|
# macOS / Windows
|
|
226
|
-
docker compose up -d
|
|
226
|
+
docker compose -f <(curl -L https://raw.githubusercontent.com/cocoindex-io/cocoindex-code/refs/heads/main/docker/docker-compose.yml) up -d
|
|
227
227
|
|
|
228
228
|
# Linux (aligns file ownership on bind-mounted paths with your host user)
|
|
229
|
-
PUID=$(id -u) PGID=$(id -g) docker compose up -d
|
|
229
|
+
PUID=$(id -u) PGID=$(id -g) docker compose -f <(curl -L https://raw.githubusercontent.com/cocoindex-io/cocoindex-code/refs/heads/main/docker/docker-compose.yml) up -d
|
|
230
230
|
```
|
|
231
231
|
|
|
232
|
+
Or grab [`docker/docker-compose.yml`](./docker/docker-compose.yml) and run `docker compose up -d` next to it (works on any shell, including Windows cmd / PowerShell).
|
|
233
|
+
|
|
232
234
|
By default your home directory is mounted into the container (set
|
|
233
235
|
`COCOINDEX_HOST_WORKSPACE` to narrow this to a specific code folder). Index
|
|
234
236
|
data and the embedding model cache persist in a Docker volume across
|
|
235
237
|
restarts. Your global settings file at `$HOME/.cocoindex_code/global_settings.yml`
|
|
236
238
|
is visible and editable on the host; edits take effect on your next `ccc` command.
|
|
237
239
|
|
|
238
|
-
> **
|
|
239
|
-
>
|
|
240
|
-
>
|
|
240
|
+
> **Pick a different image:** set `COCOINDEX_CODE_IMAGE` to override the
|
|
241
|
+
> default. For example, the `:full` variant or GHCR:
|
|
242
|
+
> ```bash
|
|
243
|
+
> COCOINDEX_CODE_IMAGE=cocoindex/cocoindex-code:full docker compose up -d
|
|
244
|
+
> COCOINDEX_CODE_IMAGE=ghcr.io/cocoindex-io/cocoindex-code:latest docker compose up -d
|
|
245
|
+
> ```
|
|
241
246
|
|
|
242
247
|
### Or: `docker run`
|
|
243
248
|
|
|
@@ -23,7 +23,7 @@ classifiers = [
|
|
|
23
23
|
|
|
24
24
|
dependencies = [
|
|
25
25
|
"mcp>=1.0.0",
|
|
26
|
-
"cocoindex[litellm]
|
|
26
|
+
"cocoindex[litellm]>=1.0.0,<1.1.0",
|
|
27
27
|
"sqlite-vec>=0.1.0",
|
|
28
28
|
"pydantic>=2.0.0",
|
|
29
29
|
"numpy>=1.24.0",
|
|
@@ -39,9 +39,7 @@ dependencies = [
|
|
|
39
39
|
# `embeddings-local` is the primary feature extra: it pulls in
|
|
40
40
|
# `sentence-transformers` (via cocoindex) so local embeddings work without
|
|
41
41
|
# an API key.
|
|
42
|
-
embeddings-local = [
|
|
43
|
-
"cocoindex[sentence-transformers]==1.0.0a43",
|
|
44
|
-
]
|
|
42
|
+
embeddings-local = ["cocoindex[sentence-transformers]>=1.0.0,<1.1.0"]
|
|
45
43
|
# `full` is the umbrella "batteries-included" alias. Today it's just
|
|
46
44
|
# `embeddings-local`, but we expect to bundle more optional niceties under
|
|
47
45
|
# it over time — users who want everything can keep using `[full]` and pick
|
|
@@ -49,9 +47,7 @@ embeddings-local = [
|
|
|
49
47
|
# `:full` image variant for consistency across install paths. Contents are
|
|
50
48
|
# inlined rather than self-referencing `cocoindex-code[embeddings-local]`
|
|
51
49
|
# to avoid resolver edge cases with older pip.
|
|
52
|
-
full = [
|
|
53
|
-
"cocoindex[sentence-transformers]==1.0.0a43",
|
|
54
|
-
]
|
|
50
|
+
full = ["cocoindex[sentence-transformers]>=1.0.0,<1.1.0"]
|
|
55
51
|
dev = [
|
|
56
52
|
"pytest>=7.0.0",
|
|
57
53
|
"pytest-asyncio>=0.21.0",
|
|
@@ -59,7 +55,7 @@ dev = [
|
|
|
59
55
|
"ruff>=0.1.0",
|
|
60
56
|
"mypy>=1.0.0",
|
|
61
57
|
"prek>=0.1.0",
|
|
62
|
-
"cocoindex[sentence-transformers]
|
|
58
|
+
"cocoindex[sentence-transformers]>=1.0.0,<1.1.0",
|
|
63
59
|
]
|
|
64
60
|
|
|
65
61
|
[project.scripts]
|
|
@@ -93,12 +89,9 @@ dev = [
|
|
|
93
89
|
"mypy>=1.0.0",
|
|
94
90
|
"prek>=0.1.0",
|
|
95
91
|
"types-pyyaml>=6.0.12.20250915",
|
|
96
|
-
"cocoindex[sentence-transformers]
|
|
92
|
+
"cocoindex[sentence-transformers]>=1.0.0,<1.1.0",
|
|
97
93
|
]
|
|
98
94
|
|
|
99
|
-
[tool.uv]
|
|
100
|
-
prerelease = "explicit"
|
|
101
|
-
|
|
102
95
|
[tool.ruff]
|
|
103
96
|
line-length = 100
|
|
104
97
|
|
|
@@ -110,6 +103,7 @@ python_version = "3.11"
|
|
|
110
103
|
strict = true
|
|
111
104
|
ignore_missing_imports = true
|
|
112
105
|
explicit_package_bases = true
|
|
106
|
+
files = ["src"]
|
|
113
107
|
|
|
114
108
|
[tool.pytest.ini_options]
|
|
115
109
|
testpaths = ["tests"]
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.2.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 2,
|
|
21
|
+
__version__ = version = '0.2.28'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 2, 28)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -24,6 +24,6 @@ from cocoindex.resources.chunk import Chunk, TextPosition
|
|
|
24
24
|
ChunkerFn = _Callable[[_pathlib.Path, str], tuple[str | None, list[Chunk]]]
|
|
25
25
|
|
|
26
26
|
# tracked=False: callables are not fingerprint-able; daemon restart re-indexes anyway.
|
|
27
|
-
CHUNKER_REGISTRY = _coco.ContextKey[dict[str, ChunkerFn]]("chunker_registry"
|
|
27
|
+
CHUNKER_REGISTRY = _coco.ContextKey[dict[str, ChunkerFn]]("chunker_registry")
|
|
28
28
|
|
|
29
29
|
__all__ = ["Chunk", "ChunkerFn", "CHUNKER_REGISTRY", "TextPosition"]
|
|
@@ -31,9 +31,9 @@ _QUERY_PROMPT_MODELS = {"nomic-ai/nomic-embed-code", "nomic-ai/CodeRankEmbed"}
|
|
|
31
31
|
Embedder = Union["SentenceTransformerEmbedder", "LiteLLMEmbedder"]
|
|
32
32
|
|
|
33
33
|
# Context keys
|
|
34
|
-
EMBEDDER = coco.ContextKey[Embedder]("embedder")
|
|
35
|
-
SQLITE_DB = coco.ContextKey[sqlite.ManagedConnection]("index_db"
|
|
36
|
-
CODEBASE_DIR = coco.ContextKey[pathlib.Path]("codebase"
|
|
34
|
+
EMBEDDER = coco.ContextKey[Embedder]("embedder", detect_change=True)
|
|
35
|
+
SQLITE_DB = coco.ContextKey[sqlite.ManagedConnection]("index_db")
|
|
36
|
+
CODEBASE_DIR = coco.ContextKey[pathlib.Path]("codebase")
|
|
37
37
|
|
|
38
38
|
# Module-level variable — set by daemon at startup (needed for CodeChunk annotation).
|
|
39
39
|
embedder: Embedder | None = None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|