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.
- prism_proxy-0.2.0/.env.example +30 -0
- prism_proxy-0.2.0/.github/CODEOWNERS +18 -0
- prism_proxy-0.2.0/.github/ISSUE_TEMPLATE/bug_report.md +47 -0
- prism_proxy-0.2.0/.github/ISSUE_TEMPLATE/feature_request.md +34 -0
- prism_proxy-0.2.0/.github/PULL_REQUEST_TEMPLATE.md +35 -0
- prism_proxy-0.2.0/.github/SECURITY.md +59 -0
- prism_proxy-0.2.0/.github/workflows/ci.yml +63 -0
- prism_proxy-0.2.0/.github/workflows/release.yml +30 -0
- prism_proxy-0.2.0/.gitignore +60 -0
- prism_proxy-0.2.0/.prism.md +13 -0
- prism_proxy-0.2.0/API_CONTRACTS.md +398 -0
- prism_proxy-0.2.0/ARCHITECTURE.md +225 -0
- prism_proxy-0.2.0/CHANGELOG.md +89 -0
- prism_proxy-0.2.0/CI_CD.md +260 -0
- prism_proxy-0.2.0/CLAUDE.md +240 -0
- prism_proxy-0.2.0/CODE_REVIEW.md +161 -0
- prism_proxy-0.2.0/CONTEXT_MANAGEMENT.md +286 -0
- prism_proxy-0.2.0/CONTRIBUTING.md +271 -0
- prism_proxy-0.2.0/CONVENTIONS.md +340 -0
- prism_proxy-0.2.0/COST_LOGIC.md +315 -0
- prism_proxy-0.2.0/DATABASE.md +187 -0
- prism_proxy-0.2.0/DATA_MODELS.md +287 -0
- prism_proxy-0.2.0/DEBUGGING.md +281 -0
- prism_proxy-0.2.0/DECISIONS.md +252 -0
- prism_proxy-0.2.0/DEPENDENCIES.md +156 -0
- prism_proxy-0.2.0/ENVIRONMENT.md +212 -0
- prism_proxy-0.2.0/ERROR_HANDLING.md +333 -0
- prism_proxy-0.2.0/HANDOFF.md +110 -0
- prism_proxy-0.2.0/KNOWN_ISSUES.md +86 -0
- prism_proxy-0.2.0/LICENSE +190 -0
- prism_proxy-0.2.0/LOGGING.md +202 -0
- prism_proxy-0.2.0/MEMORY.md +46 -0
- prism_proxy-0.2.0/PERFORMANCE.md +227 -0
- prism_proxy-0.2.0/PERMISSIONS.md +192 -0
- prism_proxy-0.2.0/PKG-INFO +294 -0
- prism_proxy-0.2.0/PROGRESS.md +157 -0
- prism_proxy-0.2.0/PROMPTS.md +265 -0
- prism_proxy-0.2.0/PROVIDER_SPECS.md +401 -0
- prism_proxy-0.2.0/README.md +223 -0
- prism_proxy-0.2.0/ROUTING_LOGIC.md +287 -0
- prism_proxy-0.2.0/SECURITY.md +183 -0
- prism_proxy-0.2.0/TESTING.md +376 -0
- prism_proxy-0.2.0/TOOL_SPECS.md +365 -0
- prism_proxy-0.2.0/pyproject.toml +195 -0
- prism_proxy-0.2.0/src/prism/__init__.py +4 -0
- prism_proxy-0.2.0/src/prism/__main__.py +21 -0
- prism_proxy-0.2.0/src/prism/architect/__init__.py +62 -0
- prism_proxy-0.2.0/src/prism/architect/display.py +798 -0
- prism_proxy-0.2.0/src/prism/architect/executor.py +1228 -0
- prism_proxy-0.2.0/src/prism/architect/planner.py +757 -0
- prism_proxy-0.2.0/src/prism/architect/storage.py +459 -0
- prism_proxy-0.2.0/src/prism/auth/__init__.py +16 -0
- prism_proxy-0.2.0/src/prism/auth/encrypted_store.py +255 -0
- prism_proxy-0.2.0/src/prism/auth/env_store.py +106 -0
- prism_proxy-0.2.0/src/prism/auth/keyring_store.py +170 -0
- prism_proxy-0.2.0/src/prism/auth/manager.py +331 -0
- prism_proxy-0.2.0/src/prism/auth/validator.py +126 -0
- prism_proxy-0.2.0/src/prism/cache/__init__.py +13 -0
- prism_proxy-0.2.0/src/prism/cache/response_cache.py +669 -0
- prism_proxy-0.2.0/src/prism/cache/semantic_cache.py +504 -0
- prism_proxy-0.2.0/src/prism/cli/__init__.py +1 -0
- prism_proxy-0.2.0/src/prism/cli/app.py +2426 -0
- prism_proxy-0.2.0/src/prism/cli/commands/__init__.py +10 -0
- prism_proxy-0.2.0/src/prism/cli/commands/config_commands.py +264 -0
- prism_proxy-0.2.0/src/prism/cli/commands/init_wizard.py +657 -0
- prism_proxy-0.2.0/src/prism/cli/commands/projects.py +163 -0
- prism_proxy-0.2.0/src/prism/cli/commands/slash_commands.py +610 -0
- prism_proxy-0.2.0/src/prism/cli/commands/update.py +91 -0
- prism_proxy-0.2.0/src/prism/cli/commands/version.py +74 -0
- prism_proxy-0.2.0/src/prism/cli/compare.py +500 -0
- prism_proxy-0.2.0/src/prism/cli/completion.py +118 -0
- prism_proxy-0.2.0/src/prism/cli/error_handler.py +396 -0
- prism_proxy-0.2.0/src/prism/cli/error_recovery.py +665 -0
- prism_proxy-0.2.0/src/prism/cli/hooks.py +402 -0
- prism_proxy-0.2.0/src/prism/cli/keybindings.py +84 -0
- prism_proxy-0.2.0/src/prism/cli/prompt_enhancer.py +503 -0
- prism_proxy-0.2.0/src/prism/cli/repl.py +7797 -0
- prism_proxy-0.2.0/src/prism/cli/shell_completion.py +310 -0
- prism_proxy-0.2.0/src/prism/cli/stream_handler.py +213 -0
- prism_proxy-0.2.0/src/prism/cli/ui/__init__.py +48 -0
- prism_proxy-0.2.0/src/prism/cli/ui/display.py +330 -0
- prism_proxy-0.2.0/src/prism/cli/ui/prompts.py +155 -0
- prism_proxy-0.2.0/src/prism/cli/ui/themes.py +48 -0
- prism_proxy-0.2.0/src/prism/cli/updater.py +311 -0
- prism_proxy-0.2.0/src/prism/config/__init__.py +24 -0
- prism_proxy-0.2.0/src/prism/config/defaults.py +118 -0
- prism_proxy-0.2.0/src/prism/config/migration.py +201 -0
- prism_proxy-0.2.0/src/prism/config/schema.py +242 -0
- prism_proxy-0.2.0/src/prism/config/settings.py +346 -0
- prism_proxy-0.2.0/src/prism/context/__init__.py +35 -0
- prism_proxy-0.2.0/src/prism/context/branching.py +432 -0
- prism_proxy-0.2.0/src/prism/context/budget.py +458 -0
- prism_proxy-0.2.0/src/prism/context/conversation_compressor.py +387 -0
- prism_proxy-0.2.0/src/prism/context/manager.py +381 -0
- prism_proxy-0.2.0/src/prism/context/memory.py +187 -0
- prism_proxy-0.2.0/src/prism/context/memory_graph.py +1281 -0
- prism_proxy-0.2.0/src/prism/context/packer.py +377 -0
- prism_proxy-0.2.0/src/prism/context/rag.py +525 -0
- prism_proxy-0.2.0/src/prism/context/repo_map.py +301 -0
- prism_proxy-0.2.0/src/prism/context/semantic_cache.py +626 -0
- prism_proxy-0.2.0/src/prism/context/session.py +205 -0
- prism_proxy-0.2.0/src/prism/context/summarizer.py +171 -0
- prism_proxy-0.2.0/src/prism/core/__init__.py +31 -0
- prism_proxy-0.2.0/src/prism/core/logging_system.py +384 -0
- prism_proxy-0.2.0/src/prism/core/performance.py +419 -0
- prism_proxy-0.2.0/src/prism/cost/__init__.py +13 -0
- prism_proxy-0.2.0/src/prism/cost/analytics.py +623 -0
- prism_proxy-0.2.0/src/prism/cost/dashboard.py +194 -0
- prism_proxy-0.2.0/src/prism/cost/forecast.py +495 -0
- prism_proxy-0.2.0/src/prism/cost/pricing.py +420 -0
- prism_proxy-0.2.0/src/prism/cost/tracker.py +336 -0
- prism_proxy-0.2.0/src/prism/cost/usage_analytics.py +979 -0
- prism_proxy-0.2.0/src/prism/db/__init__.py +61 -0
- prism_proxy-0.2.0/src/prism/db/database.py +232 -0
- prism_proxy-0.2.0/src/prism/db/migrations.py +313 -0
- prism_proxy-0.2.0/src/prism/db/models.py +116 -0
- prism_proxy-0.2.0/src/prism/db/queries.py +720 -0
- prism_proxy-0.2.0/src/prism/eval/__init__.py +21 -0
- prism_proxy-0.2.0/src/prism/eval/comparator.py +308 -0
- prism_proxy-0.2.0/src/prism/eval/dataset.py +496 -0
- prism_proxy-0.2.0/src/prism/eval/metrics.py +329 -0
- prism_proxy-0.2.0/src/prism/eval/runner.py +469 -0
- prism_proxy-0.2.0/src/prism/exceptions.py +283 -0
- prism_proxy-0.2.0/src/prism/export/__init__.py +13 -0
- prism_proxy-0.2.0/src/prism/export/exporter.py +563 -0
- prism_proxy-0.2.0/src/prism/git/__init__.py +15 -0
- prism_proxy-0.2.0/src/prism/git/auto_commit.py +294 -0
- prism_proxy-0.2.0/src/prism/git/history.py +403 -0
- prism_proxy-0.2.0/src/prism/git/operations.py +395 -0
- prism_proxy-0.2.0/src/prism/intelligence/__init__.py +128 -0
- prism_proxy-0.2.0/src/prism/intelligence/aei.py +816 -0
- prism_proxy-0.2.0/src/prism/intelligence/archaeologist.py +1527 -0
- prism_proxy-0.2.0/src/prism/intelligence/architecture.py +437 -0
- prism_proxy-0.2.0/src/prism/intelligence/blame.py +516 -0
- prism_proxy-0.2.0/src/prism/intelligence/blast_radius.py +691 -0
- prism_proxy-0.2.0/src/prism/intelligence/context_budget.py +949 -0
- prism_proxy-0.2.0/src/prism/intelligence/debate.py +907 -0
- prism_proxy-0.2.0/src/prism/intelligence/debug_memory.py +440 -0
- prism_proxy-0.2.0/src/prism/intelligence/deps.py +1299 -0
- prism_proxy-0.2.0/src/prism/intelligence/test_gaps.py +967 -0
- prism_proxy-0.2.0/src/prism/llm/__init__.py +69 -0
- prism_proxy-0.2.0/src/prism/llm/circuit_breaker.py +773 -0
- prism_proxy-0.2.0/src/prism/llm/completion.py +939 -0
- prism_proxy-0.2.0/src/prism/llm/compressor.py +361 -0
- prism_proxy-0.2.0/src/prism/llm/health.py +959 -0
- prism_proxy-0.2.0/src/prism/llm/health_prober.py +283 -0
- prism_proxy-0.2.0/src/prism/llm/interruption.py +390 -0
- prism_proxy-0.2.0/src/prism/llm/mock.py +218 -0
- prism_proxy-0.2.0/src/prism/llm/model_profiles.py +552 -0
- prism_proxy-0.2.0/src/prism/llm/output_formatter.py +1087 -0
- prism_proxy-0.2.0/src/prism/llm/prompt_optimizer.py +575 -0
- prism_proxy-0.2.0/src/prism/llm/prompt_template.py +555 -0
- prism_proxy-0.2.0/src/prism/llm/provider_config.py +355 -0
- prism_proxy-0.2.0/src/prism/llm/quality_evaluator.py +1294 -0
- prism_proxy-0.2.0/src/prism/llm/quality_heuristics.py +399 -0
- prism_proxy-0.2.0/src/prism/llm/response_validator.py +700 -0
- prism_proxy-0.2.0/src/prism/llm/result.py +26 -0
- prism_proxy-0.2.0/src/prism/llm/retry.py +126 -0
- prism_proxy-0.2.0/src/prism/llm/streaming.py +273 -0
- prism_proxy-0.2.0/src/prism/llm/streaming_protocol.py +931 -0
- prism_proxy-0.2.0/src/prism/llm/system_prompts.py +325 -0
- prism_proxy-0.2.0/src/prism/llm/thinking.py +612 -0
- prism_proxy-0.2.0/src/prism/llm/tokenizer.py +302 -0
- prism_proxy-0.2.0/src/prism/llm/validation.py +131 -0
- prism_proxy-0.2.0/src/prism/logging_config.py +225 -0
- prism_proxy-0.2.0/src/prism/mcp/__init__.py +22 -0
- prism_proxy-0.2.0/src/prism/mcp/client.py +420 -0
- prism_proxy-0.2.0/src/prism/network/__init__.py +26 -0
- prism_proxy-0.2.0/src/prism/network/connectivity.py +150 -0
- prism_proxy-0.2.0/src/prism/network/offline.py +511 -0
- prism_proxy-0.2.0/src/prism/network/privacy.py +388 -0
- prism_proxy-0.2.0/src/prism/network/proxy.py +411 -0
- prism_proxy-0.2.0/src/prism/orchestrator/__init__.py +97 -0
- prism_proxy-0.2.0/src/prism/orchestrator/cascade.py +991 -0
- prism_proxy-0.2.0/src/prism/orchestrator/debate.py +698 -0
- prism_proxy-0.2.0/src/prism/orchestrator/moa.py +798 -0
- prism_proxy-0.2.0/src/prism/orchestrator/pipeline.py +537 -0
- prism_proxy-0.2.0/src/prism/orchestrator/quality_orchestrator.py +1202 -0
- prism_proxy-0.2.0/src/prism/orchestrator/self_tuner.py +337 -0
- prism_proxy-0.2.0/src/prism/orchestrator/swarm.py +2561 -0
- prism_proxy-0.2.0/src/prism/plugins/__init__.py +42 -0
- prism_proxy-0.2.0/src/prism/plugins/api.py +143 -0
- prism_proxy-0.2.0/src/prism/plugins/manager.py +1308 -0
- prism_proxy-0.2.0/src/prism/prompts/__init__.py +44 -0
- prism_proxy-0.2.0/src/prism/prompts/templates.py +1002 -0
- prism_proxy-0.2.0/src/prism/providers/__init__.py +10 -0
- prism_proxy-0.2.0/src/prism/providers/anthropic.py +405 -0
- prism_proxy-0.2.0/src/prism/providers/base.py +426 -0
- prism_proxy-0.2.0/src/prism/providers/google_provider.py +412 -0
- prism_proxy-0.2.0/src/prism/providers/openai_provider.py +396 -0
- prism_proxy-0.2.0/src/prism/providers/registry.py +351 -0
- prism_proxy-0.2.0/src/prism/proxy/__init__.py +1 -0
- prism_proxy-0.2.0/src/prism/proxy/server.py +2227 -0
- prism_proxy-0.2.0/src/prism/proxy/translator.py +372 -0
- prism_proxy-0.2.0/src/prism/router/__init__.py +58 -0
- prism_proxy-0.2.0/src/prism/router/ab_testing.py +675 -0
- prism_proxy-0.2.0/src/prism/router/classifier.py +426 -0
- prism_proxy-0.2.0/src/prism/router/dedup.py +648 -0
- prism_proxy-0.2.0/src/prism/router/fallback.py +117 -0
- prism_proxy-0.2.0/src/prism/router/fallback_chain.py +942 -0
- prism_proxy-0.2.0/src/prism/router/fingerprint.py +898 -0
- prism_proxy-0.2.0/src/prism/router/latency_tracker.py +295 -0
- prism_proxy-0.2.0/src/prism/router/learning.py +452 -0
- prism_proxy-0.2.0/src/prism/router/load_balancer.py +605 -0
- prism_proxy-0.2.0/src/prism/router/pareto.py +620 -0
- prism_proxy-0.2.0/src/prism/router/rate_limiter.py +141 -0
- prism_proxy-0.2.0/src/prism/router/selector.py +411 -0
- prism_proxy-0.2.0/src/prism/router/token_optimizer.py +600 -0
- prism_proxy-0.2.0/src/prism/security/__init__.py +19 -0
- prism_proxy-0.2.0/src/prism/security/audit.py +237 -0
- prism_proxy-0.2.0/src/prism/security/input_sanitizer.py +423 -0
- prism_proxy-0.2.0/src/prism/security/path_guard.py +169 -0
- prism_proxy-0.2.0/src/prism/security/prismignore.py +302 -0
- prism_proxy-0.2.0/src/prism/security/rate_limiter.py +424 -0
- prism_proxy-0.2.0/src/prism/security/sandbox.py +259 -0
- prism_proxy-0.2.0/src/prism/security/secret_filter.py +166 -0
- prism_proxy-0.2.0/src/prism/tools/__init__.py +58 -0
- prism_proxy-0.2.0/src/prism/tools/auto_test.py +653 -0
- prism_proxy-0.2.0/src/prism/tools/base.py +150 -0
- prism_proxy-0.2.0/src/prism/tools/browser.py +625 -0
- prism_proxy-0.2.0/src/prism/tools/browser_interact.py +951 -0
- prism_proxy-0.2.0/src/prism/tools/code_sandbox.py +435 -0
- prism_proxy-0.2.0/src/prism/tools/composer.py +601 -0
- prism_proxy-0.2.0/src/prism/tools/cost_optimizer.py +536 -0
- prism_proxy-0.2.0/src/prism/tools/directory.py +241 -0
- prism_proxy-0.2.0/src/prism/tools/fetch_docs.py +411 -0
- prism_proxy-0.2.0/src/prism/tools/file_edit.py +244 -0
- prism_proxy-0.2.0/src/prism/tools/file_read.py +173 -0
- prism_proxy-0.2.0/src/prism/tools/file_write.py +182 -0
- prism_proxy-0.2.0/src/prism/tools/git_tool.py +348 -0
- prism_proxy-0.2.0/src/prism/tools/quality_gate.py +648 -0
- prism_proxy-0.2.0/src/prism/tools/registry.py +172 -0
- prism_proxy-0.2.0/src/prism/tools/screenshot.py +328 -0
- prism_proxy-0.2.0/src/prism/tools/search.py +267 -0
- prism_proxy-0.2.0/src/prism/tools/search_web.py +402 -0
- prism_proxy-0.2.0/src/prism/tools/task_queue.py +528 -0
- prism_proxy-0.2.0/src/prism/tools/terminal.py +142 -0
- prism_proxy-0.2.0/src/prism/tools/vision.py +824 -0
- prism_proxy-0.2.0/src/prism/tracing/__init__.py +14 -0
- prism_proxy-0.2.0/src/prism/tracing/trace.py +401 -0
- prism_proxy-0.2.0/src/prism/tracing/tracer.py +244 -0
- prism_proxy-0.2.0/src/prism/workspace/__init__.py +11 -0
- prism_proxy-0.2.0/src/prism/workspace/manager.py +427 -0
- prism_proxy-0.2.0/test_calculator.py +47 -0
- prism_proxy-0.2.0/tests/__init__.py +0 -0
- prism_proxy-0.2.0/tests/conftest.py +57 -0
- prism_proxy-0.2.0/tests/test_architect/__init__.py +1 -0
- prism_proxy-0.2.0/tests/test_architect/conftest.py +166 -0
- prism_proxy-0.2.0/tests/test_architect/test_display.py +255 -0
- prism_proxy-0.2.0/tests/test_architect/test_executor.py +665 -0
- prism_proxy-0.2.0/tests/test_architect/test_phase3_enhancements.py +1141 -0
- prism_proxy-0.2.0/tests/test_architect/test_planner.py +181 -0
- prism_proxy-0.2.0/tests/test_architect/test_storage.py +418 -0
- prism_proxy-0.2.0/tests/test_auth/__init__.py +1 -0
- prism_proxy-0.2.0/tests/test_auth/conftest.py +121 -0
- prism_proxy-0.2.0/tests/test_auth/test_encrypted_store.py +203 -0
- prism_proxy-0.2.0/tests/test_auth/test_env_store.py +120 -0
- prism_proxy-0.2.0/tests/test_auth/test_keyring_store.py +172 -0
- prism_proxy-0.2.0/tests/test_auth/test_manager.py +762 -0
- prism_proxy-0.2.0/tests/test_auth/test_validator.py +97 -0
- prism_proxy-0.2.0/tests/test_cache/__init__.py +1 -0
- prism_proxy-0.2.0/tests/test_cache/test_response_cache.py +847 -0
- prism_proxy-0.2.0/tests/test_cache/test_semantic_cache.py +183 -0
- prism_proxy-0.2.0/tests/test_cli/__init__.py +1 -0
- prism_proxy-0.2.0/tests/test_cli/conftest.py +45 -0
- prism_proxy-0.2.0/tests/test_cli/test_app.py +1092 -0
- prism_proxy-0.2.0/tests/test_cli/test_commands/__init__.py +0 -0
- prism_proxy-0.2.0/tests/test_cli/test_commands/conftest.py +184 -0
- prism_proxy-0.2.0/tests/test_cli/test_commands/test_config_commands.py +246 -0
- prism_proxy-0.2.0/tests/test_cli/test_commands/test_error_handler.py +278 -0
- prism_proxy-0.2.0/tests/test_cli/test_commands/test_init_wizard.py +292 -0
- prism_proxy-0.2.0/tests/test_cli/test_commands/test_slash_commands.py +609 -0
- prism_proxy-0.2.0/tests/test_cli/test_commands/test_update.py +143 -0
- prism_proxy-0.2.0/tests/test_cli/test_commands/test_version.py +77 -0
- prism_proxy-0.2.0/tests/test_cli/test_compare.py +916 -0
- prism_proxy-0.2.0/tests/test_cli/test_completion.py +338 -0
- prism_proxy-0.2.0/tests/test_cli/test_error_recovery.py +623 -0
- prism_proxy-0.2.0/tests/test_cli/test_hooks.py +603 -0
- prism_proxy-0.2.0/tests/test_cli/test_init_wizard.py +1068 -0
- prism_proxy-0.2.0/tests/test_cli/test_keybindings.py +251 -0
- prism_proxy-0.2.0/tests/test_cli/test_phase4_items_11_14.py +1024 -0
- prism_proxy-0.2.0/tests/test_cli/test_phase4_repl_commands.py +2054 -0
- prism_proxy-0.2.0/tests/test_cli/test_phase5_arch_debug.py +914 -0
- prism_proxy-0.2.0/tests/test_cli/test_phase5_cli_blame_impact.py +668 -0
- prism_proxy-0.2.0/tests/test_cli/test_phase5_cli_context.py +519 -0
- prism_proxy-0.2.0/tests/test_cli/test_phase5_cli_debate_why.py +258 -0
- prism_proxy-0.2.0/tests/test_cli/test_phase5_cli_deps.py +371 -0
- prism_proxy-0.2.0/tests/test_cli/test_phase5_cli_test_gaps.py +267 -0
- prism_proxy-0.2.0/tests/test_cli/test_phase5_repl_aei_blame.py +532 -0
- prism_proxy-0.2.0/tests/test_cli/test_prompt_enhancer.py +426 -0
- prism_proxy-0.2.0/tests/test_cli/test_repl.py +4512 -0
- prism_proxy-0.2.0/tests/test_cli/test_shell_completion.py +383 -0
- prism_proxy-0.2.0/tests/test_cli/test_stream_handler.py +322 -0
- prism_proxy-0.2.0/tests/test_cli/test_ui/__init__.py +1 -0
- prism_proxy-0.2.0/tests/test_cli/test_ui/conftest.py +109 -0
- prism_proxy-0.2.0/tests/test_cli/test_ui/test_display.py +349 -0
- prism_proxy-0.2.0/tests/test_cli/test_ui/test_prompts.py +171 -0
- prism_proxy-0.2.0/tests/test_cli/test_ui/test_themes.py +160 -0
- prism_proxy-0.2.0/tests/test_cli/test_updater.py +537 -0
- prism_proxy-0.2.0/tests/test_config/__init__.py +0 -0
- prism_proxy-0.2.0/tests/test_config/test_migration.py +377 -0
- prism_proxy-0.2.0/tests/test_config/test_settings.py +194 -0
- prism_proxy-0.2.0/tests/test_context/__init__.py +0 -0
- prism_proxy-0.2.0/tests/test_context/conftest.py +108 -0
- prism_proxy-0.2.0/tests/test_context/test_branching.py +521 -0
- prism_proxy-0.2.0/tests/test_context/test_budget.py +905 -0
- prism_proxy-0.2.0/tests/test_context/test_conversation_compressor.py +235 -0
- prism_proxy-0.2.0/tests/test_context/test_manager.py +274 -0
- prism_proxy-0.2.0/tests/test_context/test_memory.py +187 -0
- prism_proxy-0.2.0/tests/test_context/test_memory_graph.py +915 -0
- prism_proxy-0.2.0/tests/test_context/test_packer.py +187 -0
- prism_proxy-0.2.0/tests/test_context/test_rag.py +264 -0
- prism_proxy-0.2.0/tests/test_context/test_repo_map.py +169 -0
- prism_proxy-0.2.0/tests/test_context/test_semantic_cache.py +669 -0
- prism_proxy-0.2.0/tests/test_context/test_session.py +168 -0
- prism_proxy-0.2.0/tests/test_context/test_summarizer.py +147 -0
- prism_proxy-0.2.0/tests/test_core/__init__.py +1 -0
- prism_proxy-0.2.0/tests/test_core/test_logging_system.py +528 -0
- prism_proxy-0.2.0/tests/test_core/test_performance.py +595 -0
- prism_proxy-0.2.0/tests/test_cost/__init__.py +0 -0
- prism_proxy-0.2.0/tests/test_cost/test_analytics.py +323 -0
- prism_proxy-0.2.0/tests/test_cost/test_dashboard.py +743 -0
- prism_proxy-0.2.0/tests/test_cost/test_forecast.py +814 -0
- prism_proxy-0.2.0/tests/test_cost/test_pricing.py +147 -0
- prism_proxy-0.2.0/tests/test_cost/test_tracker.py +802 -0
- prism_proxy-0.2.0/tests/test_cost/test_usage_analytics.py +773 -0
- prism_proxy-0.2.0/tests/test_db/__init__.py +1 -0
- prism_proxy-0.2.0/tests/test_db/conftest.py +110 -0
- prism_proxy-0.2.0/tests/test_db/test_database.py +213 -0
- prism_proxy-0.2.0/tests/test_db/test_migrations.py +207 -0
- prism_proxy-0.2.0/tests/test_db/test_queries.py +1424 -0
- prism_proxy-0.2.0/tests/test_eval/__init__.py +1 -0
- prism_proxy-0.2.0/tests/test_eval/conftest.py +259 -0
- prism_proxy-0.2.0/tests/test_eval/test_dataset.py +305 -0
- prism_proxy-0.2.0/tests/test_eval/test_metrics.py +305 -0
- prism_proxy-0.2.0/tests/test_eval/test_runner.py +457 -0
- prism_proxy-0.2.0/tests/test_export/__init__.py +1 -0
- prism_proxy-0.2.0/tests/test_export/test_exporter.py +348 -0
- prism_proxy-0.2.0/tests/test_git/__init__.py +0 -0
- prism_proxy-0.2.0/tests/test_git/conftest.py +89 -0
- prism_proxy-0.2.0/tests/test_git/test_auto_commit.py +180 -0
- prism_proxy-0.2.0/tests/test_git/test_history.py +536 -0
- prism_proxy-0.2.0/tests/test_git/test_operations.py +222 -0
- prism_proxy-0.2.0/tests/test_git/test_operations_extended.py +244 -0
- prism_proxy-0.2.0/tests/test_integration/__init__.py +0 -0
- prism_proxy-0.2.0/tests/test_integration/conftest.py +182 -0
- prism_proxy-0.2.0/tests/test_integration/test_budget.py +274 -0
- prism_proxy-0.2.0/tests/test_integration/test_conversation_flow.py +253 -0
- prism_proxy-0.2.0/tests/test_integration/test_e2e.py +1400 -0
- prism_proxy-0.2.0/tests/test_integration/test_interrupt.py +241 -0
- prism_proxy-0.2.0/tests/test_integration/test_learning.py +328 -0
- prism_proxy-0.2.0/tests/test_integration/test_real_world_quality.py +2173 -0
- prism_proxy-0.2.0/tests/test_integration/test_routing_pipeline.py +407 -0
- prism_proxy-0.2.0/tests/test_integration/test_security.py +247 -0
- prism_proxy-0.2.0/tests/test_integration/test_tool_pipeline.py +189 -0
- prism_proxy-0.2.0/tests/test_intelligence/__init__.py +1 -0
- prism_proxy-0.2.0/tests/test_intelligence/test_aei.py +1039 -0
- prism_proxy-0.2.0/tests/test_intelligence/test_archaeologist.py +1681 -0
- prism_proxy-0.2.0/tests/test_intelligence/test_architecture.py +694 -0
- prism_proxy-0.2.0/tests/test_intelligence/test_blame.py +777 -0
- prism_proxy-0.2.0/tests/test_intelligence/test_blast_radius.py +564 -0
- prism_proxy-0.2.0/tests/test_intelligence/test_blast_report_format.py +558 -0
- prism_proxy-0.2.0/tests/test_intelligence/test_debate.py +624 -0
- prism_proxy-0.2.0/tests/test_intelligence/test_debug_memory.py +838 -0
- prism_proxy-0.2.0/tests/test_intelligence/test_deps.py +680 -0
- prism_proxy-0.2.0/tests/test_intelligence/test_phase5_aei_enhancements.py +469 -0
- prism_proxy-0.2.0/tests/test_intelligence/test_phase5_archaeologist_enhanced.py +867 -0
- prism_proxy-0.2.0/tests/test_intelligence/test_phase5_blast_enhancements.py +447 -0
- prism_proxy-0.2.0/tests/test_intelligence/test_phase5_context_budget_enhanced.py +1060 -0
- prism_proxy-0.2.0/tests/test_intelligence/test_phase5_debate_enhanced.py +580 -0
- prism_proxy-0.2.0/tests/test_intelligence/test_phase5_deps_enhanced.py +1160 -0
- prism_proxy-0.2.0/tests/test_intelligence/test_phase5_test_gaps_enhanced.py +576 -0
- prism_proxy-0.2.0/tests/test_intelligence/test_test_gaps.py +642 -0
- prism_proxy-0.2.0/tests/test_llm/__init__.py +1 -0
- prism_proxy-0.2.0/tests/test_llm/conftest.py +193 -0
- prism_proxy-0.2.0/tests/test_llm/test_circuit_breaker.py +716 -0
- prism_proxy-0.2.0/tests/test_llm/test_completion.py +303 -0
- prism_proxy-0.2.0/tests/test_llm/test_compressor.py +128 -0
- prism_proxy-0.2.0/tests/test_llm/test_health.py +1443 -0
- prism_proxy-0.2.0/tests/test_llm/test_health_prober.py +128 -0
- prism_proxy-0.2.0/tests/test_llm/test_interruption.py +713 -0
- prism_proxy-0.2.0/tests/test_llm/test_mock.py +197 -0
- prism_proxy-0.2.0/tests/test_llm/test_model_profiles.py +248 -0
- prism_proxy-0.2.0/tests/test_llm/test_output_formatter.py +642 -0
- prism_proxy-0.2.0/tests/test_llm/test_phase3_litellm.py +587 -0
- prism_proxy-0.2.0/tests/test_llm/test_prompt_optimizer.py +219 -0
- prism_proxy-0.2.0/tests/test_llm/test_prompt_template.py +449 -0
- prism_proxy-0.2.0/tests/test_llm/test_provider_config.py +167 -0
- prism_proxy-0.2.0/tests/test_llm/test_quality_evaluator.py +739 -0
- prism_proxy-0.2.0/tests/test_llm/test_quality_heuristics.py +120 -0
- prism_proxy-0.2.0/tests/test_llm/test_response_validator.py +472 -0
- prism_proxy-0.2.0/tests/test_llm/test_retry.py +200 -0
- prism_proxy-0.2.0/tests/test_llm/test_streaming.py +294 -0
- prism_proxy-0.2.0/tests/test_llm/test_streaming_protocol.py +719 -0
- prism_proxy-0.2.0/tests/test_llm/test_system_prompts.py +564 -0
- prism_proxy-0.2.0/tests/test_llm/test_thinking.py +474 -0
- prism_proxy-0.2.0/tests/test_llm/test_tokenizer.py +853 -0
- prism_proxy-0.2.0/tests/test_llm/test_validation.py +151 -0
- prism_proxy-0.2.0/tests/test_logging_config.py +468 -0
- prism_proxy-0.2.0/tests/test_mcp/__init__.py +1 -0
- prism_proxy-0.2.0/tests/test_mcp/test_client.py +733 -0
- prism_proxy-0.2.0/tests/test_network/__init__.py +1 -0
- prism_proxy-0.2.0/tests/test_network/conftest.py +58 -0
- prism_proxy-0.2.0/tests/test_network/test_connectivity.py +173 -0
- prism_proxy-0.2.0/tests/test_network/test_offline.py +585 -0
- prism_proxy-0.2.0/tests/test_network/test_privacy.py +606 -0
- prism_proxy-0.2.0/tests/test_network/test_proxy.py +523 -0
- prism_proxy-0.2.0/tests/test_orchestrator/__init__.py +1 -0
- prism_proxy-0.2.0/tests/test_orchestrator/conftest.py +432 -0
- prism_proxy-0.2.0/tests/test_orchestrator/test_cascade.py +1237 -0
- prism_proxy-0.2.0/tests/test_orchestrator/test_debate.py +1230 -0
- prism_proxy-0.2.0/tests/test_orchestrator/test_moa.py +1023 -0
- prism_proxy-0.2.0/tests/test_orchestrator/test_pipeline.py +370 -0
- prism_proxy-0.2.0/tests/test_orchestrator/test_quality_orchestrator.py +1459 -0
- prism_proxy-0.2.0/tests/test_orchestrator/test_self_tuner.py +181 -0
- prism_proxy-0.2.0/tests/test_orchestrator/test_swarm.py +3399 -0
- prism_proxy-0.2.0/tests/test_plugins/__init__.py +1 -0
- prism_proxy-0.2.0/tests/test_plugins/test_api.py +303 -0
- prism_proxy-0.2.0/tests/test_plugins/test_manager.py +979 -0
- prism_proxy-0.2.0/tests/test_prompts/__init__.py +0 -0
- prism_proxy-0.2.0/tests/test_prompts/test_templates.py +689 -0
- prism_proxy-0.2.0/tests/test_providers/__init__.py +0 -0
- prism_proxy-0.2.0/tests/test_providers/test_anthropic.py +604 -0
- prism_proxy-0.2.0/tests/test_providers/test_google_provider.py +506 -0
- prism_proxy-0.2.0/tests/test_providers/test_openai_provider.py +642 -0
- prism_proxy-0.2.0/tests/test_providers/test_registry.py +218 -0
- prism_proxy-0.2.0/tests/test_proxy/__init__.py +0 -0
- prism_proxy-0.2.0/tests/test_proxy/test_server.py +634 -0
- prism_proxy-0.2.0/tests/test_proxy/test_translator.py +314 -0
- prism_proxy-0.2.0/tests/test_router/__init__.py +0 -0
- prism_proxy-0.2.0/tests/test_router/test_ab_testing.py +384 -0
- prism_proxy-0.2.0/tests/test_router/test_classifier.py +271 -0
- prism_proxy-0.2.0/tests/test_router/test_dedup.py +879 -0
- prism_proxy-0.2.0/tests/test_router/test_fallback.py +174 -0
- prism_proxy-0.2.0/tests/test_router/test_fallback_chain.py +874 -0
- prism_proxy-0.2.0/tests/test_router/test_fingerprint.py +655 -0
- prism_proxy-0.2.0/tests/test_router/test_latency_tracker.py +134 -0
- prism_proxy-0.2.0/tests/test_router/test_learning.py +180 -0
- prism_proxy-0.2.0/tests/test_router/test_load_balancer.py +477 -0
- prism_proxy-0.2.0/tests/test_router/test_pareto.py +540 -0
- prism_proxy-0.2.0/tests/test_router/test_rate_limiter.py +149 -0
- prism_proxy-0.2.0/tests/test_router/test_selector.py +335 -0
- prism_proxy-0.2.0/tests/test_router/test_token_optimizer.py +759 -0
- prism_proxy-0.2.0/tests/test_security/__init__.py +1 -0
- prism_proxy-0.2.0/tests/test_security/conftest.py +89 -0
- prism_proxy-0.2.0/tests/test_security/test_audit.py +336 -0
- prism_proxy-0.2.0/tests/test_security/test_input_sanitizer.py +306 -0
- prism_proxy-0.2.0/tests/test_security/test_path_guard.py +255 -0
- prism_proxy-0.2.0/tests/test_security/test_prismignore.py +568 -0
- prism_proxy-0.2.0/tests/test_security/test_rate_limiter.py +225 -0
- prism_proxy-0.2.0/tests/test_security/test_sandbox.py +231 -0
- prism_proxy-0.2.0/tests/test_security/test_secret_filter.py +187 -0
- prism_proxy-0.2.0/tests/test_tools/__init__.py +0 -0
- prism_proxy-0.2.0/tests/test_tools/conftest.py +100 -0
- prism_proxy-0.2.0/tests/test_tools/test_auto_test.py +662 -0
- prism_proxy-0.2.0/tests/test_tools/test_browser.py +229 -0
- prism_proxy-0.2.0/tests/test_tools/test_browser_interact.py +1289 -0
- prism_proxy-0.2.0/tests/test_tools/test_code_sandbox.py +565 -0
- prism_proxy-0.2.0/tests/test_tools/test_composer.py +1198 -0
- prism_proxy-0.2.0/tests/test_tools/test_cost_optimizer.py +413 -0
- prism_proxy-0.2.0/tests/test_tools/test_directory.py +150 -0
- prism_proxy-0.2.0/tests/test_tools/test_file_edit.py +257 -0
- prism_proxy-0.2.0/tests/test_tools/test_file_read.py +138 -0
- prism_proxy-0.2.0/tests/test_tools/test_file_write.py +195 -0
- prism_proxy-0.2.0/tests/test_tools/test_git_tool.py +406 -0
- prism_proxy-0.2.0/tests/test_tools/test_phase3_web.py +395 -0
- prism_proxy-0.2.0/tests/test_tools/test_phase3_web_enhancements.py +1204 -0
- prism_proxy-0.2.0/tests/test_tools/test_quality_gate.py +555 -0
- prism_proxy-0.2.0/tests/test_tools/test_registry.py +159 -0
- prism_proxy-0.2.0/tests/test_tools/test_screenshot.py +190 -0
- prism_proxy-0.2.0/tests/test_tools/test_search.py +151 -0
- prism_proxy-0.2.0/tests/test_tools/test_task_queue.py +708 -0
- prism_proxy-0.2.0/tests/test_tools/test_terminal.py +135 -0
- prism_proxy-0.2.0/tests/test_tools/test_vision.py +1085 -0
- prism_proxy-0.2.0/tests/test_tracing/__init__.py +1 -0
- prism_proxy-0.2.0/tests/test_tracing/test_trace.py +434 -0
- prism_proxy-0.2.0/tests/test_workspace/__init__.py +1 -0
- 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 -->
|