zymi-core 0.1.1__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.
- zymi_core-0.1.1/.github/workflows/ci.yml +59 -0
- zymi_core-0.1.1/.github/workflows/release.yml +101 -0
- zymi_core-0.1.1/.gitignore +28 -0
- zymi_core-0.1.1/Cargo.lock +2594 -0
- zymi_core-0.1.1/Cargo.toml +57 -0
- zymi_core-0.1.1/LICENSE +21 -0
- zymi_core-0.1.1/PKG-INFO +276 -0
- zymi_core-0.1.1/README.md +250 -0
- zymi_core-0.1.1/adr/0001-rust-core-extraction.md +26 -0
- zymi_core-0.1.1/adr/0002-yaml-config-layer.md +31 -0
- zymi_core-0.1.1/adr/0003-dag-execution-plan.md +27 -0
- zymi_core-0.1.1/adr/0004-llm-provider-architecture.md +30 -0
- zymi_core-0.1.1/adr/0005-python-as-event-driven-components.md +40 -0
- zymi_core-0.1.1/adr/0006-pyo3-bridge-design.md +43 -0
- zymi_core-0.1.1/adr/0007-python-tool-decorator.md +61 -0
- zymi_core-0.1.1/adr/0008-cli-architecture.md +58 -0
- zymi_core-0.1.1/adr/0009-webhook-approval-handler.md +64 -0
- zymi_core-0.1.1/adr/0010-services-layer.md +72 -0
- zymi_core-0.1.1/adr/0011-pipeline-execution-engine.md +33 -0
- zymi_core-0.1.1/pyproject.toml +39 -0
- zymi_core-0.1.1/src/approval.rs +162 -0
- zymi_core-0.1.1/src/bin/zymi.rs +3 -0
- zymi_core-0.1.1/src/cli/events.rs +121 -0
- zymi_core-0.1.1/src/cli/init.rs +291 -0
- zymi_core-0.1.1/src/cli/mod.rs +165 -0
- zymi_core-0.1.1/src/cli/replay.rs +135 -0
- zymi_core-0.1.1/src/cli/run.rs +75 -0
- zymi_core-0.1.1/src/cli/verify.rs +74 -0
- zymi_core-0.1.1/src/config/agent.rs +127 -0
- zymi_core-0.1.1/src/config/dag.rs +296 -0
- zymi_core-0.1.1/src/config/error.rs +116 -0
- zymi_core-0.1.1/src/config/mod.rs +243 -0
- zymi_core-0.1.1/src/config/pipeline.rs +171 -0
- zymi_core-0.1.1/src/config/project.rs +250 -0
- zymi_core-0.1.1/src/config/template.rs +149 -0
- zymi_core-0.1.1/src/config/validate.rs +335 -0
- zymi_core-0.1.1/src/engine/mod.rs +651 -0
- zymi_core-0.1.1/src/engine/tools.rs +334 -0
- zymi_core-0.1.1/src/esaa/contracts.rs +299 -0
- zymi_core-0.1.1/src/esaa/mod.rs +119 -0
- zymi_core-0.1.1/src/esaa/orchestrator.rs +311 -0
- zymi_core-0.1.1/src/esaa/projections.rs +262 -0
- zymi_core-0.1.1/src/events/bus.rs +265 -0
- zymi_core-0.1.1/src/events/connector.rs +274 -0
- zymi_core-0.1.1/src/events/mod.rs +238 -0
- zymi_core-0.1.1/src/events/store.rs +766 -0
- zymi_core-0.1.1/src/events/stream_registry.rs +99 -0
- zymi_core-0.1.1/src/lib.rs +49 -0
- zymi_core-0.1.1/src/llm/anthropic.rs +447 -0
- zymi_core-0.1.1/src/llm/error.rs +16 -0
- zymi_core-0.1.1/src/llm/mod.rs +184 -0
- zymi_core-0.1.1/src/llm/openai.rs +520 -0
- zymi_core-0.1.1/src/policy.rs +1364 -0
- zymi_core-0.1.1/src/python/bus.rs +138 -0
- zymi_core-0.1.1/src/python/event.rs +193 -0
- zymi_core-0.1.1/src/python/mod.rs +46 -0
- zymi_core-0.1.1/src/python/store.rs +104 -0
- zymi_core-0.1.1/src/python/tool.rs +651 -0
- zymi_core-0.1.1/src/services/langfuse.rs +727 -0
- zymi_core-0.1.1/src/services/mod.rs +290 -0
- zymi_core-0.1.1/src/types.rs +121 -0
- zymi_core-0.1.1/src/webhook.rs +397 -0
- zymi_core-0.1.1/zymi_core/__init__.py +20 -0
- zymi_core-0.1.1/zymi_core/_cli.py +13 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
env:
|
|
9
|
+
CARGO_TERM_COLOR: always
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
rust:
|
|
13
|
+
name: Rust (test + clippy)
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v5
|
|
17
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
18
|
+
with:
|
|
19
|
+
components: clippy
|
|
20
|
+
- uses: Swatinem/rust-cache@v2
|
|
21
|
+
- run: cargo test --features services,webhook
|
|
22
|
+
- run: cargo clippy --all-features -- -D warnings
|
|
23
|
+
|
|
24
|
+
python-smoke:
|
|
25
|
+
name: Python ${{ matrix.python }} smoke
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
strategy:
|
|
28
|
+
matrix:
|
|
29
|
+
python: ["3.9", "3.11", "3.13"]
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v5
|
|
32
|
+
- uses: actions/setup-python@v5
|
|
33
|
+
with:
|
|
34
|
+
python-version: ${{ matrix.python }}
|
|
35
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
36
|
+
- uses: Swatinem/rust-cache@v2
|
|
37
|
+
- run: pip install maturin
|
|
38
|
+
- run: maturin build --out dist
|
|
39
|
+
- run: pip install dist/*.whl
|
|
40
|
+
- name: Smoke test
|
|
41
|
+
working-directory: /tmp
|
|
42
|
+
run: |
|
|
43
|
+
python -c "
|
|
44
|
+
from zymi_core import Event, EventStore, EventBus, ToolRegistry
|
|
45
|
+
import tempfile, os
|
|
46
|
+
db = os.path.join(tempfile.mkdtemp(), 'test.db')
|
|
47
|
+
store = EventStore(db)
|
|
48
|
+
bus = EventBus(store)
|
|
49
|
+
sub = bus.subscribe()
|
|
50
|
+
event = Event(
|
|
51
|
+
stream_id='ci-test',
|
|
52
|
+
kind={'type': 'UserMessageReceived', 'data': {'content': {'User': 'hello'}, 'connector': 'ci'}},
|
|
53
|
+
source='ci',
|
|
54
|
+
)
|
|
55
|
+
bus.publish(event)
|
|
56
|
+
received = sub.try_recv()
|
|
57
|
+
assert received.kind_tag == 'user_message_received'
|
|
58
|
+
print('smoke test OK')
|
|
59
|
+
"
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
name: Build wheels (${{ matrix.os }} ${{ matrix.target }})
|
|
13
|
+
runs-on: ${{ matrix.os }}
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
include:
|
|
18
|
+
# Linux x86_64
|
|
19
|
+
- os: ubuntu-latest
|
|
20
|
+
target: x86_64
|
|
21
|
+
# Linux aarch64 (Docker/QEMU — need explicit -i)
|
|
22
|
+
- os: ubuntu-latest
|
|
23
|
+
target: aarch64
|
|
24
|
+
args-extra: -i python3.11
|
|
25
|
+
# macOS x86_64 (Intel, cross-compiled on Apple Silicon)
|
|
26
|
+
- os: macos-14
|
|
27
|
+
target: x86_64
|
|
28
|
+
# macOS arm64 (Apple Silicon)
|
|
29
|
+
- os: macos-14
|
|
30
|
+
target: aarch64
|
|
31
|
+
# Windows x86_64
|
|
32
|
+
- os: windows-latest
|
|
33
|
+
target: x86_64
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/checkout@v5
|
|
36
|
+
- uses: actions/setup-python@v5
|
|
37
|
+
with:
|
|
38
|
+
python-version: "3.11"
|
|
39
|
+
- name: Build wheels
|
|
40
|
+
uses: PyO3/maturin-action@v1
|
|
41
|
+
with:
|
|
42
|
+
target: ${{ matrix.target }}
|
|
43
|
+
args: --release --out dist ${{ matrix.args-extra }}
|
|
44
|
+
manylinux: auto
|
|
45
|
+
before-script-linux: |
|
|
46
|
+
export CFLAGS_aarch64_unknown_linux_gnu="-march=armv8-a -D__ARM_ARCH=8"
|
|
47
|
+
- uses: actions/upload-artifact@v5
|
|
48
|
+
with:
|
|
49
|
+
name: wheels-${{ matrix.os }}-${{ matrix.target }}-${{ strategy.job-index }}
|
|
50
|
+
path: dist/*.whl
|
|
51
|
+
|
|
52
|
+
sdist:
|
|
53
|
+
name: Build sdist
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
steps:
|
|
56
|
+
- uses: actions/checkout@v5
|
|
57
|
+
- name: Build sdist
|
|
58
|
+
uses: PyO3/maturin-action@v1
|
|
59
|
+
with:
|
|
60
|
+
command: sdist
|
|
61
|
+
args: --out dist
|
|
62
|
+
- uses: actions/upload-artifact@v5
|
|
63
|
+
with:
|
|
64
|
+
name: wheels-sdist
|
|
65
|
+
path: dist/*.tar.gz
|
|
66
|
+
|
|
67
|
+
publish-testpypi:
|
|
68
|
+
name: Publish to TestPyPI
|
|
69
|
+
needs: [build, sdist]
|
|
70
|
+
runs-on: ubuntu-latest
|
|
71
|
+
environment: testpypi
|
|
72
|
+
permissions:
|
|
73
|
+
id-token: write
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/download-artifact@v5
|
|
76
|
+
with:
|
|
77
|
+
pattern: wheels-*
|
|
78
|
+
merge-multiple: true
|
|
79
|
+
path: dist/
|
|
80
|
+
- name: List dist
|
|
81
|
+
run: ls -lh dist/
|
|
82
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
83
|
+
with:
|
|
84
|
+
repository-url: https://test.pypi.org/legacy/
|
|
85
|
+
|
|
86
|
+
publish:
|
|
87
|
+
name: Publish to PyPI
|
|
88
|
+
needs: [publish-testpypi]
|
|
89
|
+
runs-on: ubuntu-latest
|
|
90
|
+
environment: pypi
|
|
91
|
+
permissions:
|
|
92
|
+
id-token: write
|
|
93
|
+
steps:
|
|
94
|
+
- uses: actions/download-artifact@v5
|
|
95
|
+
with:
|
|
96
|
+
pattern: wheels-*
|
|
97
|
+
merge-multiple: true
|
|
98
|
+
path: dist/
|
|
99
|
+
- name: List dist
|
|
100
|
+
run: ls -lh dist/
|
|
101
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/target
|
|
2
|
+
/dist
|
|
3
|
+
*.swp
|
|
4
|
+
*.swo
|
|
5
|
+
.DS_Store
|
|
6
|
+
|
|
7
|
+
# IDE
|
|
8
|
+
.idea/
|
|
9
|
+
.vscode/
|
|
10
|
+
*.iml
|
|
11
|
+
|
|
12
|
+
# Python
|
|
13
|
+
.venv/
|
|
14
|
+
__pycache__/
|
|
15
|
+
*.pyc
|
|
16
|
+
*.pyo
|
|
17
|
+
*.egg-info/
|
|
18
|
+
*.so
|
|
19
|
+
*.pyd
|
|
20
|
+
*.dylib
|
|
21
|
+
*.dSYM/
|
|
22
|
+
|
|
23
|
+
# Project-local
|
|
24
|
+
/.drift
|
|
25
|
+
/.claude
|
|
26
|
+
CLAUDE.md
|
|
27
|
+
AGENTS.md
|
|
28
|
+
TESTING.md
|