codelogician 2.0.0b1__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.
- codelogician-2.0.0b1/.cl_server +1 -0
- codelogician-2.0.0b1/.envrc +5 -0
- codelogician-2.0.0b1/.github/workflows/main.yml +87 -0
- codelogician-2.0.0b1/.gitignore +24 -0
- codelogician-2.0.0b1/.gitmodules +0 -0
- codelogician-2.0.0b1/.python-version +1 -0
- codelogician-2.0.0b1/LICENSE +202 -0
- codelogician-2.0.0b1/Makefile +160 -0
- codelogician-2.0.0b1/PKG-INFO +42 -0
- codelogician-2.0.0b1/cl.log +22 -0
- codelogician-2.0.0b1/data/code1/account.py +93 -0
- codelogician-2.0.0b1/data/code1/asset.py +71 -0
- codelogician-2.0.0b1/data/code1/bank.py +70 -0
- codelogician-2.0.0b1/data/code1/currency.py +76 -0
- codelogician-2.0.0b1/data/code1/ledger.py +55 -0
- codelogician-2.0.0b1/data/code1/liability.py +71 -0
- codelogician-2.0.0b1/data/code1/transaction.py +73 -0
- codelogician-2.0.0b1/data/code2/.cl_cache +1 -0
- codelogician-2.0.0b1/data/code2/file1.py +18 -0
- codelogician-2.0.0b1/data/code2/file2.py +18 -0
- codelogician-2.0.0b1/data/local_fdb_data/records_sample_bank_app.json +3479 -0
- codelogician-2.0.0b1/data/local_fdb_data/records_sample_simple_math_lib.json +4826 -0
- codelogician-2.0.0b1/data/sample_app/pyproject.toml +14 -0
- codelogician-2.0.0b1/data/sample_app/src/sample_app/__init__.py +2 -0
- codelogician-2.0.0b1/data/sample_app/src/sample_app/models/__init__.py +5 -0
- codelogician-2.0.0b1/data/sample_app/src/sample_app/models/user.py +63 -0
- codelogician-2.0.0b1/data/sample_app/src/sample_app/py.typed +0 -0
- codelogician-2.0.0b1/data/sample_app/src/sample_app/services/__init__.py +5 -0
- codelogician-2.0.0b1/data/sample_app/src/sample_app/services/auth.py +48 -0
- codelogician-2.0.0b1/data/sample_app/src/sample_app/utils/__init__.py +5 -0
- codelogician-2.0.0b1/data/sample_app/src/sample_app/utils/helpers.py +33 -0
- codelogician-2.0.0b1/data/sample_app/uv.lock +8 -0
- codelogician-2.0.0b1/data/sample_bank_app/account.py +125 -0
- codelogician-2.0.0b1/data/sample_bank_app/asset.py +69 -0
- codelogician-2.0.0b1/data/sample_bank_app/bank.py +74 -0
- codelogician-2.0.0b1/data/sample_bank_app/currency.py +75 -0
- codelogician-2.0.0b1/data/sample_bank_app/ledger.py +86 -0
- codelogician-2.0.0b1/data/sample_bank_app/liability.py +70 -0
- codelogician-2.0.0b1/data/sample_bank_app/transaction.py +64 -0
- codelogician-2.0.0b1/data/sample_math_lib/__init__.py +6 -0
- codelogician-2.0.0b1/data/sample_math_lib/analysis/__init__.py +6 -0
- codelogician-2.0.0b1/data/sample_math_lib/analysis/numerical/__init__.py +6 -0
- codelogician-2.0.0b1/data/sample_math_lib/analysis/numerical/derivatives.py +33 -0
- codelogician-2.0.0b1/data/sample_math_lib/analysis/numerical/integration.py +48 -0
- codelogician-2.0.0b1/data/sample_math_lib/analysis/optimization/__init__.py +5 -0
- codelogician-2.0.0b1/data/sample_math_lib/analysis/optimization/root_finding.py +85 -0
- codelogician-2.0.0b1/data/sample_math_lib/core/__init__.py +14 -0
- codelogician-2.0.0b1/data/sample_math_lib/core/advanced.py +47 -0
- codelogician-2.0.0b1/data/sample_math_lib/core/arithmetic.py +28 -0
- codelogician-2.0.0b1/data/sample_math_lib/core/comparison.py +30 -0
- codelogician-2.0.0b1/data/sample_math_lib/stats/__init__.py +6 -0
- codelogician-2.0.0b1/data/sample_math_lib/stats/basic.py +47 -0
- codelogician-2.0.0b1/data/sample_math_lib/stats/measures.py +46 -0
- codelogician-2.0.0b1/data/sample_math_lib/utils.py +48 -0
- codelogician-2.0.0b1/data/sample_simple_math_lib/__init__.py +3 -0
- codelogician-2.0.0b1/data/sample_simple_math_lib/advanced/__init__.py +0 -0
- codelogician-2.0.0b1/data/sample_simple_math_lib/advanced/geometry/__init__.py +0 -0
- codelogician-2.0.0b1/data/sample_simple_math_lib/advanced/geometry/shapes.py +39 -0
- codelogician-2.0.0b1/data/sample_simple_math_lib/basic.py +23 -0
- codelogician-2.0.0b1/data/sample_simple_math_lib/math_ops.py +42 -0
- codelogician-2.0.0b1/data/sample_simple_math_lib/utils/__init__.py +5 -0
- codelogician-2.0.0b1/data/sample_simple_math_lib/utils/helpers.py +28 -0
- codelogician-2.0.0b1/flake.nix +44 -0
- codelogician-2.0.0b1/main.py +53 -0
- codelogician-2.0.0b1/pyproject.toml +114 -0
- codelogician-2.0.0b1/src/codelogician/README.md +17 -0
- codelogician-2.0.0b1/src/codelogician/__init__.py +0 -0
- codelogician-2.0.0b1/src/codelogician/config/pyiml_config.yaml +6 -0
- codelogician-2.0.0b1/src/codelogician/config/server_config.yaml +4 -0
- codelogician-2.0.0b1/src/codelogician/data/code1/account.py +82 -0
- codelogician-2.0.0b1/src/codelogician/data/code1/asset.py +69 -0
- codelogician-2.0.0b1/src/codelogician/data/code1/bank.py +61 -0
- codelogician-2.0.0b1/src/codelogician/data/code1/currency.py +75 -0
- codelogician-2.0.0b1/src/codelogician/data/code1/ledger.py +55 -0
- codelogician-2.0.0b1/src/codelogician/data/code1/liability.py +70 -0
- codelogician-2.0.0b1/src/codelogician/data/code1/transaction.py +70 -0
- codelogician-2.0.0b1/src/codelogician/data/code2/cldata/iml/file1.iml +19 -0
- codelogician-2.0.0b1/src/codelogician/data/code2/cldata/iml/file2.iml +17 -0
- codelogician-2.0.0b1/src/codelogician/data/code2/file1.py +19 -0
- codelogician-2.0.0b1/src/codelogician/data/code2/file2.py +18 -0
- codelogician-2.0.0b1/src/codelogician/data/code3/file1.py +18 -0
- codelogician-2.0.0b1/src/codelogician/data/code3/file2.py +19 -0
- codelogician-2.0.0b1/src/codelogician/data/code4/.cl_cache +85 -0
- codelogician-2.0.0b1/src/codelogician/data/code4/cldata/iml/one.iml +8 -0
- codelogician-2.0.0b1/src/codelogician/data/code4/cldata/iml/two.iml +3 -0
- codelogician-2.0.0b1/src/codelogician/data/code4/one.py +6 -0
- codelogician-2.0.0b1/src/codelogician/data/code4/two.py +6 -0
- codelogician-2.0.0b1/src/codelogician/data/code5/.cl_cache +429 -0
- codelogician-2.0.0b1/src/codelogician/data/code5/cldata/iml/one.iml +26 -0
- codelogician-2.0.0b1/src/codelogician/data/code5/cldata/iml/three.iml +83 -0
- codelogician-2.0.0b1/src/codelogician/data/code5/cldata/iml/two.iml +26 -0
- codelogician-2.0.0b1/src/codelogician/data/code5/one.py +31 -0
- codelogician-2.0.0b1/src/codelogician/data/code5/three.py +63 -0
- codelogician-2.0.0b1/src/codelogician/data/code5/two.py +33 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_accounting_app/cli.py +39 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_accounting_app/main.py +4 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_accounting_app/models.py +0 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_accounting_app/reports.py +46 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_accounting_app/services.py +43 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_accounting_app/storage.py +14 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_bank_app/account.py +125 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_bank_app/asset.py +69 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_bank_app/bank.py +74 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_bank_app/cldata/iml/account.iml +124 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_bank_app/cldata/iml/asset.iml +44 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_bank_app/cldata/iml/bank.iml +129 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_bank_app/cldata/iml/currency.iml +59 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_bank_app/cldata/iml/ledger.iml +76 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_bank_app/cldata/iml/liability.iml +47 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_bank_app/cldata/iml/transaction.iml +35 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_bank_app/currency.py +75 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_bank_app/ledger.py +86 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_bank_app/liability.py +70 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_bank_app/transaction.py +64 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_math_lib/__init__.py +6 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_math_lib/analysis/__init__.py +6 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_math_lib/analysis/numerical/__init__.py +6 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_math_lib/analysis/numerical/derivatives.py +33 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_math_lib/analysis/numerical/integration.py +48 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_math_lib/analysis/optimization/__init__.py +5 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_math_lib/analysis/optimization/root_finding.py +85 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_math_lib/core/__init__.py +14 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_math_lib/core/advanced.py +47 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_math_lib/core/arithmetic.py +28 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_math_lib/core/comparison.py +30 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_math_lib/stats/__init__.py +6 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_math_lib/stats/basic.py +47 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_math_lib/stats/measures.py +46 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_math_lib/utils.py +48 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_ride_sharing_app/cli.py +37 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_ride_sharing_app/main.py +4 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_ride_sharing_app/models.py +33 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_ride_sharing_app/services.py +71 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_ride_sharing_app/storage.py +18 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_services_app/cli.py +39 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_services_app/main.py +4 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_services_app/models.py +34 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_services_app/services.py +46 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_services_app/storage.py +20 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_simple_math_lib/__init__.py +3 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_simple_math_lib/advanced/__init__.py +0 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_simple_math_lib/advanced/geometry/__init__.py +0 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_simple_math_lib/advanced/geometry/shapes.py +39 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_simple_math_lib/basic.py +23 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_simple_math_lib/math_ops.py +42 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_simple_math_lib/utils/__init__.py +5 -0
- codelogician-2.0.0b1/src/codelogician/data/sample_simple_math_lib/utils/helpers.py +28 -0
- codelogician-2.0.0b1/src/codelogician/data/sketches/sketch_cont1.json +0 -0
- codelogician-2.0.0b1/src/codelogician/data/tests/text.json +0 -0
- codelogician-2.0.0b1/src/codelogician/dep_tools/__init__.py +0 -0
- codelogician-2.0.0b1/src/codelogician/dep_tools/base.py +170 -0
- codelogician-2.0.0b1/src/codelogician/dep_tools/graph_text.py +973 -0
- codelogician-2.0.0b1/src/codelogician/dep_tools/iml.py +0 -0
- codelogician-2.0.0b1/src/codelogician/dep_tools/python.py +315 -0
- codelogician-2.0.0b1/src/codelogician/dep_tools/utils.py +89 -0
- codelogician-2.0.0b1/src/codelogician/server/__init__.py +0 -0
- codelogician-2.0.0b1/src/codelogician/server/cl_server.py +420 -0
- codelogician-2.0.0b1/src/codelogician/server/config.py +75 -0
- codelogician-2.0.0b1/src/codelogician/server/endpoints.py +24 -0
- codelogician-2.0.0b1/src/codelogician/server/endpts_metamodel.py +157 -0
- codelogician-2.0.0b1/src/codelogician/server/endpts_model.py +83 -0
- codelogician-2.0.0b1/src/codelogician/server/endpts_server.py +51 -0
- codelogician-2.0.0b1/src/codelogician/server/endpts_sketches.py +146 -0
- codelogician-2.0.0b1/src/codelogician/server/endpts_strategy.py +133 -0
- codelogician-2.0.0b1/src/codelogician/server/events.py +43 -0
- codelogician-2.0.0b1/src/codelogician/server/file_event_handler.py +45 -0
- codelogician-2.0.0b1/src/codelogician/server/main.py +175 -0
- codelogician-2.0.0b1/src/codelogician/server/oneshot.py +48 -0
- codelogician-2.0.0b1/src/codelogician/server/settings.py +55 -0
- codelogician-2.0.0b1/src/codelogician/server/state.py +69 -0
- codelogician-2.0.0b1/src/codelogician/server/temp.py +81 -0
- codelogician-2.0.0b1/src/codelogician/strategy/__init__.py +3 -0
- codelogician-2.0.0b1/src/codelogician/strategy/cl_agent_state.py +101 -0
- codelogician-2.0.0b1/src/codelogician/strategy/config.py +150 -0
- codelogician-2.0.0b1/src/codelogician/strategy/conversation.md +19 -0
- codelogician-2.0.0b1/src/codelogician/strategy/events.py +71 -0
- codelogician-2.0.0b1/src/codelogician/strategy/iml_strategy.py +41 -0
- codelogician-2.0.0b1/src/codelogician/strategy/javaiml_strategy.py +45 -0
- codelogician-2.0.0b1/src/codelogician/strategy/metacache.py +54 -0
- codelogician-2.0.0b1/src/codelogician/strategy/metamodel.py +662 -0
- codelogician-2.0.0b1/src/codelogician/strategy/model.py +581 -0
- codelogician-2.0.0b1/src/codelogician/strategy/model_status.py +48 -0
- codelogician-2.0.0b1/src/codelogician/strategy/model_task.py +169 -0
- codelogician-2.0.0b1/src/codelogician/strategy/new_temp.py +91 -0
- codelogician-2.0.0b1/src/codelogician/strategy/pyiml_strategy.py +502 -0
- codelogician-2.0.0b1/src/codelogician/strategy/sketch.py +449 -0
- codelogician-2.0.0b1/src/codelogician/strategy/sketch_task.py +64 -0
- codelogician-2.0.0b1/src/codelogician/strategy/state.py +265 -0
- codelogician-2.0.0b1/src/codelogician/strategy/temp.iml +50 -0
- codelogician-2.0.0b1/src/codelogician/strategy/temp_embedding.py +52 -0
- codelogician-2.0.0b1/src/codelogician/strategy/utils.py +84 -0
- codelogician-2.0.0b1/src/codelogician/strategy/worker.py +312 -0
- codelogician-2.0.0b1/src/codelogician/temp.py +138 -0
- codelogician-2.0.0b1/src/codelogician/tools/__init__.py +2 -0
- codelogician-2.0.0b1/src/codelogician/tools/base.py +271 -0
- codelogician-2.0.0b1/src/codelogician/tools/cl_caller.py +58 -0
- codelogician-2.0.0b1/src/codelogician/tools/filesystem.py +253 -0
- codelogician-2.0.0b1/src/codelogician/tools/iml_utils.py +238 -0
- codelogician-2.0.0b1/src/codelogician/ui/__init__.py +0 -0
- codelogician-2.0.0b1/src/codelogician/ui/app.py +237 -0
- codelogician-2.0.0b1/src/codelogician/ui/commands.py +106 -0
- codelogician-2.0.0b1/src/codelogician/ui/common.py +185 -0
- codelogician-2.0.0b1/src/codelogician/ui/data/help.md +43 -0
- codelogician-2.0.0b1/src/codelogician/ui/data/splash.png +0 -0
- codelogician-2.0.0b1/src/codelogician/ui/hello.py +67 -0
- codelogician-2.0.0b1/src/codelogician/ui/hello2.py +14 -0
- codelogician-2.0.0b1/src/codelogician/ui/new_app.py +24 -0
- codelogician-2.0.0b1/src/codelogician/ui/retrieval_poc.py +104 -0
- codelogician-2.0.0b1/src/codelogician/ui/screens/__init__.py +0 -0
- codelogician-2.0.0b1/src/codelogician/ui/screens/decomps.py +82 -0
- codelogician-2.0.0b1/src/codelogician/ui/screens/help.py +22 -0
- codelogician-2.0.0b1/src/codelogician/ui/screens/intro.py +35 -0
- codelogician-2.0.0b1/src/codelogician/ui/screens/model.py +316 -0
- codelogician-2.0.0b1/src/codelogician/ui/screens/model_cmds.py +263 -0
- codelogician-2.0.0b1/src/codelogician/ui/screens/opaques.py +81 -0
- codelogician-2.0.0b1/src/codelogician/ui/screens/overview.py +291 -0
- codelogician-2.0.0b1/src/codelogician/ui/screens/shared.py +7 -0
- codelogician-2.0.0b1/src/codelogician/ui/screens/sketches.py +204 -0
- codelogician-2.0.0b1/src/codelogician/ui/screens/vgs.py +122 -0
- codelogician-2.0.0b1/src/codelogician/ui/server_comm.py +9 -0
- codelogician-2.0.0b1/src/codelogician/ui/step_view.py +139 -0
- codelogician-2.0.0b1/src/codelogician/ui/temp.py +19 -0
- codelogician-2.0.0b1/src/codelogician/ui/temp_command.py +105 -0
- codelogician-2.0.0b1/src/codelogician/ui/tree.tcss +14 -0
- codelogician-2.0.0b1/src/codelogician/ui/tree_poc.py +78 -0
- codelogician-2.0.0b1/src/codelogician/ui/tree_views.py +105 -0
- codelogician-2.0.0b1/src/codelogician/ui/tui.tcss +55 -0
- codelogician-2.0.0b1/src/codelogician/user_stories.md +67 -0
- codelogician-2.0.0b1/tests/__init__.py +9 -0
- codelogician-2.0.0b1/tests/test_configs.py +32 -0
- codelogician-2.0.0b1/tests/test_dep_graph.py +19 -0
- codelogician-2.0.0b1/tests/test_formalization.py +24 -0
- codelogician-2.0.0b1/tests/test_formalization_graph.py +86 -0
- codelogician-2.0.0b1/tests/test_imltools.py +138 -0
- codelogician-2.0.0b1/tests/test_metamodel.py +215 -0
- codelogician-2.0.0b1/tests/test_model.py +254 -0
- codelogician-2.0.0b1/tests/test_model_tasks.py +143 -0
- codelogician-2.0.0b1/tests/test_pyiml_strategy.py +52 -0
- codelogician-2.0.0b1/tests/test_search.py +61 -0
- codelogician-2.0.0b1/tests/test_server.py +93 -0
- codelogician-2.0.0b1/tests/test_server_state.py +15 -0
- codelogician-2.0.0b1/tests/test_sketches.py +500 -0
- codelogician-2.0.0b1/tests/test_strat_state.py +59 -0
- codelogician-2.0.0b1/tests/test_symbol_dep.py +103 -0
- codelogician-2.0.0b1/tests/test_worker.py +170 -0
- codelogician-2.0.0b1/uv.lock +3360 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"{\"abs_path\":\"/Users/linhongyu/Documents/playground/code-logician/.cl_server\",\"strategy_paths\":[],\"config\":{\"debug\":true,\"host\":\"127.0.0.1\",\"port\":8000,\"mcp\":true,\"strategy_configs\":{}}}"
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
name: "main"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
id-token: write
|
|
9
|
+
contents: read
|
|
10
|
+
statuses: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
format:
|
|
14
|
+
name: Format
|
|
15
|
+
runs-on: [self-hosted, Linux]
|
|
16
|
+
continue-on-error: true
|
|
17
|
+
env:
|
|
18
|
+
COLUMNS: 120
|
|
19
|
+
steps:
|
|
20
|
+
- uses: imandra-ai/imandra-build-config/actions/self-hosted-linux-runner-setup-ssh@46c4c21f5e783fc4b9bc172cf900a5f62ea285bf
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
- name: Checkout submodules
|
|
23
|
+
run: git submodule update --init -j 8 --recursive
|
|
24
|
+
- uses: rrbutani/use-nix-shell-action@v1
|
|
25
|
+
with:
|
|
26
|
+
extraNixOptions: --impure
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: uv sync
|
|
29
|
+
- name: Run format
|
|
30
|
+
run: make cicd-format
|
|
31
|
+
|
|
32
|
+
lint:
|
|
33
|
+
name: Lint
|
|
34
|
+
runs-on: [self-hosted, Linux]
|
|
35
|
+
continue-on-error: true
|
|
36
|
+
env:
|
|
37
|
+
COLUMNS: 120
|
|
38
|
+
steps:
|
|
39
|
+
- uses: imandra-ai/imandra-build-config/actions/self-hosted-linux-runner-setup-ssh@46c4c21f5e783fc4b9bc172cf900a5f62ea285bf
|
|
40
|
+
- uses: actions/checkout@v4
|
|
41
|
+
- name: Checkout submodules
|
|
42
|
+
run: git submodule update --init -j 8 --recursive
|
|
43
|
+
- uses: rrbutani/use-nix-shell-action@v1
|
|
44
|
+
with:
|
|
45
|
+
extraNixOptions: --impure
|
|
46
|
+
- name: Install dependencies
|
|
47
|
+
run: uv sync
|
|
48
|
+
- name: Run lint
|
|
49
|
+
run: make cicd-lint
|
|
50
|
+
|
|
51
|
+
type-check:
|
|
52
|
+
name: Type Check
|
|
53
|
+
runs-on: [self-hosted, Linux]
|
|
54
|
+
continue-on-error: true
|
|
55
|
+
env:
|
|
56
|
+
COLUMNS: 120
|
|
57
|
+
steps:
|
|
58
|
+
- uses: imandra-ai/imandra-build-config/actions/self-hosted-linux-runner-setup-ssh@46c4c21f5e783fc4b9bc172cf900a5f62ea285bf
|
|
59
|
+
- uses: actions/checkout@v4
|
|
60
|
+
- name: Checkout submodules
|
|
61
|
+
run: git submodule update --init -j 8 --recursive
|
|
62
|
+
- uses: rrbutani/use-nix-shell-action@v1
|
|
63
|
+
with:
|
|
64
|
+
extraNixOptions: --impure
|
|
65
|
+
- name: Install dependencies
|
|
66
|
+
run: uv sync
|
|
67
|
+
- name: Run type check
|
|
68
|
+
run: make cicd-type-check
|
|
69
|
+
|
|
70
|
+
tests:
|
|
71
|
+
name: Test
|
|
72
|
+
runs-on: [self-hosted, Linux]
|
|
73
|
+
continue-on-error: true
|
|
74
|
+
env:
|
|
75
|
+
COLUMNS: 120
|
|
76
|
+
steps:
|
|
77
|
+
- uses: imandra-ai/imandra-build-config/actions/self-hosted-linux-runner-setup-ssh@46c4c21f5e783fc4b9bc172cf900a5f62ea285bf
|
|
78
|
+
- uses: actions/checkout@v4
|
|
79
|
+
- name: Checkout submodules
|
|
80
|
+
run: git submodule update --init -j 8 --recursive
|
|
81
|
+
- uses: rrbutani/use-nix-shell-action@v1
|
|
82
|
+
with:
|
|
83
|
+
extraNixOptions: --impure
|
|
84
|
+
- name: Install dependencies
|
|
85
|
+
run: uv sync
|
|
86
|
+
- name: Run tests
|
|
87
|
+
run: make cicd-test
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
*.ipynb
|
|
9
|
+
.venv
|
|
10
|
+
build/
|
|
11
|
+
.env
|
|
12
|
+
|
|
13
|
+
.history/
|
|
14
|
+
.vscode/
|
|
15
|
+
.DS_store
|
|
16
|
+
|
|
17
|
+
scripts/local
|
|
18
|
+
.claude/
|
|
19
|
+
*local.*
|
|
20
|
+
node_modules/
|
|
21
|
+
|
|
22
|
+
data/*/cldata
|
|
23
|
+
info.log
|
|
24
|
+
formalization_graph_joblib_cache
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
venv:
|
|
2
|
+
python -m venv venv
|
|
3
|
+
|
|
4
|
+
.PHONY: helm-template-dev
|
|
5
|
+
helm-template-dev:
|
|
6
|
+
helm template langgraph-agents dep/charts/langgraph-agents --values dep/values/dev.yaml --set image.tag="COMMIT_SHA"
|
|
7
|
+
|
|
8
|
+
FDB_INSTANCE_NAME := imandra-dev-db-master
|
|
9
|
+
|
|
10
|
+
.env:
|
|
11
|
+
echo FIX_NEO4J_URI="neo4j+s://a589fffb.databases.neo4j.io" >> .env
|
|
12
|
+
echo FIX_NEO4J_USERNAME=neo4j >> .env
|
|
13
|
+
echo FIX_NEO4J_PASSWORD=$$(gcloud secrets versions access latest --project imandra-dev --secret "neo4j-at-dev-neo4j-01") >> .env
|
|
14
|
+
echo NEO4J_URI="neo4j+s://d05597fd.databases.neo4j.io" >> .env
|
|
15
|
+
echo NEO4J_USERNAME=universe_dev_ro >> .env
|
|
16
|
+
echo NEO4J_PASSWORD=$$(gcloud secrets versions access latest --project imandra-dev --secret "universe-neo4j-password-universe_dev_ro") >> .env
|
|
17
|
+
echo OPENAI_API_KEY=$$(gcloud secrets versions access latest --secret "langgraph-cogito-openai-api-key-dev" --project imandra-dev) >> .env
|
|
18
|
+
echo ANTHROPIC_API_KEY=$$(gcloud secrets versions access latest --secret "langgraph-agents-anthropic-api-key-dev" --project imandra-dev) >> .env
|
|
19
|
+
echo LANGGRAPH_CLOUD_LICENSE_KEY=$$(gcloud secrets versions access latest --project imandra-dev --secret "langgraph-cloud-license-key") >> .env
|
|
20
|
+
echo IMANDRA_U_URL=https://api.dev.imandracapital.com >> .env
|
|
21
|
+
echo IMANDRAX_URL=https://api.dev.imandracapital.com/internal/imandrax >> .env
|
|
22
|
+
echo IMANDRAX_API_KEY=$$(cat ~/.config/imandrax/api_key) >> .env
|
|
23
|
+
echo IMANDRA_API_KEY=$$(cat ~/.config/imandrax/api_key) >> .env
|
|
24
|
+
echo OLLAMA_URL=http://localhost:11434/v1 >> .env
|
|
25
|
+
echo CLOUD_SQL_INSTANCE=imandra-dev:europe-west1:imandra-dev-db-master >> .env
|
|
26
|
+
echo IU_FDB_DB_USER=$$(gcloud auth list --filter=status:ACTIVE --format="value(account)") >> .env
|
|
27
|
+
echo IU_OAUTH_DB_USER=$$(gcloud auth list --filter=status:ACTIVE --format="value(account)") >> .env
|
|
28
|
+
echo OAUTH_CODES_KMS_KEY=projects/imandra-dev/locations/global/keyRings/universe-oauth/cryptoKeys/oauth-codes >> .env
|
|
29
|
+
echo OAUTH_TOKEN_ISSUER=https://api.dev.imandracapital.com/oauth >> .env
|
|
30
|
+
echo FASTMCP_JSON_RESPONSE="true" >> .env
|
|
31
|
+
echo FASTMCP_STREAMABLE_HTTP_PATH=/ >> .env
|
|
32
|
+
echo FASTMCP_STATELESS_HTTP="true" >> .env
|
|
33
|
+
|
|
34
|
+
# Same as above but with the imandra(x) api keys removed
|
|
35
|
+
cicd-env:
|
|
36
|
+
echo FIX_NEO4J_URI="neo4j+s://a589fffb.databases.neo4j.io" >> .env
|
|
37
|
+
echo FIX_NEO4J_USERNAME=neo4j >> .env
|
|
38
|
+
echo FIX_NEO4J_PASSWORD=$$(gcloud secrets versions access latest --project imandra-dev --secret "neo4j-at-dev-neo4j-01") >> .env
|
|
39
|
+
echo NEO4J_URI="neo4j+s://d05597fd.databases.neo4j.io" >> .env
|
|
40
|
+
echo NEO4J_USERNAME=universe_dev_ro >> .env
|
|
41
|
+
echo NEO4J_PASSWORD=$$(gcloud secrets versions access latest --project imandra-dev --secret "universe-neo4j-password-universe_dev_ro") >> .env
|
|
42
|
+
echo OPENAI_API_KEY=$$(gcloud secrets versions access latest --secret "langgraph-agents-openai-api-key-cicd" --project imandra-dev) >> .env
|
|
43
|
+
echo ANTHROPIC_API_KEY=$$(gcloud secrets versions access latest --secret "langgraph-agents-anthropic-api-key-cicd" --project imandra-dev) >> .env
|
|
44
|
+
echo LANGGRAPH_CLOUD_LICENSE_KEY=$$(gcloud secrets versions access latest --project imandra-dev --secret "langgraph-cloud-license-key") >> .env
|
|
45
|
+
echo IMANDRA_U_URL=https://api.dev.imandracapital.com >> .env
|
|
46
|
+
echo IMANDRAX_URL=https://api.dev.imandracapital.com/internal/imandrax >> .env
|
|
47
|
+
echo IMANDRAX_API_KEY=$$(gcloud secrets versions access latest --secret "imandrax-dev-api-key" --project imandra-dev) >> .env
|
|
48
|
+
echo IMANDRA_API_KEY=$$(gcloud secrets versions access latest --secret "imandrax-dev-api-key" --project imandra-dev) >> .env
|
|
49
|
+
echo OLLAMA_URL=http://localhost:11434/v1 >> .env
|
|
50
|
+
echo CLOUD_SQL_INSTANCE=imandra-dev:europe-west1:imandra-dev-db-master >> .env
|
|
51
|
+
echo DISABLE_LLM_FALLBACK=true >> .env
|
|
52
|
+
|
|
53
|
+
cicd-prod-env:
|
|
54
|
+
echo FIX_NEO4J_URI="neo4j+s://a589fffb.databases.neo4j.io" >> .env
|
|
55
|
+
echo FIX_NEO4J_USERNAME=neo4j >> .env
|
|
56
|
+
echo FIX_NEO4J_PASSWORD=$$(gcloud secrets versions access latest --project imandra-dev --secret "neo4j-at-dev-neo4j-01") >> .env
|
|
57
|
+
echo NEO4J_URI="neo4j+s://d05597fd.databases.neo4j.io" >> .env
|
|
58
|
+
echo NEO4J_USERNAME=universe_dev_ro >> .env
|
|
59
|
+
echo NEO4J_PASSWORD=$$(gcloud secrets versions access latest --project imandra-dev --secret "universe-neo4j-password-universe_dev_ro") >> .env
|
|
60
|
+
echo OPENAI_API_KEY=$$(gcloud secrets versions access latest --secret "langgraph-agents-openai-api-key-cicd" --project imandra-dev) >> .env
|
|
61
|
+
echo ANTHROPIC_API_KEY=$$(gcloud secrets versions access latest --secret "langgraph-agents-anthropic-api-key-cicd" --project imandra-dev) >> .env
|
|
62
|
+
echo LANGGRAPH_CLOUD_LICENSE_KEY=$$(gcloud secrets versions access latest --project imandra-dev --secret "langgraph-cloud-license-key") >> .env
|
|
63
|
+
echo IMANDRA_U_URL=https://api.imandra.ai >> .env
|
|
64
|
+
echo IMANDRAX_URL=https://api.imandra.ai/internal/imandrax >> .env
|
|
65
|
+
echo IMANDRAX_API_KEY=$$(gcloud secrets versions access latest --secret "imandrax-prod-api-key" --project imandra-dev) >> .env
|
|
66
|
+
echo IMANDRA_API_KEY=$$(gcloud secrets versions access latest --secret "imandrax-prod-api-key" --project imandra-dev) >> .env
|
|
67
|
+
echo IMANDRA_ORGANIZATION=d818cc33-609a-4f9c-bea6-825e683f06c6 >> .env
|
|
68
|
+
echo OLLAMA_URL=http://localhost:11434/v1 >> .env
|
|
69
|
+
echo CLOUD_SQL_INSTANCE=imandra-dev:europe-west1:imandra-dev-db-master >> .env
|
|
70
|
+
echo DISABLE_LLM_FALLBACK=true >> .env
|
|
71
|
+
|
|
72
|
+
neo4j-home:
|
|
73
|
+
echo NEO4J_HOME=./.neo4j >> .env
|
|
74
|
+
|
|
75
|
+
reload-env: ## Populate .env file
|
|
76
|
+
rm -f .env
|
|
77
|
+
make .env
|
|
78
|
+
|
|
79
|
+
.PHONY: test
|
|
80
|
+
test:
|
|
81
|
+
uv run pytest -vvv
|
|
82
|
+
|
|
83
|
+
.PHONY: cicd-test
|
|
84
|
+
cicd-test:
|
|
85
|
+
uv run pytest -vvv --inline-snapshot=disable
|
|
86
|
+
|
|
87
|
+
.PHONY: try-tui
|
|
88
|
+
try-tui:
|
|
89
|
+
uv run python src/code_logician/tui/cl.py data
|
|
90
|
+
|
|
91
|
+
.PHONY: textual-console
|
|
92
|
+
textual-console:
|
|
93
|
+
uv run textual console -x EVENT
|
|
94
|
+
|
|
95
|
+
.PHONY: format
|
|
96
|
+
format:
|
|
97
|
+
uv tool run ruff@latest format .
|
|
98
|
+
|
|
99
|
+
.PHONY: cicd-format
|
|
100
|
+
cicd-format:
|
|
101
|
+
uv tool run ruff@latest format src/ --check
|
|
102
|
+
|
|
103
|
+
.PHONY: lint
|
|
104
|
+
lint:
|
|
105
|
+
uv tool run ruff@latest check .
|
|
106
|
+
|
|
107
|
+
.PHONY: cicd-lint
|
|
108
|
+
cicd-lint:
|
|
109
|
+
uv tool run ruff@latest check src/ --no-fix --output-format=github
|
|
110
|
+
|
|
111
|
+
.PHONY: help
|
|
112
|
+
help: ## Show this help (usage: make help)
|
|
113
|
+
@echo "Usage: make [recipe]"
|
|
114
|
+
@echo "Recipes:"
|
|
115
|
+
@awk '/^[a-zA-Z0-9_-]+:.*?##/ { \
|
|
116
|
+
helpMessage = match($$0, /## (.*)/); \
|
|
117
|
+
if (helpMessage) { \
|
|
118
|
+
recipe = $$1; \
|
|
119
|
+
sub(/:/, "", recipe); \
|
|
120
|
+
printf " \033[36m%-20s\033[0m %s\n", recipe, substr($$0, RSTART + 3, RLENGTH); \
|
|
121
|
+
} \
|
|
122
|
+
}' $(MAKEFILE_LIST)
|
|
123
|
+
|
|
124
|
+
ty-paths := src/
|
|
125
|
+
|
|
126
|
+
.PHONY: type-check
|
|
127
|
+
type-check:
|
|
128
|
+
uv run ty check $(ty-paths)
|
|
129
|
+
|
|
130
|
+
.PHONY: type-check-watch
|
|
131
|
+
type-check-watch:
|
|
132
|
+
uv run ty check $(ty-paths) -W
|
|
133
|
+
|
|
134
|
+
.PHONY: cicd-type-check
|
|
135
|
+
cicd-type-check:
|
|
136
|
+
uv tool run ty@latest check $(ty-paths) --output-format=concise
|
|
137
|
+
|
|
138
|
+
.PHONY: update-submodules
|
|
139
|
+
update-submodules:
|
|
140
|
+
git submodule update --init --recursive
|
|
141
|
+
|
|
142
|
+
.PHONY: build
|
|
143
|
+
build:
|
|
144
|
+
rm -rf dist && uv build --no-sources
|
|
145
|
+
|
|
146
|
+
.PHONY: publish-testpypi
|
|
147
|
+
publish-testpypi: build
|
|
148
|
+
uv publish \
|
|
149
|
+
--index testpypi \
|
|
150
|
+
-u __token__ \
|
|
151
|
+
-p $$(gcloud secrets versions access --project imandra-dev --secret pypi-test-imandrax-api-api-token latest) \
|
|
152
|
+
./dist/codelogician-*
|
|
153
|
+
|
|
154
|
+
.PHONY: publish-pypi
|
|
155
|
+
publish-pypi: build
|
|
156
|
+
uv publish \
|
|
157
|
+
--index pypi \
|
|
158
|
+
-u __token__ \
|
|
159
|
+
-p $$(gcloud secrets versions access --project imandra-dev --secret pypi-imandrax-api-api-token latest) \
|
|
160
|
+
./dist/codelogician-*
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codelogician
|
|
3
|
+
Version: 2.0.0b1
|
|
4
|
+
Summary: CodeLogician applies neurosymbolic AI to translate source code into precise mathematical logic, striving to create a formal model of the program's behavior that's functionally equivalent to the original source code.
|
|
5
|
+
Author-email: hongyu <hongyu@imandra.ai>, samer <samer@imandra.ai>, denis <denis@imandra.ai>
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Requires-Python: >=3.12
|
|
8
|
+
Requires-Dist: chromadb>=1.0.12
|
|
9
|
+
Requires-Dist: fastapi-mcp>=0.4.0
|
|
10
|
+
Requires-Dist: fastapi>=0.116.1
|
|
11
|
+
Requires-Dist: imandra[universe]>=2.1.1
|
|
12
|
+
Requires-Dist: iml-query==0.3.4
|
|
13
|
+
Requires-Dist: joblib>=1.5.1
|
|
14
|
+
Requires-Dist: matplotlib>=3.10.3
|
|
15
|
+
Requires-Dist: networkx-mermaid>=0.1.7
|
|
16
|
+
Requires-Dist: networkx>=3.5
|
|
17
|
+
Requires-Dist: pydantic-yaml>=1.6.0
|
|
18
|
+
Requires-Dist: pydantic>=2.11.5
|
|
19
|
+
Requires-Dist: rich>=14.0.0
|
|
20
|
+
Requires-Dist: termcolor>=3.1.0
|
|
21
|
+
Requires-Dist: textual-dev>=1.7.0
|
|
22
|
+
Requires-Dist: textual-image>=0.8.3
|
|
23
|
+
Requires-Dist: watchdog>=6.0.0
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# CodeLogician 2.0 (Server)
|
|
27
|
+
|
|
28
|
+
CodeLogician v2.0 now contains a server for performing asynchronous formalization strategies for entire directories, interacting with the CodeLogician Agent (and soon, other agents) ito formalize the code, fix issues, generate test cases and perform formally verified modifications.
|
|
29
|
+
|
|
30
|
+
**Note: CodeLogician requires `IMANDRA_UNI_KEY` to be set to a valid Imandra Universe API key. Get yours at https://www.imandra.ai**
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
To run the server for a starting directory:
|
|
34
|
+
|
|
35
|
+
```shell
|
|
36
|
+
codelogician start -d PATH_TO_DIRECTORY
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
To run server in 'oneshot' mode:
|
|
40
|
+
```shell
|
|
41
|
+
codelogician oneshot -d PATH_TO_DIRECTORY
|
|
42
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
2025-10-14 15:56:21,833 - textual_image.renderable - DEBUG - Sixel support detected
|
|
2
|
+
2025-10-14 15:57:10,164 - textual_image.renderable - DEBUG - Sixel support detected
|
|
3
|
+
2025-10-14 15:57:32,534 - textual_image.renderable - DEBUG - Sixel support detected
|
|
4
|
+
2025-10-14 15:58:00,766 - textual_image.renderable - DEBUG - Not connected to a terminal, falling back to unicode
|
|
5
|
+
2025-10-14 15:58:06,297 - textual_image.renderable - DEBUG - Not connected to a terminal, falling back to unicode
|
|
6
|
+
2025-10-14 15:58:18,572 - textual_image.renderable - DEBUG - Sixel support detected
|
|
7
|
+
2025-10-14 15:58:25,951 - textual_image.renderable - DEBUG - Sixel support detected
|
|
8
|
+
2025-10-14 16:00:19,064 - textual_image.renderable - DEBUG - Sixel support detected
|
|
9
|
+
2025-10-14 16:00:24,228 - textual_image.renderable - DEBUG - Sixel support detected
|
|
10
|
+
2025-10-14 16:00:24,272 - codelogician.server.config - ERROR - Failed to read in the YAML configuration: [Errno 2] No such file or directory: 'config/server_config.yaml'
|
|
11
|
+
2025-10-14 16:00:24,272 - codelogician.server.main - WARNING - Failed to create server state file: Failed to read in state file: [/Users/linhongyu/Documents/playground/code-logician/.cl_server]; [Errno 2] No such file or directory: '/Users/linhongyu/Documents/playground/code-logician/.cl_server'
|
|
12
|
+
2025-10-14 16:00:24,273 - codelogician.server.cl_server - INFO - Will now instantiate server strategies. I have 0 paths!
|
|
13
|
+
2025-10-14 16:00:24,273 - codelogician.server.cl_server - INFO - Starting to mount MCP server...
|
|
14
|
+
2025-10-14 16:00:24,273 - mcp.server.lowlevel.server - DEBUG - Initializing server 'CodeLogician Server'
|
|
15
|
+
2025-10-14 16:00:24,273 - mcp.server.lowlevel.server - DEBUG - Registering handler for ListToolsRequest
|
|
16
|
+
2025-10-14 16:00:24,273 - mcp.server.lowlevel.server - DEBUG - Registering handler for CallToolRequest
|
|
17
|
+
2025-10-14 16:00:24,273 - fastapi_mcp.server - INFO - No auth config provided, skipping auth setup
|
|
18
|
+
2025-10-14 16:00:24,273 - fastapi_mcp.server - INFO - MCP HTTP server listening at /mcp
|
|
19
|
+
2025-10-14 16:00:24,273 - codelogician.server.cl_server - INFO - MCP server mounted!
|
|
20
|
+
2025-10-14 16:00:24,480 - codelogician.server.cl_server - INFO - File system observer started!
|
|
21
|
+
2025-10-14 16:01:57,815 - codelogician.server.cl_server - INFO - Sending `None` event to strategies to shut them down!
|
|
22
|
+
2025-10-14 16:01:57,815 - codelogician.server.cl_server - INFO - Will save server state now.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Imandra Bank
|
|
3
|
+
#
|
|
4
|
+
# account.py
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
from .transaction import CreditTransaction, DebitTransaction
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Account:
|
|
11
|
+
"""Account class to represent a bank account"""
|
|
12
|
+
|
|
13
|
+
LIABILITY = 0
|
|
14
|
+
ASSET = 1
|
|
15
|
+
|
|
16
|
+
def __init__(
|
|
17
|
+
self,
|
|
18
|
+
customer: str,
|
|
19
|
+
name: str,
|
|
20
|
+
currency: int,
|
|
21
|
+
account_type: int,
|
|
22
|
+
account_number: str,
|
|
23
|
+
starting_balance: float = 0.0,
|
|
24
|
+
):
|
|
25
|
+
"""Initialize an account with account number and balance"""
|
|
26
|
+
|
|
27
|
+
self._account_type = account_type # type of account (liability or asset)
|
|
28
|
+
self._customer = customer # customer name
|
|
29
|
+
self._name = name # account name
|
|
30
|
+
self._number = account_number # account number
|
|
31
|
+
self._balance = starting_balance # current balance
|
|
32
|
+
self._transactions = [] # list of transactions
|
|
33
|
+
|
|
34
|
+
def account_type(self):
|
|
35
|
+
"""Get the type of the account"""
|
|
36
|
+
return self._account_type
|
|
37
|
+
|
|
38
|
+
def customer(self):
|
|
39
|
+
"""Get the customer associated with the account"""
|
|
40
|
+
return self._customer
|
|
41
|
+
|
|
42
|
+
def name(self):
|
|
43
|
+
"""Get the name of the account"""
|
|
44
|
+
return self._name
|
|
45
|
+
|
|
46
|
+
def number(self):
|
|
47
|
+
"""Get the account number"""
|
|
48
|
+
return self._number
|
|
49
|
+
|
|
50
|
+
def currency(self):
|
|
51
|
+
"""Get the currency of the account"""
|
|
52
|
+
return self._currency
|
|
53
|
+
|
|
54
|
+
def balance(self):
|
|
55
|
+
"""return the current balance of the account"""
|
|
56
|
+
return self._balance
|
|
57
|
+
|
|
58
|
+
def transactions(self):
|
|
59
|
+
"""Get the list of transactions in the account"""
|
|
60
|
+
return self._transactions
|
|
61
|
+
|
|
62
|
+
def add_transaction(self, transaction):
|
|
63
|
+
"""Add a transaction to the account"""
|
|
64
|
+
|
|
65
|
+
if isinstance(transaction, DebitTransaction):
|
|
66
|
+
if self._type() == Account.ASSET and self._balance >= transaction.amount:
|
|
67
|
+
self._balance -= transaction.amount
|
|
68
|
+
else:
|
|
69
|
+
raise ValueError("Insufficient balance for debit transaction")
|
|
70
|
+
|
|
71
|
+
elif isinstance(transaction, CreditTransaction):
|
|
72
|
+
if self._type() == Account.LIABILITY:
|
|
73
|
+
self._balance += transaction.amount
|
|
74
|
+
elif self._type() == Account.ASSET:
|
|
75
|
+
self._balance -= transaction.amount
|
|
76
|
+
else:
|
|
77
|
+
raise ValueError("Invalid account type for credit transaction")
|
|
78
|
+
|
|
79
|
+
else:
|
|
80
|
+
raise ValueError("Invalid transaction type")
|
|
81
|
+
|
|
82
|
+
self._transactions.append(transaction)
|
|
83
|
+
|
|
84
|
+
def __repr__(self):
|
|
85
|
+
"""String representation of the account"""
|
|
86
|
+
return (
|
|
87
|
+
f"Account(account_number={self.account_number}, balance={self.balance})"
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
if __name__ == "__main__":
|
|
92
|
+
# Example usage
|
|
93
|
+
account = Account("base_account", "123456789", 1000.0)
|