dot-agora 2.0.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.
- dot_agora-2.0.0/.env.template +7 -0
- dot_agora-2.0.0/.gitignore +63 -0
- dot_agora-2.0.0/.gitlab-ci.yml +183 -0
- dot_agora-2.0.0/.pre-commit-config.yaml +34 -0
- dot_agora-2.0.0/.python-version +1 -0
- dot_agora-2.0.0/AUTHORS.md +14 -0
- dot_agora-2.0.0/CHANGELOG.md +43 -0
- dot_agora-2.0.0/CONTRIBUTING.md +87 -0
- dot_agora-2.0.0/DCO +34 -0
- dot_agora-2.0.0/LICENSE.md +660 -0
- dot_agora-2.0.0/PKG-INFO +241 -0
- dot_agora-2.0.0/README.md +214 -0
- dot_agora-2.0.0/docs/ARCHITECTURE.md +220 -0
- dot_agora-2.0.0/docs/DEVELOPMENT.md +147 -0
- dot_agora-2.0.0/docs/PUBLISHING.md +147 -0
- dot_agora-2.0.0/docs/VERSIONING.md +148 -0
- dot_agora-2.0.0/examples/README.md +45 -0
- dot_agora-2.0.0/examples/__init__.py +2 -0
- dot_agora-2.0.0/examples/basics/__init__.py +2 -0
- dot_agora-2.0.0/examples/basics/uc01_post_and_see/README.md +47 -0
- dot_agora-2.0.0/examples/basics/uc01_post_and_see/__init__.py +2 -0
- dot_agora-2.0.0/examples/basics/uc01_post_and_see/conversation.py +14 -0
- dot_agora-2.0.0/examples/basics/uc01_post_and_see/scenario.py +65 -0
- dot_agora-2.0.0/examples/basics/uc02_call/README.md +48 -0
- dot_agora-2.0.0/examples/basics/uc02_call/__init__.py +2 -0
- dot_agora-2.0.0/examples/basics/uc02_call/conversation.py +15 -0
- dot_agora-2.0.0/examples/basics/uc02_call/scenario.py +87 -0
- dot_agora-2.0.0/examples/basics/uc03_request_reply/README.md +47 -0
- dot_agora-2.0.0/examples/basics/uc03_request_reply/__init__.py +2 -0
- dot_agora-2.0.0/examples/basics/uc03_request_reply/conversation.py +13 -0
- dot_agora-2.0.0/examples/basics/uc03_request_reply/scenario.py +94 -0
- dot_agora-2.0.0/examples/basics/uc04_relay/README.md +44 -0
- dot_agora-2.0.0/examples/basics/uc04_relay/__init__.py +2 -0
- dot_agora-2.0.0/examples/basics/uc04_relay/conversation.py +15 -0
- dot_agora-2.0.0/examples/basics/uc04_relay/scenario.py +61 -0
- dot_agora-2.0.0/examples/basics/uc05_permission/README.md +44 -0
- dot_agora-2.0.0/examples/basics/uc05_permission/__init__.py +2 -0
- dot_agora-2.0.0/examples/basics/uc05_permission/conversation.py +17 -0
- dot_agora-2.0.0/examples/basics/uc05_permission/scenario.py +51 -0
- dot_agora-2.0.0/examples/basics/uc06_obligation/README.md +46 -0
- dot_agora-2.0.0/examples/basics/uc06_obligation/__init__.py +2 -0
- dot_agora-2.0.0/examples/basics/uc06_obligation/conversation.py +21 -0
- dot_agora-2.0.0/examples/basics/uc06_obligation/scenario.py +82 -0
- dot_agora-2.0.0/examples/basics/uc07_approval/README.md +47 -0
- dot_agora-2.0.0/examples/basics/uc07_approval/__init__.py +2 -0
- dot_agora-2.0.0/examples/basics/uc07_approval/conversation.py +19 -0
- dot_agora-2.0.0/examples/basics/uc07_approval/scenario.py +98 -0
- dot_agora-2.0.0/examples/basics/uc08_vote/README.md +34 -0
- dot_agora-2.0.0/examples/basics/uc08_vote/__init__.py +2 -0
- dot_agora-2.0.0/examples/basics/uc08_vote/conversation.py +21 -0
- dot_agora-2.0.0/examples/basics/uc08_vote/scenario.py +126 -0
- dot_agora-2.0.0/examples/common/__init__.py +30 -0
- dot_agora-2.0.0/examples/common/participants/__init__.py +56 -0
- dot_agora-2.0.0/examples/common/participants/assistant.py +84 -0
- dot_agora-2.0.0/examples/common/participants/bot.py +154 -0
- dot_agora-2.0.0/examples/common/participants/clock.py +44 -0
- dot_agora-2.0.0/examples/common/participants/human.py +99 -0
- dot_agora-2.0.0/examples/common/participants/roles.py +15 -0
- dot_agora-2.0.0/examples/common/participants/weather.py +45 -0
- dot_agora-2.0.0/examples/common/participants/websearch.py +111 -0
- dot_agora-2.0.0/examples/common/scene.py +112 -0
- dot_agora-2.0.0/examples/extensions/__init__.py +2 -0
- dot_agora-2.0.0/examples/extensions/x07_streaming/README.md +38 -0
- dot_agora-2.0.0/examples/extensions/x07_streaming/__init__.py +2 -0
- dot_agora-2.0.0/examples/extensions/x07_streaming/conversation.py +13 -0
- dot_agora-2.0.0/examples/extensions/x07_streaming/scenario.py +68 -0
- dot_agora-2.0.0/examples/extensions/x19_cancel/README.md +37 -0
- dot_agora-2.0.0/examples/extensions/x19_cancel/__init__.py +2 -0
- dot_agora-2.0.0/examples/extensions/x19_cancel/conversation.py +20 -0
- dot_agora-2.0.0/examples/extensions/x19_cancel/scenario.py +85 -0
- dot_agora-2.0.0/examples/llm/__init__.py +2 -0
- dot_agora-2.0.0/examples/llm/l01_assistant_replies/README.md +47 -0
- dot_agora-2.0.0/examples/llm/l01_assistant_replies/__init__.py +2 -0
- dot_agora-2.0.0/examples/llm/l01_assistant_replies/conversation.py +13 -0
- dot_agora-2.0.0/examples/llm/l01_assistant_replies/scenario.py +84 -0
- dot_agora-2.0.0/examples/llm/l02_assistant_calls/README.md +45 -0
- dot_agora-2.0.0/examples/llm/l02_assistant_calls/__init__.py +2 -0
- dot_agora-2.0.0/examples/llm/l02_assistant_calls/conversation.py +17 -0
- dot_agora-2.0.0/examples/llm/l02_assistant_calls/scenario.py +77 -0
- dot_agora-2.0.0/examples/llm/l03_assistant_asks/README.md +48 -0
- dot_agora-2.0.0/examples/llm/l03_assistant_asks/__init__.py +2 -0
- dot_agora-2.0.0/examples/llm/l03_assistant_asks/conversation.py +13 -0
- dot_agora-2.0.0/examples/llm/l03_assistant_asks/scenario.py +77 -0
- dot_agora-2.0.0/examples/llm/l04_assistant_schema/README.md +46 -0
- dot_agora-2.0.0/examples/llm/l04_assistant_schema/__init__.py +2 -0
- dot_agora-2.0.0/examples/llm/l04_assistant_schema/conversation.py +28 -0
- dot_agora-2.0.0/examples/llm/l04_assistant_schema/scenario.py +74 -0
- dot_agora-2.0.0/examples/llm/l05_assistant_governance/README.md +46 -0
- dot_agora-2.0.0/examples/llm/l05_assistant_governance/__init__.py +2 -0
- dot_agora-2.0.0/examples/llm/l05_assistant_governance/conversation.py +24 -0
- dot_agora-2.0.0/examples/llm/l05_assistant_governance/scenario.py +77 -0
- dot_agora-2.0.0/pyproject.toml +116 -0
- dot_agora-2.0.0/src/dot_agora/__init__.py +87 -0
- dot_agora-2.0.0/src/dot_agora/_assistant.py +353 -0
- dot_agora-2.0.0/src/dot_agora/_clients/__init__.py +10 -0
- dot_agora-2.0.0/src/dot_agora/_clients/llm.py +177 -0
- dot_agora-2.0.0/src/dot_agora/_clients/search.py +56 -0
- dot_agora-2.0.0/src/dot_agora/_core/__init__.py +37 -0
- dot_agora-2.0.0/src/dot_agora/_core/events.py +131 -0
- dot_agora-2.0.0/src/dot_agora/_core/language.py +117 -0
- dot_agora-2.0.0/src/dot_agora/_core/mediator.py +194 -0
- dot_agora-2.0.0/src/dot_agora/_core/protocol.py +143 -0
- dot_agora-2.0.0/src/dot_agora/_core/state.py +174 -0
- dot_agora-2.0.0/src/dot_agora/_participant.py +195 -0
- dot_agora-2.0.0/src/dot_agora/_room/__init__.py +9 -0
- dot_agora-2.0.0/src/dot_agora/_room/room.py +186 -0
- dot_agora-2.0.0/src/dot_agora/_room/runtime.py +384 -0
- dot_agora-2.0.0/src/dot_agora/hosts/__init__.py +27 -0
- dot_agora-2.0.0/src/dot_agora/hosts/cli.py +572 -0
- dot_agora-2.0.0/src/dot_agora/hosts/http.py +175 -0
- dot_agora-2.0.0/src/dot_agora/hosts/local.py +20 -0
- dot_agora-2.0.0/src/dot_agora/hosts/terminal.py +201 -0
- dot_agora-2.0.0/src/dot_agora/hosts/wire.py +147 -0
- dot_agora-2.0.0/src/dot_agora/policies.py +108 -0
- dot_agora-2.0.0/src/dot_agora/protocols.py +151 -0
- dot_agora-2.0.0/src/dot_agora/views.py +101 -0
- dot_agora-2.0.0/tests/test_assistant_prompt.py +104 -0
- dot_agora-2.0.0/tests/test_examples.py +30 -0
- dot_agora-2.0.0/tests/test_hosts.py +129 -0
- dot_agora-2.0.0/tests/test_invariants.py +312 -0
- dot_agora-2.0.0/tests/test_llm_client.py +116 -0
- dot_agora-2.0.0/tests/test_public_api.py +34 -0
- dot_agora-2.0.0/tests/test_search_client.py +68 -0
- dot_agora-2.0.0/tests/test_views.py +54 -0
- dot_agora-2.0.0/uv.lock +724 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*.pyo
|
|
4
|
+
*.egg
|
|
5
|
+
*.egg-info/
|
|
6
|
+
**/__pycache__/
|
|
7
|
+
*.so
|
|
8
|
+
build/
|
|
9
|
+
dist/
|
|
10
|
+
|
|
11
|
+
# Tooling caches
|
|
12
|
+
.pytest_cache/
|
|
13
|
+
.ruff_cache/
|
|
14
|
+
.ty_cache/
|
|
15
|
+
.mypy_cache/
|
|
16
|
+
|
|
17
|
+
# Coverage
|
|
18
|
+
.coverage
|
|
19
|
+
.coverage.*
|
|
20
|
+
coverage.xml
|
|
21
|
+
htmlcov/
|
|
22
|
+
coverage_html_report/
|
|
23
|
+
|
|
24
|
+
# Environment & Secrets
|
|
25
|
+
.venv/
|
|
26
|
+
venv/
|
|
27
|
+
.env
|
|
28
|
+
.env.*
|
|
29
|
+
!.env.template
|
|
30
|
+
.envrc
|
|
31
|
+
|
|
32
|
+
# IDE
|
|
33
|
+
.vscode/
|
|
34
|
+
.idea/
|
|
35
|
+
|
|
36
|
+
# Agent config
|
|
37
|
+
.agents/
|
|
38
|
+
.claude/
|
|
39
|
+
/graft/
|
|
40
|
+
.ignore
|
|
41
|
+
.mcp.json
|
|
42
|
+
|
|
43
|
+
# OS
|
|
44
|
+
.DS_Store
|
|
45
|
+
Thumbs.db
|
|
46
|
+
|
|
47
|
+
# Jupyter
|
|
48
|
+
.ipynb_checkpoints/
|
|
49
|
+
|
|
50
|
+
# Local files
|
|
51
|
+
local/
|
|
52
|
+
sources/
|
|
53
|
+
working-notes/
|
|
54
|
+
/dev
|
|
55
|
+
|
|
56
|
+
# Pin Python (overrides the global ignore)
|
|
57
|
+
!.python-version
|
|
58
|
+
|
|
59
|
+
# --- CI caches (UV_CACHE_DIR / PRE_COMMIT_HOME point here in .gitlab-ci.yml) ---
|
|
60
|
+
# Not just local hygiene: hatchling would otherwise pull them into the sdist,
|
|
61
|
+
# and a cached virtualenv carries absolute symlinks that break the build.
|
|
62
|
+
.uv-cache/
|
|
63
|
+
.pre-commit-cache/
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Pipeline for a Python library published to PyPI.
|
|
2
|
+
#
|
|
3
|
+
# quality lint, format and type checks (pre-commit)
|
|
4
|
+
# test pytest on every supported Python version
|
|
5
|
+
# publish tag-only: build, then TestPyPI, then PyPI behind a manual gate
|
|
6
|
+
#
|
|
7
|
+
# Publishing uses PyPI Trusted Publishing (OIDC): GitLab mints a short-lived ID
|
|
8
|
+
# token, PyPI exchanges it for a publish token valid for minutes. No API token
|
|
9
|
+
# is stored in the project. Declare this repository as a trusted publisher at
|
|
10
|
+
# https://pypi.org/manage/project/dot-agora/settings/publishing/ (and the same on
|
|
11
|
+
# test.pypi.org) before the first release.
|
|
12
|
+
|
|
13
|
+
workflow:
|
|
14
|
+
rules:
|
|
15
|
+
# Merge requests take priority...
|
|
16
|
+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
17
|
+
when: always
|
|
18
|
+
# ...release tags (vX.Y.Z, or a candidate vX.Y.ZrcN: the PEP 440 spelling,
|
|
19
|
+
# since check_version compares the tag with the normalised project version)...
|
|
20
|
+
- if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+(?:rc\d+)?$/
|
|
21
|
+
when: always
|
|
22
|
+
# ...and pushes to main. The MR rule above keeps this from double-firing.
|
|
23
|
+
- if: $CI_COMMIT_BRANCH == "main"
|
|
24
|
+
when: always
|
|
25
|
+
# Anything else (branch pushes without an MR, malformed tags) runs nothing.
|
|
26
|
+
- when: never
|
|
27
|
+
|
|
28
|
+
stages:
|
|
29
|
+
- quality
|
|
30
|
+
- test
|
|
31
|
+
- publish
|
|
32
|
+
|
|
33
|
+
variables:
|
|
34
|
+
UV_CACHE_DIR: "$CI_PROJECT_DIR/.uv-cache"
|
|
35
|
+
PRE_COMMIT_HOME: "$CI_PROJECT_DIR/.pre-commit-cache"
|
|
36
|
+
# Keep resolution reproducible: fail rather than silently relock.
|
|
37
|
+
UV_FROZEN: "1"
|
|
38
|
+
|
|
39
|
+
default:
|
|
40
|
+
image: ghcr.io/astral-sh/uv:python3.12-bookworm-slim
|
|
41
|
+
cache:
|
|
42
|
+
key:
|
|
43
|
+
files:
|
|
44
|
+
- uv.lock
|
|
45
|
+
paths:
|
|
46
|
+
- .uv-cache
|
|
47
|
+
- .pre-commit-cache
|
|
48
|
+
|
|
49
|
+
# --------------------------------------------------------------------------
|
|
50
|
+
# quality
|
|
51
|
+
# --------------------------------------------------------------------------
|
|
52
|
+
|
|
53
|
+
quality:
|
|
54
|
+
stage: quality
|
|
55
|
+
before_script:
|
|
56
|
+
- apt-get update && apt-get install -y --no-install-recommends git
|
|
57
|
+
- uv sync --all-extras --all-groups
|
|
58
|
+
script:
|
|
59
|
+
- uv run pre-commit run --all-files --show-diff-on-failure
|
|
60
|
+
|
|
61
|
+
# --------------------------------------------------------------------------
|
|
62
|
+
# test
|
|
63
|
+
# --------------------------------------------------------------------------
|
|
64
|
+
|
|
65
|
+
test:
|
|
66
|
+
stage: test
|
|
67
|
+
image: ghcr.io/astral-sh/uv:python$PYTHON_VERSION-bookworm-slim
|
|
68
|
+
parallel:
|
|
69
|
+
matrix:
|
|
70
|
+
# Every version the package claims to support in requires-python.
|
|
71
|
+
- PYTHON_VERSION: ["3.12", "3.13"]
|
|
72
|
+
before_script:
|
|
73
|
+
- uv sync --all-extras --all-groups --python "$PYTHON_VERSION"
|
|
74
|
+
script:
|
|
75
|
+
- uv run --python "$PYTHON_VERSION" pytest --cov=src --cov-report=term --cov-report=xml
|
|
76
|
+
coverage: '/^TOTAL.*\s+(\d+%)$/'
|
|
77
|
+
artifacts:
|
|
78
|
+
when: always
|
|
79
|
+
reports:
|
|
80
|
+
coverage_report:
|
|
81
|
+
coverage_format: cobertura
|
|
82
|
+
path: coverage.xml
|
|
83
|
+
|
|
84
|
+
# --------------------------------------------------------------------------
|
|
85
|
+
# publish (release tags only)
|
|
86
|
+
# --------------------------------------------------------------------------
|
|
87
|
+
|
|
88
|
+
# The tag drives the release, so it must agree with the packaged version:
|
|
89
|
+
# publishing v1.2.3 from a tree that says 1.2.2 cannot be undone on PyPI.
|
|
90
|
+
check_version:
|
|
91
|
+
stage: publish
|
|
92
|
+
script:
|
|
93
|
+
- VERSION="$(uv version --short)"
|
|
94
|
+
- |
|
|
95
|
+
if [ "v$VERSION" != "$CI_COMMIT_TAG" ]; then
|
|
96
|
+
echo "Tag $CI_COMMIT_TAG does not match project version v$VERSION."
|
|
97
|
+
echo "Run 'uv version <new>' and retag."
|
|
98
|
+
exit 1
|
|
99
|
+
fi
|
|
100
|
+
- echo "Tag matches version v$VERSION."
|
|
101
|
+
rules:
|
|
102
|
+
- if: $CI_COMMIT_TAG
|
|
103
|
+
|
|
104
|
+
build:
|
|
105
|
+
stage: publish
|
|
106
|
+
needs: ["check_version"]
|
|
107
|
+
# No cache here on purpose: the shared cache restores .uv-cache/ and
|
|
108
|
+
# .pre-commit-cache/ into the project directory, and the sdist would pick
|
|
109
|
+
# them up — cached virtualenvs carry absolute symlinks that fail the build.
|
|
110
|
+
cache: []
|
|
111
|
+
script:
|
|
112
|
+
# --no-sources ignores tool.uv.sources, so the build matches what a user
|
|
113
|
+
# installing from PyPI will actually get.
|
|
114
|
+
- uv build --no-sources
|
|
115
|
+
- ls -l dist/
|
|
116
|
+
artifacts:
|
|
117
|
+
paths:
|
|
118
|
+
- dist/
|
|
119
|
+
expire_in: 1 week
|
|
120
|
+
rules:
|
|
121
|
+
- if: $CI_COMMIT_TAG
|
|
122
|
+
|
|
123
|
+
.publish:
|
|
124
|
+
stage: publish
|
|
125
|
+
needs: ["build"]
|
|
126
|
+
before_script:
|
|
127
|
+
- apt-get update && apt-get install -y --no-install-recommends curl jq
|
|
128
|
+
script:
|
|
129
|
+
# Exchange the GitLab OIDC token for a short-lived PyPI publish token.
|
|
130
|
+
# Never echoed: it would land in the job log in clear text.
|
|
131
|
+
- |
|
|
132
|
+
MINTED="$(curl -sS -X POST "$PYPI_MINT_URL" \
|
|
133
|
+
-H 'Content-Type: application/json' \
|
|
134
|
+
-d "{\"token\":\"${PYPI_ID_TOKEN}\"}" | jq -r '.token // empty')"
|
|
135
|
+
if [ -z "$MINTED" ]; then
|
|
136
|
+
echo "Could not mint a publish token. Is this project registered as a"
|
|
137
|
+
echo "trusted publisher on $PYPI_HOST, with the right branch/tag rules?"
|
|
138
|
+
exit 1
|
|
139
|
+
fi
|
|
140
|
+
export UV_PUBLISH_TOKEN="$MINTED"
|
|
141
|
+
- uv publish --publish-url "$PYPI_PUBLISH_URL" dist/*
|
|
142
|
+
|
|
143
|
+
publish_testpypi:
|
|
144
|
+
extends: .publish
|
|
145
|
+
id_tokens:
|
|
146
|
+
PYPI_ID_TOKEN:
|
|
147
|
+
aud: testpypi
|
|
148
|
+
variables:
|
|
149
|
+
PYPI_HOST: test.pypi.org
|
|
150
|
+
PYPI_MINT_URL: https://test.pypi.org/_/oidc/mint-token
|
|
151
|
+
PYPI_PUBLISH_URL: https://test.pypi.org/legacy/
|
|
152
|
+
environment:
|
|
153
|
+
name: testpypi
|
|
154
|
+
url: https://test.pypi.org/project/dot-agora/
|
|
155
|
+
rules:
|
|
156
|
+
- if: $CI_COMMIT_TAG
|
|
157
|
+
|
|
158
|
+
publish_pypi:
|
|
159
|
+
extends: .publish
|
|
160
|
+
# `extends` REPLACES `needs`, it does not merge it: redeclaring the
|
|
161
|
+
# dependency on publish_testpypi drops the one on build inherited from
|
|
162
|
+
# `.publish`, and the job starts with an empty dist/ ("No files found to
|
|
163
|
+
# publish"). Both edges have to be spelled out here.
|
|
164
|
+
needs:
|
|
165
|
+
- job: build
|
|
166
|
+
artifacts: true
|
|
167
|
+
- job: publish_testpypi
|
|
168
|
+
artifacts: false
|
|
169
|
+
id_tokens:
|
|
170
|
+
PYPI_ID_TOKEN:
|
|
171
|
+
aud: pypi
|
|
172
|
+
variables:
|
|
173
|
+
PYPI_HOST: pypi.org
|
|
174
|
+
PYPI_MINT_URL: https://pypi.org/_/oidc/mint-token
|
|
175
|
+
PYPI_PUBLISH_URL: https://upload.pypi.org/legacy/
|
|
176
|
+
environment:
|
|
177
|
+
name: pypi
|
|
178
|
+
url: https://pypi.org/project/dot-agora/
|
|
179
|
+
rules:
|
|
180
|
+
# Final releases only: a candidate (vX.Y.ZrcN) stops at TestPyPI.
|
|
181
|
+
# Manual on purpose: a PyPI release cannot be taken back, only yanked.
|
|
182
|
+
- if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/
|
|
183
|
+
when: manual
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Verbatim legal texts: the AGPL and the DCO both forbid modification,
|
|
2
|
+
# so no hook may normalise their whitespace or line endings.
|
|
3
|
+
exclude: '^(LICENSE\.md|DCO)$'
|
|
4
|
+
|
|
5
|
+
repos:
|
|
6
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
7
|
+
rev: v6.0.0
|
|
8
|
+
hooks:
|
|
9
|
+
- id: trailing-whitespace
|
|
10
|
+
- id: end-of-file-fixer
|
|
11
|
+
- id: check-yaml
|
|
12
|
+
- id: check-toml
|
|
13
|
+
- id: check-merge-conflict
|
|
14
|
+
- id: check-case-conflict
|
|
15
|
+
- id: check-added-large-files
|
|
16
|
+
args: ["--maxkb=1000"]
|
|
17
|
+
- id: detect-private-key
|
|
18
|
+
- id: debug-statements
|
|
19
|
+
|
|
20
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
21
|
+
rev: v0.16.0
|
|
22
|
+
hooks:
|
|
23
|
+
- id: ruff-check
|
|
24
|
+
args: [--fix]
|
|
25
|
+
- id: ruff-format
|
|
26
|
+
|
|
27
|
+
- repo: local
|
|
28
|
+
hooks:
|
|
29
|
+
- id: ty
|
|
30
|
+
name: ty (type check)
|
|
31
|
+
entry: uv run --frozen ty check
|
|
32
|
+
language: system
|
|
33
|
+
types: [python]
|
|
34
|
+
pass_filenames: false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Authors
|
|
2
|
+
|
|
3
|
+
Copyright in this project is held by **Kannon For Deep Tech**.
|
|
4
|
+
This file credits the individuals who have contributed to it. Being listed
|
|
5
|
+
here does not confer any ownership of, or rights in, the project.
|
|
6
|
+
|
|
7
|
+
## Kannon For Deep Tech
|
|
8
|
+
|
|
9
|
+
- Adrien Marjollet
|
|
10
|
+
- Clément Olivier
|
|
11
|
+
- Jean Fechter
|
|
12
|
+
- Louis Le Tarnec
|
|
13
|
+
|
|
14
|
+
## External contributors
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [2.0.0] - 2026-09-15
|
|
11
|
+
|
|
12
|
+
First public release. The 1.x line was internal, developed under the name
|
|
13
|
+
`dot-agent` with a different architecture (`Agent`, tools and middleware);
|
|
14
|
+
2.0.0 is a rewrite and offers no migration path from it.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- `Room`: a conversation whose every act is judged by a mediator and recorded in
|
|
19
|
+
an append-only `Journal`, with its ruling (admitted, held or refused).
|
|
20
|
+
- The built-in language: `say`, `request` → `reply`, `join`, `leave`,
|
|
21
|
+
`interrupt`, and the mediator's `refusal` and `cancel`.
|
|
22
|
+
- Composable protocols in `dot_agora.protocols`: `Approval` and `Vote`, with
|
|
23
|
+
their `PlaysApproval` and `PlaysVote` gestures and hooks.
|
|
24
|
+
- Policies in `dot_agora.policies`: `permission`, `approval`, `answer_first` and
|
|
25
|
+
`ballot`. Any `(state, face) -> verdicts` function is a policy.
|
|
26
|
+
- Views in `dot_agora.views`: `public`, `addressed`, `full`, `by_role`, and
|
|
27
|
+
`rewire` to keep causal links inside a custom view.
|
|
28
|
+
- `Participant`: hooks per act (`on_request`, `on_reply`…), checked at class
|
|
29
|
+
definition, and `serving` to find the request a reaction serves.
|
|
30
|
+
- `Assistant`: an LLM participant that discovers tools from the journal, asks
|
|
31
|
+
the user through a virtual `ask` tool, and checks structured answers against a
|
|
32
|
+
schema.
|
|
33
|
+
- `LLMClient`, built by `dot-inference` from `DOTI_*` settings or wrapping a
|
|
34
|
+
given client, with streaming to subscribers. `SearchClient` for Linkup web
|
|
35
|
+
search.
|
|
36
|
+
- Runtimes: `Stepper` (deterministic, synchronous) and `Session` (async).
|
|
37
|
+
- `fork` and `resume` a room from a journal; `dot_agora.hosts.wire` dumps and
|
|
38
|
+
loads journals as JSON.
|
|
39
|
+
- Hosts: `hosts.local`, the interactive `hosts.cli` and `hosts.terminal`
|
|
40
|
+
(`[cli]` extra), and the REST/SSE `hosts.http` (`[http]` extra).
|
|
41
|
+
|
|
42
|
+
[Unreleased]: https://gitlab.com/deepika6190303/deepika-open-toolbox/dot-agora/-/compare/v2.0.0...main
|
|
43
|
+
[2.0.0]: https://gitlab.com/deepika6190303/deepika-open-toolbox/dot-agora/-/tags/v2.0.0
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in this project. Contributions are welcome.
|
|
4
|
+
|
|
5
|
+
This project is maintained by **Kannon For Deep Tech** and released under the
|
|
6
|
+
GNU Affero General Public License v3.0 or later (`AGPL-3.0-or-later`).
|
|
7
|
+
|
|
8
|
+
## 1. Sign off your commits (DCO)
|
|
9
|
+
|
|
10
|
+
Every commit must carry a `Signed-off-by` line. Add it automatically with:
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
git commit -s
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
This appends:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
Signed-off-by: Jane Doe <jane@example.com>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The name and email must be your real ones and must match your commit author
|
|
23
|
+
details. By signing off, you certify the [Developer Certificate of Origin](DCO)
|
|
24
|
+
(v1.1) **and** you agree to the licensing terms in section 2 below.
|
|
25
|
+
|
|
26
|
+
Pull requests with unsigned commits will not be merged.
|
|
27
|
+
|
|
28
|
+
## 2. Licensing of your contribution
|
|
29
|
+
|
|
30
|
+
By contributing to this project, you agree to the following.
|
|
31
|
+
|
|
32
|
+
**2.1 — Outbound licence.** Your contribution is licensed to the public under
|
|
33
|
+
`AGPL-3.0-or-later`, the same terms as the rest of the project.
|
|
34
|
+
|
|
35
|
+
**2.2 — Additional grant to the maintainer.** You additionally grant Kannon For
|
|
36
|
+
Deep Tech a perpetual, worldwide, irrevocable, non-exclusive, royalty-free,
|
|
37
|
+
transferable and sublicensable right to reproduce, modify, adapt, translate,
|
|
38
|
+
publish, distribute and otherwise exploit your contribution, in whole or in
|
|
39
|
+
part, in any form and by any means, on any medium, **under any licensing terms,
|
|
40
|
+
including proprietary and commercial terms**, for the entire duration of the
|
|
41
|
+
applicable copyright protection and worldwide.
|
|
42
|
+
|
|
43
|
+
**2.3 — What this means in practice.** This project is dual-licensed: it is
|
|
44
|
+
available to everyone under the AGPL, and Kannon For Deep Tech also sells
|
|
45
|
+
commercial licences to organisations that cannot comply with the AGPL. Section
|
|
46
|
+
2.2 is what makes that possible. Without it, no contribution could be included
|
|
47
|
+
in a commercially licensed version.
|
|
48
|
+
|
|
49
|
+
**2.4 — You keep your copyright.** This is a licence grant, not a transfer of
|
|
50
|
+
ownership. You remain the author and copyright holder of your contribution and
|
|
51
|
+
stay free to use and relicense it however you wish, elsewhere.
|
|
52
|
+
|
|
53
|
+
**2.5 — Your warranties.** You confirm that you are entitled to grant the above
|
|
54
|
+
rights, that your contribution is your original work or that you hold the
|
|
55
|
+
necessary rights over it, and that it does not infringe any third-party rights.
|
|
56
|
+
If you are contributing in the course of your employment or under a service
|
|
57
|
+
agreement, you confirm that your employer or client has authorised you to
|
|
58
|
+
contribute under these terms, or has waived any rights that would conflict with
|
|
59
|
+
them.
|
|
60
|
+
|
|
61
|
+
## 3. Contractors and employees of Kannon For Deep Tech
|
|
62
|
+
|
|
63
|
+
If you are working for Kannon For Deep Tech as an employee or under a service
|
|
64
|
+
agreement, the assignment of rights set out in your contract governs, and takes
|
|
65
|
+
precedence over this file. The sign-off above does not replace it.
|
|
66
|
+
|
|
67
|
+
## 4. Submitting a change
|
|
68
|
+
|
|
69
|
+
1. Open an issue first for anything substantial, so we can agree on the approach.
|
|
70
|
+
2. Fork, branch, and keep commits focused.
|
|
71
|
+
3. Add or update tests where relevant.
|
|
72
|
+
4. Add the SPDX headers to any new file:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
# SPDX-FileCopyrightText: Kannon For Deep Tech and contributors
|
|
76
|
+
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Do not modify the copyright lines of existing files. If you would like to be
|
|
80
|
+
credited individually, add yourself to [AUTHORS.md](AUTHORS.md) in the same pull request.
|
|
81
|
+
|
|
82
|
+
5. Sign off every commit (`git commit -s`) and open a pull request.
|
|
83
|
+
|
|
84
|
+
## 5. Questions
|
|
85
|
+
|
|
86
|
+
For anything about licensing, including commercial licences, contact
|
|
87
|
+
<louis.letarnec@deepika.ai>.
|
dot_agora-2.0.0/DCO
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Developer Certificate of Origin
|
|
2
|
+
Version 1.1
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
|
|
5
|
+
|
|
6
|
+
Everyone is permitted to copy and distribute verbatim copies of this
|
|
7
|
+
license document, but changing it is not allowed.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Developer's Certificate of Origin 1.1
|
|
11
|
+
|
|
12
|
+
By making a contribution to this project, I certify that:
|
|
13
|
+
|
|
14
|
+
(a) The contribution was created in whole or in part by me and I
|
|
15
|
+
have the right to submit it under the open source license
|
|
16
|
+
indicated in the file; or
|
|
17
|
+
|
|
18
|
+
(b) The contribution is based upon previous work that, to the best
|
|
19
|
+
of my knowledge, is covered under an appropriate open source
|
|
20
|
+
license and I have the right under that license to submit that
|
|
21
|
+
work with modifications, whether created in whole or in part
|
|
22
|
+
by me, under the same open source license (unless I am
|
|
23
|
+
permitted to submit under a different license), as indicated
|
|
24
|
+
in the file; or
|
|
25
|
+
|
|
26
|
+
(c) The contribution was provided directly to me by some other
|
|
27
|
+
person who certified (a), (b) or (c) and I have not modified
|
|
28
|
+
it.
|
|
29
|
+
|
|
30
|
+
(d) I understand and agree that this project and the contribution
|
|
31
|
+
are public and that a record of the contribution (including all
|
|
32
|
+
personal information I submit with it, including my sign-off) is
|
|
33
|
+
maintained indefinitely and may be redistributed consistent with
|
|
34
|
+
this project or the open source license(s) involved.
|