forked from agentforce314/clawcodex
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
155 lines (145 loc) · 6.15 KB
/
Copy pathpyproject.toml
File metadata and controls
155 lines (145 loc) · 6.15 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
[build-system]
requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "clawcodex"
version = "1.0.0"
description = "A production-oriented Python rebuild of Claude Code — real architecture, reliable CLI agent"
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.10"
authors = [
{name = "Claw Codex Team", email = "team@example.com"}
]
keywords = ["claude", "cli", "ai", "llm", "anthropic", "openai", "glm"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"anthropic",
"openai",
"python-dotenv",
"rich",
"prompt-toolkit",
"tiktoken>=0.7.0",
"textual>=0.79",
# YAML frontmatter parser (SKILL.md, agent files, output styles).
# Required for nested structures like ``hooks:`` and ``shell:`` to
# round-trip through ``src.skills.frontmatter.parse_frontmatter``.
"PyYAML>=6.0",
# gitwildmatch path matching for conditional-skill ``paths:`` rules.
# The TS port uses the `ignore` library; ``pathspec`` is the Python
# equivalent (full ``**`` recursion + anchoring + negation).
"pathspec>=0.11",
# Ch16 Phase 0: WebSocket client/server for the CCR bridge (Bridge v2,
# Direct Connect, Remote Session). The 14.0 lower bound is required for
# the new asyncio API's ``additional_headers`` kwarg; v12/v13 use
# ``extra_headers`` and would TypeError against our planned API.
"websockets>=14.0",
# Ch16 Phase 0: SSE consumer for the CCR v2 SSE read transport. ``httpx``
# itself is transitively available via the ``anthropic`` SDK.
"httpx-sse>=0.4",
# Official Model Context Protocol SDK used by ``src.services.mcp`` for
# stdio, SSE, Streamable HTTP, WebSocket, OAuth discovery, and JSON-RPC
# message models.
"mcp>=1.27.0",
# Image decode/resize/encode for the FileReadTool image pipeline (port
# of TS imageResizer.ts which uses sharp). Pillow has pure-Python wheels
# for all platforms and covers PNG/JPEG/GIF/WebP and palette quantization.
# Without this, oversized images get rejected instead of downscaled.
"Pillow>=10.0",
# HTML -> Markdown conversion for the WebFetch tool (port of TS Turndown).
# Preserves headings/lists/links so fetched pages are usable for research;
# without it WebFetch falls back to a flat regex tag-strip (no structure).
# Pulls in beautifulsoup4 (pure-Python).
"markdownify>=0.11",
]
[project.optional-dependencies]
dev = [
"build>=1.0.0",
"twine>=5.0.0",
"pytest>=8.0.0",
# ``pyproject.toml`` declares ``asyncio_mode = "auto"`` (below) which
# requires the pytest-asyncio plugin. Without it, async tests fail at
# run time with "async def functions are not natively supported."
"pytest-asyncio>=1.3.0",
# Ch16 Phase 0: coverage reporting for the ≥90% line-coverage DoD on
# the new ``src/bridge/`` modules.
"pytest-cov>=5.0",
]
[project.scripts]
clawcodex = "src.cli:main"
[project.urls]
Homepage = "https://github.com/agentforce314/clawcodex"
Repository = "https://github.com/agentforce314/clawcodex"
Documentation = "https://github.com/agentforce314/clawcodex#readme"
[tool.pytest.ini_options]
asyncio_mode = "auto"
# Prepend the project root so pytest imports the worktree's ``src/`` rather
# than the parent repo's editable-install mapping.
pythonpath = ["."]
markers = [
"integration: marks tests as integration (deselect with '-m \"not integration\"')",
"linux_only: marks tests that require Linux (auto-skipped on macOS/Windows)",
]
filterwarnings = [
# Phase 18 removed src/services/bridge; the scripts/audit/remote_runtime
# placeholder still emits a DeprecationWarning on import (its absence
# would break the test that asserts the warning fires).
"ignore::DeprecationWarning:scripts.audit.remote_runtime",
]
[tool.setuptools.packages.find]
where = ["."]
include = ["src*"]
# ---------------------------------------------------------------------------
# import-linter — DAG-leaf enforcement for src/bootstrap/state.py
# ---------------------------------------------------------------------------
# Mirrors the TS ``bootstrap-isolation`` ESLint rule (typescript/src/.eslintrc).
# Bootstrap state is a DAG leaf — it cannot import from feature subsystems
# (``src/tui``, ``src/repl``, ``src/agent``, ``src/services``, ``src/query``,
# ``src/context_system``, ``src/permissions``, ``src/command_system``,
# ``src/tool_system``, ``src/coordinator``). The contract below enforces
# this on every commit when ``lint-imports`` runs in CI.
#
# To run locally: ``pip install import-linter && lint-imports``.
# (Not in ``dev`` extras yet — install ad-hoc until CI wires it in.)
[tool.importlinter]
root_package = "src"
[[tool.importlinter.contracts]]
name = "bootstrap/state.py cannot import from feature subsystems (DAG-leaf rule)"
type = "forbidden"
source_modules = ["src.bootstrap.state"]
forbidden_modules = [
"src.tui",
"src.repl",
"src.agent",
"src.services",
"src.query",
"src.context_system",
"src.permissions",
"src.command_system",
"src.tool_system",
"src.coordinator",
"src.providers",
"src.tasks",
"src.bridge",
"src.remote",
"src.skills",
]
# ch01 round-2 P3: ``src.commands`` was removed (audit-only module relocated
# to ``scripts/audit/commands.py``). The production command surface is
# ``src/command_system/`` which is already covered by ``src.command_system``.
# TODO: add a positive-allowlist (kept) contract restricting bootstrap to
# import only from ``src.utils.signal`` and a small set of leaf utilities.
# The forbidden contract above misses the case where someone adds
# ``from src.utils.tui_helpers import foo`` to bootstrap — ``src.utils`` is
# not in the blocklist. ``import-linter`` doesn't have a perfect positive-
# allowlist primitive; the closest is the ``independence`` contract or a
# custom contract. Plan §P1.0 acknowledged the ~30 min research cost.
# Tracking as a Phase-2 follow-up.