@yahyahammad/venastine 0.3.8 → 0.3.10

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 (130) hide show
  1. package/.env.example +19 -19
  2. package/CONFIG_ARCHITECTURE.md +2139 -2002
  3. package/LICENSE +201 -201
  4. package/README.md +1043 -1034
  5. package/agents/builtin/compactor.md +75 -75
  6. package/agents/builtin/explore.md +77 -77
  7. package/agents/builtin/pipeline-reviewer.md +100 -100
  8. package/agents/builtin/plan.md +106 -106
  9. package/agents/builtin/review.md +74 -74
  10. package/agents/manager.py +261 -261
  11. package/agents/subagent_tool.py +472 -472
  12. package/agents/tui_commands.py +238 -146
  13. package/bin/venastine.mjs +584 -528
  14. package/bin/venastine.py +73 -71
  15. package/cli_commands.py +848 -835
  16. package/config.yaml +64 -0
  17. package/config_edit.py +1301 -1301
  18. package/config_schema.py +987 -966
  19. package/config_update.py +749 -749
  20. package/core/agent_activity.py +256 -256
  21. package/core/ansi.py +452 -452
  22. package/core/approval.py +137 -137
  23. package/core/call_view.py +364 -364
  24. package/core/cancel.py +121 -121
  25. package/core/chatgpt_auth.py +747 -747
  26. package/core/claims_view.py +107 -107
  27. package/core/client.py +2756 -2715
  28. package/core/commands.py +464 -454
  29. package/core/compaction.py +1735 -1735
  30. package/core/config_loader.py +1982 -1982
  31. package/core/connect.py +686 -686
  32. package/core/events.py +123 -123
  33. package/core/file_mentions.py +280 -280
  34. package/core/interaction.py +411 -411
  35. package/core/loop.py +2566 -2566
  36. package/core/memory.py +482 -482
  37. package/core/pipeline_models.py +190 -190
  38. package/core/provider_errors.py +274 -234
  39. package/core/reasoning/authorization.py +130 -130
  40. package/core/reasoning/base.py +219 -219
  41. package/core/reasoning/confidence_scoring.py +484 -484
  42. package/core/reasoning/events.py +149 -149
  43. package/core/reasoning/orchestrator.py +1561 -1561
  44. package/core/reasoning/output_writer.py +345 -345
  45. package/core/reasoning/payload_validation.py +524 -524
  46. package/core/reasoning/pipeline_storage.py +427 -427
  47. package/core/reasoning/scholar.py +467 -458
  48. package/core/reasoning/source_corpus.py +433 -433
  49. package/core/reasoning/source_scoring.py +855 -855
  50. package/core/replay.py +315 -315
  51. package/core/shell_sessions.py +1553 -1553
  52. package/credentials.py +307 -307
  53. package/database.py +333 -333
  54. package/docs/PRIVACY.md +78 -78
  55. package/docs/SECURITY.md +114 -108
  56. package/docs/THIRD_PARTY_NOTICES.md +148 -148
  57. package/env_secrets.py +118 -118
  58. package/json_store.py +343 -343
  59. package/logging_setup.py +295 -295
  60. package/main.py +3433 -3433
  61. package/mcp_client/client.py +780 -733
  62. package/mcp_client/config.py +484 -484
  63. package/mcp_client/registration.py +343 -343
  64. package/memories/manager.py +147 -147
  65. package/memories/tui_commands.py +319 -239
  66. package/package.json +303 -303
  67. package/project_init/config_files.py +282 -282
  68. package/project_init/generator.py +728 -728
  69. package/project_init/manifest.py +418 -418
  70. package/project_init/tui_commands.py +147 -147
  71. package/prompts/critic_pass.md +24 -24
  72. package/prompts/revalidate.md +25 -25
  73. package/prompts/revise.md +17 -17
  74. package/prompts/source_grounding.md +66 -66
  75. package/prompts/system_prompts.py +316 -316
  76. package/providers.json.example +94 -94
  77. package/pyproject.toml +149 -149
  78. package/requirements.txt +314 -295
  79. package/safety/policy_enforcement.py +1082 -1082
  80. package/security/askpass.py +419 -419
  81. package/security/capability.py +207 -207
  82. package/security/confine.py +484 -484
  83. package/security/hosted.py +182 -182
  84. package/security/permissions.py +237 -237
  85. package/security/protected_paths.py +501 -501
  86. package/security/sandbox.py +4108 -4108
  87. package/skills/builtin/math/formal-specification.md +67 -67
  88. package/skills/builtin/math/numerical-methods.md +66 -66
  89. package/skills/builtin/research/experiment-design.md +62 -62
  90. package/skills/builtin/research/reproducibility.md +55 -55
  91. package/skills/builtin/research/source-evaluation.md +70 -70
  92. package/skills/builtin/research/statistical-inference.md +63 -63
  93. package/skills/builtin/research/technical-writing.md +59 -59
  94. package/skills/builtin/software/code-review.md +61 -61
  95. package/skills/builtin/software/debugging.md +61 -61
  96. package/skills/builtin/software/test-design.md +67 -67
  97. package/skills/tui_commands.py +110 -110
  98. package/storage.py +1338 -1338
  99. package/tools/base.py +465 -465
  100. package/tools/builtin/_math_common.py +667 -667
  101. package/tools/builtin/_net_common.py +1145 -267
  102. package/tools/builtin/_page_text.py +490 -0
  103. package/tools/builtin/_pdf_text.py +113 -0
  104. package/tools/builtin/arxiv.py +685 -681
  105. package/tools/builtin/fetch_url.py +639 -371
  106. package/tools/builtin/file_ops.py +720 -720
  107. package/tools/builtin/geometry.py +184 -184
  108. package/tools/builtin/load_skill.py +76 -76
  109. package/tools/builtin/pin.py +227 -227
  110. package/tools/builtin/probability_stats.py +224 -224
  111. package/tools/builtin/project_docs.py +464 -464
  112. package/tools/builtin/remember.py +175 -175
  113. package/tools/builtin/shell.py +980 -980
  114. package/tools/builtin/todo.py +149 -149
  115. package/tools/builtin/web_search.py +402 -328
  116. package/tools/context.py +159 -159
  117. package/tools/isolation.py +387 -387
  118. package/tools/registry.py +1252 -1242
  119. package/tui/app.py +8372 -8307
  120. package/tui/app.tcss +754 -739
  121. package/tui/commands.py +26 -26
  122. package/tui/diffs.py +286 -286
  123. package/tui/history.py +128 -128
  124. package/tui/hosted_driver.py +102 -102
  125. package/tui/markdown.py +1329 -1329
  126. package/tui/meters.py +364 -364
  127. package/tui/ravens.py +146 -146
  128. package/tui/screens.py +1255 -1197
  129. package/tui/themes.py +599 -599
  130. package/tui/widgets.py +3861 -3796
@@ -1,94 +1,94 @@
1
- {
2
- "OPENAI": {
3
- "API_URL": "https://api.openai.com/v1",
4
- "API_KEY": "",
5
- "is_v1_compatible": true,
6
- "supports_stream_usage": true
7
- },
8
- "DEEPSEEK": {
9
- "API_URL": "https://api.deepseek.com/v1",
10
- "API_KEY": "",
11
- "is_v1_compatible": true,
12
- "supports_stream_usage": false
13
- },
14
- "GROK": {
15
- "API_URL": "https://api.x.ai/v1",
16
- "API_KEY": "",
17
- "is_v1_compatible": true,
18
- "supports_stream_usage": false
19
- },
20
- "MISTRAL": {
21
- "API_URL": "https://api.mistral.ai/v1",
22
- "API_KEY": "",
23
- "is_v1_compatible": true,
24
- "supports_stream_usage": false
25
- },
26
- "GROQ": {
27
- "API_URL": "https://api.groq.com/openai/v1",
28
- "API_KEY": "",
29
- "is_v1_compatible": true,
30
- "supports_stream_usage": false
31
- },
32
- "TOGETHERAI": {
33
- "API_URL": "https://api.together.ai/v1",
34
- "API_KEY": "",
35
- "is_v1_compatible": true,
36
- "supports_stream_usage": false
37
- },
38
- "PERPLEXITY": {
39
- "API_URL": "https://api.perplexity.ai/v1",
40
- "API_KEY": "",
41
- "is_v1_compatible": true,
42
- "supports_stream_usage": false
43
- },
44
- "FIREWORKS": {
45
- "API_URL": "https://api.fireworks.ai/inference/v1",
46
- "API_KEY": "",
47
- "is_v1_compatible": true,
48
- "supports_stream_usage": false
49
- },
50
- "QWEN": {
51
- "API_URL": "https://dashscope.aliyuncs.com/compatible-mode/v1",
52
- "API_KEY": "",
53
- "is_v1_compatible": true,
54
- "supports_stream_usage": false
55
- },
56
- "QWEN_TOKEN_PLAN": {
57
- "API_URL": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",
58
- "API_KEY": "",
59
- "is_v1_compatible": true,
60
- "supports_stream_usage": true
61
- },
62
- "Z.AI": {
63
- "API_URL": "https://open.bigmodel.cn/api/paas/v4",
64
- "API_KEY": "",
65
- "is_v1_compatible": true,
66
- "supports_stream_usage": false
67
- },
68
- "COHERE": {
69
- "API_URL": "https://api.cohere.ai/compatibility/v1",
70
- "API_KEY": "",
71
- "is_v1_compatible": true,
72
- "supports_stream_usage": false
73
- },
74
- "OPENROUTER": {
75
- "API_URL": "https://openrouter.ai/api/v1",
76
- "API_KEY": "",
77
- "is_v1_compatible": true,
78
- "supports_stream_usage": false
79
- },
80
- "ANTHROPIC": {
81
- "API_URL": "",
82
- "API_KEY": "",
83
- "is_v1_compatible": false,
84
- "supports_stream_usage": true,
85
- "accepts_images": true
86
- },
87
- "GOOGLE": {
88
- "API_URL": "",
89
- "API_KEY": "",
90
- "is_v1_compatible": false,
91
- "supports_stream_usage": false,
92
- "accepts_images": true
93
- }
94
- }
1
+ {
2
+ "OPENAI": {
3
+ "API_URL": "https://api.openai.com/v1",
4
+ "API_KEY": "",
5
+ "is_v1_compatible": true,
6
+ "supports_stream_usage": true
7
+ },
8
+ "DEEPSEEK": {
9
+ "API_URL": "https://api.deepseek.com/v1",
10
+ "API_KEY": "",
11
+ "is_v1_compatible": true,
12
+ "supports_stream_usage": false
13
+ },
14
+ "GROK": {
15
+ "API_URL": "https://api.x.ai/v1",
16
+ "API_KEY": "",
17
+ "is_v1_compatible": true,
18
+ "supports_stream_usage": false
19
+ },
20
+ "MISTRAL": {
21
+ "API_URL": "https://api.mistral.ai/v1",
22
+ "API_KEY": "",
23
+ "is_v1_compatible": true,
24
+ "supports_stream_usage": false
25
+ },
26
+ "GROQ": {
27
+ "API_URL": "https://api.groq.com/openai/v1",
28
+ "API_KEY": "",
29
+ "is_v1_compatible": true,
30
+ "supports_stream_usage": false
31
+ },
32
+ "TOGETHERAI": {
33
+ "API_URL": "https://api.together.ai/v1",
34
+ "API_KEY": "",
35
+ "is_v1_compatible": true,
36
+ "supports_stream_usage": false
37
+ },
38
+ "PERPLEXITY": {
39
+ "API_URL": "https://api.perplexity.ai/v1",
40
+ "API_KEY": "",
41
+ "is_v1_compatible": true,
42
+ "supports_stream_usage": false
43
+ },
44
+ "FIREWORKS": {
45
+ "API_URL": "https://api.fireworks.ai/inference/v1",
46
+ "API_KEY": "",
47
+ "is_v1_compatible": true,
48
+ "supports_stream_usage": false
49
+ },
50
+ "QWEN": {
51
+ "API_URL": "https://dashscope.aliyuncs.com/compatible-mode/v1",
52
+ "API_KEY": "",
53
+ "is_v1_compatible": true,
54
+ "supports_stream_usage": false
55
+ },
56
+ "QWEN_TOKEN_PLAN": {
57
+ "API_URL": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",
58
+ "API_KEY": "",
59
+ "is_v1_compatible": true,
60
+ "supports_stream_usage": true
61
+ },
62
+ "Z.AI": {
63
+ "API_URL": "https://open.bigmodel.cn/api/paas/v4",
64
+ "API_KEY": "",
65
+ "is_v1_compatible": true,
66
+ "supports_stream_usage": false
67
+ },
68
+ "COHERE": {
69
+ "API_URL": "https://api.cohere.ai/compatibility/v1",
70
+ "API_KEY": "",
71
+ "is_v1_compatible": true,
72
+ "supports_stream_usage": false
73
+ },
74
+ "OPENROUTER": {
75
+ "API_URL": "https://openrouter.ai/api/v1",
76
+ "API_KEY": "",
77
+ "is_v1_compatible": true,
78
+ "supports_stream_usage": false
79
+ },
80
+ "ANTHROPIC": {
81
+ "API_URL": "",
82
+ "API_KEY": "",
83
+ "is_v1_compatible": false,
84
+ "supports_stream_usage": true,
85
+ "accepts_images": true
86
+ },
87
+ "GOOGLE": {
88
+ "API_URL": "",
89
+ "API_KEY": "",
90
+ "is_v1_compatible": false,
91
+ "supports_stream_usage": false,
92
+ "accepts_images": true
93
+ }
94
+ }
package/pyproject.toml CHANGED
@@ -1,149 +1,149 @@
1
- # Issue #144 -- requirements.txt was the whole of what this project said
2
- # about how to install it, and it is the one packaging format that cannot
3
- # express a Python floor or an optional group.
4
- #
5
- # Python 3.11 is a hard requirement, not a preference: mcp_client/client.py
6
- # uses asyncio.timeout (3.11+), and 27 sites use runtime `X | Y` annotations
7
- # (3.10+). On 3.10 a user got `AttributeError: module 'asyncio' has no
8
- # attribute 'timeout'` from inside the MCP connect path, AFTER
9
- # `pip install -r requirements.txt` reported success. requires-python turns
10
- # that into a refusal at install time.
11
-
12
- # setuptools>=77 is the floor for PEP 639: the SPDX `license = "Apache-2.0"` string below is
13
- # read as a classifier expression only from that release on. An older backend treats it as a
14
- # path and fails the build rather than warning, so this floor and that line move together.
15
- [build-system]
16
- requires = ["setuptools>=77"]
17
- build-backend = "setuptools.build_meta"
18
-
19
- [project]
20
- name = "venastine-research-harness"
21
- version = "0.3.8"
22
- description = "A from-scratch agentic harness: tool-using chat plus a ten-pass self-critiquing research pipeline."
23
- readme = "README.md"
24
- requires-python = ">=3.11"
25
- # PEP 639: a bare SPDX expression, not the deprecated `{ text = ... }` table, and no
26
- # `License :: OSI Approved ::` classifier -- PEP 639 supersedes those and setuptools warns on
27
- # both. `license-files` is declared rather than left to the backend's default glob so the file
28
- # that ships is the one named here.
29
- license = "Apache-2.0"
30
- # NOTICE ships WITH the licence, not beside it in the repo only: a NOTICE that
31
- # is not listed here exists in a checkout and is absent from every sdist and
32
- # wheel, which defeats the reason for having one. Apache-2.0 4(d) is what makes
33
- # the pairing meaningful downstream.
34
- license-files = ["LICENSE", "NOTICE"]
35
- authors = [{ name = "Yahya Hammad" }]
36
- maintainers = [{ name = "Yahya Hammad" }]
37
- classifiers = [
38
- "Programming Language :: Python :: 3",
39
- "Programming Language :: Python :: 3.11",
40
- "Programming Language :: Python :: 3.12",
41
- "Programming Language :: Python :: 3.13",
42
- "Intended Audience :: Science/Research",
43
- "Topic :: Scientific/Engineering :: Artificial Intelligence",
44
- ]
45
-
46
- # ONE dependency list, and it stays in requirements.txt -- the file that
47
- # already carries the D22 rationale comments explaining why `textual` and
48
- # `mcp` are upper-bounded. Inlining the list here would create a second
49
- # hand-maintained copy of the same fact, which is the shape #144 was filed
50
- # about in the first place ("a hand-maintained list is only as complete as
51
- # the file it lives in"). setuptools strips comments and blank lines.
52
- #
53
- # THIS KEY MUST STAY INSIDE [project], above the sub-tables. TOML scopes a
54
- # bare key to the most recent table header, so when this sat below
55
- # [project.urls] it parsed as `project.urls.dynamic` and setuptools refused
56
- # the whole file: "`project.urls.dynamic` must be string". `pip install -e .`
57
- # failed outright, which also meant requires-python -- the entire point of
58
- # #144 -- was never enforced, because the install never got far enough to
59
- # check it. Moving a key past a table header here is not cosmetic.
60
- dynamic = ["dependencies"]
61
-
62
- [project.urls]
63
- Homepage = "https://github.com/YahyaHammad/Venastine-Research-Harness"
64
- Repository = "https://github.com/YahyaHammad/Venastine-Research-Harness"
65
- Issues = "https://github.com/YahyaHammad/Venastine-Research-Harness/issues"
66
-
67
- [project.optional-dependencies]
68
- # markitdown's only consumer is tools/builtin/file_ops.py, which implements
69
- # read/write/edit -- all three globally denied, and per S24 they cannot be
70
- # re-enabled at runtime at all (is_tool_allowed reads config.ToolPermissions
71
- # directly, settings.json has no permissions section, and D14 forbids a
72
- # ToolContext widening anything). The import is lazy, so a default install
73
- # never reaches it. It brought 11 transitive distributions, 5 of them for
74
- # markitdown alone.
75
- #
76
- # protobuf moves with it rather than staying in the default set: nothing in
77
- # the repo imports it, and the only installed distribution requiring it is
78
- # onnxruntime, which arrives through markitdown. Left behind it would pin a
79
- # transitive dependency of a package no longer installed by default.
80
- documents = ["markitdown==0.1.9", "protobuf==7.36.2"]
81
-
82
- # Optional in the code too, and documented as such at
83
- # core/reasoning/output_writer.py:185 -- the PDF path is guarded by
84
- # `except ImportError: return`. Declared here so the group has a name;
85
- # neither was ever in requirements.txt.
86
- pdf = ["markdown", "weasyprint"]
87
-
88
- # S18-07, batch 136. These four were at the bottom of requirements.txt, and
89
- # `dynamic = ["dependencies"]` above reads that file, so they were hard
90
- # requirements of the DISTRIBUTION: `pip install venastine-research-harness`
91
- # resolved a test runner and its scheduler, and bin/venastine.mjs installed
92
- # the same set into every end user's venv.
93
- #
94
- # NAMED HERE RATHER THAN READ FROM THE FILE, because setuptools'
95
- # `optional-dependencies` is all-or-nothing: making this one group dynamic
96
- # would force `documents` and `pdf` into files of their own, which is churn
97
- # to two groups that work in order to avoid typing four names. The names are
98
- # therefore in two places, and `test_the_test_extra_matches_requirements_test`
99
- # is what stops them drifting -- #144's rule is that a hand-maintained
100
- # duplicate is only as good as the gate over it.
101
- #
102
- # Floors, not pins, matching requirements-test.txt: D22's argument for
103
- # pinning is about packages whose behaviour CI's RESULT depends on.
104
- test = [
105
- "pytest>=8.0",
106
- "pytest-mock>=3.14",
107
- "pytest-asyncio>=1.0",
108
- "pytest-xdist>=3.6",
109
- "starlette>=0.40",
110
- ]
111
-
112
- [tool.setuptools.dynamic]
113
- dependencies = { file = ["requirements.txt"] }
114
-
115
- [tool.ruff]
116
- # Lint gate (lint.yml), judged against the 3.11 floor even though
117
- # developers may run 3.12/3.13 locally -- UP modernisations must be valid
118
- # where CI runs, not just where they were written.
119
- target-version = "py311"
120
-
121
- [tool.ruff.lint]
122
- select = ["E", "F", "I", "UP"]
123
- ignore = [
124
- # Long docstring/comment lines are the record (decision ids, trace
125
- # excerpts, URLs). Reflowing them for a ruler would bury the content.
126
- "E501",
127
- # `Optional[X]` is this codebase's idiom (300+ sites); `X | None`
128
- # rewrites are churn with zero behaviour change.
129
- "UP045",
130
- # Deferred imports are architectural: tools/registry.py <-> agents/
131
- # subagent_tool.py would cycle at import time, and several tests import
132
- # only after arranging fixtures/patches.
133
- "E402",
134
- # printf-style `%` is the logging convention (AGENTS.md: interpolate via
135
- # logger args, never f-strings at the call site) and the user-facing
136
- # string idiom; mass conversion is churn for no behaviour change.
137
- "UP031",
138
- ]
139
-
140
- [tool.setuptools]
141
- # DECLARATIVE ONLY -- this project is run from a checkout, not installed.
142
- # `pip install .` would otherwise put `config`, `main`, `storage` and
143
- # `conftest` into site-packages as top-level names, where they collide with
144
- # anything. Empty lists mean `pip install -e .` resolves the dependencies
145
- # and enforces the Python floor without installing a single module, which
146
- # is exactly what is wanted here. README's `pip install -r requirements.txt`
147
- # remains the documented install path.
148
- packages = []
149
- py-modules = []
1
+ # Issue #144 -- requirements.txt was the whole of what this project said
2
+ # about how to install it, and it is the one packaging format that cannot
3
+ # express a Python floor or an optional group.
4
+ #
5
+ # Python 3.11 is a hard requirement, not a preference: mcp_client/client.py
6
+ # uses asyncio.timeout (3.11+), and 27 sites use runtime `X | Y` annotations
7
+ # (3.10+). On 3.10 a user got `AttributeError: module 'asyncio' has no
8
+ # attribute 'timeout'` from inside the MCP connect path, AFTER
9
+ # `pip install -r requirements.txt` reported success. requires-python turns
10
+ # that into a refusal at install time.
11
+
12
+ # setuptools>=77 is the floor for PEP 639: the SPDX `license = "Apache-2.0"` string below is
13
+ # read as a classifier expression only from that release on. An older backend treats it as a
14
+ # path and fails the build rather than warning, so this floor and that line move together.
15
+ [build-system]
16
+ requires = ["setuptools>=77"]
17
+ build-backend = "setuptools.build_meta"
18
+
19
+ [project]
20
+ name = "venastine-research-harness"
21
+ version = "0.3.10"
22
+ description = "A from-scratch agentic harness: tool-using chat plus a ten-pass self-critiquing research pipeline."
23
+ readme = "README.md"
24
+ requires-python = ">=3.11"
25
+ # PEP 639: a bare SPDX expression, not the deprecated `{ text = ... }` table, and no
26
+ # `License :: OSI Approved ::` classifier -- PEP 639 supersedes those and setuptools warns on
27
+ # both. `license-files` is declared rather than left to the backend's default glob so the file
28
+ # that ships is the one named here.
29
+ license = "Apache-2.0"
30
+ # NOTICE ships WITH the licence, not beside it in the repo only: a NOTICE that
31
+ # is not listed here exists in a checkout and is absent from every sdist and
32
+ # wheel, which defeats the reason for having one. Apache-2.0 4(d) is what makes
33
+ # the pairing meaningful downstream.
34
+ license-files = ["LICENSE", "NOTICE"]
35
+ authors = [{ name = "Yahya Hammad" }]
36
+ maintainers = [{ name = "Yahya Hammad" }]
37
+ classifiers = [
38
+ "Programming Language :: Python :: 3",
39
+ "Programming Language :: Python :: 3.11",
40
+ "Programming Language :: Python :: 3.12",
41
+ "Programming Language :: Python :: 3.13",
42
+ "Intended Audience :: Science/Research",
43
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
44
+ ]
45
+
46
+ # ONE dependency list, and it stays in requirements.txt -- the file that
47
+ # already carries the D22 rationale comments explaining why `textual` and
48
+ # `mcp` are upper-bounded. Inlining the list here would create a second
49
+ # hand-maintained copy of the same fact, which is the shape #144 was filed
50
+ # about in the first place ("a hand-maintained list is only as complete as
51
+ # the file it lives in"). setuptools strips comments and blank lines.
52
+ #
53
+ # THIS KEY MUST STAY INSIDE [project], above the sub-tables. TOML scopes a
54
+ # bare key to the most recent table header, so when this sat below
55
+ # [project.urls] it parsed as `project.urls.dynamic` and setuptools refused
56
+ # the whole file: "`project.urls.dynamic` must be string". `pip install -e .`
57
+ # failed outright, which also meant requires-python -- the entire point of
58
+ # #144 -- was never enforced, because the install never got far enough to
59
+ # check it. Moving a key past a table header here is not cosmetic.
60
+ dynamic = ["dependencies"]
61
+
62
+ [project.urls]
63
+ Homepage = "https://github.com/YahyaHammad/Venastine-Research-Harness"
64
+ Repository = "https://github.com/YahyaHammad/Venastine-Research-Harness"
65
+ Issues = "https://github.com/YahyaHammad/Venastine-Research-Harness/issues"
66
+
67
+ [project.optional-dependencies]
68
+ # markitdown's only consumer is tools/builtin/file_ops.py, which implements
69
+ # read/write/edit -- all three globally denied, and per S24 they cannot be
70
+ # re-enabled at runtime at all (is_tool_allowed reads config.ToolPermissions
71
+ # directly, settings.json has no permissions section, and D14 forbids a
72
+ # ToolContext widening anything). The import is lazy, so a default install
73
+ # never reaches it. It brought 11 transitive distributions, 5 of them for
74
+ # markitdown alone.
75
+ #
76
+ # protobuf moves with it rather than staying in the default set: nothing in
77
+ # the repo imports it, and the only installed distribution requiring it is
78
+ # onnxruntime, which arrives through markitdown. Left behind it would pin a
79
+ # transitive dependency of a package no longer installed by default.
80
+ documents = ["markitdown==0.1.9", "protobuf==7.36.2"]
81
+
82
+ # Optional in the code too, and documented as such at
83
+ # core/reasoning/output_writer.py:185 -- the PDF path is guarded by
84
+ # `except ImportError: return`. Declared here so the group has a name;
85
+ # neither was ever in requirements.txt.
86
+ pdf = ["markdown", "weasyprint"]
87
+
88
+ # S18-07, batch 136. These four were at the bottom of requirements.txt, and
89
+ # `dynamic = ["dependencies"]` above reads that file, so they were hard
90
+ # requirements of the DISTRIBUTION: `pip install venastine-research-harness`
91
+ # resolved a test runner and its scheduler, and bin/venastine.mjs installed
92
+ # the same set into every end user's venv.
93
+ #
94
+ # NAMED HERE RATHER THAN READ FROM THE FILE, because setuptools'
95
+ # `optional-dependencies` is all-or-nothing: making this one group dynamic
96
+ # would force `documents` and `pdf` into files of their own, which is churn
97
+ # to two groups that work in order to avoid typing four names. The names are
98
+ # therefore in two places, and `test_the_test_extra_matches_requirements_test`
99
+ # is what stops them drifting -- #144's rule is that a hand-maintained
100
+ # duplicate is only as good as the gate over it.
101
+ #
102
+ # Floors, not pins, matching requirements-test.txt: D22's argument for
103
+ # pinning is about packages whose behaviour CI's RESULT depends on.
104
+ test = [
105
+ "pytest>=8.0",
106
+ "pytest-mock>=3.14",
107
+ "pytest-asyncio>=1.0",
108
+ "pytest-xdist>=3.6",
109
+ "starlette>=0.40",
110
+ ]
111
+
112
+ [tool.setuptools.dynamic]
113
+ dependencies = { file = ["requirements.txt"] }
114
+
115
+ [tool.ruff]
116
+ # Lint gate (lint.yml), judged against the 3.11 floor even though
117
+ # developers may run 3.12/3.13 locally -- UP modernisations must be valid
118
+ # where CI runs, not just where they were written.
119
+ target-version = "py311"
120
+
121
+ [tool.ruff.lint]
122
+ select = ["E", "F", "I", "UP"]
123
+ ignore = [
124
+ # Long docstring/comment lines are the record (decision ids, trace
125
+ # excerpts, URLs). Reflowing them for a ruler would bury the content.
126
+ "E501",
127
+ # `Optional[X]` is this codebase's idiom (300+ sites); `X | None`
128
+ # rewrites are churn with zero behaviour change.
129
+ "UP045",
130
+ # Deferred imports are architectural: tools/registry.py <-> agents/
131
+ # subagent_tool.py would cycle at import time, and several tests import
132
+ # only after arranging fixtures/patches.
133
+ "E402",
134
+ # printf-style `%` is the logging convention (AGENTS.md: interpolate via
135
+ # logger args, never f-strings at the call site) and the user-facing
136
+ # string idiom; mass conversion is churn for no behaviour change.
137
+ "UP031",
138
+ ]
139
+
140
+ [tool.setuptools]
141
+ # DECLARATIVE ONLY -- this project is run from a checkout, not installed.
142
+ # `pip install .` would otherwise put `config`, `main`, `storage` and
143
+ # `conftest` into site-packages as top-level names, where they collide with
144
+ # anything. Empty lists mean `pip install -e .` resolves the dependencies
145
+ # and enforces the Python floor without installing a single module, which
146
+ # is exactly what is wanted here. README's `pip install -r requirements.txt`
147
+ # remains the documented install path.
148
+ packages = []
149
+ py-modules = []