tactus 0.24.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tactus-0.24.0/.claude/agents.md +47 -0
- tactus-0.24.0/.github/workflows/desktop-release.yml +83 -0
- tactus-0.24.0/.github/workflows/release.yml +86 -0
- tactus-0.24.0/.gitignore +44 -0
- tactus-0.24.0/.tactus/config.yml.example +41 -0
- tactus-0.24.0/AGENTS.md +406 -0
- tactus-0.24.0/CHANGELOG.md +400 -0
- tactus-0.24.0/IMPLEMENTATION.md +1922 -0
- tactus-0.24.0/LICENSE +21 -0
- tactus-0.24.0/Makefile +123 -0
- tactus-0.24.0/PKG-INFO +1685 -0
- tactus-0.24.0/README.md +1634 -0
- tactus-0.24.0/SPECIFICATION.md +3324 -0
- tactus-0.24.0/SPECIFICATION.md.bak +3273 -0
- tactus-0.24.0/TECHNICAL_DEBT.md +262 -0
- tactus-0.24.0/behave.ini +29 -0
- tactus-0.24.0/docs/AGENTS.md +22 -0
- tactus-0.24.0/docs/BDD_TESTING.md +792 -0
- tactus-0.24.0/docs/CONFIGURATION.md +460 -0
- tactus-0.24.0/docs/DURABILITY.md +1393 -0
- tactus-0.24.0/docs/FILE_IO.md +198 -0
- tactus-0.24.0/docs/SANDBOXING.md +499 -0
- tactus-0.24.0/docs/STREAMING.md +140 -0
- tactus-0.24.0/docs/TOOLS.md +855 -0
- tactus-0.24.0/docs/TOOL_ROADMAP.md +1266 -0
- tactus-0.24.0/examples/.tactus/config.yml +21 -0
- tactus-0.24.0/examples/01-basics-hello-world.tac +8 -0
- tactus-0.24.0/examples/02-basics-simple-logic.tac +69 -0
- tactus-0.24.0/examples/03-basics-parameters.tac +54 -0
- tactus-0.24.0/examples/04-basics-simple-agent.tac +71 -0
- tactus-0.24.0/examples/05-basics-multi-model.tac +107 -0
- tactus-0.24.0/examples/06-basics-streaming.tac +33 -0
- tactus-0.24.0/examples/07-basics-bedrock.tac +91 -0
- tactus-0.24.0/examples/08-basics-models.tac +285 -0
- tactus-0.24.0/examples/09-basics-google-gemini.tac +154 -0
- tactus-0.24.0/examples/10-feature-state.tac +58 -0
- tactus-0.24.0/examples/11-feature-message-history.tac +73 -0
- tactus-0.24.0/examples/12-feature-structured-output.tac +83 -0
- tactus-0.24.0/examples/13-feature-session.tac +73 -0
- tactus-0.24.0/examples/14-feature-per-turn-tools-simple.tac +53 -0
- tactus-0.24.0/examples/14-feature-per-turn-tools.tac +140 -0
- tactus-0.24.0/examples/15-feature-local-tools.tac +94 -0
- tactus-0.24.0/examples/16-feature-toolsets-advanced.tac +187 -0
- tactus-0.24.0/examples/17-feature-toolsets-dsl.tac +130 -0
- tactus-0.24.0/examples/18-feature-lua-tools-individual.tac +147 -0
- tactus-0.24.0/examples/18-feature-lua-tools-inline.tac +183 -0
- tactus-0.24.0/examples/18-feature-lua-tools-toolset.tac +196 -0
- tactus-0.24.0/examples/19-feature-direct-tool-calls.tac +156 -0
- tactus-0.24.0/examples/20-bdd-complete.tac +135 -0
- tactus-0.24.0/examples/20-bdd-complete.tac.bak +122 -0
- tactus-0.24.0/examples/20-bdd-complete.tac.bak2 +122 -0
- tactus-0.24.0/examples/21-bdd-passing.tac +102 -0
- tactus-0.24.0/examples/21-bdd-passing.tac.bak +92 -0
- tactus-0.24.0/examples/21-bdd-passing.tac.bak2 +92 -0
- tactus-0.24.0/examples/30-eval-simple.tac +62 -0
- tactus-0.24.0/examples/31-eval-demo.tac +104 -0
- tactus-0.24.0/examples/32-eval-success-rate.tac +130 -0
- tactus-0.24.0/examples/33-eval-thresholds.tac +104 -0
- tactus-0.24.0/examples/34-eval-dataset.jsonl +5 -0
- tactus-0.24.0/examples/34-eval-dataset.tac +104 -0
- tactus-0.24.0/examples/35-eval-trace.tac +154 -0
- tactus-0.24.0/examples/35-eval-trace.tac.bak +132 -0
- tactus-0.24.0/examples/35-eval-trace.tac.bak2 +132 -0
- tactus-0.24.0/examples/36-eval-advanced.tac +97 -0
- tactus-0.24.0/examples/37-eval-comprehensive.tac +145 -0
- tactus-0.24.0/examples/37-eval-comprehensive.tac.bak +129 -0
- tactus-0.24.0/examples/37-eval-comprehensive.tac.bak2 +129 -0
- tactus-0.24.0/examples/39-model-simple.tac +42 -0
- tactus-0.24.0/examples/40-mcp-test.tac +100 -0
- tactus-0.24.0/examples/40-model-text-classifier.tac +99 -0
- tactus-0.24.0/examples/41-mcp-simple.tac +61 -0
- tactus-0.24.0/examples/41-model-pytorch.tac +90 -0
- tactus-0.24.0/examples/43-sub-procedure-simple.tac +54 -0
- tactus-0.24.0/examples/44-sub-procedure-composition.tac +105 -0
- tactus-0.24.0/examples/45-sub-procedure-recursive.tac +37 -0
- tactus-0.24.0/examples/46-checkpoint-explicit.tac +51 -0
- tactus-0.24.0/examples/47-checkpoint-expensive-ops.tac +46 -0
- tactus-0.24.0/examples/48-script-mode-simple.tac +21 -0
- tactus-0.24.0/examples/50-inputs-showcase.tac +66 -0
- tactus-0.24.0/examples/51-inputs-calculator.tac +82 -0
- tactus-0.24.0/examples/52-file-io-basics.tac +93 -0
- tactus-0.24.0/examples/53-tsv-file-io.tac +87 -0
- tactus-0.24.0/examples/54-json-file-io.tac +141 -0
- tactus-0.24.0/examples/55-parquet-file-io.tac +129 -0
- tactus-0.24.0/examples/56-hdf5-file-io.tac +109 -0
- tactus-0.24.0/examples/57-excel-file-io.tac +154 -0
- tactus-0.24.0/examples/58-text-file-io.tac +224 -0
- tactus-0.24.0/examples/60-tool-sources.tac +122 -0
- tactus-0.24.0/examples/61-inline-toolset-lua.tac +167 -0
- tactus-0.24.0/examples/62-mcp-toolset-by-server.tac +177 -0
- tactus-0.24.0/examples/63-toolset-import-from-file.tac +167 -0
- tactus-0.24.0/examples/64-require-modules.tac +57 -0
- tactus-0.24.0/examples/65-optional-state-demo.tac +120 -0
- tactus-0.24.0/examples/70-mocking-static.tac +150 -0
- tactus-0.24.0/examples/71-mocking-temporal.tac +135 -0
- tactus-0.24.0/examples/72-mocking-conditional.tac +155 -0
- tactus-0.24.0/examples/99-misc-test-loading.tac +20 -0
- tactus-0.24.0/examples/README.md +472 -0
- tactus-0.24.0/examples/app_config.ini +26 -0
- tactus-0.24.0/examples/data/sample.csv +6 -0
- tactus-0.24.0/examples/demo_output.json +11 -0
- tactus-0.24.0/examples/helpers/math_module.tac +39 -0
- tactus-0.24.0/examples/helpers/product.tac +18 -0
- tactus-0.24.0/examples/helpers/string_module.tac +35 -0
- tactus-0.24.0/examples/helpers/sum.tac +18 -0
- tactus-0.24.0/examples/helpers/text_tools.tac +51 -0
- tactus-0.24.0/examples/inventory_summary.tsv +4 -0
- tactus-0.24.0/examples/mock-config.json +32 -0
- tactus-0.24.0/examples/models/README.md +73 -0
- tactus-0.24.0/examples/models/create_sentiment_model.py +61 -0
- tactus-0.24.0/examples/output_summary.txt +1 -0
- tactus-0.24.0/examples/test-raw-module.tac +11 -0
- tactus-0.24.0/examples/test-raw-streaming.tac +11 -0
- tactus-0.24.0/examples/tools/calculations.py +103 -0
- tactus-0.24.0/examples/tools/data_analysis.py +122 -0
- tactus-0.24.0/examples/tools/search.py +53 -0
- tactus-0.24.0/examples/with_dependencies/README.md +114 -0
- tactus-0.24.0/examples/with_dependencies/simple_http_test.tac +53 -0
- tactus-0.24.0/examples/with_dependencies/time_lookup.tac +67 -0
- tactus-0.24.0/features/01_state_management.feature +43 -0
- tactus-0.24.0/features/02_checkpointing.feature +37 -0
- tactus-0.24.0/features/03_human_in_the_loop.feature +50 -0
- tactus-0.24.0/features/04_control_flow.feature +39 -0
- tactus-0.24.0/features/05_tool_integration.feature +43 -0
- tactus-0.24.0/features/06_retry_logic.feature +44 -0
- tactus-0.24.0/features/07_file_operations.feature +65 -0
- tactus-0.24.0/features/08_agent_primitives.feature +66 -0
- tactus-0.24.0/features/09_workflow_execution.feature +111 -0
- tactus-0.24.0/features/10_lua_integration.feature +104 -0
- tactus-0.24.0/features/11_storage_backends.feature +62 -0
- tactus-0.24.0/features/12_json_operations.feature +95 -0
- tactus-0.24.0/features/13_logging.feature +68 -0
- tactus-0.24.0/features/14_stage_and_step_tracking.feature +73 -0
- tactus-0.24.0/features/15_procedure_calls.feature +79 -0
- tactus-0.24.0/features/16_session_management.feature +85 -0
- tactus-0.24.0/features/17_lua_dsl_validation.feature +144 -0
- tactus-0.24.0/features/18_example_procedures.feature +62 -0
- tactus-0.24.0/features/19_ide_server.feature +44 -0
- tactus-0.24.0/features/20_parameters.feature +144 -0
- tactus-0.24.0/features/21_outputs.feature +146 -0
- tactus-0.24.0/features/23_prompts.feature +100 -0
- tactus-0.24.0/features/24_bdd_specifications.feature +157 -0
- tactus-0.24.0/features/25_bdd_custom_steps.feature +113 -0
- tactus-0.24.0/features/26_bdd_evaluation.feature +129 -0
- tactus-0.24.0/features/27_default_settings.feature +111 -0
- tactus-0.24.0/features/28_custom_prompts.feature +119 -0
- tactus-0.24.0/features/29_execution_settings.feature +107 -0
- tactus-0.24.0/features/30_session_filters.feature +116 -0
- tactus-0.24.0/features/31_matchers.feature +107 -0
- tactus-0.24.0/features/32_result_object.feature +37 -0
- tactus-0.24.0/features/33_output_type.feature +36 -0
- tactus-0.24.0/features/42_model_primitive.feature +143 -0
- tactus-0.24.0/features/43_sub_procedure_checkpointing.feature +120 -0
- tactus-0.24.0/features/46_explicit_checkpoint.feature +158 -0
- tactus-0.24.0/features/48_script_mode.feature +113 -0
- tactus-0.24.0/features/51_dspy_lm_config.feature +199 -0
- tactus-0.24.0/features/52_dspy_signature.feature +302 -0
- tactus-0.24.0/features/53_dspy_module.feature +322 -0
- tactus-0.24.0/features/54_dspy_history.feature +302 -0
- tactus-0.24.0/features/55_dspy_prediction.feature +295 -0
- tactus-0.24.0/features/56_dspy_agent.feature +323 -0
- tactus-0.24.0/features/57_chat_assistant.feature +60 -0
- tactus-0.24.0/features/documentation/IDE_SERVER_BEHAVIOR.md +172 -0
- tactus-0.24.0/features/documentation/Lua DSL/README.md +1067 -0
- tactus-0.24.0/features/environment.py +111 -0
- tactus-0.24.0/features/steps/agent_primitives_steps.py +398 -0
- tactus-0.24.0/features/steps/chat_assistant_steps.py +160 -0
- tactus-0.24.0/features/steps/checkpointing_steps.py +230 -0
- tactus-0.24.0/features/steps/control_flow_steps.py +130 -0
- tactus-0.24.0/features/steps/dspy_agent_steps.py +832 -0
- tactus-0.24.0/features/steps/dspy_history_steps.py +652 -0
- tactus-0.24.0/features/steps/dspy_lm_steps.py +351 -0
- tactus-0.24.0/features/steps/dspy_module_steps.py +499 -0
- tactus-0.24.0/features/steps/dspy_prediction_steps.py +811 -0
- tactus-0.24.0/features/steps/dspy_signature_steps.py +381 -0
- tactus-0.24.0/features/steps/example_procedures_steps.py +189 -0
- tactus-0.24.0/features/steps/file_operations_steps.py +210 -0
- tactus-0.24.0/features/steps/human_in_the_loop_steps.py +313 -0
- tactus-0.24.0/features/steps/ide_server_steps.py +426 -0
- tactus-0.24.0/features/steps/json_operations_steps.py +255 -0
- tactus-0.24.0/features/steps/logging_steps.py +263 -0
- tactus-0.24.0/features/steps/lua_dsl_validation_steps.py +480 -0
- tactus-0.24.0/features/steps/lua_integration_steps.py +188 -0
- tactus-0.24.0/features/steps/mocking_steps.py +161 -0
- tactus-0.24.0/features/steps/procedure_calls_steps.py +289 -0
- tactus-0.24.0/features/steps/result_and_output_steps.py +254 -0
- tactus-0.24.0/features/steps/retry_logic_steps.py +249 -0
- tactus-0.24.0/features/steps/session_management_steps.py +302 -0
- tactus-0.24.0/features/steps/stage_tracking_steps.py +282 -0
- tactus-0.24.0/features/steps/state_management_steps.py +136 -0
- tactus-0.24.0/features/steps/storage_backend_steps.py +421 -0
- tactus-0.24.0/features/steps/support/__init__.py +19 -0
- tactus-0.24.0/features/steps/support/harnesses.py +675 -0
- tactus-0.24.0/features/steps/tool_integration_steps.py +184 -0
- tactus-0.24.0/features/steps/workflow_execution_steps.py +446 -0
- tactus-0.24.0/pyproject.toml +113 -0
- tactus-0.24.0/scripts/audit_examples_mocking.py +229 -0
- tactus-0.24.0/scripts/convert_examples.py +213 -0
- tactus-0.24.0/start-web-ide.sh +30 -0
- tactus-0.24.0/tactus/__init__.py +49 -0
- tactus-0.24.0/tactus/adapters/__init__.py +9 -0
- tactus-0.24.0/tactus/adapters/cli_hitl.py +189 -0
- tactus-0.24.0/tactus/adapters/cli_log.py +248 -0
- tactus-0.24.0/tactus/adapters/file_storage.py +367 -0
- tactus-0.24.0/tactus/adapters/http_callback_log.py +109 -0
- tactus-0.24.0/tactus/adapters/ide_log.py +71 -0
- tactus-0.24.0/tactus/adapters/lua_tools.py +314 -0
- tactus-0.24.0/tactus/adapters/mcp.py +289 -0
- tactus-0.24.0/tactus/adapters/mcp_manager.py +169 -0
- tactus-0.24.0/tactus/adapters/memory.py +53 -0
- tactus-0.24.0/tactus/adapters/plugins.py +419 -0
- tactus-0.24.0/tactus/backends/http_backend.py +58 -0
- tactus-0.24.0/tactus/backends/model_backend.py +35 -0
- tactus-0.24.0/tactus/backends/pytorch_backend.py +110 -0
- tactus-0.24.0/tactus/cli/__init__.py +7 -0
- tactus-0.24.0/tactus/cli/app.py +2058 -0
- tactus-0.24.0/tactus/cli/commands/__init__.py +0 -0
- tactus-0.24.0/tactus/core/__init__.py +32 -0
- tactus-0.24.0/tactus/core/config_manager.py +337 -0
- tactus-0.24.0/tactus/core/dependencies/__init__.py +14 -0
- tactus-0.24.0/tactus/core/dependencies/registry.py +180 -0
- tactus-0.24.0/tactus/core/dsl_stubs.py +1796 -0
- tactus-0.24.0/tactus/core/exceptions.py +66 -0
- tactus-0.24.0/tactus/core/execution_context.py +480 -0
- tactus-0.24.0/tactus/core/lua_sandbox.py +508 -0
- tactus-0.24.0/tactus/core/message_history_manager.py +236 -0
- tactus-0.24.0/tactus/core/mocking.py +286 -0
- tactus-0.24.0/tactus/core/output_validator.py +234 -0
- tactus-0.24.0/tactus/core/registry.py +504 -0
- tactus-0.24.0/tactus/core/runtime.py +2730 -0
- tactus-0.24.0/tactus/core/template_resolver.py +142 -0
- tactus-0.24.0/tactus/core/yaml_parser.py +311 -0
- tactus-0.24.0/tactus/docker/Dockerfile +57 -0
- tactus-0.24.0/tactus/docker/entrypoint.sh +68 -0
- tactus-0.24.0/tactus/dspy/__init__.py +39 -0
- tactus-0.24.0/tactus/dspy/agent.py +964 -0
- tactus-0.24.0/tactus/dspy/config.py +199 -0
- tactus-0.24.0/tactus/dspy/history.py +196 -0
- tactus-0.24.0/tactus/dspy/module.py +405 -0
- tactus-0.24.0/tactus/dspy/prediction.py +252 -0
- tactus-0.24.0/tactus/dspy/signature.py +185 -0
- tactus-0.24.0/tactus/ide/__init__.py +9 -0
- tactus-0.24.0/tactus/ide/coding_assistant.py +343 -0
- tactus-0.24.0/tactus/ide/server.py +2302 -0
- tactus-0.24.0/tactus/primitives/__init__.py +49 -0
- tactus-0.24.0/tactus/primitives/control.py +168 -0
- tactus-0.24.0/tactus/primitives/file.py +229 -0
- tactus-0.24.0/tactus/primitives/handles.py +346 -0
- tactus-0.24.0/tactus/primitives/human.py +342 -0
- tactus-0.24.0/tactus/primitives/json.py +189 -0
- tactus-0.24.0/tactus/primitives/log.py +183 -0
- tactus-0.24.0/tactus/primitives/message_history.py +157 -0
- tactus-0.24.0/tactus/primitives/model.py +145 -0
- tactus-0.24.0/tactus/primitives/procedure.py +509 -0
- tactus-0.24.0/tactus/primitives/procedure_callable.py +282 -0
- tactus-0.24.0/tactus/primitives/retry.py +155 -0
- tactus-0.24.0/tactus/primitives/session.py +152 -0
- tactus-0.24.0/tactus/primitives/stage.py +202 -0
- tactus-0.24.0/tactus/primitives/state.py +182 -0
- tactus-0.24.0/tactus/primitives/step.py +209 -0
- tactus-0.24.0/tactus/primitives/system.py +93 -0
- tactus-0.24.0/tactus/primitives/tool.py +377 -0
- tactus-0.24.0/tactus/primitives/tool_handle.py +277 -0
- tactus-0.24.0/tactus/primitives/toolset.py +229 -0
- tactus-0.24.0/tactus/protocols/__init__.py +45 -0
- tactus-0.24.0/tactus/protocols/chat_recorder.py +81 -0
- tactus-0.24.0/tactus/protocols/config.py +102 -0
- tactus-0.24.0/tactus/protocols/cost.py +31 -0
- tactus-0.24.0/tactus/protocols/hitl.py +71 -0
- tactus-0.24.0/tactus/protocols/log_handler.py +27 -0
- tactus-0.24.0/tactus/protocols/models.py +355 -0
- tactus-0.24.0/tactus/protocols/result.py +33 -0
- tactus-0.24.0/tactus/protocols/storage.py +90 -0
- tactus-0.24.0/tactus/providers/__init__.py +13 -0
- tactus-0.24.0/tactus/providers/base.py +92 -0
- tactus-0.24.0/tactus/providers/bedrock.py +117 -0
- tactus-0.24.0/tactus/providers/google.py +105 -0
- tactus-0.24.0/tactus/providers/openai.py +98 -0
- tactus-0.24.0/tactus/sandbox/__init__.py +63 -0
- tactus-0.24.0/tactus/sandbox/config.py +121 -0
- tactus-0.24.0/tactus/sandbox/container_runner.py +467 -0
- tactus-0.24.0/tactus/sandbox/docker_manager.py +421 -0
- tactus-0.24.0/tactus/sandbox/entrypoint.py +186 -0
- tactus-0.24.0/tactus/sandbox/protocol.py +222 -0
- tactus-0.24.0/tactus/stdlib/__init__.py +10 -0
- tactus-0.24.0/tactus/stdlib/io/__init__.py +13 -0
- tactus-0.24.0/tactus/stdlib/io/csv.py +88 -0
- tactus-0.24.0/tactus/stdlib/io/excel.py +136 -0
- tactus-0.24.0/tactus/stdlib/io/file.py +90 -0
- tactus-0.24.0/tactus/stdlib/io/hdf5.py +121 -0
- tactus-0.24.0/tactus/stdlib/io/json.py +109 -0
- tactus-0.24.0/tactus/stdlib/io/parquet.py +83 -0
- tactus-0.24.0/tactus/stdlib/io/tsv.py +88 -0
- tactus-0.24.0/tactus/stdlib/loader.py +274 -0
- tactus-0.24.0/tactus/stdlib/tac/tactus/tools/done.tac +33 -0
- tactus-0.24.0/tactus/stdlib/tac/tactus/tools/log.tac +49 -0
- tactus-0.24.0/tactus/testing/README.md +288 -0
- tactus-0.24.0/tactus/testing/__init__.py +61 -0
- tactus-0.24.0/tactus/testing/behave_integration.py +370 -0
- tactus-0.24.0/tactus/testing/context.py +377 -0
- tactus-0.24.0/tactus/testing/eval_models.py +114 -0
- tactus-0.24.0/tactus/testing/evaluation_runner.py +222 -0
- tactus-0.24.0/tactus/testing/evaluators.py +634 -0
- tactus-0.24.0/tactus/testing/events.py +94 -0
- tactus-0.24.0/tactus/testing/gherkin_parser.py +134 -0
- tactus-0.24.0/tactus/testing/mock_agent.py +223 -0
- tactus-0.24.0/tactus/testing/mock_dependencies.py +234 -0
- tactus-0.24.0/tactus/testing/mock_hitl.py +171 -0
- tactus-0.24.0/tactus/testing/mock_registry.py +168 -0
- tactus-0.24.0/tactus/testing/mock_tools.py +133 -0
- tactus-0.24.0/tactus/testing/models.py +115 -0
- tactus-0.24.0/tactus/testing/pydantic_eval_runner.py +508 -0
- tactus-0.24.0/tactus/testing/steps/__init__.py +13 -0
- tactus-0.24.0/tactus/testing/steps/builtin.py +692 -0
- tactus-0.24.0/tactus/testing/steps/custom.py +69 -0
- tactus-0.24.0/tactus/testing/steps/registry.py +68 -0
- tactus-0.24.0/tactus/testing/test_runner.py +501 -0
- tactus-0.24.0/tactus/tracing/__init__.py +5 -0
- tactus-0.24.0/tactus/tracing/trace_manager.py +417 -0
- tactus-0.24.0/tactus/utils/__init__.py +1 -0
- tactus-0.24.0/tactus/utils/cost_calculator.py +72 -0
- tactus-0.24.0/tactus/utils/model_pricing.py +132 -0
- tactus-0.24.0/tactus/utils/safe_file_library.py +502 -0
- tactus-0.24.0/tactus/utils/safe_libraries.py +234 -0
- tactus-0.24.0/tactus/validation/LuaLexerBase.py +66 -0
- tactus-0.24.0/tactus/validation/LuaParserBase.py +23 -0
- tactus-0.24.0/tactus/validation/README.md +224 -0
- tactus-0.24.0/tactus/validation/__init__.py +7 -0
- tactus-0.24.0/tactus/validation/error_listener.py +21 -0
- tactus-0.24.0/tactus/validation/generated/LuaLexer.interp +231 -0
- tactus-0.24.0/tactus/validation/generated/LuaLexer.py +5548 -0
- tactus-0.24.0/tactus/validation/generated/LuaLexer.tokens +124 -0
- tactus-0.24.0/tactus/validation/generated/LuaLexerBase.py +66 -0
- tactus-0.24.0/tactus/validation/generated/LuaParser.interp +173 -0
- tactus-0.24.0/tactus/validation/generated/LuaParser.py +6439 -0
- tactus-0.24.0/tactus/validation/generated/LuaParser.tokens +124 -0
- tactus-0.24.0/tactus/validation/generated/LuaParserBase.py +23 -0
- tactus-0.24.0/tactus/validation/generated/LuaParserVisitor.py +118 -0
- tactus-0.24.0/tactus/validation/generated/__init__.py +7 -0
- tactus-0.24.0/tactus/validation/grammar/LuaLexer.g4 +123 -0
- tactus-0.24.0/tactus/validation/grammar/LuaParser.g4 +178 -0
- tactus-0.24.0/tactus/validation/semantic_visitor.py +799 -0
- tactus-0.24.0/tactus/validation/validator.py +157 -0
- tactus-0.24.0/tactus-desktop/.gitignore +7 -0
- tactus-0.24.0/tactus-desktop/README.md +88 -0
- tactus-0.24.0/tactus-desktop/RUN_ELECTRON.md +91 -0
- tactus-0.24.0/tactus-desktop/SETUP_COMPLETE.md +181 -0
- tactus-0.24.0/tactus-desktop/backend/hook-lupa.py +29 -0
- tactus-0.24.0/tactus-desktop/backend/tactus_backend.spec +101 -0
- tactus-0.24.0/tactus-desktop/package-lock.json +4123 -0
- tactus-0.24.0/tactus-desktop/package.json +88 -0
- tactus-0.24.0/tactus-desktop/preload/preload.ts +19 -0
- tactus-0.24.0/tactus-desktop/preload/tsconfig.json +16 -0
- tactus-0.24.0/tactus-desktop/rebuild-and-test.sh +35 -0
- tactus-0.24.0/tactus-desktop/scripts/build-backend.js +88 -0
- tactus-0.24.0/tactus-desktop/scripts/build-frontend.js +91 -0
- tactus-0.24.0/tactus-desktop/src/backend-manager.ts +151 -0
- tactus-0.24.0/tactus-desktop/src/main.ts +76 -0
- tactus-0.24.0/tactus-desktop/src/menu.ts +118 -0
- tactus-0.24.0/tactus-desktop/tsconfig.json +18 -0
- tactus-0.24.0/tactus-ide/ARCHITECTURE.md +515 -0
- tactus-0.24.0/tactus-ide/CHANGELOG.md +89 -0
- tactus-0.24.0/tactus-ide/DEV_MODE.md +86 -0
- tactus-0.24.0/tactus-ide/QUICK_START.md +204 -0
- tactus-0.24.0/tactus-ide/README.md +244 -0
- tactus-0.24.0/tactus-ide/RESTART_INSTRUCTIONS.md +61 -0
- tactus-0.24.0/tactus-ide/TROUBLESHOOTING.md +428 -0
- tactus-0.24.0/tactus-ide/backend/README.md +49 -0
- tactus-0.24.0/tactus-ide/backend/assistant_service.py +444 -0
- tactus-0.24.0/tactus-ide/backend/assistant_tools.py +397 -0
- tactus-0.24.0/tactus-ide/backend/chat_server.py +339 -0
- tactus-0.24.0/tactus-ide/backend/events.py +69 -0
- tactus-0.24.0/tactus-ide/backend/logging_capture.py +193 -0
- tactus-0.24.0/tactus-ide/backend/lsp_server.py +187 -0
- tactus-0.24.0/tactus-ide/backend/requirements.txt +22 -0
- tactus-0.24.0/tactus-ide/backend/tactus_lsp_handler.py +291 -0
- tactus-0.24.0/tactus-ide/backend/test_lsp_server.py +226 -0
- tactus-0.24.0/tactus-ide/backend/text_editor_tool.py +172 -0
- tactus-0.24.0/tactus-ide/dev.sh +160 -0
- tactus-0.24.0/tactus-ide/frontend/.storybook/main.ts +16 -0
- tactus-0.24.0/tactus-ide/frontend/.storybook/preview.ts +60 -0
- tactus-0.24.0/tactus-ide/frontend/.storybook/vitest.setup.ts +7 -0
- tactus-0.24.0/tactus-ide/frontend/README.md +125 -0
- tactus-0.24.0/tactus-ide/frontend/demo.ts +187 -0
- tactus-0.24.0/tactus-ide/frontend/index.html +45 -0
- tactus-0.24.0/tactus-ide/frontend/jest.config.js +11 -0
- tactus-0.24.0/tactus-ide/frontend/package-lock.json +10206 -0
- tactus-0.24.0/tactus-ide/frontend/package.json +67 -0
- tactus-0.24.0/tactus-ide/frontend/postcss.config.js +15 -0
- tactus-0.24.0/tactus-ide/frontend/src/App.tsx +1016 -0
- tactus-0.24.0/tactus-ide/frontend/src/Editor.tsx +312 -0
- tactus-0.24.0/tactus-ide/frontend/src/LSPClient.ts +206 -0
- tactus-0.24.0/tactus-ide/frontend/src/LSPClientHTTP.ts +204 -0
- tactus-0.24.0/tactus-ide/frontend/src/TactusLanguage.ts +261 -0
- tactus-0.24.0/tactus-ide/frontend/src/commands/registry.ts +145 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ChatSidebar.tsx +24 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/CheckpointSummary.tsx +197 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/CollapsibleRun.tsx +136 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/Duration.stories.tsx +49 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/Duration.tsx +67 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/FileTree.stories.tsx +41 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/FileTree.tsx +191 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/MessageFeed.tsx +158 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ProcedureInputsDisplay.stories.tsx +124 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ProcedureInputsDisplay.tsx +84 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ProcedureInputsModal.stories.tsx +254 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ProcedureInputsModal.tsx +278 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ProcedureTab.stories.tsx +378 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ProcedureTab.tsx +85 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ResizeHandle.tsx +79 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ResultsSidebar.stories.tsx +143 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ResultsSidebar.tsx +297 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/TestOptionsModal.tsx +185 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/Timestamp.stories.tsx +44 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/Timestamp.tsx +38 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/TopMenuBar.stories.tsx +112 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/chat/ChatInterface.tsx +96 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/chat/MessageInput.tsx +84 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/chat/MessageList.tsx +125 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/debugger/CheckpointDetails.stories.tsx +167 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/debugger/CheckpointDetails.tsx +220 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/debugger/CheckpointList.stories.tsx +121 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/debugger/CheckpointList.tsx +110 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/debugger/DebuggerPanel.stories.tsx +63 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/debugger/DebuggerPanel.tsx +125 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/debugger/RunSelector.stories.tsx +119 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/debugger/RunSelector.tsx +121 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/debugger/StatisticsPanel.stories.tsx +173 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/debugger/StatisticsPanel.tsx +143 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/AgentStreamingComponent.tsx +39 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/BaseEventComponent.tsx +24 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/CheckpointEventComponent.tsx +106 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/CollapsibleTestScenario.tsx +194 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/ContainerStatusEventComponent.tsx +95 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/CostEventComponent.stories.tsx +119 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/CostEventComponent.tsx +208 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/EvaluationEventComponent.stories.tsx +184 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/EvaluationEventComponent.tsx +114 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/EventRenderer.tsx +95 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/ExecutionEventComponent.stories.tsx +105 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/ExecutionEventComponent.tsx +233 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/ExecutionSummaryEventComponent.stories.tsx +144 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/ExecutionSummaryEventComponent.tsx +253 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/LoadingEventComponent.stories.tsx +50 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/LoadingEventComponent.tsx +42 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/LogCluster.tsx +82 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/LogEventComponent.stories.tsx +127 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/LogEventComponent.tsx +79 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/OutputEventComponent.stories.tsx +112 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/OutputEventComponent.tsx +46 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/TestEventComponent.stories.tsx +185 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/TestEventComponent.tsx +189 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/TestProgressContainer.tsx +262 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/ToolCallEventComponent.tsx +45 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/ValidationEventComponent.stories.tsx +99 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/events/ValidationEventComponent.tsx +48 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/metadata/AgentsSection.tsx +56 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/metadata/EvaluationsSection.tsx +49 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/metadata/MetadataSections.stories.tsx +419 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/metadata/OutputsSection.tsx +49 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/metadata/ParametersSection.tsx +54 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/metadata/SpecificationsSection.tsx +70 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/metadata/StagesSection.tsx +34 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/metadata/ToolsSection.tsx +28 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/scenarios/EvaluateScenarios.stories.tsx +340 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/scenarios/RunScenarios.stories.tsx +312 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/scenarios/TestScenarios.stories.tsx +375 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/scenarios/ValidationScenarios.stories.tsx +178 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/theme-provider.tsx +99 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ui/ai/conversation.tsx +57 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ui/ai/message.tsx +59 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ui/ai/prompt-input.tsx +109 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ui/button.tsx +66 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ui/dialog.tsx +129 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ui/input.tsx +34 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ui/logo.stories.tsx +99 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ui/logo.tsx +579 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ui/menubar.tsx +243 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ui/scroll-area.tsx +55 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ui/separator.tsx +38 -0
- tactus-0.24.0/tactus-ide/frontend/src/components/ui/tabs.tsx +53 -0
- tactus-0.24.0/tactus-ide/frontend/src/hooks/useChatSSE.ts +204 -0
- tactus-0.24.0/tactus-ide/frontend/src/hooks/useEventStream.ts +364 -0
- tactus-0.24.0/tactus-ide/frontend/src/hooks/useTracing.ts +291 -0
- tactus-0.24.0/tactus-ide/frontend/src/index.css +162 -0
- tactus-0.24.0/tactus-ide/frontend/src/lib/utils.ts +15 -0
- tactus-0.24.0/tactus-ide/frontend/src/main.tsx +62 -0
- tactus-0.24.0/tactus-ide/frontend/src/types/events.ts +281 -0
- tactus-0.24.0/tactus-ide/frontend/src/types/metadata.ts +48 -0
- tactus-0.24.0/tactus-ide/frontend/src/types/results.ts +22 -0
- tactus-0.24.0/tactus-ide/frontend/src/types/tracing.ts +82 -0
- tactus-0.24.0/tactus-ide/frontend/src/validation/TactusValidator.ts +262 -0
- tactus-0.24.0/tactus-ide/frontend/src/validation/generated/LuaParser.interp +173 -0
- tactus-0.24.0/tactus-ide/frontend/src/validation/generated/LuaParser.tokens +124 -0
- tactus-0.24.0/tactus-ide/frontend/src/validation/types.ts +115 -0
- tactus-0.24.0/tactus-ide/frontend/src/vite-env.d.ts +21 -0
- tactus-0.24.0/tactus-ide/frontend/tailwind.config.js +81 -0
- tactus-0.24.0/tactus-ide/frontend/tsconfig.json +43 -0
- tactus-0.24.0/tactus-ide/frontend/tsconfig.node.json +22 -0
- tactus-0.24.0/tactus-ide/frontend/vite.config.ts +26 -0
- tactus-0.24.0/tactus-ide/frontend/vitest.shims.d.ts +1 -0
- tactus-0.24.0/tactus-ide/package.json +24 -0
- tactus-0.24.0/tactus-ide/start-dev.sh +78 -0
- tactus-0.24.0/tests/__init__.py +0 -0
- tactus-0.24.0/tests/adapters/__init__.py +0 -0
- tactus-0.24.0/tests/adapters/test_lua_tools_adapter.py +379 -0
- tactus-0.24.0/tests/adapters/test_plugins.py +153 -0
- tactus-0.24.0/tests/cli/__init__.py +3 -0
- tactus-0.24.0/tests/cli/test_cli.py +121 -0
- tactus-0.24.0/tests/cli/test_cli_inputs.py +392 -0
- tactus-0.24.0/tests/conftest.py +235 -0
- tactus-0.24.0/tests/core/__init__.py +0 -0
- tactus-0.24.0/tests/core/test_config_manager.py +251 -0
- tactus-0.24.0/tests/core/test_determinism_safety.py +304 -0
- tactus-0.24.0/tests/core/test_lua_sandbox_security.py +161 -0
- tactus-0.24.0/tests/core/test_runtime_inputs.py +475 -0
- tactus-0.24.0/tests/core/test_script_mode.py +206 -0
- tactus-0.24.0/tests/dspy/__init__.py +1 -0
- tactus-0.24.0/tests/dspy/test_module_parameter.py +142 -0
- tactus-0.24.0/tests/dspy/test_streaming.py +276 -0
- tactus-0.24.0/tests/fixtures/__init__.py +1 -0
- tactus-0.24.0/tests/fixtures/test_mcp_server.py +71 -0
- tactus-0.24.0/tests/integration/test_named_procedures.py +226 -0
- tactus-0.24.0/tests/mocks/__init__.py +7 -0
- tactus-0.24.0/tests/mocks/llm_mocks.py +249 -0
- tactus-0.24.0/tests/primitives/test_checkpoint_primitive.py +48 -0
- tactus-0.24.0/tests/primitives/test_retry_primitive.py +33 -0
- tactus-0.24.0/tests/primitives/test_state_primitive.py +24 -0
- tactus-0.24.0/tests/primitives/test_system_alert.py +73 -0
- tactus-0.24.0/tests/primitives/test_tool_primitive.py +208 -0
- tactus-0.24.0/tests/primitives/test_toolset_dsl.py +83 -0
- tactus-0.24.0/tests/stdlib/__init__.py +1 -0
- tactus-0.24.0/tests/stdlib/test_loader.py +180 -0
- tactus-0.24.0/tests/stdlib/test_require_python.py +228 -0
- tactus-0.24.0/tests/test_checkpoints_integration.py +104 -0
- tactus-0.24.0/tests/test_mcp_integration.py +159 -0
- tactus-0.24.0/tests/test_tracing.py +666 -0
- tactus-0.24.0/tests/testing/__init__.py +1 -0
- tactus-0.24.0/tests/testing/conftest.py +81 -0
- tactus-0.24.0/tests/testing/test_all_examples.py +359 -0
- tactus-0.24.0/tests/testing/test_e2e.py +179 -0
- tactus-0.24.0/tests/testing/test_gherkin_parser.py +115 -0
- tactus-0.24.0/tests/testing/test_integration.py +118 -0
- tactus-0.24.0/tests/testing/test_models.py +161 -0
- tactus-0.24.0/tests/testing/test_runtime_integration.py +254 -0
- tactus-0.24.0/tests/testing/test_step_registry.py +130 -0
- tactus-0.24.0/tests/utils/__init__.py +1 -0
- tactus-0.24.0/tests/utils/test_safe_file_library.py +561 -0
- tactus-0.24.0/tests/validation/__init__.py +1 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# AI Agent Guidelines
|
|
2
|
+
|
|
3
|
+
## Semantic Release & Versioning
|
|
4
|
+
|
|
5
|
+
This project uses **semantic-release** for automated versioning and releases.
|
|
6
|
+
|
|
7
|
+
### Commit Message Format (Conventional Commits)
|
|
8
|
+
|
|
9
|
+
- `feat:` → MINOR version bump (0.1.0 → 0.2.0) - use sparingly
|
|
10
|
+
- `fix:` → PATCH version bump (0.1.0 → 0.1.1)
|
|
11
|
+
- `docs:`, `test:`, `chore:`, `refactor:`, `style:` → No version bump
|
|
12
|
+
|
|
13
|
+
### Important: Version Escalation Awareness
|
|
14
|
+
|
|
15
|
+
**Do NOT use `feat:` for every new feature.** Be conscious of version escalation:
|
|
16
|
+
|
|
17
|
+
- Group related changes into meaningful releases
|
|
18
|
+
- Use `chore:` or `refactor:` for internal improvements that don't add user-facing features
|
|
19
|
+
- Reserve `feat:` for significant new capabilities that warrant a minor version bump
|
|
20
|
+
- Consider if the change truly adds value that users should know about in the changelog
|
|
21
|
+
|
|
22
|
+
### Examples
|
|
23
|
+
|
|
24
|
+
**Good:**
|
|
25
|
+
```
|
|
26
|
+
feat: add AWS Bedrock provider support
|
|
27
|
+
fix: handle missing config file gracefully
|
|
28
|
+
chore: update dependencies
|
|
29
|
+
refactor: simplify error handling logic
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Avoid:**
|
|
33
|
+
```
|
|
34
|
+
feat: add helper function # Use chore:
|
|
35
|
+
feat: improve internal logic # Use refactor:
|
|
36
|
+
feat: add logging statement # Use chore:
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Release Process
|
|
40
|
+
|
|
41
|
+
Releases happen automatically on push to main. The CI runs:
|
|
42
|
+
1. Linting (ruff), formatting (black)
|
|
43
|
+
2. Tests (pytest + behave, excluding integration tests)
|
|
44
|
+
3. Semantic-release (if tests pass)
|
|
45
|
+
4. Publishes to PyPI
|
|
46
|
+
|
|
47
|
+
Monitor with: `gh run watch`
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
name: Desktop Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'desktop-v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
runs-on: ${{ matrix.os }}
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
os: [macos-latest, windows-latest, ubuntu-latest]
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout code
|
|
17
|
+
uses: actions/checkout@v3
|
|
18
|
+
|
|
19
|
+
- name: Setup Node.js
|
|
20
|
+
uses: actions/setup-node@v3
|
|
21
|
+
with:
|
|
22
|
+
node-version: '18'
|
|
23
|
+
|
|
24
|
+
- name: Setup Python
|
|
25
|
+
uses: actions/setup-python@v4
|
|
26
|
+
with:
|
|
27
|
+
python-version: '3.11'
|
|
28
|
+
|
|
29
|
+
- name: Install Python dependencies
|
|
30
|
+
run: |
|
|
31
|
+
python -m pip install --upgrade pip
|
|
32
|
+
pip install pyinstaller
|
|
33
|
+
pip install -e .
|
|
34
|
+
|
|
35
|
+
- name: Install Node dependencies (Desktop)
|
|
36
|
+
working-directory: ./tactus-desktop
|
|
37
|
+
run: npm install
|
|
38
|
+
|
|
39
|
+
- name: Build Frontend
|
|
40
|
+
working-directory: ./tactus-desktop
|
|
41
|
+
run: npm run build:frontend
|
|
42
|
+
|
|
43
|
+
- name: Build Backend
|
|
44
|
+
working-directory: ./tactus-desktop
|
|
45
|
+
run: npm run build:backend
|
|
46
|
+
|
|
47
|
+
- name: Build Electron
|
|
48
|
+
working-directory: ./tactus-desktop
|
|
49
|
+
run: npm run build
|
|
50
|
+
|
|
51
|
+
- name: Package Application (macOS)
|
|
52
|
+
if: matrix.os == 'macos-latest'
|
|
53
|
+
working-directory: ./tactus-desktop
|
|
54
|
+
run: npm run package:mac
|
|
55
|
+
env:
|
|
56
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
57
|
+
|
|
58
|
+
- name: Package Application (Windows)
|
|
59
|
+
if: matrix.os == 'windows-latest'
|
|
60
|
+
working-directory: ./tactus-desktop
|
|
61
|
+
run: npm run package:win
|
|
62
|
+
env:
|
|
63
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
64
|
+
|
|
65
|
+
- name: Package Application (Linux)
|
|
66
|
+
if: matrix.os == 'ubuntu-latest'
|
|
67
|
+
working-directory: ./tactus-desktop
|
|
68
|
+
run: npm run package:linux
|
|
69
|
+
env:
|
|
70
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
71
|
+
|
|
72
|
+
- name: Upload artifacts
|
|
73
|
+
uses: actions/upload-artifact@v3
|
|
74
|
+
with:
|
|
75
|
+
name: ${{ matrix.os }}-build
|
|
76
|
+
path: tactus-desktop/dist-electron/*
|
|
77
|
+
|
|
78
|
+
- name: Release
|
|
79
|
+
uses: softprops/action-gh-release@v1
|
|
80
|
+
with:
|
|
81
|
+
files: tactus-desktop/dist-electron/*
|
|
82
|
+
env:
|
|
83
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
id-token: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
quality-checks:
|
|
14
|
+
name: Quality Checks
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout code
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
fetch-depth: 0
|
|
22
|
+
|
|
23
|
+
- name: Set up Python
|
|
24
|
+
uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: '3.11'
|
|
27
|
+
cache: 'pip'
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: |
|
|
31
|
+
python -m pip install --upgrade pip
|
|
32
|
+
pip install -e ".[dev]"
|
|
33
|
+
|
|
34
|
+
- name: Run ruff linting
|
|
35
|
+
run: ruff check tactus/ tests/ features/steps/
|
|
36
|
+
|
|
37
|
+
- name: Run black formatting check
|
|
38
|
+
run: black --check tactus/ tests/ features/steps/
|
|
39
|
+
|
|
40
|
+
- name: Run pytest tests
|
|
41
|
+
run: pytest tests/ -v --tb=short -m "not integration"
|
|
42
|
+
|
|
43
|
+
- name: Run behave BDD tests
|
|
44
|
+
run: behave
|
|
45
|
+
|
|
46
|
+
release:
|
|
47
|
+
name: Semantic Release
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
needs: quality-checks
|
|
50
|
+
|
|
51
|
+
steps:
|
|
52
|
+
- name: Checkout code
|
|
53
|
+
uses: actions/checkout@v4
|
|
54
|
+
with:
|
|
55
|
+
fetch-depth: 0
|
|
56
|
+
token: ${{ secrets.GH_TOKEN }}
|
|
57
|
+
|
|
58
|
+
- name: Set up Python
|
|
59
|
+
uses: actions/setup-python@v5
|
|
60
|
+
with:
|
|
61
|
+
python-version: '3.11'
|
|
62
|
+
cache: 'pip'
|
|
63
|
+
|
|
64
|
+
- name: Install python-semantic-release
|
|
65
|
+
run: |
|
|
66
|
+
python -m pip install --upgrade pip
|
|
67
|
+
pip install python-semantic-release
|
|
68
|
+
|
|
69
|
+
- name: Python Semantic Release
|
|
70
|
+
env:
|
|
71
|
+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
72
|
+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
|
73
|
+
run: |
|
|
74
|
+
git config user.name "github-actions[bot]"
|
|
75
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
76
|
+
semantic-release version
|
|
77
|
+
semantic-release publish
|
|
78
|
+
|
|
79
|
+
- name: Publish to PyPI
|
|
80
|
+
if: success() && hashFiles('dist/*') != ''
|
|
81
|
+
env:
|
|
82
|
+
TWINE_USERNAME: __token__
|
|
83
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
84
|
+
run: |
|
|
85
|
+
pip install twine
|
|
86
|
+
twine upload --skip-existing dist/*
|
tactus-0.24.0/.gitignore
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.pyc
|
|
4
|
+
*.pyo
|
|
5
|
+
*.pyd
|
|
6
|
+
.Python
|
|
7
|
+
env/
|
|
8
|
+
venv/
|
|
9
|
+
.env
|
|
10
|
+
.venv
|
|
11
|
+
pip-log.txt
|
|
12
|
+
pip-delete-this-directory.txt
|
|
13
|
+
.tox/
|
|
14
|
+
.coverage
|
|
15
|
+
.coverage.*
|
|
16
|
+
.cache
|
|
17
|
+
nosetests.xml
|
|
18
|
+
coverage.xml
|
|
19
|
+
*.cover
|
|
20
|
+
*.log
|
|
21
|
+
.pytest_cache/
|
|
22
|
+
.ruff_cache/
|
|
23
|
+
|
|
24
|
+
# Distribution / packaging
|
|
25
|
+
dist/
|
|
26
|
+
build/
|
|
27
|
+
*.egg-info/
|
|
28
|
+
|
|
29
|
+
# Node / frontend
|
|
30
|
+
node_modules/
|
|
31
|
+
.vite/
|
|
32
|
+
npm-debug.log*
|
|
33
|
+
yarn-debug.log*
|
|
34
|
+
yarn-error.log*
|
|
35
|
+
|
|
36
|
+
# Tactus specific
|
|
37
|
+
.tactus/config.yml
|
|
38
|
+
progress.output
|
|
39
|
+
.tac/
|
|
40
|
+
tmp/
|
|
41
|
+
examples/output/
|
|
42
|
+
|
|
43
|
+
*storybook.log
|
|
44
|
+
storybook-static
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Tactus Configuration File
|
|
2
|
+
# Copy this file to config.yml and add your actual API keys
|
|
3
|
+
|
|
4
|
+
# OpenAI Configuration
|
|
5
|
+
openai_api_key: "your-openai-api-key-here"
|
|
6
|
+
|
|
7
|
+
# AWS Bedrock Configuration
|
|
8
|
+
aws_access_key_id: "your-aws-access-key-id-here"
|
|
9
|
+
aws_secret_access_key: "your-aws-secret-access-key-here"
|
|
10
|
+
aws_region: "us-east-1" # or your preferred region
|
|
11
|
+
|
|
12
|
+
# MCP Servers Configuration
|
|
13
|
+
# Define Model Context Protocol servers that provide tools to your agents
|
|
14
|
+
mcp_servers:
|
|
15
|
+
# Example: Test MCP Server (for testing)
|
|
16
|
+
# test_server:
|
|
17
|
+
# command: "python"
|
|
18
|
+
# args:
|
|
19
|
+
# - "-m"
|
|
20
|
+
# - "tests.fixtures.test_mcp_server"
|
|
21
|
+
|
|
22
|
+
# Example: Plexus MCP Server
|
|
23
|
+
# plexus:
|
|
24
|
+
# command: "python"
|
|
25
|
+
# args:
|
|
26
|
+
# - "-m"
|
|
27
|
+
# - "plexus.mcp"
|
|
28
|
+
# env:
|
|
29
|
+
# PLEXUS_ACCOUNT_KEY: "${PLEXUS_ACCOUNT_KEY}"
|
|
30
|
+
# PLEXUS_API_KEY: "${PLEXUS_API_KEY}"
|
|
31
|
+
|
|
32
|
+
# Example: Filesystem MCP Server
|
|
33
|
+
# filesystem:
|
|
34
|
+
# command: "npx"
|
|
35
|
+
# args:
|
|
36
|
+
# - "-y"
|
|
37
|
+
# - "@modelcontextprotocol/server-filesystem"
|
|
38
|
+
# - "/workspace"
|
|
39
|
+
|
|
40
|
+
# Note: Tools from MCP servers are automatically prefixed with the server name
|
|
41
|
+
# Example: "test_server_add_numbers", "plexus_score_info", "filesystem_read_file"
|
tactus-0.24.0/AGENTS.md
ADDED
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
# Instructions for Coding Agents
|
|
2
|
+
|
|
3
|
+
This document provides guidelines for AI coding agents working on the Tactus project.
|
|
4
|
+
|
|
5
|
+
## Pre-Commit Checklist
|
|
6
|
+
|
|
7
|
+
**CRITICAL**: Before committing any changes, you MUST:
|
|
8
|
+
|
|
9
|
+
1. **Wait for human approval** - DO NOT COMMIT until the human user has tested and approved your changes
|
|
10
|
+
2. **Run the complete test and linting suite**:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# 1. Run unit tests
|
|
14
|
+
pytest tests/ -x -k "not test_real_execution"
|
|
15
|
+
|
|
16
|
+
# 2. Run BDD behavior tests
|
|
17
|
+
behave --summary
|
|
18
|
+
|
|
19
|
+
# 3. Check code style with ruff (no uncommitted code should have ruff errors)
|
|
20
|
+
ruff check .
|
|
21
|
+
|
|
22
|
+
# 4. Format code with black
|
|
23
|
+
black tactus tactus-ide/backend features/steps tests
|
|
24
|
+
|
|
25
|
+
# 5. Verify all checks pass again
|
|
26
|
+
ruff check .
|
|
27
|
+
black tactus tactus-ide/backend features/steps tests --check
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Only commit when:
|
|
31
|
+
- The human user has explicitly approved the changes
|
|
32
|
+
- ALL of the above checks pass
|
|
33
|
+
|
|
34
|
+
Do not skip this step or commit before getting approval and running these checks.
|
|
35
|
+
|
|
36
|
+
## Reference Documentation
|
|
37
|
+
|
|
38
|
+
- **[SPECIFICATION.md](SPECIFICATION.md)**: The official specification for the Tactus domain-specific language. Refer to this document for the definitive guide on DSL syntax, semantics, and behavior.
|
|
39
|
+
- **[IMPLEMENTATION.md](IMPLEMENTATION.md)**: Maps the specification to the actual codebase implementation. Shows where each feature is implemented, what's complete, and what's missing relative to the specification. Use this to understand the current implementation status when working on features.
|
|
40
|
+
|
|
41
|
+
## Multi-Model and Multi-Provider Support
|
|
42
|
+
|
|
43
|
+
**IMPORTANT**: Tactus now supports multiple LLM providers and models:
|
|
44
|
+
|
|
45
|
+
- **Providers**: `openai` and `bedrock` are supported
|
|
46
|
+
- **Provider is REQUIRED**: Every agent must specify `provider:` (either directly or via `default_provider:` at procedure level)
|
|
47
|
+
- **Multiple models**: Different agents can use different models (e.g., GPT-4o, GPT-4o-mini, Claude 3.5 Sonnet)
|
|
48
|
+
- **Model parameters**: Supports model-specific parameters like `temperature`, `max_tokens`, `openai_reasoning_effort`
|
|
49
|
+
|
|
50
|
+
Example:
|
|
51
|
+
```lua
|
|
52
|
+
-- Tool definition
|
|
53
|
+
Tool "done" { use = "tactus.done" }
|
|
54
|
+
|
|
55
|
+
-- OpenAI agent
|
|
56
|
+
Agent "openai_agent" {
|
|
57
|
+
provider = "openai",
|
|
58
|
+
model = {
|
|
59
|
+
name = "gpt-4o",
|
|
60
|
+
temperature = 0.7
|
|
61
|
+
},
|
|
62
|
+
system_prompt = "...",
|
|
63
|
+
toolsets = {"done"}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
-- Bedrock agent
|
|
67
|
+
Agent "bedrock_agent" {
|
|
68
|
+
provider = "bedrock",
|
|
69
|
+
model = "anthropic.claude-3-5-sonnet-20240620-v1:0",
|
|
70
|
+
system_prompt = "...",
|
|
71
|
+
toolsets = {"done"}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Production Readiness
|
|
76
|
+
|
|
77
|
+
**IMPORTANT**: Tactus is **NOT** ready for production. It is in early development (Alpha status).
|
|
78
|
+
|
|
79
|
+
### Do NOT:
|
|
80
|
+
- Declare that Tactus is "ready for production"
|
|
81
|
+
- Claim that features are "production-ready"
|
|
82
|
+
- State that the project is "complete" or "finished"
|
|
83
|
+
- Use phrases like "ready to use in production" or "production-ready"
|
|
84
|
+
|
|
85
|
+
### Do:
|
|
86
|
+
- Focus on testing and verification
|
|
87
|
+
- Run existing tests before declaring changes complete
|
|
88
|
+
- Verify that implementations actually work as intended
|
|
89
|
+
- Acknowledge limitations and incomplete features
|
|
90
|
+
- Suggest improvements and note areas that need work
|
|
91
|
+
|
|
92
|
+
## Semantic Release and Changelog
|
|
93
|
+
|
|
94
|
+
**IMPORTANT**: This project uses Semantic Release to automatically manage versioning and the changelog.
|
|
95
|
+
|
|
96
|
+
- **Do NOT manually edit `CHANGELOG.md`**. It is generated and updated automatically by the release workflow.
|
|
97
|
+
- **Do NOT add `CHANGELOG.md` to `.gitignore`**. It must be tracked in the repository so the release bot can commit updates to it.
|
|
98
|
+
- **Do NOT delete or truncate `CHANGELOG.md`**.
|
|
99
|
+
- Ensure your commit messages follow the [Angular Commit Message Convention](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit) (e.g., `feat: ...`, `fix: ...`, `docs: ...`) so that Semantic Release can correctly generate the changelog.
|
|
100
|
+
|
|
101
|
+
## Commit Message Guidelines
|
|
102
|
+
|
|
103
|
+
When writing commit messages:
|
|
104
|
+
|
|
105
|
+
- **Do NOT use code blocks** (backticks or triple backticks) in commit messages
|
|
106
|
+
- Use plain text with proper formatting (bullet points, indentation)
|
|
107
|
+
- Keep commit subject lines concise (50-72 characters)
|
|
108
|
+
- Use the imperative mood ("fix bug" not "fixed bug")
|
|
109
|
+
- Include detailed explanations in the commit body when necessary
|
|
110
|
+
- Follow the Angular Commit Message Convention for the subject line
|
|
111
|
+
|
|
112
|
+
## Parser Generation Requirements
|
|
113
|
+
|
|
114
|
+
**IMPORTANT**: Tactus uses ANTLR4 to generate parsers from the Lua grammar for both Python and TypeScript.
|
|
115
|
+
|
|
116
|
+
### Requirements for Parser Generation
|
|
117
|
+
|
|
118
|
+
**Docker is REQUIRED** for generating parsers:
|
|
119
|
+
- Parser generation uses ANTLR4 which requires Java
|
|
120
|
+
- We use Docker to avoid requiring Java installation on developer machines
|
|
121
|
+
- Docker image: `eclipse-temurin:17-jre`
|
|
122
|
+
|
|
123
|
+
**When to regenerate parsers:**
|
|
124
|
+
- Only when modifying the Lua grammar files
|
|
125
|
+
- Generated parsers are committed to version control
|
|
126
|
+
- End users don't need Docker or Java
|
|
127
|
+
|
|
128
|
+
**How to regenerate parsers:**
|
|
129
|
+
```bash
|
|
130
|
+
# Ensure Docker is running
|
|
131
|
+
make generate-parsers
|
|
132
|
+
|
|
133
|
+
# Or generate individually:
|
|
134
|
+
make generate-python-parser
|
|
135
|
+
make generate-typescript-parser
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Generated files (committed to repo):**
|
|
139
|
+
- `tactus/validation/generated/*.py` - Python parser
|
|
140
|
+
- `tactus-ide/frontend/src/validation/generated/*.ts` - TypeScript parser
|
|
141
|
+
|
|
142
|
+
## Tactus IDE Development
|
|
143
|
+
|
|
144
|
+
When working on the Tactus IDE:
|
|
145
|
+
|
|
146
|
+
### Architecture: Hybrid Validation
|
|
147
|
+
|
|
148
|
+
The IDE uses a two-layer validation approach for optimal performance and user experience:
|
|
149
|
+
|
|
150
|
+
**Layer 1: TypeScript Parser (Client-Side)**
|
|
151
|
+
- Location: `tactus-ide/frontend/src/validation/`
|
|
152
|
+
- ANTLR-generated from same `LuaLexer.g4` and `LuaParser.g4` grammars as Python parser
|
|
153
|
+
- Purpose: Instant syntax validation (< 10ms)
|
|
154
|
+
- Runs in browser, no backend needed
|
|
155
|
+
- Provides immediate feedback as user types
|
|
156
|
+
- Works offline
|
|
157
|
+
|
|
158
|
+
**Layer 2: Python LSP (Backend)**
|
|
159
|
+
- Location: `tactus-ide/backend/`
|
|
160
|
+
- Uses existing `TactusValidator` from `tactus/validation/`
|
|
161
|
+
- Purpose: Semantic validation and intelligence
|
|
162
|
+
- Debounced (300ms) to reduce load
|
|
163
|
+
- Provides completions, hover, signature help
|
|
164
|
+
- Cross-reference validation
|
|
165
|
+
|
|
166
|
+
### Why Hybrid?
|
|
167
|
+
|
|
168
|
+
1. **Performance**: Syntax errors appear instantly (no network delay)
|
|
169
|
+
2. **Offline**: Basic editing works without backend
|
|
170
|
+
3. **Intelligence**: LSP adds semantic features when available
|
|
171
|
+
4. **Scalability**: Reduces backend load (syntax is client-side)
|
|
172
|
+
5. **User Experience**: No lag, no waiting for validation
|
|
173
|
+
|
|
174
|
+
### Backend (Python LSP Server)
|
|
175
|
+
- Location: `tactus-ide/backend/`
|
|
176
|
+
- Uses existing `TactusValidator` from `tactus/validation/`
|
|
177
|
+
- Implements LSP protocol for language intelligence
|
|
178
|
+
- Flask server provides HTTP and WebSocket endpoints
|
|
179
|
+
- Focus on semantic validation, not syntax (handled client-side)
|
|
180
|
+
|
|
181
|
+
### Frontend (React + Monaco)
|
|
182
|
+
- Location: `tactus-ide/frontend/`
|
|
183
|
+
- Monaco Editor for code editing (same as VS Code)
|
|
184
|
+
- TypeScript parser for instant syntax validation
|
|
185
|
+
- LSP client communicates with Python backend via WebSocket
|
|
186
|
+
- Can be packaged as Electron app
|
|
187
|
+
|
|
188
|
+
### Testing IDE Features
|
|
189
|
+
- TypeScript parser: `cd tactus-ide/frontend && npm test`
|
|
190
|
+
- Backend LSP: `pytest tactus-ide/backend/` (when tests are added)
|
|
191
|
+
- Integration: Test with example `.tac` files
|
|
192
|
+
- Verify both layers work independently and together
|
|
193
|
+
|
|
194
|
+
### Running the IDE
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# Terminal 1: Backend
|
|
198
|
+
cd tactus-ide/backend
|
|
199
|
+
pip install -r requirements.txt
|
|
200
|
+
python app.py
|
|
201
|
+
|
|
202
|
+
# Terminal 2: Frontend
|
|
203
|
+
cd tactus-ide/frontend
|
|
204
|
+
npm install
|
|
205
|
+
npm run dev
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Electron Packaging
|
|
209
|
+
The IDE is designed to run as a desktop application:
|
|
210
|
+
- Backend runs as subprocess or separate service
|
|
211
|
+
- Frontend uses Electron's IPC for file operations
|
|
212
|
+
- No dependency on browser-specific APIs
|
|
213
|
+
- Hybrid validation works in Electron environment
|
|
214
|
+
|
|
215
|
+
### UI/UX Standards
|
|
216
|
+
|
|
217
|
+
When working on the Tactus IDE frontend:
|
|
218
|
+
|
|
219
|
+
- **UI Framework**: Use [Shadcn UI](https://ui.shadcn.com/) components for all UI elements
|
|
220
|
+
- **Icons**: Always use [Lucide React](https://lucide.dev/) icons - **NEVER use emojis**
|
|
221
|
+
- **Styling**: Use Tailwind CSS with the existing design system
|
|
222
|
+
- **Theme**: Support both light and dark modes (colors are defined in CSS variables)
|
|
223
|
+
- **Accessibility**: Ensure proper ARIA labels and keyboard navigation
|
|
224
|
+
|
|
225
|
+
Example icon usage:
|
|
226
|
+
```tsx
|
|
227
|
+
import { Bot, CircleCheck, ChevronDown } from 'lucide-react';
|
|
228
|
+
|
|
229
|
+
<Bot className="h-5 w-5 text-muted-foreground stroke-[2]" />
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### CLI and Logging Standards
|
|
233
|
+
|
|
234
|
+
When working on CLI output, logging, or documentation:
|
|
235
|
+
|
|
236
|
+
- **NEVER use emojis** - Always use Unicode symbols instead
|
|
237
|
+
- **CLI Output**: Use box-drawing characters (│ ─ ├ └), arrows (→ ←), bullets (•), checkmarks (✓ ✗)
|
|
238
|
+
- **Logging**: Use plain text or Unicode symbols for status indicators
|
|
239
|
+
- **Documentation**: Use Unicode symbols or standard markdown formatting
|
|
240
|
+
|
|
241
|
+
Example symbols:
|
|
242
|
+
```python
|
|
243
|
+
# Good - Unicode symbols
|
|
244
|
+
print("✓ Test passed")
|
|
245
|
+
print("✗ Test failed")
|
|
246
|
+
print("→ Processing...")
|
|
247
|
+
print("• Item 1")
|
|
248
|
+
|
|
249
|
+
# Bad - Emojis
|
|
250
|
+
print("✅ Test passed") # ❌ Don't use
|
|
251
|
+
print("🔥 Error") # ❌ Don't use
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## Testing Requirements
|
|
255
|
+
|
|
256
|
+
Before declaring any change complete:
|
|
257
|
+
|
|
258
|
+
1. **Run existing tests**: Use `pytest` to verify no regressions
|
|
259
|
+
2. **Test the specific feature**: Create or update tests for new functionality
|
|
260
|
+
3. **Verify imports**: Ensure all imports resolve correctly
|
|
261
|
+
4. **Check for errors**: Run linters and fix any issues
|
|
262
|
+
5. **Test parser changes**: If grammar modified, run `make test-parsers`
|
|
263
|
+
|
|
264
|
+
### Understanding Testing vs. Evaluation
|
|
265
|
+
|
|
266
|
+
Tactus has two distinct testing mechanisms that serve different purposes:
|
|
267
|
+
|
|
268
|
+
**Behavior Specifications (`specifications`):**
|
|
269
|
+
- Test the **Lua orchestration logic** (control flow, state management, coordination)
|
|
270
|
+
- Use Gherkin syntax (Given/When/Then)
|
|
271
|
+
- Run with `tactus test`
|
|
272
|
+
- Can use mocks to isolate logic from LLM behavior
|
|
273
|
+
- Fast and deterministic
|
|
274
|
+
- Example: Testing that a multi-agent workflow delegates correctly
|
|
275
|
+
|
|
276
|
+
**Evaluations (`evaluations`):**
|
|
277
|
+
- Test the **LLM's output quality** (accuracy, consistency, helpfulness)
|
|
278
|
+
- Use Pydantic AI Evals framework
|
|
279
|
+
- Run with `tactus eval`
|
|
280
|
+
- Use real API calls (not mocked)
|
|
281
|
+
- Slower and probabilistic
|
|
282
|
+
- Example: Testing that an agent generates high-quality greetings
|
|
283
|
+
|
|
284
|
+
**When to use which:**
|
|
285
|
+
- **Complex orchestration** → Use `specifications` to test the logic
|
|
286
|
+
- **Simple LLM wrapper** → Use `evaluations` to test the output
|
|
287
|
+
- **Both** → Use specifications for fast feedback on logic, evaluations for quality metrics
|
|
288
|
+
|
|
289
|
+
**Key principle:** Don't mock LLMs in evaluations—you're testing the model's actual behavior. Do mock them in specifications when you're testing orchestration logic, not intelligence.
|
|
290
|
+
|
|
291
|
+
## Code Quality
|
|
292
|
+
|
|
293
|
+
- Follow existing code patterns and style
|
|
294
|
+
- Add appropriate logging for debugging
|
|
295
|
+
- Include docstrings for public APIs
|
|
296
|
+
- Handle errors gracefully with proper exception types
|
|
297
|
+
- Keep implementations simple and maintainable
|
|
298
|
+
|
|
299
|
+
## Using the CLI for Development
|
|
300
|
+
|
|
301
|
+
The Tactus CLI provides powerful tools for developing and debugging agents.
|
|
302
|
+
|
|
303
|
+
### Running and Debugging Procedures
|
|
304
|
+
|
|
305
|
+
When you run a procedure with `tactus run`, you get real-time visibility into what's happening:
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
tactus run examples/04-basics-simple-agent.tac
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
Output shows:
|
|
312
|
+
- **Agent activity**: See when agents start processing and complete
|
|
313
|
+
- **Tool calls**: See what tools agents call with full arguments and results
|
|
314
|
+
- **Agent responses**: See the actual text/reasoning from the LLM
|
|
315
|
+
- **Cost tracking**: Monitor tokens and costs for each LLM call
|
|
316
|
+
- **Summary**: Final iteration count, tools used, total cost
|
|
317
|
+
|
|
318
|
+
Example output:
|
|
319
|
+
```
|
|
320
|
+
Running procedure: 04-basics-simple-agent.tac (lua format)
|
|
321
|
+
|
|
322
|
+
→ Agent greeter: Waiting for response...
|
|
323
|
+
Hello! I'll help you with that task.
|
|
324
|
+
✓ Agent greeter: Completed 1204ms
|
|
325
|
+
→ Tool done
|
|
326
|
+
Args: {
|
|
327
|
+
"reason": "Hello there! I hope you're having a wonderful day."
|
|
328
|
+
}
|
|
329
|
+
Result: Done
|
|
330
|
+
$ Cost greeter: $0.001267 (354 tokens, openai:gpt-4o, 1204ms)
|
|
331
|
+
|
|
332
|
+
✓ Procedure completed: 1 iterations, 1 tools used
|
|
333
|
+
|
|
334
|
+
$ Cost Summary
|
|
335
|
+
Total Cost: $0.001267
|
|
336
|
+
Total Tokens: 354
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
### Inspecting Procedure Structure
|
|
340
|
+
|
|
341
|
+
Use `tactus info` to view procedure metadata without running it:
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
tactus info examples/04-basics-simple-agent.tac
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
This shows:
|
|
348
|
+
- **Parameters**: What inputs the procedure expects
|
|
349
|
+
- **Outputs**: What results it returns
|
|
350
|
+
- **Agents**: Configuration for each agent (provider, model, tools, prompt preview)
|
|
351
|
+
- **Specifications**: Count of BDD test scenarios
|
|
352
|
+
|
|
353
|
+
This is useful for:
|
|
354
|
+
- Understanding what a procedure does before running it
|
|
355
|
+
- Checking agent configurations
|
|
356
|
+
- Verifying tool availability
|
|
357
|
+
- Documentation and code review
|
|
358
|
+
|
|
359
|
+
### Debugging Agent Issues
|
|
360
|
+
|
|
361
|
+
If an agent doesn't work as expected, the CLI output helps you diagnose:
|
|
362
|
+
|
|
363
|
+
1. **Agent never calls done tool**: Look for tool call events (→ Tool). If you don't see any, check:
|
|
364
|
+
- Does the agent definition include `tools = {"done"}`?
|
|
365
|
+
- Does the system prompt mention calling the done tool?
|
|
366
|
+
|
|
367
|
+
2. **Agent calls wrong tool**: Tool call events show arguments. Check:
|
|
368
|
+
- Are tool names correct in the agent config?
|
|
369
|
+
- Does the system prompt clearly explain which tools to use?
|
|
370
|
+
|
|
371
|
+
3. **High costs/token usage**: Cost events show per-call breakdown. Look for:
|
|
372
|
+
- Agents making too many turns (increase max_turns or improve prompts)
|
|
373
|
+
- Large context windows (check message history filtering)
|
|
374
|
+
- Repeated tool calls (agent might be stuck in a loop)
|
|
375
|
+
|
|
376
|
+
4. **Slow execution**: Timing information shows where delays occur:
|
|
377
|
+
- Agent turns show duration (e.g., "1204ms")
|
|
378
|
+
- Multiple slow turns indicate LLM performance issues
|
|
379
|
+
- Consider using faster models for simple tasks
|
|
380
|
+
|
|
381
|
+
### CLI Output Format
|
|
382
|
+
|
|
383
|
+
The CLI uses Unicode symbols (not emojis) for compatibility:
|
|
384
|
+
|
|
385
|
+
- `→` Agent or tool activity starting
|
|
386
|
+
- `✓` Successful completion
|
|
387
|
+
- `✗` Error or failure
|
|
388
|
+
- `$` Cost information
|
|
389
|
+
- `•` List items
|
|
390
|
+
|
|
391
|
+
All output is plain text with optional ANSI colors for readability in terminals.
|
|
392
|
+
|
|
393
|
+
## Project Status
|
|
394
|
+
|
|
395
|
+
Tactus is a standalone workflow engine extracted from a larger project. It is:
|
|
396
|
+
- In active development
|
|
397
|
+
- Missing some features (noted in code with TODO comments)
|
|
398
|
+
- Subject to API changes
|
|
399
|
+
- Not yet suitable for production use
|
|
400
|
+
|
|
401
|
+
When working on Tactus, focus on:
|
|
402
|
+
- Making incremental improvements
|
|
403
|
+
- Fixing bugs and issues
|
|
404
|
+
- Adding missing functionality
|
|
405
|
+
- Improving documentation
|
|
406
|
+
- Writing and maintaining tests
|