cemaf 0.1.0__tar.gz

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 (258) hide show
  1. cemaf-0.1.0/.gitignore +85 -0
  2. cemaf-0.1.0/LICENSE +21 -0
  3. cemaf-0.1.0/PKG-INFO +371 -0
  4. cemaf-0.1.0/README.md +312 -0
  5. cemaf-0.1.0/docs/README.md +97 -0
  6. cemaf-0.1.0/docs/agents.md +74 -0
  7. cemaf-0.1.0/docs/architecture.md +139 -0
  8. cemaf-0.1.0/docs/cache.md +83 -0
  9. cemaf-0.1.0/docs/config.md +67 -0
  10. cemaf-0.1.0/docs/context.md +367 -0
  11. cemaf-0.1.0/docs/context_algorithms.md +635 -0
  12. cemaf-0.1.0/docs/core.md +158 -0
  13. cemaf-0.1.0/docs/env_configuration.md +195 -0
  14. cemaf-0.1.0/docs/evals.md +79 -0
  15. cemaf-0.1.0/docs/events.md +70 -0
  16. cemaf-0.1.0/docs/generation.md +86 -0
  17. cemaf-0.1.0/docs/index.md +190 -0
  18. cemaf-0.1.0/docs/ingestion.md +374 -0
  19. cemaf-0.1.0/docs/integration.md +403 -0
  20. cemaf-0.1.0/docs/llm.md +104 -0
  21. cemaf-0.1.0/docs/memory.md +113 -0
  22. cemaf-0.1.0/docs/module_reference.md +716 -0
  23. cemaf-0.1.0/docs/observability.md +72 -0
  24. cemaf-0.1.0/docs/offline.md +378 -0
  25. cemaf-0.1.0/docs/orchestration.md +188 -0
  26. cemaf-0.1.0/docs/persistence.md +77 -0
  27. cemaf-0.1.0/docs/quickstart.md +142 -0
  28. cemaf-0.1.0/docs/replay.md +359 -0
  29. cemaf-0.1.0/docs/resilience.md +102 -0
  30. cemaf-0.1.0/docs/scheduler.md +74 -0
  31. cemaf-0.1.0/docs/skills.md +72 -0
  32. cemaf-0.1.0/docs/streaming.md +83 -0
  33. cemaf-0.1.0/docs/sync.md +417 -0
  34. cemaf-0.1.0/docs/throttling.md +382 -0
  35. cemaf-0.1.0/docs/tools.md +145 -0
  36. cemaf-0.1.0/docs/validation.md +66 -0
  37. cemaf-0.1.0/docs/vector_store_config.md +178 -0
  38. cemaf-0.1.0/pyproject.toml +184 -0
  39. cemaf-0.1.0/src/cemaf/__init__.py +34 -0
  40. cemaf-0.1.0/src/cemaf/agents/__init__.py +63 -0
  41. cemaf-0.1.0/src/cemaf/agents/base.py +191 -0
  42. cemaf-0.1.0/src/cemaf/agents/factories.py +141 -0
  43. cemaf-0.1.0/src/cemaf/agents/protocols.py +220 -0
  44. cemaf-0.1.0/src/cemaf/blueprint/__init__.py +31 -0
  45. cemaf-0.1.0/src/cemaf/blueprint/builder.py +260 -0
  46. cemaf-0.1.0/src/cemaf/blueprint/factories.py +109 -0
  47. cemaf-0.1.0/src/cemaf/blueprint/mock.py +38 -0
  48. cemaf-0.1.0/src/cemaf/blueprint/protocols.py +113 -0
  49. cemaf-0.1.0/src/cemaf/blueprint/rules.py +264 -0
  50. cemaf-0.1.0/src/cemaf/blueprint/schema.py +188 -0
  51. cemaf-0.1.0/src/cemaf/cache/__init__.py +52 -0
  52. cemaf-0.1.0/src/cemaf/cache/decorators.py +153 -0
  53. cemaf-0.1.0/src/cemaf/cache/factories.py +116 -0
  54. cemaf-0.1.0/src/cemaf/cache/mock.py +140 -0
  55. cemaf-0.1.0/src/cemaf/cache/protocols.py +154 -0
  56. cemaf-0.1.0/src/cemaf/cache/stores.py +101 -0
  57. cemaf-0.1.0/src/cemaf/citation/__init__.py +34 -0
  58. cemaf-0.1.0/src/cemaf/citation/factories.py +121 -0
  59. cemaf-0.1.0/src/cemaf/citation/mock.py +44 -0
  60. cemaf-0.1.0/src/cemaf/citation/models.py +244 -0
  61. cemaf-0.1.0/src/cemaf/citation/protocols.py +116 -0
  62. cemaf-0.1.0/src/cemaf/citation/rules.py +211 -0
  63. cemaf-0.1.0/src/cemaf/citation/tracker.py +206 -0
  64. cemaf-0.1.0/src/cemaf/config/__init__.py +31 -0
  65. cemaf-0.1.0/src/cemaf/config/factories.py +66 -0
  66. cemaf-0.1.0/src/cemaf/config/loader.py +217 -0
  67. cemaf-0.1.0/src/cemaf/config/mock.py +86 -0
  68. cemaf-0.1.0/src/cemaf/config/protocols.py +423 -0
  69. cemaf-0.1.0/src/cemaf/context/__init__.py +81 -0
  70. cemaf-0.1.0/src/cemaf/context/advanced_compiler.py +278 -0
  71. cemaf-0.1.0/src/cemaf/context/algorithm.py +350 -0
  72. cemaf-0.1.0/src/cemaf/context/budget.py +94 -0
  73. cemaf-0.1.0/src/cemaf/context/compiler.py +262 -0
  74. cemaf-0.1.0/src/cemaf/context/context.py +286 -0
  75. cemaf-0.1.0/src/cemaf/context/factories.py +271 -0
  76. cemaf-0.1.0/src/cemaf/context/merge.py +553 -0
  77. cemaf-0.1.0/src/cemaf/context/patch.py +353 -0
  78. cemaf-0.1.0/src/cemaf/context/paths.py +266 -0
  79. cemaf-0.1.0/src/cemaf/context/protocols.py +137 -0
  80. cemaf-0.1.0/src/cemaf/context/source.py +390 -0
  81. cemaf-0.1.0/src/cemaf/core/__init__.py +63 -0
  82. cemaf-0.1.0/src/cemaf/core/constants.py +67 -0
  83. cemaf-0.1.0/src/cemaf/core/enums.py +72 -0
  84. cemaf-0.1.0/src/cemaf/core/execution.py +393 -0
  85. cemaf-0.1.0/src/cemaf/core/registry.py +429 -0
  86. cemaf-0.1.0/src/cemaf/core/result.py +123 -0
  87. cemaf-0.1.0/src/cemaf/core/storage.py +203 -0
  88. cemaf-0.1.0/src/cemaf/core/types.py +24 -0
  89. cemaf-0.1.0/src/cemaf/core/utils.py +106 -0
  90. cemaf-0.1.0/src/cemaf/evals/__init__.py +48 -0
  91. cemaf-0.1.0/src/cemaf/evals/composite.py +297 -0
  92. cemaf-0.1.0/src/cemaf/evals/evaluators.py +351 -0
  93. cemaf-0.1.0/src/cemaf/evals/factories.py +119 -0
  94. cemaf-0.1.0/src/cemaf/evals/llm_judge.py +215 -0
  95. cemaf-0.1.0/src/cemaf/evals/protocols.py +233 -0
  96. cemaf-0.1.0/src/cemaf/evals/semantic.py +166 -0
  97. cemaf-0.1.0/src/cemaf/events/__init__.py +45 -0
  98. cemaf-0.1.0/src/cemaf/events/bus.py +96 -0
  99. cemaf-0.1.0/src/cemaf/events/factories.py +65 -0
  100. cemaf-0.1.0/src/cemaf/events/mock.py +177 -0
  101. cemaf-0.1.0/src/cemaf/events/notifiers.py +207 -0
  102. cemaf-0.1.0/src/cemaf/events/protocols.py +271 -0
  103. cemaf-0.1.0/src/cemaf/generation/__init__.py +49 -0
  104. cemaf-0.1.0/src/cemaf/generation/factories.py +219 -0
  105. cemaf-0.1.0/src/cemaf/generation/mock.py +350 -0
  106. cemaf-0.1.0/src/cemaf/generation/protocols.py +545 -0
  107. cemaf-0.1.0/src/cemaf/ingestion/__init__.py +47 -0
  108. cemaf-0.1.0/src/cemaf/ingestion/adapters.py +413 -0
  109. cemaf-0.1.0/src/cemaf/ingestion/factories.py +195 -0
  110. cemaf-0.1.0/src/cemaf/ingestion/protocols.py +155 -0
  111. cemaf-0.1.0/src/cemaf/llm/__init__.py +65 -0
  112. cemaf-0.1.0/src/cemaf/llm/factories.py +132 -0
  113. cemaf-0.1.0/src/cemaf/llm/mock.py +147 -0
  114. cemaf-0.1.0/src/cemaf/llm/protocols.py +360 -0
  115. cemaf-0.1.0/src/cemaf/llm/response_utils.py +376 -0
  116. cemaf-0.1.0/src/cemaf/llm/tiktoken_estimator.py +136 -0
  117. cemaf-0.1.0/src/cemaf/mcp/__init__.py +54 -0
  118. cemaf-0.1.0/src/cemaf/mcp/adapter.py +766 -0
  119. cemaf-0.1.0/src/cemaf/mcp/bridges/__init__.py +7 -0
  120. cemaf-0.1.0/src/cemaf/mcp/bridges/prompt_bridge.py +87 -0
  121. cemaf-0.1.0/src/cemaf/mcp/bridges/resource_bridge.py +69 -0
  122. cemaf-0.1.0/src/cemaf/mcp/bridges/tool_bridge.py +59 -0
  123. cemaf-0.1.0/src/cemaf/mcp/factories.py +71 -0
  124. cemaf-0.1.0/src/cemaf/mcp/mock.py +82 -0
  125. cemaf-0.1.0/src/cemaf/mcp/protocols.py +404 -0
  126. cemaf-0.1.0/src/cemaf/mcp/transport/__init__.py +8 -0
  127. cemaf-0.1.0/src/cemaf/mcp/transport/base.py +60 -0
  128. cemaf-0.1.0/src/cemaf/mcp/transport/sse.py +60 -0
  129. cemaf-0.1.0/src/cemaf/mcp/transport/stdio.py +52 -0
  130. cemaf-0.1.0/src/cemaf/mcp/transport/websocket.py +44 -0
  131. cemaf-0.1.0/src/cemaf/mcp/types.py +138 -0
  132. cemaf-0.1.0/src/cemaf/memory/__init__.py +69 -0
  133. cemaf-0.1.0/src/cemaf/memory/base.py +272 -0
  134. cemaf-0.1.0/src/cemaf/memory/factories.py +130 -0
  135. cemaf-0.1.0/src/cemaf/memory/protocols.py +237 -0
  136. cemaf-0.1.0/src/cemaf/moderation/__init__.py +62 -0
  137. cemaf-0.1.0/src/cemaf/moderation/factories.py +65 -0
  138. cemaf-0.1.0/src/cemaf/moderation/gates.py +407 -0
  139. cemaf-0.1.0/src/cemaf/moderation/mock.py +519 -0
  140. cemaf-0.1.0/src/cemaf/moderation/pipeline.py +397 -0
  141. cemaf-0.1.0/src/cemaf/moderation/protocols.py +181 -0
  142. cemaf-0.1.0/src/cemaf/moderation/rules.py +443 -0
  143. cemaf-0.1.0/src/cemaf/observability/__init__.py +38 -0
  144. cemaf-0.1.0/src/cemaf/observability/factories.py +226 -0
  145. cemaf-0.1.0/src/cemaf/observability/protocols.py +93 -0
  146. cemaf-0.1.0/src/cemaf/observability/run_logger.py +406 -0
  147. cemaf-0.1.0/src/cemaf/observability/simple.py +116 -0
  148. cemaf-0.1.0/src/cemaf/orchestration/__init__.py +24 -0
  149. cemaf-0.1.0/src/cemaf/orchestration/checkpointer.py +289 -0
  150. cemaf-0.1.0/src/cemaf/orchestration/dag.py +552 -0
  151. cemaf-0.1.0/src/cemaf/orchestration/deep_agent.py +412 -0
  152. cemaf-0.1.0/src/cemaf/orchestration/executor.py +723 -0
  153. cemaf-0.1.0/src/cemaf/orchestration/factories.py +112 -0
  154. cemaf-0.1.0/src/cemaf/orchestration/protocols.py +141 -0
  155. cemaf-0.1.0/src/cemaf/persistence/__init__.py +38 -0
  156. cemaf-0.1.0/src/cemaf/persistence/entities.py +149 -0
  157. cemaf-0.1.0/src/cemaf/persistence/factories.py +190 -0
  158. cemaf-0.1.0/src/cemaf/persistence/protocols.py +151 -0
  159. cemaf-0.1.0/src/cemaf/replay/__init__.py +15 -0
  160. cemaf-0.1.0/src/cemaf/replay/factories.py +51 -0
  161. cemaf-0.1.0/src/cemaf/replay/protocols.py +44 -0
  162. cemaf-0.1.0/src/cemaf/replay/replayer.py +317 -0
  163. cemaf-0.1.0/src/cemaf/resilience/__init__.py +97 -0
  164. cemaf-0.1.0/src/cemaf/resilience/circuit_breaker.py +227 -0
  165. cemaf-0.1.0/src/cemaf/resilience/decorators.py +163 -0
  166. cemaf-0.1.0/src/cemaf/resilience/factories.py +188 -0
  167. cemaf-0.1.0/src/cemaf/resilience/protocols.py +269 -0
  168. cemaf-0.1.0/src/cemaf/resilience/rate_limiter.py +173 -0
  169. cemaf-0.1.0/src/cemaf/resilience/retry.py +197 -0
  170. cemaf-0.1.0/src/cemaf/retrieval/__init__.py +51 -0
  171. cemaf-0.1.0/src/cemaf/retrieval/factories.py +205 -0
  172. cemaf-0.1.0/src/cemaf/retrieval/hybrid.py +171 -0
  173. cemaf-0.1.0/src/cemaf/retrieval/memory_store.py +169 -0
  174. cemaf-0.1.0/src/cemaf/retrieval/protocols.py +231 -0
  175. cemaf-0.1.0/src/cemaf/scheduler/__init__.py +41 -0
  176. cemaf-0.1.0/src/cemaf/scheduler/executor.py +198 -0
  177. cemaf-0.1.0/src/cemaf/scheduler/factories.py +65 -0
  178. cemaf-0.1.0/src/cemaf/scheduler/mock.py +145 -0
  179. cemaf-0.1.0/src/cemaf/scheduler/protocols.py +208 -0
  180. cemaf-0.1.0/src/cemaf/scheduler/triggers.py +283 -0
  181. cemaf-0.1.0/src/cemaf/skills/__init__.py +65 -0
  182. cemaf-0.1.0/src/cemaf/skills/base.py +149 -0
  183. cemaf-0.1.0/src/cemaf/skills/factories.py +114 -0
  184. cemaf-0.1.0/src/cemaf/skills/protocols.py +248 -0
  185. cemaf-0.1.0/src/cemaf/skills/registry.py +114 -0
  186. cemaf-0.1.0/src/cemaf/streaming/__init__.py +24 -0
  187. cemaf-0.1.0/src/cemaf/streaming/factories.py +65 -0
  188. cemaf-0.1.0/src/cemaf/streaming/protocols.py +239 -0
  189. cemaf-0.1.0/src/cemaf/streaming/sse.py +96 -0
  190. cemaf-0.1.0/src/cemaf/tools/__init__.py +71 -0
  191. cemaf-0.1.0/src/cemaf/tools/base.py +229 -0
  192. cemaf-0.1.0/src/cemaf/tools/factories.py +128 -0
  193. cemaf-0.1.0/src/cemaf/tools/protocols.py +275 -0
  194. cemaf-0.1.0/src/cemaf/tools/registry.py +156 -0
  195. cemaf-0.1.0/src/cemaf/validation/__init__.py +48 -0
  196. cemaf-0.1.0/src/cemaf/validation/factories.py +85 -0
  197. cemaf-0.1.0/src/cemaf/validation/mock.py +109 -0
  198. cemaf-0.1.0/src/cemaf/validation/pipeline.py +128 -0
  199. cemaf-0.1.0/src/cemaf/validation/protocols.py +160 -0
  200. cemaf-0.1.0/src/cemaf/validation/rules.py +324 -0
  201. cemaf-0.1.0/tests/__init__.py +1 -0
  202. cemaf-0.1.0/tests/conftest.py +728 -0
  203. cemaf-0.1.0/tests/integration/__init__.py +1 -0
  204. cemaf-0.1.0/tests/integration/test_dag_execution.py +693 -0
  205. cemaf-0.1.0/tests/unit/__init__.py +1 -0
  206. cemaf-0.1.0/tests/unit/blueprint/__init__.py +1 -0
  207. cemaf-0.1.0/tests/unit/blueprint/test_blueprint.py +792 -0
  208. cemaf-0.1.0/tests/unit/cache/__init__.py +1 -0
  209. cemaf-0.1.0/tests/unit/cache/test_cache.py +410 -0
  210. cemaf-0.1.0/tests/unit/citation/__init__.py +1 -0
  211. cemaf-0.1.0/tests/unit/citation/test_citation.py +869 -0
  212. cemaf-0.1.0/tests/unit/config/__init__.py +1 -0
  213. cemaf-0.1.0/tests/unit/config/test_config.py +268 -0
  214. cemaf-0.1.0/tests/unit/context/test_paths.py +356 -0
  215. cemaf-0.1.0/tests/unit/context/test_source.py +443 -0
  216. cemaf-0.1.0/tests/unit/evals/__init__.py +1 -0
  217. cemaf-0.1.0/tests/unit/evals/test_evaluators.py +238 -0
  218. cemaf-0.1.0/tests/unit/events/__init__.py +1 -0
  219. cemaf-0.1.0/tests/unit/events/test_events.py +446 -0
  220. cemaf-0.1.0/tests/unit/generation/__init__.py +0 -0
  221. cemaf-0.1.0/tests/unit/generation/test_generation.py +436 -0
  222. cemaf-0.1.0/tests/unit/llm/__init__.py +1 -0
  223. cemaf-0.1.0/tests/unit/llm/test_mock.py +105 -0
  224. cemaf-0.1.0/tests/unit/llm/test_protocols.py +174 -0
  225. cemaf-0.1.0/tests/unit/llm/test_response_utils.py +399 -0
  226. cemaf-0.1.0/tests/unit/mcp/__init__.py +1 -0
  227. cemaf-0.1.0/tests/unit/mcp/test_mcp.py +861 -0
  228. cemaf-0.1.0/tests/unit/moderation/__init__.py +1 -0
  229. cemaf-0.1.0/tests/unit/moderation/test_moderation.py +1161 -0
  230. cemaf-0.1.0/tests/unit/resilience/__init__.py +1 -0
  231. cemaf-0.1.0/tests/unit/resilience/test_circuit_breaker.py +159 -0
  232. cemaf-0.1.0/tests/unit/resilience/test_retry.py +137 -0
  233. cemaf-0.1.0/tests/unit/retrieval/__init__.py +1 -0
  234. cemaf-0.1.0/tests/unit/retrieval/test_vector_store.py +186 -0
  235. cemaf-0.1.0/tests/unit/scheduler/__init__.py +1 -0
  236. cemaf-0.1.0/tests/unit/scheduler/test_scheduler.py +491 -0
  237. cemaf-0.1.0/tests/unit/skills/test_skill_registry.py +426 -0
  238. cemaf-0.1.0/tests/unit/streaming/__init__.py +1 -0
  239. cemaf-0.1.0/tests/unit/streaming/test_streaming.py +174 -0
  240. cemaf-0.1.0/tests/unit/test_advanced_compiler.py +215 -0
  241. cemaf-0.1.0/tests/unit/test_checkpointer.py +140 -0
  242. cemaf-0.1.0/tests/unit/test_context_compiler.py +186 -0
  243. cemaf-0.1.0/tests/unit/test_context_patch.py +339 -0
  244. cemaf-0.1.0/tests/unit/test_dag.py +434 -0
  245. cemaf-0.1.0/tests/unit/test_deep_agent.py +317 -0
  246. cemaf-0.1.0/tests/unit/test_entities.py +178 -0
  247. cemaf-0.1.0/tests/unit/test_execution.py +288 -0
  248. cemaf-0.1.0/tests/unit/test_ingestion.py +395 -0
  249. cemaf-0.1.0/tests/unit/test_memory.py +185 -0
  250. cemaf-0.1.0/tests/unit/test_memory_enhanced.py +390 -0
  251. cemaf-0.1.0/tests/unit/test_merge_strategy.py +518 -0
  252. cemaf-0.1.0/tests/unit/test_replay.py +194 -0
  253. cemaf-0.1.0/tests/unit/test_retrieval_example.py.skip +163 -0
  254. cemaf-0.1.0/tests/unit/test_run_logger.py +289 -0
  255. cemaf-0.1.0/tests/unit/test_tools.py +195 -0
  256. cemaf-0.1.0/tests/unit/tools/test_tool_registry.py +459 -0
  257. cemaf-0.1.0/tests/unit/validation/__init__.py +1 -0
  258. cemaf-0.1.0/tests/unit/validation/test_validation.py +462 -0
cemaf-0.1.0/.gitignore ADDED
@@ -0,0 +1,85 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+
27
+ # PyInstaller
28
+ *.manifest
29
+ *.spec
30
+
31
+ # Installer logs
32
+ pip-log.txt
33
+ pip-delete-this-directory.txt
34
+
35
+ # Unit test / coverage reports
36
+ htmlcov/
37
+ .tox/
38
+ .nox/
39
+ .coverage
40
+ .coverage.*
41
+ .cache
42
+ nosetests.xml
43
+ coverage.xml
44
+ *.cover
45
+ *.py,cover
46
+ .hypothesis/
47
+ .pytest_cache/
48
+
49
+ # Translations
50
+ *.mo
51
+ *.pot
52
+
53
+ # Environments
54
+ .env
55
+ .venv
56
+ env/
57
+ venv/
58
+ ENV/
59
+ env.bak/
60
+ venv.bak/
61
+
62
+ # IDE
63
+ .idea/
64
+ .vscode/
65
+ *.swp
66
+ *.swo
67
+ *~
68
+
69
+ # mypy
70
+ .mypy_cache/
71
+ .dmypy.json
72
+ dmypy.json
73
+
74
+ # Ruff
75
+ .ruff_cache/
76
+
77
+ # Local development
78
+ .DS_Store
79
+ Thumbs.db
80
+ *.log
81
+
82
+ # Project-specific
83
+ setup/
84
+ examples/
85
+ .claude/
cemaf-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 @drchinca | Hikuri Bado Chinca
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
cemaf-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,371 @@
1
+ Metadata-Version: 2.4
2
+ Name: cemaf
3
+ Version: 0.1.0
4
+ Summary: Context Engineering Multi-Agent Framework - A pluggable, modular framework for building AI agent systems
5
+ Project-URL: Homepage, https://github.com/drchinca/cemaf
6
+ Project-URL: Documentation, https://github.com/drchinca/cemaf/blob/main/docs/README.md
7
+ Project-URL: Repository, https://github.com/drchinca/cemaf
8
+ Project-URL: Bug Tracker, https://github.com/drchinca/cemaf/issues
9
+ Project-URL: Discussions, https://github.com/drchinca/cemaf/discussions
10
+ Project-URL: Discord Community, https://discord.gg/C8ZXAbD8
11
+ Project-URL: Changelog, https://github.com/drchinca/cemaf/blob/main/CHANGELOG.md
12
+ Project-URL: Source Code, https://github.com/drchinca/cemaf
13
+ Author-email: Hikuri Bado Chinca <chincadr@gmail.com>
14
+ License: MIT
15
+ License-File: LICENSE
16
+ Keywords: agents,ai,autogen,context-engineering,context-management,crewai,dag,framework-agnostic,langchain,langgraph,llm,multi-agent,orchestration,provenance,replay,token-budgeting
17
+ Classifier: Development Status :: 3 - Alpha
18
+ Classifier: Framework :: AsyncIO
19
+ Classifier: Intended Audience :: Developers
20
+ Classifier: Intended Audience :: Science/Research
21
+ Classifier: License :: OSI Approved :: MIT License
22
+ Classifier: Operating System :: OS Independent
23
+ Classifier: Programming Language :: Python :: 3
24
+ Classifier: Programming Language :: Python :: 3 :: Only
25
+ Classifier: Programming Language :: Python :: 3.14
26
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
27
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
28
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
29
+ Classifier: Typing :: Typed
30
+ Requires-Python: >=3.14
31
+ Requires-Dist: pydantic>=2.0
32
+ Requires-Dist: typing-extensions>=4.9
33
+ Provides-Extra: all
34
+ Requires-Dist: anthropic>=0.20; extra == 'all'
35
+ Requires-Dist: openai>=1.0; extra == 'all'
36
+ Requires-Dist: tiktoken>=0.5; extra == 'all'
37
+ Provides-Extra: anthropic
38
+ Requires-Dist: anthropic>=0.20; extra == 'anthropic'
39
+ Provides-Extra: dev
40
+ Requires-Dist: bandit[toml]>=1.7; extra == 'dev'
41
+ Requires-Dist: mypy>=1.8; extra == 'dev'
42
+ Requires-Dist: pre-commit>=4.0; extra == 'dev'
43
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
44
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
45
+ Requires-Dist: pytest>=8.0; extra == 'dev'
46
+ Requires-Dist: ruff>=0.3; extra == 'dev'
47
+ Provides-Extra: openai
48
+ Requires-Dist: openai>=1.0; extra == 'openai'
49
+ Requires-Dist: tiktoken>=0.5; extra == 'openai'
50
+ Provides-Extra: pinecone
51
+ Requires-Dist: pinecone-client>=3.0; extra == 'pinecone'
52
+ Provides-Extra: profiling
53
+ Requires-Dist: line-profiler>=4.2.0; extra == 'profiling'
54
+ Requires-Dist: memory-profiler>=0.61.0; extra == 'profiling'
55
+ Requires-Dist: pytest-benchmark>=5.1.0; extra == 'profiling'
56
+ Provides-Extra: tiktoken
57
+ Requires-Dist: tiktoken>=0.5; extra == 'tiktoken'
58
+ Description-Content-Type: text/markdown
59
+
60
+ # CEMAF
61
+
62
+ **Context Engineering Multi-Agent Framework**
63
+
64
+ [![Open Source](https://img.shields.io/badge/Open%20Source-%E2%9D%A4-red?style=flat-square)](https://opensource.org)
65
+ [![Project Status: Alpha](https://img.shields.io/badge/Status-Alpha-yellow?style=flat-square)](https://github.com/drchinca/cemaf)
66
+ [![Discord](https://img.shields.io/badge/Discord-Join_Community-5865F2?style=flat-square&logo=discord&logoColor=white)](https://discord.gg/C8ZXAbD8)
67
+ [![Python](https://img.shields.io/badge/Python-3.14+-3776AB?style=flat-square&logo=python&logoColor=white)](https://www.python.org/downloads/)
68
+ [![License](https://img.shields.io/badge/License-MIT-green?style=flat-square)](https://opensource.org/licenses/MIT)
69
+ [![Tests](https://img.shields.io/badge/Tests-814_Passing-success?style=flat-square&logo=pytest&logoColor=white)](.)
70
+ [![Coverage](https://img.shields.io/badge/Coverage-100%25-success?style=flat-square)](.)
71
+ [![Ruff](https://img.shields.io/badge/Code_Style-Ruff-FCC21B?style=flat-square&logo=ruff&logoColor=black)](https://github.com/astral-sh/ruff)
72
+ [![MyPy](https://img.shields.io/badge/Typed-MyPy-blue?style=flat-square)](http://mypy-lang.org/)
73
+ [![Stars](https://img.shields.io/github/stars/drchinca/cemaf?style=flat-square&logo=github)](https://github.com/drchinca/cemaf)
74
+ [![Issues](https://img.shields.io/github/issues/drchinca/cemaf?style=flat-square&logo=github)](https://github.com/drchinca/cemaf/issues)
75
+
76
+ **Open source** context engineering infrastructure that solves the hard problems in AI agent systems. CEMAF can be used standalone or plugged into existing frameworks like LangGraph, AutoGen, and CrewAI.
77
+
78
+ ---
79
+
80
+ ## Table of Contents
81
+
82
+ - [Overview](#overview)
83
+ - [The Hard Problems We Solve](#the-hard-problems-we-solve)
84
+ - [Installation](#installation)
85
+ - [Quick Start](#quick-start)
86
+ - [Integration Modes](#integration-modes)
87
+ - [Key Features](#key-features)
88
+ - [Documentation](#documentation)
89
+ - [Configuration](#configuration)
90
+ - [Testing](#testing)
91
+ - [Contributing](#contributing)
92
+ - [Getting Help](#getting-help)
93
+ - [License](#license)
94
+
95
+ ---
96
+
97
+ ## Overview
98
+
99
+ CEMAF is a protocol-first framework designed for **context engineering** in multi-agent AI systems. It provides:
100
+
101
+ - Token budgeting and automatic context optimization
102
+ - Deterministic run recording and replay capabilities
103
+ - Full provenance tracking for every context change
104
+ - Memory management with strict scoping and TTL
105
+ - Zero-config defaults with environment-based customization
106
+
107
+ **Philosophy**: Own the hard infrastructure problems while remaining framework-agnostic.
108
+
109
+ ---
110
+
111
+ ## The Hard Problems We Solve
112
+
113
+ | Problem | What Happens | CEMAF Solution |
114
+ |---------|--------------|----------------|
115
+ | **Context Growth** | Token limits blow up | Token budgeting + automatic summarization |
116
+ | **Reliability** | Non-deterministic behavior | Patch-based provenance tracking |
117
+ | **Cost** | Wasteful token usage | Smart context compilation |
118
+ | **Reproducibility** | Can't replay/debug runs | Run recording + deterministic replay |
119
+ | **Memory Leaks** | State bleeds between scopes | Strict memory boundaries with TTL |
120
+
121
+ ---
122
+
123
+ ## Installation
124
+
125
+ ```bash
126
+ # Core installation (minimal dependencies)
127
+ pip install cemaf
128
+
129
+ # With optional integrations
130
+ pip install "cemaf[openai]" # OpenAI + tiktoken
131
+ pip install "cemaf[anthropic]" # Anthropic
132
+ pip install "cemaf[tiktoken]" # Accurate token counting only
133
+ pip install "cemaf[all]" # All optional dependencies
134
+
135
+ # Development installation
136
+ git clone https://github.com/drchinca/cemaf.git
137
+ cd cemaf
138
+ pip install -e ".[dev]"
139
+ ```
140
+
141
+ **Requirements**: Python 3.14+
142
+
143
+ ---
144
+
145
+ ## Quick Start
146
+
147
+ ```python
148
+ from cemaf.context import Context, ContextPatch
149
+ from cemaf.observability import InMemoryRunLogger
150
+ from cemaf.replay import Replayer
151
+
152
+ # Create context with provenance tracking
153
+ ctx = Context()
154
+ patch = ContextPatch.from_tool("search", "results", {"items": [...]})
155
+ ctx = ctx.apply(patch)
156
+
157
+ # Record runs for replay
158
+ logger = InMemoryRunLogger()
159
+ logger.start_run("run-123", initial_context=ctx)
160
+ logger.record_patch(patch)
161
+ record = logger.end_run(final_context=ctx)
162
+
163
+ # Replay deterministically
164
+ replayer = Replayer(record)
165
+ result = await replayer.replay()
166
+ assert result.final_context == record.final_context # Deterministic!
167
+ ```
168
+
169
+ See the [Quick Start Guide](docs/quickstart.md) for more detailed examples.
170
+
171
+ ---
172
+
173
+ ## Integration Modes
174
+
175
+ ### Mode A: CEMAF Orchestrates
176
+
177
+ CEMAF owns execution, external frameworks are "engines":
178
+
179
+ ```python
180
+ from cemaf.orchestration import DAGExecutor
181
+ from cemaf.observability import InMemoryRunLogger
182
+
183
+ executor = DAGExecutor(
184
+ node_executor=LangGraphNodeExecutor(langgraph_app),
185
+ run_logger=InMemoryRunLogger(),
186
+ )
187
+ result = await executor.run(dag, context)
188
+
189
+ # Replay later for debugging
190
+ replayer = Replayer(run_logger.get_record("run-123"))
191
+ await replayer.replay()
192
+ ```
193
+
194
+ ### Mode B: CEMAF as Library
195
+
196
+ External frameworks orchestrate, CEMAF provides infrastructure:
197
+
198
+ ```python
199
+ from cemaf.context import Context, ContextPatch
200
+ from cemaf.observability import InMemoryRunLogger
201
+
202
+ @langgraph_node
203
+ def my_node(state):
204
+ ctx = Context.from_dict(state)
205
+
206
+ # Track provenance of every change
207
+ patch = ContextPatch.from_tool("search", "results", search_results)
208
+ ctx = ctx.apply(patch)
209
+ run_logger.record_patch(patch)
210
+
211
+ # Compile within budget
212
+ compiled = compiler.compile(ctx, budget)
213
+ return compiled.to_dict()
214
+ ```
215
+
216
+ See the [Integration Guide](docs/integration.md) for detailed patterns.
217
+
218
+ ---
219
+
220
+ ## Key Features
221
+
222
+ - **📍 Context Patches**: Track every context change with full provenance
223
+ - **🔄 Deterministic Replay**: Record and replay runs for debugging
224
+ - **💾 Token Budgeting**: Stay within limits with smart compilation
225
+ - **⏱️ TTL & Cleanup**: Memory items expire automatically
226
+ - **🔒 Memory Boundaries**: Strict scoping prevents state leaks
227
+ - **⚡ Cancellation**: Cooperative cancellation with timeouts
228
+ - **🔧 Protocol-Based**: Plug into any framework
229
+ - **⚙️ Configuration-Driven**: Zero-config defaults with .env customization
230
+
231
+ ---
232
+
233
+ ## Documentation
234
+
235
+ **[Full Documentation →](docs/README.md)**
236
+
237
+ Core Guides:
238
+ - [Architecture Overview](docs/architecture.md)
239
+ - [Context Management](docs/context.md) - Patches, provenance, budgeting
240
+ - [Replay & Recording](docs/replay.md) - Deterministic replay
241
+ - [Tools, Skills, Agents](docs/tools.md)
242
+
243
+ Module References:
244
+ - [LLM Integration](docs/llm.md)
245
+ - [Caching](docs/cache.md)
246
+ - [Persistence](docs/persistence.md)
247
+ - [Observability](docs/observability.md)
248
+
249
+ ---
250
+
251
+ ## Configuration
252
+
253
+ CEMAF is designed for zero-config startup with production-ready defaults. Customize via environment variables:
254
+
255
+ ```bash
256
+ # Copy example configuration
257
+ cp .env.example .env
258
+
259
+ # Configure your setup
260
+ CEMAF_LLM_PROVIDER=openai
261
+ CEMAF_LLM_API_KEY=your-key
262
+ CEMAF_CACHE_BACKEND=redis
263
+ CEMAF_CACHE_MAX_SIZE=10000
264
+ ```
265
+
266
+ Use factory functions for automatic configuration loading:
267
+
268
+ ```python
269
+ from cemaf.llm import create_llm_client_from_config
270
+ from cemaf.cache import create_cache_from_config
271
+
272
+ # Automatically loads from .env or environment
273
+ client = create_llm_client_from_config()
274
+ cache = create_cache_from_config()
275
+ ```
276
+
277
+ See the [Configuration Guide](docs/config.md) for all available settings.
278
+
279
+ ---
280
+
281
+ ## Testing
282
+
283
+ ```bash
284
+ # Run all tests
285
+ pytest tests/
286
+
287
+ # Unit tests only
288
+ pytest tests/unit/
289
+
290
+ # Skip slow tests
291
+ pytest tests/ -m "not slow"
292
+
293
+ # With coverage
294
+ pytest tests/ --cov=cemaf
295
+
296
+ # Pre-commit checks
297
+ pre-commit run --all-files
298
+ ```
299
+
300
+ **Project Stats**: 814 tests | 100% passing | TDD from day one
301
+
302
+ ---
303
+
304
+ ## Contributing
305
+
306
+ We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
307
+
308
+ Development setup:
309
+
310
+ ```bash
311
+ # Fork and clone the repo
312
+ git clone https://github.com/YOUR_USERNAME/cemaf.git
313
+ cd cemaf
314
+
315
+ # Install dependencies with uv
316
+ uv venv
317
+ uv sync
318
+
319
+ # Install pre-commit hooks
320
+ uv run pre-commit install
321
+ ```
322
+
323
+ See [HOW_TO_USE.md](HOW_TO_USE.md) for detailed usage examples.
324
+
325
+ ---
326
+
327
+ ## Getting Help
328
+
329
+ We're here to help! Here are the best ways to get support:
330
+
331
+ ### Documentation
332
+
333
+ - [Full Documentation](docs/README.md) - Comprehensive guides for all features
334
+ - [Quick Start Guide](docs/quickstart.md) - Get started in minutes
335
+ - [HOW_TO_USE.md](HOW_TO_USE.md) - Detailed usage patterns
336
+ - [Architecture Guide](docs/architecture.md) - Understand CEMAF's design
337
+
338
+ ### Community
339
+
340
+ - [Discord Server](https://discord.gg/C8ZXAbD8) - Join our community for real-time help
341
+ - [GitHub Discussions](https://github.com/drchinca/cemaf/discussions) - Ask questions and share ideas
342
+ - [GitHub Issues](https://github.com/drchinca/cemaf/issues) - Report bugs or request features
343
+
344
+ ### Contributing
345
+
346
+ Want to contribute? Check out our [Contributing Guide](CONTRIBUTING.md) to get started!
347
+
348
+ We're in **Alpha** and actively seeking feedback!
349
+
350
+ ---
351
+
352
+ ## License
353
+
354
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
355
+
356
+ ---
357
+
358
+ ## Authors
359
+
360
+ **Hikuri Bado Chinca** ([@drchinca](https://github.com/drchinca))
361
+ Email: chincadr@gmail.com
362
+
363
+ Copyright (c) 2026 | Published on 1.1.2026 🎉
364
+
365
+ ---
366
+
367
+ ## Links
368
+
369
+ - **Documentation**: [docs/README.md](docs/README.md)
370
+ - **Issues**: [GitHub Issues](https://github.com/drchinca/cemaf/issues)
371
+ - **Contributing**: [CONTRIBUTING.md](CONTRIBUTING.md)