openavt 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.
- openavt-0.1.0/.env.example +7 -0
- openavt-0.1.0/.github/workflows/ci.yml +62 -0
- openavt-0.1.0/.github/workflows/release.yml +140 -0
- openavt-0.1.0/.gitignore +19 -0
- openavt-0.1.0/CHANGELOG.md +26 -0
- openavt-0.1.0/LICENSE +202 -0
- openavt-0.1.0/MANIFEST.in +13 -0
- openavt-0.1.0/PKG-INFO +113 -0
- openavt-0.1.0/README.md +79 -0
- openavt-0.1.0/docs/architecture.md +87 -0
- openavt-0.1.0/docs/authority-cli.md +96 -0
- openavt-0.1.0/docs/authority-verification.json +381 -0
- openavt-0.1.0/docs/authority.md +92 -0
- openavt-0.1.0/docs/performance/baseline.json +157 -0
- openavt-0.1.0/docs/performance/pcm-20-calls.json +2370 -0
- openavt-0.1.0/docs/performance/pcm-agents.json +145 -0
- openavt-0.1.0/docs/performance/pcm-ci-main.json +621 -0
- openavt-0.1.0/docs/performance/pcm-wheel.json +121 -0
- openavt-0.1.0/docs/performance.md +81 -0
- openavt-0.1.0/docs/quickstart.md +83 -0
- openavt-0.1.0/docs/releasing.md +100 -0
- openavt-0.1.0/docs/verification.md +53 -0
- openavt-0.1.0/pyproject.toml +59 -0
- openavt-0.1.0/scripts/benchmark_handshake.py +90 -0
- openavt-0.1.0/scripts/check_dist.py +75 -0
- openavt-0.1.0/scripts/release.py +248 -0
- openavt-0.1.0/scripts/smoke_wheel.py +61 -0
- openavt-0.1.0/setup.cfg +4 -0
- openavt-0.1.0/src/openavt/__init__.py +13 -0
- openavt-0.1.0/src/openavt/__main__.py +3 -0
- openavt-0.1.0/src/openavt/_version.py +21 -0
- openavt-0.1.0/src/openavt/agents/__init__.py +1 -0
- openavt-0.1.0/src/openavt/agents/openai.py +216 -0
- openavt-0.1.0/src/openavt/authority/__init__.py +1 -0
- openavt-0.1.0/src/openavt/authority/ca.py +270 -0
- openavt-0.1.0/src/openavt/authority/cli.py +148 -0
- openavt-0.1.0/src/openavt/authority/client.py +147 -0
- openavt-0.1.0/src/openavt/authority/common.py +112 -0
- openavt-0.1.0/src/openavt/authority/delegation.py +274 -0
- openavt-0.1.0/src/openavt/authority/service.py +187 -0
- openavt-0.1.0/src/openavt/channel.py +261 -0
- openavt-0.1.0/src/openavt/cli.py +55 -0
- openavt-0.1.0/src/openavt/demos/__init__.py +1 -0
- openavt-0.1.0/src/openavt/demos/delegation.py +250 -0
- openavt-0.1.0/src/openavt/demos/live.py +243 -0
- openavt-0.1.0/src/openavt/demos/loopback.py +262 -0
- openavt-0.1.0/src/openavt/demos/policy.py +16 -0
- openavt-0.1.0/src/openavt/modem.py +95 -0
- openavt-0.1.0/src/openavt/pcm.py +145 -0
- openavt-0.1.0/src/openavt/pki.py +127 -0
- openavt-0.1.0/src/openavt/protocol.py +91 -0
- openavt-0.1.0/src/openavt/tls.py +21 -0
- openavt-0.1.0/src/openavt/transports/__init__.py +1 -0
- openavt-0.1.0/src/openavt/transports/webrtc.py +291 -0
- openavt-0.1.0/src/openavt.egg-info/PKG-INFO +113 -0
- openavt-0.1.0/src/openavt.egg-info/SOURCES.txt +65 -0
- openavt-0.1.0/src/openavt.egg-info/dependency_links.txt +1 -0
- openavt-0.1.0/src/openavt.egg-info/entry_points.txt +2 -0
- openavt-0.1.0/src/openavt.egg-info/requires.txt +17 -0
- openavt-0.1.0/src/openavt.egg-info/top_level.txt +1 -0
- openavt-0.1.0/tests/test_authority.py +534 -0
- openavt-0.1.0/tests/test_cli.py +41 -0
- openavt-0.1.0/tests/test_pcm.py +171 -0
- openavt-0.1.0/tests/test_release.py +231 -0
- openavt-0.1.0/tests/test_security.py +63 -0
- openavt-0.1.0/tests/test_streaming.py +46 -0
- openavt-0.1.0/uv.lock +1691 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
verify:
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
include:
|
|
18
|
+
- os: ubuntu-latest
|
|
19
|
+
python: '3.11'
|
|
20
|
+
- os: ubuntu-latest
|
|
21
|
+
python: '3.13'
|
|
22
|
+
- os: macos-latest
|
|
23
|
+
python: '3.13'
|
|
24
|
+
runs-on: ${{ matrix.os }}
|
|
25
|
+
timeout-minutes: 15
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
28
|
+
with:
|
|
29
|
+
fetch-depth: 0
|
|
30
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: ${{ matrix.python }}
|
|
33
|
+
- run: python -m pip install uv==0.8.17
|
|
34
|
+
- run: uv sync --locked --extra webrtc --extra authority
|
|
35
|
+
- run: uv run --locked --extra webrtc --extra authority ruff check src tests scripts
|
|
36
|
+
- run: uv run --locked --extra webrtc --extra authority ruff format --check src tests scripts
|
|
37
|
+
- run: uv run --locked --extra webrtc --extra authority pytest -q
|
|
38
|
+
- run: uv run --locked --extra webrtc --extra authority python -m build
|
|
39
|
+
- run: uv run --locked --extra webrtc --extra authority twine check --strict dist/*
|
|
40
|
+
- run: uv run --locked --extra webrtc --extra authority python scripts/check_dist.py
|
|
41
|
+
- run: uv run --locked --extra webrtc --extra authority python scripts/smoke_wheel.py
|
|
42
|
+
- name: Verify installed wheel over live WebRTC audio
|
|
43
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python == '3.13'
|
|
44
|
+
shell: bash
|
|
45
|
+
run: |
|
|
46
|
+
uv pip install --python .venv/bin/python --no-deps --reinstall dist/*.whl
|
|
47
|
+
OPENAVT_ROOT="$PWD"
|
|
48
|
+
OPENAVT_SMOKE=$(mktemp -d)
|
|
49
|
+
cd "$OPENAVT_SMOKE"
|
|
50
|
+
"$OPENAVT_ROOT/.venv/bin/openavt" live --transport-only --output call
|
|
51
|
+
"$OPENAVT_ROOT/.venv/bin/openavt" live --transport-only --profile pcm --output pcm-call
|
|
52
|
+
"$OPENAVT_ROOT/.venv/bin/openavt" delegation-demo --output delegation-call
|
|
53
|
+
- name: Measure five fresh PCM handshakes
|
|
54
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python == '3.13'
|
|
55
|
+
run: uv run --locked --extra webrtc --extra authority python scripts/benchmark_handshake.py --runs 5 --profile pcm --output output/ci-perf --require-under-one-second
|
|
56
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
57
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python == '3.13'
|
|
58
|
+
with:
|
|
59
|
+
name: distributions
|
|
60
|
+
path: |
|
|
61
|
+
dist/*
|
|
62
|
+
output/ci-perf/summary.json
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows: [CI]
|
|
6
|
+
branches: [main]
|
|
7
|
+
types: [completed]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
inputs:
|
|
10
|
+
dry_run:
|
|
11
|
+
description: Build and test without creating tags or publishing
|
|
12
|
+
type: boolean
|
|
13
|
+
default: true
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
concurrency:
|
|
19
|
+
group: openavt-release
|
|
20
|
+
queue: max
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
build:
|
|
24
|
+
if: >-
|
|
25
|
+
(github.event_name == 'workflow_dispatch' && (inputs.dry_run || github.ref == 'refs/heads/main')) ||
|
|
26
|
+
(vars.RELEASE_ENABLED == 'true' && github.event.workflow_run.conclusion == 'success' &&
|
|
27
|
+
github.event.workflow_run.event == 'push' &&
|
|
28
|
+
github.event.workflow_run.head_repository.full_name == github.repository)
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
timeout-minutes: 15
|
|
31
|
+
permissions:
|
|
32
|
+
contents: read
|
|
33
|
+
actions: read
|
|
34
|
+
outputs:
|
|
35
|
+
version: ${{ steps.plan.outputs.version }}
|
|
36
|
+
sha: ${{ steps.plan.outputs.sha }}
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
39
|
+
with:
|
|
40
|
+
ref: ${{ github.event.workflow_run.head_sha || github.sha }}
|
|
41
|
+
fetch-depth: 0
|
|
42
|
+
persist-credentials: false
|
|
43
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
44
|
+
with:
|
|
45
|
+
python-version: '3.13'
|
|
46
|
+
- name: Select or reuse a semantic version
|
|
47
|
+
id: plan
|
|
48
|
+
env:
|
|
49
|
+
GH_TOKEN: ${{ github.token }}
|
|
50
|
+
RELEASE_ENABLED: ${{ vars.RELEASE_ENABLED }}
|
|
51
|
+
DRY_RUN: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run }}
|
|
52
|
+
run: |
|
|
53
|
+
if [ "$DRY_RUN" = true ]; then
|
|
54
|
+
python scripts/release.py plan --dry-run
|
|
55
|
+
else
|
|
56
|
+
python scripts/release.py plan
|
|
57
|
+
fi
|
|
58
|
+
- name: Set build version and reproducible timestamps
|
|
59
|
+
env:
|
|
60
|
+
VERSION: ${{ steps.plan.outputs.version }}
|
|
61
|
+
run: |
|
|
62
|
+
echo "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_OPENAVT=$VERSION" >> "$GITHUB_ENV"
|
|
63
|
+
echo "SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)" >> "$GITHUB_ENV"
|
|
64
|
+
- run: python -m pip install uv==0.8.17
|
|
65
|
+
- run: uv sync --locked --extra webrtc --extra authority
|
|
66
|
+
- run: uv run --locked --extra webrtc --extra authority ruff check src tests scripts
|
|
67
|
+
- run: uv run --locked --extra webrtc --extra authority ruff format --check src tests scripts
|
|
68
|
+
- run: uv run --locked --extra webrtc --extra authority pytest -q
|
|
69
|
+
- run: uv run --locked --extra webrtc --extra authority python -m build
|
|
70
|
+
- run: uv run --locked --extra webrtc --extra authority twine check --strict dist/*
|
|
71
|
+
- run: uv run --locked --extra webrtc --extra authority python scripts/check_dist.py
|
|
72
|
+
- run: uv run --locked --extra webrtc --extra authority python scripts/smoke_wheel.py
|
|
73
|
+
- name: Verify installed wheel over live WebRTC audio
|
|
74
|
+
run: |
|
|
75
|
+
uv pip install --python .venv/bin/python --no-deps --reinstall dist/*.whl
|
|
76
|
+
OPENAVT_ROOT="$PWD"
|
|
77
|
+
OPENAVT_SMOKE=$(mktemp -d)
|
|
78
|
+
cd "$OPENAVT_SMOKE"
|
|
79
|
+
"$OPENAVT_ROOT/.venv/bin/openavt" live --transport-only --profile pcm --output call
|
|
80
|
+
"$OPENAVT_ROOT/.venv/bin/openavt" delegation-demo --output delegation-call
|
|
81
|
+
- name: Record release evidence
|
|
82
|
+
env:
|
|
83
|
+
VERSION: ${{ steps.plan.outputs.version }}
|
|
84
|
+
BUMP: ${{ steps.plan.outputs.bump }}
|
|
85
|
+
SHA: ${{ steps.plan.outputs.sha }}
|
|
86
|
+
run: |
|
|
87
|
+
echo "### OpenAVT $VERSION ($BUMP)" >> "$GITHUB_STEP_SUMMARY"
|
|
88
|
+
echo "Source: $SHA. Wheel, source archive, core TLS and live audio demos verified." >> "$GITHUB_STEP_SUMMARY"
|
|
89
|
+
sha256sum dist/* >> "$GITHUB_STEP_SUMMARY"
|
|
90
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
91
|
+
with:
|
|
92
|
+
name: distributions
|
|
93
|
+
path: dist/*
|
|
94
|
+
if-no-files-found: error
|
|
95
|
+
|
|
96
|
+
publish:
|
|
97
|
+
needs: build
|
|
98
|
+
if: >-
|
|
99
|
+
vars.RELEASE_ENABLED == 'true' &&
|
|
100
|
+
(github.event_name == 'workflow_run' || !inputs.dry_run)
|
|
101
|
+
runs-on: ubuntu-latest
|
|
102
|
+
timeout-minutes: 10
|
|
103
|
+
environment:
|
|
104
|
+
name: pypi
|
|
105
|
+
url: https://pypi.org/project/openavt/
|
|
106
|
+
permissions:
|
|
107
|
+
contents: write
|
|
108
|
+
id-token: write
|
|
109
|
+
env:
|
|
110
|
+
VERSION: ${{ needs.build.outputs.version }}
|
|
111
|
+
SHA: ${{ needs.build.outputs.sha }}
|
|
112
|
+
GH_TOKEN: ${{ github.token }}
|
|
113
|
+
GH_REPO: ${{ github.repository }}
|
|
114
|
+
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_OPENAVT: ${{ needs.build.outputs.version }}
|
|
115
|
+
steps:
|
|
116
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
117
|
+
with:
|
|
118
|
+
ref: ${{ needs.build.outputs.sha }}
|
|
119
|
+
persist-credentials: false
|
|
120
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
121
|
+
with:
|
|
122
|
+
python-version: '3.13'
|
|
123
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
|
124
|
+
with:
|
|
125
|
+
name: distributions
|
|
126
|
+
path: dist/
|
|
127
|
+
- name: Stage draft GitHub release and recover identical artifacts on retry
|
|
128
|
+
run: python scripts/release.py stage "$VERSION" "$SHA"
|
|
129
|
+
- name: Validate staged archives and existing PyPI hashes
|
|
130
|
+
run: |
|
|
131
|
+
python -m pip install --no-deps dist/*.whl
|
|
132
|
+
python scripts/check_dist.py
|
|
133
|
+
python scripts/release.py verify-pypi "$VERSION"
|
|
134
|
+
- uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
|
|
135
|
+
with:
|
|
136
|
+
skip-existing: true # Only after verifying existing files have identical SHA-256 hashes.
|
|
137
|
+
- name: Verify publication and publish GitHub release
|
|
138
|
+
run: |
|
|
139
|
+
python scripts/release.py verify-pypi "$VERSION" --complete
|
|
140
|
+
gh release edit "v$VERSION" --draft=false
|
openavt-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
output/
|
|
3
|
+
.venv/
|
|
4
|
+
.env
|
|
5
|
+
.env.*
|
|
6
|
+
!.env.example
|
|
7
|
+
.pytest_cache/
|
|
8
|
+
.venv-*/
|
|
9
|
+
*.egg-info/
|
|
10
|
+
build/
|
|
11
|
+
dist/
|
|
12
|
+
.ruff_cache/
|
|
13
|
+
.DS_Store
|
|
14
|
+
*.key
|
|
15
|
+
*.sqlite3
|
|
16
|
+
*.sqlite3-*
|
|
17
|
+
*.credentials.json
|
|
18
|
+
*.grant.json
|
|
19
|
+
src/openavt/_version.py
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# OpenAVT changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 — unreleased
|
|
4
|
+
|
|
5
|
+
- Add CI-gated automatic GitHub/PyPI releases, semantic version selection,
|
|
6
|
+
dry-run validation, and immutable artifact recovery through Trusted Publishing.
|
|
7
|
+
|
|
8
|
+
- Add the optional `authority` extra and `openavt ava` local service/client:
|
|
9
|
+
accounts, CSR/key-proof enrollment, renewal and authenticated revocation.
|
|
10
|
+
- Add a separate business consent signer with certificate-bound, short-lived,
|
|
11
|
+
single-use delegation, customer/resource checks and persistent replay defense.
|
|
12
|
+
- Add `openavt delegation-demo`, including optional real OpenAI agents and eight
|
|
13
|
+
authorization scenarios over actual audio TLS; redact delegation tokens in traces.
|
|
14
|
+
|
|
15
|
+
- Add an opt-in digital G.711 PCM modem with 56 kbps raw data in a 64 kbps
|
|
16
|
+
audio stream, larger frames and low-delay buffering for sub-second cold mTLS.
|
|
17
|
+
- Add repeatable handshake benchmarking, per-flight metrics, and PCM security,
|
|
18
|
+
codec preservation and live-call tests.
|
|
19
|
+
- Package the working prototype under `src/openavt`, with core framing and TLS,
|
|
20
|
+
streaming audio, WebRTC transport, OpenAI agents, and runnable demos.
|
|
21
|
+
- Add `openavt loopback` and `openavt live`, plus `python -m openavt`.
|
|
22
|
+
- Separate optional `audio`, `webrtc`, and `agents` dependencies.
|
|
23
|
+
- Preserve real mutual TLS 1.3 over tones, fixed backend grants, recordings,
|
|
24
|
+
metrics, loss recovery, and certificate rejection scenarios.
|
|
25
|
+
- Add Apache-2.0 licensing, tests, wheel/source builds, CI, and Trusted Publishing.
|
|
26
|
+
- Adopt OpenAVT (Open Agent Voice TLS) throughout the package, CLI, docs, and release configuration.
|
openavt-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
include README.md LICENSE CHANGELOG.md .env.example uv.lock
|
|
2
|
+
recursive-include docs *.md
|
|
3
|
+
include docs/authority-verification.json
|
|
4
|
+
recursive-include docs/performance *.json
|
|
5
|
+
recursive-include tests *.py
|
|
6
|
+
prune output
|
|
7
|
+
prune .venv
|
|
8
|
+
prune .git
|
|
9
|
+
prune .pytest_cache
|
|
10
|
+
prune build
|
|
11
|
+
prune dist
|
|
12
|
+
global-exclude __pycache__ *.py[cod] .DS_Store .env *.key *.wav
|
|
13
|
+
recursive-include scripts *.py
|
openavt-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: openavt
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: TLS over voice, built for agents: mutual TLS 1.3 over audio with WebRTC and OpenAI demos
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
Project-URL: Homepage, https://github.com/ketanbj/openavt
|
|
7
|
+
Project-URL: Repository, https://github.com/ketanbj/openavt
|
|
8
|
+
Project-URL: Issues, https://github.com/ketanbj/openavt/issues
|
|
9
|
+
Keywords: tls,audio,fsk,webrtc,voice-agents
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Topic :: Communications
|
|
16
|
+
Classifier: Topic :: Security :: Cryptography
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Provides-Extra: authority
|
|
21
|
+
Requires-Dist: cryptography<51,>=46; extra == "authority"
|
|
22
|
+
Provides-Extra: audio
|
|
23
|
+
Requires-Dist: numpy<3,>=2; extra == "audio"
|
|
24
|
+
Requires-Dist: scipy<2,>=1.14; extra == "audio"
|
|
25
|
+
Provides-Extra: webrtc
|
|
26
|
+
Requires-Dist: openavt[audio]; extra == "webrtc"
|
|
27
|
+
Requires-Dist: aiortc<1.16,>=1.15; extra == "webrtc"
|
|
28
|
+
Requires-Dist: av<18,>=14; extra == "webrtc"
|
|
29
|
+
Requires-Dist: python-dotenv<2,>=1.2; extra == "webrtc"
|
|
30
|
+
Provides-Extra: agents
|
|
31
|
+
Requires-Dist: openavt[webrtc]; extra == "agents"
|
|
32
|
+
Requires-Dist: openai<4,>=3.28; extra == "agents"
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
# OpenAVT
|
|
36
|
+
|
|
37
|
+
[](https://github.com/ketanbj/openavt/actions/workflows/ci.yml)
|
|
38
|
+
[](pyproject.toml)
|
|
39
|
+
[](LICENSE)
|
|
40
|
+
[](#scope)
|
|
41
|
+
|
|
42
|
+
**TLS over voice. Built for agents.**
|
|
43
|
+
|
|
44
|
+
OpenAVT (**Open Agent Voice TLS**) carries real mutual TLS 1.3 records through
|
|
45
|
+
audio. An agent can authenticate its key and send a protected request during a
|
|
46
|
+
voice call; the business checks its permission before returning a result.
|
|
47
|
+
|
|
48
|
+
- **Transport:** TLS requests and responses travel through audio-only WebRTC.
|
|
49
|
+
- **Identity:** AVA (Agent Voice Authority) enrolls, renews and revokes agent certificates.
|
|
50
|
+
- **Permission:** a separate business signer issues customer grants for specific actions and resources.
|
|
51
|
+
|
|
52
|
+
## Try the complete demo
|
|
53
|
+
|
|
54
|
+
Requires Python 3.11+, `uv` and the `openssl` executable. No OpenAI key needed.
|
|
55
|
+
Install from GitHub; PyPI publication is pending.
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
git clone https://github.com/ketanbj/openavt.git
|
|
59
|
+
cd openavt
|
|
60
|
+
uv run --locked --extra webrtc --extra authority openavt delegation-demo
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The demo enrolls an agent, issues customer consent, and establishes a live local
|
|
64
|
+
audio call. It accepts one authorized request and rejects seven misuse cases,
|
|
65
|
+
including scope escalation, replay and revocation. It saves a report and audio
|
|
66
|
+
under `output/`.
|
|
67
|
+
|
|
68
|
+
To use **two real OpenAI voice agents**, copy `.env.example` to `.env`, set
|
|
69
|
+
`OPENAI_API_KEY` locally, then run:
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
uv run --locked --extra agents --extra authority openavt delegation-demo --agents
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
[More demos and installation options →](docs/quickstart.md)
|
|
76
|
+
|
|
77
|
+
## Sub-second handshakes
|
|
78
|
+
|
|
79
|
+
Measured on an established local **64 kbps G.711 PCMU** audio call:
|
|
80
|
+
|
|
81
|
+
| Run | Full mutual TLS handshake | Evidence |
|
|
82
|
+
| --- | ---: | --- |
|
|
83
|
+
| `main` CI, 5 fresh calls, October 11, 2026 | **0.561 s median · 0.581 s max** | [Benchmark](docs/performance/pcm-ci-main.json) |
|
|
84
|
+
| Two OpenAI agents with AVA and customer delegation | **0.623 s** | [Demo results](docs/authority-verification.json) |
|
|
85
|
+
|
|
86
|
+
The timer includes both authenticated endpoints and the final audio ACK. It
|
|
87
|
+
excludes certificate creation, call setup and LLM/speech time. The fast PCM
|
|
88
|
+
profile requires an unchanged digital PCMU path; transcoding or audio processing
|
|
89
|
+
can break it. [Measurements and reproduction →](docs/performance.md)
|
|
90
|
+
|
|
91
|
+
## Scope
|
|
92
|
+
|
|
93
|
+
This is an **experimental local prototype**. Both peers run on one machine;
|
|
94
|
+
public Internet, carrier/PSTN and microphone paths have not been verified.
|
|
95
|
+
Ordinary speech is outside the inner TLS session. There is no WebRTC data channel
|
|
96
|
+
carrying the protected requests.
|
|
97
|
+
|
|
98
|
+
Certificates prove registered account/key control. Customer authentication uses
|
|
99
|
+
demo credentials; provider verification, real customer login and production CA
|
|
100
|
+
operations remain future work. The backend enforces grants outside the LLM.
|
|
101
|
+
[Trust boundaries →](docs/authority.md#trust-boundaries)
|
|
102
|
+
|
|
103
|
+
## Documentation
|
|
104
|
+
|
|
105
|
+
| Goal | Guide |
|
|
106
|
+
| --- | --- |
|
|
107
|
+
| Install and choose a demo | [Quickstart](docs/quickstart.md) |
|
|
108
|
+
| Understand certificates and customer consent | [Authority and delegation](docs/authority.md) |
|
|
109
|
+
| Run a persistent authority | [AVA CLI walkthrough](docs/authority-cli.md) |
|
|
110
|
+
| Integrate the transport | [Architecture and library usage](docs/architecture.md) |
|
|
111
|
+
| Reproduce the timings | [Performance](docs/performance.md) |
|
|
112
|
+
| Inspect tests and evidence | [Verification](docs/verification.md) |
|
|
113
|
+
| Build and publish the package | [Releasing](docs/releasing.md) |
|
openavt-0.1.0/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# OpenAVT
|
|
2
|
+
|
|
3
|
+
[](https://github.com/ketanbj/openavt/actions/workflows/ci.yml)
|
|
4
|
+
[](pyproject.toml)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](#scope)
|
|
7
|
+
|
|
8
|
+
**TLS over voice. Built for agents.**
|
|
9
|
+
|
|
10
|
+
OpenAVT (**Open Agent Voice TLS**) carries real mutual TLS 1.3 records through
|
|
11
|
+
audio. An agent can authenticate its key and send a protected request during a
|
|
12
|
+
voice call; the business checks its permission before returning a result.
|
|
13
|
+
|
|
14
|
+
- **Transport:** TLS requests and responses travel through audio-only WebRTC.
|
|
15
|
+
- **Identity:** AVA (Agent Voice Authority) enrolls, renews and revokes agent certificates.
|
|
16
|
+
- **Permission:** a separate business signer issues customer grants for specific actions and resources.
|
|
17
|
+
|
|
18
|
+
## Try the complete demo
|
|
19
|
+
|
|
20
|
+
Requires Python 3.11+, `uv` and the `openssl` executable. No OpenAI key needed.
|
|
21
|
+
Install from GitHub; PyPI publication is pending.
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
git clone https://github.com/ketanbj/openavt.git
|
|
25
|
+
cd openavt
|
|
26
|
+
uv run --locked --extra webrtc --extra authority openavt delegation-demo
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The demo enrolls an agent, issues customer consent, and establishes a live local
|
|
30
|
+
audio call. It accepts one authorized request and rejects seven misuse cases,
|
|
31
|
+
including scope escalation, replay and revocation. It saves a report and audio
|
|
32
|
+
under `output/`.
|
|
33
|
+
|
|
34
|
+
To use **two real OpenAI voice agents**, copy `.env.example` to `.env`, set
|
|
35
|
+
`OPENAI_API_KEY` locally, then run:
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
uv run --locked --extra agents --extra authority openavt delegation-demo --agents
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
[More demos and installation options →](docs/quickstart.md)
|
|
42
|
+
|
|
43
|
+
## Sub-second handshakes
|
|
44
|
+
|
|
45
|
+
Measured on an established local **64 kbps G.711 PCMU** audio call:
|
|
46
|
+
|
|
47
|
+
| Run | Full mutual TLS handshake | Evidence |
|
|
48
|
+
| --- | ---: | --- |
|
|
49
|
+
| `main` CI, 5 fresh calls, October 11, 2026 | **0.561 s median · 0.581 s max** | [Benchmark](docs/performance/pcm-ci-main.json) |
|
|
50
|
+
| Two OpenAI agents with AVA and customer delegation | **0.623 s** | [Demo results](docs/authority-verification.json) |
|
|
51
|
+
|
|
52
|
+
The timer includes both authenticated endpoints and the final audio ACK. It
|
|
53
|
+
excludes certificate creation, call setup and LLM/speech time. The fast PCM
|
|
54
|
+
profile requires an unchanged digital PCMU path; transcoding or audio processing
|
|
55
|
+
can break it. [Measurements and reproduction →](docs/performance.md)
|
|
56
|
+
|
|
57
|
+
## Scope
|
|
58
|
+
|
|
59
|
+
This is an **experimental local prototype**. Both peers run on one machine;
|
|
60
|
+
public Internet, carrier/PSTN and microphone paths have not been verified.
|
|
61
|
+
Ordinary speech is outside the inner TLS session. There is no WebRTC data channel
|
|
62
|
+
carrying the protected requests.
|
|
63
|
+
|
|
64
|
+
Certificates prove registered account/key control. Customer authentication uses
|
|
65
|
+
demo credentials; provider verification, real customer login and production CA
|
|
66
|
+
operations remain future work. The backend enforces grants outside the LLM.
|
|
67
|
+
[Trust boundaries →](docs/authority.md#trust-boundaries)
|
|
68
|
+
|
|
69
|
+
## Documentation
|
|
70
|
+
|
|
71
|
+
| Goal | Guide |
|
|
72
|
+
| --- | --- |
|
|
73
|
+
| Install and choose a demo | [Quickstart](docs/quickstart.md) |
|
|
74
|
+
| Understand certificates and customer consent | [Authority and delegation](docs/authority.md) |
|
|
75
|
+
| Run a persistent authority | [AVA CLI walkthrough](docs/authority-cli.md) |
|
|
76
|
+
| Integrate the transport | [Architecture and library usage](docs/architecture.md) |
|
|
77
|
+
| Reproduce the timings | [Performance](docs/performance.md) |
|
|
78
|
+
| Inspect tests and evidence | [Verification](docs/verification.md) |
|
|
79
|
+
| Build and publish the package | [Releasing](docs/releasing.md) |
|