-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathpyproject.toml
More file actions
243 lines (233 loc) · 7.65 KB
/
Copy pathpyproject.toml
File metadata and controls
243 lines (233 loc) · 7.65 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
[project]
name = "claude-ctx"
version = "1.0.21"
description = "CTX Fit: find the cheapest AI coding setup that reliably works on your repository, then apply the winner as a reviewable change"
authors = [{ name = "Steve Solun" }]
license = "MIT"
readme = "README.md"
requires-python = ">=3.11"
classifiers = [
"Operating System :: MacOS",
"Operating System :: POSIX",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
]
dependencies = [
"markdown>=3.6,<4",
"networkx>=3,<4",
"numpy>=1.24,<3",
"pymdown-extensions>=10.12,<12",
"pyyaml>=6,<7",
]
[project.urls]
Homepage = "https://stevesolun.github.io/ctx/"
Repository = "https://github.com/stevesolun/ctx"
Documentation = "https://stevesolun.github.io/ctx/"
Changelog = "https://github.com/stevesolun/ctx/blob/main/CHANGELOG.md"
[project.scripts]
# The public surface is one command. Modules behind the removed entry
# points still run via `python -m <module>`; only the installed console
# scripts were retired, so no capability was lost.
# Plan 001 phase R5: entrypoints for modules moved in R1-R4 now point at
# their canonical package path. Entrypoints for modules still at the
# flat layout (ctx_init, ctx_monitor, etc.) stay unchanged — they will
# move in a later R-phase. The legacy flat shims continue to exist so
# anyone invoking the CLIs via `python path/to/module.py` keeps working.
ctx-init = "ctx_init:main"
ctx-scan-repo = "scan_repo:main"
ctx-source-registry = "ctx.core.source_registry:main"
ctx-telemetry-export = "ctx.cli.telemetry:main"
ctx-telemetry-retention = "ctx.cli.telemetry:retention_main"
# Pre-ship dedup gate: flag entity pairs at or above the given cosine
# similarity threshold (default 0.85). Cross-type by design — finds
# duplicates across skills, agents, and MCPs in any combination.
# Pre-ship tag-completeness gate: scan skills/agents for empty
# `tags:` frontmatter and propose backfills from slug tokens + body
# keywords + the existing tag vocabulary. Report-only by default;
# `--apply` to write.
# Optional release-audit helper. SkillSpector itself remains external because
# it currently requires Python 3.12+ while ctx supports Python 3.11.
# Plan 001 phase H7: the generic harness CLI — `ctx run`,
# `ctx resume`, `ctx sessions`. Ships v1 of the model-agnostic
# harness; requires the [harness] optional dep for LiteLLM.
ctx = "ctx.cli.run:main"
# Plan 001 phase H8: standalone MCP server exposing ctx-core.
# Any MCP-aware host (Cline, Goose, Claude Code itself, Claude
# Agent SDK, custom harness) can attach this server and gain
# access to the skill/agent/MCP recommendation surface WITHOUT
# using our ``ctx run`` harness loop.
ctx-mcp-server = "ctx.mcp_server.server:main"
[project.optional-dependencies]
dev = [
"build==1.5.0",
"setuptools>=77",
"pytest>=8",
"pytest-cov>=5",
"pytest-xdist>=3.8",
"hypothesis>=6",
"mypy>=1.8",
"numpy<2.5",
"types-PyYAML>=6.0",
"ruff==0.15.20",
]
browser = [
"playwright>=1.52",
]
viz = [
"plotly>=5,<7",
]
embeddings = [
"sentence-transformers>=5.5,<6",
"transformers>=5.3,<6",
"torch>=2,<3",
]
ann = [
"hnswlib>=0.8,<0.9; platform_python_implementation == 'CPython'",
]
gcf = [
"gcf-python>=2.1.0,<3",
]
harness = [
# LiteLLM is the substrate for the model-agnostic harness
# (ctx.adapters.generic.providers). Every remote provider —
# OpenRouter (the tier-1 aggregator), Anthropic, OpenAI, Gemini,
# Mistral, ... — and local inference servers (Ollama, vLLM) all
# flow through a single litellm.completion() call. Keeping the
# dep optional means users who only want the Claude Code
# integration (ctx-skill-install, the hooks pipeline) don't pay
# the LiteLLM dependency-tree cost.
# Keep Click on a patched release while remaining compatible with
# current LiteLLM and the intentionally capped Typer CLI surface.
"click>=8.3.3,<9",
"typer>=0.16,<0.17",
"litellm>=1.40,<2",
]
[tool.setuptools]
# Incremental package-layout migration.
# During migration phases the codebase lives in TWO shapes simultaneously:
# - The legacy flat modules listed in ``py-modules`` below.
# - The target ``ctx`` package tree (ctx.core, ctx.adapters, ctx.cli,
# ctx.mcp_server, ctx.utils) declared in ``packages`` below.
# Each R-phase moves a small batch from the flat list into the package
# tree, updates imports, and drops the corresponding py-modules entry.
# Running both layouts at once is intentional — it lets the migration
# ship one commit at a time with the suite green at every step.
package-dir = {"" = "src"}
py-modules = [
"agent_add",
"agent_mirror",
"backup_config",
"backup_mirror",
"backup_retention",
"backup_watchdog",
"batch_convert",
"behavior_miner",
"catalog_builder",
"change_detector",
"corpus_cache",
"cosine_ranker",
"council_runner",
"ctx_audit_log",
"ctx_config",
"ctx_init",
"ctx_lifecycle",
"ctx_monitor",
"harness_add",
"harness_install",
"embedding_backend",
"flatten_agents",
"import_strix_skills",
"intake_gate",
"intake_pipeline",
"intent_interview",
"kpi_dashboard",
"link_conversions",
"mcp_add",
"mcp_canonical_index",
"mcp_enrich",
"mcp_entity",
"mcp_fetch",
"mcp_ingest",
"mcp_quality",
"mcp_quality_signals",
"mcp_rebuild_index",
"memory_anchor",
"scan_repo",
"skill_add",
"skill_add_detector",
"skill_category",
"skill_mirror",
"skill_quality",
"skill_telemetry",
"toolbox",
"toolbox_config",
"toolbox_hooks",
"toolbox_verdict",
"update_repo_stats",
"usage_tracker",
"versions_catalog",
"wiki_batch_entities",
"wiki_orchestrator",
"wiki_visualize",
]
# Do NOT ship the test suite to PyPI. The previous build inadvertently
# bundled src/tests/ because it was the only directory with __init__.py.
# The ``mcp_sources`` subpackage is listed here because setuptools'
# ``py-modules`` is flat-only; subpackages need an explicit ``packages``
# entry to be installed. Plan 001 (phase R0) adds the ``ctx`` tree
# alongside; both layouts coexist until R6 drops the flat modules.
packages = [
"mcp_sources",
"ctx",
"ctx.assets",
"ctx.core",
"ctx.core.graph",
"ctx.core.quality",
"ctx.core.wiki",
"ctx.core.resolve",
"ctx.core.bundle",
"ctx.engine",
"ctx.fit",
"ctx.runtime",
"ctx.adapters",
"ctx.adapters.claude_code",
"ctx.adapters.claude_code.hooks",
"ctx.adapters.claude_code.install",
"ctx.adapters.codex",
"ctx.adapters.generic",
"ctx.adapters.generic.providers",
"ctx.adapters.generic.tools",
"ctx.cli",
"ctx.monitor",
"ctx.monitor.api",
"ctx.monitor.pages",
"ctx.monitor.services",
"ctx.mcp_server",
"ctx.telemetry",
"ctx.utils",
]
[tool.setuptools.package-data]
ctx = ["config.json", "skill-registry.json", "assets/*.js", "assets/*.css", "assets/*.json"]
[tool.pytest.ini_options]
testpaths = ["src/tests"]
markers = [
"integration: marks tests that require external models or network (deselect with -m 'not integration')",
"browser: marks tests that drive a real browser with Playwright",
]
[tool.mypy]
python_version = "3.11"
mypy_path = "src"
namespace_packages = true
explicit_package_bases = true
ignore_missing_imports = true
[tool.ruff]
line-length = 100
target-version = "py311"
extend-exclude = ["imported-skills"]