scubiee 0.2.0__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.
- scubiee-0.2.0/PKG-INFO +185 -0
- scubiee-0.2.0/README.md +139 -0
- scubiee-0.2.0/packages/conductor/__init__.py +5 -0
- scubiee-0.2.0/packages/conductor/architectures.py +1411 -0
- scubiee-0.2.0/packages/conductor/bm25_index.py +64 -0
- scubiee-0.2.0/packages/conductor/conductor.py +187 -0
- scubiee-0.2.0/packages/conductor/dense_index.py +59 -0
- scubiee-0.2.0/packages/conductor/diverse_bank.py +295 -0
- scubiee-0.2.0/packages/conductor/f95.py +291 -0
- scubiee-0.2.0/packages/conductor/fusion_math.py +140 -0
- scubiee-0.2.0/packages/conductor/graphify_retriever.py +270 -0
- scubiee-0.2.0/packages/conductor/hard_v2_gold.py +272 -0
- scubiee-0.2.0/packages/conductor/hard_v3_gold.py +270 -0
- scubiee-0.2.0/packages/conductor/query_router.py +201 -0
- scubiee-0.2.0/packages/conductor/rrf.py +22 -0
- scubiee-0.2.0/packages/conductor/service.py +293 -0
- scubiee-0.2.0/packages/conductor/soft_bank.py +201 -0
- scubiee-0.2.0/packages/conductor/suite_bank.py +344 -0
- scubiee-0.2.0/packages/conductor/top3.py +31 -0
- scubiee-0.2.0/packages/enrich/__init__.py +156 -0
- scubiee-0.2.0/packages/enrich/__main__.py +80 -0
- scubiee-0.2.0/packages/graphify/__init__.py +24 -0
- scubiee-0.2.0/packages/graphify/_minhash.py +107 -0
- scubiee-0.2.0/packages/graphify/analyze.py +749 -0
- scubiee-0.2.0/packages/graphify/build.py +1502 -0
- scubiee-0.2.0/packages/graphify/cache.py +1364 -0
- scubiee-0.2.0/packages/graphify/dedup.py +746 -0
- scubiee-0.2.0/packages/graphify/detect.py +1877 -0
- scubiee-0.2.0/packages/graphify/export.py +1099 -0
- scubiee-0.2.0/packages/graphify/exporters/__init__.py +1 -0
- scubiee-0.2.0/packages/graphify/exporters/base.py +14 -0
- scubiee-0.2.0/packages/graphify/exporters/graphdb.py +173 -0
- scubiee-0.2.0/packages/graphify/exporters/html.py +560 -0
- scubiee-0.2.0/packages/graphify/extract.py +5717 -0
- scubiee-0.2.0/packages/graphify/extractors/__init__.py +64 -0
- scubiee-0.2.0/packages/graphify/extractors/apex.py +215 -0
- scubiee-0.2.0/packages/graphify/extractors/base.py +85 -0
- scubiee-0.2.0/packages/graphify/extractors/bash.py +448 -0
- scubiee-0.2.0/packages/graphify/extractors/blade.py +53 -0
- scubiee-0.2.0/packages/graphify/extractors/csharp.py +441 -0
- scubiee-0.2.0/packages/graphify/extractors/dart.py +528 -0
- scubiee-0.2.0/packages/graphify/extractors/dm.py +494 -0
- scubiee-0.2.0/packages/graphify/extractors/elixir.py +228 -0
- scubiee-0.2.0/packages/graphify/extractors/engine.py +4860 -0
- scubiee-0.2.0/packages/graphify/extractors/fortran.py +309 -0
- scubiee-0.2.0/packages/graphify/extractors/go.py +434 -0
- scubiee-0.2.0/packages/graphify/extractors/json_config.py +216 -0
- scubiee-0.2.0/packages/graphify/extractors/julia.py +275 -0
- scubiee-0.2.0/packages/graphify/extractors/markdown.py +194 -0
- scubiee-0.2.0/packages/graphify/extractors/models.py +121 -0
- scubiee-0.2.0/packages/graphify/extractors/objc.py +430 -0
- scubiee-0.2.0/packages/graphify/extractors/pascal.py +688 -0
- scubiee-0.2.0/packages/graphify/extractors/pascal_forms.py +196 -0
- scubiee-0.2.0/packages/graphify/extractors/powershell.py +496 -0
- scubiee-0.2.0/packages/graphify/extractors/razor.py +119 -0
- scubiee-0.2.0/packages/graphify/extractors/resolution.py +2727 -0
- scubiee-0.2.0/packages/graphify/extractors/rust.py +410 -0
- scubiee-0.2.0/packages/graphify/extractors/sln.py +92 -0
- scubiee-0.2.0/packages/graphify/extractors/sql.py +403 -0
- scubiee-0.2.0/packages/graphify/extractors/terraform.py +181 -0
- scubiee-0.2.0/packages/graphify/extractors/verilog.py +329 -0
- scubiee-0.2.0/packages/graphify/extractors/zig.py +175 -0
- scubiee-0.2.0/packages/graphify/file_slice.py +162 -0
- scubiee-0.2.0/packages/graphify/google_workspace.py +237 -0
- scubiee-0.2.0/packages/graphify/ids.py +50 -0
- scubiee-0.2.0/packages/graphify/ingest.py +353 -0
- scubiee-0.2.0/packages/graphify/llm.py +3115 -0
- scubiee-0.2.0/packages/graphify/manifest_ingest.py +247 -0
- scubiee-0.2.0/packages/graphify/mcp_ingest.py +386 -0
- scubiee-0.2.0/packages/graphify/pascal_resolution.py +129 -0
- scubiee-0.2.0/packages/graphify/paths.py +345 -0
- scubiee-0.2.0/packages/graphify/prs.py +761 -0
- scubiee-0.2.0/packages/graphify/querylog.py +80 -0
- scubiee-0.2.0/packages/graphify/reflect.py +882 -0
- scubiee-0.2.0/packages/graphify/resolver_registry.py +85 -0
- scubiee-0.2.0/packages/graphify/ruby_resolution.py +169 -0
- scubiee-0.2.0/packages/graphify/security.py +460 -0
- scubiee-0.2.0/packages/graphify/serve.py +2157 -0
- scubiee-0.2.0/packages/graphify/symbol_resolution.py +554 -0
- scubiee-0.2.0/packages/graphify/transcribe.py +186 -0
- scubiee-0.2.0/packages/graphify/validate.py +95 -0
- scubiee-0.2.0/packages/hybrid_cbm/__init__.py +6 -0
- scubiee-0.2.0/packages/hybrid_cbm/__main__.py +8 -0
- scubiee-0.2.0/packages/hybrid_cbm/instructions.py +28 -0
- scubiee-0.2.0/packages/hybrid_cbm/proxy.py +221 -0
- scubiee-0.2.0/packages/hybrid_cbm/semantic.py +118 -0
- scubiee-0.2.0/packages/hybrid_cbm/server.py +209 -0
- scubiee-0.2.0/packages/metadata/__init__.py +177 -0
- scubiee-0.2.0/packages/parse_harness/__init__.py +1 -0
- scubiee-0.2.0/packages/parse_harness/__main__.py +38 -0
- scubiee-0.2.0/packages/parse_harness/bakeoff.py +60 -0
- scubiee-0.2.0/packages/parse_harness/claude_context_probe.py +51 -0
- scubiee-0.2.0/packages/parse_harness/graphify_adapter.py +169 -0
- scubiee-0.2.0/packages/pipeline/__init__.py +19 -0
- scubiee-0.2.0/packages/pipeline/__main__.py +1001 -0
- scubiee-0.2.0/packages/pipeline/accel.py +661 -0
- scubiee-0.2.0/packages/pipeline/artifact_guard.py +68 -0
- scubiee-0.2.0/packages/pipeline/capability.py +444 -0
- scubiee-0.2.0/packages/pipeline/ce_service.py +1084 -0
- scubiee-0.2.0/packages/pipeline/certify.py +600 -0
- scubiee-0.2.0/packages/pipeline/chunk_compress.py +867 -0
- scubiee-0.2.0/packages/pipeline/chunk_merkle.py +45 -0
- scubiee-0.2.0/packages/pipeline/cli.py +4 -0
- scubiee-0.2.0/packages/pipeline/client.py +302 -0
- scubiee-0.2.0/packages/pipeline/context_agent/__init__.py +11 -0
- scubiee-0.2.0/packages/pipeline/context_agent/__main__.py +8 -0
- scubiee-0.2.0/packages/pipeline/context_agent/agent.py +238 -0
- scubiee-0.2.0/packages/pipeline/context_agent/llm_llama.py +99 -0
- scubiee-0.2.0/packages/pipeline/context_agent/prompts.py +40 -0
- scubiee-0.2.0/packages/pipeline/context_agent/tools.py +154 -0
- scubiee-0.2.0/packages/pipeline/context_nav.py +584 -0
- scubiee-0.2.0/packages/pipeline/daemon.py +448 -0
- scubiee-0.2.0/packages/pipeline/dashboard.py +157 -0
- scubiee-0.2.0/packages/pipeline/dashboard_port.py +181 -0
- scubiee-0.2.0/packages/pipeline/dashboard_server.py +787 -0
- scubiee-0.2.0/packages/pipeline/dashboard_ui/app.js +586 -0
- scubiee-0.2.0/packages/pipeline/dashboard_ui/index.html +255 -0
- scubiee-0.2.0/packages/pipeline/dashboard_ui/lucide.min.js +12 -0
- scubiee-0.2.0/packages/pipeline/dashboard_ui/storage_render.js +156 -0
- scubiee-0.2.0/packages/pipeline/dashboard_ui/styles.css +518 -0
- scubiee-0.2.0/packages/pipeline/dirty_journal.py +193 -0
- scubiee-0.2.0/packages/pipeline/dirty_ledger.py +108 -0
- scubiee-0.2.0/packages/pipeline/doctor.py +297 -0
- scubiee-0.2.0/packages/pipeline/embedder.py +570 -0
- scubiee-0.2.0/packages/pipeline/engine.py +381 -0
- scubiee-0.2.0/packages/pipeline/fair_schedule.py +117 -0
- scubiee-0.2.0/packages/pipeline/faiss_store.py +8 -0
- scubiee-0.2.0/packages/pipeline/freshness.py +331 -0
- scubiee-0.2.0/packages/pipeline/graphify_mcp_tools.py +163 -0
- scubiee-0.2.0/packages/pipeline/hardware.py +221 -0
- scubiee-0.2.0/packages/pipeline/hot_patch.py +63 -0
- scubiee-0.2.0/packages/pipeline/incremental.py +582 -0
- scubiee-0.2.0/packages/pipeline/index_manager.py +67 -0
- scubiee-0.2.0/packages/pipeline/indexer.py +318 -0
- scubiee-0.2.0/packages/pipeline/lifecycle_runtime.py +436 -0
- scubiee-0.2.0/packages/pipeline/live_reindex.py +51 -0
- scubiee-0.2.0/packages/pipeline/locate.py +889 -0
- scubiee-0.2.0/packages/pipeline/mcp_install.py +84 -0
- scubiee-0.2.0/packages/pipeline/mcp_locate.py +1771 -0
- scubiee-0.2.0/packages/pipeline/mcp_server.py +16 -0
- scubiee-0.2.0/packages/pipeline/merkle.py +208 -0
- scubiee-0.2.0/packages/pipeline/paths.py +95 -0
- scubiee-0.2.0/packages/pipeline/preflight.py +345 -0
- scubiee-0.2.0/packages/pipeline/process_job.py +122 -0
- scubiee-0.2.0/packages/pipeline/project_id.py +379 -0
- scubiee-0.2.0/packages/pipeline/query_tune.py +130 -0
- scubiee-0.2.0/packages/pipeline/registration.py +212 -0
- scubiee-0.2.0/packages/pipeline/repo_lifecycle.py +699 -0
- scubiee-0.2.0/packages/pipeline/repo_presence.py +131 -0
- scubiee-0.2.0/packages/pipeline/repo_runtime.py +145 -0
- scubiee-0.2.0/packages/pipeline/resource_envelope.py +35 -0
- scubiee-0.2.0/packages/pipeline/resources.py +434 -0
- scubiee-0.2.0/packages/pipeline/root_probe.py +175 -0
- scubiee-0.2.0/packages/pipeline/runtime_profile.py +108 -0
- scubiee-0.2.0/packages/pipeline/searcher.py +103 -0
- scubiee-0.2.0/packages/pipeline/server.py +565 -0
- scubiee-0.2.0/packages/pipeline/session_store.py +510 -0
- scubiee-0.2.0/packages/pipeline/settings.py +89 -0
- scubiee-0.2.0/packages/pipeline/storage_policy.py +281 -0
- scubiee-0.2.0/packages/pipeline/store.py +167 -0
- scubiee-0.2.0/packages/pipeline/sync_loop.py +571 -0
- scubiee-0.2.0/packages/pipeline/sync_status.py +104 -0
- scubiee-0.2.0/packages/pipeline/test_runner.py +158 -0
- scubiee-0.2.0/packages/pipeline/token_meter.py +236 -0
- scubiee-0.2.0/packages/pipeline/turbo_quant.py +271 -0
- scubiee-0.2.0/packages/pipeline/vectordb.py +464 -0
- scubiee-0.2.0/packages/pipeline/watchdog.py +346 -0
- scubiee-0.2.0/packages/pipeline/work_session.py +229 -0
- scubiee-0.2.0/packages/repo_ir/__init__.py +85 -0
- scubiee-0.2.0/packages/scubiee.egg-info/PKG-INFO +185 -0
- scubiee-0.2.0/packages/scubiee.egg-info/SOURCES.txt +228 -0
- scubiee-0.2.0/packages/scubiee.egg-info/dependency_links.txt +1 -0
- scubiee-0.2.0/packages/scubiee.egg-info/entry_points.txt +4 -0
- scubiee-0.2.0/packages/scubiee.egg-info/requires.txt +44 -0
- scubiee-0.2.0/packages/scubiee.egg-info/top_level.txt +8 -0
- scubiee-0.2.0/pyproject.toml +66 -0
- scubiee-0.2.0/setup.cfg +4 -0
- scubiee-0.2.0/tests/test_artifact_guard.py +54 -0
- scubiee-0.2.0/tests/test_ast_harness.py +79 -0
- scubiee-0.2.0/tests/test_auto_sessions_observability.py +300 -0
- scubiee-0.2.0/tests/test_batch_calibration.py +41 -0
- scubiee-0.2.0/tests/test_capability_promotion.py +55 -0
- scubiee-0.2.0/tests/test_ce_architecture.py +68 -0
- scubiee-0.2.0/tests/test_chunk_merkle.py +29 -0
- scubiee-0.2.0/tests/test_cli_init_repo.py +71 -0
- scubiee-0.2.0/tests/test_context_nav.py +65 -0
- scubiee-0.2.0/tests/test_cross_platform_profiles.py +219 -0
- scubiee-0.2.0/tests/test_daemon_guardrails.py +53 -0
- scubiee-0.2.0/tests/test_dashboard_api.py +514 -0
- scubiee-0.2.0/tests/test_dashboard_port.py +111 -0
- scubiee-0.2.0/tests/test_dashboard_ui_contract.py +203 -0
- scubiee-0.2.0/tests/test_dirty_ledger.py +21 -0
- scubiee-0.2.0/tests/test_doctor_certify.py +108 -0
- scubiee-0.2.0/tests/test_e2e_pipeline.py +62 -0
- scubiee-0.2.0/tests/test_enrich.py +67 -0
- scubiee-0.2.0/tests/test_freshness.py +99 -0
- scubiee-0.2.0/tests/test_hybrid_cbm.py +215 -0
- scubiee-0.2.0/tests/test_index_coverage.py +85 -0
- scubiee-0.2.0/tests/test_install_profile_selection.py +247 -0
- scubiee-0.2.0/tests/test_lifecycle_runtime.py +223 -0
- scubiee-0.2.0/tests/test_live_reindexing.py +247 -0
- scubiee-0.2.0/tests/test_mcp_lean.py +56 -0
- scubiee-0.2.0/tests/test_mcp_locate.py +777 -0
- scubiee-0.2.0/tests/test_multi_repo_runtime.py +200 -0
- scubiee-0.2.0/tests/test_package_install_entry.py +60 -0
- scubiee-0.2.0/tests/test_pipeline_core.py +52 -0
- scubiee-0.2.0/tests/test_preflight.py +192 -0
- scubiee-0.2.0/tests/test_production_scenarios.py +126 -0
- scubiee-0.2.0/tests/test_project_id.py +249 -0
- scubiee-0.2.0/tests/test_prune_engine_state.py +57 -0
- scubiee-0.2.0/tests/test_registration_modes.py +123 -0
- scubiee-0.2.0/tests/test_repo_lifecycle.py +338 -0
- scubiee-0.2.0/tests/test_repo_lifecycle_dashboard_actions.py +419 -0
- scubiee-0.2.0/tests/test_repo_presence.py +122 -0
- scubiee-0.2.0/tests/test_resource_envelope.py +177 -0
- scubiee-0.2.0/tests/test_resources.py +131 -0
- scubiee-0.2.0/tests/test_root_probe.py +140 -0
- scubiee-0.2.0/tests/test_runtime_cpu_backup.py +209 -0
- scubiee-0.2.0/tests/test_runtime_profile.py +56 -0
- scubiee-0.2.0/tests/test_runtime_publish.py +124 -0
- scubiee-0.2.0/tests/test_sdk_mcp_dev_trial.py +1790 -0
- scubiee-0.2.0/tests/test_sdk_mcp_smoke.py +434 -0
- scubiee-0.2.0/tests/test_session_store.py +110 -0
- scubiee-0.2.0/tests/test_source_integrity.py +20 -0
- scubiee-0.2.0/tests/test_storage_policy.py +292 -0
- scubiee-0.2.0/tests/test_sync_status_canaries.py +131 -0
- scubiee-0.2.0/tests/test_test_runner.py +72 -0
- scubiee-0.2.0/tests/test_vectordb.py +112 -0
- scubiee-0.2.0/tests/test_watchdog.py +135 -0
- scubiee-0.2.0/tests/test_watcher_recovery.py +178 -0
scubiee-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: scubiee
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Scubiee — local Cursor MCP context engine: setup once, ctx init per repo, CUDA/DirectML/CoreML/CPU.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Usmansayed/new-context-engine
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: numpy>=1.26
|
|
9
|
+
Requires-Dist: faiss-cpu>=1.8
|
|
10
|
+
Requires-Dist: requests>=2.31
|
|
11
|
+
Requires-Dist: networkx>=3.2
|
|
12
|
+
Requires-Dist: rapidfuzz>=3.0
|
|
13
|
+
Requires-Dist: psutil>=5.9
|
|
14
|
+
Requires-Dist: tree-sitter<0.26,>=0.23.0
|
|
15
|
+
Requires-Dist: tree-sitter-python<0.26,>=0.23
|
|
16
|
+
Requires-Dist: tree-sitter-javascript<0.26,>=0.23
|
|
17
|
+
Requires-Dist: tree-sitter-typescript<0.25,>=0.23
|
|
18
|
+
Requires-Dist: tree-sitter-json<0.25,>=0.23
|
|
19
|
+
Requires-Dist: tree-sitter-go<0.26,>=0.23
|
|
20
|
+
Requires-Dist: tree-sitter-rust<0.25,>=0.23
|
|
21
|
+
Requires-Dist: tree-sitter-java<0.25,>=0.23
|
|
22
|
+
Requires-Dist: tree-sitter-c<0.25,>=0.23
|
|
23
|
+
Requires-Dist: tree-sitter-cpp<0.25,>=0.23
|
|
24
|
+
Requires-Dist: tree-sitter-ruby<0.25,>=0.23
|
|
25
|
+
Requires-Dist: tree-sitter-c-sharp<0.25,>=0.23
|
|
26
|
+
Requires-Dist: mcp<2,>=1.0
|
|
27
|
+
Requires-Dist: huggingface_hub>=0.20
|
|
28
|
+
Provides-Extra: cpu
|
|
29
|
+
Requires-Dist: fastembed>=0.4; extra == "cpu"
|
|
30
|
+
Requires-Dist: onnxruntime>=1.17; extra == "cpu"
|
|
31
|
+
Provides-Extra: coreml
|
|
32
|
+
Requires-Dist: fastembed>=0.4; extra == "coreml"
|
|
33
|
+
Requires-Dist: onnxruntime>=1.17; extra == "coreml"
|
|
34
|
+
Provides-Extra: dml
|
|
35
|
+
Requires-Dist: fastembed>=0.4; extra == "dml"
|
|
36
|
+
Requires-Dist: onnxruntime-directml>=1.17; extra == "dml"
|
|
37
|
+
Provides-Extra: cuda
|
|
38
|
+
Requires-Dist: fastembed>=0.4; extra == "cuda"
|
|
39
|
+
Requires-Dist: onnxruntime-gpu>=1.17; extra == "cuda"
|
|
40
|
+
Provides-Extra: embed-st
|
|
41
|
+
Requires-Dist: sentence-transformers>=3.0; extra == "embed-st"
|
|
42
|
+
Requires-Dist: torch; extra == "embed-st"
|
|
43
|
+
Requires-Dist: einops; extra == "embed-st"
|
|
44
|
+
Provides-Extra: mcp
|
|
45
|
+
Requires-Dist: mcp<2,>=1.0; extra == "mcp"
|
|
46
|
+
|
|
47
|
+
# Scubiee
|
|
48
|
+
|
|
49
|
+
Local Context Engine: Merkle sync → Graphify AST → **mix** compress → CodeRankEmbed (FastEmbed) → TurboQuant/FAISS → Conductor `R_plan`
|
|
50
|
+
|
|
51
|
+
## Install (no git clone)
|
|
52
|
+
|
|
53
|
+
Requires **Python 3.10+**. One line installs the package and configures GPU/CPU + Cursor MCP.
|
|
54
|
+
|
|
55
|
+
**pip**
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install scubiee && ctx setup
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**npm** (installs the same Python package, then runs `ctx setup`)
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm install -g scubiee
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Then `ctx init <repo>` for each codebase, and reload MCP in Cursor (Settings → MCP → refresh).
|
|
68
|
+
|
|
69
|
+
`ctx setup` picks **CUDA** (NVIDIA), **DirectML** (Windows AMD/Intel), **CoreML** (macOS Metal/ANE), or **CPU**.
|
|
70
|
+
|
|
71
|
+
From a git checkout (contributors only): `pip install -e .` then `ctx setup`.
|
|
72
|
+
|
|
73
|
+
## Use
|
|
74
|
+
|
|
75
|
+
Inside the engine process there are **three managers** only:
|
|
76
|
+
|
|
77
|
+
| Manager | Role |
|
|
78
|
+
|---------|------|
|
|
79
|
+
| **RuntimeManager** | Workspace lifecycle, publish search generation after sync, serve queries |
|
|
80
|
+
| **IndexManager** | Merkle probe, full index, incremental sync |
|
|
81
|
+
| **ResourceManager** | CPU/RAM admission and embed batching |
|
|
82
|
+
|
|
83
|
+
A tiny **watchdog** sidecar (not a manager) polls `/health` and restarts the daemon if it crashes. Disable: `CTX_WATCHDOG=0`.
|
|
84
|
+
|
|
85
|
+
**Install-and-forget check** (isolated port/home):
|
|
86
|
+
|
|
87
|
+
```powershell
|
|
88
|
+
.\.venv\Scripts\python.exe -u scripts\sim_install_forget.py
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Use
|
|
92
|
+
|
|
93
|
+
In Cursor: call MCP tools after reload.
|
|
94
|
+
|
|
95
|
+
CLI (optional):
|
|
96
|
+
|
|
97
|
+
```powershell
|
|
98
|
+
ctx index .
|
|
99
|
+
ctx search "login validate"
|
|
100
|
+
ctx sync .
|
|
101
|
+
ctx status .
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Or: `python -m pipeline index .`
|
|
105
|
+
|
|
106
|
+
Default pre-embed compression is **`mix`** with a **512-char** cap (locked). Opt out: `CTX_COMPRESS=off`.
|
|
107
|
+
|
|
108
|
+
## Resource management
|
|
109
|
+
|
|
110
|
+
Indexing and embedding go through a **Resource Manager** that samples CPU/RAM and adapts throughput:
|
|
111
|
+
|
|
112
|
+
| Pressure | Behavior |
|
|
113
|
+
|----------|----------|
|
|
114
|
+
| idle | Larger embed batches |
|
|
115
|
+
| normal | Baseline (from accel profile) |
|
|
116
|
+
| busy | Smaller batches + pauses |
|
|
117
|
+
| critical | Background sync deferred; embeds crawl |
|
|
118
|
+
|
|
119
|
+
```powershell
|
|
120
|
+
ctx resources # live pressure + hardware
|
|
121
|
+
ctx resources --refresh # re-detect CPU/RAM/GPU/libs
|
|
122
|
+
ctx init # also writes hardware.json + picks fastest ORT backend
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Disable: `CTX_RM_DISABLE=1`. Tune: `CTX_RM_MAX_CPU`, `CTX_RM_CRITICAL_CPU`, `CTX_RM_MIN_FREE_RAM_MB`.
|
|
126
|
+
|
|
127
|
+
## Cursor MCP
|
|
128
|
+
|
|
129
|
+
After install, MCP tools talk to the local Context Engine service (`CTX_ENGINE_URL`, default `http://127.0.0.1:8765`). The MCP process auto-starts that service if needed.
|
|
130
|
+
|
|
131
|
+
Tools: `search_code`, `locate_capability`, `grep_code`, `file_outline`, `status`, `sync_index`, `set_repo`, `register_project`.
|
|
132
|
+
|
|
133
|
+
Dashboard (optional): http://127.0.0.1:8765/dashboard
|
|
134
|
+
|
|
135
|
+
Advanced (usually unnecessary):
|
|
136
|
+
|
|
137
|
+
```powershell
|
|
138
|
+
ctx engine status
|
|
139
|
+
ctx engine stop
|
|
140
|
+
ctx engine run . # foreground service
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
`ctx engine start` also starts the watchdog sidecar. Logs: `~/.context-engine/watchdog.log`.
|
|
144
|
+
|
|
145
|
+
**Registration modes** (dashboard or CLI):
|
|
146
|
+
|
|
147
|
+
| Mode | Trigger |
|
|
148
|
+
|------|---------|
|
|
149
|
+
| **Automatic** (default) | IDE/MCP open registers the project once, then incremental indexing |
|
|
150
|
+
| **MCP / CLI** | No auto-init; first tool call returns a consent prompt; use `register_project` (optional `always_allow`) or `ctx register` |
|
|
151
|
+
|
|
152
|
+
```powershell
|
|
153
|
+
ctx settings --mode automatic
|
|
154
|
+
ctx settings --mode mcp_cli
|
|
155
|
+
ctx register . --always-allow --fast
|
|
156
|
+
ctx serve . # open http://127.0.0.1:8765/dashboard
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
On open (automatic): resolves a stable **project id**, indexes if needed (`CTX_AUTO_INDEX=1`), then keeps the index fresh every **5 minutes** (changed files only — graph patch + embed together).
|
|
160
|
+
|
|
161
|
+
## Project data
|
|
162
|
+
|
|
163
|
+
| Location | Role |
|
|
164
|
+
|----------|------|
|
|
165
|
+
| `<repo>/.context-engine/id.json` | Tiny identity (`project_id`). Prefer gitignore. |
|
|
166
|
+
| `~/.context-engine/prefs.json` | Registration mode + indexing prefs |
|
|
167
|
+
| `~/.context-engine/projects/<project_id>/` | Chunks, graph, merkle, embed cache |
|
|
168
|
+
| `~/.context-engine/registry.json` | Maps `project_id` ↔ paths, `registered`, `always_allow` |
|
|
169
|
+
| `~/.context-engine/vectordb/` | FAISS + TurboQuant collections |
|
|
170
|
+
|
|
171
|
+
Path moved → id file recovers the store. Id file deleted → registry path recovers. Both gone → new id + reindex.
|
|
172
|
+
|
|
173
|
+
## Layout
|
|
174
|
+
|
|
175
|
+
| Path | Role |
|
|
176
|
+
|------|------|
|
|
177
|
+
| `packages/pipeline/` | Index, embed, FAISS+TurboQuant, MCP, sync |
|
|
178
|
+
| `packages/conductor/` | Retrieval fusion (`R_plan`, etc.) |
|
|
179
|
+
| `packages/graphify/` | Bundled AST / graph |
|
|
180
|
+
| `packages/enrich/`, `metadata/`, `repo_ir/` | Chunk enrichment |
|
|
181
|
+
| `scripts/install*` | Setup + MCP install |
|
|
182
|
+
| `tests/` | Unit / integration tests |
|
|
183
|
+
| `docs/` | Design notes + ship notes |
|
|
184
|
+
|
|
185
|
+
See `VENDOR.md` and `docs/compress-mix-shipped.md`.
|
scubiee-0.2.0/README.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Scubiee
|
|
2
|
+
|
|
3
|
+
Local Context Engine: Merkle sync → Graphify AST → **mix** compress → CodeRankEmbed (FastEmbed) → TurboQuant/FAISS → Conductor `R_plan`
|
|
4
|
+
|
|
5
|
+
## Install (no git clone)
|
|
6
|
+
|
|
7
|
+
Requires **Python 3.10+**. One line installs the package and configures GPU/CPU + Cursor MCP.
|
|
8
|
+
|
|
9
|
+
**pip**
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install scubiee && ctx setup
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**npm** (installs the same Python package, then runs `ctx setup`)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -g scubiee
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Then `ctx init <repo>` for each codebase, and reload MCP in Cursor (Settings → MCP → refresh).
|
|
22
|
+
|
|
23
|
+
`ctx setup` picks **CUDA** (NVIDIA), **DirectML** (Windows AMD/Intel), **CoreML** (macOS Metal/ANE), or **CPU**.
|
|
24
|
+
|
|
25
|
+
From a git checkout (contributors only): `pip install -e .` then `ctx setup`.
|
|
26
|
+
|
|
27
|
+
## Use
|
|
28
|
+
|
|
29
|
+
Inside the engine process there are **three managers** only:
|
|
30
|
+
|
|
31
|
+
| Manager | Role |
|
|
32
|
+
|---------|------|
|
|
33
|
+
| **RuntimeManager** | Workspace lifecycle, publish search generation after sync, serve queries |
|
|
34
|
+
| **IndexManager** | Merkle probe, full index, incremental sync |
|
|
35
|
+
| **ResourceManager** | CPU/RAM admission and embed batching |
|
|
36
|
+
|
|
37
|
+
A tiny **watchdog** sidecar (not a manager) polls `/health` and restarts the daemon if it crashes. Disable: `CTX_WATCHDOG=0`.
|
|
38
|
+
|
|
39
|
+
**Install-and-forget check** (isolated port/home):
|
|
40
|
+
|
|
41
|
+
```powershell
|
|
42
|
+
.\.venv\Scripts\python.exe -u scripts\sim_install_forget.py
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Use
|
|
46
|
+
|
|
47
|
+
In Cursor: call MCP tools after reload.
|
|
48
|
+
|
|
49
|
+
CLI (optional):
|
|
50
|
+
|
|
51
|
+
```powershell
|
|
52
|
+
ctx index .
|
|
53
|
+
ctx search "login validate"
|
|
54
|
+
ctx sync .
|
|
55
|
+
ctx status .
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Or: `python -m pipeline index .`
|
|
59
|
+
|
|
60
|
+
Default pre-embed compression is **`mix`** with a **512-char** cap (locked). Opt out: `CTX_COMPRESS=off`.
|
|
61
|
+
|
|
62
|
+
## Resource management
|
|
63
|
+
|
|
64
|
+
Indexing and embedding go through a **Resource Manager** that samples CPU/RAM and adapts throughput:
|
|
65
|
+
|
|
66
|
+
| Pressure | Behavior |
|
|
67
|
+
|----------|----------|
|
|
68
|
+
| idle | Larger embed batches |
|
|
69
|
+
| normal | Baseline (from accel profile) |
|
|
70
|
+
| busy | Smaller batches + pauses |
|
|
71
|
+
| critical | Background sync deferred; embeds crawl |
|
|
72
|
+
|
|
73
|
+
```powershell
|
|
74
|
+
ctx resources # live pressure + hardware
|
|
75
|
+
ctx resources --refresh # re-detect CPU/RAM/GPU/libs
|
|
76
|
+
ctx init # also writes hardware.json + picks fastest ORT backend
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Disable: `CTX_RM_DISABLE=1`. Tune: `CTX_RM_MAX_CPU`, `CTX_RM_CRITICAL_CPU`, `CTX_RM_MIN_FREE_RAM_MB`.
|
|
80
|
+
|
|
81
|
+
## Cursor MCP
|
|
82
|
+
|
|
83
|
+
After install, MCP tools talk to the local Context Engine service (`CTX_ENGINE_URL`, default `http://127.0.0.1:8765`). The MCP process auto-starts that service if needed.
|
|
84
|
+
|
|
85
|
+
Tools: `search_code`, `locate_capability`, `grep_code`, `file_outline`, `status`, `sync_index`, `set_repo`, `register_project`.
|
|
86
|
+
|
|
87
|
+
Dashboard (optional): http://127.0.0.1:8765/dashboard
|
|
88
|
+
|
|
89
|
+
Advanced (usually unnecessary):
|
|
90
|
+
|
|
91
|
+
```powershell
|
|
92
|
+
ctx engine status
|
|
93
|
+
ctx engine stop
|
|
94
|
+
ctx engine run . # foreground service
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
`ctx engine start` also starts the watchdog sidecar. Logs: `~/.context-engine/watchdog.log`.
|
|
98
|
+
|
|
99
|
+
**Registration modes** (dashboard or CLI):
|
|
100
|
+
|
|
101
|
+
| Mode | Trigger |
|
|
102
|
+
|------|---------|
|
|
103
|
+
| **Automatic** (default) | IDE/MCP open registers the project once, then incremental indexing |
|
|
104
|
+
| **MCP / CLI** | No auto-init; first tool call returns a consent prompt; use `register_project` (optional `always_allow`) or `ctx register` |
|
|
105
|
+
|
|
106
|
+
```powershell
|
|
107
|
+
ctx settings --mode automatic
|
|
108
|
+
ctx settings --mode mcp_cli
|
|
109
|
+
ctx register . --always-allow --fast
|
|
110
|
+
ctx serve . # open http://127.0.0.1:8765/dashboard
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
On open (automatic): resolves a stable **project id**, indexes if needed (`CTX_AUTO_INDEX=1`), then keeps the index fresh every **5 minutes** (changed files only — graph patch + embed together).
|
|
114
|
+
|
|
115
|
+
## Project data
|
|
116
|
+
|
|
117
|
+
| Location | Role |
|
|
118
|
+
|----------|------|
|
|
119
|
+
| `<repo>/.context-engine/id.json` | Tiny identity (`project_id`). Prefer gitignore. |
|
|
120
|
+
| `~/.context-engine/prefs.json` | Registration mode + indexing prefs |
|
|
121
|
+
| `~/.context-engine/projects/<project_id>/` | Chunks, graph, merkle, embed cache |
|
|
122
|
+
| `~/.context-engine/registry.json` | Maps `project_id` ↔ paths, `registered`, `always_allow` |
|
|
123
|
+
| `~/.context-engine/vectordb/` | FAISS + TurboQuant collections |
|
|
124
|
+
|
|
125
|
+
Path moved → id file recovers the store. Id file deleted → registry path recovers. Both gone → new id + reindex.
|
|
126
|
+
|
|
127
|
+
## Layout
|
|
128
|
+
|
|
129
|
+
| Path | Role |
|
|
130
|
+
|------|------|
|
|
131
|
+
| `packages/pipeline/` | Index, embed, FAISS+TurboQuant, MCP, sync |
|
|
132
|
+
| `packages/conductor/` | Retrieval fusion (`R_plan`, etc.) |
|
|
133
|
+
| `packages/graphify/` | Bundled AST / graph |
|
|
134
|
+
| `packages/enrich/`, `metadata/`, `repo_ir/` | Chunk enrichment |
|
|
135
|
+
| `scripts/install*` | Setup + MCP install |
|
|
136
|
+
| `tests/` | Unit / integration tests |
|
|
137
|
+
| `docs/` | Design notes + ship notes |
|
|
138
|
+
|
|
139
|
+
See `VENDOR.md` and `docs/compress-mix-shipped.md`.
|