Spaces:
Running

File size: 4,070 Bytes
0776bd5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
[project]
name = "workpilot"
version = "0.1.0"
description = "WorkPilot AI: a safe, event-driven AI operations engine for small businesses"
requires-python = ">=3.12"
readme = "README.md"
dependencies = [
    "fastapi>=0.115",
    "uvicorn[standard]>=0.30",
    "pydantic>=2.8",
    "pydantic-settings>=2.4",
    "sqlalchemy[asyncio]>=2.0.30",
    "alembic>=1.13",
    "psycopg[binary,pool]>=3.2",
    "pgvector>=0.3",
    "argon2-cffi>=23.1",
    "pyjwt>=2.9",
    "pyotp>=2.9",
    "cedarpy>=4.12,<5",
    # Agent stack: pin together and upgrade together (see docs/adr/0001-stack.md)
    "langgraph==1.2.25",
    "langgraph-checkpoint-postgres==3.2.1",
    "langchain==1.5.2",
    "langchain-core>=1.5,<2",
    "httpx>=0.27",
    "email-validator>=2.2",
    "mcp>=2.3,<3",
    # Phase 5: durable event dispatch (see docs/adr/0005-durable-events-dbos.md)
    "dbos==3.7.0",
    "croniter>=2",
    "tzdata>=2024.1",  # IANA zones for schedules on Windows
    # Phase 12: knowledge ingestion (PDF, DOCX)
    "pypdf>=5",
    "python-docx>=1.1",
    # Phase 16: OpenAPI import accepts YAML specs
    "pyyaml>=6",
    # Phase 15: OpenTelemetry GenAI tracing, exported over OTLP/HTTP (e.g. to Langfuse)
    "opentelemetry-api>=1.46",
    "opentelemetry-sdk>=1.46",
    "opentelemetry-exporter-otlp-proto-http>=1.46",
]

[project.optional-dependencies]
llm = [
    "langchain-anthropic",
    "langchain-openai",
    # Gemini ("google_genai:<model>", GOOGLE_API_KEY) and Groq ("groq:<model>", GROQ_API_KEY).
    "langchain-google-genai",
    "langchain-groq",
]
# Phase 9: LightGBM demand forecasting (packs/ecommerce/ml/forecasting.py). Optional: without it
# forecasting falls back to seasonal-naive / moving-average. Chronos-2 (torch) is deliberately
# NOT listed: install `chronos-forecasting` separately to enable that adapter.
# Phase 15: optional Presidio PII analyzer (core.privacy.pii). Needs a spaCy model too, e.g.
# `python -m spacy download en_core_web_lg`; without it the regex analyzer is used.
pii = [
    "presidio-analyzer>=2.2",
]
ml = [
    "lightgbm>=4.5",
    "numpy>=1.26",
]
dev = [
    "lightgbm>=4.5",  # same as the "ml" extra, so CI exercises the LightGBM path
    "numpy>=1.26",
    "pytest>=8.3",
    "pytest-asyncio>=0.24",
    "ruff>=0.6",
    "mypy>=1.11",
    "import-linter>=2.1",
    "pgserver>=0.1.4",
    "pyyaml>=6",
    "types-PyYAML",
]

[project.entry-points."workpilot.packs"]
demo = "packs.demo.pack:DemoPack"
ecommerce = "packs.ecommerce.pack:EcommercePack"
appointments = "packs.appointments.pack:AppointmentsPack"  # Phase 17

[build-system]
requires = ["setuptools>=69"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
include = ["core*", "packs*", "evals*", "mcp_servers*"]

[tool.ruff]
line-length = 100
target-version = "py312"

[tool.ruff.lint]
select = ["E", "F", "I", "B", "UP", "ASYNC", "S", "RUF"]
ignore = ["S101", "B008", "RUF012", "UP046", "UP047"]

[tool.ruff.lint.isort]
known-third-party = ["alembic"]
known-first-party = ["core", "packs", "evals", "tests"]

[tool.ruff.lint.per-file-ignores]
"tests/**" = ["S", "B", "ASYNC"]
"alembic/versions/**" = ["E501"]
"evals/**" = ["S"]
# Phase 13: Urdu text legitimately uses Arabic-script letters ruff flags as confusables.
"core/i18n/**" = ["RUF001", "RUF002", "RUF003"]
"packs/*/i18n.py" = ["RUF001", "RUF002", "RUF003", "E501"]
"packs/appointments/safety.py" = ["RUF001", "RUF002", "RUF003"]  # Urdu refusal text
"tests/i18n/**" = ["RUF001", "RUF002", "RUF003"]

[tool.mypy]
python_version = "3.12"
plugins = ["pydantic.mypy"]
ignore_missing_imports = true
warn_unused_ignores = true

[[tool.mypy.overrides]]
module = "core.*"
strict = true
disallow_any_generics = false
warn_return_any = false

[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"
asyncio_default_test_loop_scope = "session"
testpaths = ["tests"]
markers = [
    "integration: needs a real PostgreSQL",
]