akgentic-team 1.3.5__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.
- akgentic_team-1.3.5/.env.example +21 -0
- akgentic_team-1.3.5/.github/workflows/ci.yml +97 -0
- akgentic_team-1.3.5/.github/workflows/release.yml +69 -0
- akgentic_team-1.3.5/.gitignore +27 -0
- akgentic_team-1.3.5/LICENSE +661 -0
- akgentic_team-1.3.5/PKG-INFO +535 -0
- akgentic_team-1.3.5/README.md +497 -0
- akgentic_team-1.3.5/examples/01-team-definition.md +48 -0
- akgentic_team-1.3.5/examples/01_team_definition.py +154 -0
- akgentic_team-1.3.5/examples/02-team-factory.md +58 -0
- akgentic_team-1.3.5/examples/02_team_factory.py +142 -0
- akgentic_team-1.3.5/examples/03-team-manager-lifecycle.md +87 -0
- akgentic_team-1.3.5/examples/03_team_manager_lifecycle.py +314 -0
- akgentic_team-1.3.5/examples/04-event-sourcing.md +109 -0
- akgentic_team-1.3.5/examples/04_event_sourcing.py +382 -0
- akgentic_team-1.3.5/examples/05-crash-recovery.md +116 -0
- akgentic_team-1.3.5/examples/05_crash_recovery.py +468 -0
- akgentic_team-1.3.5/examples/06-mongo-backend.md +113 -0
- akgentic_team-1.3.5/examples/06_mongo_backend.py +331 -0
- akgentic_team-1.3.5/examples/README.md +134 -0
- akgentic_team-1.3.5/pyproject.toml +90 -0
- akgentic_team-1.3.5/src/akgentic/__init__.py +1 -0
- akgentic_team-1.3.5/src/akgentic/team/__init__.py +59 -0
- akgentic_team-1.3.5/src/akgentic/team/cli/README.md +206 -0
- akgentic_team-1.3.5/src/akgentic/team/cli/__init__.py +20 -0
- akgentic_team-1.3.5/src/akgentic/team/cli/_output.py +210 -0
- akgentic_team-1.3.5/src/akgentic/team/cli/main.py +422 -0
- akgentic_team-1.3.5/src/akgentic/team/factory.py +228 -0
- akgentic_team-1.3.5/src/akgentic/team/manager.py +341 -0
- akgentic_team-1.3.5/src/akgentic/team/models.py +452 -0
- akgentic_team-1.3.5/src/akgentic/team/ports.py +197 -0
- akgentic_team-1.3.5/src/akgentic/team/py.typed +0 -0
- akgentic_team-1.3.5/src/akgentic/team/repositories/__init__.py +16 -0
- akgentic_team-1.3.5/src/akgentic/team/repositories/mongo.py +378 -0
- akgentic_team-1.3.5/src/akgentic/team/repositories/postgres/__init__.py +90 -0
- akgentic_team-1.3.5/src/akgentic/team/repositories/postgres/_queries.py +42 -0
- akgentic_team-1.3.5/src/akgentic/team/repositories/postgres/event_store.py +202 -0
- akgentic_team-1.3.5/src/akgentic/team/repositories/postgres/schema.toml +19 -0
- akgentic_team-1.3.5/src/akgentic/team/repositories/yaml.py +311 -0
- akgentic_team-1.3.5/src/akgentic/team/restorer.py +598 -0
- akgentic_team-1.3.5/src/akgentic/team/scripts/__init__.py +1 -0
- akgentic_team-1.3.5/src/akgentic/team/scripts/init_db.py +67 -0
- akgentic_team-1.3.5/src/akgentic/team/subscriber.py +218 -0
- akgentic_team-1.3.5/tests/__init__.py +3 -0
- akgentic_team-1.3.5/tests/cli/__init__.py +3 -0
- akgentic_team-1.3.5/tests/cli/conftest.py +55 -0
- akgentic_team-1.3.5/tests/cli/test_main.py +483 -0
- akgentic_team-1.3.5/tests/conftest.py +3 -0
- akgentic_team-1.3.5/tests/integration/__init__.py +8 -0
- akgentic_team-1.3.5/tests/integration/conftest.py +259 -0
- akgentic_team-1.3.5/tests/integration/test_factory.py +138 -0
- akgentic_team-1.3.5/tests/integration/test_lifecycle.py +405 -0
- akgentic_team-1.3.5/tests/integration/test_llm_lifecycle.py +287 -0
- akgentic_team-1.3.5/tests/integration/test_persistence.py +130 -0
- akgentic_team-1.3.5/tests/integration/test_process_human_input.py +208 -0
- akgentic_team-1.3.5/tests/models/__init__.py +3 -0
- akgentic_team-1.3.5/tests/models/conftest.py +249 -0
- akgentic_team-1.3.5/tests/models/test_ports.py +93 -0
- akgentic_team-1.3.5/tests/models/test_process.py +169 -0
- akgentic_team-1.3.5/tests/models/test_team_card.py +342 -0
- akgentic_team-1.3.5/tests/models/test_team_runtime.py +735 -0
- akgentic_team-1.3.5/tests/repositories/__init__.py +3 -0
- akgentic_team-1.3.5/tests/repositories/conftest.py +149 -0
- akgentic_team-1.3.5/tests/repositories/mongo/__init__.py +3 -0
- akgentic_team-1.3.5/tests/repositories/mongo/conftest.py +16 -0
- akgentic_team-1.3.5/tests/repositories/mongo/test_mongo.py +519 -0
- akgentic_team-1.3.5/tests/repositories/postgres/__init__.py +0 -0
- akgentic_team-1.3.5/tests/repositories/postgres/conftest.py +17 -0
- akgentic_team-1.3.5/tests/repositories/postgres/test_ci_env_wiring.py +86 -0
- akgentic_team-1.3.5/tests/repositories/postgres/test_event_store.py +95 -0
- akgentic_team-1.3.5/tests/repositories/postgres/test_import_gate.py +83 -0
- akgentic_team-1.3.5/tests/repositories/postgres/test_init_db.py +163 -0
- akgentic_team-1.3.5/tests/repositories/postgres/test_init_db_script_smoke.py +32 -0
- akgentic_team-1.3.5/tests/repositories/postgres/test_schema_file.py +66 -0
- akgentic_team-1.3.5/tests/repositories/postgres/test_wheel_packaging.py +56 -0
- akgentic_team-1.3.5/tests/repositories/test_event_store_contract.py +415 -0
- akgentic_team-1.3.5/tests/repositories/test_yaml.py +109 -0
- akgentic_team-1.3.5/tests/scripts/__init__.py +0 -0
- akgentic_team-1.3.5/tests/scripts/test_init_db_script.py +54 -0
- akgentic_team-1.3.5/tests/services/__init__.py +3 -0
- akgentic_team-1.3.5/tests/services/conftest.py +106 -0
- akgentic_team-1.3.5/tests/services/test_factory.py +433 -0
- akgentic_team-1.3.5/tests/services/test_manager.py +1053 -0
- akgentic_team-1.3.5/tests/services/test_restorer.py +1614 -0
- akgentic_team-1.3.5/tests/services/test_subscriber.py +219 -0
- akgentic_team-1.3.5/tests/services/test_timer_stop_subscriber.py +168 -0
- akgentic_team-1.3.5/tests/test_public_api.py +36 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Example environment variables for akgentic-team storage backends.
|
|
2
|
+
# Copy to .env and fill in values for your deployment. The team library
|
|
3
|
+
# itself does NOT read these — env-var resolution happens at the wiring
|
|
4
|
+
# layer (application startup / infra code). NagraEventStore takes a
|
|
5
|
+
# plain connection string directly.
|
|
6
|
+
|
|
7
|
+
# Nagra / PostgreSQL backend — used by the `[postgres]` extra.
|
|
8
|
+
# Shared verbatim with akgentic-catalog (same DB, disjoint tables:
|
|
9
|
+
# catalog owns template_entries / tool_entries / agent_entries / team_entries
|
|
10
|
+
# team owns team_process_entries / event_entries / agent_state_entries
|
|
11
|
+
# ).
|
|
12
|
+
POSTGRES_SERVER=
|
|
13
|
+
POSTGRES_PORT=5432
|
|
14
|
+
POSTGRES_USER=
|
|
15
|
+
POSTGRES_PASSWORD=
|
|
16
|
+
POSTGRES_DB=
|
|
17
|
+
# Full libpq URL; what NagraEventStore receives as `conn_string`.
|
|
18
|
+
DB_CONN_STRING_PERSISTENCE=
|
|
19
|
+
|
|
20
|
+
# MongoDB backend — used by the `[mongo]` extra.
|
|
21
|
+
MONGO_URI=
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
branches: [master]
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
NO_COLOR: "1"
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
quality:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
services:
|
|
16
|
+
postgres:
|
|
17
|
+
image: postgres:16-alpine
|
|
18
|
+
env:
|
|
19
|
+
POSTGRES_USER: akgentic
|
|
20
|
+
POSTGRES_PASSWORD: akgentic
|
|
21
|
+
POSTGRES_DB: akgentic_test
|
|
22
|
+
ports:
|
|
23
|
+
- 5432:5432
|
|
24
|
+
options: >-
|
|
25
|
+
--health-cmd="pg_isready -U akgentic"
|
|
26
|
+
--health-interval=10s
|
|
27
|
+
--health-timeout=5s
|
|
28
|
+
--health-retries=5
|
|
29
|
+
env:
|
|
30
|
+
POSTGRES_SERVER: localhost
|
|
31
|
+
POSTGRES_PORT: "5432"
|
|
32
|
+
POSTGRES_USER: akgentic
|
|
33
|
+
POSTGRES_PASSWORD: akgentic
|
|
34
|
+
POSTGRES_DB: akgentic_test
|
|
35
|
+
DB_CONN_STRING_PERSISTENCE: postgresql://akgentic:akgentic@localhost:5432/akgentic_test
|
|
36
|
+
steps:
|
|
37
|
+
- name: Checkout workspace
|
|
38
|
+
uses: actions/checkout@v6
|
|
39
|
+
with:
|
|
40
|
+
repository: b12consulting/akgentic-quick-start
|
|
41
|
+
# Pin to the 1.x-compatible workspace; the default branch (master) is
|
|
42
|
+
# stale and not compatible with the enterprise alpha line.
|
|
43
|
+
ref: feat/enterprise-alpha-release-4
|
|
44
|
+
submodules: recursive
|
|
45
|
+
token: ${{ secrets.GH_PAT }}
|
|
46
|
+
|
|
47
|
+
- name: Override team submodule with current branch
|
|
48
|
+
working-directory: packages/akgentic-team
|
|
49
|
+
run: |
|
|
50
|
+
git fetch origin ${{ github.head_ref || github.ref_name }}
|
|
51
|
+
git checkout FETCH_HEAD
|
|
52
|
+
|
|
53
|
+
- name: Ensure team package in workspace
|
|
54
|
+
run: |
|
|
55
|
+
if ! grep -q 'akgentic-team' pyproject.toml; then
|
|
56
|
+
sed -i 's/"akgentic-catalog",/"akgentic-catalog",\n "akgentic-team",/' pyproject.toml
|
|
57
|
+
sed -i 's|"packages/akgentic-catalog",|"packages/akgentic-catalog",\n "packages/akgentic-team",|' pyproject.toml
|
|
58
|
+
sed -i 's/akgentic-catalog = { workspace = true }/akgentic-catalog = { workspace = true }\nakgentic-team = { workspace = true }/' pyproject.toml
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
- name: Install uv
|
|
62
|
+
uses: astral-sh/setup-uv@v8.1.0
|
|
63
|
+
with:
|
|
64
|
+
version: "latest"
|
|
65
|
+
|
|
66
|
+
- name: Set up Python 3.12
|
|
67
|
+
run: uv python install 3.12
|
|
68
|
+
|
|
69
|
+
- name: Install dependencies
|
|
70
|
+
run: uv sync --all-packages --all-extras
|
|
71
|
+
|
|
72
|
+
- name: Type checking
|
|
73
|
+
run: uv run mypy packages/akgentic-team/src/
|
|
74
|
+
|
|
75
|
+
- name: Linting
|
|
76
|
+
run: uv run ruff check packages/akgentic-team/src/
|
|
77
|
+
|
|
78
|
+
- name: Run tests with coverage
|
|
79
|
+
run: >
|
|
80
|
+
uv run pytest packages/akgentic-team/tests/
|
|
81
|
+
--cov=akgentic.team
|
|
82
|
+
--cov-report=term-missing
|
|
83
|
+
--cov-report=json:coverage.json
|
|
84
|
+
--cov-fail-under=80
|
|
85
|
+
|
|
86
|
+
- name: Update coverage badge
|
|
87
|
+
if: github.ref_name == 'master' && github.event_name == 'push'
|
|
88
|
+
run: |
|
|
89
|
+
COVERAGE=$(python -c "import json; print(round(float(json.load(open('coverage.json'))['totals']['percent_covered_display'])))")
|
|
90
|
+
if [ "$COVERAGE" -ge 90 ]; then COLOR="brightgreen"
|
|
91
|
+
elif [ "$COVERAGE" -ge 80 ]; then COLOR="green"
|
|
92
|
+
elif [ "$COVERAGE" -ge 70 ]; then COLOR="yellow"
|
|
93
|
+
else COLOR="red"; fi
|
|
94
|
+
echo "{\"schemaVersion\":1,\"label\":\"coverage\",\"message\":\"${COVERAGE}%\",\"color\":\"${COLOR}\"}" > badge.json
|
|
95
|
+
gh gist edit 708bb547b8679308d083be7beaf4448a -f coverage.json badge.json
|
|
96
|
+
env:
|
|
97
|
+
GH_TOKEN: ${{ secrets.GH_PAT }}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Manual release: reads version from pyproject.toml on master, tags master HEAD,
|
|
4
|
+
# builds the wheel, and creates a GitHub Release with the wheel attached.
|
|
5
|
+
#
|
|
6
|
+
# Bumping the version is a separate maintainer action via a normal PR. This
|
|
7
|
+
# workflow does NOT push commits to master — branch protection blocks that.
|
|
8
|
+
# The release flow is therefore two-step:
|
|
9
|
+
# 1. Open a "chore: bump version to X.Y.Z" PR; merge it.
|
|
10
|
+
# 2. Trigger this workflow from the Actions tab.
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
workflow_dispatch:
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
release:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
permissions:
|
|
19
|
+
contents: write
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout master
|
|
22
|
+
uses: actions/checkout@v6
|
|
23
|
+
with:
|
|
24
|
+
ref: master
|
|
25
|
+
fetch-depth: 0
|
|
26
|
+
|
|
27
|
+
- name: Install uv
|
|
28
|
+
uses: astral-sh/setup-uv@v8.1.0
|
|
29
|
+
with:
|
|
30
|
+
version: "latest"
|
|
31
|
+
|
|
32
|
+
- name: Set up Python 3.12
|
|
33
|
+
run: uv python install 3.12
|
|
34
|
+
|
|
35
|
+
- name: Read version from pyproject.toml
|
|
36
|
+
id: version
|
|
37
|
+
run: |
|
|
38
|
+
VERSION=$(grep -E '^version = ' pyproject.toml | sed -E 's/version = "(.*)"/\1/')
|
|
39
|
+
echo "Releasing version: $VERSION"
|
|
40
|
+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
41
|
+
|
|
42
|
+
- name: Verify tag does not already exist
|
|
43
|
+
env:
|
|
44
|
+
VERSION: ${{ steps.version.outputs.version }}
|
|
45
|
+
run: |
|
|
46
|
+
if git rev-parse "v$VERSION" >/dev/null 2>&1; then
|
|
47
|
+
echo "::error::Tag v$VERSION already exists. Bump the version in pyproject.toml first."
|
|
48
|
+
exit 1
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
- name: Tag master HEAD
|
|
52
|
+
env:
|
|
53
|
+
VERSION: ${{ steps.version.outputs.version }}
|
|
54
|
+
run: |
|
|
55
|
+
git config user.name "github-actions[bot]"
|
|
56
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
57
|
+
git tag "v$VERSION"
|
|
58
|
+
git push origin "v$VERSION"
|
|
59
|
+
|
|
60
|
+
- name: Build wheel
|
|
61
|
+
run: uv build --wheel --out-dir dist/
|
|
62
|
+
|
|
63
|
+
- name: Create GitHub Release
|
|
64
|
+
uses: softprops/action-gh-release@v2
|
|
65
|
+
with:
|
|
66
|
+
tag_name: "v${{ steps.version.outputs.version }}"
|
|
67
|
+
name: "v${{ steps.version.outputs.version }}"
|
|
68
|
+
files: dist/*.whl
|
|
69
|
+
generate_release_notes: true
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# Distribution / packaging
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
*.egg-info/
|
|
10
|
+
**/settings.local.json
|
|
11
|
+
|
|
12
|
+
# Testing
|
|
13
|
+
.pytest_cache/
|
|
14
|
+
.coverage
|
|
15
|
+
htmlcov/
|
|
16
|
+
|
|
17
|
+
# Type checking
|
|
18
|
+
.mypy_cache/
|
|
19
|
+
.dmypy.json
|
|
20
|
+
|
|
21
|
+
# Virtual environments
|
|
22
|
+
.venv/
|
|
23
|
+
venv/
|
|
24
|
+
|
|
25
|
+
# IDE
|
|
26
|
+
.vscode/
|
|
27
|
+
.idea/
|