c4reqber 5.6.0__py3-none-any.whl
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.
- c4reqber-5.6.0.dist-info/METADATA +381 -0
- c4reqber-5.6.0.dist-info/RECORD +1439 -0
- c4reqber-5.6.0.dist-info/WHEEL +4 -0
- c4reqber-5.6.0.dist-info/entry_points.txt +3 -0
- c4reqber-5.6.0.dist-info/licenses/LICENSE +165 -0
- c4reqber-5.6.0.dist-info/licenses/LICENSE-COMMERCIAL.md +193 -0
- c4reqber-5.6.0.dist-info/licenses/NOTICE +9 -0
- src/__init__.py +8 -0
- src/__main__.py +17 -0
- src/adapters/__init__.py +1 -0
- src/adapters/arxiv_adapter.py +238 -0
- src/adapters/ollama_adapter.py +330 -0
- src/adapters/pubmed_adapter.py +294 -0
- src/agenda/__init__.py +8 -0
- src/agenda/feasibility.py +66 -0
- src/agenda/generator.py +131 -0
- src/agenda/priority.py +48 -0
- src/agenda/progress.py +57 -0
- src/agent/__init__.py +11 -0
- src/agent/config.py +128 -0
- src/agent/core.py +797 -0
- src/agent/daemon.py +194 -0
- src/agent/discovery_agent.py +527 -0
- src/agent/skills.py +201 -0
- src/agent/sub_agent.py +97 -0
- src/agents/__init__.py +27 -0
- src/agents/discovery/__init__.py +39 -0
- src/agents/discovery/core.py +319 -0
- src/agents/discovery/strategies.py +251 -0
- src/agents/discovery_agent.py +35 -0
- src/agents/discovery_loop.py +67 -0
- src/agents/functor_orchestrator.py +230 -0
- src/agents/functors/__init__.py +29 -0
- src/agents/functors/abstraction.py +31 -0
- src/agents/functors/base.py +76 -0
- src/agents/functors/composite.py +108 -0
- src/agents/functors/concretization.py +31 -0
- src/agents/functors/context.py +31 -0
- src/agents/functors/distinction.py +38 -0
- src/agents/functors/integration.py +31 -0
- src/agents/functors/inversion.py +38 -0
- src/agents/functors/meta_reflection.py +31 -0
- src/agents/functors/prompts.py +134 -0
- src/agents/functors/resonance.py +31 -0
- src/agents/functors/temporal.py +31 -0
- src/agents/mp_llm_generator.py +197 -0
- src/agents/multi/__init__.py +28 -0
- src/agents/multi/agents.py +398 -0
- src/agents/multi/core.py +123 -0
- src/agents/multi/orchestrator.py +109 -0
- src/agents/multi_agent.py +729 -0
- src/agents/orchestrator.py +186 -0
- src/agents/paradigm_coordinator.py +348 -0
- src/agents/pipeline/__init__.py +27 -0
- src/agents/pipeline/executor.py +628 -0
- src/agents/pipeline/steps/__init__.py +12 -0
- src/agents/pipeline/steps/base.py +51 -0
- src/agents/pipeline/steps/step_01_impact.py +70 -0
- src/agents/pipeline/steps/step_02_prior_art.py +125 -0
- src/agents/pipeline/steps/step_02b_gap_analysis.py +56 -0
- src/agents/pipeline/steps/step_02c_quality_gate.py +81 -0
- src/agents/pipeline/steps/step_02d_reality_check.py +184 -0
- src/agents/pipeline/steps/step_03_c4_fingerprint.py +72 -0
- src/agents/pipeline/steps/step_04_mp_rotation.py +138 -0
- src/agents/pipeline/steps/step_05_qzrf.py +59 -0
- src/agents/pipeline/steps/step_05b_cross_domain_transfer.py +82 -0
- src/agents/pipeline/steps/step_06_isomorphism.py +213 -0
- src/agents/pipeline/steps/step_07_plugins.py +63 -0
- src/agents/pipeline/steps/step_08_synthesis.py +434 -0
- src/agents/pipeline/steps/step_09_tote.py +407 -0
- src/agents/pipeline/steps/step_10_simulation.py +66 -0
- src/agents/plugin_synthesis_integrator.py +66 -0
- src/agents/policy.py +302 -0
- src/agents/prompts/__init__.py +13 -0
- src/agents/prompts/paradigm.py +48 -0
- src/agents/qa.py +333 -0
- src/agents/solve_pipeline.py +219 -0
- src/agents/soul.py +219 -0
- src/agents/synthesis/core.py +53 -0
- src/analogy/__init__.py +18 -0
- src/analogy/core.py +294 -0
- src/analogy/data.py +160 -0
- src/analogy/engine.py +25 -0
- src/analogy/operations.py +302 -0
- src/analogy/structural.py +634 -0
- src/analogy/utils.py +109 -0
- src/api/__init__.py +47 -0
- src/api/agents_router.py +325 -0
- src/api/auth.py +334 -0
- src/api/cache.py +179 -0
- src/api/data/__init__.py +7 -0
- src/api/db_manager.py +460 -0
- src/api/dependencies.py +94 -0
- src/api/dev_mode.py +94 -0
- src/api/errors.py +92 -0
- src/api/health.py +105 -0
- src/api/lifespan.py +181 -0
- src/api/main.py +7 -0
- src/api/middleware/__init__.py +29 -0
- src/api/middleware/auth.py +104 -0
- src/api/middleware/cors.py +31 -0
- src/api/middleware/csrf.py +152 -0
- src/api/middleware/security.py +266 -0
- src/api/models.py +182 -0
- src/api/rate_limiter.py +263 -0
- src/api/routers/__init__.py +33 -0
- src/api/routers/auth.py +220 -0
- src/api/routers/bridge.py +93 -0
- src/api/routers/discoveries.py +116 -0
- src/api/routers/discovery_list.py +41 -0
- src/api/routers/graph.py +58 -0
- src/api/routers/health.py +134 -0
- src/api/routers/metrics.py +117 -0
- src/api/routers/patterns.py +195 -0
- src/api/routers/search.py +64 -0
- src/api/routers/theorems.py +130 -0
- src/api/routers/validation_single.py +32 -0
- src/api/routers/validations.py +146 -0
- src/api/routers/websocket.py +235 -0
- src/api/server.py +139 -0
- src/api/v7_schemas.py +475 -0
- src/api/v8_router.py +37 -0
- src/api/v8_routers/__init__.py +37 -0
- src/api/v8_routers/agenda.py +159 -0
- src/api/v8_routers/arxiv_v8.py +44 -0
- src/api/v8_routers/discovery/__init__.py +70 -0
- src/api/v8_routers/discovery/export.py +118 -0
- src/api/v8_routers/discovery/job_store_redis.py +169 -0
- src/api/v8_routers/discovery/jobs.py +252 -0
- src/api/v8_routers/discovery/pipeline.py +587 -0
- src/api/v8_routers/discovery/search.py +11 -0
- src/api/v8_routers/discovery_core.py +318 -0
- src/api/v8_routers/discovery_pipeline.py +351 -0
- src/api/v8_routers/discovery_utils.py +445 -0
- src/api/v8_routers/discovery_v8.py +215 -0
- src/api/v8_routers/exploration.py +229 -0
- src/api/v8_routers/knowledge_v8.py +161 -0
- src/api/v8_routers/news_v8.py +49 -0
- src/api/v8_routers/newton_v8.py +74 -0
- src/api/v8_routers/novelty_v8.py +476 -0
- src/api/v8_routers/scimatic_v8.py +73 -0
- src/api/v8_routers/social_v8.py +123 -0
- src/api/v8_routers/turbo_v8.py +245 -0
- src/api/v8_routers/verification_v8.py +326 -0
- src/api/v8_schemas.py +119 -0
- src/api/websocket.py +51 -0
- src/archetypes/__init__.py +29 -0
- src/archetypes/data.py +382 -0
- src/archetypes/engine.py +313 -0
- src/architecture/__init__.py +72 -0
- src/architecture/cqrs.py +167 -0
- src/architecture/event_sourcing.py +302 -0
- src/architecture/saga.py +246 -0
- src/auth/__init__.py +1 -0
- src/auth/supabase_anon.py +392 -0
- src/auth/telegram_wallet.py +350 -0
- src/auth/web3.py +358 -0
- src/bayesian/__init__.py +78 -0
- src/bayesian/bma.py +353 -0
- src/bayesian/core.py +279 -0
- src/bayesian/dempster_shafer.py +168 -0
- src/bayesian/dst.py +190 -0
- src/bayesian/fuzzy.py +210 -0
- src/bayesian/mcmc.py +420 -0
- src/bayesian/models.py +57 -0
- src/bayesian/optimization.py +229 -0
- src/bayesian/router.py +182 -0
- src/benchmarks/__init__.py +56 -0
- src/benchmarks/falsification_benchmark.py +393 -0
- src/benchmarks/isomorphism_benchmark.py +545 -0
- src/benchmarks/novelty_benchmark.py +544 -0
- src/benchmarks/triz_benchmark.py +482 -0
- src/bibliography/__init__.py +1 -0
- src/bibliography/manager.py +367 -0
- src/c4/__init__.py +6 -0
- src/c4/alert_taxonomy.py +57 -0
- src/c4/cognitive_load.py +114 -0
- src/c4/cognitive_router.py +160 -0
- src/c4/constraint_solver.py +253 -0
- src/c4/core.py +42 -0
- src/c4/core_operators.py +57 -0
- src/c4/engine.py +285 -0
- src/c4/extended_operators.py +44 -0
- src/c4/formal_citations.py +102 -0
- src/c4/gated_pipeline.py +69 -0
- src/c4/history_graph.py +76 -0
- src/c4/hypothesis_sandbox.py +59 -0
- src/c4/injection_hook.py +84 -0
- src/c4/invariant_engine.py +365 -0
- src/c4/layer_stream.py +89 -0
- src/c4/metrics.py +60 -0
- src/c4/navigation.py +213 -0
- src/c4/neural_classifier/__init__.py +33 -0
- src/c4/neural_classifier/architectures/__init__.py +1 -0
- src/c4/neural_classifier/architectures/c4_router.py +488 -0
- src/c4/neural_classifier/c4_types.py +136 -0
- src/c4/neural_classifier/heuristic_classifier.py +60 -0
- src/c4/neural_classifier/llm_classifier.py +465 -0
- src/c4/neural_classifier/neural_fingerprint.py +351 -0
- src/c4/neural_classifier/types.py +19 -0
- src/c4/observer.py +142 -0
- src/c4/path_manifest.py +90 -0
- src/c4/result.py +42 -0
- src/c4/routing.py +443 -0
- src/c4/scientist_paths.py +369 -0
- src/c4/state.py +569 -0
- src/c4/state_journal.py +66 -0
- src/c4/stratified_blocks.py +67 -0
- src/c4/structured_input.py +62 -0
- src/c4/transformer.py +343 -0
- src/c4/types.py +42 -0
- src/c4_analysis/__init__.py +10 -0
- src/c4_analysis/abstraction_ladder.py +152 -0
- src/c4_analysis/extended_engines.py +413 -0
- src/c4_analysis/llm_classifier.py +102 -0
- src/c4_analysis/multi_prompt_router.py +143 -0
- src/c4_analysis/system_analyzer.py +296 -0
- src/c4_analysis/system_synthesizer.py +237 -0
- src/c4_analysis/transfer_pipeline.py +711 -0
- src/c4_analysis/unified_entry.py +75 -0
- src/causal/__init__.py +22 -0
- src/causal/counterfactual.py +265 -0
- src/causal/counterfactual_derivation.py +132 -0
- src/causal/discovery.py +437 -0
- src/causal/discovery_engine.py +185 -0
- src/causal/do_calculus.py +325 -0
- src/causal/estimation_engine.py +208 -0
- src/causal/gp_scm.py +193 -0
- src/causal/scm.py +375 -0
- src/cli/__init__.py +15 -0
- src/cli/beep.py +16 -0
- src/cli/blast_app.py +1657 -0
- src/cli/blast_core.py +829 -0
- src/cli/config_init.py +229 -0
- src/cli/core.py +82 -0
- src/cli/cube_mascot.py +345 -0
- src/cli/display.py +34 -0
- src/cli/header.py +122 -0
- src/cli/layout_manager.py +182 -0
- src/cli/mode_router.py +59 -0
- src/cli/package_manager.py +266 -0
- src/cli/timeline.py +101 -0
- src/cli/tui_launcher.py +129 -0
- src/cli/typer_analogy.py +47 -0
- src/cli/typer_app.py +297 -0
- src/cli/typer_c4.py +107 -0
- src/cli/typer_core.py +216 -0
- src/cli/typer_graph.py +54 -0
- src/cli/typer_research.py +129 -0
- src/cli/typer_system.py +71 -0
- src/cli/typer_triz.py +91 -0
- src/cli/typer_validate.py +43 -0
- src/codegen/__init__.py +1 -0
- src/codegen/mcp_tool.py +533 -0
- src/collaboration/__init__.py +0 -0
- src/compat.py +5 -0
- src/compliance/__init__.py +1 -0
- src/compliance/license_checker.py +32 -0
- src/compute/__init__.py +18 -0
- src/compute/gpu_dashboard.py +217 -0
- src/compute/gpu_providers.py +91 -0
- src/compute/vastai_runner.py +50 -0
- src/conceptual_blending/__init__.py +3 -0
- src/conceptual_blending/blender.py +76 -0
- src/conceptual_blending/examples.py +76 -0
- src/conceptual_blending/router.py +131 -0
- src/config/__init__.py +39 -0
- src/config/db_config.py +129 -0
- src/config/paths.py +247 -0
- src/config/variants/__init__.py +53 -0
- src/config/variants/detector.py +29 -0
- src/contracts/__init__.py +4 -0
- src/contracts/c4_types.py +65 -0
- src/contracts/llm_types.py +39 -0
- src/contracts/pipeline_config.py +167 -0
- src/contracts/pipeline_types.py +70 -0
- src/contracts/verification_types.py +31 -0
- src/contradiction_miner/__init__.py +16 -0
- src/contradiction_miner/detector.py +144 -0
- src/contradiction_miner/extractor.py +97 -0
- src/contradiction_miner/router.py +118 -0
- src/core/__init__.py +19 -0
- src/core/c4_state.py +28 -0
- src/core/cdi_engine.py +331 -0
- src/core/complexity_adapter.py +152 -0
- src/core/complexity_cache.py +268 -0
- src/core/disclosure_filter.py +168 -0
- src/core/domains.py +51 -0
- src/core/flywheel.py +123 -0
- src/core/logging.py +308 -0
- src/core/manifest.py +66 -0
- src/core/operators.py +324 -0
- src/core/profile_manager.py +99 -0
- src/core/user_profile.py +83 -0
- src/dashboard/__init__.py +18 -0
- src/dashboard/metrics.py +418 -0
- src/data/__init__.py +7 -0
- src/data/connection_pool.py +294 -0
- src/data/database.py +453 -0
- src/data/database_pg.py +234 -0
- src/data/ingestion/__init__.py +5 -0
- src/data/ingestion/base.py +167 -0
- src/data/orchestrator.py +805 -0
- src/data/orm.py +102 -0
- src/decisions/__init__.py +14 -0
- src/decisions/ahp.py +66 -0
- src/decisions/router.py +107 -0
- src/decisions/topsis.py +72 -0
- src/design/__init__.py +75 -0
- src/design/cli_output/__init__.py +31 -0
- src/design/cli_output/_displays.py +195 -0
- src/design/cli_output/_panels.py +115 -0
- src/design/cli_output/_tables.py +101 -0
- src/design/cli_output/_widgets.py +107 -0
- src/design/cli_output.py +609 -0
- src/design/tokens.py +350 -0
- src/di/__init__.py +4 -0
- src/di/container.py +41 -0
- src/discovery/__init__.py +120 -0
- src/discovery/abduction.py +519 -0
- src/discovery/already_shifted.py +452 -0
- src/discovery/autoscanner.py +259 -0
- src/discovery/chainer.py +258 -0
- src/discovery/closed_loop/__init__.py +6 -0
- src/discovery/closed_loop/bayesian_tracker.py +92 -0
- src/discovery/closed_loop/convergence.py +46 -0
- src/discovery/closed_loop/ensemble_runner.py +47 -0
- src/discovery/closed_loop/experiment_designer.py +74 -0
- src/discovery/closed_loop/orchestrator.py +108 -0
- src/discovery/closed_loop/refiner.py +81 -0
- src/discovery/contradiction.py +452 -0
- src/discovery/contradiction_engine.py +235 -0
- src/discovery/derivation_chain.py +96 -0
- src/discovery/falsification.py +612 -0
- src/discovery/falsifier.py +879 -0
- src/discovery/gap_analyzer.py +173 -0
- src/discovery/gap_analyzer_base.py +75 -0
- src/discovery/gap_miner.py +647 -0
- src/discovery/kuhn_criteria.py +251 -0
- src/discovery/novelty_validator.py +406 -0
- src/discovery/paradigm_shift.py +353 -0
- src/discovery/parsimony.py +88 -0
- src/discovery/pipeline_logic.py +1516 -0
- src/discovery/ranking/__init__.py +8 -0
- src/discovery/ranking/cost_model.py +52 -0
- src/discovery/ranking/eig_estimator.py +99 -0
- src/discovery/ranking/mcdm_ranker.py +123 -0
- src/discovery/ranking/orchestrator.py +78 -0
- src/discovery/ranking/prior_scorer.py +127 -0
- src/discovery/recursive_validation.py +78 -0
- src/discovery/search.py +33 -0
- src/discovery/strong_inference.py +581 -0
- src/discovery/temporal_kg.py +350 -0
- src/discovery/web_enhanced.py +96 -0
- src/effects/__init__.py +18 -0
- src/effects/database.py +172 -0
- src/effects/effects_db.py +167 -0
- src/enhanced_cdi.py +94 -0
- src/experiment_design/__init__.py +85 -0
- src/experiment_design/doe.py +279 -0
- src/experiment_design/power.py +273 -0
- src/experiment_design/reproducibility.py +296 -0
- src/experiment_design/router.py +188 -0
- src/explainability/__init__.py +19 -0
- src/explainability/core.py +375 -0
- src/explainability/engine.py +26 -0
- src/explainability/renderers.py +58 -0
- src/exploration/__init__.py +7 -0
- src/exploration/anomaly_detector.py +90 -0
- src/exploration/formal_extender.py +140 -0
- src/exploration/question_generator.py +96 -0
- src/export/__init__.py +18 -0
- src/export/manager.py +279 -0
- src/export/presentation.py +222 -0
- src/extractors/__init__.py +9 -0
- src/extractors/contradiction.py +386 -0
- src/falsification/__init__.py +16 -0
- src/falsification/lakatos.py +45 -0
- src/falsification/popper.py +50 -0
- src/falsification/router.py +117 -0
- src/game_theory/__init__.py +13 -0
- src/game_theory/nash.py +54 -0
- src/game_theory/router.py +77 -0
- src/game_theory/shapley.py +28 -0
- src/graph/__init__.py +58 -0
- src/graph/core.py +343 -0
- src/graph/graph_view.py +18 -0
- src/graph/io.py +50 -0
- src/graph/knowledge_graph.py +261 -0
- src/graph/operations/__init__.py +33 -0
- src/graph/operations/core.py +184 -0
- src/graph/operations/mutations.py +209 -0
- src/graph/operations/utils.py +90 -0
- src/graph/operations.py +38 -0
- src/graph/queries.py +217 -0
- src/graph/seed_data.py +127 -0
- src/graph/view/__init__.py +1 -0
- src/graph/view/core.py +377 -0
- src/graph/view/renderers.py +193 -0
- src/infrastructure/__init__.py +19 -0
- src/infrastructure/cache/__init__.py +23 -0
- src/infrastructure/cache/tiered.py +339 -0
- src/infrastructure/events.py +112 -0
- src/infrastructure/logging/__init__.py +21 -0
- src/infrastructure/logging/config.py +110 -0
- src/infrastructure/logging/middleware.py +71 -0
- src/integrations/__init__.py +40 -0
- src/integrations/balance_checker.py +96 -0
- src/integrations/brev_client.py +161 -0
- src/integrations/eigent.py +170 -0
- src/integrations/exa_client.py +70 -0
- src/integrations/langchain.py +12 -0
- src/integrations/liquid_ai.py +71 -0
- src/integrations/n8n.py +39 -0
- src/integrations/nvidia.py +86 -0
- src/integrations/nvidia_cloud_client.py +57 -0
- src/integrations/openfang.py +148 -0
- src/integrations/scientific_bridges.py +118 -0
- src/integrations/tavily_budget.py +95 -0
- src/integrations/tavily_client.py +66 -0
- src/integrations/yandex.py +95 -0
- src/intel/__init__.py +4 -0
- src/intel/live_feed.py +396 -0
- src/knowledge/__init__.py +52 -0
- src/knowledge/arxiv_client.py +325 -0
- src/knowledge/arxivgg_client.py +138 -0
- src/knowledge/base_client.py +300 -0
- src/knowledge/cache.py +57 -0
- src/knowledge/chroma_store.py +237 -0
- src/knowledge/cinii_client.py +238 -0
- src/knowledge/citation_chaser.py +488 -0
- src/knowledge/citation_verifier.py +199 -0
- src/knowledge/config.py +620 -0
- src/knowledge/core_client.py +114 -0
- src/knowledge/crossref_client.py +312 -0
- src/knowledge/dataset_clients.py +281 -0
- src/knowledge/github_client.py +210 -0
- src/knowledge/local_files.py +132 -0
- src/knowledge/mega_db.py +274 -0
- src/knowledge/multi_source.py +16 -0
- src/knowledge/novelty_scorer.py +85 -0
- src/knowledge/openalex_client.py +124 -0
- src/knowledge/orchestrator.py +691 -0
- src/knowledge/orcid_client.py +479 -0
- src/knowledge/preprint_clients.py +207 -0
- src/knowledge/pubmed_client.py +382 -0
- src/knowledge/rsci_client.py +224 -0
- src/knowledge/scholarapi_client.py +62 -0
- src/knowledge/scimatic_client.py +61 -0
- src/knowledge/semantic_client.py +117 -0
- src/knowledge/semantic_scholar.py +377 -0
- src/knowledge/sources/__init__.py +59 -0
- src/knowledge/sources/aflow.py +79 -0
- src/knowledge/sources/allen_brain.py +76 -0
- src/knowledge/sources/arxiv.py +92 -0
- src/knowledge/sources/base.py +20 -0
- src/knowledge/sources/base_p6.py +178 -0
- src/knowledge/sources/base_p6_adapter.py +86 -0
- src/knowledge/sources/base_search.py +79 -0
- src/knowledge/sources/bibsonomy.py +189 -0
- src/knowledge/sources/brave.py +52 -0
- src/knowledge/sources/cern_opendata.py +48 -0
- src/knowledge/sources/chembl.py +49 -0
- src/knowledge/sources/clinicaltrials.py +63 -0
- src/knowledge/sources/conceptnet.py +79 -0
- src/knowledge/sources/core.py +67 -0
- src/knowledge/sources/crossref.py +60 -0
- src/knowledge/sources/cyberleninka.py +61 -0
- src/knowledge/sources/datacite.py +51 -0
- src/knowledge/sources/dblp.py +55 -0
- src/knowledge/sources/doaj.py +62 -0
- src/knowledge/sources/drugbank.py +93 -0
- src/knowledge/sources/europe_pmc.py +47 -0
- src/knowledge/sources/exa.py +33 -0
- src/knowledge/sources/extra_adapters.py +215 -0
- src/knowledge/sources/figshare.py +51 -0
- src/knowledge/sources/gbif.py +72 -0
- src/knowledge/sources/gtex.py +85 -0
- src/knowledge/sources/harvard_dataverse.py +84 -0
- src/knowledge/sources/huggingface_datasets.py +57 -0
- src/knowledge/sources/inspire_hep.py +59 -0
- src/knowledge/sources/kaggle.py +90 -0
- src/knowledge/sources/lens_org.py +50 -0
- src/knowledge/sources/materials_project.py +57 -0
- src/knowledge/sources/mathnet_ru.py +57 -0
- src/knowledge/sources/nasa_earthdata.py +85 -0
- src/knowledge/sources/ncbi_eutils.py +76 -0
- src/knowledge/sources/noaa.py +81 -0
- src/knowledge/sources/oa_mg.py +47 -0
- src/knowledge/sources/oeis.py +49 -0
- src/knowledge/sources/openalex.py +153 -0
- src/knowledge/sources/openfda.py +82 -0
- src/knowledge/sources/openreview.py +61 -0
- src/knowledge/sources/orcid.py +114 -0
- src/knowledge/sources/p6_adapters.py +425 -0
- src/knowledge/sources/pubchem.py +47 -0
- src/knowledge/sources/pubmed.py +107 -0
- src/knowledge/sources/re3data.py +76 -0
- src/knowledge/sources/semantic_scholar.py +53 -0
- src/knowledge/sources/string_db.py +83 -0
- src/knowledge/sources/tavily.py +33 -0
- src/knowledge/sources/uci_ml.py +69 -0
- src/knowledge/sources/uniprot.py +97 -0
- src/knowledge/sources/unpaywall.py +50 -0
- src/knowledge/sources/usgs.py +63 -0
- src/knowledge/sources/uspto_patentsview.py +53 -0
- src/knowledge/sources/wikidata.py +107 -0
- src/knowledge/sources/wolfram.py +62 -0
- src/knowledge/sources/zenodo.py +62 -0
- src/knowledge/zettelkasten.py +174 -0
- src/litintel/__init__.py +43 -0
- src/llm/__init__.py +55 -0
- src/llm/async_client.py +429 -0
- src/llm/cache.py +349 -0
- src/llm/client.py +188 -0
- src/llm/complexity.py +45 -0
- src/llm/config.py +117 -0
- src/llm/cost_tracker.py +201 -0
- src/llm/council.py +285 -0
- src/llm/depth_router.py +83 -0
- src/llm/embeddings.py +403 -0
- src/llm/fallback.py +6 -0
- src/llm/falsifiability.py +253 -0
- src/llm/gateway.py +225 -0
- src/llm/guarded_call.py +269 -0
- src/llm/local/__init__.py +11 -0
- src/llm/local/client.py +322 -0
- src/llm/local/core.py +29 -0
- src/llm/local_client.py +14 -0
- src/llm/local_discovery.py +176 -0
- src/llm/local_fallback.py +42 -0
- src/llm/model_assignment.py +259 -0
- src/llm/model_catalog.py +379 -0
- src/llm/multi_provider.py +83 -0
- src/llm/providers/__init__.py +25 -0
- src/llm/providers/base.py +204 -0
- src/llm/providers/lmstudio_cli.py +95 -0
- src/llm/providers/mlx_provider.py +172 -0
- src/llm/providers/ollama.py +32 -0
- src/llm/providers/openrouter.py +41 -0
- src/llm/providers/others.py +135 -0
- src/llm/providers/unified.py +213 -0
- src/llm/reasoner_client.py +281 -0
- src/llm/retry_pkg/__init__.py +28 -0
- src/llm/retry_pkg/core.py +89 -0
- src/llm/retry_pkg/policies.py +310 -0
- src/llm/router.py +368 -0
- src/llm/sync_provider_chain.py +227 -0
- src/llm/synthesizer.py +190 -0
- src/llm/types.py +17 -0
- src/main.py +821 -0
- src/main_refactored.py +821 -0
- src/mcp_server/__init__.py +4 -0
- src/mcp_server/fallback_protocol.py +237 -0
- src/mcp_server/fastmcp_bridge.py +133 -0
- src/mcp_server/server.py +1069 -0
- src/mcp_server/tool_schemas.py +84 -0
- src/memory/__init__.py +10 -0
- src/memory/bank.py +43 -0
- src/memory/core.py +399 -0
- src/memory/isomorphism_seed.py +229 -0
- src/memory/llm_isomorphisms.py +320 -0
- src/memory/operations.py +162 -0
- src/memory/skill.py +467 -0
- src/meta_layer/__init__.py +20 -0
- src/meta_layer/collaboration.py +84 -0
- src/meta_layer/ethics.py +95 -0
- src/meta_layer/provenance.py +98 -0
- src/meta_layer/router.py +233 -0
- src/metamodels/__init__.py +40 -0
- src/metamodels/compass.py +211 -0
- src/metamodels/hypercube.py +28 -0
- src/metamodels/impact.py +690 -0
- src/metamodels/matrix_dream.py +251 -0
- src/metamodels/mp/__init__.py +7 -0
- src/metamodels/mp/core.py +76 -0
- src/metamodels/mp/data.py +249 -0
- src/metamodels/mp/library.py +14 -0
- src/metamodels/mp/patterns.py +139 -0
- src/metamodels/mp/profiles.py +314 -0
- src/metamodels/qzrf/__init__.py +1 -0
- src/metamodels/qzrf/operators.py +340 -0
- src/metamodels/qzrf/projections.py +85 -0
- src/metamodels/tote.py +212 -0
- src/metaprograms/__init__.py +74 -0
- src/metaprograms/attractors.py +207 -0
- src/metaprograms/core.py +673 -0
- src/metaprograms/dynamics.py +153 -0
- src/metaprograms/profiler.py +320 -0
- src/news/__init__.py +7 -0
- src/news/aggregator.py +222 -0
- src/news/storage.py +115 -0
- src/novelty/__init__.py +1 -0
- src/novelty/validator.py +78 -0
- src/operators/__init__.py +0 -0
- src/operators/autoresearch.py +961 -0
- src/operators/fra.py +561 -0
- src/operators/matrix_dream.py +1120 -0
- src/operators/qzrf.py +600 -0
- src/operators/uta.py +139 -0
- src/operators/uta_bridge.py +84 -0
- src/paradigm/__init__.py +20 -0
- src/paradigm/anomaly.py +82 -0
- src/paradigm/detector.py +161 -0
- src/paradigm/models.py +50 -0
- src/paradigm/router.py +95 -0
- src/paradigm/temporal.py +129 -0
- src/patents/__init__.py +18 -0
- src/patents/client.py +11 -0
- src/patents/uspto_client.py +117 -0
- src/patterns/__init__.py +51 -0
- src/patterns/core.py +180 -0
- src/patterns/format/__init__.py +1 -0
- src/patterns/format/core.py +314 -0
- src/patterns/format/utils.py +293 -0
- src/patterns/formatter.py +14 -0
- src/patterns/library/__init__.py +695 -0
- src/patterns/library/acoustic_waves.py +493 -0
- src/patterns/library/adaptive_filter.py +468 -0
- src/patterns/library/age_structured.py +465 -0
- src/patterns/library/agent_based.py +742 -0
- src/patterns/library/air_quality.py +688 -0
- src/patterns/library/base.py +232 -0
- src/patterns/library/biogeochemistry.py +646 -0
- src/patterns/library/bootstrap.py +303 -0
- src/patterns/library/cellular_automata.py +345 -0
- src/patterns/library/cfd.py +451 -0
- src/patterns/library/circuit_simulation/__init__.py +24 -0
- src/patterns/library/circuit_simulation/config.py +84 -0
- src/patterns/library/circuit_simulation/core.py +447 -0
- src/patterns/library/circuit_simulation/pattern.py +280 -0
- src/patterns/library/climate_gcm.py +512 -0
- src/patterns/library/cloud_microphysics.py +645 -0
- src/patterns/library/collaborative_filtering.py +525 -0
- src/patterns/library/composite_mechanics.py +646 -0
- src/patterns/library/conflict.py +496 -0
- src/patterns/library/connectome/__init__.py +16 -0
- src/patterns/library/connectome/config.py +81 -0
- src/patterns/library/connectome/core.py +346 -0
- src/patterns/library/connectome/pattern.py +353 -0
- src/patterns/library/continuum_mechanics.py +572 -0
- src/patterns/library/credit_risk.py +447 -0
- src/patterns/library/crystal_growth.py +618 -0
- src/patterns/library/cultural_diffusion.py +428 -0
- src/patterns/library/dft.py +544 -0
- src/patterns/library/discrete_event.py +406 -0
- src/patterns/library/double_pendulum.py +364 -0
- src/patterns/library/dsge.py +356 -0
- src/patterns/library/economic_growth.py +557 -0
- src/patterns/library/elasticity_3d.py +650 -0
- src/patterns/library/enzyme_kinetics/__init__.py +16 -0
- src/patterns/library/enzyme_kinetics/config.py +82 -0
- src/patterns/library/enzyme_kinetics/core.py +383 -0
- src/patterns/library/enzyme_kinetics/pattern.py +331 -0
- src/patterns/library/epidemic_seir.py +506 -0
- src/patterns/library/epidemic_sir.py +315 -0
- src/patterns/library/evolutionary.py +497 -0
- src/patterns/library/fem.py +414 -0
- src/patterns/library/fisheries.py +634 -0
- src/patterns/library/flocking.py +455 -0
- src/patterns/library/forest_gap.py +633 -0
- src/patterns/library/fractal_julia.py +317 -0
- src/patterns/library/fractal_mandelbrot.py +311 -0
- src/patterns/library/game_theory.py +248 -0
- src/patterns/library/garch.py +223 -0
- src/patterns/library/gene_regulatory.py +681 -0
- src/patterns/library/geomagnetic.py +695 -0
- src/patterns/library/gravity_trade.py +515 -0
- src/patterns/library/groundwater.py +621 -0
- src/patterns/library/herding.py +598 -0
- src/patterns/library/heterogeneous_agents.py +505 -0
- src/patterns/library/hodgkin_huxley.py +532 -0
- src/patterns/library/innovation_diffusion.py +485 -0
- src/patterns/library/input_output.py +242 -0
- src/patterns/library/inverse_kinematics/__init__.py +44 -0
- src/patterns/library/inverse_kinematics/config.py +94 -0
- src/patterns/library/inverse_kinematics/core.py +517 -0
- src/patterns/library/inverse_kinematics/tests.py +235 -0
- src/patterns/library/ising_model.py +523 -0
- src/patterns/library/kalman_filter/__init__.py +449 -0
- src/patterns/library/kalman_filter/config.py +106 -0
- src/patterns/library/kalman_filter/core.py +306 -0
- src/patterns/library/kalman_filter/utils.py +145 -0
- src/patterns/library/land_surface.py +605 -0
- src/patterns/library/land_use.py +418 -0
- src/patterns/library/language_evolution.py +422 -0
- src/patterns/library/lotka_volterra.py +419 -0
- src/patterns/library/mantle_convection.py +671 -0
- src/patterns/library/market_microstructure.py +686 -0
- src/patterns/library/markov_chain.py +305 -0
- src/patterns/library/maxwell_fdtd.py +536 -0
- src/patterns/library/metapopulation.py +701 -0
- src/patterns/library/migration.py +405 -0
- src/patterns/library/model_predictive/__init__.py +24 -0
- src/patterns/library/model_predictive/config.py +119 -0
- src/patterns/library/model_predictive/core.py +343 -0
- src/patterns/library/model_predictive/solvers.py +161 -0
- src/patterns/library/model_predictive/tests.py +216 -0
- src/patterns/library/model_predictive/types.py +22 -0
- src/patterns/library/molecular_dynamics.py +503 -0
- src/patterns/library/monte_carlo.py +433 -0
- src/patterns/library/monte_carlo_pi.py +293 -0
- src/patterns/library/n_body.py +473 -0
- src/patterns/library/neural_mass.py +663 -0
- src/patterns/library/neural_network.py +370 -0
- src/patterns/library/ocean_circulation.py +658 -0
- src/patterns/library/open_quantum.py +661 -0
- src/patterns/library/opinion_dynamics.py +437 -0
- src/patterns/library/optimization.py +397 -0
- src/patterns/library/option_pricing.py +521 -0
- src/patterns/library/overlapping_generations.py +400 -0
- src/patterns/library/path_planning/__init__.py +19 -0
- src/patterns/library/path_planning/config.py +109 -0
- src/patterns/library/path_planning/core.py +361 -0
- src/patterns/library/path_planning/pattern.py +135 -0
- src/patterns/library/path_planning.py +343 -0
- src/patterns/library/pedestrian.py +466 -0
- src/patterns/library/percolation.py +540 -0
- src/patterns/library/pharmacokinetics.py +434 -0
- src/patterns/library/phase_field.py +384 -0
- src/patterns/library/pid_tuning/__init__.py +24 -0
- src/patterns/library/pid_tuning/config.py +63 -0
- src/patterns/library/pid_tuning/core.py +493 -0
- src/patterns/library/pid_tuning/utils.py +93 -0
- src/patterns/library/plasma_pic/__init__.py +18 -0
- src/patterns/library/plasma_pic/config.py +69 -0
- src/patterns/library/plasma_pic/core.py +270 -0
- src/patterns/library/plasma_pic/pattern.py +477 -0
- src/patterns/library/poisson_solver.py +648 -0
- src/patterns/library/population_genetics.py +332 -0
- src/patterns/library/portfolio_optimization.py +553 -0
- src/patterns/library/projectile_motion.py +330 -0
- src/patterns/library/prospect_theory.py +531 -0
- src/patterns/library/protein_folding.py +743 -0
- src/patterns/library/qft_lattice.py +578 -0
- src/patterns/library/quantum.py +644 -0
- src/patterns/library/quantum_harmonic_oscillator.py +291 -0
- src/patterns/library/queueing_networks/__init__.py +25 -0
- src/patterns/library/queueing_networks/config.py +80 -0
- src/patterns/library/queueing_networks/core.py +471 -0
- src/patterns/library/queueing_networks/pattern.py +159 -0
- src/patterns/library/reaction_diffusion.py +407 -0
- src/patterns/library/rigid_body.py +444 -0
- src/patterns/library/rumor_spreading.py +504 -0
- src/patterns/library/sea_ice.py +672 -0
- src/patterns/library/search_matching.py +449 -0
- src/patterns/library/seismic_waves.py +746 -0
- src/patterns/library/signal_transduction/__init__.py +20 -0
- src/patterns/library/signal_transduction/config.py +90 -0
- src/patterns/library/signal_transduction/models.py +431 -0
- src/patterns/library/signal_transduction/pattern.py +358 -0
- src/patterns/library/slam/__init__.py +18 -0
- src/patterns/library/slam/config.py +79 -0
- src/patterns/library/slam/core.py +418 -0
- src/patterns/library/slam/pattern.py +122 -0
- src/patterns/library/slam.py +276 -0
- src/patterns/library/social_network.py +298 -0
- src/patterns/library/spatial_ecology.py +501 -0
- src/patterns/library/spectral_estimation.py +602 -0
- src/patterns/library/spring_mass.py +327 -0
- src/patterns/library/state_space.py +730 -0
- src/patterns/library/supply_chain.py +267 -0
- src/patterns/library/surface_water.py +579 -0
- src/patterns/library/synaptic_plasticity.py +683 -0
- src/patterns/library/system_dynamics/__init__.py +21 -0
- src/patterns/library/system_dynamics/analysis.py +209 -0
- src/patterns/library/system_dynamics/core.py +320 -0
- src/patterns/library/system_dynamics/models.py +168 -0
- src/patterns/library/system_dynamics/results.py +119 -0
- src/patterns/library/system_dynamics/solver.py +68 -0
- src/patterns/library/system_dynamics/types.py +66 -0
- src/patterns/library/thermal.py +446 -0
- src/patterns/library/traffic_flow.py +698 -0
- src/patterns/library/urban_growth.py +552 -0
- src/patterns/library/wave_equation.py +461 -0
- src/patterns/library/wave_optics.py +589 -0
- src/patterns/library/wavelet_analysis.py +634 -0
- src/patterns/library/wildfire.py +696 -0
- src/patterns/resource_estimator.py +271 -0
- src/patterns/runner.py +353 -0
- src/patterns/topic_router.py +133 -0
- src/pipeline/__init__.py +44 -0
- src/pipeline/ab_testing.py +174 -0
- src/pipeline/auto_fix.py +154 -0
- src/pipeline/base.py +172 -0
- src/pipeline/config.py +298 -0
- src/pipeline/coordinated_discovery.py +270 -0
- src/pipeline/discovery_memory.py +225 -0
- src/pipeline/discovery_phases/__init__.py +0 -0
- src/pipeline/discovery_phases/phase_1_cognitive.py +79 -0
- src/pipeline/discovery_phases/phase_2_knowledge.py +60 -0
- src/pipeline/discovery_phases/phase_3_analysis.py +248 -0
- src/pipeline/discovery_phases/phase_4_detection.py +96 -0
- src/pipeline/discovery_phases/phase_5_verification.py +93 -0
- src/pipeline/discovery_phases/phase_6_quality.py +228 -0
- src/pipeline/events.py +14 -0
- src/pipeline/final_verifier.py +106 -0
- src/pipeline/hil_phases/__init__.py +23 -0
- src/pipeline/hil_phases/phase_a_usp.py +174 -0
- src/pipeline/hil_phases/phase_b_knowledge.py +75 -0
- src/pipeline/hil_phases/phase_c_gaps.py +91 -0
- src/pipeline/hil_phases/phase_d_agents.py +101 -0
- src/pipeline/hil_phases/phase_e_simulation.py +231 -0
- src/pipeline/hil_phases/phase_f_dissertation.py +212 -0
- src/pipeline/hil_phases/phase_g_quality.py +116 -0
- src/pipeline/hil_pipeline.py +391 -0
- src/pipeline/iterative_quality.py +189 -0
- src/pipeline/meta_pipeline.py +205 -0
- src/pipeline/observer.py +62 -0
- src/pipeline/output_profiles.py +187 -0
- src/pipeline/plugin_stage_router.py +90 -0
- src/pipeline/progress.py +137 -0
- src/pipeline/provider_coordinator.py +286 -0
- src/pipeline/quality.py +536 -0
- src/pipeline/redundant_gates.py +738 -0
- src/pipeline/result.py +41 -0
- src/pipeline/self_correcting.py +135 -0
- src/pipeline/smart_scheduler.py +125 -0
- src/pipeline/steps/__init__.py +1 -0
- src/pipeline/steps/step_10_verify.py +30 -0
- src/pipeline/ucos_qzrf.py +353 -0
- src/plugins/__init__.py +1 -0
- src/plugins/_llm_base.py +38 -0
- src/plugins/analogical_reasoning.py +76 -0
- src/plugins/bayesian_update.py +71 -0
- src/plugins/constraint_relaxation.py +62 -0
- src/plugins/dag.py +167 -0
- src/plugins/delphi.py +51 -0
- src/plugins/design_thinking.py +43 -0
- src/plugins/dim_reduction.py +129 -0
- src/plugins/dist_analyzer.py +187 -0
- src/plugins/first_principles.py +82 -0
- src/plugins/five_whys.py +42 -0
- src/plugins/graph_metrics.py +162 -0
- src/plugins/info_theory.py +145 -0
- src/plugins/inversion.py +64 -0
- src/plugins/ishikawa.py +53 -0
- src/plugins/lateral_thinking.py +47 -0
- src/plugins/morphological.py +58 -0
- src/plugins/ooda.py +42 -0
- src/plugins/optimization.py +192 -0
- src/plugins/pareto.py +70 -0
- src/plugins/persistence.py +147 -0
- src/plugins/pre_mortem.py +72 -0
- src/plugins/red_team.py +78 -0
- src/plugins/scamper.py +45 -0
- src/plugins/second_order.py +77 -0
- src/plugins/signal_processing.py +169 -0
- src/plugins/six_hats.py +44 -0
- src/plugins/stat_tests.py +226 -0
- src/plugins/swot.py +38 -0
- src/plugins/timeseries.py +186 -0
- src/plugins/triz_bridge.py +78 -0
- src/plugins/unified_registry.py +765 -0
- src/projects/__init__.py +1 -0
- src/projects/manager.py +484 -0
- src/publishing/__init__.py +7 -0
- src/publishing/blueprint.py +33 -0
- src/publishing/dissertation.py +477 -0
- src/publishing/experiment_design.py +237 -0
- src/publishing/latex_compiler.py +100 -0
- src/publishing/submitter.py +154 -0
- src/py.typed +0 -0
- src/references/__init__.py +22 -0
- src/references/manager.py +201 -0
- src/repl/__init__.py +15 -0
- src/repl/commands.py +299 -0
- src/repl/core.py +201 -0
- src/repl/input_handler.py +210 -0
- src/repl.py +14 -0
- src/reproducibility/__init__.py +19 -0
- src/reproducibility/router.py +81 -0
- src/reproducibility/validator.py +120 -0
- src/robust_decisions/__init__.py +15 -0
- src/robust_decisions/prim.py +68 -0
- src/robust_decisions/router.py +158 -0
- src/robust_decisions/xlrm.py +77 -0
- src/search/__init__.py +18 -0
- src/search/semantic_scholar.py +323 -0
- src/security/__init__.py +23 -0
- src/security/audit_log.py +433 -0
- src/security/credential_guard.py +59 -0
- src/security/guardian.py +196 -0
- src/security/prompt_sanitizer.py +93 -0
- src/simulations/__init__.py +213 -0
- src/simulations/amuse_bridge.py +43 -0
- src/simulations/auto_engine.py +157 -0
- src/simulations/base_adapter.py +169 -0
- src/simulations/boolnet_bridge.py +132 -0
- src/simulations/brian2_bridge.py +56 -0
- src/simulations/cobra_bridge.py +54 -0
- src/simulations/config.py +170 -0
- src/simulations/copasi_bridge.py +46 -0
- src/simulations/diffeqpy_bridge.py +49 -0
- src/simulations/domain_selector.py +13 -0
- src/simulations/fenicsx_bridge.py +78 -0
- src/simulations/gromacs_bridge.py +39 -0
- src/simulations/jaxlab_bridge.py +54 -0
- src/simulations/jaxley_bridge.py +68 -0
- src/simulations/jaxmd_bridge.py +58 -0
- src/simulations/jaxsim_bridge.py +641 -0
- src/simulations/lammps_bridge.py +60 -0
- src/simulations/matlab_bridge.py +61 -0
- src/simulations/mdanalysis_bridge.py +54 -0
- src/simulations/mesa_bridge.py +98 -0
- src/simulations/mirrorfish_bridge.py +50 -0
- src/simulations/modelingtoolkit_bridge.py +52 -0
- src/simulations/mujoco_bridge.py +67 -0
- src/simulations/neuron_bridge.py +56 -0
- src/simulations/newton_bridge.py +645 -0
- src/simulations/newton_runner.py +68 -0
- src/simulations/nvidia_bridge.py +1093 -0
- src/simulations/openfoam_bridge.py +47 -0
- src/simulations/openmm_bridge.py +150 -0
- src/simulations/pattern_engine_map.py +520 -0
- src/simulations/psi4_bridge.py +51 -0
- src/simulations/pybullet_bridge.py +56 -0
- src/simulations/pyscf_bridge.py +49 -0
- src/simulations/quantum_espresso_bridge.py +37 -0
- src/simulations/rebound_bridge.py +56 -0
- src/simulations/runner_v2.py +573 -0
- src/simulations/schr_bridge.py +791 -0
- src/simulations/simpy_bridge.py +65 -0
- src/simulations/slim_bridge.py +81 -0
- src/simulations/taichi_bridge.py +72 -0
- src/simulations/tellurium_bridge.py +52 -0
- src/simulations/torchsim_bridge.py +556 -0
- src/simulations/vastai_delegate.py +306 -0
- src/simulations/vina_bridge.py +83 -0
- src/simulations/virtual_bio.py +203 -0
- src/simulations/wrf_bridge.py +47 -0
- src/simulations/xarray_bridge.py +53 -0
- src/social/__init__.py +8 -0
- src/social/ai_archive_client.py +64 -0
- src/social/arxiv_client.py +69 -0
- src/social/auto_poster.py +474 -0
- src/social/discord_webhook.py +51 -0
- src/social/grok_client.py +85 -0
- src/social/health_checker.py +121 -0
- src/social/i18n_templates.py +95 -0
- src/social/keyring.py +126 -0
- src/social/mastodon_client.py +120 -0
- src/social/orcid_client.py +72 -0
- src/social/profile_manager.py +84 -0
- src/social/publisher.py +128 -0
- src/social/reddit_client.py +68 -0
- src/social/researchgate_client.py +170 -0
- src/social/scimatic_export.py +59 -0
- src/social/slack_webhook.py +51 -0
- src/social/social_bridge.py +47 -0
- src/social/social_history.py +73 -0
- src/social/telegram_bot.py +201 -0
- src/social/twitter_client.py +120 -0
- src/social/zenodo_client.py +162 -0
- src/solver/__init__.py +18 -0
- src/solver/core.py +187 -0
- src/solver/one_shot.py +200 -0
- src/solver/strategies.py +320 -0
- src/system_dynamics/__init__.py +81 -0
- src/system_dynamics/archetypes.py +424 -0
- src/system_dynamics/causal_loop.py +247 -0
- src/system_dynamics/dsl.py +142 -0
- src/system_dynamics/dsl_archetypes.py +59 -0
- src/system_dynamics/models.py +102 -0
- src/system_dynamics/router.py +226 -0
- src/system_dynamics/simulator.py +174 -0
- src/system_dynamics/stock_flow.py +355 -0
- src/system_dynamics/visualizer.py +123 -0
- src/terminal_/__init__.py +19 -0
- src/terminal_/cyberpunk_theme.py +241 -0
- src/terminal_/ui.py +152 -0
- src/theorem/__init__.py +1 -0
- src/theorem/prover.py +352 -0
- src/trends/__init__.py +20 -0
- src/trends/evolution.py +330 -0
- src/triz/__init__.py +109 -0
- src/triz/ariz.py +884 -0
- src/triz/bridge.py +240 -0
- src/triz/contradiction_matrix.py +422 -0
- src/triz/matrix.py +52 -0
- src/triz/matrix_core.py +1761 -0
- src/triz/matrix_resolver.py +24 -0
- src/triz/matrix_utils.py +20 -0
- src/triz/physical_contradiction.py +599 -0
- src/triz/principles.py +1136 -0
- src/triz/solver.py +315 -0
- src/triz/standard_solutions.py +1289 -0
- src/triz/standard_solutions_data.py +1210 -0
- src/triz/sufield.py +706 -0
- src/tui/IMPLEMENTATION.md +135 -0
- src/tui/README.md +61 -0
- src/tui/__init__.py +9 -0
- src/tui/alert_widget.py +49 -0
- src/tui/animation.py +79 -0
- src/tui/app.py +8 -0
- src/tui/article_canvas.py +113 -0
- src/tui/breathing.py +122 -0
- src/tui/budget_gauge.py +38 -0
- src/tui/config_screen.py +125 -0
- src/tui/cube_navigator.py +87 -0
- src/tui/cube_viz.py +173 -0
- src/tui/dashboard.py +64 -0
- src/tui/delight.py +235 -0
- src/tui/delta_renderer.py +265 -0
- src/tui/depth_ladder.py +50 -0
- src/tui/diagnostics.py +165 -0
- src/tui/easing.py +104 -0
- src/tui/entry.py +79 -0
- src/tui/export_helpers.py +175 -0
- src/tui/folder_panel.py +63 -0
- src/tui/ghost_tui.py +261 -0
- src/tui/gpu_display.py +193 -0
- src/tui/gradient_bar.py +181 -0
- src/tui/header_footer.py +73 -0
- src/tui/i18n.py +311 -0
- src/tui/keyboard_handler.py +67 -0
- src/tui/language_manager.py +63 -0
- src/tui/layout_manager.py +134 -0
- src/tui/live_feed_ticker.py +81 -0
- src/tui/living_cube.py +304 -0
- src/tui/living_cube_v2.py +406 -0
- src/tui/local_llm.py +30 -0
- src/tui/main_loop.py +271 -0
- src/tui/mascot.py +77 -0
- src/tui/micro_animations.py +188 -0
- src/tui/module_status.py +116 -0
- src/tui/onboarding.py +82 -0
- src/tui/package_installer.py +150 -0
- src/tui/particles.py +217 -0
- src/tui/pipeline_runner.py +185 -0
- src/tui/pipeline_stories.py +61 -0
- src/tui/plugin_manager.py +123 -0
- src/tui/proof_graph.py +96 -0
- src/tui/provider_dashboard.py +71 -0
- src/tui/renderer.py +87 -0
- src/tui/results_display.py +179 -0
- src/tui/smart_prompt.py +199 -0
- src/tui/sound_system.py +69 -0
- src/tui/sounds/complete.wav +0 -0
- src/tui/sounds/error.wav +0 -0
- src/tui/sounds/rare.wav +0 -0
- src/tui/sounds/step.wav +0 -0
- src/tui/sounds/welcome.wav +0 -0
- src/tui/staged_error.py +110 -0
- src/tui/system_stats.py +33 -0
- src/tui/thinking_indicator.py +75 -0
- src/tui/token_counter.py +20 -0
- src/tui/v8/README.md +113 -0
- src/tui/v8/backend/bridge.go +151 -0
- src/tui/v8/backend/client.go +427 -0
- src/tui/v8/backend/client_test.go +247 -0
- src/tui/v8/backend/cmd.go +325 -0
- src/tui/v8/backend/error_test.go +82 -0
- src/tui/v8/backend/integration_test.go +110 -0
- src/tui/v8/backend/rate_limiter.go +104 -0
- src/tui/v8/backend/rate_limiter_test.go +74 -0
- src/tui/v8/backend/sse.go +157 -0
- src/tui/v8/backend/sse_integration_test.go +69 -0
- src/tui/v8/backend/sse_test.go +110 -0
- src/tui/v8/config/config.go +123 -0
- src/tui/v8/config/config_test.go +64 -0
- src/tui/v8/constants.go +5 -0
- src/tui/v8/debug_view_test.go +43 -0
- src/tui/v8/go.mod +34 -0
- src/tui/v8/go.sum +58 -0
- src/tui/v8/integration_test.go +103 -0
- src/tui/v8/internal/i18n.go +408 -0
- src/tui/v8/internal/lang.go +77 -0
- src/tui/v8/internal/lang_test.go +32 -0
- src/tui/v8/internal/mascot_memory.go +102 -0
- src/tui/v8/internal/sanitize.go +31 -0
- src/tui/v8/internal/sanitize_test.go +22 -0
- src/tui/v8/internal/store.go +162 -0
- src/tui/v8/internal/store_test.go +73 -0
- src/tui/v8/internal/text.go +116 -0
- src/tui/v8/layout.go +215 -0
- src/tui/v8/layout_test.go +205 -0
- src/tui/v8/main.go +160 -0
- src/tui/v8/main_test.go +165 -0
- src/tui/v8/model.go +111 -0
- src/tui/v8/model_test.go +52 -0
- src/tui/v8/screens/agenda.go +220 -0
- src/tui/v8/screens/bibliography.go +121 -0
- src/tui/v8/screens/cache.go +83 -0
- src/tui/v8/screens/dashboard.go +203 -0
- src/tui/v8/screens/diagnostic.go +217 -0
- src/tui/v8/screens/dissertation.go +181 -0
- src/tui/v8/screens/export.go +281 -0
- src/tui/v8/screens/export_test.go +103 -0
- src/tui/v8/screens/fireworks.go +156 -0
- src/tui/v8/screens/gpu.go +162 -0
- src/tui/v8/screens/help.go +178 -0
- src/tui/v8/screens/history.go +127 -0
- src/tui/v8/screens/knowledge_graph.go +162 -0
- src/tui/v8/screens/matrix.go +102 -0
- src/tui/v8/screens/onboarding.go +223 -0
- src/tui/v8/screens/packages.go +121 -0
- src/tui/v8/screens/palette.go +207 -0
- src/tui/v8/screens/provider.go +97 -0
- src/tui/v8/screens/social.go +96 -0
- src/tui/v8/screens/triz.go +122 -0
- src/tui/v8/screens/types.go +39 -0
- src/tui/v8/screens/types_test.go +39 -0
- src/tui/v8/signals.go +21 -0
- src/tui/v8/splash/art.go +111 -0
- src/tui/v8/splash/ascii_art.go +156 -0
- src/tui/v8/splash/splash.go +823 -0
- src/tui/v8/splash/splash_test.go +759 -0
- src/tui/v8/styles/theme.go +295 -0
- src/tui/v8/styles/theme_test.go +58 -0
- src/tui/v8/update.go +943 -0
- src/tui/v8/view.go +199 -0
- src/tui/v8/widgets/c4grid.go +312 -0
- src/tui/v8/widgets/c4grid_test.go +53 -0
- src/tui/v8/widgets/chat.go +142 -0
- src/tui/v8/widgets/chat_test.go +75 -0
- src/tui/v8/widgets/header.go +307 -0
- src/tui/v8/widgets/header_test.go +120 -0
- src/tui/v8/widgets/help.go +115 -0
- src/tui/v8/widgets/help_test.go +31 -0
- src/tui/v8/widgets/inputbar.go +486 -0
- src/tui/v8/widgets/inputbar_test.go +56 -0
- src/tui/v8/widgets/mascot.go +410 -0
- src/tui/v8/widgets/mascot_test.go +118 -0
- src/tui/v8/widgets/pipeline.go +391 -0
- src/tui/v8/widgets/pipeline_test.go +76 -0
- src/tui/v8/widgets/result.go +454 -0
- src/tui/v8/widgets/result_test.go +36 -0
- src/tui/v8/widgets/toast.go +108 -0
- src/tui/v8/widgets/toast_test.go +47 -0
- src/tui/v9/ARCHITECTURE.md +72 -0
- src/tui/v9/Makefile +59 -0
- src/tui/v9/README.md +212 -0
- src/tui/v9/achievements.go +375 -0
- src/tui/v9/achievements_test.go +241 -0
- src/tui/v9/api/api.go +455 -0
- src/tui/v9/api/api_test.go +323 -0
- src/tui/v9/api/auth_env.go +25 -0
- src/tui/v9/api/openapi_contract_test.go +60 -0
- src/tui/v9/api/sse_typed.go +120 -0
- src/tui/v9/api/sse_typed_test.go +83 -0
- src/tui/v9/auth_cmd.go +31 -0
- src/tui/v9/benchview_test.go +39 -0
- src/tui/v9/bio_aurora.go +233 -0
- src/tui/v9/bio_aurora_test.go +227 -0
- src/tui/v9/capsim/capsim.go +235 -0
- src/tui/v9/capsim/capsim_test.go +59 -0
- src/tui/v9/capsim/overlay.go +180 -0
- src/tui/v9/capsim/overlay_test.go +55 -0
- src/tui/v9/capsim_cmd.go +32 -0
- src/tui/v9/card_helpers.go +78 -0
- src/tui/v9/card_helpers_test.go +88 -0
- src/tui/v9/cards/cards.go +259 -0
- src/tui/v9/cards/cards_test.go +107 -0
- src/tui/v9/cmd/c4tui-v9/keyfilter.go +108 -0
- src/tui/v9/cmd/c4tui-v9/keyfilter_test.go +166 -0
- src/tui/v9/cmd/c4tui-v9/main.go +240 -0
- src/tui/v9/cmd/c4tui-v9-probe/main.go +26 -0
- src/tui/v9/colorprofile.go +193 -0
- src/tui/v9/commands/palette.go +138 -0
- src/tui/v9/commands.go +107 -0
- src/tui/v9/config.go +237 -0
- src/tui/v9/config_test.go +235 -0
- src/tui/v9/cost_test.go +37 -0
- src/tui/v9/cyber_polish.go +231 -0
- src/tui/v9/debug_overlay.go +134 -0
- src/tui/v9/debug_test.go +94 -0
- src/tui/v9/demo/demo.go +183 -0
- src/tui/v9/demo/demo_test.go +102 -0
- src/tui/v9/dream.go +176 -0
- src/tui/v9/dream_test.go +156 -0
- src/tui/v9/effects/bugfix_test.go +156 -0
- src/tui/v9/effects/effects.go +602 -0
- src/tui/v9/effects/effects_test.go +128 -0
- src/tui/v9/empty_widgets.go +193 -0
- src/tui/v9/empty_widgets_test.go +101 -0
- src/tui/v9/expansion_test.go +95 -0
- src/tui/v9/feed_persist_test.go +70 -0
- src/tui/v9/go.mod +33 -0
- src/tui/v9/go.sum +73 -0
- src/tui/v9/golden_snapshots_test.go +389 -0
- src/tui/v9/golden_test.go +182 -0
- src/tui/v9/history.go +286 -0
- src/tui/v9/i18n/README.md +91 -0
- src/tui/v9/i18n/ar.toml +194 -0
- src/tui/v9/i18n/de.toml +194 -0
- src/tui/v9/i18n/en.toml +211 -0
- src/tui/v9/i18n/hi.toml +194 -0
- src/tui/v9/i18n/i18n.go +121 -0
- src/tui/v9/i18n/i18n_test.go +236 -0
- src/tui/v9/i18n/ja.toml +194 -0
- src/tui/v9/i18n/pipeline/c4_science_terms.json +668 -0
- src/tui/v9/i18n/pipeline/nllb_check.py +178 -0
- src/tui/v9/i18n/pipeline/quality_report_v9.4.json +1661 -0
- src/tui/v9/i18n/pipeline/quality_score.py +210 -0
- src/tui/v9/i18n/pipeline/regen_i18n.py +183 -0
- src/tui/v9/i18n/pipeline/translate_hymt.py +204 -0
- src/tui/v9/i18n/ru.toml +194 -0
- src/tui/v9/i18n/zh.toml +194 -0
- src/tui/v9/internal/oapi/openapi.gen.go +1812 -0
- src/tui/v9/keymap.go +378 -0
- src/tui/v9/keymap_test.go +330 -0
- src/tui/v9/lang_helper_test.go +23 -0
- src/tui/v9/langs.go +101 -0
- src/tui/v9/langs_test.go +131 -0
- src/tui/v9/layout.go +125 -0
- src/tui/v9/layout_test.go +96 -0
- src/tui/v9/main_test.go +28 -0
- src/tui/v9/model.go +772 -0
- src/tui/v9/oapi-codegen.yaml +8 -0
- src/tui/v9/palette_test.go +195 -0
- src/tui/v9/persist/feed.go +295 -0
- src/tui/v9/persist/feed_test.go +292 -0
- src/tui/v9/persist/persist.go +211 -0
- src/tui/v9/persist/persist_test.go +208 -0
- src/tui/v9/probe/probe.go +182 -0
- src/tui/v9/registry.go +412 -0
- src/tui/v9/resume_test.go +68 -0
- src/tui/v9/settings_menu.go +116 -0
- src/tui/v9/sim_handlers_test.go +143 -0
- src/tui/v9/sim_summary.go +107 -0
- src/tui/v9/sim_summary_test.go +71 -0
- src/tui/v9/splash.go +1423 -0
- src/tui/v9/splash_align_forms_test.go +167 -0
- src/tui/v9/splash_align_test.go +119 -0
- src/tui/v9/splash_test.go +248 -0
- src/tui/v9/sse_reconnect.go +81 -0
- src/tui/v9/state_machine_test.go +528 -0
- src/tui/v9/status_bar.go +137 -0
- src/tui/v9/status_bar_test.go +74 -0
- src/tui/v9/telemetry/telemetry.go +119 -0
- src/tui/v9/telemetry/telemetry_test.go +144 -0
- src/tui/v9/telemetry_wiring_test.go +182 -0
- src/tui/v9/test_helpers.go +97 -0
- src/tui/v9/tests/golden/T0-tmux-achievement-shown.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-bookmark.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-capsim.txt +23 -0
- src/tui/v9/tests/golden/T0-tmux-debug.txt +25 -0
- src/tui/v9/tests/golden/T0-tmux-empty.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-error.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-expanded.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-focused-expanded.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-focused.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-full-hypothesis.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-help-shown.txt +25 -0
- src/tui/v9/tests/golden/T0-tmux-hypothesis.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-mixed-feed.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-multi-paper.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-palette.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-settings-open.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-sim-inconclusive.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-sim-refutes.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-sim-skipped.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-sim-supports.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-sim.txt +24 -0
- src/tui/v9/tests/golden/T0-tmux-verdict-chips.txt +24 -0
- src/tui/v9/tests/golden/T1-mbp13-achievement-shown.txt +39 -0
- src/tui/v9/tests/golden/T1-mbp13-bookmark.txt +39 -0
- src/tui/v9/tests/golden/T1-mbp13-capsim.txt +39 -0
- src/tui/v9/tests/golden/T1-mbp13-debug.txt +25 -0
- src/tui/v9/tests/golden/T1-mbp13-empty.txt +39 -0
- src/tui/v9/tests/golden/T1-mbp13-error.txt +39 -0
- src/tui/v9/tests/golden/T1-mbp13-expanded.txt +39 -0
- src/tui/v9/tests/golden/T1-mbp13-focused-expanded.txt +39 -0
- src/tui/v9/tests/golden/T1-mbp13-focused.txt +39 -0
- src/tui/v9/tests/golden/T1-mbp13-full-hypothesis.txt +39 -0
- src/tui/v9/tests/golden/T1-mbp13-help-shown.txt +25 -0
- src/tui/v9/tests/golden/T1-mbp13-hypothesis.txt +39 -0
- src/tui/v9/tests/golden/T1-mbp13-mixed-feed.txt +39 -0
- src/tui/v9/tests/golden/T1-mbp13-multi-paper.txt +39 -0
- src/tui/v9/tests/golden/T1-mbp13-palette.txt +40 -0
- src/tui/v9/tests/golden/T1-mbp13-settings-open.txt +40 -0
- src/tui/v9/tests/golden/T1-mbp13-sim-inconclusive.txt +39 -0
- src/tui/v9/tests/golden/T1-mbp13-sim-refutes.txt +39 -0
- src/tui/v9/tests/golden/T1-mbp13-sim-skipped.txt +39 -0
- src/tui/v9/tests/golden/T1-mbp13-sim-supports.txt +39 -0
- src/tui/v9/tests/golden/T1-mbp13-sim.txt +39 -0
- src/tui/v9/tests/golden/T1-mbp13-verdict-chips.txt +39 -0
- src/tui/v9/tests/golden/T2-1080p-achievement-shown.txt +49 -0
- src/tui/v9/tests/golden/T2-1080p-bookmark.txt +49 -0
- src/tui/v9/tests/golden/T2-1080p-capsim.txt +49 -0
- src/tui/v9/tests/golden/T2-1080p-debug.txt +25 -0
- src/tui/v9/tests/golden/T2-1080p-empty.txt +49 -0
- src/tui/v9/tests/golden/T2-1080p-error.txt +49 -0
- src/tui/v9/tests/golden/T2-1080p-expanded.txt +49 -0
- src/tui/v9/tests/golden/T2-1080p-focused-expanded.txt +49 -0
- src/tui/v9/tests/golden/T2-1080p-focused.txt +49 -0
- src/tui/v9/tests/golden/T2-1080p-full-hypothesis.txt +49 -0
- src/tui/v9/tests/golden/T2-1080p-help-shown.txt +25 -0
- src/tui/v9/tests/golden/T2-1080p-hypothesis.txt +49 -0
- src/tui/v9/tests/golden/T2-1080p-mixed-feed.txt +49 -0
- src/tui/v9/tests/golden/T2-1080p-multi-paper.txt +49 -0
- src/tui/v9/tests/golden/T2-1080p-palette.txt +41 -0
- src/tui/v9/tests/golden/T2-1080p-settings-open.txt +50 -0
- src/tui/v9/tests/golden/T2-1080p-sim-inconclusive.txt +49 -0
- src/tui/v9/tests/golden/T2-1080p-sim-refutes.txt +49 -0
- src/tui/v9/tests/golden/T2-1080p-sim-skipped.txt +49 -0
- src/tui/v9/tests/golden/T2-1080p-sim-supports.txt +49 -0
- src/tui/v9/tests/golden/T2-1080p-sim.txt +49 -0
- src/tui/v9/tests/golden/T2-1080p-verdict-chips.txt +49 -0
- src/tui/v9/tests/golden/T2-mbp16-achievement-shown.txt +47 -0
- src/tui/v9/tests/golden/T2-mbp16-bookmark.txt +47 -0
- src/tui/v9/tests/golden/T2-mbp16-capsim.txt +47 -0
- src/tui/v9/tests/golden/T2-mbp16-debug.txt +25 -0
- src/tui/v9/tests/golden/T2-mbp16-empty.txt +47 -0
- src/tui/v9/tests/golden/T2-mbp16-error.txt +47 -0
- src/tui/v9/tests/golden/T2-mbp16-expanded.txt +47 -0
- src/tui/v9/tests/golden/T2-mbp16-focused-expanded.txt +47 -0
- src/tui/v9/tests/golden/T2-mbp16-focused.txt +47 -0
- src/tui/v9/tests/golden/T2-mbp16-full-hypothesis.txt +47 -0
- src/tui/v9/tests/golden/T2-mbp16-help-shown.txt +25 -0
- src/tui/v9/tests/golden/T2-mbp16-hypothesis.txt +47 -0
- src/tui/v9/tests/golden/T2-mbp16-mixed-feed.txt +47 -0
- src/tui/v9/tests/golden/T2-mbp16-multi-paper.txt +47 -0
- src/tui/v9/tests/golden/T2-mbp16-palette.txt +41 -0
- src/tui/v9/tests/golden/T2-mbp16-settings-open.txt +48 -0
- src/tui/v9/tests/golden/T2-mbp16-sim-inconclusive.txt +47 -0
- src/tui/v9/tests/golden/T2-mbp16-sim-refutes.txt +47 -0
- src/tui/v9/tests/golden/T2-mbp16-sim-skipped.txt +47 -0
- src/tui/v9/tests/golden/T2-mbp16-sim-supports.txt +47 -0
- src/tui/v9/tests/golden/T2-mbp16-sim.txt +47 -0
- src/tui/v9/tests/golden/T2-mbp16-verdict-chips.txt +47 -0
- src/tui/v9/tests/golden/T3-4k-achievement-shown.txt +59 -0
- src/tui/v9/tests/golden/T3-4k-bookmark.txt +59 -0
- src/tui/v9/tests/golden/T3-4k-capsim.txt +59 -0
- src/tui/v9/tests/golden/T3-4k-debug.txt +25 -0
- src/tui/v9/tests/golden/T3-4k-empty.txt +59 -0
- src/tui/v9/tests/golden/T3-4k-error.txt +59 -0
- src/tui/v9/tests/golden/T3-4k-expanded.txt +59 -0
- src/tui/v9/tests/golden/T3-4k-focused-expanded.txt +59 -0
- src/tui/v9/tests/golden/T3-4k-focused.txt +59 -0
- src/tui/v9/tests/golden/T3-4k-full-hypothesis.txt +59 -0
- src/tui/v9/tests/golden/T3-4k-help-shown.txt +25 -0
- src/tui/v9/tests/golden/T3-4k-hypothesis.txt +59 -0
- src/tui/v9/tests/golden/T3-4k-mixed-feed.txt +59 -0
- src/tui/v9/tests/golden/T3-4k-multi-paper.txt +59 -0
- src/tui/v9/tests/golden/T3-4k-palette.txt +41 -0
- src/tui/v9/tests/golden/T3-4k-settings-open.txt +60 -0
- src/tui/v9/tests/golden/T3-4k-sim-inconclusive.txt +59 -0
- src/tui/v9/tests/golden/T3-4k-sim-refutes.txt +59 -0
- src/tui/v9/tests/golden/T3-4k-sim-skipped.txt +59 -0
- src/tui/v9/tests/golden/T3-4k-sim-supports.txt +59 -0
- src/tui/v9/tests/golden/T3-4k-sim.txt +59 -0
- src/tui/v9/tests/golden/T3-4k-verdict-chips.txt +59 -0
- src/tui/v9/tests/golden/T3-ultrawide-achievement-shown.txt +49 -0
- src/tui/v9/tests/golden/T3-ultrawide-bookmark.txt +49 -0
- src/tui/v9/tests/golden/T3-ultrawide-capsim.txt +49 -0
- src/tui/v9/tests/golden/T3-ultrawide-debug.txt +25 -0
- src/tui/v9/tests/golden/T3-ultrawide-empty.txt +49 -0
- src/tui/v9/tests/golden/T3-ultrawide-error.txt +49 -0
- src/tui/v9/tests/golden/T3-ultrawide-expanded.txt +49 -0
- src/tui/v9/tests/golden/T3-ultrawide-focused-expanded.txt +49 -0
- src/tui/v9/tests/golden/T3-ultrawide-focused.txt +49 -0
- src/tui/v9/tests/golden/T3-ultrawide-full-hypothesis.txt +49 -0
- src/tui/v9/tests/golden/T3-ultrawide-help-shown.txt +25 -0
- src/tui/v9/tests/golden/T3-ultrawide-hypothesis.txt +49 -0
- src/tui/v9/tests/golden/T3-ultrawide-mixed-feed.txt +49 -0
- src/tui/v9/tests/golden/T3-ultrawide-multi-paper.txt +49 -0
- src/tui/v9/tests/golden/T3-ultrawide-palette.txt +41 -0
- src/tui/v9/tests/golden/T3-ultrawide-settings-open.txt +50 -0
- src/tui/v9/tests/golden/T3-ultrawide-sim-inconclusive.txt +49 -0
- src/tui/v9/tests/golden/T3-ultrawide-sim-refutes.txt +49 -0
- src/tui/v9/tests/golden/T3-ultrawide-sim-skipped.txt +49 -0
- src/tui/v9/tests/golden/T3-ultrawide-sim-supports.txt +49 -0
- src/tui/v9/tests/golden/T3-ultrawide-sim.txt +49 -0
- src/tui/v9/tests/golden/T3-ultrawide-verdict-chips.txt +49 -0
- src/tui/v9/theme.go +83 -0
- src/tui/v9/theme_test.go +90 -0
- src/tui/v9/tier.go +88 -0
- src/tui/v9/tier_test.go +363 -0
- src/tui/v9/update.go +993 -0
- src/tui/v9/v8_art_embedded.go +178 -0
- src/tui/v9/v910_test.go +253 -0
- src/tui/v9/verdict_chips.go +64 -0
- src/tui/v9/verdict_chips_test.go +77 -0
- src/tui/v9/view.go +472 -0
- src/tui/v9/view_test.go +154 -0
- src/tui/v9/wizard.go +97 -0
- src/tui/v9/wizard_render_test.go +87 -0
- src/tui/v9/wizard_sse_test.go +311 -0
- src/utils/__init__.py +27 -0
- src/utils/error_handlers.py +290 -0
- src/utils/error_taxonomy.py +140 -0
- src/utils/formatting.py +160 -0
- src/utils/math_utils.py +27 -0
- src/utils/retry/__init__.py +47 -0
- src/utils/retry/core.py +200 -0
- src/utils/retry/policies.py +202 -0
- src/utils/retry/utils.py +90 -0
- src/utils/retry.py +53 -0
- src/utils/safe_eval.py +206 -0
- src/utils/safe_subprocess.py +171 -0
- src/utils/safety_guards.py +110 -0
- src/utils/security_middleware.py +132 -0
- src/utils/translation.py +110 -0
- src/utils/validation.py +86 -0
- src/utils/validators.py +377 -0
- src/validation/__init__.py +31 -0
- src/validation/consensus_meter.py +393 -0
- src/validation/core.py +290 -0
- src/validation/empirical_layer.py +137 -0
- src/validation/monte_carlo.py +24 -0
- src/validation/rules.py +324 -0
- src/validation/tracker.py +32 -0
- src/verification/__init__.py +19 -0
- src/verification/agda_bridge.py +326 -0
- src/verification/auto_theorem.py +296 -0
- src/verification/calibrator.py +211 -0
- src/verification/claim_matcher.py +317 -0
- src/verification/config.py +85 -0
- src/verification/consensus_engine.py +142 -0
- src/verification/coq_client.py +416 -0
- src/verification/dafny_client.py +394 -0
- src/verification/examples/agda_examples.json +47 -0
- src/verification/examples/coq_examples.json +50 -0
- src/verification/examples/dafny_examples.json +54 -0
- src/verification/examples/lean4_examples.json +58 -0
- src/verification/examples/z3_examples.json +52 -0
- src/verification/formalization_engine.py +187 -0
- src/verification/guardrails.py +297 -0
- src/verification/haskell_bridge.py +131 -0
- src/verification/hoare_client.py +491 -0
- src/verification/hoare_verifier.py +524 -0
- src/verification/hybrid_verifier.py +473 -0
- src/verification/lean4_client.py +349 -0
- src/verification/lean4lean_client.py +62 -0
- src/verification/lean_dojo_adapter.py +149 -0
- src/verification/llm_prover.py +439 -0
- src/verification/math_detector.py +72 -0
- src/verification/rag_retriever.py +107 -0
- src/verification/semantic_alignment.py +172 -0
- src/verification/stats_validator.py +300 -0
- src/verification/timer.py +241 -0
- src/verification/unified_score.py +150 -0
- src/visualization/__init__.py +1 -0
- src/visualization/c4_viz.py +191 -0
- src/wasm/__init__.py +12 -0
- src/wasm/build_plugins.py +196 -0
- src/wasm/runtime.py +245 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# SPDX-License-Identifier: AGPL-3.0
|
|
2
|
+
"""BoolNet bridge — Boolean network analysis for gene regulatory networks.
|
|
3
|
+
|
|
4
|
+
Install: BiocManager::install("BoolNet") in R, then reticulate in Python.
|
|
5
|
+
Alternative: pip install booleanNetwork (if available).
|
|
6
|
+
"""
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import logging
|
|
10
|
+
from typing import Any
|
|
11
|
+
|
|
12
|
+
from .base_adapter import BaseSimulationAdapter, SimulationResult
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
logger = logging.getLogger(__name__)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class BoolNetBridge(BaseSimulationAdapter):
|
|
19
|
+
"""Bridge to BoolNet for Boolean gene regulatory network analysis."""
|
|
20
|
+
|
|
21
|
+
_engine_name = "boolnet"
|
|
22
|
+
_package_checks = ["rpy2"]
|
|
23
|
+
_install_hint = (
|
|
24
|
+
"Install R + BoolNet: BiocManager::install('BoolNet') "
|
|
25
|
+
"Then in Python: pip install rpy2 "
|
|
26
|
+
"Alternative: use Python boolean-network libraries (e.g. pystablemotifs)"
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
def run(self, input_data: dict[str, Any] | None = None) -> SimulationResult:
|
|
30
|
+
def _run(data: dict[str, Any]) -> dict[str, Any]:
|
|
31
|
+
network_file = data.get("network_file")
|
|
32
|
+
if not network_file:
|
|
33
|
+
# Generate a simple toggle-switch network inline
|
|
34
|
+
network = data.get("network", {
|
|
35
|
+
"A": "!B",
|
|
36
|
+
"B": "!A",
|
|
37
|
+
})
|
|
38
|
+
attractors = self._compute_attractors(network)
|
|
39
|
+
return {
|
|
40
|
+
"attractors": attractors,
|
|
41
|
+
"network_nodes": list(network.keys()),
|
|
42
|
+
"note": "Computed attractors for Boolean network",
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
from rpy2.robjects.packages import importr
|
|
46
|
+
boolnet = importr("BoolNet")
|
|
47
|
+
net = boolnet.loadNetwork(network_file)
|
|
48
|
+
attrs = boolnet.getAttractors(net)
|
|
49
|
+
return {
|
|
50
|
+
"attractors": str(attrs),
|
|
51
|
+
"network_file": network_file,
|
|
52
|
+
"note": "BoolNet attractor analysis completed",
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return self._run_wrapped(_run, input_data)
|
|
56
|
+
|
|
57
|
+
@staticmethod
|
|
58
|
+
def _compute_attractors(network: dict[str, str]) -> list[dict[str, int]]:
|
|
59
|
+
"""Simple brute-force attractor computation for small networks."""
|
|
60
|
+
nodes = list(network.keys())
|
|
61
|
+
attractors = []
|
|
62
|
+
for state_bits in range(2 ** len(nodes)):
|
|
63
|
+
state = {n: (state_bits >> i) & 1 for i, n in enumerate(nodes)}
|
|
64
|
+
seen = []
|
|
65
|
+
current = state.copy()
|
|
66
|
+
while current not in seen:
|
|
67
|
+
seen.append(current.copy())
|
|
68
|
+
next_state = {}
|
|
69
|
+
for node, rule in network.items():
|
|
70
|
+
next_state[node] = BoolNetBridge._eval_rule(rule, current)
|
|
71
|
+
current = next_state
|
|
72
|
+
if len(seen) > 100:
|
|
73
|
+
break
|
|
74
|
+
if current in seen:
|
|
75
|
+
cycle_start = seen.index(current)
|
|
76
|
+
cycle = seen[cycle_start:]
|
|
77
|
+
if cycle not in [a["states"] for a in attractors]:
|
|
78
|
+
attractors.append({"states": cycle, "period": len(cycle)})
|
|
79
|
+
return attractors
|
|
80
|
+
|
|
81
|
+
@staticmethod
|
|
82
|
+
def _eval_rule(rule: str, state: dict[str, int]) -> int:
|
|
83
|
+
"""Evaluate a simple Boolean rule safely (no eval, AST-based).
|
|
84
|
+
|
|
85
|
+
Supported syntax: variable names, integers 0/1, NOT (!), AND (&), OR (|),
|
|
86
|
+
parentheses. Anything else returns 0. State values come from the local
|
|
87
|
+
state dict only — no attribute access, no function calls, no dunder names.
|
|
88
|
+
"""
|
|
89
|
+
import ast
|
|
90
|
+
|
|
91
|
+
rule = rule.strip()
|
|
92
|
+
if not rule:
|
|
93
|
+
return 0
|
|
94
|
+
|
|
95
|
+
# Normalize Boolean operators to Python syntax.
|
|
96
|
+
rule = rule.replace("!", "not ").replace("&", " and ").replace("|", " or ")
|
|
97
|
+
|
|
98
|
+
try:
|
|
99
|
+
tree = ast.parse(rule, mode="eval")
|
|
100
|
+
except SyntaxError:
|
|
101
|
+
return 0
|
|
102
|
+
|
|
103
|
+
def _eval(node: ast.AST) -> int:
|
|
104
|
+
if isinstance(node, ast.Expression):
|
|
105
|
+
return _eval(node.body)
|
|
106
|
+
if isinstance(node, ast.Constant):
|
|
107
|
+
if isinstance(node.value, (int, bool)):
|
|
108
|
+
return 1 if node.value else 0
|
|
109
|
+
return 0
|
|
110
|
+
if isinstance(node, ast.Name):
|
|
111
|
+
if node.id.startswith("__"):
|
|
112
|
+
return 0
|
|
113
|
+
val = state.get(node.id)
|
|
114
|
+
if isinstance(val, (int, bool)):
|
|
115
|
+
return 1 if val else 0
|
|
116
|
+
return 0
|
|
117
|
+
if isinstance(node, ast.UnaryOp) and isinstance(node.op, ast.Not):
|
|
118
|
+
return 0 if _eval(node.operand) else 1
|
|
119
|
+
if isinstance(node, ast.BoolOp):
|
|
120
|
+
values = [_eval(v) for v in node.values]
|
|
121
|
+
if isinstance(node.op, ast.And):
|
|
122
|
+
return 1 if all(values) else 0
|
|
123
|
+
if isinstance(node.op, ast.Or):
|
|
124
|
+
return 1 if any(values) else 0
|
|
125
|
+
return 0
|
|
126
|
+
# Reject calls, attributes, comparisons, subscripts, etc.
|
|
127
|
+
return 0
|
|
128
|
+
|
|
129
|
+
try:
|
|
130
|
+
return _eval(tree)
|
|
131
|
+
except Exception:
|
|
132
|
+
return 0
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# SPDX-License-Identifier: AGPL-3.0
|
|
2
|
+
"""Brian2 bridge — spiking neural network simulator.
|
|
3
|
+
|
|
4
|
+
Install: pip install brian2
|
|
5
|
+
"""
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import logging
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from .base_adapter import BaseSimulationAdapter, SimulationResult
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
logger = logging.getLogger(__name__)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Brian2Bridge(BaseSimulationAdapter):
|
|
18
|
+
"""Bridge to Brian2 for SNN simulations."""
|
|
19
|
+
|
|
20
|
+
_engine_name = "brian2"
|
|
21
|
+
_package_checks = ["brian2"]
|
|
22
|
+
_install_hint = "pip install brian2"
|
|
23
|
+
|
|
24
|
+
def configure(self, params: dict[str, Any]) -> None:
|
|
25
|
+
super().configure(params)
|
|
26
|
+
# Expected: duration_ms, dt_ms
|
|
27
|
+
|
|
28
|
+
def run(self, input_data: dict[str, Any] | None = None) -> SimulationResult:
|
|
29
|
+
def _run(data: dict[str, Any]) -> dict[str, Any]:
|
|
30
|
+
from brian2 import NeuronGroup, SpikeMonitor, StateMonitor, defaultclock, ms, run
|
|
31
|
+
|
|
32
|
+
duration = self._params.get("duration_ms", 100) * ms
|
|
33
|
+
defaultclock.dt = self._params.get("dt_ms", 0.1) * ms
|
|
34
|
+
|
|
35
|
+
eqs = """
|
|
36
|
+
dv/dt = (I-v)/tau : volt
|
|
37
|
+
I : volt
|
|
38
|
+
tau : second
|
|
39
|
+
"""
|
|
40
|
+
group = NeuronGroup(100, eqs, threshold="v>0.8*mV", reset="v=0*mV", method="exact")
|
|
41
|
+
group.v = "rand()*0.5*mV"
|
|
42
|
+
group.I = "(rand()*0.5 + 0.5)*mV"
|
|
43
|
+
group.tau = "(10 + rand()*10)*ms"
|
|
44
|
+
|
|
45
|
+
spike_mon = SpikeMonitor(group)
|
|
46
|
+
StateMonitor(group, "v", record=True)
|
|
47
|
+
run(duration)
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
"spike_times_ms": {i: list(spike_mon.t[spike_mon.i == i] / ms) for i in range(5)},
|
|
51
|
+
"n_spikes": int(spike_mon.num_spikes),
|
|
52
|
+
"n_neurons": 100,
|
|
53
|
+
"note": "Brian2 SNN simulation completed",
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return self._run_wrapped(_run, input_data)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# SPDX-License-Identifier: AGPL-3.0
|
|
2
|
+
"""COBRApy bridge — constraint-based metabolic modeling (FBA, FVA, pFBA).
|
|
3
|
+
|
|
4
|
+
Install: pip install cobra
|
|
5
|
+
"""
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import logging
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from .base_adapter import BaseSimulationAdapter, SimulationResult
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
logger = logging.getLogger(__name__)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class CobraBridge(BaseSimulationAdapter):
|
|
18
|
+
"""Bridge to COBRApy for flux balance analysis and metabolic modeling."""
|
|
19
|
+
|
|
20
|
+
_engine_name = "cobra"
|
|
21
|
+
_package_checks = ["cobra"]
|
|
22
|
+
_install_hint = "pip install cobra (requires libglpk-dev or similar LP solver)"
|
|
23
|
+
|
|
24
|
+
def run(self, input_data: dict[str, Any] | None = None) -> SimulationResult:
|
|
25
|
+
def _run(data: dict[str, Any]) -> dict[str, Any]:
|
|
26
|
+
import cobra
|
|
27
|
+
from cobra.io import load_model
|
|
28
|
+
|
|
29
|
+
model_source = data.get("model", "textbook")
|
|
30
|
+
if model_source == "textbook":
|
|
31
|
+
model = load_model("textbook")
|
|
32
|
+
else:
|
|
33
|
+
model = cobra.io.read_sbml_model(model_source)
|
|
34
|
+
|
|
35
|
+
objective = data.get("objective", model.objective)
|
|
36
|
+
model.objective = objective
|
|
37
|
+
|
|
38
|
+
solution = model.optimize()
|
|
39
|
+
fva_fraction = data.get("fva_fraction")
|
|
40
|
+
result = {
|
|
41
|
+
"objective_value": solution.objective_value,
|
|
42
|
+
"status": solution.status,
|
|
43
|
+
"model_id": model.id,
|
|
44
|
+
"reactions_count": len(model.reactions),
|
|
45
|
+
"metabolites_count": len(model.metabolites),
|
|
46
|
+
}
|
|
47
|
+
if fva_fraction is not None:
|
|
48
|
+
from cobra.flux_analysis import flux_variability_analysis
|
|
49
|
+
fva = flux_variability_analysis(model, fraction_of_optimum=fva_fraction)
|
|
50
|
+
result["fva"] = fva.to_dict()
|
|
51
|
+
|
|
52
|
+
return result
|
|
53
|
+
|
|
54
|
+
return self._run_wrapped(_run, input_data)
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# SPDX-License-Identifier: AGPL-3.0
|
|
2
|
+
# Copyright (c) 2026 c4reqber Contributors
|
|
3
|
+
"""Simulation Configuration — hardware-aware simulation orchestrator.
|
|
4
|
+
|
|
5
|
+
Reads ~/.c4reqber/simulations.json. Controls which sim engines run based on:
|
|
6
|
+
- User's hardware (Metal/CUDA/CPU)
|
|
7
|
+
- User's budget (vast.ai key + cost limit)
|
|
8
|
+
- User's mode preference (auto|gpu|cpu_only|off)
|
|
9
|
+
|
|
10
|
+
Integrated into pipeline Step 7 and Step 11 (output generation).
|
|
11
|
+
"""
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import json
|
|
15
|
+
import logging
|
|
16
|
+
import os
|
|
17
|
+
import platform
|
|
18
|
+
import subprocess
|
|
19
|
+
from dataclasses import dataclass
|
|
20
|
+
from pathlib import Path
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
logger = logging.getLogger(__name__)
|
|
24
|
+
|
|
25
|
+
CONFIG_PATH = Path.home() / ".c4reqber" / "simulations.json"
|
|
26
|
+
DEFAULT_CONFIG = {
|
|
27
|
+
"mode": "auto",
|
|
28
|
+
"cost_limit_per_run": 5.00,
|
|
29
|
+
"fallback_to_protocol": True,
|
|
30
|
+
"providers": {
|
|
31
|
+
"vastai": {"api_key": "", "gpu_type": "RTX_4090"},
|
|
32
|
+
"local": {"cuda": False, "metal": False},
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@dataclass
|
|
38
|
+
class SimulationConfig:
|
|
39
|
+
"""SimulationConfig."""
|
|
40
|
+
mode: str = "auto" # "auto" | "gpu" | "cpu_only" | "off"
|
|
41
|
+
cost_limit_per_run: float = 5.00
|
|
42
|
+
fallback_to_protocol: bool = True
|
|
43
|
+
vastai_key: str = ""
|
|
44
|
+
gpu_type: str = "RTX_4090"
|
|
45
|
+
local_cuda: bool = False
|
|
46
|
+
local_metal: bool = False
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def load(cls) -> SimulationConfig:
|
|
50
|
+
"""Load."""
|
|
51
|
+
os.makedirs(CONFIG_PATH.parent, exist_ok=True)
|
|
52
|
+
if not CONFIG_PATH.exists():
|
|
53
|
+
_save_default()
|
|
54
|
+
return cls._from_dict(DEFAULT_CONFIG)
|
|
55
|
+
try:
|
|
56
|
+
data = json.loads(CONFIG_PATH.read_text())
|
|
57
|
+
return cls._from_dict(data)
|
|
58
|
+
except Exception:
|
|
59
|
+
return cls._from_dict(DEFAULT_CONFIG)
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def _from_dict(cls, data: dict) -> SimulationConfig:
|
|
63
|
+
providers = data.get("providers", {})
|
|
64
|
+
local = providers.get("local", {})
|
|
65
|
+
vastai = providers.get("vastai", {})
|
|
66
|
+
return cls(
|
|
67
|
+
mode=data.get("mode", "auto"),
|
|
68
|
+
cost_limit_per_run=float(data.get("cost_limit_per_run", 5.00)),
|
|
69
|
+
fallback_to_protocol=data.get("fallback_to_protocol", True),
|
|
70
|
+
vastai_key=vastai.get("api_key", "") or os.environ.get("VASTAI_API_KEY", ""),
|
|
71
|
+
gpu_type=vastai.get("gpu_type", "RTX_4090"),
|
|
72
|
+
local_cuda=local.get("cuda", False),
|
|
73
|
+
local_metal=local.get("metal", False),
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
def save(self) -> None:
|
|
77
|
+
"""Save."""
|
|
78
|
+
data = {
|
|
79
|
+
"mode": self.mode,
|
|
80
|
+
"cost_limit_per_run": self.cost_limit_per_run,
|
|
81
|
+
"fallback_to_protocol": self.fallback_to_protocol,
|
|
82
|
+
"providers": {
|
|
83
|
+
"vastai": {"api_key": self.vastai_key, "gpu_type": self.gpu_type},
|
|
84
|
+
"local": {"cuda": self.local_cuda, "metal": self.local_metal},
|
|
85
|
+
},
|
|
86
|
+
}
|
|
87
|
+
os.makedirs(CONFIG_PATH.parent, exist_ok=True)
|
|
88
|
+
CONFIG_PATH.write_text(json.dumps(data, indent=2))
|
|
89
|
+
|
|
90
|
+
@property
|
|
91
|
+
def can_run_gpu(self) -> bool:
|
|
92
|
+
return bool(self.vastai_key) or self.local_cuda or self.local_metal
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def should_run_simulations(self) -> bool:
|
|
96
|
+
"""Determine if should run simulations."""
|
|
97
|
+
if self.mode == "off":
|
|
98
|
+
return False
|
|
99
|
+
if self.mode == "cpu_only":
|
|
100
|
+
return True
|
|
101
|
+
if self.mode == "gpu":
|
|
102
|
+
return self.can_run_gpu
|
|
103
|
+
return True
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def should_generate_protocol(self) -> bool:
|
|
107
|
+
"""Determine if should generate protocol."""
|
|
108
|
+
if self.mode == "off":
|
|
109
|
+
return self.fallback_to_protocol
|
|
110
|
+
if self.mode == "cpu_only" and not self.can_run_gpu:
|
|
111
|
+
return self.fallback_to_protocol
|
|
112
|
+
return True
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def _save_default() -> None:
|
|
116
|
+
os.makedirs(CONFIG_PATH.parent, exist_ok=True)
|
|
117
|
+
CONFIG_PATH.write_text(json.dumps(DEFAULT_CONFIG, indent=2))
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def detect_hardware() -> dict[str, bool]:
|
|
121
|
+
"""Auto-detect available compute hardware."""
|
|
122
|
+
hw = {"metal": False, "cuda": False, "nvidia_gpu": False, "apple_gpu": False}
|
|
123
|
+
|
|
124
|
+
# Apple Silicon (Metal via MPS)
|
|
125
|
+
if platform.system() == "Darwin" and platform.processor() == "arm":
|
|
126
|
+
hw["apple_gpu"] = True
|
|
127
|
+
try:
|
|
128
|
+
import torch
|
|
129
|
+
hw["metal"] = torch.backends.mps.is_available()
|
|
130
|
+
except Exception:
|
|
131
|
+
logger.debug("Provider check failed", exc_info=True)
|
|
132
|
+
|
|
133
|
+
pass
|
|
134
|
+
|
|
135
|
+
# NVIDIA GPU (CUDA)
|
|
136
|
+
try:
|
|
137
|
+
result = subprocess.run(["nvidia-smi"], capture_output=True, timeout=5)
|
|
138
|
+
hw["nvidia_gpu"] = result.returncode == 0
|
|
139
|
+
try:
|
|
140
|
+
import torch
|
|
141
|
+
hw["cuda"] = torch.cuda.is_available()
|
|
142
|
+
except Exception:
|
|
143
|
+
logger.debug("Provider check failed", exc_info=True)
|
|
144
|
+
|
|
145
|
+
pass
|
|
146
|
+
except Exception:
|
|
147
|
+
logger.debug("Hardware detection failed", exc_info=True)
|
|
148
|
+
pass
|
|
149
|
+
|
|
150
|
+
return hw
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
def auto_configure() -> SimulationConfig:
|
|
154
|
+
"""Auto configure."""
|
|
155
|
+
cfg = SimulationConfig.load()
|
|
156
|
+
hw = detect_hardware()
|
|
157
|
+
|
|
158
|
+
if hw["cuda"] or hw["metal"]:
|
|
159
|
+
cfg.local_cuda = hw["cuda"]
|
|
160
|
+
cfg.local_metal = hw["metal"]
|
|
161
|
+
if cfg.mode == "auto":
|
|
162
|
+
cfg.mode = "gpu"
|
|
163
|
+
logger.info("GPU detected: CUDA=%s Metal=%s → mode=%s", hw["cuda"], hw["metal"], cfg.mode)
|
|
164
|
+
else:
|
|
165
|
+
if cfg.mode == "auto":
|
|
166
|
+
cfg.mode = "cpu_only"
|
|
167
|
+
logger.info("No GPU detected → mode=cpu_only")
|
|
168
|
+
|
|
169
|
+
cfg.save()
|
|
170
|
+
return cfg
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# SPDX-License-Identifier: AGPL-3.0
|
|
2
|
+
"""COPASI bridge — biochemical network analysis via Basico.
|
|
3
|
+
|
|
4
|
+
Install: pip install copasi-basico (or basico)
|
|
5
|
+
"""
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import logging
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from .base_adapter import BaseSimulationAdapter, SimulationResult
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
logger = logging.getLogger(__name__)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class CopasiBridge(BaseSimulationAdapter):
|
|
18
|
+
"""Bridge to COPASI via basico Python bindings."""
|
|
19
|
+
|
|
20
|
+
_engine_name = "copasi"
|
|
21
|
+
_package_checks = ["basico"]
|
|
22
|
+
_install_hint = "pip install copasi-basico"
|
|
23
|
+
|
|
24
|
+
def configure(self, params: dict[str, Any]) -> None:
|
|
25
|
+
super().configure(params)
|
|
26
|
+
|
|
27
|
+
def run(self, input_data: dict[str, Any] | None = None) -> SimulationResult:
|
|
28
|
+
def _run(data: dict[str, Any]) -> dict[str, Any]:
|
|
29
|
+
import basico
|
|
30
|
+
|
|
31
|
+
# Load SBML or create a simple model
|
|
32
|
+
sbml = data.get("sbml")
|
|
33
|
+
if sbml:
|
|
34
|
+
basico.load_model(sbml)
|
|
35
|
+
else:
|
|
36
|
+
basico.new_model(name="c4reqber")
|
|
37
|
+
basico.add_reaction("R1", "A -> B", {"A": 10, "B": 0})
|
|
38
|
+
|
|
39
|
+
tc = basico.run_time_course(duration=50, intervals=100)
|
|
40
|
+
return {
|
|
41
|
+
"timecourse_columns": list(tc.columns),
|
|
42
|
+
"timecourse_rows": len(tc),
|
|
43
|
+
"note": "COPASI time-course simulation completed",
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return self._run_wrapped(_run, input_data)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# SPDX-License-Identifier: AGPL-3.0
|
|
2
|
+
"""diffeqpy bridge — Julia DifferentialEquations.jl via Python.
|
|
3
|
+
|
|
4
|
+
Install: pip install diffeqpy (requires Julia installed)
|
|
5
|
+
"""
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import logging
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from .base_adapter import BaseSimulationAdapter, SimulationResult
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
logger = logging.getLogger(__name__)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class DiffEqPyBridge(BaseSimulationAdapter):
|
|
18
|
+
"""Bridge to DifferentialEquations.jl via diffeqpy."""
|
|
19
|
+
|
|
20
|
+
_engine_name = "diffeqpy"
|
|
21
|
+
_package_checks = ["diffeqpy"]
|
|
22
|
+
_install_hint = "pip install diffeqpy (requires Julia >= 1.6 installed)"
|
|
23
|
+
|
|
24
|
+
def configure(self, params: dict[str, Any]) -> None:
|
|
25
|
+
super().configure(params)
|
|
26
|
+
# Expected: tspan, u0, algorithm
|
|
27
|
+
|
|
28
|
+
def run(self, input_data: dict[str, Any] | None = None) -> SimulationResult:
|
|
29
|
+
def _run(data: dict[str, Any]) -> dict[str, Any]:
|
|
30
|
+
from diffeqpy import de
|
|
31
|
+
|
|
32
|
+
def f(u, p, t):
|
|
33
|
+
return [-0.5 * u[0], 0.5 * u[0] - 0.3 * u[1]]
|
|
34
|
+
|
|
35
|
+
u0 = self._params.get("u0", [1.0, 0.0])
|
|
36
|
+
tspan = self._params.get("tspan", (0.0, 10.0))
|
|
37
|
+
prob = de.ODEProblem(f, u0, tspan)
|
|
38
|
+
sol = de.solve(prob, de.Tsit5(), saveat=0.1)
|
|
39
|
+
|
|
40
|
+
t = list(sol.t)
|
|
41
|
+
u = [list(row) for row in sol.u]
|
|
42
|
+
return {
|
|
43
|
+
"t": t,
|
|
44
|
+
"u": u,
|
|
45
|
+
"n_steps": len(t),
|
|
46
|
+
"note": "diffeqpy ODE solve completed",
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return self._run_wrapped(_run, input_data)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
DOMAIN_SIMULATION_MAP = {
|
|
2
|
+
'materials': ['cfd','phase_field','thermal','atomistic_deposition','composite_mechanics','crystal_growth','dft','elasticity_3d'],
|
|
3
|
+
'biology': ['agent_based','epidemic_sir','hodgkin_huxley','enzyme_kinetics','population_genetics','predator_prey','gene_regulatory','protein_folding'],
|
|
4
|
+
'climate': ['climate_gcm','advection_diffusion','air_quality','thermal','boundary_layer','reaction_diffusion','forest_gap','cellular_automata'],
|
|
5
|
+
'physics': ['n_body','double_pendulum','wave_equation','quantum_harmonic_oscillator','spring_mass','acoustic_wave','maxwell_fdtd','black_hole_accretion'],
|
|
6
|
+
'medicine': ['epidemic_seir','pharmacokinetics','enzyme_kinetics','signal_transduction','age_structured','hodgkin_huxley','neural_mass','agent_based'],
|
|
7
|
+
'neuroscience': ['neural_mass','hodgkin_huxley','connectome','synaptic_plasticity','agent_based','ising_model','cellular_automata','wave_equation'],
|
|
8
|
+
'computer_science': ['neural_network','cellular_automata','game_theory','markov_chain','monte_carlo_pi','bootstrap','optimization_lp','social_network'],
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def get_domain_simulations(domain: str, count: int = 8) -> list[str]:
|
|
13
|
+
return DOMAIN_SIMULATION_MAP.get(domain, DOMAIN_SIMULATION_MAP['physics'])[:count]
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# SPDX-License-Identifier: AGPL-3.0
|
|
2
|
+
"""FEniCSx bridge — high-level FEM PDE solver (dolfinx).
|
|
3
|
+
|
|
4
|
+
Install: conda install -c conda-forge fenics-dolfinx
|
|
5
|
+
"""
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import logging
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from .base_adapter import BaseSimulationAdapter, SimulationResult
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
logger = logging.getLogger(__name__)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class FenicsxBridge(BaseSimulationAdapter):
|
|
18
|
+
"""Bridge to FEniCSx / DOLFINx for finite-element PDE solving."""
|
|
19
|
+
|
|
20
|
+
_engine_name = "fenicsx"
|
|
21
|
+
_package_checks = ["dolfinx"]
|
|
22
|
+
_install_hint = "conda install -c conda-forge fenics-dolfinx"
|
|
23
|
+
|
|
24
|
+
def configure(self, params: dict[str, Any]) -> None:
|
|
25
|
+
super().configure(params)
|
|
26
|
+
# Expected keys: mesh_resolution, element_degree, equation_type
|
|
27
|
+
|
|
28
|
+
def run(self, input_data: dict[str, Any] | None = None) -> SimulationResult:
|
|
29
|
+
def _run(data: dict[str, Any]) -> dict[str, Any]:
|
|
30
|
+
import dolfinx
|
|
31
|
+
import numpy as np
|
|
32
|
+
import ufl
|
|
33
|
+
from dolfinx import fem, mesh
|
|
34
|
+
from mpi4py import MPI
|
|
35
|
+
|
|
36
|
+
# Default: solve Poisson on unit square
|
|
37
|
+
n = self._params.get("mesh_resolution", 32)
|
|
38
|
+
degree = self._params.get("element_degree", 1)
|
|
39
|
+
domain = mesh.create_unit_square(MPI.COMM_WORLD, n, n)
|
|
40
|
+
V = fem.functionspace(domain, ("Lagrange", degree))
|
|
41
|
+
|
|
42
|
+
u = ufl.TrialFunction(V)
|
|
43
|
+
v = ufl.TestFunction(V)
|
|
44
|
+
f = fem.Constant(domain, 1.0)
|
|
45
|
+
a = ufl.dot(ufl.grad(u), ufl.grad(v)) * ufl.dx
|
|
46
|
+
L = f * v * ufl.dx
|
|
47
|
+
|
|
48
|
+
# Dirichlet BC u=0 on boundary
|
|
49
|
+
tdim = domain.topology.dim
|
|
50
|
+
fdim = tdim - 1
|
|
51
|
+
domain.topology.create_entities(fdim)
|
|
52
|
+
boundary_facets = dolfinx.mesh.locate_entities_boundary(
|
|
53
|
+
domain, fdim, lambda x: np.full(x.shape[1], True)
|
|
54
|
+
)
|
|
55
|
+
bc = fem.dirichletbc(
|
|
56
|
+
0.0,
|
|
57
|
+
dolfinx.fem.locate_dofs_topological(V, fdim, boundary_facets),
|
|
58
|
+
V,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
problem = fem.petsc.LinearProblem(a, L, bcs=[bc])
|
|
62
|
+
uh = problem.solve()
|
|
63
|
+
|
|
64
|
+
# Extract L2 norm as scalar metric
|
|
65
|
+
expr = fem.Expression(uh * uh, V.element.interpolation_points())
|
|
66
|
+
uh2 = fem.Function(V)
|
|
67
|
+
uh2.interpolate(expr)
|
|
68
|
+
l2_norm = float(domain.comm.allreduce(
|
|
69
|
+
fem.assemble_scalar(fem.form(uh2 * ufl.dx)), op=MPI.SUM
|
|
70
|
+
) ** 0.5)
|
|
71
|
+
|
|
72
|
+
return {
|
|
73
|
+
"l2_norm": l2_norm,
|
|
74
|
+
"dofs": V.dofmap.index_map.size_global,
|
|
75
|
+
"mesh_cells": domain.topology.index_map(tdim).size_global,
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return self._run_wrapped(_run, input_data)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# SPDX-License-Identifier: AGPL-3.0
|
|
2
|
+
"""GROMACS bridge via gmxapi.
|
|
3
|
+
|
|
4
|
+
Install: conda install -c conda-forge gromacs && pip install gmxapi
|
|
5
|
+
"""
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import logging
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from .base_adapter import BaseSimulationAdapter, SimulationResult
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
logger = logging.getLogger(__name__)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class GromacsBridge(BaseSimulationAdapter):
|
|
18
|
+
"""Bridge to GROMACS molecular dynamics via gmxapi."""
|
|
19
|
+
|
|
20
|
+
_engine_name = "gromacs"
|
|
21
|
+
_package_checks = ["gmxapi"]
|
|
22
|
+
_install_hint = "conda install -c conda-forge gromacs && pip install gmxapi"
|
|
23
|
+
|
|
24
|
+
def configure(self, params: dict[str, Any]) -> None:
|
|
25
|
+
super().configure(params)
|
|
26
|
+
|
|
27
|
+
def run(self, input_data: dict[str, Any] | None = None) -> SimulationResult:
|
|
28
|
+
def _run(data: dict[str, Any]) -> dict[str, Any]:
|
|
29
|
+
import gmxapi as gmx
|
|
30
|
+
|
|
31
|
+
version = getattr(gmx, "__version__", "unknown")
|
|
32
|
+
# gmxapi requires actual TPR input for a real run.
|
|
33
|
+
# Return availability metadata.
|
|
34
|
+
return {
|
|
35
|
+
"gmxapi_version": version,
|
|
36
|
+
"note": "gmxapi available; provide .tpr file for production run",
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return self._run_wrapped(_run, input_data)
|