ziro-core 0.2.6__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 (282) hide show
  1. ziro_core-0.2.6/.gitignore +61 -0
  2. ziro_core-0.2.6/LICENSE +21 -0
  3. ziro_core-0.2.6/PKG-INFO +66 -0
  4. ziro_core-0.2.6/README.md +7 -0
  5. ziro_core-0.2.6/pyproject.toml +78 -0
  6. ziro_core-0.2.6/src/ziro/__init__.py +63 -0
  7. ziro_core-0.2.6/src/ziro/_hf_bootstrap.py +78 -0
  8. ziro_core-0.2.6/src/ziro/_version.py +24 -0
  9. ziro_core-0.2.6/src/ziro/agent.py +511 -0
  10. ziro_core-0.2.6/src/ziro/agents/.subagents/doc_writer.agent.md +37 -0
  11. ziro_core-0.2.6/src/ziro/agents/.subagents/fact_checker.agent.md +41 -0
  12. ziro_core-0.2.6/src/ziro/agents/.subagents/reflector.agent.md +27 -0
  13. ziro_core-0.2.6/src/ziro/agents/.subagents/reviewer.agent.md +35 -0
  14. ziro_core-0.2.6/src/ziro/agents/.subagents/scout.agent.md +30 -0
  15. ziro_core-0.2.6/src/ziro/agents/.subagents/solver.agent.md +37 -0
  16. ziro_core-0.2.6/src/ziro/agents/.subagents/summarizer.agent.md +36 -0
  17. ziro_core-0.2.6/src/ziro/agents/.subagents/tester.agent.md +42 -0
  18. ziro_core-0.2.6/src/ziro/agents/analyst/agent_config.yaml +38 -0
  19. ziro_core-0.2.6/src/ziro/agents/analyst/hooks.yaml +29 -0
  20. ziro_core-0.2.6/src/ziro/agents/analyst/meta.yaml +13 -0
  21. ziro_core-0.2.6/src/ziro/agents/analyst/permissions.yaml +10 -0
  22. ziro_core-0.2.6/src/ziro/agents/analyst/shell_policy.yaml +46 -0
  23. ziro_core-0.2.6/src/ziro/agents/analyst/subagent_policy.yaml +16 -0
  24. ziro_core-0.2.6/src/ziro/agents/analyst/tool_policy.yaml +29 -0
  25. ziro_core-0.2.6/src/ziro/agents/architect/agent_config.yaml +38 -0
  26. ziro_core-0.2.6/src/ziro/agents/architect/meta.yaml +13 -0
  27. ziro_core-0.2.6/src/ziro/agents/architect/permissions.yaml +9 -0
  28. ziro_core-0.2.6/src/ziro/agents/architect/subagent_policy.yaml +14 -0
  29. ziro_core-0.2.6/src/ziro/agents/architect/tool_policy.yaml +21 -0
  30. ziro_core-0.2.6/src/ziro/agents/coder/agent_config.yaml +40 -0
  31. ziro_core-0.2.6/src/ziro/agents/coder/hooks.yaml +31 -0
  32. ziro_core-0.2.6/src/ziro/agents/coder/meta.yaml +14 -0
  33. ziro_core-0.2.6/src/ziro/agents/coder/permissions.yaml +13 -0
  34. ziro_core-0.2.6/src/ziro/agents/coder/shell_policy.yaml +47 -0
  35. ziro_core-0.2.6/src/ziro/agents/coder/subagent_policy.yaml +17 -0
  36. ziro_core-0.2.6/src/ziro/agents/coder/tool_policy.yaml +29 -0
  37. ziro_core-0.2.6/src/ziro/agents/default/agent_config.yaml +110 -0
  38. ziro_core-0.2.6/src/ziro/agents/default/attachment_policy.yaml +8 -0
  39. ziro_core-0.2.6/src/ziro/agents/default/compaction_policy.yaml +24 -0
  40. ziro_core-0.2.6/src/ziro/agents/default/fs_policy.yaml +54 -0
  41. ziro_core-0.2.6/src/ziro/agents/default/guardrails_policy.yaml +145 -0
  42. ziro_core-0.2.6/src/ziro/agents/default/handoff_policy.yaml +12 -0
  43. ziro_core-0.2.6/src/ziro/agents/default/hooks.yaml +44 -0
  44. ziro_core-0.2.6/src/ziro/agents/default/mcp_servers.yaml +143 -0
  45. ziro_core-0.2.6/src/ziro/agents/default/memory_policy.yaml +17 -0
  46. ziro_core-0.2.6/src/ziro/agents/default/meta.yaml +19 -0
  47. ziro_core-0.2.6/src/ziro/agents/default/modes_policy.yaml +25 -0
  48. ziro_core-0.2.6/src/ziro/agents/default/permissions.yaml +27 -0
  49. ziro_core-0.2.6/src/ziro/agents/default/plugin_config.yaml +61 -0
  50. ziro_core-0.2.6/src/ziro/agents/default/shell_policy.yaml +29 -0
  51. ziro_core-0.2.6/src/ziro/agents/default/subagent_policy.yaml +32 -0
  52. ziro_core-0.2.6/src/ziro/agents/default/tool_policy.yaml +46 -0
  53. ziro_core-0.2.6/src/ziro/agents/default/voice_policy.yaml +29 -0
  54. ziro_core-0.2.6/src/ziro/agents/default/webfetch_policy.yaml +14 -0
  55. ziro_core-0.2.6/src/ziro/agents/default/websearch_policy.yaml +21 -0
  56. ziro_core-0.2.6/src/ziro/agents/life_coach/agent_config.yaml +49 -0
  57. ziro_core-0.2.6/src/ziro/agents/life_coach/attachment_policy.yaml +8 -0
  58. ziro_core-0.2.6/src/ziro/agents/life_coach/compaction_policy.yaml +24 -0
  59. ziro_core-0.2.6/src/ziro/agents/life_coach/guardrails_policy.yaml +145 -0
  60. ziro_core-0.2.6/src/ziro/agents/life_coach/handoff_policy.yaml +12 -0
  61. ziro_core-0.2.6/src/ziro/agents/life_coach/mcp_servers.yaml +53 -0
  62. ziro_core-0.2.6/src/ziro/agents/life_coach/memory_policy.yaml +17 -0
  63. ziro_core-0.2.6/src/ziro/agents/life_coach/meta.yaml +19 -0
  64. ziro_core-0.2.6/src/ziro/agents/life_coach/permissions.yaml +24 -0
  65. ziro_core-0.2.6/src/ziro/agents/life_coach/shell_policy.yaml +28 -0
  66. ziro_core-0.2.6/src/ziro/agents/life_coach/subagent_policy.yaml +17 -0
  67. ziro_core-0.2.6/src/ziro/agents/life_coach/tool_policy.yaml +15 -0
  68. ziro_core-0.2.6/src/ziro/agents/life_coach/voice_policy.yaml +29 -0
  69. ziro_core-0.2.6/src/ziro/agents/life_coach/webfetch_policy.yaml +14 -0
  70. ziro_core-0.2.6/src/ziro/agents/life_coach/websearch_policy.yaml +19 -0
  71. ziro_core-0.2.6/src/ziro/agents/product_manager/agent_config.yaml +36 -0
  72. ziro_core-0.2.6/src/ziro/agents/product_manager/meta.yaml +14 -0
  73. ziro_core-0.2.6/src/ziro/agents/product_manager/permissions.yaml +9 -0
  74. ziro_core-0.2.6/src/ziro/agents/product_manager/subagent_policy.yaml +15 -0
  75. ziro_core-0.2.6/src/ziro/agents/product_manager/tool_policy.yaml +22 -0
  76. ziro_core-0.2.6/src/ziro/agents/registry.yaml +10 -0
  77. ziro_core-0.2.6/src/ziro/agents/researcher/agent_config.yaml +74 -0
  78. ziro_core-0.2.6/src/ziro/agents/researcher/attachment_policy.yaml +8 -0
  79. ziro_core-0.2.6/src/ziro/agents/researcher/compaction_policy.yaml +25 -0
  80. ziro_core-0.2.6/src/ziro/agents/researcher/guardrails_policy.yaml +39 -0
  81. ziro_core-0.2.6/src/ziro/agents/researcher/handoff_policy.yaml +12 -0
  82. ziro_core-0.2.6/src/ziro/agents/researcher/hooks.yaml +71 -0
  83. ziro_core-0.2.6/src/ziro/agents/researcher/mcp_servers.yaml +56 -0
  84. ziro_core-0.2.6/src/ziro/agents/researcher/memory_policy.yaml +17 -0
  85. ziro_core-0.2.6/src/ziro/agents/researcher/meta.yaml +18 -0
  86. ziro_core-0.2.6/src/ziro/agents/researcher/permissions.yaml +22 -0
  87. ziro_core-0.2.6/src/ziro/agents/researcher/queue_policy.yaml +13 -0
  88. ziro_core-0.2.6/src/ziro/agents/researcher/shell_policy.yaml +29 -0
  89. ziro_core-0.2.6/src/ziro/agents/researcher/subagent_policy.yaml +22 -0
  90. ziro_core-0.2.6/src/ziro/agents/researcher/tool_policy.yaml +24 -0
  91. ziro_core-0.2.6/src/ziro/agents/researcher/voice_policy.yaml +29 -0
  92. ziro_core-0.2.6/src/ziro/agents/researcher/webfetch_policy.yaml +15 -0
  93. ziro_core-0.2.6/src/ziro/agents/researcher/websearch_policy.yaml +22 -0
  94. ziro_core-0.2.6/src/ziro/agents/researcher_docker/agent_config.yaml +67 -0
  95. ziro_core-0.2.6/src/ziro/agents/researcher_docker/attachment_policy.yaml +8 -0
  96. ziro_core-0.2.6/src/ziro/agents/researcher_docker/compaction_policy.yaml +25 -0
  97. ziro_core-0.2.6/src/ziro/agents/researcher_docker/guardrails_policy.yaml +39 -0
  98. ziro_core-0.2.6/src/ziro/agents/researcher_docker/handoff_policy.yaml +12 -0
  99. ziro_core-0.2.6/src/ziro/agents/researcher_docker/hooks.yaml +71 -0
  100. ziro_core-0.2.6/src/ziro/agents/researcher_docker/mcp_servers.yaml +18 -0
  101. ziro_core-0.2.6/src/ziro/agents/researcher_docker/memory_policy.yaml +17 -0
  102. ziro_core-0.2.6/src/ziro/agents/researcher_docker/meta.yaml +18 -0
  103. ziro_core-0.2.6/src/ziro/agents/researcher_docker/permissions.yaml +22 -0
  104. ziro_core-0.2.6/src/ziro/agents/researcher_docker/shell_policy.yaml +36 -0
  105. ziro_core-0.2.6/src/ziro/agents/researcher_docker/subagent_policy.yaml +20 -0
  106. ziro_core-0.2.6/src/ziro/agents/researcher_docker/tool_policy.yaml +19 -0
  107. ziro_core-0.2.6/src/ziro/agents/researcher_docker/webfetch_policy.yaml +15 -0
  108. ziro_core-0.2.6/src/ziro/agents/researcher_docker/websearch_policy.yaml +22 -0
  109. ziro_core-0.2.6/src/ziro/agents/solver/meta.yaml +7 -0
  110. ziro_core-0.2.6/src/ziro/agents/solver/permissions.yaml +11 -0
  111. ziro_core-0.2.6/src/ziro/agents/tester/meta.yaml +7 -0
  112. ziro_core-0.2.6/src/ziro/agents/tester/permissions.yaml +12 -0
  113. ziro_core-0.2.6/src/ziro/agents/writer/agent_config.yaml +40 -0
  114. ziro_core-0.2.6/src/ziro/agents/writer/meta.yaml +13 -0
  115. ziro_core-0.2.6/src/ziro/agents/writer/permissions.yaml +10 -0
  116. ziro_core-0.2.6/src/ziro/agents/writer/subagent_policy.yaml +15 -0
  117. ziro_core-0.2.6/src/ziro/agents/writer/tool_policy.yaml +24 -0
  118. ziro_core-0.2.6/src/ziro/agents_md.py +49 -0
  119. ziro_core-0.2.6/src/ziro/capabilities/__init__.py +40 -0
  120. ziro_core-0.2.6/src/ziro/capabilities/audit.py +71 -0
  121. ziro_core-0.2.6/src/ziro/capabilities/builtins.py +143 -0
  122. ziro_core-0.2.6/src/ziro/capabilities/context.py +28 -0
  123. ziro_core-0.2.6/src/ziro/capabilities/handle.py +41 -0
  124. ziro_core-0.2.6/src/ziro/capabilities/manager.py +376 -0
  125. ziro_core-0.2.6/src/ziro/capabilities/models.py +160 -0
  126. ziro_core-0.2.6/src/ziro/capabilities/registry.py +57 -0
  127. ziro_core-0.2.6/src/ziro/clarify/__init__.py +0 -0
  128. ziro_core-0.2.6/src/ziro/clarify/models.py +30 -0
  129. ziro_core-0.2.6/src/ziro/clarify/tools.py +70 -0
  130. ziro_core-0.2.6/src/ziro/compaction/__init__.py +40 -0
  131. ziro_core-0.2.6/src/ziro/compaction/models.py +87 -0
  132. ziro_core-0.2.6/src/ziro/compaction/node.py +202 -0
  133. ziro_core-0.2.6/src/ziro/compaction/summarizer.py +76 -0
  134. ziro_core-0.2.6/src/ziro/compaction/tokenizer.py +87 -0
  135. ziro_core-0.2.6/src/ziro/compaction/window.py +192 -0
  136. ziro_core-0.2.6/src/ziro/core/__init__.py +0 -0
  137. ziro_core-0.2.6/src/ziro/core/agent_md.py +80 -0
  138. ziro_core-0.2.6/src/ziro/core/agent_profiles.py +720 -0
  139. ziro_core-0.2.6/src/ziro/core/config.py +826 -0
  140. ziro_core-0.2.6/src/ziro/core/embeddings.py +142 -0
  141. ziro_core-0.2.6/src/ziro/core/flavour_apply.py +83 -0
  142. ziro_core-0.2.6/src/ziro/core/flavour_runtime.py +50 -0
  143. ziro_core-0.2.6/src/ziro/core/flavours.py +75 -0
  144. ziro_core-0.2.6/src/ziro/core/paths.py +289 -0
  145. ziro_core-0.2.6/src/ziro/core/retry.py +93 -0
  146. ziro_core-0.2.6/src/ziro/core/skills_catalog.py +179 -0
  147. ziro_core-0.2.6/src/ziro/core/thread_titles.py +48 -0
  148. ziro_core-0.2.6/src/ziro/core/trust.py +203 -0
  149. ziro_core-0.2.6/src/ziro/core/ui_prefs.py +47 -0
  150. ziro_core-0.2.6/src/ziro/core/update_check.py +110 -0
  151. ziro_core-0.2.6/src/ziro/flavours/chat/flavour.yaml +6 -0
  152. ziro_core-0.2.6/src/ziro/flavours/chat/persona.md +16 -0
  153. ziro_core-0.2.6/src/ziro/flavours/engineering/flavour.yaml +22 -0
  154. ziro_core-0.2.6/src/ziro/flavours/engineering/persona.md +8 -0
  155. ziro_core-0.2.6/src/ziro/flavours/research/flavour.yaml +30 -0
  156. ziro_core-0.2.6/src/ziro/flavours/research/persona.md +3 -0
  157. ziro_core-0.2.6/src/ziro/flavours/safe/flavour.yaml +9 -0
  158. ziro_core-0.2.6/src/ziro/flavours/safe/persona.md +3 -0
  159. ziro_core-0.2.6/src/ziro/fs/__init__.py +0 -0
  160. ziro_core-0.2.6/src/ziro/fs/models.py +69 -0
  161. ziro_core-0.2.6/src/ziro/fs/scratch.py +82 -0
  162. ziro_core-0.2.6/src/ziro/fs/tools.py +430 -0
  163. ziro_core-0.2.6/src/ziro/graph/__init__.py +0 -0
  164. ziro_core-0.2.6/src/ziro/graph/graph.py +557 -0
  165. ziro_core-0.2.6/src/ziro/graph/interrupts.py +327 -0
  166. ziro_core-0.2.6/src/ziro/graph/nodes.py +926 -0
  167. ziro_core-0.2.6/src/ziro/graph/state.py +147 -0
  168. ziro_core-0.2.6/src/ziro/guardrails/__init__.py +34 -0
  169. ziro_core-0.2.6/src/ziro/guardrails/backends.py +613 -0
  170. ziro_core-0.2.6/src/ziro/guardrails/evaluator.py +90 -0
  171. ziro_core-0.2.6/src/ziro/guardrails/models.py +136 -0
  172. ziro_core-0.2.6/src/ziro/guardrails/nodes.py +71 -0
  173. ziro_core-0.2.6/src/ziro/guardrails/policy_loader.py +30 -0
  174. ziro_core-0.2.6/src/ziro/handoff/__init__.py +7 -0
  175. ziro_core-0.2.6/src/ziro/handoff/models.py +27 -0
  176. ziro_core-0.2.6/src/ziro/handoff/tools.py +54 -0
  177. ziro_core-0.2.6/src/ziro/hooks/__init__.py +30 -0
  178. ziro_core-0.2.6/src/ziro/hooks/callables.py +126 -0
  179. ziro_core-0.2.6/src/ziro/hooks/guards.py +324 -0
  180. ziro_core-0.2.6/src/ziro/hooks/models.py +120 -0
  181. ziro_core-0.2.6/src/ziro/hooks/registry.py +86 -0
  182. ziro_core-0.2.6/src/ziro/hooks/runner.py +31 -0
  183. ziro_core-0.2.6/src/ziro/io/__init__.py +1 -0
  184. ziro_core-0.2.6/src/ziro/io/attachments.py +155 -0
  185. ziro_core-0.2.6/src/ziro/llm/__init__.py +4 -0
  186. ziro_core-0.2.6/src/ziro/llm/adapter.py +86 -0
  187. ziro_core-0.2.6/src/ziro/llm/capabilities.py +74 -0
  188. ziro_core-0.2.6/src/ziro/llm/custom.py +269 -0
  189. ziro_core-0.2.6/src/ziro/llm/model_tiers.py +31 -0
  190. ziro_core-0.2.6/src/ziro/llm/models.py +72 -0
  191. ziro_core-0.2.6/src/ziro/llm/providers/__init__.py +2 -0
  192. ziro_core-0.2.6/src/ziro/llm/providers/anthropic/__init__.py +26 -0
  193. ziro_core-0.2.6/src/ziro/llm/providers/anthropic/adapter.py +108 -0
  194. ziro_core-0.2.6/src/ziro/llm/providers/anthropic/catalog.py +106 -0
  195. ziro_core-0.2.6/src/ziro/llm/providers/anthropic/connection.py +15 -0
  196. ziro_core-0.2.6/src/ziro/llm/providers/openai/__init__.py +29 -0
  197. ziro_core-0.2.6/src/ziro/llm/providers/openai/adapter.py +123 -0
  198. ziro_core-0.2.6/src/ziro/llm/providers/openai/catalog.py +127 -0
  199. ziro_core-0.2.6/src/ziro/llm/providers/openai/connection.py +22 -0
  200. ziro_core-0.2.6/src/ziro/llm/providers/openrouter/__init__.py +27 -0
  201. ziro_core-0.2.6/src/ziro/llm/providers/openrouter/adapter.py +127 -0
  202. ziro_core-0.2.6/src/ziro/llm/providers/openrouter/catalog.py +291 -0
  203. ziro_core-0.2.6/src/ziro/llm/providers/openrouter/connection.py +24 -0
  204. ziro_core-0.2.6/src/ziro/llm/registry.py +78 -0
  205. ziro_core-0.2.6/src/ziro/memory/__init__.py +0 -0
  206. ziro_core-0.2.6/src/ziro/memory/checkpointer.py +52 -0
  207. ziro_core-0.2.6/src/ziro/memory/models.py +111 -0
  208. ziro_core-0.2.6/src/ziro/memory/node.py +63 -0
  209. ziro_core-0.2.6/src/ziro/memory/project_memory.py +153 -0
  210. ziro_core-0.2.6/src/ziro/memory/reflection.py +88 -0
  211. ziro_core-0.2.6/src/ziro/memory/store.py +215 -0
  212. ziro_core-0.2.6/src/ziro/modes/__init__.py +0 -0
  213. ziro_core-0.2.6/src/ziro/modes/models.py +50 -0
  214. ziro_core-0.2.6/src/ziro/modes/tools.py +62 -0
  215. ziro_core-0.2.6/src/ziro/permissions/__init__.py +43 -0
  216. ziro_core-0.2.6/src/ziro/permissions/gate.py +49 -0
  217. ziro_core-0.2.6/src/ziro/permissions/hook.py +67 -0
  218. ziro_core-0.2.6/src/ziro/permissions/mode.py +74 -0
  219. ziro_core-0.2.6/src/ziro/permissions/models.py +73 -0
  220. ziro_core-0.2.6/src/ziro/permissions/policy.py +85 -0
  221. ziro_core-0.2.6/src/ziro/permissions/store.py +37 -0
  222. ziro_core-0.2.6/src/ziro/permissions/validate.py +122 -0
  223. ziro_core-0.2.6/src/ziro/plugins/__init__.py +24 -0
  224. ziro_core-0.2.6/src/ziro/plugins/adapters/__init__.py +1 -0
  225. ziro_core-0.2.6/src/ziro/plugins/adapters/import_claude_code.py +190 -0
  226. ziro_core-0.2.6/src/ziro/plugins/consent.py +129 -0
  227. ziro_core-0.2.6/src/ziro/plugins/discovery.py +568 -0
  228. ziro_core-0.2.6/src/ziro/plugins/installer.py +277 -0
  229. ziro_core-0.2.6/src/ziro/plugins/marketplace.py +291 -0
  230. ziro_core-0.2.6/src/ziro/plugins/models.py +53 -0
  231. ziro_core-0.2.6/src/ziro/plugins/registry.py +28 -0
  232. ziro_core-0.2.6/src/ziro/profiles/__init__.py +208 -0
  233. ziro_core-0.2.6/src/ziro/profiles/spec_profile.py +277 -0
  234. ziro_core-0.2.6/src/ziro/py.typed +0 -0
  235. ziro_core-0.2.6/src/ziro/queue/__init__.py +9 -0
  236. ziro_core-0.2.6/src/ziro/queue/inflight.py +46 -0
  237. ziro_core-0.2.6/src/ziro/queue/models.py +75 -0
  238. ziro_core-0.2.6/src/ziro/queue/worker.py +310 -0
  239. ziro_core-0.2.6/src/ziro/rag/__init__.py +0 -0
  240. ziro_core-0.2.6/src/ziro/rag/indexer.py +109 -0
  241. ziro_core-0.2.6/src/ziro/rag/retriever.py +309 -0
  242. ziro_core-0.2.6/src/ziro/runtime/__init__.py +4 -0
  243. ziro_core-0.2.6/src/ziro/runtime/runner.py +1103 -0
  244. ziro_core-0.2.6/src/ziro/spec.py +116 -0
  245. ziro_core-0.2.6/src/ziro/state/__init__.py +2 -0
  246. ziro_core-0.2.6/src/ziro/state/env_store.py +185 -0
  247. ziro_core-0.2.6/src/ziro/state/fileio.py +69 -0
  248. ziro_core-0.2.6/src/ziro/state/projects_index.py +48 -0
  249. ziro_core-0.2.6/src/ziro/state/threads_index.py +309 -0
  250. ziro_core-0.2.6/src/ziro/state/users.py +87 -0
  251. ziro_core-0.2.6/src/ziro/subagents/__init__.py +12 -0
  252. ziro_core-0.2.6/src/ziro/subagents/models.py +85 -0
  253. ziro_core-0.2.6/src/ziro/subagents/orchestrator.py +452 -0
  254. ziro_core-0.2.6/src/ziro/subagents/tool.py +147 -0
  255. ziro_core-0.2.6/src/ziro/tasks/__init__.py +25 -0
  256. ziro_core-0.2.6/src/ziro/tasks/models.py +21 -0
  257. ziro_core-0.2.6/src/ziro/tasks/reducer.py +58 -0
  258. ziro_core-0.2.6/src/ziro/tasks/render.py +36 -0
  259. ziro_core-0.2.6/src/ziro/tasks/tools.py +126 -0
  260. ziro_core-0.2.6/src/ziro/tools/__init__.py +0 -0
  261. ziro_core-0.2.6/src/ziro/tools/bootstrap.py +223 -0
  262. ziro_core-0.2.6/src/ziro/tools/indexer.py +36 -0
  263. ziro_core-0.2.6/src/ziro/tools/mcp_client.py +305 -0
  264. ziro_core-0.2.6/src/ziro/tools/mcp_manager.py +494 -0
  265. ziro_core-0.2.6/src/ziro/tools/mcp_models.py +73 -0
  266. ziro_core-0.2.6/src/ziro/tools/meta_tools.py +177 -0
  267. ziro_core-0.2.6/src/ziro/tools/oauth.py +357 -0
  268. ziro_core-0.2.6/src/ziro/tools/registry.py +277 -0
  269. ziro_core-0.2.6/src/ziro/tools/shell.py +499 -0
  270. ziro_core-0.2.6/src/ziro/tools/shell_audit.py +151 -0
  271. ziro_core-0.2.6/src/ziro/tools/shell_models.py +142 -0
  272. ziro_core-0.2.6/src/ziro/types.py +27 -0
  273. ziro_core-0.2.6/src/ziro/voice/__init__.py +7 -0
  274. ziro_core-0.2.6/src/ziro/voice/backends.py +170 -0
  275. ziro_core-0.2.6/src/ziro/voice/models.py +65 -0
  276. ziro_core-0.2.6/src/ziro/voice/pipeline.py +180 -0
  277. ziro_core-0.2.6/src/ziro/webfetch/__init__.py +6 -0
  278. ziro_core-0.2.6/src/ziro/webfetch/models.py +22 -0
  279. ziro_core-0.2.6/src/ziro/webfetch/tool.py +263 -0
  280. ziro_core-0.2.6/src/ziro/websearch/__init__.py +11 -0
  281. ziro_core-0.2.6/src/ziro/websearch/models.py +27 -0
  282. ziro_core-0.2.6/src/ziro/websearch/tool.py +120 -0
@@ -0,0 +1,61 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+ # generated by hatch-vcs at build time
9
+ packages/ziro-core/src/ziro/_version.py
10
+ tmp/
11
+ .mypy_cache/
12
+ **/.mypy_cache/
13
+
14
+ # Virtual environments
15
+ .venv
16
+ # A second env for regenerating Linux-only UI snapshots from WSL, kept separate
17
+ # so it never clobbers the Windows .venv sharing this working tree.
18
+ .venv-linux
19
+
20
+ # Local git worktrees
21
+ .worktrees/
22
+
23
+ # Environment variables
24
+ .env
25
+ # Next.js reads these; .env.example is committed as the template.
26
+ .env.local
27
+ .env*.local
28
+ .mcp.json
29
+
30
+ # Dev data (SQLite checkpoints and FAISS indexes)
31
+ data/*.db
32
+ data/*.db-*
33
+ data/faiss_*/
34
+ data/audit/
35
+ data/voices/
36
+ data/mcp_oauth/
37
+ data/model_catalog.json
38
+ data/models/
39
+ data/*
40
+ *.log
41
+ snapshot_report.html
42
+ data/threads.json
43
+ data/threads.json.pre-flavour.bak
44
+
45
+ # Node / pnpm / turborepo
46
+ node_modules/
47
+ .turbo/
48
+ .pnpm-store/
49
+
50
+ # Mintlify local build
51
+ .mintlify/
52
+ apps/docs/.mintlify/
53
+
54
+ # Playwright MCP scratch output
55
+ .playwright-mcp/
56
+
57
+ # Next.js (apps/web)
58
+ .next/
59
+ next-env.d.ts
60
+ .vercel/
61
+ *.tsbuildinfo
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 hRupanjan
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.
@@ -0,0 +1,66 @@
1
+ Metadata-Version: 2.4
2
+ Name: ziro-core
3
+ Version: 0.2.6
4
+ Summary: Ziro SDK — the agent engine (graph, tools, memory, RAG, guardrails, LLM adapters)
5
+ Project-URL: Repository, https://github.com/hRupanjan/ziro
6
+ Project-URL: Issues, https://github.com/hRupanjan/ziro/issues
7
+ Author-email: hRupanjan <hrupanjan@gmail.com>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: agent,langgraph,llm,memory,rag
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
17
+ Requires-Python: >=3.11.9
18
+ Requires-Dist: aiosqlite~=0.22.1
19
+ Requires-Dist: ddgs<10,>=9
20
+ Requires-Dist: faiss-cpu~=1.14.2
21
+ Requires-Dist: httpx~=0.28.1
22
+ Requires-Dist: langchain-anthropic~=1.4.8
23
+ Requires-Dist: langchain-community~=0.4.2
24
+ Requires-Dist: langchain-core~=1.4.6
25
+ Requires-Dist: langchain-huggingface~=1.2.2
26
+ Requires-Dist: langchain-mcp-adapters~=0.3.0
27
+ Requires-Dist: langchain-openai~=1.3.0
28
+ Requires-Dist: langchain-postgres~=0.0.17
29
+ Requires-Dist: langchain-text-splitters~=1.1.2
30
+ Requires-Dist: langchain~=1.3.9
31
+ Requires-Dist: langfuse~=4.12.0
32
+ Requires-Dist: langgraph-checkpoint-postgres~=3.1.0
33
+ Requires-Dist: langgraph-checkpoint-sqlite~=3.1.0
34
+ Requires-Dist: langgraph~=1.2.4
35
+ Requires-Dist: langsmith~=0.8.18
36
+ Requires-Dist: loguru~=0.7.3
37
+ Requires-Dist: pathspec~=1.1.1
38
+ Requires-Dist: psycopg[binary]~=3.3.4
39
+ Requires-Dist: pypdf~=6.13.3
40
+ Requires-Dist: python-dotenv~=1.2.2
41
+ Requires-Dist: rich~=15.0.0
42
+ Requires-Dist: sentence-transformers~=5.5.1
43
+ Requires-Dist: torch~=2.13.0
44
+ Requires-Dist: transformers~=5.12.0
45
+ Provides-Extra: all
46
+ Requires-Dist: faster-whisper~=1.2.1; extra == 'all'
47
+ Requires-Dist: llama-cpp-python~=0.3.29; extra == 'all'
48
+ Requires-Dist: piper-tts~=1.4.2; extra == 'all'
49
+ Requires-Dist: presidio-analyzer~=2.2.362; extra == 'all'
50
+ Requires-Dist: sounddevice~=0.5.5; extra == 'all'
51
+ Provides-Extra: guardrails-local
52
+ Requires-Dist: llama-cpp-python~=0.3.29; extra == 'guardrails-local'
53
+ Requires-Dist: presidio-analyzer~=2.2.362; extra == 'guardrails-local'
54
+ Provides-Extra: voice-local
55
+ Requires-Dist: faster-whisper~=1.2.1; extra == 'voice-local'
56
+ Requires-Dist: piper-tts~=1.4.2; extra == 'voice-local'
57
+ Requires-Dist: sounddevice~=0.5.5; extra == 'voice-local'
58
+ Description-Content-Type: text/markdown
59
+
60
+ # ziro-core
61
+
62
+ The Ziro SDK: the agent engine (LangGraph graph, progressive tools, memory,
63
+ RAG, guardrails, compaction, LLM adapters). Import package: `ziro`.
64
+
65
+ `pip install ziro` (the meta package) for the full TUI experience;
66
+ `pip install ziro-core` for the embeddable SDK alone.
@@ -0,0 +1,7 @@
1
+ # ziro-core
2
+
3
+ The Ziro SDK: the agent engine (LangGraph graph, progressive tools, memory,
4
+ RAG, guardrails, compaction, LLM adapters). Import package: `ziro`.
5
+
6
+ `pip install ziro` (the meta package) for the full TUI experience;
7
+ `pip install ziro-core` for the embeddable SDK alone.
@@ -0,0 +1,78 @@
1
+ [project]
2
+ name = "ziro-core"
3
+ dynamic = ["version"]
4
+ description = "Ziro SDK — the agent engine (graph, tools, memory, RAG, guardrails, LLM adapters)"
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ license-files = ["LICENSE"]
8
+ authors = [{ name = "hRupanjan", email = "hrupanjan@gmail.com" }]
9
+ keywords = ["agent", "llm", "langgraph", "rag", "memory"]
10
+ classifiers = [
11
+ "Development Status :: 4 - Beta",
12
+ "Intended Audience :: Developers",
13
+ "Programming Language :: Python :: 3.11",
14
+ "Programming Language :: Python :: 3.12",
15
+ "Programming Language :: Python :: 3.13",
16
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
17
+ ]
18
+ requires-python = ">=3.11.9"
19
+ dependencies = [
20
+ "langchain~=1.3.9",
21
+ "langchain-core~=1.4.6",
22
+ "langgraph~=1.2.4",
23
+ "langsmith~=0.8.18",
24
+ "langchain-openai~=1.3.0",
25
+ "langchain-huggingface~=1.2.2",
26
+ "sentence-transformers~=5.5.1",
27
+ "transformers~=5.12.0",
28
+ "torch~=2.13.0",
29
+ "langchain-community~=0.4.2",
30
+ "langchain-postgres~=0.0.17",
31
+ "faiss-cpu~=1.14.2",
32
+ "langchain-text-splitters~=1.1.2",
33
+ "pypdf~=6.13.3",
34
+ "aiosqlite~=0.22.1",
35
+ "langgraph-checkpoint-sqlite~=3.1.0",
36
+ "psycopg[binary]~=3.3.4",
37
+ "langgraph-checkpoint-postgres~=3.1.0",
38
+ "langchain-mcp-adapters~=0.3.0",
39
+ "langfuse~=4.12.0",
40
+ "httpx~=0.28.1",
41
+ "python-dotenv~=1.2.2",
42
+ "loguru~=0.7.3",
43
+ "rich~=15.0.0",
44
+ "langchain-anthropic~=1.4.8",
45
+ "pathspec~=1.1.1",
46
+ "ddgs>=9,<10", # keyless DuckDuckGo backend for the native web_search tool
47
+ ]
48
+
49
+ [project.optional-dependencies]
50
+ guardrails-local = [
51
+ "presidio-analyzer~=2.2.362",
52
+ "llama-cpp-python~=0.3.29",
53
+ ]
54
+ voice-local = [
55
+ "faster-whisper~=1.2.1",
56
+ "piper-tts~=1.4.2",
57
+ "sounddevice~=0.5.5",
58
+ ]
59
+ all = ["ziro-core[guardrails-local,voice-local]"]
60
+
61
+ [project.urls]
62
+ Repository = "https://github.com/hRupanjan/ziro"
63
+ Issues = "https://github.com/hRupanjan/ziro/issues"
64
+
65
+ [build-system]
66
+ requires = ["hatchling", "hatch-vcs"]
67
+ build-backend = "hatchling.build"
68
+
69
+ # Lockstep version from the ROOT repo's git tag.
70
+ [tool.hatch.version]
71
+ source = "vcs"
72
+ raw-options = { root = "../.." }
73
+
74
+ [tool.hatch.build.hooks.vcs]
75
+ version-file = "src/ziro/_version.py"
76
+
77
+ [tool.hatch.build.targets.wheel]
78
+ packages = ["src/ziro"]
@@ -0,0 +1,63 @@
1
+ """Ziro — the public, semver'd Python SDK.
2
+
3
+ ``import ziro`` is the ONLY supported, documented surface. Everything under
4
+ ``app.*`` is internal and may change without a major-version bump. The SDK is a
5
+ thin facade over the F12 ``TurnRunner`` shared turn core: it resolves a profile,
6
+ builds the graph, and drives turns through the one resume loop the CLI also uses.
7
+
8
+ Imports are **lazy** (PEP 562 module ``__getattr__``): ``import ziro`` pulls no
9
+ torch / graph stack — those load only when you touch ``ziro.Ziro`` (i.e. when you
10
+ actually build an agent). This keeps the SDK cheap to import in a host app.
11
+ """
12
+ from __future__ import annotations
13
+
14
+ from typing import TYPE_CHECKING
15
+
16
+ __all__ = [
17
+ "Ziro",
18
+ "CapabilitiesHandle",
19
+ "TurnResult",
20
+ "StreamEvent",
21
+ "create_agent",
22
+ "Agent",
23
+ "AgentSpec",
24
+ "ToolConfig",
25
+ "Guardrails",
26
+ "PluginConfig",
27
+ ]
28
+
29
+ try:
30
+ # Written at build time by hatch-vcs from the git tag (see pyproject.toml).
31
+ from ziro._version import __version__
32
+ except ImportError: # raw source tree with no tag / no VCS metadata
33
+ __version__ = "0.0.0+unknown"
34
+
35
+ if TYPE_CHECKING: # for type-checkers / IDEs only — no runtime import cost
36
+ from ziro.agent import Agent, Ziro, create_agent
37
+ from ziro.capabilities.handle import CapabilitiesHandle
38
+ from ziro.spec import AgentSpec, Guardrails, PluginConfig, ToolConfig
39
+ from ziro.types import StreamEvent, TurnResult
40
+
41
+
42
+ def __getattr__(name: str):
43
+ if name in ("Ziro", "Agent", "create_agent"):
44
+ from ziro import agent
45
+
46
+ return getattr(agent, name)
47
+ if name in ("AgentSpec", "ToolConfig", "Guardrails", "PluginConfig"):
48
+ from ziro import spec
49
+
50
+ return getattr(spec, name)
51
+ if name == "CapabilitiesHandle":
52
+ from ziro.capabilities.handle import CapabilitiesHandle
53
+
54
+ return CapabilitiesHandle
55
+ if name in ("TurnResult", "StreamEvent"):
56
+ from ziro import types
57
+
58
+ return getattr(types, name)
59
+ raise AttributeError(f"module 'ziro' has no attribute {name!r}")
60
+
61
+
62
+ def __dir__() -> list[str]:
63
+ return sorted(__all__)
@@ -0,0 +1,78 @@
1
+ """F24 — HuggingFace offline bootstrap (runs before any transformers/hub import).
2
+
3
+ ``huggingface_hub`` reads ``HF_HUB_OFFLINE`` into a module constant **once, at
4
+ import time**, and it is imported very early (via
5
+ ``langchain_core.language_models.base`` → ``transformers``). Setting the env var any
6
+ later has no effect (verified during implementation). The only chokepoint that runs
7
+ before that import is ``app/__init__.py``, which calls :func:`configure_hf_offline`
8
+ here.
9
+
10
+ Going offline removes ~9 s of HuggingFace Hub revision/etag checks per launch (a
11
+ cached-model construct drops from ~9.2 s to ~0.3 s) **and** pins the embedding space
12
+ to the cached revision the FAISS index was built against. To stay correct on a fresh
13
+ machine, we only go offline when the model is **already cached** (a pure filesystem
14
+ check, no import) — otherwise the one-time download still runs. This module imports
15
+ nothing but :mod:`os` so it can run before the heavy import web.
16
+ """
17
+
18
+ from __future__ import annotations
19
+
20
+ import os
21
+
22
+ _EMB_MODEL = "sentence-transformers/all-MiniLM-L6-v2"
23
+
24
+
25
+ def _hub_cache_dir() -> str:
26
+ """The HuggingFace hub cache directory, honouring the standard env overrides."""
27
+ cache = os.environ.get("HUGGINGFACE_HUB_CACHE")
28
+ if cache:
29
+ return cache
30
+ home = os.environ.get("HF_HOME") or os.path.join(
31
+ os.path.expanduser("~"), ".cache", "huggingface"
32
+ )
33
+ return os.path.join(home, "hub")
34
+
35
+
36
+ def _embeddings_cached(model: str = _EMB_MODEL) -> bool:
37
+ """True iff a usable snapshot of ``model`` is already in the hub cache.
38
+
39
+ A usable snapshot carries ``config.json``; checking for it (rather than just the
40
+ snapshots dir) guards against a half-populated cache.
41
+ """
42
+ folder = "models--" + model.replace("/", "--")
43
+ snapshots = os.path.join(_hub_cache_dir(), folder, "snapshots")
44
+ if not os.path.isdir(snapshots):
45
+ return False
46
+ try:
47
+ for snap in os.listdir(snapshots):
48
+ if os.path.exists(os.path.join(snapshots, snap, "config.json")):
49
+ return True
50
+ except OSError:
51
+ return False
52
+ return False
53
+
54
+
55
+ def configure_hf_offline() -> bool:
56
+ """Set ``HF_HUB_OFFLINE``/``TRANSFORMERS_OFFLINE`` when safe. Returns True iff
57
+ offline is in effect. MUST run before any ``huggingface_hub`` import.
58
+
59
+ Precedence: ``ZIRO_NO_ENV_MUTATION=1`` disables all host-env mutation (for
60
+ embedders — ``import ziro`` must not silently touch the host process env);
61
+ an explicit operator ``HF_HUB_OFFLINE`` is never overridden;
62
+ ``ZIRO_EMBEDDINGS_OFFLINE=1`` forces offline regardless of cache; otherwise
63
+ we go offline only when the embeddings model is already cached.
64
+ """
65
+ if os.environ.get("ZIRO_NO_ENV_MUTATION") == "1":
66
+ # Never write to the host env. Report the current offline state, but leave
67
+ # it to the operator to set HF_HUB_OFFLINE explicitly when embedding Ziro.
68
+ explicit_ro = os.environ.get("HF_HUB_OFFLINE")
69
+ return explicit_ro not in (None, "0", "", "false", "False")
70
+ explicit = os.environ.get("HF_HUB_OFFLINE")
71
+ if explicit is not None: # respect an operator's explicit choice, either way
72
+ return explicit not in ("0", "", "false", "False")
73
+ forced = os.environ.get("ZIRO_EMBEDDINGS_OFFLINE", "") in ("1", "true", "True")
74
+ if forced or _embeddings_cached():
75
+ os.environ["HF_HUB_OFFLINE"] = "1"
76
+ os.environ["TRANSFORMERS_OFFLINE"] = "1"
77
+ return True
78
+ return False
@@ -0,0 +1,24 @@
1
+ # file generated by vcs-versioning
2
+ # don't change, don't track in version control
3
+ from __future__ import annotations
4
+
5
+ __all__ = [
6
+ "__version__",
7
+ "__version_tuple__",
8
+ "version",
9
+ "version_tuple",
10
+ "__commit_id__",
11
+ "commit_id",
12
+ ]
13
+
14
+ version: str
15
+ __version__: str
16
+ __version_tuple__: tuple[int | str, ...]
17
+ version_tuple: tuple[int | str, ...]
18
+ commit_id: str | None
19
+ __commit_id__: str | None
20
+
21
+ __version__ = version = '0.2.6'
22
+ __version_tuple__ = version_tuple = (0, 2, 6)
23
+
24
+ __commit_id__ = commit_id = None