codetether 1.2.2__py3-none-any.whl
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.
- a2a_server/__init__.py +29 -0
- a2a_server/a2a_agent_card.py +365 -0
- a2a_server/a2a_errors.py +1133 -0
- a2a_server/a2a_executor.py +926 -0
- a2a_server/a2a_router.py +1033 -0
- a2a_server/a2a_types.py +344 -0
- a2a_server/agent_card.py +408 -0
- a2a_server/agents_server.py +271 -0
- a2a_server/auth_api.py +349 -0
- a2a_server/billing_api.py +638 -0
- a2a_server/billing_service.py +712 -0
- a2a_server/billing_webhooks.py +501 -0
- a2a_server/config.py +96 -0
- a2a_server/database.py +2165 -0
- a2a_server/email_inbound.py +398 -0
- a2a_server/email_notifications.py +486 -0
- a2a_server/enhanced_agents.py +919 -0
- a2a_server/enhanced_server.py +160 -0
- a2a_server/hosted_worker.py +1049 -0
- a2a_server/integrated_agents_server.py +347 -0
- a2a_server/keycloak_auth.py +750 -0
- a2a_server/livekit_bridge.py +439 -0
- a2a_server/marketing_tools.py +1364 -0
- a2a_server/mcp_client.py +196 -0
- a2a_server/mcp_http_server.py +2256 -0
- a2a_server/mcp_server.py +191 -0
- a2a_server/message_broker.py +725 -0
- a2a_server/mock_mcp.py +273 -0
- a2a_server/models.py +494 -0
- a2a_server/monitor_api.py +5904 -0
- a2a_server/opencode_bridge.py +1594 -0
- a2a_server/redis_task_manager.py +518 -0
- a2a_server/server.py +726 -0
- a2a_server/task_manager.py +668 -0
- a2a_server/task_queue.py +742 -0
- a2a_server/tenant_api.py +333 -0
- a2a_server/tenant_middleware.py +219 -0
- a2a_server/tenant_service.py +760 -0
- a2a_server/user_auth.py +721 -0
- a2a_server/vault_client.py +576 -0
- a2a_server/worker_sse.py +873 -0
- agent_worker/__init__.py +8 -0
- agent_worker/worker.py +4877 -0
- codetether/__init__.py +10 -0
- codetether/__main__.py +4 -0
- codetether/cli.py +112 -0
- codetether/worker_cli.py +57 -0
- codetether-1.2.2.dist-info/METADATA +570 -0
- codetether-1.2.2.dist-info/RECORD +66 -0
- codetether-1.2.2.dist-info/WHEEL +5 -0
- codetether-1.2.2.dist-info/entry_points.txt +4 -0
- codetether-1.2.2.dist-info/licenses/LICENSE +202 -0
- codetether-1.2.2.dist-info/top_level.txt +5 -0
- codetether_voice_agent/__init__.py +6 -0
- codetether_voice_agent/agent.py +445 -0
- codetether_voice_agent/codetether_mcp.py +345 -0
- codetether_voice_agent/config.py +16 -0
- codetether_voice_agent/functiongemma_caller.py +380 -0
- codetether_voice_agent/session_playback.py +247 -0
- codetether_voice_agent/tools/__init__.py +21 -0
- codetether_voice_agent/tools/definitions.py +135 -0
- codetether_voice_agent/tools/handlers.py +380 -0
- run_server.py +314 -0
- ui/monitor-tailwind.html +1790 -0
- ui/monitor.html +1775 -0
- ui/monitor.js +2662 -0
codetether/__init__.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""CodeTether distribution helpers.
|
|
2
|
+
|
|
3
|
+
This package provides small CLI wrappers and distribution metadata.
|
|
4
|
+
The main server implementation lives in the `a2a_server` package.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
__all__ = ["__version__"]
|
|
8
|
+
|
|
9
|
+
# Keep version in sync with setup.py for now.
|
|
10
|
+
__version__ = "1.0.0"
|
codetether/__main__.py
ADDED
codetether/cli.py
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"""Console entrypoint for CodeTether.
|
|
2
|
+
|
|
3
|
+
Goal: `pip install codetether` then run:
|
|
4
|
+
- `codetether` (defaults to starting the server)
|
|
5
|
+
- `codetether run ...` (passes through)
|
|
6
|
+
- `codetether multi` / `codetether examples`
|
|
7
|
+
|
|
8
|
+
Implementation intentionally wraps the existing `run_server.py` interface
|
|
9
|
+
to avoid duplicating server-runner logic.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import sys
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
_RUN_SERVER_COMMANDS = {'run', 'multi', 'examples'}
|
|
18
|
+
_WORKER_COMMANDS = {'worker', 'workers'}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def _get_version() -> str:
|
|
22
|
+
try:
|
|
23
|
+
from importlib.metadata import version
|
|
24
|
+
|
|
25
|
+
return version('codetether')
|
|
26
|
+
except Exception:
|
|
27
|
+
try:
|
|
28
|
+
from codetether import __version__
|
|
29
|
+
|
|
30
|
+
return __version__
|
|
31
|
+
except Exception:
|
|
32
|
+
return 'unknown'
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _print_about() -> None:
|
|
36
|
+
v = _get_version()
|
|
37
|
+
print(f'CodeTether {v}')
|
|
38
|
+
print('\nOpenCode integration')
|
|
39
|
+
print(
|
|
40
|
+
"- CodeTether integrates with an 'opencode'-compatible CLI for AI coding agents."
|
|
41
|
+
)
|
|
42
|
+
print(
|
|
43
|
+
"- This project maintains and tests against a fork of OpenCode (see the repo's 'opencode/' directory)."
|
|
44
|
+
)
|
|
45
|
+
print(
|
|
46
|
+
"- You can also point CodeTether at another compatible 'opencode' binary via configuration."
|
|
47
|
+
)
|
|
48
|
+
print('\nUpstream credit')
|
|
49
|
+
print(
|
|
50
|
+
'- OpenCode: https://opencode.ai (by its upstream authors and contributors)'
|
|
51
|
+
)
|
|
52
|
+
print('- CodeTether is not affiliated with the upstream OpenCode project.')
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def _normalize_argv(argv: list[str]) -> list[str]:
|
|
56
|
+
# argv is sys.argv (including program name at [0]).
|
|
57
|
+
args = argv[1:]
|
|
58
|
+
|
|
59
|
+
if not args:
|
|
60
|
+
# Most user-friendly: just start a single server.
|
|
61
|
+
return [argv[0], 'run']
|
|
62
|
+
|
|
63
|
+
head = args[0]
|
|
64
|
+
|
|
65
|
+
# Common friendly aliases.
|
|
66
|
+
if head in {'server', 'serve', 'start'}:
|
|
67
|
+
return [argv[0], 'run', *args[1:]]
|
|
68
|
+
|
|
69
|
+
# Allow `codetether --port 8000` etc by defaulting to the run subcommand.
|
|
70
|
+
if head.startswith('-'):
|
|
71
|
+
return [argv[0], 'run', *args]
|
|
72
|
+
|
|
73
|
+
# Pass-through to existing subcommands.
|
|
74
|
+
if head in _RUN_SERVER_COMMANDS:
|
|
75
|
+
return argv
|
|
76
|
+
|
|
77
|
+
# If user typed something else, keep compatibility with run_server's help.
|
|
78
|
+
return argv
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def main() -> None:
|
|
82
|
+
# Keep --version machine-friendly (prints only the version string).
|
|
83
|
+
if any(arg in {'--version', '-V'} for arg in sys.argv[1:]):
|
|
84
|
+
print(_get_version())
|
|
85
|
+
return
|
|
86
|
+
|
|
87
|
+
# Human-friendly branding + attribution.
|
|
88
|
+
if any(arg == '--about' for arg in sys.argv[1:]) or (
|
|
89
|
+
len(sys.argv) > 1 and sys.argv[1] in {'about', 'info'}
|
|
90
|
+
):
|
|
91
|
+
_print_about()
|
|
92
|
+
return
|
|
93
|
+
|
|
94
|
+
# Hosted worker command - for running the managed worker pool
|
|
95
|
+
if len(sys.argv) > 1 and sys.argv[1] in _WORKER_COMMANDS:
|
|
96
|
+
import asyncio
|
|
97
|
+
from a2a_server.hosted_worker import main as worker_main
|
|
98
|
+
|
|
99
|
+
# Pass remaining args to the worker
|
|
100
|
+
sys.argv = [sys.argv[0]] + sys.argv[2:]
|
|
101
|
+
asyncio.run(worker_main())
|
|
102
|
+
return
|
|
103
|
+
|
|
104
|
+
# `run_server` is installed as a top-level module via setup.py (py_modules).
|
|
105
|
+
import run_server # type: ignore
|
|
106
|
+
|
|
107
|
+
sys.argv = _normalize_argv(sys.argv)
|
|
108
|
+
run_server.main()
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
if __name__ == '__main__':
|
|
112
|
+
main()
|
codetether/worker_cli.py
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"""Console entrypoint for the CodeTether agent worker.
|
|
2
|
+
|
|
3
|
+
This wraps `agent_worker.worker` so users can run:
|
|
4
|
+
- `codetether-worker --config /etc/a2a-worker/config.json`
|
|
5
|
+
|
|
6
|
+
The worker uses argparse internally; this wrapper just bridges the
|
|
7
|
+
async entrypoint for console_scripts.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
import asyncio
|
|
13
|
+
import sys
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _get_version() -> str:
|
|
17
|
+
try:
|
|
18
|
+
from importlib.metadata import version
|
|
19
|
+
|
|
20
|
+
return version("codetether")
|
|
21
|
+
except Exception:
|
|
22
|
+
try:
|
|
23
|
+
from codetether import __version__
|
|
24
|
+
|
|
25
|
+
return __version__
|
|
26
|
+
except Exception:
|
|
27
|
+
return "unknown"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _print_about() -> None:
|
|
31
|
+
v = _get_version()
|
|
32
|
+
print(f"CodeTether Worker {v}")
|
|
33
|
+
print("\nOpenCode integration")
|
|
34
|
+
print("- The worker executes tasks using an 'opencode'-compatible CLI on the worker machine.")
|
|
35
|
+
print("- This project maintains and tests against a fork of OpenCode (see the repo's 'opencode/' directory).")
|
|
36
|
+
print("\nUpstream credit")
|
|
37
|
+
print("- OpenCode: https://opencode.ai (by its upstream authors and contributors)")
|
|
38
|
+
print("- CodeTether is not affiliated with the upstream OpenCode project.")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def main() -> None:
|
|
42
|
+
if any(arg in {"--version", "-V"} for arg in sys.argv[1:]):
|
|
43
|
+
# Keep --version machine-friendly (prints only the version string).
|
|
44
|
+
print(_get_version())
|
|
45
|
+
return
|
|
46
|
+
|
|
47
|
+
if any(arg == "--about" for arg in sys.argv[1:]):
|
|
48
|
+
_print_about()
|
|
49
|
+
return
|
|
50
|
+
|
|
51
|
+
from agent_worker.worker import main as async_main # async def main()
|
|
52
|
+
|
|
53
|
+
asyncio.run(async_main())
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
if __name__ == "__main__":
|
|
57
|
+
main()
|