grumo 1.0.0__py3-none-any.whl

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 (276) hide show
  1. grumo/__init__.py +13 -0
  2. grumo/cli/__init__.py +5 -0
  3. grumo/py.typed +0 -0
  4. grumo-1.0.0.dist-info/METADATA +641 -0
  5. grumo-1.0.0.dist-info/RECORD +276 -0
  6. grumo-1.0.0.dist-info/WHEEL +5 -0
  7. grumo-1.0.0.dist-info/entry_points.txt +3 -0
  8. grumo-1.0.0.dist-info/licenses/LICENSE +21 -0
  9. grumo-1.0.0.dist-info/top_level.txt +2 -0
  10. voodoo/__init__.py +25 -0
  11. voodoo/adapters/__init__.py +39 -0
  12. voodoo/adapters/capabilities.py +190 -0
  13. voodoo/adapters/registry.py +330 -0
  14. voodoo/adapters/tailwind.py +929 -0
  15. voodoo/adapters/voodoo_css.py +1484 -0
  16. voodoo/agents/__init__.py +33 -0
  17. voodoo/agents/models.py +166 -0
  18. voodoo/agents/registry.py +595 -0
  19. voodoo/ai/__init__.py +35 -0
  20. voodoo/ai/agent.py +14 -0
  21. voodoo/ai/agent_legacy.py +1124 -0
  22. voodoo/ai/agent_runtime_truth.py +204 -0
  23. voodoo/ai/providers/__init__.py +398 -0
  24. voodoo/ai/providers/anthropic.py +7 -0
  25. voodoo/ai/providers/gemini.py +7 -0
  26. voodoo/ai/providers/mock.py +116 -0
  27. voodoo/ai/providers/ollama.py +7 -0
  28. voodoo/ai/providers/openai.py +7 -0
  29. voodoo/ai/tools/__init__.py +91 -0
  30. voodoo/ai/tools/registry.py +250 -0
  31. voodoo/auth/__init__.py +91 -0
  32. voodoo/auth/cookies.py +55 -0
  33. voodoo/auth/guards.py +144 -0
  34. voodoo/auth/jwt.py +298 -0
  35. voodoo/auth/middleware.py +107 -0
  36. voodoo/auth/passwords.py +86 -0
  37. voodoo/auth/user.py +299 -0
  38. voodoo/cli/__init__.py +65 -0
  39. voodoo/cli/__main__.py +3 -0
  40. voodoo/cli/agents.py +148 -0
  41. voodoo/cli/ai.py +64 -0
  42. voodoo/cli/approvals.py +296 -0
  43. voodoo/cli/auth.py +140 -0
  44. voodoo/cli/context.py +195 -0
  45. voodoo/cli/create.py +21 -0
  46. voodoo/cli/dev.py +170 -0
  47. voodoo/cli/doctor.py +418 -0
  48. voodoo/cli/executions.py +237 -0
  49. voodoo/cli/fabric.py +143 -0
  50. voodoo/cli/generate.py +99 -0
  51. voodoo/cli/graph.py +36 -0
  52. voodoo/cli/inspect.py +585 -0
  53. voodoo/cli/new.py +155 -0
  54. voodoo/cli/objects.py +122 -0
  55. voodoo/cli/protocol.py +68 -0
  56. voodoo/cli/recover.py +89 -0
  57. voodoo/cli/routes.py +69 -0
  58. voodoo/cli/scaffolding.py +477 -0
  59. voodoo/cli/schedules.py +138 -0
  60. voodoo/cli/start.py +98 -0
  61. voodoo/cli/status.py +107 -0
  62. voodoo/cli/tasks.py +116 -0
  63. voodoo/cli/terminal.py +161 -0
  64. voodoo/cli/theme.py +201 -0
  65. voodoo/cli/version.py +17 -0
  66. voodoo/cli/workers_cmd.py +77 -0
  67. voodoo/components.py +421 -0
  68. voodoo/config.py +942 -0
  69. voodoo/core/__init__.py +67 -0
  70. voodoo/core/app.py +730 -0
  71. voodoo/core/errors.py +59 -0
  72. voodoo/core/events.py +23 -0
  73. voodoo/core/render.py +7 -0
  74. voodoo/core/routing.py +14 -0
  75. voodoo/core/sitemap.py +125 -0
  76. voodoo/core/state.py +17 -0
  77. voodoo/data/__init__.py +98 -0
  78. voodoo/data/base.py +462 -0
  79. voodoo/data/model.py +304 -0
  80. voodoo/data/store_backend.py +335 -0
  81. voodoo/data/store_facade.py +768 -0
  82. voodoo/data/store_model.py +121 -0
  83. voodoo/edge/__init__.py +125 -0
  84. voodoo/edge/auth.py +250 -0
  85. voodoo/edge/errors.py +226 -0
  86. voodoo/edge/gateway.py +708 -0
  87. voodoo/edge/http.py +352 -0
  88. voodoo/edge/models.py +309 -0
  89. voodoo/edge/mqtt.py +329 -0
  90. voodoo/edge/protocol.py +282 -0
  91. voodoo/edge/simulator.py +411 -0
  92. voodoo/edge/store.py +1039 -0
  93. voodoo/edge/store_voodoo.py +375 -0
  94. voodoo/edge/world.py +217 -0
  95. voodoo/i18n.py +129 -0
  96. voodoo/integrations/__init__.py +1 -0
  97. voodoo/integrations/ai/__init__.py +1 -0
  98. voodoo/integrations/ai/anthropic.py +118 -0
  99. voodoo/integrations/ai/gemini.py +92 -0
  100. voodoo/integrations/ai/ollama.py +89 -0
  101. voodoo/integrations/ai/openai.py +236 -0
  102. voodoo/integrations/mcp/__init__.py +319 -0
  103. voodoo/integrations/mcp/client.py +80 -0
  104. voodoo/integrations/otel.py +119 -0
  105. voodoo/memory/__init__.py +32 -0
  106. voodoo/memory/interfaces.py +302 -0
  107. voodoo/memory/sqlite.py +368 -0
  108. voodoo/mesh/__init__.py +470 -0
  109. voodoo/mesh/client.py +173 -0
  110. voodoo/mesh/event_bus.py +62 -0
  111. voodoo/observability/__init__.py +34 -0
  112. voodoo/observability/api.py +139 -0
  113. voodoo/observability/middleware.py +102 -0
  114. voodoo/observability/store.py +518 -0
  115. voodoo/primitives/__init__.py +44 -0
  116. voodoo/primitives/capability.py +116 -0
  117. voodoo/primitives/compute.py +113 -0
  118. voodoo/primitives/constraint.py +138 -0
  119. voodoo/primitives/effect.py +176 -0
  120. voodoo/primitives/intent.py +180 -0
  121. voodoo/primitives/resource.py +77 -0
  122. voodoo/primitives/state.py +103 -0
  123. voodoo/primitives/time.py +139 -0
  124. voodoo/protocol/__init__.py +116 -0
  125. voodoo/protocol/export.py +58 -0
  126. voodoo/protocol/fabric.py +86 -0
  127. voodoo/protocol/operational.py +190 -0
  128. voodoo/protocol/schemas.py +522 -0
  129. voodoo/py.typed +0 -0
  130. voodoo/routing/api.py +293 -0
  131. voodoo/routing/pages.py +192 -0
  132. voodoo/runtime/__init__.py +375 -0
  133. voodoo/runtime/agency/__init__.py +39 -0
  134. voodoo/runtime/agency/adaptive.py +496 -0
  135. voodoo/runtime/agency/goal.py +436 -0
  136. voodoo/runtime/agency/goal_store.py +238 -0
  137. voodoo/runtime/application_graph.py +571 -0
  138. voodoo/runtime/capability.py +208 -0
  139. voodoo/runtime/constraint.py +244 -0
  140. voodoo/runtime/context.py +235 -0
  141. voodoo/runtime/conventions.py +71 -0
  142. voodoo/runtime/dependency_graph.py +138 -0
  143. voodoo/runtime/distributed/__init__.py +35 -0
  144. voodoo/runtime/distributed/auth.py +163 -0
  145. voodoo/runtime/distributed/fabric.py +398 -0
  146. voodoo/runtime/distributed/membership.py +302 -0
  147. voodoo/runtime/distributed/remote.py +284 -0
  148. voodoo/runtime/distributed/replay.py +169 -0
  149. voodoo/runtime/errors.py +103 -0
  150. voodoo/runtime/execution/__init__.py +5 -0
  151. voodoo/runtime/execution/engine.py +823 -0
  152. voodoo/runtime/execution/model.py +296 -0
  153. voodoo/runtime/execution/world.py +57 -0
  154. voodoo/runtime/extension.py +116 -0
  155. voodoo/runtime/graph.py +75 -0
  156. voodoo/runtime/human.py +174 -0
  157. voodoo/runtime/identity.py +156 -0
  158. voodoo/runtime/identity_store.py +172 -0
  159. voodoo/runtime/inspection/__init__.py +11 -0
  160. voodoo/runtime/inspection/dashboard.py +146 -0
  161. voodoo/runtime/inspection/lineage.py +162 -0
  162. voodoo/runtime/operations.py +84 -0
  163. voodoo/runtime/persistence.py +152 -0
  164. voodoo/runtime/planner.py +285 -0
  165. voodoo/runtime/policy.py +192 -0
  166. voodoo/runtime/reconciliation/__init__.py +25 -0
  167. voodoo/runtime/reconciliation/reconcile.py +318 -0
  168. voodoo/runtime/runtime.py +468 -0
  169. voodoo/runtime/scheduling/__init__.py +34 -0
  170. voodoo/runtime/scheduling/dispatch.py +104 -0
  171. voodoo/runtime/scheduling/handoff.py +81 -0
  172. voodoo/runtime/scheduling/schedule_service.py +74 -0
  173. voodoo/runtime/scheduling/tasks.py +190 -0
  174. voodoo/runtime/scheduling/work.py +275 -0
  175. voodoo/runtime/scheduling/workers.py +270 -0
  176. voodoo/runtime/store.py +671 -0
  177. voodoo/runtime/task.py +263 -0
  178. voodoo/runtime/transaction.py +381 -0
  179. voodoo/runtime/workflow.py +571 -0
  180. voodoo/runtime/workflow_store.py +333 -0
  181. voodoo/scaffold/default/COMPATIBILITY.json +8 -0
  182. voodoo/scaffold/default/README.md +31 -0
  183. voodoo/scaffold/default/SOURCE_OF_TRUTH.json +13 -0
  184. voodoo/scaffold/default/app/about/page.py +22 -0
  185. voodoo/scaffold/default/app/page.py +60 -0
  186. voodoo/scaffold/default/app/users/[id]/page.py +25 -0
  187. voodoo/scaffold/default/pyproject.toml +32 -0
  188. voodoo/scaffold/default/tests/browser/test_app_browser.py +19 -0
  189. voodoo/scaffold/default/tests/test_app.py +17 -0
  190. voodoo/scaffold/default/voodoo.toml +13 -0
  191. voodoo/schedule.py +368 -0
  192. voodoo/security/__init__.py +70 -0
  193. voodoo/security/cors.py +109 -0
  194. voodoo/security/csrf.py +110 -0
  195. voodoo/security/headers.py +120 -0
  196. voodoo/security/passwords.py +22 -0
  197. voodoo/security/rate_limit.py +137 -0
  198. voodoo/security/redaction.py +182 -0
  199. voodoo/security/secrets.py +276 -0
  200. voodoo/seo.py +292 -0
  201. voodoo/static/client.js +1070 -0
  202. voodoo/status.py +329 -0
  203. voodoo/storage/__init__.py +81 -0
  204. voodoo/storage/cache/__init__.py +12 -0
  205. voodoo/storage/cache/interfaces.py +40 -0
  206. voodoo/storage/cache/memory.py +53 -0
  207. voodoo/storage/cache/redis.py +70 -0
  208. voodoo/storage/database/__init__.py +51 -0
  209. voodoo/storage/database/interfaces.py +73 -0
  210. voodoo/storage/database/postgres.py +348 -0
  211. voodoo/storage/database/sqlite.py +224 -0
  212. voodoo/storage/events/__init__.py +36 -0
  213. voodoo/storage/events/codec.py +28 -0
  214. voodoo/storage/events/diagnostics.py +20 -0
  215. voodoo/storage/events/interfaces.py +24 -0
  216. voodoo/storage/events/local.py +62 -0
  217. voodoo/storage/events/postgres.py +210 -0
  218. voodoo/storage/events/sqlite.py +171 -0
  219. voodoo/storage/events/store.py +130 -0
  220. voodoo/storage/execution/__init__.py +41 -0
  221. voodoo/storage/execution/migrations.py +81 -0
  222. voodoo/storage/execution/postgres.py +385 -0
  223. voodoo/storage/execution/sqlite.py +510 -0
  224. voodoo/storage/execution/store.py +491 -0
  225. voodoo/storage/manager.py +161 -0
  226. voodoo/storage/objects/__init__.py +17 -0
  227. voodoo/storage/objects/interfaces.py +108 -0
  228. voodoo/storage/objects/local.py +198 -0
  229. voodoo/storage/objects/s3.py +430 -0
  230. voodoo/storage/objects/store.py +258 -0
  231. voodoo/storage/queue/__init__.py +51 -0
  232. voodoo/storage/queue/interfaces.py +253 -0
  233. voodoo/storage/queue/memory.py +334 -0
  234. voodoo/storage/queue/postgres.py +376 -0
  235. voodoo/storage/queue/redis.py +662 -0
  236. voodoo/storage/queue/sqlite.py +366 -0
  237. voodoo/storage/queue/store.py +357 -0
  238. voodoo/storage/scheduler/__init__.py +51 -0
  239. voodoo/storage/scheduler/sqlite.py +311 -0
  240. voodoo/storage/scheduler/store.py +377 -0
  241. voodoo/ui/__init__.py +502 -0
  242. voodoo/ui/brand.py +137 -0
  243. voodoo/ui/component.py +268 -0
  244. voodoo/ui/controls.py +1177 -0
  245. voodoo/ui/data_extended.py +1082 -0
  246. voodoo/ui/events.py +637 -0
  247. voodoo/ui/forms_extended.py +703 -0
  248. voodoo/ui/foundation.py +489 -0
  249. voodoo/ui/interaction_kernel.py +1165 -0
  250. voodoo/ui/interactions.py +678 -0
  251. voodoo/ui/interactive.py +410 -0
  252. voodoo/ui/layout.py +31 -0
  253. voodoo/ui/library.py +1813 -0
  254. voodoo/ui/markdown.py +146 -0
  255. voodoo/ui/navigation.py +490 -0
  256. voodoo/ui/navigation_extended.py +1180 -0
  257. voodoo/ui/primitives.py +338 -0
  258. voodoo/ui/product.py +575 -0
  259. voodoo/ui/rendering.py +200 -0
  260. voodoo/ui/state.py +438 -0
  261. voodoo/ui/styles/__init__.py +77 -0
  262. voodoo/ui/styles/extended.py +1195 -0
  263. voodoo/ui/styles/palette.py +183 -0
  264. voodoo/ui/styles/presets.py +387 -0
  265. voodoo/ui/styles/product.py +268 -0
  266. voodoo/ui/styles/system.py +865 -0
  267. voodoo/ui/styles/theme.py +513 -0
  268. voodoo/ui/styles/theme_contract.py +156 -0
  269. voodoo/ui/styles/voodoo_system.py +169 -0
  270. voodoo/ui/voodoo_system.py +441 -0
  271. voodoo/ui/workspace.py +1347 -0
  272. voodoo/world/__init__.py +17 -0
  273. voodoo/world/model.py +200 -0
  274. voodoo/world/models.py +137 -0
  275. voodoo/world/sqlite.py +289 -0
  276. voodoo/world/store.py +117 -0
grumo/__init__.py ADDED
@@ -0,0 +1,13 @@
1
+ """Grumo — public compatibility namespace for the programmable runtime.
2
+
3
+ During the coordinated distribution migration, implementations remain in
4
+ `voodoo`. Importing from Grumo exposes the same public classes and decorators,
5
+ without creating a second runtime or silently migrating existing projects.
6
+ Advanced modules continue to live under `voodoo.*` until their individual
7
+ compatibility contracts have been implemented.
8
+ """
9
+
10
+ from voodoo import Agent, App, Model, page, state, task, tool
11
+ from voodoo import __version__ as __version__
12
+
13
+ __all__ = ["Agent", "App", "Model", "page", "state", "task", "tool"]
grumo/cli/__init__.py ADDED
@@ -0,0 +1,5 @@
1
+ """Grumo CLI entrypoint backed by the existing stable Voodoo commands."""
2
+
3
+ from voodoo.cli import app
4
+
5
+ __all__ = ["app"]
grumo/py.typed ADDED
File without changes
@@ -0,0 +1,641 @@
1
+ Metadata-Version: 2.4
2
+ Name: grumo
3
+ Version: 1.0.0
4
+ Summary: The programmable runtime for adaptive applications and operational systems — from web and AI to distributed and physical systems.
5
+ Author-email: Helder Perez <contact@helderperez.com>
6
+ Maintainer-email: Helder Perez <contact@helderperez.com>
7
+ License-Expression: MIT
8
+ Project-URL: Homepage, https://github.com/helderperez-dev/grumo
9
+ Project-URL: Documentation, https://github.com/helderperez-dev/grumo#documentation
10
+ Project-URL: Repository, https://github.com/helderperez-dev/grumo
11
+ Project-URL: Changelog, https://github.com/helderperez-dev/grumo/blob/main/CHANGELOG.md
12
+ Project-URL: Roadmap, https://github.com/helderperez-dev/grumo/blob/main/ROADMAP.md
13
+ Project-URL: Issues, https://github.com/helderperez-dev/grumo/issues
14
+ Project-URL: Discussions, https://github.com/helderperez-dev/grumo/discussions
15
+ Keywords: python,runtime,application-runtime,distributed-systems,ai-agents,edge-computing,reactive-ui,durable-execution,operational-systems,local-first
16
+ Classifier: Development Status :: 4 - Beta
17
+ Classifier: Framework :: AsyncIO
18
+ Classifier: Intended Audience :: Developers
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: Implementation :: CPython
24
+ Classifier: Topic :: Internet :: WWW/HTTP
25
+ Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
26
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
27
+ Classifier: Typing :: Typed
28
+ Requires-Python: >=3.12
29
+ Description-Content-Type: text/markdown
30
+ License-File: LICENSE
31
+ Requires-Dist: starlette
32
+ Requires-Dist: uvicorn
33
+ Requires-Dist: pydantic
34
+ Requires-Dist: grumo-store<2.0.0,>=1.0.0
35
+ Requires-Dist: websockets
36
+ Requires-Dist: httpx
37
+ Requires-Dist: python-dotenv
38
+ Requires-Dist: pyyaml
39
+ Requires-Dist: typer
40
+ Requires-Dist: rich
41
+ Requires-Dist: aiofiles
42
+ Provides-Extra: ai
43
+ Requires-Dist: openai; extra == "ai"
44
+ Requires-Dist: anthropic; extra == "ai"
45
+ Requires-Dist: google-generativeai; extra == "ai"
46
+ Requires-Dist: ollama; extra == "ai"
47
+ Provides-Extra: mcp
48
+ Provides-Extra: browser
49
+ Requires-Dist: playwright; extra == "browser"
50
+ Provides-Extra: dev
51
+ Requires-Dist: pytest; extra == "dev"
52
+ Requires-Dist: pytest-asyncio; extra == "dev"
53
+ Requires-Dist: ruff; extra == "dev"
54
+ Requires-Dist: mypy; extra == "dev"
55
+ Requires-Dist: types-PyYAML; extra == "dev"
56
+ Requires-Dist: cryptography>=42; extra == "dev"
57
+ Requires-Dist: pip-audit; extra == "dev"
58
+ Requires-Dist: pre-commit; extra == "dev"
59
+ Requires-Dist: aiosqlite; extra == "dev"
60
+ Provides-Extra: sqlite
61
+ Requires-Dist: aiosqlite; extra == "sqlite"
62
+ Provides-Extra: postgres
63
+ Requires-Dist: psycopg[binary]>=3.3.4; extra == "postgres"
64
+ Provides-Extra: s3
65
+ Requires-Dist: boto3>=1.34; extra == "s3"
66
+ Requires-Dist: botocore>=1.34; extra == "s3"
67
+ Provides-Extra: redis
68
+ Requires-Dist: redis>=5.0; extra == "redis"
69
+ Provides-Extra: edge
70
+ Requires-Dist: paho-mqtt>=2.0; extra == "edge"
71
+ Provides-Extra: otel
72
+ Requires-Dist: opentelemetry-api>=1.20; extra == "otel"
73
+ Requires-Dist: opentelemetry-sdk>=1.20; extra == "otel"
74
+ Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.20; extra == "otel"
75
+ Provides-Extra: secrets
76
+ Requires-Dist: cryptography>=42; extra == "secrets"
77
+ Dynamic: license-file
78
+
79
+ # Voodoo
80
+
81
+ **The programmable runtime for adaptive applications and operational systems.**
82
+
83
+ [GitHub](https://github.com/helderperez-dev/voodoo) · [Documentation](#documentation) · [Architecture](ARCHITECTURE.md) · [Roadmap](ROADMAP.md) · [Changelog](CHANGELOG.md)
84
+
85
+ [![CI](https://github.com/helderperez-dev/voodoo/actions/workflows/ci.yml/badge.svg)](https://github.com/helderperez-dev/voodoo/actions/workflows/ci.yml)
86
+ [![PyPI](https://img.shields.io/pypi/v/voodoo-framework)](https://pypi.org/project/voodoo-framework/)
87
+ [![Python](https://img.shields.io/pypi/pyversions/voodoo-framework)](https://pypi.org/project/voodoo-framework/)
88
+ [![License](https://img.shields.io/badge/license-MIT-informational)](LICENSE)
89
+
90
+ Voodoo lets a Python application start small — a page, API, model, task or agent —
91
+ and grow into durable workflows, human approvals, adaptive goals, distributed
92
+ participants and physical-device systems **without replacing the execution model
93
+ underneath it**.
94
+
95
+ > Composition over configuration. Python over DSLs. Adapters over lock-in.
96
+ > Explicit capabilities over ambient authority.
97
+
98
+ ## What Voodoo is
99
+
100
+ Most application stacks accumulate separate execution models as they grow:
101
+ HTTP handlers, frontend state, database jobs, queues, schedulers, agent loops,
102
+ workflow engines, event buses, human approvals, distributed workers and device
103
+ control.
104
+
105
+ Voodoo treats those as different manifestations of one programmable Runtime.
106
+
107
+ ```text
108
+ Entity → State → Intent → Capability + Policy → Execution → Effect → State
109
+ ```
110
+
111
+ For operational systems, the model becomes a closed loop:
112
+
113
+ ```text
114
+ World
115
+ ↓
116
+ Observation
117
+ ↓
118
+ Goal / Intent
119
+ ↓
120
+ Plan
121
+ ↓
122
+ Capability + Policy
123
+ ↓
124
+ Execution
125
+ ↓
126
+ Effect
127
+ ↓
128
+ Participant
129
+ ↓
130
+ ACK / observed evidence
131
+ └────────────────────→ World
132
+ ```
133
+
134
+ Two rules are central:
135
+
136
+ - **AI is Compute, not authority.** Agents participate in the same Runtime and
137
+ remain subject to capabilities and policy.
138
+ - **Effect != Observation.** What the system attempted is not automatically
139
+ treated as evidence that the real world changed.
140
+
141
+ An `Execution` is not every function call. It is meaningful work worth
142
+ authorizing, observing, recovering, accounting for, waiting on, or reasoning
143
+ about.
144
+
145
+ ## Quick start
146
+
147
+ Voodoo requires Python 3.12+.
148
+
149
+ ```bash
150
+ pip install voodoo-framework
151
+
152
+ voodoo new my_app
153
+ cd my_app
154
+ voodoo dev
155
+ ```
156
+
157
+ Open `http://localhost:8000`.
158
+
159
+ A fresh application needs no external database, Redis server, queue service or
160
+ object server. On first run, Voodoo creates its local durable substrate:
161
+
162
+ ```text
163
+ .voodoo/application.vstore
164
+ ```
165
+
166
+ ### Small application
167
+
168
+ ```python
169
+ from voodoo import App, page
170
+ from voodoo.ui import Heading, Page, Stack, Text
171
+
172
+ app = App()
173
+
174
+
175
+ @page("/")
176
+ def home():
177
+ return Page(
178
+ Stack(
179
+ Heading("Hello, Voodoo", level=1),
180
+ Text("One application. One runtime."),
181
+ gap="md",
182
+ )
183
+ )
184
+
185
+
186
+ if __name__ == "__main__":
187
+ app.run()
188
+ ```
189
+
190
+ ## Start simple, grow only when needed
191
+
192
+ Voodoo is designed for progressive complexity. You do not need World Models,
193
+ Goals, AI or distributed execution to build a normal application.
194
+
195
+ | You need | Use |
196
+ |---|---|
197
+ | UI-local mutable value | `state()` |
198
+ | Persistent business data | `Model` |
199
+ | Indexed business queries | `field(index=True)` + `where/order_by` |
200
+ | Page / browser interaction | Voodoo UI + Python-callable events |
201
+ | HTTP/API surface | routing / API primitives |
202
+ | Retryable background work | `@task` |
203
+ | Future or recurring work | Runtime scheduling |
204
+ | Decoupled notification | Mesh / event bus |
205
+ | Meaningful governed work | `Execution` |
206
+ | LLM reasoning and tool use | `Agent` + `@tool` |
207
+ | Authorization to produce effects | `Capability` + `Policy` |
208
+ | Human decision during work | HITL approval |
209
+ | Durable desired outcome | `Goal` + `GoalRuntime` |
210
+ | Operational reality | `Entity` + `Observation` + `WorldModel` |
211
+ | Physical/external participant | Edge / `DeviceGateway` |
212
+ | Governed node-to-node work | Runtime Fabric |
213
+
214
+ See [Choosing primitives](docs/choosing-primitives.md) for the semantic
215
+ boundaries between state, models, events, tools, tasks, capabilities and
216
+ executions.
217
+
218
+ ## One Runtime, one durable substrate
219
+
220
+ Voodoo Store is the default embedded infrastructure for a local application.
221
+
222
+ ```text
223
+ Application
224
+ │
225
+ ▼
226
+ Voodoo Runtime
227
+ │
228
+ ├── Model / Data
229
+ ├── Jobs / Queue
230
+ ├── Scheduler / Cron / Triggers
231
+ ├── Events / Outbox
232
+ ├── Objects
233
+ ├── Execution / Workflow / Goal / HITL
234
+ ├── Identity
235
+ └── Edge / device state
236
+ │
237
+ ▼
238
+ RuntimeStore
239
+ │
240
+ ▼
241
+ .voodoo/application.vstore
242
+ ```
243
+
244
+ The default path is **local-first and single-writer**. PostgreSQL, SQLite,
245
+ Redis, S3-compatible object storage and OpenTelemetry remain explicit adapters
246
+ or integrations for workloads that need them; they are not silent defaults.
247
+
248
+ Store owns durable mechanics. Runtime owns semantics, authority and
249
+ intelligence.
250
+
251
+ Models may declare native secondary indexes without changing the query API:
252
+
253
+ ```python
254
+ from voodoo import Model
255
+ from voodoo.data import field
256
+
257
+
258
+ class Customer(Model):
259
+ email: str = field(index=True)
260
+ score: int = field(index=True)
261
+
262
+
263
+ customers = await Customer.where(email="ada@example.com")
264
+ top = await Customer.where().order_by("-score").limit(10)
265
+ ```
266
+
267
+ Indexed equality and single-column ordering are pushed into Voodoo Store;
268
+ queries without a matching declared index preserve the same API and fall back
269
+ to collection scans.
270
+
271
+ Models receive a Runtime-generated UUIDv7 identity by default. The UUID is
272
+ generated before persistence, stored as the 16-byte Collection primary key and
273
+ exposed as `uuid.UUID` in Python. Sequential business identifiers remain
274
+ ordinary explicit fields rather than the default technical identity.
275
+
276
+ Model typing carries schema semantics without duplicating them in storage
277
+ configuration: `T | None` expresses optionality, normal assignment or
278
+ `field(default=...)` expresses defaults, `field(default_factory=...)` handles
279
+ dynamic defaults, and `typing.Annotated` constraints express domain limits.
280
+ Relationships use `relation(...)` with explicit `Delete.RESTRICT`,
281
+ `Delete.CASCADE` or `Delete.SET_NULL` policies. Backend-specific `db_type`
282
+ metadata is deliberately not part of the default Model API.
283
+
284
+ ## The Voodoo 3.0 architecture
285
+
286
+ Voodoo 3.0 deliberately converges concepts under one semantic owner instead of
287
+ preserving duplicate historical namespaces.
288
+
289
+ ```text
290
+ src/voodoo/
291
+ ├── core/ application facade, lifecycle, state and events
292
+ ├── primitives/ foundational semantic concepts
293
+ ├── runtime/ canonical Runtime semantics
294
+ │ ├── execution/
295
+ │ ├── scheduling/
296
+ │ ├── agency/
297
+ │ ├── distributed/
298
+ │ ├── reconciliation/
299
+ │ └── inspection/
300
+ ├── world/ entities, relationships, observations, WorldModel
301
+ ├── edge/ physical/external participant boundary
302
+ ├── protocol/ language-neutral semantic contracts
303
+ ├── ai/ native Agent/provider/tool semantics
304
+ ├── integrations/ MCP, provider SDK and OpenTelemetry integrations
305
+ ├── observability/ traces, metrics and runtime inspection
306
+ ├── data/ Store-first Model API
307
+ ├── storage/ infrastructure contracts
308
+ ├── adapters/ explicit infrastructure providers
309
+ ├── ui/ reactive UI and design system
310
+ ├── routing/ pages and APIs
311
+ ├── mesh/ realtime/event transport surface
312
+ ├── auth/ application authentication surfaces
313
+ ├── security/ HTTP security and redaction
314
+ └── cli/ developer tooling
315
+ ```
316
+
317
+ The package root stays intentionally small:
318
+
319
+ ```python
320
+ from voodoo import Agent, App, Model, page, state, task, tool
321
+ ```
322
+
323
+ Advanced APIs come from the namespace that owns them:
324
+
325
+ ```python
326
+ from voodoo.ui import Button, Card, DataTable
327
+ from voodoo.runtime import ExecutionEngine, Goal, GoalRuntime, Planner
328
+ from voodoo.world import Entity, Observation, WorldModel
329
+ from voodoo.edge import DeviceGateway, WorldAwareDeviceGateway
330
+ from voodoo.protocol import RemoteExecutionRequest, WorldSnapshot
331
+ from voodoo.integrations.mcp import mcp
332
+ ```
333
+
334
+ See [Voodoo 3.0 public API law](docs/public-api-3.md) for the canonical import
335
+ model and the clean-break migration map from 2.x.
336
+
337
+ For contributor-facing ownership and package placement, see the [canonical
338
+ package navigation](docs/architecture/navigation.md).
339
+
340
+ ## Adaptive applications
341
+
342
+ An adaptive application can observe facts, express desired outcomes and allow
343
+ the Runtime to reconcile the two without creating a second orchestration model.
344
+
345
+ ```python
346
+ from voodoo import App
347
+ from voodoo.primitives import Intent
348
+
349
+ app = App()
350
+
351
+ conversion = app.observation("business", "conversion")
352
+
353
+
354
+ @app.goal(
355
+ "grow",
356
+ observes=(conversion,),
357
+ target_entity_id="business",
358
+ propose=lambda goal, world: Intent(name="conversion.adjust"),
359
+ )
360
+ def growth(world):
361
+ return world is not None and world.entity.properties.get("conversion", 0) >= 0.10
362
+
363
+
364
+ @app.capability("conversion.adjust")
365
+ async def improve(ctx):
366
+ return {"accepted": True}
367
+ ```
368
+
369
+ The application declares observations, goals and executable capabilities.
370
+ Execution, scheduling, reconciliation and authority remain Runtime concerns.
371
+
372
+ ## AI and tools
373
+
374
+ AI is optional. The core package does not install provider SDKs.
375
+
376
+ ```bash
377
+ pip install "voodoo-framework[ai]"
378
+ ```
379
+
380
+ A tool remains normal Python while also becoming introspectable Runtime
381
+ capability for agent/tool workflows:
382
+
383
+ ```python
384
+ from voodoo import Agent, tool
385
+
386
+
387
+ @tool
388
+ async def find_customer(email: str) -> dict:
389
+ """Find a customer by email."""
390
+ return {"email": email}
391
+
392
+
393
+ agent = Agent(
394
+ model="mock:test",
395
+ tools=[find_customer],
396
+ )
397
+ ```
398
+
399
+ MCP is an interoperability boundary under `voodoo.integrations.mcp`; it is
400
+ not a second tool registry or execution model.
401
+
402
+ ## Operational systems and Edge
403
+
404
+ Voodoo can connect software decisions to external or physical participants
405
+ without treating a sent command as reality.
406
+
407
+ ```text
408
+ Device evidence
409
+ ↓
410
+ Edge
411
+ ↓
412
+ Observation
413
+ ↓
414
+ World
415
+ ↓
416
+ Goal / Intent
417
+ ↓
418
+ Planner
419
+ ↓
420
+ Capability + Policy
421
+ ↓
422
+ Execution
423
+ ↓
424
+ Effect
425
+ ↓
426
+ Device
427
+ ↓
428
+ ACK / measured evidence
429
+ └──────────────→ Observation → World
430
+ ```
431
+
432
+ Run the zero-infrastructure operational canary:
433
+
434
+ ```bash
435
+ python examples/adaptive/operational_closed_loop/main.py
436
+ ```
437
+
438
+ The example proves the important boundary: the World changes only after the
439
+ simulated device reports observed evidence, not merely because an Effect was
440
+ sent.
441
+
442
+ ## Distributed Runtime
443
+
444
+ Voodoo scales by adding Runtime nodes, not by letting multiple processes write
445
+ the same Store file.
446
+
447
+ ```text
448
+ same application semantics
449
+ │
450
+ ▼
451
+ Runtime Fabric
452
+ / | \
453
+ node-a node-b node-c
454
+ | | |
455
+ a.vstore b.vstore c.vstore
456
+ ```
457
+
458
+ Each node owns its local Store. Remote work re-enters canonical
459
+ `Capability + Policy + Execution` at the destination.
460
+
461
+ The Runtime Fabric includes authenticated node identity, durable membership,
462
+ health/discovery, placement, lease generations, replay/idempotency boundaries
463
+ and bounded failover. Failover remains constrained by the semantics of the work:
464
+ ambiguous external or physical effects must not be blindly reissued.
465
+
466
+ ## Major capabilities
467
+
468
+ | Domain | Capabilities |
469
+ |---|---|
470
+ | Application | pages, APIs, reactive Python UI, design system, SEO |
471
+ | Data | Store-first `Model`, explicit SQL adapters |
472
+ | Runtime | Execution, recovery, tasks, scheduling, workflows, transactions/outbox |
473
+ | Agency | Goals, planning, adaptive supervision, reconciliation |
474
+ | Authority | Identity, Capability, contextual Policy |
475
+ | Human | durable HITL waiting/approval |
476
+ | AI | Agents, tools, provider abstraction, persistent Memory |
477
+ | Interoperability | MCP integration, language-neutral Protocol |
478
+ | Distributed | remote execution, membership, placement, leases, bounded failover |
479
+ | World | Entity, Relationship, Observation, WorldModel |
480
+ | Edge | device identity/session/effects/ACK/evidence flows |
481
+ | Observability | execution lineage, traces, metrics and inspection |
482
+ | Infrastructure | PostgreSQL, SQLite, Redis, S3 and OpenTelemetry adapters/integrations |
483
+
484
+ ## Installation options
485
+
486
+ ```bash
487
+ # Core Runtime + Voodoo Store
488
+ pip install voodoo-framework
489
+
490
+ # AI providers
491
+ pip install "voodoo-framework[ai]"
492
+
493
+ # External infrastructure adapters
494
+ pip install "voodoo-framework[postgres,redis,s3,otel]"
495
+
496
+ # Explicit SQLite adapter
497
+ pip install "voodoo-framework[sqlite]"
498
+
499
+ # Edge MQTT transport
500
+ pip install "voodoo-framework[edge]"
501
+
502
+ # Development dependencies
503
+ pip install "voodoo-framework[dev]"
504
+ ```
505
+
506
+ You can also install the CLI with `uv tool install voodoo-framework` or
507
+ `pipx install voodoo-framework`.
508
+
509
+ ## Configuration
510
+
511
+ A fresh application is zero-config. The effective defaults are equivalent to:
512
+
513
+ ```toml
514
+ [store]
515
+ provider = "voodoo"
516
+ path = ".voodoo/application.vstore"
517
+
518
+ [database]
519
+ provider = "voodoo"
520
+
521
+ [queue]
522
+ provider = "voodoo"
523
+
524
+ [events]
525
+ provider = "voodoo"
526
+
527
+ [objects]
528
+ provider = "voodoo"
529
+ ```
530
+
531
+ Override only the domain that actually needs external infrastructure:
532
+
533
+ ```toml
534
+ [database]
535
+ provider = "postgres"
536
+ url = "postgresql://..."
537
+
538
+ [queue]
539
+ provider = "redis"
540
+ url = "redis://..."
541
+
542
+ [objects]
543
+ provider = "s3"
544
+ bucket = "my-bucket"
545
+ ```
546
+
547
+ Voodoo does not silently migrate or copy legacy external data into Voodoo Store
548
+ at startup. Migration is an explicit operation.
549
+
550
+ ## Examples
551
+
552
+ | Example | What it demonstrates |
553
+ |---|---|
554
+ | `examples/basics/hello_world/` | smallest application + native design system |
555
+ | `examples/web/dashboard/` | reactive UI/state |
556
+ | `examples/web/realtime/` | realtime communication |
557
+ | `examples/web/ui_magic/` | callable UI + current design-system acceptance app |
558
+ | `examples/ai/agent/` | Agent + Tool |
559
+ | `examples/ai/saas/` | UI + Agent + Tool + Mesh + Task + Model |
560
+ | `examples/adaptive/operational_closed_loop/` | Edge → World → Goal → Execution → Effect → evidence |
561
+
562
+ ## Documentation
563
+
564
+ A useful reading order:
565
+
566
+ 1. [Hello world](docs/hello_world.md)
567
+ 2. [Choosing primitives](docs/choosing-primitives.md)
568
+ 3. [Computational primitives](docs/primitives.md)
569
+ 4. [Execution model](docs/execution-model.md)
570
+ 5. [Runtime](docs/runtime.md)
571
+ 6. [Agents](docs/agents.md) and [Tools](docs/tools.md)
572
+ 7. [Human-in-the-loop](docs/hitl.md)
573
+ 8. [MCP](docs/mcp.md)
574
+ 9. [Protocol](docs/protocol.md)
575
+ 10. [Voodoo 3.0 public API law](docs/public-api-3.md)
576
+ 11. [Architecture](ARCHITECTURE.md)
577
+ 12. [Roadmap](ROADMAP.md)
578
+
579
+ `SPRINT_PLAN.md` is the implementation tracker; it should not be treated as a
580
+ marketing promise for future capabilities.
581
+
582
+ ## What Voodoo deliberately does not claim
583
+
584
+ Voodoo's architecture is broad, but its guarantees are intentionally explicit.
585
+
586
+ Current Voodoo 3.0 does **not** claim:
587
+
588
+ - automatic Store replication or synchronization between nodes;
589
+ - shared multi-writer `.vstore` files;
590
+ - distributed consensus;
591
+ - globally serializable cross-node transactions;
592
+ - global exactly-once execution;
593
+ - production PKI/OIDC/mTLS infrastructure;
594
+ - a managed Voodoo Cloud control plane.
595
+
596
+ The Voodoo Store 0.3 integration line exposes native Collections/index
597
+ queries, Queues, Topics/Streams, Consumer Groups, Objects, RPC, CDC,
598
+ Workflow/HITL state, lifecycle operations and heterogeneous transactions to the
599
+ Runtime. Those primitives remain single-node/local Store semantics; they do not
600
+ imply replication, consensus or global exactly-once behavior.
601
+
602
+ ## What Voodoo is trying to preserve
603
+
604
+ As the project grows, these properties are architectural constraints:
605
+
606
+ - one Runtime and one canonical Execution lifecycle;
607
+ - local-first progressive complexity;
608
+ - Python application code instead of a mandatory workflow DSL;
609
+ - explicit authority for effects;
610
+ - AI as a participant, not an ambient superuser;
611
+ - replaceable infrastructure behind contracts;
612
+ - topology changes without rewriting business semantics;
613
+ - observable lineage from Intent → Execution → Effect → Observation;
614
+ - one semantic owner per concept.
615
+
616
+ ## Project status
617
+
618
+ Voodoo is **beta software**.
619
+
620
+ **v3.2.1** is the current published architecture baseline: Runtime adapters
621
+ converge on the published Voodoo Store 0.3 native surface, with the modern
622
+ Model contract, UUIDv7 identity, and the current Voodoo Design System component system.
623
+ The `main` branch may contain post-release documentation or implementation
624
+ work, so a merge to `main` is not itself a package release.
625
+
626
+ The next numbered development sprint is intentionally selected from real
627
+ product/architecture pressure rather than by accumulating unrelated framework
628
+ features.
629
+
630
+ ## Contributing
631
+
632
+ Read [CONTRIBUTING.md](CONTRIBUTING.md) and [AGENTS.md](AGENTS.md) before
633
+ structural changes. Repository architecture is enforced by tests, including
634
+ rules that prevent removed 2.x compatibility namespaces from returning.
635
+
636
+ Security issues should follow [SECURITY.md](SECURITY.md). Community behavior is
637
+ covered by [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
638
+
639
+ ## License
640
+
641
+ MIT. See [LICENSE](LICENSE).