Buckets:

download
raw
2.7 kB
"""Console entrypoint for the CodeTether agent worker.
DEPRECATED: This Python worker entrypoint is replaced by the codetether
Rust binary's built-in worker mode:
codetether worker --server <URL> --codebases <PATH> --auto-approve safe
This wraps `legacy.agent_worker.worker` so users can run:
- `codetether-worker --config /etc/a2a-worker/config.json`
The worker uses argparse internally; this wrapper just bridges the
async entrypoint for console_scripts.
This file is kept for backward compatibility during the migration period
and will be removed in a future release.
"""
from __future__ import annotations
import asyncio
import sys
def _get_version() -> str:
try:
from importlib.metadata import version
return version("codetether")
except Exception:
try:
from codetether import __version__
return __version__
except Exception:
return "unknown"
def _print_about() -> None:
v = _get_version()
print(f"CodeTether Worker {v}")
print("\nCodeTether integration")
print("- The worker executes tasks using an 'agent'-compatible CLI on the worker machine.")
print("- This project maintains and tests against a fork of CodeTether (see the repo's 'agent/' directory).")
print("\nUpstream credit")
print("- CodeTether: https://agent.ai (by its upstream authors and contributors)")
print("- CodeTether is not affiliated with the upstream CodeTether project.")
def main() -> None:
if any(arg in {"--version", "-V"} for arg in sys.argv[1:]):
# Keep --version machine-friendly (prints only the version string).
print(_get_version())
return
if any(arg == "--about" for arg in sys.argv[1:]):
_print_about()
return
import warnings
warnings.warn(
"The `codetether-worker` Python entrypoint is DEPRECATED and will be "
"removed in a future release. Use the codetether Rust binary instead:\n"
" codetether worker --server <URL> --codebases <PATH> --auto-approve safe\n"
"See: legacy/agent_worker/install-codetether-worker.sh",
DeprecationWarning,
stacklevel=2,
)
print(
"⚠️ DEPRECATION WARNING: `codetether-worker` (Python) is deprecated.\n"
" Use `codetether worker` (Rust binary) instead.\n"
" Install: sudo ./legacy/agent_worker/install-codetether-worker.sh\n"
" Run: codetether worker --server <URL> --codebases <PATH> --auto-approve safe\n",
file=sys.stderr,
)
from legacy.agent_worker.worker import main as async_main # async def main()
asyncio.run(async_main())
if __name__ == "__main__":
main()

Xet Storage Details

Size:
2.7 kB
·
Xet hash:
18ce39cf422a33b461ea004f2e599753b8ddb28012a4059023e277ffd3ee95b0

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.