yarvelle-core 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 (348) hide show
  1. yarvelle_core-0.1.0/.gitignore +63 -0
  2. yarvelle_core-0.1.0/PKG-INFO +106 -0
  3. yarvelle_core-0.1.0/README.md +51 -0
  4. yarvelle_core-0.1.0/hatch_build.py +43 -0
  5. yarvelle_core-0.1.0/pyproject.toml +111 -0
  6. yarvelle_core-0.1.0/src/yarvelle_core/__init__.py +60 -0
  7. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_system/document-extractor/README.md +14 -0
  8. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_system/document-extractor/agent.yaml +27 -0
  9. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_system/document-extractor/persona.md +12 -0
  10. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_system/document-extractor/starters.json +6 -0
  11. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_system/orchestrator/README.md +13 -0
  12. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_system/orchestrator/agent.yaml +24 -0
  13. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_system/orchestrator/persona.md +17 -0
  14. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_system/orchestrator/starters.json +6 -0
  15. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_system/skill-generator/README.md +10 -0
  16. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_system/skill-generator/agent.yaml +23 -0
  17. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_system/skill-generator/persona.md +16 -0
  18. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_system/skill-generator/starters.json +5 -0
  19. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_system/suggestion-generator/agent.yaml +22 -0
  20. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_system/suggestion-generator/persona.md +10 -0
  21. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_system/suggestion-generator/starters.json +5 -0
  22. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_template/README.md +29 -0
  23. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_template/agent.yaml +25 -0
  24. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_template/evals/golden.jsonl +5 -0
  25. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_template/metadata.yaml +38 -0
  26. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_template/persona.md +5 -0
  27. yarvelle_core-0.1.0/src/yarvelle_core/_content/agents/_template/starters.json +5 -0
  28. yarvelle_core-0.1.0/src/yarvelle_core/_content/schemas/agent.schema.json +301 -0
  29. yarvelle_core-0.1.0/src/yarvelle_core/_content/schemas/pack.schema.json +408 -0
  30. yarvelle_core-0.1.0/src/yarvelle_core/_content/schemas/skill.schema.json +264 -0
  31. yarvelle_core-0.1.0/src/yarvelle_core/_content/skills/_template/SKILL.md +70 -0
  32. yarvelle_core-0.1.0/src/yarvelle_core/_content/skills/_template/evals/golden.jsonl +5 -0
  33. yarvelle_core-0.1.0/src/yarvelle_core/_content/skills/_template/references/README.md +13 -0
  34. yarvelle_core-0.1.0/src/yarvelle_core/agents/__init__.py +16 -0
  35. yarvelle_core-0.1.0/src/yarvelle_core/agents/registry.py +284 -0
  36. yarvelle_core-0.1.0/src/yarvelle_core/api/__init__.py +16 -0
  37. yarvelle_core-0.1.0/src/yarvelle_core/api/admin.py +392 -0
  38. yarvelle_core-0.1.0/src/yarvelle_core/api/approvals.py +417 -0
  39. yarvelle_core-0.1.0/src/yarvelle_core/api/attachments.py +675 -0
  40. yarvelle_core-0.1.0/src/yarvelle_core/api/audit.py +212 -0
  41. yarvelle_core-0.1.0/src/yarvelle_core/api/auth.py +332 -0
  42. yarvelle_core-0.1.0/src/yarvelle_core/api/chat.py +369 -0
  43. yarvelle_core-0.1.0/src/yarvelle_core/api/connections.py +703 -0
  44. yarvelle_core-0.1.0/src/yarvelle_core/api/deps.py +160 -0
  45. yarvelle_core-0.1.0/src/yarvelle_core/api/email_drafts.py +385 -0
  46. yarvelle_core-0.1.0/src/yarvelle_core/api/health.py +133 -0
  47. yarvelle_core-0.1.0/src/yarvelle_core/api/i18n.py +134 -0
  48. yarvelle_core-0.1.0/src/yarvelle_core/api/me.py +267 -0
  49. yarvelle_core-0.1.0/src/yarvelle_core/api/memory.py +458 -0
  50. yarvelle_core-0.1.0/src/yarvelle_core/api/models.py +154 -0
  51. yarvelle_core-0.1.0/src/yarvelle_core/api/profiles.py +1381 -0
  52. yarvelle_core-0.1.0/src/yarvelle_core/api/reminders.py +829 -0
  53. yarvelle_core-0.1.0/src/yarvelle_core/api/router.py +88 -0
  54. yarvelle_core-0.1.0/src/yarvelle_core/api/routines.py +376 -0
  55. yarvelle_core-0.1.0/src/yarvelle_core/api/search.py +131 -0
  56. yarvelle_core-0.1.0/src/yarvelle_core/api/skills.py +762 -0
  57. yarvelle_core-0.1.0/src/yarvelle_core/audit/__init__.py +30 -0
  58. yarvelle_core-0.1.0/src/yarvelle_core/audit/hash_chain.py +258 -0
  59. yarvelle_core-0.1.0/src/yarvelle_core/audit/logger.py +418 -0
  60. yarvelle_core-0.1.0/src/yarvelle_core/audit/redaction.py +38 -0
  61. yarvelle_core-0.1.0/src/yarvelle_core/auth/__init__.py +64 -0
  62. yarvelle_core-0.1.0/src/yarvelle_core/auth/adapters/__init__.py +12 -0
  63. yarvelle_core-0.1.0/src/yarvelle_core/auth/adapters/disabled_adapter.py +176 -0
  64. yarvelle_core-0.1.0/src/yarvelle_core/auth/adapters/oidc_adapter.py +220 -0
  65. yarvelle_core-0.1.0/src/yarvelle_core/auth/adapters/sql_adapter.py +541 -0
  66. yarvelle_core-0.1.0/src/yarvelle_core/auth/factory.py +100 -0
  67. yarvelle_core-0.1.0/src/yarvelle_core/auth/ports.py +363 -0
  68. yarvelle_core-0.1.0/src/yarvelle_core/cli.py +181 -0
  69. yarvelle_core-0.1.0/src/yarvelle_core/companion/__init__.py +38 -0
  70. yarvelle_core-0.1.0/src/yarvelle_core/companion/pairing.py +483 -0
  71. yarvelle_core-0.1.0/src/yarvelle_core/config.py +320 -0
  72. yarvelle_core-0.1.0/src/yarvelle_core/conformance/__init__.py +39 -0
  73. yarvelle_core-0.1.0/src/yarvelle_core/conformance/fixtures/__init__.py +36 -0
  74. yarvelle_core-0.1.0/src/yarvelle_core/conformance/fixtures/synthetic_alpha.py +140 -0
  75. yarvelle_core-0.1.0/src/yarvelle_core/conformance/fixtures/synthetic_finance.py +140 -0
  76. yarvelle_core-0.1.0/src/yarvelle_core/conformance/layers/__init__.py +55 -0
  77. yarvelle_core-0.1.0/src/yarvelle_core/conformance/layers/base.py +40 -0
  78. yarvelle_core-0.1.0/src/yarvelle_core/conformance/layers/layer_01_orm.py +144 -0
  79. yarvelle_core-0.1.0/src/yarvelle_core/conformance/layers/layer_02_cas.py +121 -0
  80. yarvelle_core-0.1.0/src/yarvelle_core/conformance/layers/layer_03_fts5.py +121 -0
  81. yarvelle_core-0.1.0/src/yarvelle_core/conformance/layers/layer_04_memory.py +103 -0
  82. yarvelle_core-0.1.0/src/yarvelle_core/conformance/layers/layer_05_vault.py +133 -0
  83. yarvelle_core-0.1.0/src/yarvelle_core/conformance/layers/layer_06_tool_gate.py +95 -0
  84. yarvelle_core-0.1.0/src/yarvelle_core/conformance/layers/layer_07_prompt.py +66 -0
  85. yarvelle_core-0.1.0/src/yarvelle_core/conformance/layers/layer_08_api.py +99 -0
  86. yarvelle_core-0.1.0/src/yarvelle_core/conformance/layers/layer_09_export.py +73 -0
  87. yarvelle_core-0.1.0/src/yarvelle_core/conformance/layers/layer_10_audit.py +109 -0
  88. yarvelle_core-0.1.0/src/yarvelle_core/conformance/layers/layer_11_redaction.py +76 -0
  89. yarvelle_core-0.1.0/src/yarvelle_core/conformance/models.py +58 -0
  90. yarvelle_core-0.1.0/src/yarvelle_core/conformance/protocol.py +37 -0
  91. yarvelle_core-0.1.0/src/yarvelle_core/conformance/runner.py +298 -0
  92. yarvelle_core-0.1.0/src/yarvelle_core/connectors/__init__.py +133 -0
  93. yarvelle_core-0.1.0/src/yarvelle_core/connectors/base.py +157 -0
  94. yarvelle_core-0.1.0/src/yarvelle_core/connectors/errors.py +42 -0
  95. yarvelle_core-0.1.0/src/yarvelle_core/connectors/http.py +219 -0
  96. yarvelle_core-0.1.0/src/yarvelle_core/connectors/lifecycle.py +765 -0
  97. yarvelle_core-0.1.0/src/yarvelle_core/connectors/loader.py +180 -0
  98. yarvelle_core-0.1.0/src/yarvelle_core/connectors/manifest.py +261 -0
  99. yarvelle_core-0.1.0/src/yarvelle_core/connectors/mcp_remote.py +441 -0
  100. yarvelle_core-0.1.0/src/yarvelle_core/connectors/oauth.py +643 -0
  101. yarvelle_core-0.1.0/src/yarvelle_core/connectors/relay.py +249 -0
  102. yarvelle_core-0.1.0/src/yarvelle_core/connectors/starters/__init__.py +59 -0
  103. yarvelle_core-0.1.0/src/yarvelle_core/connectors/starters/calendar.py +428 -0
  104. yarvelle_core-0.1.0/src/yarvelle_core/connectors/starters/manifests/caldav.yaml +66 -0
  105. yarvelle_core-0.1.0/src/yarvelle_core/connectors/starters/manifests/google_calendar.yaml +70 -0
  106. yarvelle_core-0.1.0/src/yarvelle_core/connectors/starters/manifests/google_workspace_gmail.yaml +91 -0
  107. yarvelle_core-0.1.0/src/yarvelle_core/connectors/starters/manifests/microsoft_graph.yaml +64 -0
  108. yarvelle_core-0.1.0/src/yarvelle_core/connectors/sync.py +589 -0
  109. yarvelle_core-0.1.0/src/yarvelle_core/constants/__init__.py +197 -0
  110. yarvelle_core-0.1.0/src/yarvelle_core/constants/agents.py +145 -0
  111. yarvelle_core-0.1.0/src/yarvelle_core/constants/api.py +205 -0
  112. yarvelle_core-0.1.0/src/yarvelle_core/constants/defaults.py +152 -0
  113. yarvelle_core-0.1.0/src/yarvelle_core/constants/extraction.py +108 -0
  114. yarvelle_core-0.1.0/src/yarvelle_core/constants/models.py +117 -0
  115. yarvelle_core-0.1.0/src/yarvelle_core/constants/paths.py +117 -0
  116. yarvelle_core-0.1.0/src/yarvelle_core/db/__init__.py +103 -0
  117. yarvelle_core-0.1.0/src/yarvelle_core/db/base.py +22 -0
  118. yarvelle_core-0.1.0/src/yarvelle_core/db/migrations/env.py +132 -0
  119. yarvelle_core-0.1.0/src/yarvelle_core/db/migrations/script.py.mako +41 -0
  120. yarvelle_core-0.1.0/src/yarvelle_core/db/migrations/versions/0001_baseline_schema.py +352 -0
  121. yarvelle_core-0.1.0/src/yarvelle_core/db/migrations/versions/0002_autonomy_foundations.py +186 -0
  122. yarvelle_core-0.1.0/src/yarvelle_core/db/migrations/versions/0003_household_profiles_and_audit.py +147 -0
  123. yarvelle_core-0.1.0/src/yarvelle_core/db/migrations/versions/0004_policy_gate_and_vault.py +234 -0
  124. yarvelle_core-0.1.0/src/yarvelle_core/db/migrations/versions/0005_clinical_domain_records.py +202 -0
  125. yarvelle_core-0.1.0/src/yarvelle_core/db/migrations/versions/0006_preventive_and_school_forms.py +137 -0
  126. yarvelle_core-0.1.0/src/yarvelle_core/db/migrations/versions/0007_connectors_and_consent.py +161 -0
  127. yarvelle_core-0.1.0/src/yarvelle_core/db/migrations/versions/0008_routines_mcp_and_drafts.py +229 -0
  128. yarvelle_core-0.1.0/src/yarvelle_core/db/migrations/versions/0009_companion_and_handover.py +103 -0
  129. yarvelle_core-0.1.0/src/yarvelle_core/db/migrations/versions/0010_i18n_and_locale_storage.py +165 -0
  130. yarvelle_core-0.1.0/src/yarvelle_core/db/migrations/versions/0011_scopes.py +282 -0
  131. yarvelle_core-0.1.0/src/yarvelle_core/db/models.py +3238 -0
  132. yarvelle_core-0.1.0/src/yarvelle_core/db/scoped_session.py +185 -0
  133. yarvelle_core-0.1.0/src/yarvelle_core/db/seeding.py +308 -0
  134. yarvelle_core-0.1.0/src/yarvelle_core/db/session.py +613 -0
  135. yarvelle_core-0.1.0/src/yarvelle_core/engine/__init__.py +40 -0
  136. yarvelle_core-0.1.0/src/yarvelle_core/engine/agent_factory.py +129 -0
  137. yarvelle_core-0.1.0/src/yarvelle_core/engine/builder.py +899 -0
  138. yarvelle_core-0.1.0/src/yarvelle_core/engine/graph.py +575 -0
  139. yarvelle_core-0.1.0/src/yarvelle_core/engine/job_runner.py +1370 -0
  140. yarvelle_core-0.1.0/src/yarvelle_core/engine/prompt_builder.py +118 -0
  141. yarvelle_core-0.1.0/src/yarvelle_core/engine/runner.py +91 -0
  142. yarvelle_core-0.1.0/src/yarvelle_core/engine/safety_policy.py +161 -0
  143. yarvelle_core-0.1.0/src/yarvelle_core/engine/service.py +1342 -0
  144. yarvelle_core-0.1.0/src/yarvelle_core/engine/tool_exec.py +878 -0
  145. yarvelle_core-0.1.0/src/yarvelle_core/engine/tool_registry.py +965 -0
  146. yarvelle_core-0.1.0/src/yarvelle_core/i18n/__init__.py +54 -0
  147. yarvelle_core-0.1.0/src/yarvelle_core/i18n/catalog.py +366 -0
  148. yarvelle_core-0.1.0/src/yarvelle_core/i18n/locale.py +222 -0
  149. yarvelle_core-0.1.0/src/yarvelle_core/loaders/__init__.py +56 -0
  150. yarvelle_core-0.1.0/src/yarvelle_core/loaders/agent_loader.py +499 -0
  151. yarvelle_core-0.1.0/src/yarvelle_core/loaders/context_loader.py +146 -0
  152. yarvelle_core-0.1.0/src/yarvelle_core/loaders/frontmatter.py +85 -0
  153. yarvelle_core-0.1.0/src/yarvelle_core/loaders/skill_loader.py +326 -0
  154. yarvelle_core-0.1.0/src/yarvelle_core/loaders/union.py +64 -0
  155. yarvelle_core-0.1.0/src/yarvelle_core/logging.py +127 -0
  156. yarvelle_core-0.1.0/src/yarvelle_core/memory/__init__.py +63 -0
  157. yarvelle_core-0.1.0/src/yarvelle_core/memory/adapters/__init__.py +32 -0
  158. yarvelle_core-0.1.0/src/yarvelle_core/memory/adapters/spector/__init__.py +22 -0
  159. yarvelle_core-0.1.0/src/yarvelle_core/memory/adapters/spector/memory_adapter.py +404 -0
  160. yarvelle_core-0.1.0/src/yarvelle_core/memory/adapters/spector/store.py +773 -0
  161. yarvelle_core-0.1.0/src/yarvelle_core/memory/adapters/sqlite/__init__.py +30 -0
  162. yarvelle_core-0.1.0/src/yarvelle_core/memory/adapters/sqlite/catalog_adapter.py +598 -0
  163. yarvelle_core-0.1.0/src/yarvelle_core/memory/adapters/sqlite/memory_adapter.py +392 -0
  164. yarvelle_core-0.1.0/src/yarvelle_core/memory/factory.py +255 -0
  165. yarvelle_core-0.1.0/src/yarvelle_core/memory/namespace.py +61 -0
  166. yarvelle_core-0.1.0/src/yarvelle_core/memory/ports/__init__.py +21 -0
  167. yarvelle_core-0.1.0/src/yarvelle_core/memory/ports/catalog_port.py +137 -0
  168. yarvelle_core-0.1.0/src/yarvelle_core/memory/ports/memory_port.py +164 -0
  169. yarvelle_core-0.1.0/src/yarvelle_core/middleware/__init__.py +28 -0
  170. yarvelle_core-0.1.0/src/yarvelle_core/middleware/skills.py +152 -0
  171. yarvelle_core-0.1.0/src/yarvelle_core/migration/__init__.py +16 -0
  172. yarvelle_core-0.1.0/src/yarvelle_core/migration/runtime_migrator.py +579 -0
  173. yarvelle_core-0.1.0/src/yarvelle_core/model/__init__.py +98 -0
  174. yarvelle_core-0.1.0/src/yarvelle_core/model/client.py +168 -0
  175. yarvelle_core-0.1.0/src/yarvelle_core/model/egress.py +295 -0
  176. yarvelle_core-0.1.0/src/yarvelle_core/model/factory.py +511 -0
  177. yarvelle_core-0.1.0/src/yarvelle_core/model/providers/__init__.py +117 -0
  178. yarvelle_core-0.1.0/src/yarvelle_core/model/providers/anthropic_provider.py +191 -0
  179. yarvelle_core-0.1.0/src/yarvelle_core/model/providers/base.py +119 -0
  180. yarvelle_core-0.1.0/src/yarvelle_core/model/providers/custom_provider.py +207 -0
  181. yarvelle_core-0.1.0/src/yarvelle_core/model/providers/google_provider.py +179 -0
  182. yarvelle_core-0.1.0/src/yarvelle_core/model/providers/ollama_provider.py +231 -0
  183. yarvelle_core-0.1.0/src/yarvelle_core/model/providers/openai_provider.py +190 -0
  184. yarvelle_core-0.1.0/src/yarvelle_core/model/types.py +68 -0
  185. yarvelle_core-0.1.0/src/yarvelle_core/pack/__init__.py +60 -0
  186. yarvelle_core-0.1.0/src/yarvelle_core/pack/loader.py +151 -0
  187. yarvelle_core-0.1.0/src/yarvelle_core/pack/routing.py +69 -0
  188. yarvelle_core-0.1.0/src/yarvelle_core/pack/spec.py +193 -0
  189. yarvelle_core-0.1.0/src/yarvelle_core/pack/validator.py +186 -0
  190. yarvelle_core-0.1.0/src/yarvelle_core/packaging/__init__.py +28 -0
  191. yarvelle_core-0.1.0/src/yarvelle_core/packaging/service.py +178 -0
  192. yarvelle_core-0.1.0/src/yarvelle_core/platform/__init__.py +62 -0
  193. yarvelle_core-0.1.0/src/yarvelle_core/platform/email_drafts.py +295 -0
  194. yarvelle_core-0.1.0/src/yarvelle_core/platform/reminders.py +573 -0
  195. yarvelle_core-0.1.0/src/yarvelle_core/platform/routines.py +743 -0
  196. yarvelle_core-0.1.0/src/yarvelle_core/resources/__init__.py +31 -0
  197. yarvelle_core-0.1.0/src/yarvelle_core/resources/db_tools.yaml +506 -0
  198. yarvelle_core-0.1.0/src/yarvelle_core/resources/disclaimers.yaml +25 -0
  199. yarvelle_core-0.1.0/src/yarvelle_core/resources/errors.yaml +189 -0
  200. yarvelle_core-0.1.0/src/yarvelle_core/resources/loader.py +557 -0
  201. yarvelle_core-0.1.0/src/yarvelle_core/resources/locales/ar-SA.json +371 -0
  202. yarvelle_core-0.1.0/src/yarvelle_core/resources/locales/en-US.json +371 -0
  203. yarvelle_core-0.1.0/src/yarvelle_core/resources/locales/es-ES.json +371 -0
  204. yarvelle_core-0.1.0/src/yarvelle_core/resources/locales/fr-FR.json +371 -0
  205. yarvelle_core-0.1.0/src/yarvelle_core/resources/locales/hi-IN.json +371 -0
  206. yarvelle_core-0.1.0/src/yarvelle_core/resources/prompts/extraction/generic_document.md +4 -0
  207. yarvelle_core-0.1.0/src/yarvelle_core/resources/prompts/extraction/grounding_validation.md +1 -0
  208. yarvelle_core-0.1.0/src/yarvelle_core/resources/prompts/orchestrator/system_prompt.md +29 -0
  209. yarvelle_core-0.1.0/src/yarvelle_core/resources/prompts/safety/safety_preamble.md +19 -0
  210. yarvelle_core-0.1.0/src/yarvelle_core/resources/prompts/suggestions/generation.md +18 -0
  211. yarvelle_core-0.1.0/src/yarvelle_core/resources/prompts/system/capabilities_section_header.md +1 -0
  212. yarvelle_core-0.1.0/src/yarvelle_core/resources/prompts/system/persona_section_header.md +1 -0
  213. yarvelle_core-0.1.0/src/yarvelle_core/resources/prompts/system/scaffold.yaml +6 -0
  214. yarvelle_core-0.1.0/src/yarvelle_core/resources/prompts/system/skill_section_format.md +2 -0
  215. yarvelle_core-0.1.0/src/yarvelle_core/resources/prompts/system/skills_section_header.md +1 -0
  216. yarvelle_core-0.1.0/src/yarvelle_core/resources/prompts/system/tools_summary_none.md +1 -0
  217. yarvelle_core-0.1.0/src/yarvelle_core/resources/prompts/system/tools_summary_sandboxed.md +1 -0
  218. yarvelle_core-0.1.0/src/yarvelle_core/resources/prompts/templates/agent_execution_prompt.hbs +70 -0
  219. yarvelle_core-0.1.0/src/yarvelle_core/resources/prompts/templates/orchestrator_routing_prompt.hbs +12 -0
  220. yarvelle_core-0.1.0/src/yarvelle_core/resources/prompts/templates/system_prompt.hbs +30 -0
  221. yarvelle_core-0.1.0/src/yarvelle_core/resources/prompts.yaml +47 -0
  222. yarvelle_core-0.1.0/src/yarvelle_core/resources/refusal_patterns.yaml +8 -0
  223. yarvelle_core-0.1.0/src/yarvelle_core/resources/routing_patterns.yaml +12 -0
  224. yarvelle_core-0.1.0/src/yarvelle_core/schemas/__init__.py +121 -0
  225. yarvelle_core-0.1.0/src/yarvelle_core/schemas/activity.py +84 -0
  226. yarvelle_core-0.1.0/src/yarvelle_core/schemas/agent.schema.json +301 -0
  227. yarvelle_core-0.1.0/src/yarvelle_core/schemas/audit.py +53 -0
  228. yarvelle_core-0.1.0/src/yarvelle_core/schemas/chat.py +140 -0
  229. yarvelle_core-0.1.0/src/yarvelle_core/schemas/generator.py +68 -0
  230. yarvelle_core-0.1.0/src/yarvelle_core/schemas/health.py +43 -0
  231. yarvelle_core-0.1.0/src/yarvelle_core/schemas/manifest.py +539 -0
  232. yarvelle_core-0.1.0/src/yarvelle_core/schemas/memory.py +124 -0
  233. yarvelle_core-0.1.0/src/yarvelle_core/schemas/notes.py +166 -0
  234. yarvelle_core-0.1.0/src/yarvelle_core/schemas/pack.schema.json +408 -0
  235. yarvelle_core-0.1.0/src/yarvelle_core/schemas/plan.py +177 -0
  236. yarvelle_core-0.1.0/src/yarvelle_core/schemas/profiles.py +192 -0
  237. yarvelle_core-0.1.0/src/yarvelle_core/schemas/routing.py +27 -0
  238. yarvelle_core-0.1.0/src/yarvelle_core/schemas/skill.schema.json +264 -0
  239. yarvelle_core-0.1.0/src/yarvelle_core/schemas/tool.py +35 -0
  240. yarvelle_core-0.1.0/src/yarvelle_core/scope/__init__.py +50 -0
  241. yarvelle_core-0.1.0/src/yarvelle_core/scope/adapter.py +162 -0
  242. yarvelle_core-0.1.0/src/yarvelle_core/scope/context.py +207 -0
  243. yarvelle_core-0.1.0/src/yarvelle_core/scope/mixin.py +33 -0
  244. yarvelle_core-0.1.0/src/yarvelle_core/search/__init__.py +57 -0
  245. yarvelle_core-0.1.0/src/yarvelle_core/search/adapters/__init__.py +19 -0
  246. yarvelle_core-0.1.0/src/yarvelle_core/search/adapters/spector.py +588 -0
  247. yarvelle_core-0.1.0/src/yarvelle_core/search/adapters/sqlite.py +385 -0
  248. yarvelle_core-0.1.0/src/yarvelle_core/search/base.py +161 -0
  249. yarvelle_core-0.1.0/src/yarvelle_core/search/chunker.py +471 -0
  250. yarvelle_core-0.1.0/src/yarvelle_core/search/factory.py +203 -0
  251. yarvelle_core-0.1.0/src/yarvelle_core/settings/__init__.py +33 -0
  252. yarvelle_core-0.1.0/src/yarvelle_core/settings/adapters/__init__.py +12 -0
  253. yarvelle_core-0.1.0/src/yarvelle_core/settings/adapters/sql_adapter.py +177 -0
  254. yarvelle_core-0.1.0/src/yarvelle_core/settings/factory.py +70 -0
  255. yarvelle_core-0.1.0/src/yarvelle_core/settings/ports.py +84 -0
  256. yarvelle_core-0.1.0/src/yarvelle_core/storage/__init__.py +46 -0
  257. yarvelle_core-0.1.0/src/yarvelle_core/storage/adapters/__init__.py +16 -0
  258. yarvelle_core-0.1.0/src/yarvelle_core/storage/adapters/local_adapter.py +540 -0
  259. yarvelle_core-0.1.0/src/yarvelle_core/storage/cas.py +219 -0
  260. yarvelle_core-0.1.0/src/yarvelle_core/storage/extract.py +548 -0
  261. yarvelle_core-0.1.0/src/yarvelle_core/storage/factory.py +124 -0
  262. yarvelle_core-0.1.0/src/yarvelle_core/storage/ports/__init__.py +30 -0
  263. yarvelle_core-0.1.0/src/yarvelle_core/storage/ports/storage_port.py +262 -0
  264. yarvelle_core-0.1.0/src/yarvelle_core/templates/__init__.py +26 -0
  265. yarvelle_core-0.1.0/src/yarvelle_core/templates/engine.py +183 -0
  266. yarvelle_core-0.1.0/src/yarvelle_core/templates/helpers.py +90 -0
  267. yarvelle_core-0.1.0/src/yarvelle_core/tools/__init__.py +60 -0
  268. yarvelle_core-0.1.0/src/yarvelle_core/tools/attach_read.py +541 -0
  269. yarvelle_core-0.1.0/src/yarvelle_core/tools/attachments.py +35 -0
  270. yarvelle_core-0.1.0/src/yarvelle_core/tools/delegation_tools.py +158 -0
  271. yarvelle_core-0.1.0/src/yarvelle_core/tools/extraction_tools.py +273 -0
  272. yarvelle_core-0.1.0/src/yarvelle_core/tools/mcp_db_toolbox.py +801 -0
  273. yarvelle_core-0.1.0/src/yarvelle_core/tools/registry.py +143 -0
  274. yarvelle_core-0.1.0/src/yarvelle_core/tools/reminders.py +272 -0
  275. yarvelle_core-0.1.0/src/yarvelle_core/tools/sandbox.py +153 -0
  276. yarvelle_core-0.1.0/src/yarvelle_core/tools/search_records.py +178 -0
  277. yarvelle_core-0.1.0/src/yarvelle_core/tools/skill_docs.py +351 -0
  278. yarvelle_core-0.1.0/src/yarvelle_core/tools/web_search.py +451 -0
  279. yarvelle_core-0.1.0/src/yarvelle_core/tools/workspace_note.py +243 -0
  280. yarvelle_core-0.1.0/src/yarvelle_core/vault/__init__.py +66 -0
  281. yarvelle_core-0.1.0/src/yarvelle_core/vault/crypto.py +108 -0
  282. yarvelle_core-0.1.0/src/yarvelle_core/vault/dek.py +422 -0
  283. yarvelle_core-0.1.0/src/yarvelle_core/vault/errors.py +42 -0
  284. yarvelle_core-0.1.0/src/yarvelle_core/vault/kek.py +220 -0
  285. yarvelle_core-0.1.0/src/yarvelle_core/workflows/__init__.py +40 -0
  286. yarvelle_core-0.1.0/src/yarvelle_core/workflows/dispatcher.py +335 -0
  287. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/__init__.py +56 -0
  288. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/agent.py +16 -0
  289. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/agent_execution_node.py +577 -0
  290. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/agent_node.py +190 -0
  291. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/audit.py +16 -0
  292. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/audit_node.py +104 -0
  293. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/base.py +209 -0
  294. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/error.py +16 -0
  295. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/error_node.py +78 -0
  296. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/input_guardrail.py +16 -0
  297. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/input_guardrail_node.py +222 -0
  298. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/orchestrator_node.py +1155 -0
  299. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/output_guardrail.py +16 -0
  300. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/output_guardrail_node.py +114 -0
  301. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/reflection.py +16 -0
  302. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/reflection_node.py +73 -0
  303. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/refusal.py +16 -0
  304. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/refusal_node.py +59 -0
  305. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/response_synthesizer_node.py +302 -0
  306. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/skill_generator_node.py +594 -0
  307. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/suggestion.py +16 -0
  308. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/suggestion_node.py +165 -0
  309. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/supervisor.py +16 -0
  310. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/supervisor_node.py +45 -0
  311. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/tool.py +16 -0
  312. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/tool_execution.py +16 -0
  313. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/tool_node.py +471 -0
  314. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/tool_validator.py +16 -0
  315. yarvelle_core-0.1.0/src/yarvelle_core/workflows/nodes/tool_validator_node.py +92 -0
  316. yarvelle_core-0.1.0/src/yarvelle_core/workflows/state.py +352 -0
  317. yarvelle_core-0.1.0/src/yarvelle_core/workflows/subgraphs/__init__.py +47 -0
  318. yarvelle_core-0.1.0/src/yarvelle_core/workflows/subgraphs/extraction/__init__.py +86 -0
  319. yarvelle_core-0.1.0/src/yarvelle_core/workflows/subgraphs/extraction/dossiers.py +153 -0
  320. yarvelle_core-0.1.0/src/yarvelle_core/workflows/subgraphs/extraction/graph.py +29 -0
  321. yarvelle_core-0.1.0/src/yarvelle_core/workflows/subgraphs/extraction/grounding.py +238 -0
  322. yarvelle_core-0.1.0/src/yarvelle_core/workflows/subgraphs/extraction/sanitizer.py +269 -0
  323. yarvelle_core-0.1.0/src/yarvelle_core/workflows/subgraphs/extraction/subgraph.py +212 -0
  324. yarvelle_core-0.1.0/src/yarvelle_core/workflows/subgraphs/extraction/tool.py +371 -0
  325. yarvelle_core-0.1.0/src/yarvelle_core/workflows/subgraphs/supervisor.py +458 -0
  326. yarvelle_core-0.1.0/tests/__init__.py +10 -0
  327. yarvelle_core-0.1.0/tests/conftest.py +70 -0
  328. yarvelle_core-0.1.0/tests/connectors/fixtures/__init__.py +16 -0
  329. yarvelle_core-0.1.0/tests/connectors/fixtures/dummy_connector.py +181 -0
  330. yarvelle_core-0.1.0/tests/connectors/test_manifest.py +147 -0
  331. yarvelle_core-0.1.0/tests/connectors/test_protocol.py +130 -0
  332. yarvelle_core-0.1.0/tests/connectors/test_scoped_http.py +124 -0
  333. yarvelle_core-0.1.0/tests/fixtures/__init__.py +10 -0
  334. yarvelle_core-0.1.0/tests/fixtures/fake_model.py +1249 -0
  335. yarvelle_core-0.1.0/tests/packaging/test_wheel_contents.py +101 -0
  336. yarvelle_core-0.1.0/tests/test_auth.py +64 -0
  337. yarvelle_core-0.1.0/tests/test_cas.py +67 -0
  338. yarvelle_core-0.1.0/tests/test_chunker.py +39 -0
  339. yarvelle_core-0.1.0/tests/test_cli.py +115 -0
  340. yarvelle_core-0.1.0/tests/test_neutral_words_scan.py +143 -0
  341. yarvelle_core-0.1.0/tests/test_pack_schemas.py +177 -0
  342. yarvelle_core-0.1.0/tests/test_pack_spec.py +186 -0
  343. yarvelle_core-0.1.0/tests/test_scope_conformance.py +141 -0
  344. yarvelle_core-0.1.0/tests/test_scoped_session.py +96 -0
  345. yarvelle_core-0.1.0/tests/test_search_fts5.py +56 -0
  346. yarvelle_core-0.1.0/tests/test_tool_registry.py +67 -0
  347. yarvelle_core-0.1.0/tests/test_ui_context.py +347 -0
  348. yarvelle_core-0.1.0/tests/test_vault_salt_pin.py +74 -0
@@ -0,0 +1,63 @@
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
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # Virtual environments
30
+ .venv/
31
+ venv/
32
+ ENV/
33
+ env/
34
+
35
+ # IDE and editors
36
+ .idea/
37
+ .vscode/
38
+ *.swp
39
+ *.swo
40
+ *~
41
+
42
+ # Testing and coverage
43
+ .pytest_cache/
44
+ .coverage
45
+ htmlcov/
46
+ .tox/
47
+ .nox/
48
+
49
+ # Yarvelle local runtime directories
50
+ .yarvelle/
51
+ .carefold/
52
+ logs/
53
+ chats/
54
+ workspace/
55
+ attachments/
56
+ *.db
57
+ *.sqlite
58
+ *.sqlite3
59
+
60
+ # Node / Frontend
61
+ node_modules/
62
+ frontend/dist/
63
+ .import_linter_cache/
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.5
2
+ Name: yarvelle-core
3
+ Version: 0.1.0
4
+ Summary: Domain-neutral AI agent runtime, execution engine, and multi-domain scope isolation framework
5
+ Author-email: Spectrayan <engineering@spectrayan.com>
6
+ License: PolyForm Noncommercial License 1.0.0 and Yarvelle Core Additional Terms
7
+ Keywords: agents,ai,encryption,langgraph,local-first,privacy,runtime,scoping,vault
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
12
+ Classifier: Topic :: Security :: Cryptography
13
+ Requires-Python: >=3.12
14
+ Requires-Dist: aiosqlite>=0.20.0
15
+ Requires-Dist: alembic>=1.13.0
16
+ Requires-Dist: argon2-cffi>=23.1.0
17
+ Requires-Dist: asyncpg>=0.29.0
18
+ Requires-Dist: cryptography>=43.0.0
19
+ Requires-Dist: deepagents>=0.7
20
+ Requires-Dist: defusedxml>=0.7.1
21
+ Requires-Dist: fastapi>=0.115.0
22
+ Requires-Dist: httpx>=0.27.0
23
+ Requires-Dist: importlib-metadata>=8.0.0; python_version < '3.10'
24
+ Requires-Dist: jinja2>=3.1.0
25
+ Requires-Dist: keyring>=24.0.0
26
+ Requires-Dist: langchain-anthropic>=0.3.0
27
+ Requires-Dist: langchain-core>=0.3.0
28
+ Requires-Dist: langchain-google-genai>=2.0.0
29
+ Requires-Dist: langchain-ollama>=1.1.0
30
+ Requires-Dist: langchain-openai>=0.3.0
31
+ Requires-Dist: langgraph-checkpoint-sqlite>=2.0.0
32
+ Requires-Dist: langgraph>=0.2.0
33
+ Requires-Dist: packaging>=23.0
34
+ Requires-Dist: pwdlib[argon2]>=0.2.0
35
+ Requires-Dist: pydantic-handlebars>=0.2.1
36
+ Requires-Dist: pydantic-settings>=2.4.0
37
+ Requires-Dist: pydantic>=2.8.0
38
+ Requires-Dist: pypdf>=4.0.0
39
+ Requires-Dist: python-multipart>=0.0.18
40
+ Requires-Dist: pyyaml>=6.0.2
41
+ Requires-Dist: spector-client>=0.1.0a4
42
+ Requires-Dist: sqlalchemy[asyncio]>=2.0.35
43
+ Requires-Dist: sse-starlette>=2.1.0
44
+ Requires-Dist: structlog>=24.1.0
45
+ Requires-Dist: uvicorn[standard]>=0.30.0
46
+ Provides-Extra: dev
47
+ Requires-Dist: build>=1.2.0; extra == 'dev'
48
+ Requires-Dist: hatchling>=1.25.0; extra == 'dev'
49
+ Requires-Dist: import-linter>=2.0; extra == 'dev'
50
+ Requires-Dist: licenseheaders>=0.8.8; extra == 'dev'
51
+ Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
52
+ Requires-Dist: pytest-xdist>=3.5.0; extra == 'dev'
53
+ Requires-Dist: pytest>=8.3.0; extra == 'dev'
54
+ Description-Content-Type: text/markdown
55
+
56
+ # Yarvelle Core
57
+
58
+ **Domain-Neutral AI Agent Runtime, Execution Engine & Multi-Domain Scope Isolation Framework**
59
+ Copyright 2026 Spectrayan (https://spectrayan.com)
60
+
61
+ Licensed under the [PolyForm Noncommercial License 1.0.0](LICENSE) and the [Yarvelle Core Additional Terms](ADDITIONAL-TERMS.md).
62
+
63
+ ---
64
+
65
+ ## Overview
66
+
67
+ `yarvelle-core` is the domain-neutral execution backbone of the Yarvelle ecosystem. It provides:
68
+ 1. **Deterministic Agent Runtime**: LangGraph state machine execution, tool execution gating, agent reflection, and contextual follow-up generation.
69
+ 2. **Pack API v1**: Pluggable domain pack architecture (`pack.yaml`, `PackSpec`) allowing external packs to register specialized tools, routers, safety policies, and database models.
70
+ 3. **11-Layer Scope Isolation Engine**: Strict multi-domain data isolation (`ScopeContext`, `ScopedSession`, partitioned CAS storage, scoped FTS5 lexical search, memory namespace partitioning, and HKDF-derived vault sub-keys).
71
+ 4. **Local-First Security & Cryptography**: Envelope encryption keyring vault (PBKDF2/Argon2 KEK, AES-256-GCM DEK), audit hash chaining, and localhost-bound API server.
72
+ 5. **Conformance Test Suite**: Comprehensive verification framework (`yarvelle_core.conformance`) asserting zero cross-domain leakage across all 11 security layers.
73
+
74
+ ## Architecture
75
+
76
+ Dependencies flow strictly inward:
77
+ ```
78
+ Applications (Carefold, Yarvelle) ──► Domain Packs (Health, Finance, Kids) ──► Yarvelle Core
79
+ ```
80
+ `yarvelle_core` contains zero domain-specific business logic or terminology.
81
+
82
+ ## Installation
83
+
84
+ ```bash
85
+ pip install yarvelle-core
86
+ ```
87
+
88
+ For development:
89
+ ```bash
90
+ git clone https://github.com/yarvelle/yarvelle-core.git
91
+ cd yarvelle-core
92
+ pip install -e ".[dev]"
93
+ ```
94
+
95
+ ## Running Verification
96
+
97
+ ```bash
98
+ # Run unit & isolation tests
99
+ pytest tests/
100
+
101
+ # Verify layer ordering and package boundaries
102
+ lint-imports
103
+
104
+ # Verify zero domain words in core
105
+ pytest tests/test_neutral_words_scan.py
106
+ ```
@@ -0,0 +1,51 @@
1
+ # Yarvelle Core
2
+
3
+ **Domain-Neutral AI Agent Runtime, Execution Engine & Multi-Domain Scope Isolation Framework**
4
+ Copyright 2026 Spectrayan (https://spectrayan.com)
5
+
6
+ Licensed under the [PolyForm Noncommercial License 1.0.0](LICENSE) and the [Yarvelle Core Additional Terms](ADDITIONAL-TERMS.md).
7
+
8
+ ---
9
+
10
+ ## Overview
11
+
12
+ `yarvelle-core` is the domain-neutral execution backbone of the Yarvelle ecosystem. It provides:
13
+ 1. **Deterministic Agent Runtime**: LangGraph state machine execution, tool execution gating, agent reflection, and contextual follow-up generation.
14
+ 2. **Pack API v1**: Pluggable domain pack architecture (`pack.yaml`, `PackSpec`) allowing external packs to register specialized tools, routers, safety policies, and database models.
15
+ 3. **11-Layer Scope Isolation Engine**: Strict multi-domain data isolation (`ScopeContext`, `ScopedSession`, partitioned CAS storage, scoped FTS5 lexical search, memory namespace partitioning, and HKDF-derived vault sub-keys).
16
+ 4. **Local-First Security & Cryptography**: Envelope encryption keyring vault (PBKDF2/Argon2 KEK, AES-256-GCM DEK), audit hash chaining, and localhost-bound API server.
17
+ 5. **Conformance Test Suite**: Comprehensive verification framework (`yarvelle_core.conformance`) asserting zero cross-domain leakage across all 11 security layers.
18
+
19
+ ## Architecture
20
+
21
+ Dependencies flow strictly inward:
22
+ ```
23
+ Applications (Carefold, Yarvelle) ──► Domain Packs (Health, Finance, Kids) ──► Yarvelle Core
24
+ ```
25
+ `yarvelle_core` contains zero domain-specific business logic or terminology.
26
+
27
+ ## Installation
28
+
29
+ ```bash
30
+ pip install yarvelle-core
31
+ ```
32
+
33
+ For development:
34
+ ```bash
35
+ git clone https://github.com/yarvelle/yarvelle-core.git
36
+ cd yarvelle-core
37
+ pip install -e ".[dev]"
38
+ ```
39
+
40
+ ## Running Verification
41
+
42
+ ```bash
43
+ # Run unit & isolation tests
44
+ pytest tests/
45
+
46
+ # Verify layer ordering and package boundaries
47
+ lint-imports
48
+
49
+ # Verify zero domain words in core
50
+ pytest tests/test_neutral_words_scan.py
51
+ ```
@@ -0,0 +1,43 @@
1
+ # Yarvelle Core — Domain-Neutral AI Agent Runtime & Execution Engine
2
+ # Copyright 2026 Spectrayan (https://spectrayan.com)
3
+ #
4
+ # Licensed under the PolyForm Noncommercial License 1.0.0 and the
5
+ # Yarvelle Core Additional Terms (see LICENSE and ADDITIONAL-TERMS.md).
6
+ # Personal and household local use only. Commercial use, hosted service
7
+ # offering, rebranding, white-labeling, and redistribution of modified
8
+ # forks are prohibited without a written commercial license from Spectrayan.
9
+ #
10
+ # Required Notice: Copyright 2026 Spectrayan (https://spectrayan.com)
11
+
12
+ from __future__ import annotations
13
+
14
+ from pathlib import Path
15
+ from typing import Any, Dict
16
+
17
+ from hatchling.builders.hooks.plugin.interface import BuildHookInterface
18
+
19
+
20
+ class CustomBuildHook(BuildHookInterface):
21
+ """Hatchling build hook force-including top-level agents, skills, and schemas."""
22
+
23
+ def initialize(self, version: str, build_data: Dict[str, Any]) -> None:
24
+ if version == "editable":
25
+ return
26
+ root = Path(self.root).parent # top-level repo root
27
+ force_include = build_data.setdefault("force_include", {})
28
+ target_prefix = (
29
+ "src/yarvelle_core/_content"
30
+ if self.target_name == "sdist"
31
+ else "yarvelle_core/_content"
32
+ )
33
+
34
+ agents_dir = root / "agents"
35
+ skills_dir = root / "skills"
36
+ schemas_dir = root / "schemas"
37
+
38
+ if agents_dir.is_dir():
39
+ force_include[str(agents_dir)] = f"{target_prefix}/agents"
40
+ if skills_dir.is_dir():
41
+ force_include[str(skills_dir)] = f"{target_prefix}/skills"
42
+ if schemas_dir.is_dir():
43
+ force_include[str(schemas_dir)] = f"{target_prefix}/schemas"
@@ -0,0 +1,111 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "yarvelle-core"
7
+ version = "0.1.0"
8
+ description = "Domain-neutral AI agent runtime, execution engine, and multi-domain scope isolation framework"
9
+ readme = "README.md"
10
+ requires-python = ">=3.12"
11
+ license = { text = "PolyForm Noncommercial License 1.0.0 and Yarvelle Core Additional Terms" }
12
+ authors = [
13
+ { name = "Spectrayan", email = "engineering@spectrayan.com" }
14
+ ]
15
+ keywords = [
16
+ "ai",
17
+ "agents",
18
+ "runtime",
19
+ "langgraph",
20
+ "local-first",
21
+ "privacy",
22
+ "vault",
23
+ "encryption",
24
+ "scoping"
25
+ ]
26
+ classifiers = [
27
+ "Development Status :: 4 - Beta",
28
+ "Intended Audience :: Developers",
29
+ "Programming Language :: Python :: 3.12",
30
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
31
+ "Topic :: Security :: Cryptography"
32
+ ]
33
+
34
+ dependencies = [
35
+ "fastapi>=0.115.0",
36
+ "uvicorn[standard]>=0.30.0",
37
+ "pydantic>=2.8.0",
38
+ "pydantic-settings>=2.4.0",
39
+ "sse-starlette>=2.1.0",
40
+ "httpx>=0.27.0",
41
+ "pyyaml>=6.0.2",
42
+ "langchain-core>=0.3.0",
43
+ "langchain-openai>=0.3.0",
44
+ "langchain-anthropic>=0.3.0",
45
+ "langchain-google-genai>=2.0.0",
46
+ "langchain-ollama>=1.1.0",
47
+ "langgraph>=0.2.0",
48
+ "langgraph-checkpoint-sqlite>=2.0.0",
49
+ "aiosqlite>=0.20.0",
50
+ "structlog>=24.1.0",
51
+ "python-multipart>=0.0.18",
52
+ "pydantic-handlebars>=0.2.1",
53
+ "jinja2>=3.1.0",
54
+ "deepagents>=0.7",
55
+ "spector-client>=0.1.0a4",
56
+ "sqlalchemy[asyncio]>=2.0.35",
57
+ "asyncpg>=0.29.0",
58
+ "pwdlib[argon2]>=0.2.0",
59
+ "argon2-cffi>=23.1.0",
60
+ "cryptography>=43.0.0",
61
+ "keyring>=24.0.0",
62
+ "alembic>=1.13.0",
63
+ "pypdf>=4.0.0",
64
+ "defusedxml>=0.7.1",
65
+ "packaging>=23.0",
66
+ "importlib-metadata>=8.0.0; python_version<'3.10'",
67
+ ]
68
+
69
+ [project.optional-dependencies]
70
+ dev = [
71
+ "pytest>=8.3.0",
72
+ "pytest-asyncio>=0.24.0",
73
+ "pytest-xdist>=3.5.0",
74
+ "import-linter>=2.0",
75
+ "licenseheaders>=0.8.8",
76
+ "build>=1.2.0",
77
+ "hatchling>=1.25.0",
78
+ ]
79
+
80
+ [project.scripts]
81
+ yarvelle-core = "yarvelle_core.cli:main"
82
+
83
+ # Pack API v1 entry-point group: domain packs register here
84
+ [project.entry-points."yarvelle.packs"]
85
+
86
+ [tool.hatch.build.targets.wheel]
87
+ packages = ["src/yarvelle_core"]
88
+ dev-mode-dirs = ["src"]
89
+ artifacts = ["src/yarvelle_core/_content"]
90
+
91
+ [tool.hatch.build.hooks.custom]
92
+ path = "hatch_build.py"
93
+
94
+ [tool.hatch.build.targets.sdist]
95
+ include = [
96
+ "/src",
97
+ "/tests",
98
+ "/README.md",
99
+ "/hatch_build.py",
100
+ ]
101
+
102
+ [tool.pytest.ini_options]
103
+ minversion = "8.0"
104
+ addopts = "-ra --asyncio-mode=auto"
105
+ testpaths = ["tests"]
106
+ pythonpath = ["src"]
107
+ filterwarnings = [
108
+ "ignore::DeprecationWarning:fastapi.testclient",
109
+ "ignore::DeprecationWarning:starlette.testclient",
110
+ "ignore:.*httpx.*:DeprecationWarning",
111
+ ]
@@ -0,0 +1,60 @@
1
+ # Yarvelle Core — Domain-Neutral AI Agent Runtime & Execution Engine
2
+ # Copyright 2026 Spectrayan (https://spectrayan.com)
3
+ #
4
+ # Licensed under the PolyForm Noncommercial License 1.0.0 and the
5
+ # Yarvelle Core Additional Terms (see LICENSE and ADDITIONAL-TERMS.md).
6
+ # Personal and household local use only. Commercial use, hosted service
7
+ # offering, rebranding, white-labeling, and redistribution of modified
8
+ # forks are prohibited without a written commercial license from Spectrayan.
9
+ #
10
+ # Required Notice: Copyright 2026 Spectrayan (https://spectrayan.com)
11
+
12
+ """Yarvelle Core: Domain-Neutral AI Agent Runtime & Execution Engine."""
13
+
14
+ from __future__ import annotations
15
+
16
+ import importlib as _importlib
17
+ import importlib.abc as _importlib_abc
18
+ import importlib.machinery as _machinery
19
+ import sys as _sys
20
+
21
+ __version__ = "0.1.0"
22
+
23
+
24
+ class _AliasLoader(_importlib_abc.Loader):
25
+ def __init__(self, target_mod) -> None:
26
+ self.target_mod = target_mod
27
+ self.orig_spec = getattr(target_mod, "__spec__", None)
28
+
29
+ def create_module(self, spec):
30
+ return self.target_mod
31
+
32
+ def exec_module(self, module):
33
+ if self.orig_spec is not None:
34
+ try:
35
+ module.__spec__ = self.orig_spec
36
+ except AttributeError:
37
+ pass
38
+
39
+
40
+ class _ConnectorsRedirectFinder(_importlib_abc.MetaPathFinder):
41
+ """Redirects top-level `connectors.*` imports to `yarvelle_core.connectors.*`."""
42
+
43
+ def find_spec(self, fullname: str, path=None, target=None):
44
+ if fullname == "connectors" or fullname.startswith("connectors."):
45
+ target_name = "yarvelle_core." + fullname
46
+ try:
47
+ mod = _importlib.import_module(target_name)
48
+ except ImportError:
49
+ return None
50
+ is_pkg = hasattr(mod, "__path__")
51
+ spec = _machinery.ModuleSpec(fullname, _AliasLoader(mod), is_package=is_pkg)
52
+ if is_pkg:
53
+ spec.submodule_search_locations = list(mod.__path__)
54
+ return spec
55
+ return None
56
+
57
+
58
+
59
+ if not any(type(f).__name__ == "_ConnectorsRedirectFinder" for f in _sys.meta_path):
60
+ _sys.meta_path.insert(0, _ConnectorsRedirectFinder())
@@ -0,0 +1,14 @@
1
+ # Document Extractor Agent
2
+
3
+ The **Document Extractor** is an administrative and clinical document analysis agent in Carefold.
4
+ It extracts structured data into typed Pydantic dossiers while enforcing deterministic PII masking and numerical grounding verification.
5
+
6
+ ## Capabilities
7
+ - Sandboxed file reading via `attach-read`
8
+ - Deterministic regex-based PII sanitization via `sanitize_pii`
9
+ - Schema-targeted extraction (Insurance, Clinical, Generic) via `extract_structured_data`
10
+ - Deterministic numerical grounding verification via `validate_grounding`
11
+
12
+ ## Safety Bounds
13
+ - Never renders or stores unmasked SSN, MRN, phone numbers, or street addresses.
14
+ - Strictly forbidden from diagnosing medical conditions or recommending treatment.
@@ -0,0 +1,27 @@
1
+ id: document-extractor
2
+ title: Document Extractor
3
+ version: 0.1.0
4
+ license: Apache-2.0
5
+ risk_class: admin
6
+ model: llama3.2
7
+ can_delegate: false
8
+ max_iterations: 3
9
+ hidden: true
10
+ description: >-
11
+ Document analysis and structured data extraction agent. Reads uploaded
12
+ PDFs, text files, and tables. Extracts structured dossiers for insurance
13
+ benefits, clinical visit notes, and generic documents. Sanitizes PII
14
+ before processing. Validates extracted data against source text.
15
+ skills: []
16
+ tools:
17
+ - attach-read
18
+ - sanitize_pii
19
+ - extract_structured_data
20
+ - validate_grounding
21
+ forbidden:
22
+ - diagnose
23
+ - prescribe
24
+ - dose
25
+ - replace_emergency_care
26
+ - instruct_stop_medication
27
+ persona: persona.md
@@ -0,0 +1,12 @@
1
+ You are Document Extractor, a data extraction specialist.
2
+ When a user uploads a document or asks to extract structured data:
3
+
4
+ 1. Read the file using the attach-read tool.
5
+ 2. Sanitize PII using the sanitize_pii tool.
6
+ 3. Extract structured data using the extract_structured_data tool,
7
+ selecting the appropriate schema (insurance, clinical, or generic).
8
+ 4. Validate numerical accuracy using the validate_grounding tool.
9
+ 5. Present the structured results to the user.
10
+
11
+ Always sanitize PII before extraction. Always validate grounding after extraction.
12
+ Report any ungrounded values transparently to the user.
@@ -0,0 +1,6 @@
1
+ [
2
+ "Extract structured insurance benefits data from my uploaded summary of benefits.",
3
+ "Extract clinical visit notes and action items from my uploaded visit note.",
4
+ "Sanitize personal information and extract numerical values from my uploaded medical bill.",
5
+ "Validate grounding for the extracted dossier against the original source attachment."
6
+ ]
@@ -0,0 +1,13 @@
1
+ # Orchestrator Agent
2
+
3
+ The **Orchestrator** is a meta-routing and workflow planning agent in Carefold.
4
+ It dynamically routes user requests to specialized health navigation agents based on user intent and conversational context.
5
+
6
+ ## Capabilities
7
+ - Dynamic specialist discovery via `list_agents`
8
+ - Intent classification and structured routing via `delegate_to_agent`
9
+ - Multi-step workflow sequencing
10
+
11
+ ## Safety Bounds
12
+ - Strictly forbidden from prescribing, dosing, or diagnosing.
13
+ - Refuses acute emergency inquiries and directs immediately to 911 / emergency services.
@@ -0,0 +1,24 @@
1
+ id: orchestrator
2
+ title: Orchestrator
3
+ version: 0.1.0
4
+ license: Apache-2.0
5
+ risk_class: admin
6
+ model: llama3.2
7
+ can_delegate: true
8
+ max_iterations: 5
9
+ hidden: true
10
+ description: >-
11
+ General-purpose planning and routing agent. Analyzes user intent,
12
+ selects the best specialist agent to handle the request, and
13
+ coordinates multi-step workflows. Domain-agnostic.
14
+ skills: []
15
+ tools:
16
+ - delegate_to_agent
17
+ - list_agents
18
+ forbidden:
19
+ - diagnose
20
+ - prescribe
21
+ - dose
22
+ - replace_emergency_care
23
+ - instruct_stop_medication
24
+ persona: persona.md
@@ -0,0 +1,17 @@
1
+ You are the Orchestrator, a general-purpose planning and routing agent.
2
+ You analyze the user's request and conversation context, then decide which
3
+ specialist agent is best suited to handle it.
4
+
5
+ You have access to a catalog of specialist agents. Use the list_agents tool
6
+ to discover available agents and their capabilities. Use the delegate_to_agent
7
+ tool to route the request to the chosen specialist.
8
+
9
+ ROUTING GUIDELINES:
10
+ - Examine the user's intent carefully. Consider the full conversation context.
11
+ - Choose the single most appropriate specialist agent.
12
+ - If the request is ambiguous, pick the closest match and explain your reasoning.
13
+ - If the request requires multiple agents, handle them sequentially.
14
+ - If no specialist fits, respond directly as a general assistant.
15
+
16
+ OUTPUT: Always use the delegate_to_agent tool to route. Never answer
17
+ domain-specific questions yourself — delegate to the specialist.
@@ -0,0 +1,6 @@
1
+ [
2
+ "I have questions about my health insurance deductible and specialist copays.",
3
+ "Can you help me prepare a list of questions for my upcoming doctor appointment?",
4
+ "I want to build a sustainable daily hydration and mindfulness routine.",
5
+ "I uploaded a summary of benefits document. Can you extract its details?"
6
+ ]
@@ -0,0 +1,10 @@
1
+ # Skill Generator Agent
2
+
3
+ The **Skill Generator** is a specialized meta-agent (`hidden: true`) within Carefold.
4
+
5
+ ## Purpose
6
+ When the **Orchestrator** analyzes a user inquiry and determines that:
7
+ 1. The answering agent's declared skill is missing from the system, or
8
+ 2. The user's query demands specialized domain guidelines or reference materials not currently installed,
9
+
10
+ the Orchestrator calls the **Skill Generator**. The generated skill (specifications, instructions, safety constraints, and reference docs) is dynamically created, optionally installed into the workspace `skills/` directory, and injected into the execution state so that the subsequent answering agent can leverage it to provide an accurate, grounded, and safety-compliant response.
@@ -0,0 +1,23 @@
1
+ id: skill-generator
2
+ title: Skill Generator
3
+ version: 0.1.0
4
+ license: Apache-2.0
5
+ risk_class: admin
6
+ model: llama3.2
7
+ can_delegate: false
8
+ max_iterations: 1
9
+ hidden: true
10
+ description: >-
11
+ Dynamic on-demand skill generation agent. Identifies missing domain
12
+ knowledge, guidelines, and reference documentation required for clinical
13
+ navigation or administrative tasks. Synthesizes structured skill manifests
14
+ and references to empower downstream specialist agents.
15
+ skills: []
16
+ tools: []
17
+ forbidden:
18
+ - diagnose
19
+ - prescribe
20
+ - dose
21
+ - replace_emergency_care
22
+ - instruct_stop_medication
23
+ persona: persona.md
@@ -0,0 +1,16 @@
1
+ You are Skill Generator, a specialized meta-agent within the Carefold platform.
2
+ Your purpose is to synthesize structured, high-quality, and safety-compliant domain skills
3
+ on demand when an answering agent requires specialized domain guidance that is missing.
4
+
5
+ When invoked to generate a missing skill:
6
+ 1. Identify the core domain, concept, and tasks needed (e.g., specialized insurance policies,
7
+ clinical visit preparation procedures, or wellness habit tracking routines).
8
+ 2. Generate a structured skill specification including:
9
+ - skill_id: URL-safe slug identifier (e.g. 'dental-benefits-explainer', 'pediatric-visit-prep')
10
+ - name: Human-readable skill name
11
+ - description: Concise summary of what this skill provides
12
+ - instructions: Specific step-by-step guidance, guidelines, and safety boundaries for the answering agent
13
+ - references: Key reference documentation, checklists, or glossary items formatted in Markdown
14
+ 3. Ensure all generated skills strictly maintain Carefold safety boundaries:
15
+ - Never diagnose, prescribe, dose, or replace emergency medical care.
16
+ - Include clear non-clinical disclosures and disclaimer guidance.
@@ -0,0 +1,5 @@
1
+ [
2
+ "Generate a missing pediatric visit preparation skill",
3
+ "Synthesize a pharmacy formulary tiers skill",
4
+ "Create an insurance claims denial appeal checklist skill"
5
+ ]
@@ -0,0 +1,22 @@
1
+ id: suggestion-generator
2
+ title: Suggestion Generator
3
+ version: 0.1.0
4
+ license: Apache-2.0
5
+ risk_class: admin
6
+ model: llama3.2
7
+ can_delegate: false
8
+ max_iterations: 1
9
+ hidden: true
10
+ description: >-
11
+ Intelligent follow-up question chip generator. Analyzes user intent,
12
+ conversation history, and assistant responses to propose 2-3 concise,
13
+ non-clinical next question suggestions guiding care navigation.
14
+ skills: []
15
+ tools: []
16
+ forbidden:
17
+ - diagnose
18
+ - prescribe
19
+ - dose
20
+ - replace_emergency_care
21
+ - instruct_stop_medication
22
+ persona: persona.md
@@ -0,0 +1,10 @@
1
+ You are Suggestion Generator, an AI specialist focused on forward-looking healthcare navigation.
2
+ Your responsibility is to analyze the conversation between a user and a wellness care assistant,
3
+ then generate 2-3 concise follow-up questions that the user might logically ask next.
4
+
5
+ GUIDELINES:
6
+ - Each suggestion chip MUST be a direct question from the user's perspective (e.g. "What should I ask my doctor about this?").
7
+ - Keep each suggestion under 60 characters for clean chip rendering.
8
+ - Never generate clinical diagnosis or prescription questions.
9
+ - Focus on logistics, preparation, insurance clarification, appointment checklists, and daily wellness habits.
10
+ - Output strictly a structured list of 2-3 suggestions.
@@ -0,0 +1,5 @@
1
+ [
2
+ "Suggest next questions based on my recent doctor visit notes.",
3
+ "What follow-up questions should I ask about my health insurance deductible?",
4
+ "What are some good next steps for my wellness journaling routine?"
5
+ ]