prism-proxy 0.2.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 (478) hide show
  1. prism_proxy-0.2.0/.env.example +30 -0
  2. prism_proxy-0.2.0/.github/CODEOWNERS +18 -0
  3. prism_proxy-0.2.0/.github/ISSUE_TEMPLATE/bug_report.md +47 -0
  4. prism_proxy-0.2.0/.github/ISSUE_TEMPLATE/feature_request.md +34 -0
  5. prism_proxy-0.2.0/.github/PULL_REQUEST_TEMPLATE.md +35 -0
  6. prism_proxy-0.2.0/.github/SECURITY.md +59 -0
  7. prism_proxy-0.2.0/.github/workflows/ci.yml +63 -0
  8. prism_proxy-0.2.0/.github/workflows/release.yml +30 -0
  9. prism_proxy-0.2.0/.gitignore +60 -0
  10. prism_proxy-0.2.0/.prism.md +13 -0
  11. prism_proxy-0.2.0/API_CONTRACTS.md +398 -0
  12. prism_proxy-0.2.0/ARCHITECTURE.md +225 -0
  13. prism_proxy-0.2.0/CHANGELOG.md +89 -0
  14. prism_proxy-0.2.0/CI_CD.md +260 -0
  15. prism_proxy-0.2.0/CLAUDE.md +240 -0
  16. prism_proxy-0.2.0/CODE_REVIEW.md +161 -0
  17. prism_proxy-0.2.0/CONTEXT_MANAGEMENT.md +286 -0
  18. prism_proxy-0.2.0/CONTRIBUTING.md +271 -0
  19. prism_proxy-0.2.0/CONVENTIONS.md +340 -0
  20. prism_proxy-0.2.0/COST_LOGIC.md +315 -0
  21. prism_proxy-0.2.0/DATABASE.md +187 -0
  22. prism_proxy-0.2.0/DATA_MODELS.md +287 -0
  23. prism_proxy-0.2.0/DEBUGGING.md +281 -0
  24. prism_proxy-0.2.0/DECISIONS.md +252 -0
  25. prism_proxy-0.2.0/DEPENDENCIES.md +156 -0
  26. prism_proxy-0.2.0/ENVIRONMENT.md +212 -0
  27. prism_proxy-0.2.0/ERROR_HANDLING.md +333 -0
  28. prism_proxy-0.2.0/HANDOFF.md +110 -0
  29. prism_proxy-0.2.0/KNOWN_ISSUES.md +86 -0
  30. prism_proxy-0.2.0/LICENSE +190 -0
  31. prism_proxy-0.2.0/LOGGING.md +202 -0
  32. prism_proxy-0.2.0/MEMORY.md +46 -0
  33. prism_proxy-0.2.0/PERFORMANCE.md +227 -0
  34. prism_proxy-0.2.0/PERMISSIONS.md +192 -0
  35. prism_proxy-0.2.0/PKG-INFO +294 -0
  36. prism_proxy-0.2.0/PROGRESS.md +157 -0
  37. prism_proxy-0.2.0/PROMPTS.md +265 -0
  38. prism_proxy-0.2.0/PROVIDER_SPECS.md +401 -0
  39. prism_proxy-0.2.0/README.md +223 -0
  40. prism_proxy-0.2.0/ROUTING_LOGIC.md +287 -0
  41. prism_proxy-0.2.0/SECURITY.md +183 -0
  42. prism_proxy-0.2.0/TESTING.md +376 -0
  43. prism_proxy-0.2.0/TOOL_SPECS.md +365 -0
  44. prism_proxy-0.2.0/pyproject.toml +195 -0
  45. prism_proxy-0.2.0/src/prism/__init__.py +4 -0
  46. prism_proxy-0.2.0/src/prism/__main__.py +21 -0
  47. prism_proxy-0.2.0/src/prism/architect/__init__.py +62 -0
  48. prism_proxy-0.2.0/src/prism/architect/display.py +798 -0
  49. prism_proxy-0.2.0/src/prism/architect/executor.py +1228 -0
  50. prism_proxy-0.2.0/src/prism/architect/planner.py +757 -0
  51. prism_proxy-0.2.0/src/prism/architect/storage.py +459 -0
  52. prism_proxy-0.2.0/src/prism/auth/__init__.py +16 -0
  53. prism_proxy-0.2.0/src/prism/auth/encrypted_store.py +255 -0
  54. prism_proxy-0.2.0/src/prism/auth/env_store.py +106 -0
  55. prism_proxy-0.2.0/src/prism/auth/keyring_store.py +170 -0
  56. prism_proxy-0.2.0/src/prism/auth/manager.py +331 -0
  57. prism_proxy-0.2.0/src/prism/auth/validator.py +126 -0
  58. prism_proxy-0.2.0/src/prism/cache/__init__.py +13 -0
  59. prism_proxy-0.2.0/src/prism/cache/response_cache.py +669 -0
  60. prism_proxy-0.2.0/src/prism/cache/semantic_cache.py +504 -0
  61. prism_proxy-0.2.0/src/prism/cli/__init__.py +1 -0
  62. prism_proxy-0.2.0/src/prism/cli/app.py +2426 -0
  63. prism_proxy-0.2.0/src/prism/cli/commands/__init__.py +10 -0
  64. prism_proxy-0.2.0/src/prism/cli/commands/config_commands.py +264 -0
  65. prism_proxy-0.2.0/src/prism/cli/commands/init_wizard.py +657 -0
  66. prism_proxy-0.2.0/src/prism/cli/commands/projects.py +163 -0
  67. prism_proxy-0.2.0/src/prism/cli/commands/slash_commands.py +610 -0
  68. prism_proxy-0.2.0/src/prism/cli/commands/update.py +91 -0
  69. prism_proxy-0.2.0/src/prism/cli/commands/version.py +74 -0
  70. prism_proxy-0.2.0/src/prism/cli/compare.py +500 -0
  71. prism_proxy-0.2.0/src/prism/cli/completion.py +118 -0
  72. prism_proxy-0.2.0/src/prism/cli/error_handler.py +396 -0
  73. prism_proxy-0.2.0/src/prism/cli/error_recovery.py +665 -0
  74. prism_proxy-0.2.0/src/prism/cli/hooks.py +402 -0
  75. prism_proxy-0.2.0/src/prism/cli/keybindings.py +84 -0
  76. prism_proxy-0.2.0/src/prism/cli/prompt_enhancer.py +503 -0
  77. prism_proxy-0.2.0/src/prism/cli/repl.py +7797 -0
  78. prism_proxy-0.2.0/src/prism/cli/shell_completion.py +310 -0
  79. prism_proxy-0.2.0/src/prism/cli/stream_handler.py +213 -0
  80. prism_proxy-0.2.0/src/prism/cli/ui/__init__.py +48 -0
  81. prism_proxy-0.2.0/src/prism/cli/ui/display.py +330 -0
  82. prism_proxy-0.2.0/src/prism/cli/ui/prompts.py +155 -0
  83. prism_proxy-0.2.0/src/prism/cli/ui/themes.py +48 -0
  84. prism_proxy-0.2.0/src/prism/cli/updater.py +311 -0
  85. prism_proxy-0.2.0/src/prism/config/__init__.py +24 -0
  86. prism_proxy-0.2.0/src/prism/config/defaults.py +118 -0
  87. prism_proxy-0.2.0/src/prism/config/migration.py +201 -0
  88. prism_proxy-0.2.0/src/prism/config/schema.py +242 -0
  89. prism_proxy-0.2.0/src/prism/config/settings.py +346 -0
  90. prism_proxy-0.2.0/src/prism/context/__init__.py +35 -0
  91. prism_proxy-0.2.0/src/prism/context/branching.py +432 -0
  92. prism_proxy-0.2.0/src/prism/context/budget.py +458 -0
  93. prism_proxy-0.2.0/src/prism/context/conversation_compressor.py +387 -0
  94. prism_proxy-0.2.0/src/prism/context/manager.py +381 -0
  95. prism_proxy-0.2.0/src/prism/context/memory.py +187 -0
  96. prism_proxy-0.2.0/src/prism/context/memory_graph.py +1281 -0
  97. prism_proxy-0.2.0/src/prism/context/packer.py +377 -0
  98. prism_proxy-0.2.0/src/prism/context/rag.py +525 -0
  99. prism_proxy-0.2.0/src/prism/context/repo_map.py +301 -0
  100. prism_proxy-0.2.0/src/prism/context/semantic_cache.py +626 -0
  101. prism_proxy-0.2.0/src/prism/context/session.py +205 -0
  102. prism_proxy-0.2.0/src/prism/context/summarizer.py +171 -0
  103. prism_proxy-0.2.0/src/prism/core/__init__.py +31 -0
  104. prism_proxy-0.2.0/src/prism/core/logging_system.py +384 -0
  105. prism_proxy-0.2.0/src/prism/core/performance.py +419 -0
  106. prism_proxy-0.2.0/src/prism/cost/__init__.py +13 -0
  107. prism_proxy-0.2.0/src/prism/cost/analytics.py +623 -0
  108. prism_proxy-0.2.0/src/prism/cost/dashboard.py +194 -0
  109. prism_proxy-0.2.0/src/prism/cost/forecast.py +495 -0
  110. prism_proxy-0.2.0/src/prism/cost/pricing.py +420 -0
  111. prism_proxy-0.2.0/src/prism/cost/tracker.py +336 -0
  112. prism_proxy-0.2.0/src/prism/cost/usage_analytics.py +979 -0
  113. prism_proxy-0.2.0/src/prism/db/__init__.py +61 -0
  114. prism_proxy-0.2.0/src/prism/db/database.py +232 -0
  115. prism_proxy-0.2.0/src/prism/db/migrations.py +313 -0
  116. prism_proxy-0.2.0/src/prism/db/models.py +116 -0
  117. prism_proxy-0.2.0/src/prism/db/queries.py +720 -0
  118. prism_proxy-0.2.0/src/prism/eval/__init__.py +21 -0
  119. prism_proxy-0.2.0/src/prism/eval/comparator.py +308 -0
  120. prism_proxy-0.2.0/src/prism/eval/dataset.py +496 -0
  121. prism_proxy-0.2.0/src/prism/eval/metrics.py +329 -0
  122. prism_proxy-0.2.0/src/prism/eval/runner.py +469 -0
  123. prism_proxy-0.2.0/src/prism/exceptions.py +283 -0
  124. prism_proxy-0.2.0/src/prism/export/__init__.py +13 -0
  125. prism_proxy-0.2.0/src/prism/export/exporter.py +563 -0
  126. prism_proxy-0.2.0/src/prism/git/__init__.py +15 -0
  127. prism_proxy-0.2.0/src/prism/git/auto_commit.py +294 -0
  128. prism_proxy-0.2.0/src/prism/git/history.py +403 -0
  129. prism_proxy-0.2.0/src/prism/git/operations.py +395 -0
  130. prism_proxy-0.2.0/src/prism/intelligence/__init__.py +128 -0
  131. prism_proxy-0.2.0/src/prism/intelligence/aei.py +816 -0
  132. prism_proxy-0.2.0/src/prism/intelligence/archaeologist.py +1527 -0
  133. prism_proxy-0.2.0/src/prism/intelligence/architecture.py +437 -0
  134. prism_proxy-0.2.0/src/prism/intelligence/blame.py +516 -0
  135. prism_proxy-0.2.0/src/prism/intelligence/blast_radius.py +691 -0
  136. prism_proxy-0.2.0/src/prism/intelligence/context_budget.py +949 -0
  137. prism_proxy-0.2.0/src/prism/intelligence/debate.py +907 -0
  138. prism_proxy-0.2.0/src/prism/intelligence/debug_memory.py +440 -0
  139. prism_proxy-0.2.0/src/prism/intelligence/deps.py +1299 -0
  140. prism_proxy-0.2.0/src/prism/intelligence/test_gaps.py +967 -0
  141. prism_proxy-0.2.0/src/prism/llm/__init__.py +69 -0
  142. prism_proxy-0.2.0/src/prism/llm/circuit_breaker.py +773 -0
  143. prism_proxy-0.2.0/src/prism/llm/completion.py +939 -0
  144. prism_proxy-0.2.0/src/prism/llm/compressor.py +361 -0
  145. prism_proxy-0.2.0/src/prism/llm/health.py +959 -0
  146. prism_proxy-0.2.0/src/prism/llm/health_prober.py +283 -0
  147. prism_proxy-0.2.0/src/prism/llm/interruption.py +390 -0
  148. prism_proxy-0.2.0/src/prism/llm/mock.py +218 -0
  149. prism_proxy-0.2.0/src/prism/llm/model_profiles.py +552 -0
  150. prism_proxy-0.2.0/src/prism/llm/output_formatter.py +1087 -0
  151. prism_proxy-0.2.0/src/prism/llm/prompt_optimizer.py +575 -0
  152. prism_proxy-0.2.0/src/prism/llm/prompt_template.py +555 -0
  153. prism_proxy-0.2.0/src/prism/llm/provider_config.py +355 -0
  154. prism_proxy-0.2.0/src/prism/llm/quality_evaluator.py +1294 -0
  155. prism_proxy-0.2.0/src/prism/llm/quality_heuristics.py +399 -0
  156. prism_proxy-0.2.0/src/prism/llm/response_validator.py +700 -0
  157. prism_proxy-0.2.0/src/prism/llm/result.py +26 -0
  158. prism_proxy-0.2.0/src/prism/llm/retry.py +126 -0
  159. prism_proxy-0.2.0/src/prism/llm/streaming.py +273 -0
  160. prism_proxy-0.2.0/src/prism/llm/streaming_protocol.py +931 -0
  161. prism_proxy-0.2.0/src/prism/llm/system_prompts.py +325 -0
  162. prism_proxy-0.2.0/src/prism/llm/thinking.py +612 -0
  163. prism_proxy-0.2.0/src/prism/llm/tokenizer.py +302 -0
  164. prism_proxy-0.2.0/src/prism/llm/validation.py +131 -0
  165. prism_proxy-0.2.0/src/prism/logging_config.py +225 -0
  166. prism_proxy-0.2.0/src/prism/mcp/__init__.py +22 -0
  167. prism_proxy-0.2.0/src/prism/mcp/client.py +420 -0
  168. prism_proxy-0.2.0/src/prism/network/__init__.py +26 -0
  169. prism_proxy-0.2.0/src/prism/network/connectivity.py +150 -0
  170. prism_proxy-0.2.0/src/prism/network/offline.py +511 -0
  171. prism_proxy-0.2.0/src/prism/network/privacy.py +388 -0
  172. prism_proxy-0.2.0/src/prism/network/proxy.py +411 -0
  173. prism_proxy-0.2.0/src/prism/orchestrator/__init__.py +97 -0
  174. prism_proxy-0.2.0/src/prism/orchestrator/cascade.py +991 -0
  175. prism_proxy-0.2.0/src/prism/orchestrator/debate.py +698 -0
  176. prism_proxy-0.2.0/src/prism/orchestrator/moa.py +798 -0
  177. prism_proxy-0.2.0/src/prism/orchestrator/pipeline.py +537 -0
  178. prism_proxy-0.2.0/src/prism/orchestrator/quality_orchestrator.py +1202 -0
  179. prism_proxy-0.2.0/src/prism/orchestrator/self_tuner.py +337 -0
  180. prism_proxy-0.2.0/src/prism/orchestrator/swarm.py +2561 -0
  181. prism_proxy-0.2.0/src/prism/plugins/__init__.py +42 -0
  182. prism_proxy-0.2.0/src/prism/plugins/api.py +143 -0
  183. prism_proxy-0.2.0/src/prism/plugins/manager.py +1308 -0
  184. prism_proxy-0.2.0/src/prism/prompts/__init__.py +44 -0
  185. prism_proxy-0.2.0/src/prism/prompts/templates.py +1002 -0
  186. prism_proxy-0.2.0/src/prism/providers/__init__.py +10 -0
  187. prism_proxy-0.2.0/src/prism/providers/anthropic.py +405 -0
  188. prism_proxy-0.2.0/src/prism/providers/base.py +426 -0
  189. prism_proxy-0.2.0/src/prism/providers/google_provider.py +412 -0
  190. prism_proxy-0.2.0/src/prism/providers/openai_provider.py +396 -0
  191. prism_proxy-0.2.0/src/prism/providers/registry.py +351 -0
  192. prism_proxy-0.2.0/src/prism/proxy/__init__.py +1 -0
  193. prism_proxy-0.2.0/src/prism/proxy/server.py +2227 -0
  194. prism_proxy-0.2.0/src/prism/proxy/translator.py +372 -0
  195. prism_proxy-0.2.0/src/prism/router/__init__.py +58 -0
  196. prism_proxy-0.2.0/src/prism/router/ab_testing.py +675 -0
  197. prism_proxy-0.2.0/src/prism/router/classifier.py +426 -0
  198. prism_proxy-0.2.0/src/prism/router/dedup.py +648 -0
  199. prism_proxy-0.2.0/src/prism/router/fallback.py +117 -0
  200. prism_proxy-0.2.0/src/prism/router/fallback_chain.py +942 -0
  201. prism_proxy-0.2.0/src/prism/router/fingerprint.py +898 -0
  202. prism_proxy-0.2.0/src/prism/router/latency_tracker.py +295 -0
  203. prism_proxy-0.2.0/src/prism/router/learning.py +452 -0
  204. prism_proxy-0.2.0/src/prism/router/load_balancer.py +605 -0
  205. prism_proxy-0.2.0/src/prism/router/pareto.py +620 -0
  206. prism_proxy-0.2.0/src/prism/router/rate_limiter.py +141 -0
  207. prism_proxy-0.2.0/src/prism/router/selector.py +411 -0
  208. prism_proxy-0.2.0/src/prism/router/token_optimizer.py +600 -0
  209. prism_proxy-0.2.0/src/prism/security/__init__.py +19 -0
  210. prism_proxy-0.2.0/src/prism/security/audit.py +237 -0
  211. prism_proxy-0.2.0/src/prism/security/input_sanitizer.py +423 -0
  212. prism_proxy-0.2.0/src/prism/security/path_guard.py +169 -0
  213. prism_proxy-0.2.0/src/prism/security/prismignore.py +302 -0
  214. prism_proxy-0.2.0/src/prism/security/rate_limiter.py +424 -0
  215. prism_proxy-0.2.0/src/prism/security/sandbox.py +259 -0
  216. prism_proxy-0.2.0/src/prism/security/secret_filter.py +166 -0
  217. prism_proxy-0.2.0/src/prism/tools/__init__.py +58 -0
  218. prism_proxy-0.2.0/src/prism/tools/auto_test.py +653 -0
  219. prism_proxy-0.2.0/src/prism/tools/base.py +150 -0
  220. prism_proxy-0.2.0/src/prism/tools/browser.py +625 -0
  221. prism_proxy-0.2.0/src/prism/tools/browser_interact.py +951 -0
  222. prism_proxy-0.2.0/src/prism/tools/code_sandbox.py +435 -0
  223. prism_proxy-0.2.0/src/prism/tools/composer.py +601 -0
  224. prism_proxy-0.2.0/src/prism/tools/cost_optimizer.py +536 -0
  225. prism_proxy-0.2.0/src/prism/tools/directory.py +241 -0
  226. prism_proxy-0.2.0/src/prism/tools/fetch_docs.py +411 -0
  227. prism_proxy-0.2.0/src/prism/tools/file_edit.py +244 -0
  228. prism_proxy-0.2.0/src/prism/tools/file_read.py +173 -0
  229. prism_proxy-0.2.0/src/prism/tools/file_write.py +182 -0
  230. prism_proxy-0.2.0/src/prism/tools/git_tool.py +348 -0
  231. prism_proxy-0.2.0/src/prism/tools/quality_gate.py +648 -0
  232. prism_proxy-0.2.0/src/prism/tools/registry.py +172 -0
  233. prism_proxy-0.2.0/src/prism/tools/screenshot.py +328 -0
  234. prism_proxy-0.2.0/src/prism/tools/search.py +267 -0
  235. prism_proxy-0.2.0/src/prism/tools/search_web.py +402 -0
  236. prism_proxy-0.2.0/src/prism/tools/task_queue.py +528 -0
  237. prism_proxy-0.2.0/src/prism/tools/terminal.py +142 -0
  238. prism_proxy-0.2.0/src/prism/tools/vision.py +824 -0
  239. prism_proxy-0.2.0/src/prism/tracing/__init__.py +14 -0
  240. prism_proxy-0.2.0/src/prism/tracing/trace.py +401 -0
  241. prism_proxy-0.2.0/src/prism/tracing/tracer.py +244 -0
  242. prism_proxy-0.2.0/src/prism/workspace/__init__.py +11 -0
  243. prism_proxy-0.2.0/src/prism/workspace/manager.py +427 -0
  244. prism_proxy-0.2.0/test_calculator.py +47 -0
  245. prism_proxy-0.2.0/tests/__init__.py +0 -0
  246. prism_proxy-0.2.0/tests/conftest.py +57 -0
  247. prism_proxy-0.2.0/tests/test_architect/__init__.py +1 -0
  248. prism_proxy-0.2.0/tests/test_architect/conftest.py +166 -0
  249. prism_proxy-0.2.0/tests/test_architect/test_display.py +255 -0
  250. prism_proxy-0.2.0/tests/test_architect/test_executor.py +665 -0
  251. prism_proxy-0.2.0/tests/test_architect/test_phase3_enhancements.py +1141 -0
  252. prism_proxy-0.2.0/tests/test_architect/test_planner.py +181 -0
  253. prism_proxy-0.2.0/tests/test_architect/test_storage.py +418 -0
  254. prism_proxy-0.2.0/tests/test_auth/__init__.py +1 -0
  255. prism_proxy-0.2.0/tests/test_auth/conftest.py +121 -0
  256. prism_proxy-0.2.0/tests/test_auth/test_encrypted_store.py +203 -0
  257. prism_proxy-0.2.0/tests/test_auth/test_env_store.py +120 -0
  258. prism_proxy-0.2.0/tests/test_auth/test_keyring_store.py +172 -0
  259. prism_proxy-0.2.0/tests/test_auth/test_manager.py +762 -0
  260. prism_proxy-0.2.0/tests/test_auth/test_validator.py +97 -0
  261. prism_proxy-0.2.0/tests/test_cache/__init__.py +1 -0
  262. prism_proxy-0.2.0/tests/test_cache/test_response_cache.py +847 -0
  263. prism_proxy-0.2.0/tests/test_cache/test_semantic_cache.py +183 -0
  264. prism_proxy-0.2.0/tests/test_cli/__init__.py +1 -0
  265. prism_proxy-0.2.0/tests/test_cli/conftest.py +45 -0
  266. prism_proxy-0.2.0/tests/test_cli/test_app.py +1092 -0
  267. prism_proxy-0.2.0/tests/test_cli/test_commands/__init__.py +0 -0
  268. prism_proxy-0.2.0/tests/test_cli/test_commands/conftest.py +184 -0
  269. prism_proxy-0.2.0/tests/test_cli/test_commands/test_config_commands.py +246 -0
  270. prism_proxy-0.2.0/tests/test_cli/test_commands/test_error_handler.py +278 -0
  271. prism_proxy-0.2.0/tests/test_cli/test_commands/test_init_wizard.py +292 -0
  272. prism_proxy-0.2.0/tests/test_cli/test_commands/test_slash_commands.py +609 -0
  273. prism_proxy-0.2.0/tests/test_cli/test_commands/test_update.py +143 -0
  274. prism_proxy-0.2.0/tests/test_cli/test_commands/test_version.py +77 -0
  275. prism_proxy-0.2.0/tests/test_cli/test_compare.py +916 -0
  276. prism_proxy-0.2.0/tests/test_cli/test_completion.py +338 -0
  277. prism_proxy-0.2.0/tests/test_cli/test_error_recovery.py +623 -0
  278. prism_proxy-0.2.0/tests/test_cli/test_hooks.py +603 -0
  279. prism_proxy-0.2.0/tests/test_cli/test_init_wizard.py +1068 -0
  280. prism_proxy-0.2.0/tests/test_cli/test_keybindings.py +251 -0
  281. prism_proxy-0.2.0/tests/test_cli/test_phase4_items_11_14.py +1024 -0
  282. prism_proxy-0.2.0/tests/test_cli/test_phase4_repl_commands.py +2054 -0
  283. prism_proxy-0.2.0/tests/test_cli/test_phase5_arch_debug.py +914 -0
  284. prism_proxy-0.2.0/tests/test_cli/test_phase5_cli_blame_impact.py +668 -0
  285. prism_proxy-0.2.0/tests/test_cli/test_phase5_cli_context.py +519 -0
  286. prism_proxy-0.2.0/tests/test_cli/test_phase5_cli_debate_why.py +258 -0
  287. prism_proxy-0.2.0/tests/test_cli/test_phase5_cli_deps.py +371 -0
  288. prism_proxy-0.2.0/tests/test_cli/test_phase5_cli_test_gaps.py +267 -0
  289. prism_proxy-0.2.0/tests/test_cli/test_phase5_repl_aei_blame.py +532 -0
  290. prism_proxy-0.2.0/tests/test_cli/test_prompt_enhancer.py +426 -0
  291. prism_proxy-0.2.0/tests/test_cli/test_repl.py +4512 -0
  292. prism_proxy-0.2.0/tests/test_cli/test_shell_completion.py +383 -0
  293. prism_proxy-0.2.0/tests/test_cli/test_stream_handler.py +322 -0
  294. prism_proxy-0.2.0/tests/test_cli/test_ui/__init__.py +1 -0
  295. prism_proxy-0.2.0/tests/test_cli/test_ui/conftest.py +109 -0
  296. prism_proxy-0.2.0/tests/test_cli/test_ui/test_display.py +349 -0
  297. prism_proxy-0.2.0/tests/test_cli/test_ui/test_prompts.py +171 -0
  298. prism_proxy-0.2.0/tests/test_cli/test_ui/test_themes.py +160 -0
  299. prism_proxy-0.2.0/tests/test_cli/test_updater.py +537 -0
  300. prism_proxy-0.2.0/tests/test_config/__init__.py +0 -0
  301. prism_proxy-0.2.0/tests/test_config/test_migration.py +377 -0
  302. prism_proxy-0.2.0/tests/test_config/test_settings.py +194 -0
  303. prism_proxy-0.2.0/tests/test_context/__init__.py +0 -0
  304. prism_proxy-0.2.0/tests/test_context/conftest.py +108 -0
  305. prism_proxy-0.2.0/tests/test_context/test_branching.py +521 -0
  306. prism_proxy-0.2.0/tests/test_context/test_budget.py +905 -0
  307. prism_proxy-0.2.0/tests/test_context/test_conversation_compressor.py +235 -0
  308. prism_proxy-0.2.0/tests/test_context/test_manager.py +274 -0
  309. prism_proxy-0.2.0/tests/test_context/test_memory.py +187 -0
  310. prism_proxy-0.2.0/tests/test_context/test_memory_graph.py +915 -0
  311. prism_proxy-0.2.0/tests/test_context/test_packer.py +187 -0
  312. prism_proxy-0.2.0/tests/test_context/test_rag.py +264 -0
  313. prism_proxy-0.2.0/tests/test_context/test_repo_map.py +169 -0
  314. prism_proxy-0.2.0/tests/test_context/test_semantic_cache.py +669 -0
  315. prism_proxy-0.2.0/tests/test_context/test_session.py +168 -0
  316. prism_proxy-0.2.0/tests/test_context/test_summarizer.py +147 -0
  317. prism_proxy-0.2.0/tests/test_core/__init__.py +1 -0
  318. prism_proxy-0.2.0/tests/test_core/test_logging_system.py +528 -0
  319. prism_proxy-0.2.0/tests/test_core/test_performance.py +595 -0
  320. prism_proxy-0.2.0/tests/test_cost/__init__.py +0 -0
  321. prism_proxy-0.2.0/tests/test_cost/test_analytics.py +323 -0
  322. prism_proxy-0.2.0/tests/test_cost/test_dashboard.py +743 -0
  323. prism_proxy-0.2.0/tests/test_cost/test_forecast.py +814 -0
  324. prism_proxy-0.2.0/tests/test_cost/test_pricing.py +147 -0
  325. prism_proxy-0.2.0/tests/test_cost/test_tracker.py +802 -0
  326. prism_proxy-0.2.0/tests/test_cost/test_usage_analytics.py +773 -0
  327. prism_proxy-0.2.0/tests/test_db/__init__.py +1 -0
  328. prism_proxy-0.2.0/tests/test_db/conftest.py +110 -0
  329. prism_proxy-0.2.0/tests/test_db/test_database.py +213 -0
  330. prism_proxy-0.2.0/tests/test_db/test_migrations.py +207 -0
  331. prism_proxy-0.2.0/tests/test_db/test_queries.py +1424 -0
  332. prism_proxy-0.2.0/tests/test_eval/__init__.py +1 -0
  333. prism_proxy-0.2.0/tests/test_eval/conftest.py +259 -0
  334. prism_proxy-0.2.0/tests/test_eval/test_dataset.py +305 -0
  335. prism_proxy-0.2.0/tests/test_eval/test_metrics.py +305 -0
  336. prism_proxy-0.2.0/tests/test_eval/test_runner.py +457 -0
  337. prism_proxy-0.2.0/tests/test_export/__init__.py +1 -0
  338. prism_proxy-0.2.0/tests/test_export/test_exporter.py +348 -0
  339. prism_proxy-0.2.0/tests/test_git/__init__.py +0 -0
  340. prism_proxy-0.2.0/tests/test_git/conftest.py +89 -0
  341. prism_proxy-0.2.0/tests/test_git/test_auto_commit.py +180 -0
  342. prism_proxy-0.2.0/tests/test_git/test_history.py +536 -0
  343. prism_proxy-0.2.0/tests/test_git/test_operations.py +222 -0
  344. prism_proxy-0.2.0/tests/test_git/test_operations_extended.py +244 -0
  345. prism_proxy-0.2.0/tests/test_integration/__init__.py +0 -0
  346. prism_proxy-0.2.0/tests/test_integration/conftest.py +182 -0
  347. prism_proxy-0.2.0/tests/test_integration/test_budget.py +274 -0
  348. prism_proxy-0.2.0/tests/test_integration/test_conversation_flow.py +253 -0
  349. prism_proxy-0.2.0/tests/test_integration/test_e2e.py +1400 -0
  350. prism_proxy-0.2.0/tests/test_integration/test_interrupt.py +241 -0
  351. prism_proxy-0.2.0/tests/test_integration/test_learning.py +328 -0
  352. prism_proxy-0.2.0/tests/test_integration/test_real_world_quality.py +2173 -0
  353. prism_proxy-0.2.0/tests/test_integration/test_routing_pipeline.py +407 -0
  354. prism_proxy-0.2.0/tests/test_integration/test_security.py +247 -0
  355. prism_proxy-0.2.0/tests/test_integration/test_tool_pipeline.py +189 -0
  356. prism_proxy-0.2.0/tests/test_intelligence/__init__.py +1 -0
  357. prism_proxy-0.2.0/tests/test_intelligence/test_aei.py +1039 -0
  358. prism_proxy-0.2.0/tests/test_intelligence/test_archaeologist.py +1681 -0
  359. prism_proxy-0.2.0/tests/test_intelligence/test_architecture.py +694 -0
  360. prism_proxy-0.2.0/tests/test_intelligence/test_blame.py +777 -0
  361. prism_proxy-0.2.0/tests/test_intelligence/test_blast_radius.py +564 -0
  362. prism_proxy-0.2.0/tests/test_intelligence/test_blast_report_format.py +558 -0
  363. prism_proxy-0.2.0/tests/test_intelligence/test_debate.py +624 -0
  364. prism_proxy-0.2.0/tests/test_intelligence/test_debug_memory.py +838 -0
  365. prism_proxy-0.2.0/tests/test_intelligence/test_deps.py +680 -0
  366. prism_proxy-0.2.0/tests/test_intelligence/test_phase5_aei_enhancements.py +469 -0
  367. prism_proxy-0.2.0/tests/test_intelligence/test_phase5_archaeologist_enhanced.py +867 -0
  368. prism_proxy-0.2.0/tests/test_intelligence/test_phase5_blast_enhancements.py +447 -0
  369. prism_proxy-0.2.0/tests/test_intelligence/test_phase5_context_budget_enhanced.py +1060 -0
  370. prism_proxy-0.2.0/tests/test_intelligence/test_phase5_debate_enhanced.py +580 -0
  371. prism_proxy-0.2.0/tests/test_intelligence/test_phase5_deps_enhanced.py +1160 -0
  372. prism_proxy-0.2.0/tests/test_intelligence/test_phase5_test_gaps_enhanced.py +576 -0
  373. prism_proxy-0.2.0/tests/test_intelligence/test_test_gaps.py +642 -0
  374. prism_proxy-0.2.0/tests/test_llm/__init__.py +1 -0
  375. prism_proxy-0.2.0/tests/test_llm/conftest.py +193 -0
  376. prism_proxy-0.2.0/tests/test_llm/test_circuit_breaker.py +716 -0
  377. prism_proxy-0.2.0/tests/test_llm/test_completion.py +303 -0
  378. prism_proxy-0.2.0/tests/test_llm/test_compressor.py +128 -0
  379. prism_proxy-0.2.0/tests/test_llm/test_health.py +1443 -0
  380. prism_proxy-0.2.0/tests/test_llm/test_health_prober.py +128 -0
  381. prism_proxy-0.2.0/tests/test_llm/test_interruption.py +713 -0
  382. prism_proxy-0.2.0/tests/test_llm/test_mock.py +197 -0
  383. prism_proxy-0.2.0/tests/test_llm/test_model_profiles.py +248 -0
  384. prism_proxy-0.2.0/tests/test_llm/test_output_formatter.py +642 -0
  385. prism_proxy-0.2.0/tests/test_llm/test_phase3_litellm.py +587 -0
  386. prism_proxy-0.2.0/tests/test_llm/test_prompt_optimizer.py +219 -0
  387. prism_proxy-0.2.0/tests/test_llm/test_prompt_template.py +449 -0
  388. prism_proxy-0.2.0/tests/test_llm/test_provider_config.py +167 -0
  389. prism_proxy-0.2.0/tests/test_llm/test_quality_evaluator.py +739 -0
  390. prism_proxy-0.2.0/tests/test_llm/test_quality_heuristics.py +120 -0
  391. prism_proxy-0.2.0/tests/test_llm/test_response_validator.py +472 -0
  392. prism_proxy-0.2.0/tests/test_llm/test_retry.py +200 -0
  393. prism_proxy-0.2.0/tests/test_llm/test_streaming.py +294 -0
  394. prism_proxy-0.2.0/tests/test_llm/test_streaming_protocol.py +719 -0
  395. prism_proxy-0.2.0/tests/test_llm/test_system_prompts.py +564 -0
  396. prism_proxy-0.2.0/tests/test_llm/test_thinking.py +474 -0
  397. prism_proxy-0.2.0/tests/test_llm/test_tokenizer.py +853 -0
  398. prism_proxy-0.2.0/tests/test_llm/test_validation.py +151 -0
  399. prism_proxy-0.2.0/tests/test_logging_config.py +468 -0
  400. prism_proxy-0.2.0/tests/test_mcp/__init__.py +1 -0
  401. prism_proxy-0.2.0/tests/test_mcp/test_client.py +733 -0
  402. prism_proxy-0.2.0/tests/test_network/__init__.py +1 -0
  403. prism_proxy-0.2.0/tests/test_network/conftest.py +58 -0
  404. prism_proxy-0.2.0/tests/test_network/test_connectivity.py +173 -0
  405. prism_proxy-0.2.0/tests/test_network/test_offline.py +585 -0
  406. prism_proxy-0.2.0/tests/test_network/test_privacy.py +606 -0
  407. prism_proxy-0.2.0/tests/test_network/test_proxy.py +523 -0
  408. prism_proxy-0.2.0/tests/test_orchestrator/__init__.py +1 -0
  409. prism_proxy-0.2.0/tests/test_orchestrator/conftest.py +432 -0
  410. prism_proxy-0.2.0/tests/test_orchestrator/test_cascade.py +1237 -0
  411. prism_proxy-0.2.0/tests/test_orchestrator/test_debate.py +1230 -0
  412. prism_proxy-0.2.0/tests/test_orchestrator/test_moa.py +1023 -0
  413. prism_proxy-0.2.0/tests/test_orchestrator/test_pipeline.py +370 -0
  414. prism_proxy-0.2.0/tests/test_orchestrator/test_quality_orchestrator.py +1459 -0
  415. prism_proxy-0.2.0/tests/test_orchestrator/test_self_tuner.py +181 -0
  416. prism_proxy-0.2.0/tests/test_orchestrator/test_swarm.py +3399 -0
  417. prism_proxy-0.2.0/tests/test_plugins/__init__.py +1 -0
  418. prism_proxy-0.2.0/tests/test_plugins/test_api.py +303 -0
  419. prism_proxy-0.2.0/tests/test_plugins/test_manager.py +979 -0
  420. prism_proxy-0.2.0/tests/test_prompts/__init__.py +0 -0
  421. prism_proxy-0.2.0/tests/test_prompts/test_templates.py +689 -0
  422. prism_proxy-0.2.0/tests/test_providers/__init__.py +0 -0
  423. prism_proxy-0.2.0/tests/test_providers/test_anthropic.py +604 -0
  424. prism_proxy-0.2.0/tests/test_providers/test_google_provider.py +506 -0
  425. prism_proxy-0.2.0/tests/test_providers/test_openai_provider.py +642 -0
  426. prism_proxy-0.2.0/tests/test_providers/test_registry.py +218 -0
  427. prism_proxy-0.2.0/tests/test_proxy/__init__.py +0 -0
  428. prism_proxy-0.2.0/tests/test_proxy/test_server.py +634 -0
  429. prism_proxy-0.2.0/tests/test_proxy/test_translator.py +314 -0
  430. prism_proxy-0.2.0/tests/test_router/__init__.py +0 -0
  431. prism_proxy-0.2.0/tests/test_router/test_ab_testing.py +384 -0
  432. prism_proxy-0.2.0/tests/test_router/test_classifier.py +271 -0
  433. prism_proxy-0.2.0/tests/test_router/test_dedup.py +879 -0
  434. prism_proxy-0.2.0/tests/test_router/test_fallback.py +174 -0
  435. prism_proxy-0.2.0/tests/test_router/test_fallback_chain.py +874 -0
  436. prism_proxy-0.2.0/tests/test_router/test_fingerprint.py +655 -0
  437. prism_proxy-0.2.0/tests/test_router/test_latency_tracker.py +134 -0
  438. prism_proxy-0.2.0/tests/test_router/test_learning.py +180 -0
  439. prism_proxy-0.2.0/tests/test_router/test_load_balancer.py +477 -0
  440. prism_proxy-0.2.0/tests/test_router/test_pareto.py +540 -0
  441. prism_proxy-0.2.0/tests/test_router/test_rate_limiter.py +149 -0
  442. prism_proxy-0.2.0/tests/test_router/test_selector.py +335 -0
  443. prism_proxy-0.2.0/tests/test_router/test_token_optimizer.py +759 -0
  444. prism_proxy-0.2.0/tests/test_security/__init__.py +1 -0
  445. prism_proxy-0.2.0/tests/test_security/conftest.py +89 -0
  446. prism_proxy-0.2.0/tests/test_security/test_audit.py +336 -0
  447. prism_proxy-0.2.0/tests/test_security/test_input_sanitizer.py +306 -0
  448. prism_proxy-0.2.0/tests/test_security/test_path_guard.py +255 -0
  449. prism_proxy-0.2.0/tests/test_security/test_prismignore.py +568 -0
  450. prism_proxy-0.2.0/tests/test_security/test_rate_limiter.py +225 -0
  451. prism_proxy-0.2.0/tests/test_security/test_sandbox.py +231 -0
  452. prism_proxy-0.2.0/tests/test_security/test_secret_filter.py +187 -0
  453. prism_proxy-0.2.0/tests/test_tools/__init__.py +0 -0
  454. prism_proxy-0.2.0/tests/test_tools/conftest.py +100 -0
  455. prism_proxy-0.2.0/tests/test_tools/test_auto_test.py +662 -0
  456. prism_proxy-0.2.0/tests/test_tools/test_browser.py +229 -0
  457. prism_proxy-0.2.0/tests/test_tools/test_browser_interact.py +1289 -0
  458. prism_proxy-0.2.0/tests/test_tools/test_code_sandbox.py +565 -0
  459. prism_proxy-0.2.0/tests/test_tools/test_composer.py +1198 -0
  460. prism_proxy-0.2.0/tests/test_tools/test_cost_optimizer.py +413 -0
  461. prism_proxy-0.2.0/tests/test_tools/test_directory.py +150 -0
  462. prism_proxy-0.2.0/tests/test_tools/test_file_edit.py +257 -0
  463. prism_proxy-0.2.0/tests/test_tools/test_file_read.py +138 -0
  464. prism_proxy-0.2.0/tests/test_tools/test_file_write.py +195 -0
  465. prism_proxy-0.2.0/tests/test_tools/test_git_tool.py +406 -0
  466. prism_proxy-0.2.0/tests/test_tools/test_phase3_web.py +395 -0
  467. prism_proxy-0.2.0/tests/test_tools/test_phase3_web_enhancements.py +1204 -0
  468. prism_proxy-0.2.0/tests/test_tools/test_quality_gate.py +555 -0
  469. prism_proxy-0.2.0/tests/test_tools/test_registry.py +159 -0
  470. prism_proxy-0.2.0/tests/test_tools/test_screenshot.py +190 -0
  471. prism_proxy-0.2.0/tests/test_tools/test_search.py +151 -0
  472. prism_proxy-0.2.0/tests/test_tools/test_task_queue.py +708 -0
  473. prism_proxy-0.2.0/tests/test_tools/test_terminal.py +135 -0
  474. prism_proxy-0.2.0/tests/test_tools/test_vision.py +1085 -0
  475. prism_proxy-0.2.0/tests/test_tracing/__init__.py +1 -0
  476. prism_proxy-0.2.0/tests/test_tracing/test_trace.py +434 -0
  477. prism_proxy-0.2.0/tests/test_workspace/__init__.py +1 -0
  478. prism_proxy-0.2.0/tests/test_workspace/test_manager.py +549 -0
@@ -0,0 +1,30 @@
1
+ # Prism API Keys — copy to .env and fill in your keys
2
+ # None are required — Prism works with any combination of providers
3
+
4
+ # Anthropic (Claude)
5
+ # ANTHROPIC_API_KEY=sk-ant-...
6
+
7
+ # OpenAI (GPT-4o)
8
+ # OPENAI_API_KEY=sk-...
9
+
10
+ # Google AI Studio (Gemini)
11
+ # GOOGLE_API_KEY=AI...
12
+
13
+ # DeepSeek
14
+ # DEEPSEEK_API_KEY=sk-...
15
+
16
+ # Groq
17
+ # GROQ_API_KEY=gsk_...
18
+
19
+ # Mistral
20
+ # MISTRAL_API_KEY=...
21
+
22
+ # OpenRouter (one key = access to many free models)
23
+ # Get free key: https://openrouter.ai/keys
24
+ # OPENROUTER_API_KEY=sk-or-v1-...
25
+
26
+ # Prism Configuration (optional)
27
+ # PRISM_HOME=~/.prism
28
+ # PRISM_LOG_LEVEL=WARNING
29
+ # PRISM_BUDGET_DAILY=5.00
30
+ # PRISM_BUDGET_MONTHLY=50.00
@@ -0,0 +1,18 @@
1
+ # Prism CLI — Code Owners
2
+ # These owners will be requested for review on PRs that touch their areas.
3
+
4
+ # Global fallback
5
+ * @GoparapukethaN
6
+
7
+ # Core modules
8
+ /src/prism/config/ @GoparapukethaN
9
+ /src/prism/router/ @GoparapukethaN
10
+ /src/prism/security/ @GoparapukethaN
11
+ /src/prism/auth/ @GoparapukethaN
12
+
13
+ # CI/CD and packaging
14
+ /.github/ @GoparapukethaN
15
+ /pyproject.toml @GoparapukethaN
16
+
17
+ # Documentation
18
+ /*.md @GoparapukethaN
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Report a bug to help us improve Prism
4
+ title: "[BUG] "
5
+ labels: bug
6
+ assignees: ""
7
+ ---
8
+
9
+ ## Description
10
+
11
+ A clear and concise description of the bug.
12
+
13
+ ## Steps to Reproduce
14
+
15
+ 1. Run `prism ...`
16
+ 2. Enter '...'
17
+ 3. See error
18
+
19
+ ## Expected Behavior
20
+
21
+ What you expected to happen.
22
+
23
+ ## Actual Behavior
24
+
25
+ What actually happened. Include the full error message or traceback if available.
26
+
27
+ ## Environment
28
+
29
+ - **Prism version**: (`prism --version`)
30
+ - **Python version**: (`python --version`)
31
+ - **OS**: (e.g., macOS 14.5, Ubuntu 22.04, Windows 11)
32
+ - **Installation method**: (pip, pipx, source)
33
+
34
+ ## Logs
35
+
36
+ <details>
37
+ <summary>Relevant log output</summary>
38
+
39
+ ```
40
+ Paste logs here (make sure to redact any API keys or secrets)
41
+ ```
42
+
43
+ </details>
44
+
45
+ ## Additional Context
46
+
47
+ Add any other context about the problem here.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest a new feature or improvement for Prism
4
+ title: "[FEATURE] "
5
+ labels: enhancement
6
+ assignees: ""
7
+ ---
8
+
9
+ ## Problem Statement
10
+
11
+ A clear description of the problem this feature would solve.
12
+ Example: "I'm always frustrated when..."
13
+
14
+ ## Proposed Solution
15
+
16
+ A clear description of what you'd like to happen.
17
+
18
+ ## Alternatives Considered
19
+
20
+ A description of any alternative solutions or features you've considered.
21
+
22
+ ## Use Case
23
+
24
+ Describe your specific use case for this feature. How would you use it day-to-day?
25
+
26
+ ## Additional Context
27
+
28
+ Add any other context, screenshots, or mockups about the feature request here.
29
+
30
+ ## Willingness to Contribute
31
+
32
+ - [ ] I would be willing to submit a PR for this feature
33
+ - [ ] I can help test this feature
34
+ - [ ] I can help with documentation for this feature
@@ -0,0 +1,35 @@
1
+ ## Summary
2
+
3
+ <!-- Brief description of what this PR does and why -->
4
+
5
+ ## Changes
6
+
7
+ <!-- List of specific changes -->
8
+ -
9
+ -
10
+ -
11
+
12
+ ## Related Issues
13
+
14
+ <!-- Link to related issues: Fixes #123, Closes #456 -->
15
+
16
+ ## Test Plan
17
+
18
+ - [ ] Unit tests added/updated
19
+ - [ ] Integration tests (if applicable)
20
+ - [ ] Security tests (if applicable)
21
+ - [ ] All existing tests pass (`pytest tests/`)
22
+ - [ ] Coverage meets 90% threshold
23
+
24
+ ## Checklist
25
+
26
+ - [ ] Code follows project conventions (CONVENTIONS.md)
27
+ - [ ] No hardcoded secrets or API keys
28
+ - [ ] All functions have type hints and docstrings
29
+ - [ ] `ruff check src/ tests/` passes with no errors
30
+ - [ ] `bandit -r src/prism/ -c pyproject.toml` passes
31
+ - [ ] Documentation updated (if applicable)
32
+
33
+ ## Screenshots / Output
34
+
35
+ <!-- If applicable, add screenshots or command output -->
@@ -0,0 +1,59 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ | Version | Supported |
6
+ |---------|--------------------|
7
+ | 0.1.x | :white_check_mark: |
8
+
9
+ ## Reporting a Vulnerability
10
+
11
+ We take security seriously. If you discover a security vulnerability in Prism, please report it responsibly.
12
+
13
+ ### How to Report
14
+
15
+ 1. **Do NOT open a public GitHub issue** for security vulnerabilities.
16
+ 2. Email your report to the maintainers with the subject line: `[SECURITY] Prism vulnerability report`.
17
+ 3. Include:
18
+ - Description of the vulnerability
19
+ - Steps to reproduce
20
+ - Potential impact
21
+ - Suggested fix (if any)
22
+
23
+ ### What to Expect
24
+
25
+ - **Acknowledgment**: Within 48 hours of your report.
26
+ - **Assessment**: We will assess the severity within 1 week.
27
+ - **Fix**: Critical vulnerabilities will be patched within 2 weeks. Non-critical issues will be addressed in the next release cycle.
28
+ - **Disclosure**: We will coordinate disclosure with you. We request a 90-day disclosure window for critical issues.
29
+
30
+ ### Scope
31
+
32
+ The following are in scope for security reports:
33
+
34
+ - **API key exposure**: Any path where API keys could be logged, displayed, or leaked
35
+ - **Path traversal**: File operations that escape the project root
36
+ - **Command injection**: Unsanitized input reaching shell execution
37
+ - **Credential storage**: Weaknesses in keyring/encrypted storage
38
+ - **Dependency vulnerabilities**: Known CVEs in direct dependencies
39
+
40
+ ### Out of Scope
41
+
42
+ - Issues in third-party AI provider APIs
43
+ - Denial of service via resource exhaustion (CLI is single-user)
44
+ - Social engineering attacks
45
+
46
+ ### Security Design
47
+
48
+ Prism implements multiple security layers:
49
+
50
+ - **Path traversal prevention**: All file paths are resolved and validated against the project root
51
+ - **Secret filtering**: API keys are scrubbed from logs, error messages, and subprocess environments
52
+ - **Command sandboxing**: Terminal commands run with timeouts, output limits, and filtered environment variables
53
+ - **Sensitive file blocking**: Patterns like `.env`, `.ssh/`, and credential files are excluded from tool operations
54
+ - **Audit logging**: Every tool execution is logged to `~/.prism/audit.log`
55
+ - **Credential storage**: API keys are stored in the OS keyring (macOS Keychain, Windows Credential Locker, Linux Secret Service) with encrypted fallback
56
+
57
+ ## Acknowledgments
58
+
59
+ We appreciate security researchers who help keep Prism safe. Contributors will be acknowledged in release notes (unless they prefer to remain anonymous).
@@ -0,0 +1,63 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, master]
6
+ pull_request:
7
+ branches: [main, master]
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ lint:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.12"
21
+ - name: Install dependencies
22
+ run: pip install -e ".[dev]"
23
+ - name: Ruff lint
24
+ run: ruff check src/ tests/
25
+ - name: Ruff format check
26
+ run: ruff format --check src/ tests/
27
+
28
+ security:
29
+ runs-on: ubuntu-latest
30
+ steps:
31
+ - uses: actions/checkout@v4
32
+ - uses: actions/setup-python@v5
33
+ with:
34
+ python-version: "3.12"
35
+ - name: Install dependencies
36
+ run: pip install -e ".[dev]"
37
+ - name: Bandit security scan
38
+ run: bandit -r src/prism/ -c pyproject.toml
39
+
40
+ test:
41
+ runs-on: ubuntu-latest
42
+ strategy:
43
+ fail-fast: false
44
+ matrix:
45
+ python-version: ["3.11", "3.12"]
46
+
47
+ steps:
48
+ - uses: actions/checkout@v4
49
+ - uses: actions/setup-python@v5
50
+ with:
51
+ python-version: ${{ matrix.python-version }}
52
+ cache: pip
53
+ - name: Install dependencies
54
+ run: pip install -e ".[dev]"
55
+ - name: Run tests with coverage
56
+ run: pytest tests/ --cov=src/prism --cov-report=xml --cov-report=term-missing --cov-fail-under=90
57
+ - name: Upload coverage to Codecov
58
+ uses: codecov/codecov-action@v4
59
+ if: matrix.python-version == '3.12'
60
+ with:
61
+ file: coverage.xml
62
+ flags: unittests
63
+ fail_ci_if_error: false
@@ -0,0 +1,30 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*"]
6
+
7
+ jobs:
8
+ release:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: write
12
+ id-token: write
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.12"
18
+ - name: Install build tools
19
+ run: pip install build twine
20
+ - name: Build package
21
+ run: python -m build
22
+ - name: Validate package
23
+ run: twine check dist/*
24
+ - name: Publish to PyPI
25
+ uses: pypa/gh-action-pypi-publish@release/v1
26
+ - name: Create GitHub Release
27
+ uses: softprops/action-gh-release@v2
28
+ with:
29
+ generate_release_notes: true
30
+ files: dist/*
@@ -0,0 +1,60 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ *.egg-info/
7
+ *.egg
8
+ dist/
9
+ build/
10
+ .eggs/
11
+
12
+ # Virtual environments
13
+ .venv/
14
+ venv/
15
+ ENV/
16
+
17
+ # IDE
18
+ .vscode/
19
+ .idea/
20
+ *.swp
21
+ *.swo
22
+ *~
23
+ .DS_Store
24
+
25
+ # Testing
26
+ .pytest_cache/
27
+ .coverage
28
+ coverage.xml
29
+ htmlcov/
30
+ .mypy_cache/
31
+ .ruff_cache/
32
+
33
+ # Environment and secrets
34
+ .env
35
+ .env.*
36
+ !.env.example
37
+ *.pem
38
+ *.key
39
+ *.p12
40
+ *.pfx
41
+ credentials.json
42
+ service-account*.json
43
+
44
+ # Prism data (user-specific)
45
+ .prism/
46
+ .prism.db
47
+ audit.log
48
+ secrets/
49
+
50
+ # Build artifacts
51
+ *.prof
52
+ *.bin
53
+ bandit-report.json
54
+
55
+ # Claude Code
56
+ .claude/
57
+
58
+ # OS
59
+ Thumbs.db
60
+ .DS_Store
@@ -0,0 +1,13 @@
1
+ # Project: Multi-API Intelligent Router CLI
2
+
3
+ ## Stack
4
+ <!-- Describe your tech stack here -->
5
+
6
+ ## Conventions
7
+ <!-- Describe your coding conventions here -->
8
+
9
+ ## Architecture
10
+ <!-- Describe your project structure here -->
11
+
12
+ ## Notes for AI
13
+ <!-- Add any special instructions for Prism here -->