arkaos 4.14.0 → 4.14.2

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 (486) hide show
  1. package/README.md +25 -3
  2. package/VERSION +1 -1
  3. package/knowledge/skills-manifest.json +1 -1
  4. package/mcps/arka-prompts/commands.py +451 -0
  5. package/mcps/arka-prompts/pyproject.toml +15 -0
  6. package/mcps/arka-prompts/server.py +156 -0
  7. package/mcps/arka-tools/pyproject.toml +10 -0
  8. package/mcps/arka-tools/server.py +319 -0
  9. package/mcps/profiles/base.json +19 -0
  10. package/mcps/profiles/brand.json +19 -0
  11. package/mcps/profiles/comms.json +13 -0
  12. package/mcps/profiles/content.json +20 -0
  13. package/mcps/profiles/ecommerce.json +13 -0
  14. package/mcps/profiles/full-stack.json +15 -0
  15. package/mcps/profiles/laravel.json +12 -0
  16. package/mcps/profiles/nextjs.json +13 -0
  17. package/mcps/profiles/nuxt.json +13 -0
  18. package/mcps/profiles/react.json +12 -0
  19. package/mcps/profiles/vue.json +12 -0
  20. package/mcps/registry.json +423 -0
  21. package/mcps/scripts/apply-mcps.sh +282 -0
  22. package/mcps/stacks/laravel-packages.json +49 -0
  23. package/mcps/stacks/react-packages.json +58 -0
  24. package/package.json +6 -2
  25. package/pyproject.toml +1 -1
  26. package/core/__pycache__/__init__.cpython-312.pyc +0 -0
  27. package/core/__pycache__/__init__.cpython-313.pyc +0 -0
  28. package/core/__pycache__/__init__.cpython-314.pyc +0 -0
  29. package/core/__pycache__/favorites.cpython-313.pyc +0 -0
  30. package/core/__pycache__/keys.cpython-313.pyc +0 -0
  31. package/core/__pycache__/trash.cpython-313.pyc +0 -0
  32. package/core/agents/__pycache__/__init__.cpython-312.pyc +0 -0
  33. package/core/agents/__pycache__/__init__.cpython-313.pyc +0 -0
  34. package/core/agents/__pycache__/behavior_enforcer.cpython-313.pyc +0 -0
  35. package/core/agents/__pycache__/behavioral_compiler.cpython-313.pyc +0 -0
  36. package/core/agents/__pycache__/dna_registry.cpython-313.pyc +0 -0
  37. package/core/agents/__pycache__/draft_builder.cpython-313.pyc +0 -0
  38. package/core/agents/__pycache__/field_suggester.cpython-313.pyc +0 -0
  39. package/core/agents/__pycache__/loader.cpython-312.pyc +0 -0
  40. package/core/agents/__pycache__/loader.cpython-313.pyc +0 -0
  41. package/core/agents/__pycache__/obsidian_export.cpython-313.pyc +0 -0
  42. package/core/agents/__pycache__/registry_gen.cpython-313.pyc +0 -0
  43. package/core/agents/__pycache__/schema.cpython-312.pyc +0 -0
  44. package/core/agents/__pycache__/schema.cpython-313.pyc +0 -0
  45. package/core/agents/__pycache__/string_suggester.cpython-313.pyc +0 -0
  46. package/core/agents/__pycache__/validator.cpython-313.pyc +0 -0
  47. package/core/agents/adapters/__pycache__/disc_adapter.cpython-313.pyc +0 -0
  48. package/core/budget/__pycache__/__init__.cpython-313.pyc +0 -0
  49. package/core/budget/__pycache__/__init__.cpython-314.pyc +0 -0
  50. package/core/budget/__pycache__/manager.cpython-313.pyc +0 -0
  51. package/core/budget/__pycache__/manager.cpython-314.pyc +0 -0
  52. package/core/budget/__pycache__/schema.cpython-313.pyc +0 -0
  53. package/core/budget/__pycache__/schema.cpython-314.pyc +0 -0
  54. package/core/cognition/__pycache__/__init__.cpython-312.pyc +0 -0
  55. package/core/cognition/__pycache__/__init__.cpython-313.pyc +0 -0
  56. package/core/cognition/__pycache__/auto_documentor.cpython-313.pyc +0 -0
  57. package/core/cognition/__pycache__/dreaming.cpython-313.pyc +0 -0
  58. package/core/cognition/__pycache__/dreams_reader.cpython-313.pyc +0 -0
  59. package/core/cognition/__pycache__/reorganizer.cpython-313.pyc +0 -0
  60. package/core/cognition/__pycache__/reorganizer_cli.cpython-313.pyc +0 -0
  61. package/core/cognition/__pycache__/reorganizer_scheduler.cpython-313.pyc +0 -0
  62. package/core/cognition/__pycache__/retrieval.cpython-312.pyc +0 -0
  63. package/core/cognition/__pycache__/retrieval.cpython-313.pyc +0 -0
  64. package/core/cognition/capture/__pycache__/__init__.cpython-312.pyc +0 -0
  65. package/core/cognition/capture/__pycache__/__init__.cpython-313.pyc +0 -0
  66. package/core/cognition/capture/__pycache__/collector.cpython-313.pyc +0 -0
  67. package/core/cognition/capture/__pycache__/store.cpython-312.pyc +0 -0
  68. package/core/cognition/capture/__pycache__/store.cpython-313.pyc +0 -0
  69. package/core/cognition/insights/__pycache__/__init__.cpython-312.pyc +0 -0
  70. package/core/cognition/insights/__pycache__/__init__.cpython-313.pyc +0 -0
  71. package/core/cognition/insights/__pycache__/store.cpython-312.pyc +0 -0
  72. package/core/cognition/insights/__pycache__/store.cpython-313.pyc +0 -0
  73. package/core/cognition/memory/__pycache__/__init__.cpython-312.pyc +0 -0
  74. package/core/cognition/memory/__pycache__/__init__.cpython-313.pyc +0 -0
  75. package/core/cognition/memory/__pycache__/obsidian.cpython-312.pyc +0 -0
  76. package/core/cognition/memory/__pycache__/obsidian.cpython-313.pyc +0 -0
  77. package/core/cognition/memory/__pycache__/schemas.cpython-312.pyc +0 -0
  78. package/core/cognition/memory/__pycache__/schemas.cpython-313.pyc +0 -0
  79. package/core/cognition/memory/__pycache__/vector.cpython-312.pyc +0 -0
  80. package/core/cognition/memory/__pycache__/vector.cpython-313.pyc +0 -0
  81. package/core/cognition/memory/__pycache__/writer.cpython-312.pyc +0 -0
  82. package/core/cognition/memory/__pycache__/writer.cpython-313.pyc +0 -0
  83. package/core/cognition/research/__pycache__/__init__.cpython-313.pyc +0 -0
  84. package/core/cognition/research/__pycache__/profiler.cpython-313.pyc +0 -0
  85. package/core/cognition/scheduler/__pycache__/__init__.cpython-313.pyc +0 -0
  86. package/core/cognition/scheduler/__pycache__/cli.cpython-313.pyc +0 -0
  87. package/core/cognition/scheduler/__pycache__/daemon.cpython-313.pyc +0 -0
  88. package/core/cognition/scheduler/__pycache__/platform.cpython-313.pyc +0 -0
  89. package/core/conclave/__pycache__/__init__.cpython-313.pyc +0 -0
  90. package/core/conclave/__pycache__/advisor_db.cpython-313.pyc +0 -0
  91. package/core/conclave/__pycache__/display.cpython-313.pyc +0 -0
  92. package/core/conclave/__pycache__/matcher.cpython-313.pyc +0 -0
  93. package/core/conclave/__pycache__/persistence.cpython-313.pyc +0 -0
  94. package/core/conclave/__pycache__/profiler.cpython-313.pyc +0 -0
  95. package/core/conclave/__pycache__/prompts.cpython-313.pyc +0 -0
  96. package/core/conclave/__pycache__/schema.cpython-313.pyc +0 -0
  97. package/core/evals/__pycache__/__init__.cpython-313.pyc +0 -0
  98. package/core/evals/__pycache__/__init__.cpython-314.pyc +0 -0
  99. package/core/evals/__pycache__/record_cli.cpython-313.pyc +0 -0
  100. package/core/evals/__pycache__/runner_cli.cpython-313.pyc +0 -0
  101. package/core/evals/__pycache__/sanitizer.cpython-313.pyc +0 -0
  102. package/core/evals/__pycache__/sanitizer.cpython-314.pyc +0 -0
  103. package/core/evals/__pycache__/schema.cpython-313.pyc +0 -0
  104. package/core/evals/__pycache__/schema.cpython-314.pyc +0 -0
  105. package/core/evals/__pycache__/verdict_labels.cpython-313.pyc +0 -0
  106. package/core/evals/__pycache__/verdict_labels.cpython-314.pyc +0 -0
  107. package/core/forge/__pycache__/__init__.cpython-313.pyc +0 -0
  108. package/core/forge/__pycache__/__init__.cpython-314.pyc +0 -0
  109. package/core/forge/__pycache__/complexity.cpython-313.pyc +0 -0
  110. package/core/forge/__pycache__/complexity.cpython-314.pyc +0 -0
  111. package/core/forge/__pycache__/handoff.cpython-313.pyc +0 -0
  112. package/core/forge/__pycache__/handoff.cpython-314.pyc +0 -0
  113. package/core/forge/__pycache__/orchestrator.cpython-313.pyc +0 -0
  114. package/core/forge/__pycache__/orchestrator.cpython-314.pyc +0 -0
  115. package/core/forge/__pycache__/persistence.cpython-313.pyc +0 -0
  116. package/core/forge/__pycache__/persistence.cpython-314.pyc +0 -0
  117. package/core/forge/__pycache__/renderer.cpython-313.pyc +0 -0
  118. package/core/forge/__pycache__/renderer.cpython-314.pyc +0 -0
  119. package/core/forge/__pycache__/runtime_dispatcher.cpython-313.pyc +0 -0
  120. package/core/forge/__pycache__/runtime_dispatcher.cpython-314.pyc +0 -0
  121. package/core/forge/__pycache__/schema.cpython-313.pyc +0 -0
  122. package/core/forge/__pycache__/schema.cpython-314.pyc +0 -0
  123. package/core/fusion/__pycache__/__init__.cpython-313.pyc +0 -0
  124. package/core/fusion/__pycache__/cli.cpython-313.pyc +0 -0
  125. package/core/fusion/__pycache__/engine.cpython-313.pyc +0 -0
  126. package/core/fusion/__pycache__/panel_builder.cpython-313.pyc +0 -0
  127. package/core/governance/__pycache__/__init__.cpython-312.pyc +0 -0
  128. package/core/governance/__pycache__/__init__.cpython-313.pyc +0 -0
  129. package/core/governance/__pycache__/__init__.cpython-314.pyc +0 -0
  130. package/core/governance/__pycache__/activation_tracker.cpython-313.pyc +0 -0
  131. package/core/governance/__pycache__/agent_activation_cli.cpython-313.pyc +0 -0
  132. package/core/governance/__pycache__/agent_experiences.cpython-313.pyc +0 -0
  133. package/core/governance/__pycache__/agent_experiences.cpython-314.pyc +0 -0
  134. package/core/governance/__pycache__/agent_experiences_cli.cpython-313.pyc +0 -0
  135. package/core/governance/__pycache__/closing_marker_check.cpython-313.pyc +0 -0
  136. package/core/governance/__pycache__/closing_marker_check.cpython-314.pyc +0 -0
  137. package/core/governance/__pycache__/compliance_telemetry.cpython-313.pyc +0 -0
  138. package/core/governance/__pycache__/compliance_telemetry_cli.cpython-313.pyc +0 -0
  139. package/core/governance/__pycache__/constitution.cpython-312.pyc +0 -0
  140. package/core/governance/__pycache__/constitution.cpython-313.pyc +0 -0
  141. package/core/governance/__pycache__/constitution.cpython-314.pyc +0 -0
  142. package/core/governance/__pycache__/cqo_experience_recorder.cpython-313.pyc +0 -0
  143. package/core/governance/__pycache__/design_system_lint.cpython-313.pyc +0 -0
  144. package/core/governance/__pycache__/design_system_lint_cli.cpython-313.pyc +0 -0
  145. package/core/governance/__pycache__/dna_fidelity.cpython-313.pyc +0 -0
  146. package/core/governance/__pycache__/dna_fidelity_cli.cpython-313.pyc +0 -0
  147. package/core/governance/__pycache__/dod_gate.cpython-313.pyc +0 -0
  148. package/core/governance/__pycache__/enforcement_telemetry.cpython-313.pyc +0 -0
  149. package/core/governance/__pycache__/enforcement_telemetry_cli.cpython-313.pyc +0 -0
  150. package/core/governance/__pycache__/evidence_checks.cpython-313.pyc +0 -0
  151. package/core/governance/__pycache__/judge.cpython-313.pyc +0 -0
  152. package/core/governance/__pycache__/judge.cpython-314.pyc +0 -0
  153. package/core/governance/__pycache__/kb_cite_check.cpython-313.pyc +0 -0
  154. package/core/governance/__pycache__/kb_cite_check.cpython-314.pyc +0 -0
  155. package/core/governance/__pycache__/leak_scanner.cpython-313.pyc +0 -0
  156. package/core/governance/__pycache__/leak_scanner.cpython-314.pyc +0 -0
  157. package/core/governance/__pycache__/learning_detector.cpython-313.pyc +0 -0
  158. package/core/governance/__pycache__/meta_tag_check.cpython-313.pyc +0 -0
  159. package/core/governance/__pycache__/meta_tag_check.cpython-314.pyc +0 -0
  160. package/core/governance/__pycache__/phantom_action_check.cpython-313.pyc +0 -0
  161. package/core/governance/__pycache__/phantom_action_check.cpython-314.pyc +0 -0
  162. package/core/governance/__pycache__/qg_verdict.cpython-313.pyc +0 -0
  163. package/core/governance/__pycache__/qg_verdict.cpython-314.pyc +0 -0
  164. package/core/governance/__pycache__/quality_api.cpython-313.pyc +0 -0
  165. package/core/governance/__pycache__/quality_api.cpython-314.pyc +0 -0
  166. package/core/governance/__pycache__/quality_router.cpython-313.pyc +0 -0
  167. package/core/governance/__pycache__/quality_router.cpython-314.pyc +0 -0
  168. package/core/governance/__pycache__/redo_counter.cpython-313.pyc +0 -0
  169. package/core/governance/__pycache__/review_workflow.cpython-313.pyc +0 -0
  170. package/core/governance/__pycache__/review_workflow.cpython-314.pyc +0 -0
  171. package/core/governance/__pycache__/routing_feedback.cpython-313.pyc +0 -0
  172. package/core/governance/__pycache__/routing_feedback.cpython-314.pyc +0 -0
  173. package/core/governance/__pycache__/routing_feedback_cli.cpython-313.pyc +0 -0
  174. package/core/governance/__pycache__/skill_proposer.cpython-313.pyc +0 -0
  175. package/core/governance/__pycache__/skill_proposer.cpython-314.pyc +0 -0
  176. package/core/governance/__pycache__/specialist_telemetry.cpython-313.pyc +0 -0
  177. package/core/governance/__pycache__/specialist_telemetry_cli.cpython-313.pyc +0 -0
  178. package/core/governance/__pycache__/sycophancy_detector.cpython-313.pyc +0 -0
  179. package/core/governance/__pycache__/sycophancy_detector.cpython-314.pyc +0 -0
  180. package/core/hooks/__pycache__/__init__.cpython-312.pyc +0 -0
  181. package/core/hooks/__pycache__/__init__.cpython-313.pyc +0 -0
  182. package/core/hooks/__pycache__/__init__.cpython-314.pyc +0 -0
  183. package/core/hooks/__pycache__/_shared.cpython-312.pyc +0 -0
  184. package/core/hooks/__pycache__/_shared.cpython-313.pyc +0 -0
  185. package/core/hooks/__pycache__/_shared.cpython-314.pyc +0 -0
  186. package/core/hooks/__pycache__/gate_manifest.cpython-313.pyc +0 -0
  187. package/core/hooks/__pycache__/post_tool_use.cpython-312.pyc +0 -0
  188. package/core/hooks/__pycache__/post_tool_use.cpython-313.pyc +0 -0
  189. package/core/hooks/__pycache__/pre_tool_use.cpython-312.pyc +0 -0
  190. package/core/hooks/__pycache__/pre_tool_use.cpython-313.pyc +0 -0
  191. package/core/hooks/__pycache__/pre_tool_use.cpython-314.pyc +0 -0
  192. package/core/hooks/__pycache__/session_end.cpython-313.pyc +0 -0
  193. package/core/hooks/__pycache__/session_start.cpython-312.pyc +0 -0
  194. package/core/hooks/__pycache__/session_start.cpython-313.pyc +0 -0
  195. package/core/hooks/__pycache__/stop.cpython-312.pyc +0 -0
  196. package/core/hooks/__pycache__/stop.cpython-313.pyc +0 -0
  197. package/core/hooks/__pycache__/stop.cpython-314.pyc +0 -0
  198. package/core/hooks/__pycache__/subagent_stop.cpython-313.pyc +0 -0
  199. package/core/hooks/__pycache__/subagent_stop.cpython-314.pyc +0 -0
  200. package/core/hooks/__pycache__/user_prompt_submit.cpython-312.pyc +0 -0
  201. package/core/hooks/__pycache__/user_prompt_submit.cpython-313.pyc +0 -0
  202. package/core/hooks/__pycache__/user_prompt_submit.cpython-314.pyc +0 -0
  203. package/core/jobs/__pycache__/__init__.cpython-312.pyc +0 -0
  204. package/core/jobs/__pycache__/__init__.cpython-313.pyc +0 -0
  205. package/core/jobs/__pycache__/__init__.cpython-314.pyc +0 -0
  206. package/core/jobs/__pycache__/auto_doc_worker.cpython-312.pyc +0 -0
  207. package/core/jobs/__pycache__/auto_doc_worker.cpython-313.pyc +0 -0
  208. package/core/jobs/__pycache__/auto_doc_worker.cpython-314.pyc +0 -0
  209. package/core/jobs/__pycache__/manager.cpython-312.pyc +0 -0
  210. package/core/jobs/__pycache__/manager.cpython-313.pyc +0 -0
  211. package/core/jobs/__pycache__/manager.cpython-314.pyc +0 -0
  212. package/core/knowledge/__pycache__/__init__.cpython-312.pyc +0 -0
  213. package/core/knowledge/__pycache__/__init__.cpython-313.pyc +0 -0
  214. package/core/knowledge/__pycache__/__init__.cpython-314.pyc +0 -0
  215. package/core/knowledge/__pycache__/agent_match.cpython-313.pyc +0 -0
  216. package/core/knowledge/__pycache__/chunker.cpython-312.pyc +0 -0
  217. package/core/knowledge/__pycache__/chunker.cpython-313.pyc +0 -0
  218. package/core/knowledge/__pycache__/chunker.cpython-314.pyc +0 -0
  219. package/core/knowledge/__pycache__/embedder.cpython-312.pyc +0 -0
  220. package/core/knowledge/__pycache__/embedder.cpython-313.pyc +0 -0
  221. package/core/knowledge/__pycache__/embedder.cpython-314.pyc +0 -0
  222. package/core/knowledge/__pycache__/embedding_backends.cpython-313.pyc +0 -0
  223. package/core/knowledge/__pycache__/embedding_backends.cpython-314.pyc +0 -0
  224. package/core/knowledge/__pycache__/indexer.cpython-313.pyc +0 -0
  225. package/core/knowledge/__pycache__/ingest.cpython-313.pyc +0 -0
  226. package/core/knowledge/__pycache__/pattern_cards.cpython-313.pyc +0 -0
  227. package/core/knowledge/__pycache__/pattern_cards.cpython-314.pyc +0 -0
  228. package/core/knowledge/__pycache__/pattern_cards_cli.cpython-313.pyc +0 -0
  229. package/core/knowledge/__pycache__/recipes.cpython-313.pyc +0 -0
  230. package/core/knowledge/__pycache__/recipes.cpython-314.pyc +0 -0
  231. package/core/knowledge/__pycache__/recipes_cli.cpython-313.pyc +0 -0
  232. package/core/knowledge/__pycache__/sources.cpython-313.pyc +0 -0
  233. package/core/knowledge/__pycache__/vector_store.cpython-312.pyc +0 -0
  234. package/core/knowledge/__pycache__/vector_store.cpython-313.pyc +0 -0
  235. package/core/knowledge/__pycache__/vector_store.cpython-314.pyc +0 -0
  236. package/core/memory/__pycache__/compressor.cpython-313.pyc +0 -0
  237. package/core/memory/__pycache__/rehydrator.cpython-312.pyc +0 -0
  238. package/core/memory/__pycache__/rehydrator.cpython-313.pyc +0 -0
  239. package/core/memory/__pycache__/rehydrator.cpython-314.pyc +0 -0
  240. package/core/memory/__pycache__/semantic_store.cpython-312.pyc +0 -0
  241. package/core/memory/__pycache__/semantic_store.cpython-313.pyc +0 -0
  242. package/core/memory/__pycache__/semantic_store.cpython-314.pyc +0 -0
  243. package/core/memory/__pycache__/session_store.cpython-312.pyc +0 -0
  244. package/core/memory/__pycache__/session_store.cpython-313.pyc +0 -0
  245. package/core/memory/__pycache__/session_store.cpython-314.pyc +0 -0
  246. package/core/memory/__pycache__/turn_capture.cpython-313.pyc +0 -0
  247. package/core/memory/__pycache__/turn_capture.cpython-314.pyc +0 -0
  248. package/core/obsidian/__pycache__/__init__.cpython-313.pyc +0 -0
  249. package/core/obsidian/__pycache__/cataloger.cpython-313.pyc +0 -0
  250. package/core/obsidian/__pycache__/relator.cpython-313.pyc +0 -0
  251. package/core/obsidian/__pycache__/taxonomy.cpython-313.pyc +0 -0
  252. package/core/obsidian/__pycache__/templates.cpython-313.pyc +0 -0
  253. package/core/obsidian/__pycache__/writer.cpython-313.pyc +0 -0
  254. package/core/orchestration/__pycache__/__init__.cpython-313.pyc +0 -0
  255. package/core/orchestration/__pycache__/checkpoint.cpython-313.pyc +0 -0
  256. package/core/orchestration/__pycache__/patterns.cpython-313.pyc +0 -0
  257. package/core/orchestration/__pycache__/protocol.cpython-313.pyc +0 -0
  258. package/core/personas/__pycache__/__init__.cpython-313.pyc +0 -0
  259. package/core/personas/__pycache__/archetypes.cpython-313.pyc +0 -0
  260. package/core/personas/__pycache__/builder.cpython-313.pyc +0 -0
  261. package/core/personas/__pycache__/description_drafter.cpython-313.pyc +0 -0
  262. package/core/personas/__pycache__/manager.cpython-313.pyc +0 -0
  263. package/core/personas/__pycache__/obsidian_store.cpython-313.pyc +0 -0
  264. package/core/personas/__pycache__/schema.cpython-313.pyc +0 -0
  265. package/core/profile/__pycache__/__init__.cpython-313.pyc +0 -0
  266. package/core/profile/__pycache__/manager.cpython-313.pyc +0 -0
  267. package/core/registry/__pycache__/__init__.cpython-312.pyc +0 -0
  268. package/core/registry/__pycache__/__init__.cpython-313.pyc +0 -0
  269. package/core/registry/__pycache__/generator.cpython-312.pyc +0 -0
  270. package/core/registry/__pycache__/generator.cpython-313.pyc +0 -0
  271. package/core/release/__pycache__/__init__.cpython-313.pyc +0 -0
  272. package/core/release/__pycache__/preflight.cpython-313.pyc +0 -0
  273. package/core/release/__pycache__/preflight_cli.cpython-313.pyc +0 -0
  274. package/core/runtime/__pycache__/__init__.cpython-312.pyc +0 -0
  275. package/core/runtime/__pycache__/__init__.cpython-313.pyc +0 -0
  276. package/core/runtime/__pycache__/__init__.cpython-314.pyc +0 -0
  277. package/core/runtime/__pycache__/base.cpython-312.pyc +0 -0
  278. package/core/runtime/__pycache__/base.cpython-313.pyc +0 -0
  279. package/core/runtime/__pycache__/base.cpython-314.pyc +0 -0
  280. package/core/runtime/__pycache__/capabilities_cli.cpython-312.pyc +0 -0
  281. package/core/runtime/__pycache__/capabilities_cli.cpython-313.pyc +0 -0
  282. package/core/runtime/__pycache__/claude_code.cpython-312.pyc +0 -0
  283. package/core/runtime/__pycache__/claude_code.cpython-313.pyc +0 -0
  284. package/core/runtime/__pycache__/claude_code.cpython-314.pyc +0 -0
  285. package/core/runtime/__pycache__/codex_cli.cpython-312.pyc +0 -0
  286. package/core/runtime/__pycache__/codex_cli.cpython-313.pyc +0 -0
  287. package/core/runtime/__pycache__/codex_cli.cpython-314.pyc +0 -0
  288. package/core/runtime/__pycache__/context_compactor.cpython-313.pyc +0 -0
  289. package/core/runtime/__pycache__/cost_governor.cpython-312.pyc +0 -0
  290. package/core/runtime/__pycache__/cost_governor.cpython-313.pyc +0 -0
  291. package/core/runtime/__pycache__/cost_governor.cpython-314.pyc +0 -0
  292. package/core/runtime/__pycache__/cursor.cpython-312.pyc +0 -0
  293. package/core/runtime/__pycache__/cursor.cpython-313.pyc +0 -0
  294. package/core/runtime/__pycache__/cursor.cpython-314.pyc +0 -0
  295. package/core/runtime/__pycache__/gemini_cli.cpython-312.pyc +0 -0
  296. package/core/runtime/__pycache__/gemini_cli.cpython-313.pyc +0 -0
  297. package/core/runtime/__pycache__/gemini_cli.cpython-314.pyc +0 -0
  298. package/core/runtime/__pycache__/llm_cost_telemetry.cpython-312.pyc +0 -0
  299. package/core/runtime/__pycache__/llm_cost_telemetry.cpython-313.pyc +0 -0
  300. package/core/runtime/__pycache__/llm_cost_telemetry.cpython-314.pyc +0 -0
  301. package/core/runtime/__pycache__/llm_cost_telemetry_cli.cpython-313.pyc +0 -0
  302. package/core/runtime/__pycache__/llm_provider.cpython-312.pyc +0 -0
  303. package/core/runtime/__pycache__/llm_provider.cpython-313.pyc +0 -0
  304. package/core/runtime/__pycache__/llm_provider.cpython-314.pyc +0 -0
  305. package/core/runtime/__pycache__/llm_retry.cpython-312.pyc +0 -0
  306. package/core/runtime/__pycache__/llm_retry.cpython-313.pyc +0 -0
  307. package/core/runtime/__pycache__/llm_retry.cpython-314.pyc +0 -0
  308. package/core/runtime/__pycache__/mcp_telemetry.cpython-312.pyc +0 -0
  309. package/core/runtime/__pycache__/mcp_telemetry.cpython-313.pyc +0 -0
  310. package/core/runtime/__pycache__/mcp_telemetry_cli.cpython-313.pyc +0 -0
  311. package/core/runtime/__pycache__/model_router.cpython-312.pyc +0 -0
  312. package/core/runtime/__pycache__/model_router.cpython-313.pyc +0 -0
  313. package/core/runtime/__pycache__/model_router.cpython-314.pyc +0 -0
  314. package/core/runtime/__pycache__/model_router_cli.cpython-313.pyc +0 -0
  315. package/core/runtime/__pycache__/model_routing_check.cpython-313.pyc +0 -0
  316. package/core/runtime/__pycache__/model_routing_context.cpython-313.pyc +0 -0
  317. package/core/runtime/__pycache__/native_usage.cpython-312.pyc +0 -0
  318. package/core/runtime/__pycache__/native_usage.cpython-313.pyc +0 -0
  319. package/core/runtime/__pycache__/native_usage.cpython-314.pyc +0 -0
  320. package/core/runtime/__pycache__/ollama_discovery.cpython-313.pyc +0 -0
  321. package/core/runtime/__pycache__/ollama_provider.cpython-312.pyc +0 -0
  322. package/core/runtime/__pycache__/ollama_provider.cpython-313.pyc +0 -0
  323. package/core/runtime/__pycache__/ollama_provider.cpython-314.pyc +0 -0
  324. package/core/runtime/__pycache__/openrouter_provider.cpython-312.pyc +0 -0
  325. package/core/runtime/__pycache__/openrouter_provider.cpython-313.pyc +0 -0
  326. package/core/runtime/__pycache__/openrouter_provider.cpython-314.pyc +0 -0
  327. package/core/runtime/__pycache__/path_resolver.cpython-312.pyc +0 -0
  328. package/core/runtime/__pycache__/path_resolver.cpython-313.pyc +0 -0
  329. package/core/runtime/__pycache__/pricing.cpython-312.pyc +0 -0
  330. package/core/runtime/__pycache__/pricing.cpython-313.pyc +0 -0
  331. package/core/runtime/__pycache__/pricing.cpython-314.pyc +0 -0
  332. package/core/runtime/__pycache__/registry.cpython-312.pyc +0 -0
  333. package/core/runtime/__pycache__/registry.cpython-313.pyc +0 -0
  334. package/core/runtime/__pycache__/registry.cpython-314.pyc +0 -0
  335. package/core/runtime/__pycache__/runtime_models.cpython-313.pyc +0 -0
  336. package/core/runtime/__pycache__/squad_orchestrator.cpython-312.pyc +0 -0
  337. package/core/runtime/__pycache__/subagent.cpython-313.pyc +0 -0
  338. package/core/runtime/__pycache__/user_paths.cpython-312.pyc +0 -0
  339. package/core/runtime/__pycache__/user_paths.cpython-313.pyc +0 -0
  340. package/core/runtime/gateway/__pycache__/__init__.cpython-312.pyc +0 -0
  341. package/core/runtime/gateway/__pycache__/__init__.cpython-313.pyc +0 -0
  342. package/core/runtime/gateway/__pycache__/__init__.cpython-314.pyc +0 -0
  343. package/core/runtime/gateway/__pycache__/__main__.cpython-313.pyc +0 -0
  344. package/core/runtime/gateway/__pycache__/litellm_config.cpython-312.pyc +0 -0
  345. package/core/runtime/gateway/__pycache__/litellm_config.cpython-313.pyc +0 -0
  346. package/core/runtime/gateway/__pycache__/litellm_config.cpython-314.pyc +0 -0
  347. package/core/shared/__pycache__/__init__.cpython-312.pyc +0 -0
  348. package/core/shared/__pycache__/__init__.cpython-313.pyc +0 -0
  349. package/core/shared/__pycache__/__init__.cpython-314.pyc +0 -0
  350. package/core/shared/__pycache__/decay.cpython-313.pyc +0 -0
  351. package/core/shared/__pycache__/decay.cpython-314.pyc +0 -0
  352. package/core/shared/__pycache__/safe_session_id.cpython-312.pyc +0 -0
  353. package/core/shared/__pycache__/safe_session_id.cpython-313.pyc +0 -0
  354. package/core/shared/__pycache__/safe_session_id.cpython-314.pyc +0 -0
  355. package/core/shared/__pycache__/sqlite_recovery.cpython-312.pyc +0 -0
  356. package/core/shared/__pycache__/sqlite_recovery.cpython-313.pyc +0 -0
  357. package/core/shared/__pycache__/sqlite_recovery.cpython-314.pyc +0 -0
  358. package/core/shared/__pycache__/temp_paths.cpython-312.pyc +0 -0
  359. package/core/shared/__pycache__/temp_paths.cpython-313.pyc +0 -0
  360. package/core/shared/__pycache__/temp_paths.cpython-314.pyc +0 -0
  361. package/core/shared/__pycache__/test_evidence.cpython-313-pytest-9.1.1.pyc +0 -0
  362. package/core/shared/__pycache__/test_evidence.cpython-313.pyc +0 -0
  363. package/core/specs/__pycache__/__init__.cpython-313.pyc +0 -0
  364. package/core/specs/__pycache__/manager.cpython-313.pyc +0 -0
  365. package/core/specs/__pycache__/schema.cpython-313.pyc +0 -0
  366. package/core/squads/__pycache__/__init__.cpython-313.pyc +0 -0
  367. package/core/squads/__pycache__/loader.cpython-313.pyc +0 -0
  368. package/core/squads/__pycache__/registry.cpython-313.pyc +0 -0
  369. package/core/squads/__pycache__/schema.cpython-313.pyc +0 -0
  370. package/core/synapse/__pycache__/__init__.cpython-312.pyc +0 -0
  371. package/core/synapse/__pycache__/__init__.cpython-313.pyc +0 -0
  372. package/core/synapse/__pycache__/__init__.cpython-314.pyc +0 -0
  373. package/core/synapse/__pycache__/agent_experiences_layer.cpython-312.pyc +0 -0
  374. package/core/synapse/__pycache__/agent_experiences_layer.cpython-313.pyc +0 -0
  375. package/core/synapse/__pycache__/agent_experiences_layer.cpython-314.pyc +0 -0
  376. package/core/synapse/__pycache__/cache.cpython-312.pyc +0 -0
  377. package/core/synapse/__pycache__/cache.cpython-313.pyc +0 -0
  378. package/core/synapse/__pycache__/cache.cpython-314.pyc +0 -0
  379. package/core/synapse/__pycache__/engine.cpython-312.pyc +0 -0
  380. package/core/synapse/__pycache__/engine.cpython-313.pyc +0 -0
  381. package/core/synapse/__pycache__/engine.cpython-314.pyc +0 -0
  382. package/core/synapse/__pycache__/graph_context_layer.cpython-313.pyc +0 -0
  383. package/core/synapse/__pycache__/graph_context_layer.cpython-314.pyc +0 -0
  384. package/core/synapse/__pycache__/kb_cache.cpython-312.pyc +0 -0
  385. package/core/synapse/__pycache__/kb_cache.cpython-313.pyc +0 -0
  386. package/core/synapse/__pycache__/kb_cache.cpython-314.pyc +0 -0
  387. package/core/synapse/__pycache__/layers.cpython-312.pyc +0 -0
  388. package/core/synapse/__pycache__/layers.cpython-313.pyc +0 -0
  389. package/core/synapse/__pycache__/layers.cpython-314.pyc +0 -0
  390. package/core/synapse/__pycache__/pattern_library_layer.cpython-313.pyc +0 -0
  391. package/core/synapse/__pycache__/pattern_library_layer.cpython-314.pyc +0 -0
  392. package/core/synapse/__pycache__/recipe_layer.cpython-313.pyc +0 -0
  393. package/core/synapse/__pycache__/recipe_layer.cpython-314.pyc +0 -0
  394. package/core/synapse/__pycache__/routing_feedback_layer.cpython-313.pyc +0 -0
  395. package/core/synapse/__pycache__/routing_feedback_layer.cpython-314.pyc +0 -0
  396. package/core/synapse/__pycache__/session_memory_layer.cpython-312.pyc +0 -0
  397. package/core/synapse/__pycache__/session_memory_layer.cpython-313.pyc +0 -0
  398. package/core/synapse/__pycache__/session_memory_layer.cpython-314.pyc +0 -0
  399. package/core/sync/__pycache__/__init__.cpython-312.pyc +0 -0
  400. package/core/sync/__pycache__/__init__.cpython-313.pyc +0 -0
  401. package/core/sync/__pycache__/agent_provisioner.cpython-313.pyc +0 -0
  402. package/core/sync/__pycache__/ai_mcp_decider.cpython-313.pyc +0 -0
  403. package/core/sync/__pycache__/content_merger.cpython-313.pyc +0 -0
  404. package/core/sync/__pycache__/content_syncer.cpython-313.pyc +0 -0
  405. package/core/sync/__pycache__/descriptor_syncer.cpython-313.pyc +0 -0
  406. package/core/sync/__pycache__/discovery.cpython-313.pyc +0 -0
  407. package/core/sync/__pycache__/engine.cpython-312.pyc +0 -0
  408. package/core/sync/__pycache__/engine.cpython-313.pyc +0 -0
  409. package/core/sync/__pycache__/manifest.cpython-312.pyc +0 -0
  410. package/core/sync/__pycache__/manifest.cpython-313.pyc +0 -0
  411. package/core/sync/__pycache__/mcp_optimizer.cpython-313.pyc +0 -0
  412. package/core/sync/__pycache__/mcp_syncer.cpython-313.pyc +0 -0
  413. package/core/sync/__pycache__/policy_loader.cpython-313.pyc +0 -0
  414. package/core/sync/__pycache__/reporter.cpython-313.pyc +0 -0
  415. package/core/sync/__pycache__/schema.cpython-313.pyc +0 -0
  416. package/core/sync/__pycache__/self_healing.cpython-313.pyc +0 -0
  417. package/core/sync/__pycache__/settings_syncer.cpython-313.pyc +0 -0
  418. package/core/sync/__pycache__/update_orchestrator.cpython-313.pyc +0 -0
  419. package/core/tasks/__pycache__/__init__.cpython-313.pyc +0 -0
  420. package/core/tasks/__pycache__/manager.cpython-313.pyc +0 -0
  421. package/core/tasks/__pycache__/schema.cpython-313.pyc +0 -0
  422. package/core/terminal/__pycache__/__init__.cpython-313.pyc +0 -0
  423. package/core/terminal/__pycache__/audit.cpython-313.pyc +0 -0
  424. package/core/terminal/__pycache__/connections.cpython-313.pyc +0 -0
  425. package/core/terminal/__pycache__/session.cpython-313.pyc +0 -0
  426. package/core/terminal/__pycache__/session_windows.cpython-313.pyc +0 -0
  427. package/core/terminal/__pycache__/token.cpython-313.pyc +0 -0
  428. package/core/workflow/__pycache__/__init__.cpython-312.pyc +0 -0
  429. package/core/workflow/__pycache__/__init__.cpython-313.pyc +0 -0
  430. package/core/workflow/__pycache__/__init__.cpython-314.pyc +0 -0
  431. package/core/workflow/__pycache__/announcer.cpython-313.pyc +0 -0
  432. package/core/workflow/__pycache__/dashboard.cpython-313.pyc +0 -0
  433. package/core/workflow/__pycache__/design_authorization.cpython-313.pyc +0 -0
  434. package/core/workflow/__pycache__/design_authorization.cpython-314.pyc +0 -0
  435. package/core/workflow/__pycache__/enforcer.cpython-313.pyc +0 -0
  436. package/core/workflow/__pycache__/engine.cpython-312.pyc +0 -0
  437. package/core/workflow/__pycache__/engine.cpython-313.pyc +0 -0
  438. package/core/workflow/__pycache__/engine.cpython-314.pyc +0 -0
  439. package/core/workflow/__pycache__/flow_authorization.cpython-313.pyc +0 -0
  440. package/core/workflow/__pycache__/flow_authorization.cpython-314.pyc +0 -0
  441. package/core/workflow/__pycache__/flow_enforcer.cpython-312.pyc +0 -0
  442. package/core/workflow/__pycache__/flow_enforcer.cpython-313.pyc +0 -0
  443. package/core/workflow/__pycache__/flow_enforcer.cpython-314.pyc +0 -0
  444. package/core/workflow/__pycache__/frontend_gate.cpython-313.pyc +0 -0
  445. package/core/workflow/__pycache__/frontend_gate.cpython-314.pyc +0 -0
  446. package/core/workflow/__pycache__/frontend_gate_telemetry.cpython-313.pyc +0 -0
  447. package/core/workflow/__pycache__/frontend_gate_telemetry_cli.cpython-313.pyc +0 -0
  448. package/core/workflow/__pycache__/gate_checkpoint.cpython-312.pyc +0 -0
  449. package/core/workflow/__pycache__/gate_checkpoint.cpython-313.pyc +0 -0
  450. package/core/workflow/__pycache__/gate_checkpoint.cpython-314.pyc +0 -0
  451. package/core/workflow/__pycache__/kb_first_decider.cpython-313.pyc +0 -0
  452. package/core/workflow/__pycache__/loader.cpython-312.pyc +0 -0
  453. package/core/workflow/__pycache__/loader.cpython-313.pyc +0 -0
  454. package/core/workflow/__pycache__/loader.cpython-314.pyc +0 -0
  455. package/core/workflow/__pycache__/marker_cache.cpython-313.pyc +0 -0
  456. package/core/workflow/__pycache__/marker_cache.cpython-314.pyc +0 -0
  457. package/core/workflow/__pycache__/plan_approval.cpython-313.pyc +0 -0
  458. package/core/workflow/__pycache__/plan_approval.cpython-314.pyc +0 -0
  459. package/core/workflow/__pycache__/research_gate.cpython-313.pyc +0 -0
  460. package/core/workflow/__pycache__/research_gate.cpython-314.pyc +0 -0
  461. package/core/workflow/__pycache__/rules_registry.cpython-313.pyc +0 -0
  462. package/core/workflow/__pycache__/schema.cpython-312.pyc +0 -0
  463. package/core/workflow/__pycache__/schema.cpython-313.pyc +0 -0
  464. package/core/workflow/__pycache__/schema.cpython-314.pyc +0 -0
  465. package/core/workflow/__pycache__/specialist_enforcer.cpython-312.pyc +0 -0
  466. package/core/workflow/__pycache__/specialist_enforcer.cpython-313.pyc +0 -0
  467. package/core/workflow/__pycache__/specialist_enforcer.cpython-314.pyc +0 -0
  468. package/core/workflow/__pycache__/state.cpython-313.pyc +0 -0
  469. package/core/workflow/__pycache__/state.cpython-314.pyc +0 -0
  470. package/scripts/__pycache__/dashboard-api.cpython-313.pyc +0 -0
  471. package/scripts/__pycache__/knowledge-index.cpython-313.pyc +0 -0
  472. package/scripts/__pycache__/marketplace_export.cpython-313.pyc +0 -0
  473. package/scripts/__pycache__/marketplace_gen.cpython-313.pyc +0 -0
  474. package/scripts/__pycache__/migrate_skills_kb_first.cpython-313.pyc +0 -0
  475. package/scripts/__pycache__/seed_initial_patterns.cpython-313.pyc +0 -0
  476. package/scripts/__pycache__/synapse-bridge.cpython-312.pyc +0 -0
  477. package/scripts/__pycache__/synapse-bridge.cpython-313.pyc +0 -0
  478. package/scripts/__pycache__/synapse-bridge.cpython-314.pyc +0 -0
  479. package/scripts/bench/__pycache__/__init__.cpython-313.pyc +0 -0
  480. package/scripts/bench/__pycache__/harness.cpython-313.pyc +0 -0
  481. package/scripts/bench/__pycache__/run.cpython-313.pyc +0 -0
  482. package/scripts/tools/__pycache__/docs_stats.cpython-313.pyc +0 -0
  483. package/scripts/tools/__pycache__/prompt_lint.cpython-313.pyc +0 -0
  484. package/scripts/tools/__pycache__/prompt_surface_benchmark.cpython-313.pyc +0 -0
  485. package/scripts/tools/__pycache__/skill_budget.cpython-313.pyc +0 -0
  486. package/scripts/tools/__pycache__/sync_wiki.cpython-313.pyc +0 -0
@@ -0,0 +1,156 @@
1
+ """
2
+ ARKA OS — MCP Prompts Server.
3
+
4
+ Exposes all ARKA OS department commands as MCP prompts so they work in
5
+ both Claude Code and Claude Desktop.
6
+
7
+ Usage:
8
+ uv run server.py
9
+ """
10
+
11
+ import os
12
+ from pathlib import Path
13
+
14
+ from mcp.server.fastmcp import FastMCP
15
+ from mcp.server.fastmcp.prompts.base import Prompt, PromptArgument
16
+
17
+ from commands import COMMANDS
18
+
19
+ mcp = FastMCP(
20
+ "arka-prompts",
21
+ instructions="ARKA OS department commands. Select a prompt to run an ARKA OS command.",
22
+ )
23
+
24
+
25
+ def _find_skills_dir() -> Path:
26
+ """Resolve the base skills directory where SKILL.md files live.
27
+
28
+ Resolution order:
29
+ 1. ARKA_OS env var -> parent dir is the skills root
30
+ 2. ~/.claude/skills/arka/.repo-path -> dev mode (read repo path from file)
31
+ 3. Fallback to ~/.claude/skills/
32
+ """
33
+ arka_os = os.environ.get("ARKA_OS")
34
+ if arka_os:
35
+ arka_path = Path(arka_os)
36
+ if arka_path.is_dir():
37
+ return arka_path.parent # e.g. ~/.claude/skills/
38
+
39
+ # Dev mode: .repo-path points to the repo checkout
40
+ repo_path_file = Path.home() / ".claude" / "skills" / "arka" / ".repo-path"
41
+ if repo_path_file.exists():
42
+ repo_path = Path(repo_path_file.read_text().strip())
43
+ if repo_path.is_dir():
44
+ return repo_path # Return repo root for dev mode resolution
45
+
46
+ return Path.home() / ".claude" / "skills"
47
+
48
+
49
+ def _load_skill(skill_dir: str) -> str | None:
50
+ """Load SKILL.md content for the given skill directory name.
51
+
52
+ Tries installed location first, then falls back to dev repo layout.
53
+ """
54
+ skills_base = _find_skills_dir()
55
+
56
+ # Installed layout: ~/.claude/skills/<skill_dir>/SKILL.md
57
+ installed = skills_base / skill_dir / "SKILL.md"
58
+ if installed.is_file():
59
+ return installed.read_text(encoding="utf-8")
60
+
61
+ # Dev repo layout: <repo>/departments/<dept>/SKILL.md
62
+ # Map skill_dir names to department directories
63
+ dept_map = {
64
+ "arka": "arka",
65
+ "arka-dev": "departments/dev",
66
+ "arka-marketing": "departments/marketing",
67
+ "arka-ecommerce": "departments/ecommerce",
68
+ "arka-finance": "departments/finance",
69
+ "arka-operations": "departments/operations",
70
+ "arka-strategy": "departments/strategy",
71
+ "arka-knowledge": "departments/knowledge",
72
+ "arka-scaffold": "departments/dev/skills/scaffold",
73
+ }
74
+ if skill_dir in dept_map:
75
+ dev_path = skills_base / dept_map[skill_dir] / "SKILL.md"
76
+ if dev_path.is_file():
77
+ return dev_path.read_text(encoding="utf-8")
78
+
79
+ return None
80
+
81
+
82
+ def _build_instruction(cmd_key: str, cmd: dict, user_args: dict[str, str]) -> str:
83
+ """Build the prompt message returned to the LLM."""
84
+ parts: list[str] = []
85
+
86
+ # Header with command context
87
+ parts.append(f"# ARKA OS — {cmd['title']}")
88
+ parts.append("")
89
+ parts.append(f"**Command:** `{cmd['slash_command']}`")
90
+
91
+ # Include user-provided arguments
92
+ if user_args:
93
+ parts.append("")
94
+ parts.append("**User input:**")
95
+ for arg_name, arg_value in user_args.items():
96
+ if arg_value:
97
+ parts.append(f"- **{arg_name}:** {arg_value}")
98
+
99
+ parts.append("")
100
+ parts.append("---")
101
+ parts.append("")
102
+
103
+ # Load and append the full SKILL.md
104
+ skill_content = _load_skill(cmd["skill_dir"])
105
+ if skill_content:
106
+ parts.append(skill_content)
107
+ else:
108
+ parts.append(
109
+ f"*SKILL.md not found for `{cmd['skill_dir']}`. "
110
+ f"Ensure ARKA OS is installed (`bash install.sh`).*"
111
+ )
112
+
113
+ parts.append("")
114
+ parts.append("---")
115
+ parts.append("")
116
+ parts.append(
117
+ f"Now execute the `{cmd['slash_command']}` command "
118
+ f"with the user input provided above."
119
+ )
120
+
121
+ return "\n".join(parts)
122
+
123
+
124
+ def _make_prompt_fn(cmd_key: str, cmd: dict):
125
+ """Create a prompt handler function for a command."""
126
+ arg_names = [a["name"] for a in cmd["arguments"]]
127
+
128
+ def handler(**kwargs: str) -> str:
129
+ user_args = {name: kwargs.get(name, "") for name in arg_names}
130
+ return _build_instruction(cmd_key, cmd, user_args)
131
+
132
+ return handler
133
+
134
+
135
+ # Register all commands as prompts
136
+ for cmd_key, cmd_data in COMMANDS.items():
137
+ prompt_args = [
138
+ PromptArgument(
139
+ name=a["name"],
140
+ description=a["description"],
141
+ required=a["required"],
142
+ )
143
+ for a in cmd_data["arguments"]
144
+ ]
145
+
146
+ prompt = Prompt(
147
+ name=cmd_key,
148
+ description=f"{cmd_data['title']}: {cmd_data['description']}",
149
+ arguments=prompt_args or None,
150
+ fn=_make_prompt_fn(cmd_key, cmd_data),
151
+ )
152
+ mcp.add_prompt(prompt)
153
+
154
+
155
+ if __name__ == "__main__":
156
+ mcp.run(transport="stdio")
@@ -0,0 +1,10 @@
1
+ [project]
2
+ name = "arka-tools"
3
+ version = "1.0.0"
4
+ description = "ArkaOS programmatic MCP tools — KB search, workflow state, Quality Gate, recipes, session memory, telemetry"
5
+ requires-python = ">=3.11"
6
+ dependencies = [
7
+ "mcp[cli]>=1.2.0",
8
+ "pydantic>=2.0",
9
+ "pyyaml>=6.0",
10
+ ]
@@ -0,0 +1,319 @@
1
+ """ArkaOS — programmatic MCP tools server (F2-3, Claude Code reform).
2
+
3
+ Where ``arka-prompts`` exposes department commands as PROMPTS, this
4
+ server exposes the core engine as TOOLS: KB vector search, workflow
5
+ state, Quality Gate queue, validated recipes, session memory and
6
+ telemetry summaries — grounded in the real ``core/`` APIs, never
7
+ re-implemented here.
8
+
9
+ Honesty contract (the explicit anti-pattern is claude-flow's fabricated
10
+ fallbacks): a tool whose backing store is absent returns
11
+ ``{"available": false, "reason": ...}`` — real emptiness, never invented
12
+ data. Retrieval results carry their provenance labels
13
+ (``semantic`` / ``keyword-degraded``) untouched.
14
+
15
+ Write tools (workflow_update_phase, qg_submit) are DISABLED unless
16
+ ``ARKA_TOOLS_WRITE=1`` — v1 ships read-first; mutation is an explicit
17
+ operator opt-in. ``qg_verdict`` is deliberately NOT exposed: a Quality
18
+ Gate verdict emitted by the same model doing the work defeats the whole
19
+ point of an INDEPENDENT gate (arkaos-not-yes-man). Verdicts stay with
20
+ the human/CQO reviewer path, never a self-service tool.
21
+
22
+ Usage: ``uv run server.py`` (deployed to ~/.claude/skills/arka/mcp-tools).
23
+ """
24
+
25
+ from __future__ import annotations
26
+
27
+ import os
28
+ import sys
29
+ from pathlib import Path
30
+ from typing import Any
31
+
32
+ from mcp.server.fastmcp import FastMCP
33
+
34
+
35
+ def _resolve_repo() -> str:
36
+ env = os.environ.get("ARKA_OS", "")
37
+ if env and (Path(env) / "core").is_dir():
38
+ return env
39
+ repo_file = Path.home() / ".arkaos" / ".repo-path"
40
+ try:
41
+ candidate = repo_file.read_text(encoding="utf-8").strip()
42
+ if candidate and (Path(candidate) / "core").is_dir():
43
+ return candidate
44
+ except OSError:
45
+ pass
46
+ return ""
47
+
48
+
49
+ _REPO = _resolve_repo()
50
+ if _REPO:
51
+ sys.path.insert(0, _REPO)
52
+
53
+ mcp = FastMCP(
54
+ "arka-tools",
55
+ instructions=(
56
+ "ArkaOS programmatic tools: kb_search (vector KB, honest degraded"
57
+ " labels), workflow_get/update_phase, Quality Gate queue"
58
+ " (qg_pending/status/submit — NO verdict tool: gate independence),"
59
+ " recipes_search/recipe_get, session_memory_search (project scope"
60
+ " required), telemetry_summary, forge_plan, routing_scores. Write"
61
+ " tools require ARKA_TOOLS_WRITE=1."
62
+ ),
63
+ )
64
+
65
+ _UNAVAILABLE = {"available": False}
66
+
67
+
68
+ def _unavailable(reason: str) -> dict[str, Any]:
69
+ """Honest emptiness — never fabricated data (anti-claude-flow)."""
70
+ return {**_UNAVAILABLE, "reason": reason}
71
+
72
+
73
+ def _writes_enabled() -> bool:
74
+ return os.environ.get("ARKA_TOOLS_WRITE", "").strip() == "1"
75
+
76
+
77
+ def _writes_disabled_error() -> dict[str, Any]:
78
+ return _unavailable(
79
+ "write tools are disabled — set ARKA_TOOLS_WRITE=1 in the MCP"
80
+ " server env to enable (v1 ships read-first)"
81
+ )
82
+
83
+
84
+ @mcp.tool()
85
+ def kb_search(query: str, top_k: int = 5) -> dict[str, Any]:
86
+ """Search the ArkaOS knowledge base (vector store at ~/.arkaos/knowledge.db).
87
+
88
+ Results carry their retrieval provenance: 'semantic' (real similarity
89
+ score) or 'keyword-degraded' (substring match, score=None) — never
90
+ faked.
91
+ """
92
+ if not _REPO:
93
+ return _unavailable("ArkaOS repo not resolvable (~/.arkaos/.repo-path)")
94
+ db_path = Path.home() / ".arkaos" / "knowledge.db"
95
+ if not db_path.is_file():
96
+ return _unavailable("knowledge.db not found — run /arka index first")
97
+ from core.knowledge.vector_store import VectorStore
98
+
99
+ results = VectorStore(db_path).search(query, top_k=top_k)
100
+ return {"available": True, "results": results, "count": len(results)}
101
+
102
+
103
+ @mcp.tool()
104
+ def workflow_get() -> dict[str, Any]:
105
+ """Current workflow state (phases, branch, violations) or none-active."""
106
+ if not _REPO:
107
+ return _unavailable("ArkaOS repo not resolvable")
108
+ from core.workflow.state import get_state
109
+
110
+ state = get_state()
111
+ if not state:
112
+ return {"available": True, "active": False}
113
+ return {"available": True, "active": True, "state": state}
114
+
115
+
116
+ @mcp.tool()
117
+ def workflow_update_phase(
118
+ phase: str, status: str, artifact: str = ""
119
+ ) -> dict[str, Any]:
120
+ """WRITE (gated): set a workflow phase status (pending/in_progress/
121
+ completed/skipped), optionally attaching an evidence artifact path."""
122
+ if not _writes_enabled():
123
+ return _writes_disabled_error()
124
+ if not _REPO:
125
+ return _unavailable("ArkaOS repo not resolvable")
126
+ from core.workflow.state import update_phase
127
+
128
+ try:
129
+ state = update_phase(phase, status, artifact or None)
130
+ except ValueError as exc:
131
+ return _unavailable(str(exc))
132
+ return {"available": True, "state": state}
133
+
134
+
135
+ @mcp.tool()
136
+ def qg_pending(reviewer: str = "") -> dict[str, Any]:
137
+ """Quality Gate submissions awaiting review (optionally per reviewer)."""
138
+ if not _REPO:
139
+ return _unavailable("ArkaOS repo not resolvable")
140
+ from core.governance.quality_api import list_pending
141
+
142
+ pending = list_pending(reviewer or None)
143
+ return {"available": True, "pending": pending, "count": len(pending)}
144
+
145
+
146
+ @mcp.tool()
147
+ def qg_status(submission_id: str) -> dict[str, Any]:
148
+ """One Quality Gate submission by id, with its verdict history."""
149
+ if not _REPO:
150
+ return _unavailable("ArkaOS repo not resolvable")
151
+ from core.governance.quality_api import query
152
+
153
+ record = query(submission_id)
154
+ if record is None:
155
+ return _unavailable(f"no QG submission with id {submission_id!r}")
156
+ return {"available": True, "submission": record}
157
+
158
+
159
+ @mcp.tool()
160
+ def qg_submit(
161
+ title: str, description: str, deliverable_type: str, submitter: str
162
+ ) -> dict[str, Any]:
163
+ """WRITE (gated): submit a deliverable to the Quality Gate queue."""
164
+ if not _writes_enabled():
165
+ return _writes_disabled_error()
166
+ if not _REPO:
167
+ return _unavailable("ArkaOS repo not resolvable")
168
+ from core.governance.quality_api import submit
169
+
170
+ record = submit(
171
+ title=title,
172
+ description=description,
173
+ deliverable_type=deliverable_type,
174
+ submitter=submitter,
175
+ )
176
+ return {"available": True, "submission": record}
177
+
178
+
179
+ # NOTE: qg_verdict is intentionally NOT a tool. A verdict emitted by the
180
+ # same model doing the work is not an independent gate — it is a
181
+ # rubber stamp. Verdicts stay with the CQO/human reviewer path.
182
+
183
+
184
+ @mcp.tool()
185
+ def recipes_search(keywords: str = "", stack: str = "") -> dict[str, Any]:
186
+ """QG-approved validated recipes matching keywords and/or stack.
187
+
188
+ Read-only by design — recipe capture stays operator-confirmed
189
+ (confidentiality contract of core/knowledge/recipes.py).
190
+ """
191
+ if not _REPO:
192
+ return _unavailable("ArkaOS repo not resolvable")
193
+ from core.knowledge.recipes import list_recipes
194
+
195
+ wanted_kw = {w.strip().lower() for w in keywords.split(",") if w.strip()}
196
+ wanted_stack = {s.strip().lower() for s in stack.split(",") if s.strip()}
197
+ matches = []
198
+ for recipe in list_recipes():
199
+ recipe_kw = {k.lower() for k in recipe.feature_keywords}
200
+ recipe_stack = {s.lower() for s in recipe.stack}
201
+ if wanted_kw and not (wanted_kw & recipe_kw):
202
+ continue
203
+ if wanted_stack and not (wanted_stack & recipe_stack):
204
+ continue
205
+ matches.append({
206
+ "slug": recipe.slug, "name": recipe.name,
207
+ "problem": recipe.problem, "stack": recipe.stack,
208
+ "path": f"~/.arkaos/recipes/{recipe.slug}/",
209
+ })
210
+ return {"available": True, "recipes": matches, "count": len(matches)}
211
+
212
+
213
+ @mcp.tool()
214
+ def recipe_get(slug: str) -> dict[str, Any]:
215
+ """Full detail of one validated recipe (files, AC, apply notes)."""
216
+ if not _REPO:
217
+ return _unavailable("ArkaOS repo not resolvable")
218
+ from core.knowledge.recipes import load_recipe
219
+
220
+ recipe = load_recipe(slug)
221
+ if recipe is None:
222
+ return _unavailable(f"no recipe with slug {slug!r}")
223
+ return {"available": True, "recipe": recipe.model_dump()}
224
+
225
+
226
+ @mcp.tool()
227
+ def session_memory_search(query: str, project: str) -> dict[str, Any]:
228
+ """Cross-session turn memory for ONE project (scope is REQUIRED —
229
+ an unscoped search would leak one client's turns into another's
230
+ context; v2.18.0 confidentiality precedent). Labels are honest:
231
+ keyword-degraded results carry score=None."""
232
+ if not _REPO:
233
+ return _unavailable("ArkaOS repo not resolvable")
234
+ if not project.strip():
235
+ return _unavailable("project scope is required — never searches globally")
236
+ from core.memory.semantic_store import SessionMemoryStore, default_db_path
237
+
238
+ if not default_db_path().is_file():
239
+ return _unavailable("session-memory.db not found (no turns captured yet)")
240
+ from core.memory.semantic_store import neutralize_summary
241
+
242
+ hits = SessionMemoryStore().keyword_search(query, project.strip(), top_k=5)
243
+ # WHITELIST the model-visible surface to the canonical read-path's
244
+ # minimal shape (session_memory_layer.py L9.5) — keyword_search dumps
245
+ # the whole ~14-field record, and cwd/file_paths are attacker-stored
246
+ # free text NOT constrained by the project scope. Every string field
247
+ # is neutralized (OWASP LLM01): a stored [arka:design]/newline must
248
+ # never reach the model in a form able to forge a gate marker. ts is
249
+ # neutralized too (harmless on a valid ISO8601) so this surface's
250
+ # safety is LOCAL, not reliant on turn_capture's system-ts invariant.
251
+ results = [
252
+ {
253
+ "summary": neutralize_summary(hit.get("summary", "")),
254
+ "project_name": neutralize_summary(hit.get("project_name", "")),
255
+ "ts": neutralize_summary(hit.get("ts", "")),
256
+ "score": hit.get("score"),
257
+ "retrieval": hit.get("retrieval", ""),
258
+ }
259
+ for hit in hits
260
+ ]
261
+ return {"available": True, "results": results, "count": len(results)}
262
+
263
+
264
+ @mcp.tool()
265
+ def telemetry_summary(period: str = "today") -> dict[str, Any]:
266
+ """Enforcement + LLM-cost telemetry rollups (today/week/month/all)."""
267
+ if not _REPO:
268
+ return _unavailable("ArkaOS repo not resolvable")
269
+ out: dict[str, Any] = {"available": True}
270
+ try:
271
+ from core.governance.enforcement_telemetry import summarise as enf
272
+ out["enforcement"] = enf(period).__dict__
273
+ except Exception as exc:
274
+ out["enforcement"] = _unavailable(f"enforcement summary failed: {exc}")
275
+ try:
276
+ from core.runtime.llm_cost_telemetry import summarise as cost
277
+ out["llm_cost"] = cost(period).__dict__
278
+ except Exception as exc:
279
+ out["llm_cost"] = _unavailable(f"cost summary failed: {exc}")
280
+ return out
281
+
282
+
283
+ @mcp.tool()
284
+ def forge_plan() -> dict[str, Any]:
285
+ """The active Forge plan (name, status, phases) or none-active."""
286
+ if not _REPO:
287
+ return _unavailable("ArkaOS repo not resolvable")
288
+ from core.forge.persistence import get_active_plan
289
+
290
+ plan = get_active_plan()
291
+ if plan is None:
292
+ return {"available": True, "active": False}
293
+ return {
294
+ "available": True, "active": True,
295
+ "name": getattr(plan, "name", ""),
296
+ "status": getattr(plan, "status", ""),
297
+ "phases": len(getattr(plan, "plan_phases", []) or []),
298
+ }
299
+
300
+
301
+ @mcp.tool()
302
+ def routing_scores() -> dict[str, Any]:
303
+ """Per-department QG approval evidence (routing-scores.json, F1-B1) —
304
+ the citable counts behind [arka:redo-risk]."""
305
+ if not _REPO:
306
+ return _unavailable("ArkaOS repo not resolvable")
307
+ from core.governance.routing_feedback import load_scores
308
+
309
+ scores = load_scores()
310
+ if scores is None:
311
+ return _unavailable(
312
+ "routing-scores.json absent/invalid — run"
313
+ " core.governance.routing_feedback_cli rebuild"
314
+ )
315
+ return {"available": True, **scores.model_dump()}
316
+
317
+
318
+ if __name__ == "__main__":
319
+ mcp.run()
@@ -0,0 +1,19 @@
1
+ {
2
+ "_meta": {
3
+ "name": "base",
4
+ "description": "Base MCP profile — included in ALL projects",
5
+ "extends": null
6
+ },
7
+ "mcps": [
8
+ "arka-prompts",
9
+ "arka-tools",
10
+ "obsidian",
11
+ "context7",
12
+ "playwright",
13
+ "sentry",
14
+ "gh-grep",
15
+ "clickup",
16
+ "firecrawl",
17
+ "supabase"
18
+ ]
19
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "_meta": {
3
+ "name": "brand",
4
+ "description": "Brand department MCP profile — base + Canva for visual design",
5
+ "extends": "base"
6
+ },
7
+ "mcps": [
8
+ "arka-prompts",
9
+ "obsidian",
10
+ "context7",
11
+ "playwright",
12
+ "sentry",
13
+ "gh-grep",
14
+ "clickup",
15
+ "firecrawl",
16
+ "supabase",
17
+ "canva"
18
+ ]
19
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "_meta": {
3
+ "name": "comms",
4
+ "description": "Communications — base + all messaging platform MCPs",
5
+ "extends": "base"
6
+ },
7
+ "mcps": [
8
+ "slack",
9
+ "discord",
10
+ "whatsapp",
11
+ "teams"
12
+ ]
13
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "_meta": {
3
+ "name": "content",
4
+ "description": "Content department MCP profile — base + Higgsfield generation engine and Canva for the production pipeline",
5
+ "extends": "base"
6
+ },
7
+ "mcps": [
8
+ "arka-prompts",
9
+ "obsidian",
10
+ "context7",
11
+ "playwright",
12
+ "sentry",
13
+ "gh-grep",
14
+ "clickup",
15
+ "firecrawl",
16
+ "supabase",
17
+ "canva",
18
+ "higgsfield"
19
+ ]
20
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "_meta": {
3
+ "name": "ecommerce",
4
+ "description": "E-commerce projects — base + Laravel + marketplace MCPs",
5
+ "extends": "base"
6
+ },
7
+ "mcps": [
8
+ "laravel-boost",
9
+ "serena",
10
+ "mirakl",
11
+ "shopify-dev"
12
+ ]
13
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "_meta": {
3
+ "name": "full-stack",
4
+ "description": "Full-stack projects — base + Laravel + Nuxt MCPs",
5
+ "extends": "base"
6
+ },
7
+ "mcps": [
8
+ "laravel-boost",
9
+ "serena",
10
+ "nuxt",
11
+ "nuxt-ui",
12
+ "magic",
13
+ "codebase-memory"
14
+ ]
15
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "_meta": {
3
+ "name": "laravel",
4
+ "description": "Laravel projects — base + Laravel-specific MCPs",
5
+ "extends": "base"
6
+ },
7
+ "mcps": [
8
+ "laravel-boost",
9
+ "serena",
10
+ "codebase-memory"
11
+ ]
12
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "_meta": {
3
+ "name": "nextjs",
4
+ "description": "Next.js projects — base + Next.js-specific MCPs",
5
+ "extends": "base"
6
+ },
7
+ "mcps": [
8
+ "next-devtools",
9
+ "supabase",
10
+ "magic",
11
+ "codebase-memory"
12
+ ]
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "_meta": {
3
+ "name": "nuxt",
4
+ "description": "Nuxt 3/4 projects — base + Nuxt-specific MCPs",
5
+ "extends": "base"
6
+ },
7
+ "mcps": [
8
+ "nuxt",
9
+ "nuxt-ui",
10
+ "magic",
11
+ "codebase-memory"
12
+ ]
13
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "_meta": {
3
+ "name": "react",
4
+ "description": "React SPA projects — base + React-specific MCPs",
5
+ "extends": "base"
6
+ },
7
+ "mcps": [
8
+ "next-devtools",
9
+ "magic",
10
+ "codebase-memory"
11
+ ]
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "_meta": {
3
+ "name": "vue",
4
+ "description": "Vue 3 SPA projects — base + Vue-compatible MCPs",
5
+ "extends": "base"
6
+ },
7
+ "mcps": [
8
+ "nuxt-ui",
9
+ "magic",
10
+ "codebase-memory"
11
+ ]
12
+ }