tactus 0.1.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.1.0/.claude/settings.local.json +32 -0
- tactus-0.1.0/.github/workflows/release.yml +77 -0
- tactus-0.1.0/.gitignore +31 -0
- tactus-0.1.0/AGENTS.md +86 -0
- tactus-0.1.0/CHANGELOG.md +11 -0
- tactus-0.1.0/IMPLEMENTATION.md +727 -0
- tactus-0.1.0/LICENSE +21 -0
- tactus-0.1.0/PKG-INFO +294 -0
- tactus-0.1.0/README.md +253 -0
- tactus-0.1.0/SPECIFICATION.md +1852 -0
- tactus-0.1.0/behave.ini +29 -0
- tactus-0.1.0/examples/.tactus/config.yml.example +2 -0
- tactus-0.1.0/examples/README.md +98 -0
- tactus-0.1.0/examples/hello-world.tyml +47 -0
- tactus-0.1.0/examples/multi-model.tyml +56 -0
- tactus-0.1.0/examples/simple-agent.tyml +51 -0
- tactus-0.1.0/examples/state-management.tyml +49 -0
- tactus-0.1.0/examples/with-parameters.tyml +49 -0
- tactus-0.1.0/features/01_state_management.feature +43 -0
- tactus-0.1.0/features/02_checkpointing.feature +37 -0
- tactus-0.1.0/features/03_human_in_the_loop.feature +50 -0
- tactus-0.1.0/features/04_control_flow.feature +39 -0
- tactus-0.1.0/features/05_tool_integration.feature +43 -0
- tactus-0.1.0/features/06_retry_logic.feature +44 -0
- tactus-0.1.0/features/07_file_operations.feature +65 -0
- tactus-0.1.0/features/08_agent_primitives.feature +66 -0
- tactus-0.1.0/features/09_workflow_execution.feature +109 -0
- tactus-0.1.0/features/10_lua_integration.feature +104 -0
- tactus-0.1.0/features/11_storage_backends.feature +62 -0
- tactus-0.1.0/features/12_json_operations.feature +95 -0
- tactus-0.1.0/features/13_logging.feature +68 -0
- tactus-0.1.0/features/14_stage_and_step_tracking.feature +73 -0
- tactus-0.1.0/features/15_procedure_calls.feature +79 -0
- tactus-0.1.0/features/16_session_management.feature +85 -0
- tactus-0.1.0/features/environment.py +78 -0
- tactus-0.1.0/features/steps/agent_primitives_steps.py +387 -0
- tactus-0.1.0/features/steps/checkpointing_steps.py +161 -0
- tactus-0.1.0/features/steps/control_flow_steps.py +130 -0
- tactus-0.1.0/features/steps/file_operations_steps.py +210 -0
- tactus-0.1.0/features/steps/human_in_the_loop_steps.py +313 -0
- tactus-0.1.0/features/steps/json_operations_steps.py +255 -0
- tactus-0.1.0/features/steps/logging_steps.py +263 -0
- tactus-0.1.0/features/steps/lua_integration_steps.py +188 -0
- tactus-0.1.0/features/steps/procedure_calls_steps.py +289 -0
- tactus-0.1.0/features/steps/retry_logic_steps.py +249 -0
- tactus-0.1.0/features/steps/session_management_steps.py +302 -0
- tactus-0.1.0/features/steps/stage_tracking_steps.py +270 -0
- tactus-0.1.0/features/steps/state_management_steps.py +136 -0
- tactus-0.1.0/features/steps/storage_backend_steps.py +343 -0
- tactus-0.1.0/features/steps/support/__init__.py +19 -0
- tactus-0.1.0/features/steps/support/harnesses.py +517 -0
- tactus-0.1.0/features/steps/tool_integration_steps.py +184 -0
- tactus-0.1.0/features/steps/workflow_execution_steps.py +440 -0
- tactus-0.1.0/pyproject.toml +97 -0
- tactus-0.1.0/tactus/__init__.py +49 -0
- tactus-0.1.0/tactus/adapters/__init__.py +9 -0
- tactus-0.1.0/tactus/adapters/cli_hitl.py +189 -0
- tactus-0.1.0/tactus/adapters/file_storage.py +202 -0
- tactus-0.1.0/tactus/adapters/mcp.py +289 -0
- tactus-0.1.0/tactus/adapters/memory.py +119 -0
- tactus-0.1.0/tactus/cli/__init__.py +7 -0
- tactus-0.1.0/tactus/cli/app.py +338 -0
- tactus-0.1.0/tactus/cli/commands/__init__.py +0 -0
- tactus-0.1.0/tactus/core/__init__.py +32 -0
- tactus-0.1.0/tactus/core/exceptions.py +66 -0
- tactus-0.1.0/tactus/core/execution_context.py +225 -0
- tactus-0.1.0/tactus/core/lua_sandbox.py +276 -0
- tactus-0.1.0/tactus/core/output_validator.py +198 -0
- tactus-0.1.0/tactus/core/runtime.py +754 -0
- tactus-0.1.0/tactus/core/yaml_parser.py +301 -0
- tactus-0.1.0/tactus/primitives/__init__.py +41 -0
- tactus-0.1.0/tactus/primitives/agent.py +335 -0
- tactus-0.1.0/tactus/primitives/control.py +168 -0
- tactus-0.1.0/tactus/primitives/file.py +195 -0
- tactus-0.1.0/tactus/primitives/human.py +342 -0
- tactus-0.1.0/tactus/primitives/json.py +189 -0
- tactus-0.1.0/tactus/primitives/log.py +117 -0
- tactus-0.1.0/tactus/primitives/retry.py +155 -0
- tactus-0.1.0/tactus/primitives/stage.py +202 -0
- tactus-0.1.0/tactus/primitives/state.py +133 -0
- tactus-0.1.0/tactus/primitives/step.py +132 -0
- tactus-0.1.0/tactus/primitives/tool.py +163 -0
- tactus-0.1.0/tactus/protocols/__init__.py +38 -0
- tactus-0.1.0/tactus/protocols/chat_recorder.py +81 -0
- tactus-0.1.0/tactus/protocols/config.py +102 -0
- tactus-0.1.0/tactus/protocols/hitl.py +71 -0
- tactus-0.1.0/tactus/protocols/models.py +96 -0
- tactus-0.1.0/tactus/protocols/storage.py +151 -0
- tactus-0.1.0/tactus/providers/__init__.py +12 -0
- tactus-0.1.0/tactus/providers/base.py +92 -0
- tactus-0.1.0/tactus/providers/bedrock.py +116 -0
- tactus-0.1.0/tactus/providers/openai.py +98 -0
- tactus-0.1.0/tactus/utils/__init__.py +0 -0
- tactus-0.1.0/tests/__init__.py +0 -0
- tactus-0.1.0/tests/adapters/__init__.py +0 -0
- tactus-0.1.0/tests/cli/__init__.py +3 -0
- tactus-0.1.0/tests/cli/test_cli.py +116 -0
- tactus-0.1.0/tests/conftest.py +65 -0
- tactus-0.1.0/tests/core/__init__.py +0 -0
- tactus-0.1.0/tests/integration/__init__.py +0 -0
- tactus-0.1.0/tests/integration/conftest.py +65 -0
- tactus-0.1.0/tests/integration/test_bedrock_provider.py +236 -0
- tactus-0.1.0/tests/integration/test_examples.py +319 -0
- tactus-0.1.0/tests/integration/test_model_settings.py +205 -0
- tactus-0.1.0/tests/integration/test_multi_model_openai.py +498 -0
- tactus-0.1.0/tests/integration/test_multi_provider.py +267 -0
- tactus-0.1.0/tests/mocks/__init__.py +7 -0
- tactus-0.1.0/tests/mocks/llm_mocks.py +251 -0
- tactus-0.1.0/tests/primitives/test_retry_primitive.py +33 -0
- tactus-0.1.0/tests/primitives/test_state_primitive.py +24 -0
- tactus-0.1.0/tests/primitives/test_tool_primitive.py +12 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(gh repo view:*)",
|
|
5
|
+
"Bash(python:*)",
|
|
6
|
+
"Bash(pip install:*)",
|
|
7
|
+
"Bash(/opt/anaconda3/envs/tactus/bin/python3.11 -m pip install:*)",
|
|
8
|
+
"Bash(/opt/anaconda3/envs/tactus/bin/semantic-release --version)",
|
|
9
|
+
"Bash(/opt/anaconda3/envs/tactus/bin/semantic-release version --no-push --no-tag --no-commit)",
|
|
10
|
+
"Bash(/opt/anaconda3/envs/tactus/bin/ruff check tactus/ tests/ features/steps/)",
|
|
11
|
+
"Bash(/opt/anaconda3/envs/tactus/bin/black --check tactus/ tests/ features/steps/)",
|
|
12
|
+
"Bash(/opt/anaconda3/envs/tactus/bin/ruff check --fix tactus/ tests/ features/steps/)",
|
|
13
|
+
"Bash(/opt/anaconda3/envs/tactus/bin/black tactus/ tests/ features/steps/)",
|
|
14
|
+
"Bash(git checkout:*)",
|
|
15
|
+
"Bash(git add:*)",
|
|
16
|
+
"Bash(git commit:*)",
|
|
17
|
+
"Bash(gh auth status:*)",
|
|
18
|
+
"Bash(git push:*)",
|
|
19
|
+
"Bash(gh pr create:*)",
|
|
20
|
+
"Bash(gh run list:*)",
|
|
21
|
+
"Bash(/opt/anaconda3/envs/tactus/bin/ruff check:*)",
|
|
22
|
+
"Bash(gh pr merge:*)",
|
|
23
|
+
"Bash(gh run watch:*)",
|
|
24
|
+
"Bash(gh run view:*)",
|
|
25
|
+
"Bash(git pull:*)",
|
|
26
|
+
"Bash(/opt/anaconda3/envs/tactus/bin/black:*)",
|
|
27
|
+
"Bash(gh release:*)",
|
|
28
|
+
"Bash(curl -s https://pypi.org/pypi/tactus/json)",
|
|
29
|
+
"Bash(python3 -c \"import json, sys; data = json.load(sys.stdin); print(fLatest version on PyPI: {data[''''info''''][''''version'''']}\\nRelease date: {list(data[''''releases''''].keys())[-1] if data[''''releases''''] else ''''No releases''''})\")"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
tactus-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
# Tactus specific
|
|
30
|
+
.tactus/config.yml
|
|
31
|
+
progress.output
|
tactus-0.1.0/AGENTS.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Instructions for Coding Agents
|
|
2
|
+
|
|
3
|
+
This document provides guidelines for AI coding agents working on the Tactus project.
|
|
4
|
+
|
|
5
|
+
## Reference Documentation
|
|
6
|
+
|
|
7
|
+
- **[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.
|
|
8
|
+
- **[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.
|
|
9
|
+
|
|
10
|
+
## Multi-Model and Multi-Provider Support
|
|
11
|
+
|
|
12
|
+
**IMPORTANT**: Tactus now supports multiple LLM providers and models:
|
|
13
|
+
|
|
14
|
+
- **Providers**: `openai` and `bedrock` are supported
|
|
15
|
+
- **Provider is REQUIRED**: Every agent must specify `provider:` (either directly or via `default_provider:` at procedure level)
|
|
16
|
+
- **Multiple models**: Different agents can use different models (e.g., GPT-4o, GPT-4o-mini, Claude 3.5 Sonnet)
|
|
17
|
+
- **Model parameters**: Supports model-specific parameters like `temperature`, `max_tokens`, `openai_reasoning_effort`
|
|
18
|
+
|
|
19
|
+
Example:
|
|
20
|
+
```yaml
|
|
21
|
+
agents:
|
|
22
|
+
openai_agent:
|
|
23
|
+
provider: openai
|
|
24
|
+
model:
|
|
25
|
+
name: gpt-4o
|
|
26
|
+
temperature: 0.7
|
|
27
|
+
system_prompt: "..."
|
|
28
|
+
tools: [done]
|
|
29
|
+
|
|
30
|
+
bedrock_agent:
|
|
31
|
+
provider: bedrock
|
|
32
|
+
model: anthropic.claude-3-5-sonnet-20240620-v1:0
|
|
33
|
+
system_prompt: "..."
|
|
34
|
+
tools: [done]
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Production Readiness
|
|
38
|
+
|
|
39
|
+
**IMPORTANT**: Tactus is **NOT** ready for production. It is in early development (Alpha status).
|
|
40
|
+
|
|
41
|
+
### Do NOT:
|
|
42
|
+
- Declare that Tactus is "ready for production"
|
|
43
|
+
- Claim that features are "production-ready"
|
|
44
|
+
- State that the project is "complete" or "finished"
|
|
45
|
+
- Use phrases like "ready to use in production" or "production-ready"
|
|
46
|
+
|
|
47
|
+
### Do:
|
|
48
|
+
- Focus on testing and verification
|
|
49
|
+
- Run existing tests before declaring changes complete
|
|
50
|
+
- Verify that implementations actually work as intended
|
|
51
|
+
- Acknowledge limitations and incomplete features
|
|
52
|
+
- Suggest improvements and note areas that need work
|
|
53
|
+
|
|
54
|
+
## Testing Requirements
|
|
55
|
+
|
|
56
|
+
Before declaring any change complete:
|
|
57
|
+
|
|
58
|
+
1. **Run existing tests**: Use `pytest` to verify no regressions
|
|
59
|
+
2. **Test the specific feature**: Create or update tests for new functionality
|
|
60
|
+
3. **Verify imports**: Ensure all imports resolve correctly
|
|
61
|
+
4. **Check for errors**: Run linters and fix any issues
|
|
62
|
+
|
|
63
|
+
## Code Quality
|
|
64
|
+
|
|
65
|
+
- Follow existing code patterns and style
|
|
66
|
+
- Add appropriate logging for debugging
|
|
67
|
+
- Include docstrings for public APIs
|
|
68
|
+
- Handle errors gracefully with proper exception types
|
|
69
|
+
- Keep implementations simple and maintainable
|
|
70
|
+
|
|
71
|
+
## Project Status
|
|
72
|
+
|
|
73
|
+
Tactus is a standalone workflow engine extracted from a larger project. It is:
|
|
74
|
+
- In active development
|
|
75
|
+
- Missing some features (noted in code with TODO comments)
|
|
76
|
+
- Subject to API changes
|
|
77
|
+
- Not yet suitable for production use
|
|
78
|
+
|
|
79
|
+
When working on Tactus, focus on:
|
|
80
|
+
- Making incremental improvements
|
|
81
|
+
- Fixing bugs and issues
|
|
82
|
+
- Adding missing functionality
|
|
83
|
+
- Improving documentation
|
|
84
|
+
- Writing and maintaining tests
|
|
85
|
+
|
|
86
|
+
|