-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
181 lines (172 loc) · 6.26 KB
/
pyproject.toml
File metadata and controls
181 lines (172 loc) · 6.26 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
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "styxx"
version = "7.7.10"
description = "Cognitive observability for LLM agents. @styxx.profile decorator returns a per-step cognometric readout: drift, confabulation, refusal, sycophancy, phase transition, low trust, incoherence — localized to the step that produced them. Calibrated AUC: 0.998 hallucination (HaluEval-QA), 0.976 refusal (XSTest-GPT-4), 0.943 tool-call drift (BFCL v3). Reference implementation of the Cognometric Fingerprint Specification v1.0. Pure Python."
readme = "README.md"
license = { text = "MIT" }
authors = [
{ name = "flobi", email = "[email protected]" }
]
maintainers = [
{ name = "flobi", email = "[email protected]" }
]
requires-python = ">=3.9"
keywords = [
"llm",
"agent",
"agent-observability",
"cognitive",
"cognitive-profiler",
"cognometric-fingerprint",
"hallucination-detection",
"refusal-detection",
"tool-call-drift",
"sycophancy-detection",
"interpretability",
"ai-safety",
"langsmith",
"datadog",
"fathom",
"spec-v1.0",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Typing :: Typed",
]
dependencies = [
"numpy>=1.24",
]
[project.optional-dependencies]
openai = ["openai>=1.0"]
anthropic = ["anthropic>=0.20"]
# 0.5.4: framework integrations
langchain = ["langchain-core>=0.1"]
crewai = ["crewai>=0.1", "langchain-core>=0.1"]
autogen = ["pyautogen>=0.2"]
# 0.7.0: observability platform integrations
langsmith = ["langsmith>=0.1", "langchain-core>=0.1"]
langfuse = ["langfuse>=2.0", "langchain-core>=0.1"]
# 0.1.0a4: agent-card PNG renderer needs Pillow.
# 7.4.x: the cognometric registry card (luxury register) renders via matplotlib.
# Both renderers are pulled in by the same extra.
agent-card = ["Pillow>=10.0", "matplotlib>=3.7"]
# 0.3.0: tier 1 D-axis honesty — needs a local model
tier1 = [
"torch>=2.1",
"transformers>=4.40",
"transformer-lens>=2.0",
]
# 0.4.0: tier 2 K/C/S SAE instruments — needs circuit-tracer
tier2 = [
"torch>=2.1",
"transformers>=4.40",
"transformer-lens>=2.0",
"circuit-tracer>=0.4",
]
# 4.0.0rc1: NLI contradiction signal for dialog/summarization hallucinations
# Ships the guardrail v3 calibration (9 signals, incl. NLI).
nli = [
"torch>=2.0",
"transformers>=4.35",
"sentence-transformers>=2.2",
]
# 7.4.0: integrated MCP server (was the separate styxx-mcp package).
# Enables the `styxx-mcp` console script + python -m styxx.mcp.server.
mcp = [
"mcp>=1.0.0; python_version >= '3.10'",
]
# phase-coherence primitive: styxx.coherence.primary_coherence / plv_hilbert
# need scipy.signal.hilbert (numpy is already a core dependency).
coherence = [
"scipy>=1.10",
]
# 4.0.3: Guardrails AI validator (HallucinationCheck) backed by styxx
guardrails = ["guardrails-ai>=0.4"]
# 4.0.3: LlamaIndex evaluator (StyxxHallucinationEvaluator) for RAG faithfulness
llamaindex = ["llama-index-core>=0.10"]
schema = [
"jsonschema>=4.0",
]
dev = [
"pytest>=7.0",
"ruff>=0.1",
"jsonschema>=4.0",
]
# 7.4.3: the test extra used by CI. dev (pytest/ruff/jsonschema) plus the
# *light* optional stacks so the importorskip-gated tests actually run instead
# of silently skipping: MCP server, anthropic/openai adapters, the matplotlib +
# Pillow card renderers, and the langchain adapter. The heavy torch-based
# stacks (tier1, tier2, nli) are deliberately excluded — those tests skip in
# CI; run them locally with `pip install -e ".[test,nli]"`.
test = [
"pytest>=7.0",
"ruff>=0.1",
"jsonschema>=4.0",
"mcp>=1.0.0; python_version >= '3.10'",
"anthropic>=0.20",
"openai>=1.0",
"Pillow>=10.0",
"matplotlib>=3.7",
"langchain-core>=0.1",
]
[project.urls]
Homepage = "https://styxx-org.netlify.app"
Documentation = "https://styxx-org.netlify.app"
"Fathom Lab" = "https://fathomlab-io.netlify.app"
"Telegram" = "https://t.me/STYXX_COMM"
"Research Paper" = "https://doi.org/10.5281/zenodo.19326174"
"@fathom_lab" = "https://x.com/fathom_lab"
"Source" = "https://github.com/fathom-lab/styxx"
"Issue Tracker" = "https://github.com/fathom-lab/styxx/issues"
[project.scripts]
styxx = "styxx.cli:main"
styxx-mcp = "styxx.mcp.server:main"
[tool.setuptools]
packages = [
"styxx", "styxx.adapters", "styxx.centroids", "styxx.recipes",
"styxx.anthropic_hack", "styxx.residual_probe",
"styxx.residual_probe.atlas", "styxx.guardrail",
"styxx.attack", "styxx.attack.seeds",
"styxx.mcp",
"styxx.three_axis",
"styxx.fonts",
"styxx._data",
]
[tool.setuptools.package-data]
"styxx.centroids" = ["*.json"]
"styxx.residual_probe.atlas" = ["*.json", "*.pt", "README.md"]
"styxx.attack.seeds" = ["*.jsonl"]
"styxx.attack" = ["signature_calibration_v0.json", "universal_suffixes_v0.json"]
"styxx.fonts" = ["*.ttf"]
"styxx._data" = ["*.json", "*.md"]
[tool.ruff]
# styxx supports Python >= 3.9. Pin the target so ruff never suggests (or its
# --fix never introduces) syntax newer than 3.9 — notably pyupgrade rewrites
# like `list[int]` / `X | None`, which fail at runtime on 3.9 without
# `from __future__ import annotations`. pyupgrade (UP*) is therefore NOT in the
# selected set below.
target-version = "py39"
[tool.ruff.lint]
# Pyflakes (F) catches the real defects — undefined names, unused
# imports/variables, redefinitions — and E9 catches syntax errors (e.g. the
# f-string-backslash break that shipped on 3.9-3.11). Line length (E501),
# import sorting (I), and stylistic rules are intentionally not enforced.
select = ["F", "E9"]
[tool.ruff.lint.per-file-ignores]
# __init__.py intentionally imports the full backward-compat attribute surface
# (most of those names are deliberately kept out of __all__). The two F811s
# there are the documented stream / agent_name false-positives.
"__init__.py" = ["F401", "F403", "F811"]