2026-04-08 17:57:15 +00:00
|
|
|
[build-system]
|
|
|
|
|
requires = ["setuptools>=45", "wheel"]
|
|
|
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
|
|
|
|
|
|
[project]
|
|
|
|
|
name = "marchwarden"
|
|
|
|
|
version = "0.1.0-dev"
|
|
|
|
|
description = "Agentic research network: specialists at the frontier, PI orchestrator at the center"
|
|
|
|
|
readme = "README.md"
|
|
|
|
|
requires-python = ">=3.10"
|
|
|
|
|
authors = [
|
|
|
|
|
{name = "archeious"}
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
|
"anthropic>=0.30.0",
|
|
|
|
|
"mcp>=0.1.0",
|
|
|
|
|
"pydantic>=2.0",
|
|
|
|
|
"tavily-python>=0.3.0",
|
|
|
|
|
"httpx>=0.24.0",
|
|
|
|
|
"click>=8.0",
|
2026-04-08 20:51:40 +00:00
|
|
|
"rich>=13.0",
|
M2.5.1: Structured application logger via structlog (#24)
Adds an operational logging layer separate from the JSONL trace
audit logs. Operational logs cover system events (startup, errors,
MCP transport, research lifecycle); JSONL traces remain the
researcher provenance audit trail.
Backend: structlog with two renderers selectable via
MARCHWARDEN_LOG_FORMAT (json|console). Defaults to console when
stderr is a TTY, json otherwise — so dev runs are human-readable
and shipped runs (containers, automation) emit OpenSearch-ready
JSON without configuration.
Key features:
- Named loggers per component: marchwarden.cli,
marchwarden.mcp, marchwarden.researcher.web
- MARCHWARDEN_LOG_LEVEL controls global level (default INFO)
- MARCHWARDEN_LOG_FILE=1 enables a 10MB-rotating file at
~/.marchwarden/logs/marchwarden.log
- structlog contextvars bind trace_id + researcher at the start
of each research() call so every downstream log line carries
them automatically; cleared on completion
- stdlib logging is funneled through the same pipeline so noisy
third-party loggers (httpx, anthropic) get the same formatting
and quieted to WARN unless DEBUG is requested
- Logs to stderr to keep MCP stdio stdout clean
Wired into:
- cli.main.cli — configures logging on startup, logs ask_started/
ask_completed/ask_failed
- researchers.web.server.main — configures logging on startup,
logs mcp_server_starting
- researchers.web.agent.research — binds trace context, logs
research_started/research_completed
Tests verify JSON and console formats, contextvar propagation,
level filtering, idempotency, and auto-configure-on-first-use.
94/94 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 21:46:51 +00:00
|
|
|
"structlog>=24.0",
|
2026-04-08 17:57:15 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[project.optional-dependencies]
|
|
|
|
|
dev = [
|
|
|
|
|
"pytest>=7.0",
|
|
|
|
|
"pytest-cov>=4.0",
|
2026-04-08 21:06:12 +00:00
|
|
|
"pytest-asyncio>=0.21",
|
2026-04-08 17:57:15 +00:00
|
|
|
"black>=23.0",
|
|
|
|
|
"ruff>=0.1.0",
|
|
|
|
|
"mypy>=1.0",
|
|
|
|
|
]
|
2026-04-09 02:03:42 +00:00
|
|
|
# arxiv-rag researcher (M5.1). Heavy ML deps — optional extra so the base
|
|
|
|
|
# install stays slim for users who only want the web researcher.
|
|
|
|
|
arxiv = [
|
|
|
|
|
"pymupdf>=1.24",
|
|
|
|
|
"chromadb>=0.5",
|
|
|
|
|
"sentence-transformers>=3.0",
|
|
|
|
|
"arxiv>=2.1",
|
|
|
|
|
]
|
2026-04-08 17:57:15 +00:00
|
|
|
|
|
|
|
|
[project.scripts]
|
|
|
|
|
marchwarden = "cli.main:cli"
|
|
|
|
|
|
|
|
|
|
[tool.setuptools.packages.find]
|
M2.5.1: Structured application logger via structlog (#24)
Adds an operational logging layer separate from the JSONL trace
audit logs. Operational logs cover system events (startup, errors,
MCP transport, research lifecycle); JSONL traces remain the
researcher provenance audit trail.
Backend: structlog with two renderers selectable via
MARCHWARDEN_LOG_FORMAT (json|console). Defaults to console when
stderr is a TTY, json otherwise — so dev runs are human-readable
and shipped runs (containers, automation) emit OpenSearch-ready
JSON without configuration.
Key features:
- Named loggers per component: marchwarden.cli,
marchwarden.mcp, marchwarden.researcher.web
- MARCHWARDEN_LOG_LEVEL controls global level (default INFO)
- MARCHWARDEN_LOG_FILE=1 enables a 10MB-rotating file at
~/.marchwarden/logs/marchwarden.log
- structlog contextvars bind trace_id + researcher at the start
of each research() call so every downstream log line carries
them automatically; cleared on completion
- stdlib logging is funneled through the same pipeline so noisy
third-party loggers (httpx, anthropic) get the same formatting
and quieted to WARN unless DEBUG is requested
- Logs to stderr to keep MCP stdio stdout clean
Wired into:
- cli.main.cli — configures logging on startup, logs ask_started/
ask_completed/ask_failed
- researchers.web.server.main — configures logging on startup,
logs mcp_server_starting
- researchers.web.agent.research — binds trace context, logs
research_started/research_completed
Tests verify JSON and console formats, contextvar propagation,
level filtering, idempotency, and auto-configure-on-first-use.
94/94 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 21:46:51 +00:00
|
|
|
include = ["researchers*", "orchestrator*", "cli*", "obs*"]
|
2026-04-08 17:57:15 +00:00
|
|
|
|
|
|
|
|
[tool.pytest.ini_options]
|
|
|
|
|
testpaths = ["tests"]
|
|
|
|
|
python_files = ["test_*.py"]
|
|
|
|
|
python_classes = ["Test*"]
|
|
|
|
|
python_functions = ["test_*"]
|
|
|
|
|
|
|
|
|
|
[tool.coverage.run]
|
|
|
|
|
source = ["researchers", "orchestrator", "cli"]
|
|
|
|
|
omit = ["*/tests/*", "*/test_*.py"]
|
|
|
|
|
|
|
|
|
|
[tool.black]
|
|
|
|
|
line-length = 88
|
|
|
|
|
target-version = ['py310']
|
|
|
|
|
|
|
|
|
|
[tool.ruff]
|
|
|
|
|
line-length = 88
|
|
|
|
|
target-version = "py310"
|
|
|
|
|
select = ["E", "F", "W", "I001"]
|
|
|
|
|
|
|
|
|
|
[tool.mypy]
|
|
|
|
|
python_version = "3.10"
|
|
|
|
|
warn_return_any = true
|
|
|
|
|
warn_unused_configs = true
|
|
|
|
|
disallow_untyped_defs = false
|