cocoindex-code 0.2.31__tar.gz → 0.2.33__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.
Files changed (25) hide show
  1. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/PKG-INFO +3 -1
  2. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/README.md +2 -0
  3. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/pyproject.toml +1 -1
  4. cocoindex_code-0.2.33/src/cocoindex_code/__init__.py +23 -0
  5. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/_version.py +2 -2
  6. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/cli.py +13 -4
  7. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/settings.py +8 -2
  8. cocoindex_code-0.2.31/src/cocoindex_code/__init__.py +0 -10
  9. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/.gitignore +0 -0
  10. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/LICENSE +0 -0
  11. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/__main__.py +0 -0
  12. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/_daemon_paths.py +0 -0
  13. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/chunking.py +0 -0
  14. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/client.py +0 -0
  15. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/daemon.py +0 -0
  16. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/embedder_defaults.py +0 -0
  17. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/embedder_params.py +0 -0
  18. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/indexer.py +0 -0
  19. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/litellm_embedder.py +0 -0
  20. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/project.py +0 -0
  21. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/protocol.py +0 -0
  22. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/query.py +0 -0
  23. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/schema.py +0 -0
  24. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/server.py +0 -0
  25. {cocoindex_code-0.2.31 → cocoindex_code-0.2.33}/src/cocoindex_code/shared.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cocoindex-code
3
- Version: 0.2.31
3
+ Version: 0.2.33
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
@@ -708,10 +708,12 @@ embedding:
708
708
  | scala | | `.scala` |
709
709
  | solidity | | `.sol` |
710
710
  | sql | | `.sql` |
711
+ | svelte | | `.svelte` |
711
712
  | swift | | `.swift` |
712
713
  | toml | | `.toml` |
713
714
  | tsx | | `.tsx` |
714
715
  | typescript | ts | `.ts` |
716
+ | vue | | `.vue` |
715
717
  | xml | | `.xml` |
716
718
  | yaml | | `.yaml`, `.yml` |
717
719
 
@@ -664,10 +664,12 @@ embedding:
664
664
  | scala | | `.scala` |
665
665
  | solidity | | `.sol` |
666
666
  | sql | | `.sql` |
667
+ | svelte | | `.svelte` |
667
668
  | swift | | `.swift` |
668
669
  | toml | | `.toml` |
669
670
  | tsx | | `.tsx` |
670
671
  | typescript | ts | `.ts` |
672
+ | vue | | `.vue` |
671
673
  | xml | | `.xml` |
672
674
  | yaml | | `.yaml`, `.yml` |
673
675
 
@@ -89,7 +89,7 @@ dev = [
89
89
  "mypy>=1.0.0",
90
90
  "prek>=0.1.0",
91
91
  "types-pyyaml>=6.0.12.20250915",
92
- "cocoindex[sentence-transformers]>=1.0.0,<1.1.0",
92
+ "cocoindex[sentence-transformers]>=1.0.3,<1.1.0",
93
93
  ]
94
94
 
95
95
  [tool.ruff]
@@ -0,0 +1,23 @@
1
+ """CocoIndex Code - MCP server for indexing and querying codebases."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import logging
6
+ from typing import TYPE_CHECKING, Any
7
+
8
+ logging.basicConfig(level=logging.WARNING)
9
+
10
+ from ._version import __version__ # noqa: E402
11
+
12
+ if TYPE_CHECKING:
13
+ from .server import main as main
14
+
15
+ __all__ = ["main", "__version__"]
16
+
17
+
18
+ def __getattr__(name: str) -> Any:
19
+ if name == "main":
20
+ from .server import main
21
+
22
+ return main
23
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
@@ -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.31'
22
- __version_tuple__ = version_tuple = (0, 2, 31)
21
+ __version__ = version = '0.2.33'
22
+ __version_tuple__ = version_tuple = (0, 2, 33)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -7,12 +7,18 @@ import os
7
7
  import sys
8
8
  from collections.abc import Callable
9
9
  from pathlib import Path
10
- from typing import TypeVar
10
+ from typing import TYPE_CHECKING, TypeVar
11
11
 
12
12
  import typer as _typer
13
13
 
14
- from .client import DaemonStartError
15
- from .protocol import DoctorCheckResult, IndexingProgress, ProjectStatusResponse, SearchResponse
14
+ if TYPE_CHECKING:
15
+ from .protocol import (
16
+ DoctorCheckResult,
17
+ IndexingProgress,
18
+ ProjectStatusResponse,
19
+ SearchResponse,
20
+ )
21
+
16
22
  from .settings import (
17
23
  DEFAULT_ST_MODEL,
18
24
  EmbeddingSettings,
@@ -104,6 +110,8 @@ def _catch_daemon_start_error(func: _F) -> _F:
104
110
 
105
111
  @functools.wraps(func)
106
112
  def wrapper(*args: object, **kwargs: object) -> object:
113
+ from .client import DaemonStartError
114
+
107
115
  try:
108
116
  return func(*args, **kwargs)
109
117
  except DaemonStartError as e:
@@ -204,7 +212,7 @@ def _run_index_with_progress(project_root: str) -> None:
204
212
  except RuntimeError as e:
205
213
  live.stop()
206
214
  # Let DaemonStartError propagate to the decorator for consistent handling.
207
- if isinstance(e, DaemonStartError):
215
+ if isinstance(e, _client.DaemonStartError):
208
216
  raise
209
217
  _typer.echo(f"Indexing failed: {e}", err=True)
210
218
  raise _typer.Exit(code=1)
@@ -397,6 +405,7 @@ def _run_init_model_check(settings_path: Path) -> None:
397
405
  from rich.spinner import Spinner as _Spinner
398
406
 
399
407
  from . import client as _client
408
+ from .protocol import DoctorCheckResult
400
409
 
401
410
  err_console = _Console(stderr=True)
402
411
  results: list[DoctorCheckResult] = []
@@ -5,10 +5,12 @@ from __future__ import annotations
5
5
  import os
6
6
  from dataclasses import dataclass, field
7
7
  from pathlib import Path
8
- from typing import Any
8
+ from typing import TYPE_CHECKING, Any
9
9
 
10
10
  import yaml as _yaml
11
- from pathspec import GitIgnoreSpec
11
+
12
+ if TYPE_CHECKING:
13
+ from pathspec import GitIgnoreSpec
12
14
 
13
15
  # ---------------------------------------------------------------------------
14
16
  # Default file patterns (moved from indexer.py)
@@ -53,6 +55,8 @@ DEFAULT_INCLUDED_PATTERNS: list[str] = [
53
55
  "**/*.r", # R
54
56
  "**/*.html", # HTML
55
57
  "**/*.htm", # HTML
58
+ "**/*.svelte", # Svelte
59
+ "**/*.vue", # Vue
56
60
  "**/*.css", # CSS
57
61
  "**/*.scss", # SCSS
58
62
  "**/*.json", # JSON
@@ -389,6 +393,8 @@ def global_settings_mtime_us() -> int | None:
389
393
 
390
394
  def load_gitignore_spec(project_root: Path) -> GitIgnoreSpec | None:
391
395
  """Load a GitIgnoreSpec for the project's ``.gitignore`` if present."""
396
+ from pathspec import GitIgnoreSpec
397
+
392
398
  gitignore = project_root / ".gitignore"
393
399
  if not gitignore.is_file():
394
400
  return None
@@ -1,10 +0,0 @@
1
- """CocoIndex Code - MCP server for indexing and querying codebases."""
2
-
3
- import logging
4
-
5
- logging.basicConfig(level=logging.WARNING)
6
-
7
- from ._version import __version__ # noqa: E402
8
- from .server import main # noqa: E402
9
-
10
- __all__ = ["main", "__version__"]
File without changes